/**
 * Résultats DR - CSS public.
 * Structure minimale (wrapper, barre d'outils, bouton d'export) + design
 * du tableau de résultats intégré tel que fourni (table-dr-custom).
 */

.dr-results-wrapper {
	margin: 20px 0;
}

.dr-results-toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
}

/* Marge automatique à droite : pousse le bouton d'export vers la droite,
   que le sélecteur d'année soit présent ou non (une seule année archivée). */
.dr-results-year-selector {
	margin-bottom: 0;
	margin-right: auto;
}

.dr-results-empty {
	font-style: italic;
	margin-left:15px;
}

.dr-results-error {
	color: #b32d2e;
}

/* État de chargement pendant le rechargement AJAX des archives. */
.dr-results-table-container.is-loading {
	opacity: 0.5;
}

.dr-results-caption {
	font-weight: 700;
	text-align: left;
	margin-bottom: 8px;
	font-size:1.9rem;
}

.dr-results-caption-row{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:12px;
	margin: 0 0 10px 0;
}
.dr-results-caption-left{
	flex: 1;
	font-weight:700;
	text-align:left;
	font-size:1.9rem;
}
.dr-results-caption-right{
	flex-shrink:0;
	display:flex;
	justify-content:flex-end;
	align-items:center;
}


/* Bouton d'export PDF (icône seule). */
.dr-btn-icon-pdf {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: none;
	border-radius: 6px;
	background-color: #5d6d7e;
	color: #fff;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color 0.15s;
}

.dr-btn-icon-pdf:hover,
.dr-btn-icon-pdf:focus {
	background-color: #46525f;
	color: #fff;
}

.dr-btn-icon-pdf:disabled,
.dr-btn-icon-pdf.is-generating {
	opacity: 0.6;
	cursor: wait;
}


.dr-btn-icon-pdf svg {
	display: block;
	pointer-events: none;
}

/* ====================== Tableau DR custom (fourni) ====================== */

/* Tableau DR custom */
.dr-results-table{width:100%;border-collapse:collapse;font-family:'Segoe UI',Arial,sans-serif;margin:20px 0;box-shadow:0 4px 15px rgba(0,0,0,.1)}
.dr-results-table thead tr:first-child th{color:#fff;text-transform:uppercase;font-size:1.2rem;padding:10px;border:none}
.bg-globaux{background-color:#f39c12}
.table-dr-custom td{padding:12px 10px;border-bottom:1px solid #f2f2f2;font-size:1rem;color:#333}
.pos-circle{display:inline-block;width:25px;height:25px;line-height:25px;border-radius:50%;background:#eee;text-align:center;font-size:.8rem}
.wp-block-table tr:first-child{background-color:#f8f9fb!important}

/* Template DR */
.wp-block-table.is-style-dr-template table{border-collapse:separate!important;border-spacing:0!important;border:1px solid #eee!important;box-shadow:0 4px 15px rgba(0,0,0,.05)!important}
.is-style-dr-template th:nth-child(1){background-image:linear-gradient(135deg,#5a5a5a 0,#333333 100%)!important}
.is-style-dr-template th:nth-child(2){background-image:linear-gradient(135deg,#8e44ad 0,#5d2d72 100%)!important}
.is-style-dr-template th:nth-child(3){background-image:linear-gradient(135deg,#0080ff 0,#0059b3 100%)!important}
.is-style-dr-template th:nth-child(4){background-image:linear-gradient(135deg,#20b65f 0,#15793f 100%)!important}
.is-style-dr-template th:nth-child(5){background-image:linear-gradient(135deg,#e23636 0,#b31a1a 100%)!important}
.is-style-dr-template th:nth-child(6){background-image:linear-gradient(135deg,gold 0,#b8860b 100%)!important}
.is-style-dr-template th{border:1px solid #f0f0f0!important;padding:12px 10px!important;text-align:center!important;font-size:.9rem!important}
.is-style-dr-template td{text-align:center;}

/* Style commun pour les médailles */
.dr-results-row[data-rang="1"] .pos-circle,
.dr-results-row[data-rang="2"] .pos-circle,
.dr-results-row[data-rang="3"] .pos-circle {
    background: none !important;
	font-size: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
	color: #000;
	content:""
}
.dr-results-row[data-rang="1"] .pos-circle::after,
.dr-results-row[data-rang="2"] .pos-circle::after,
.dr-results-row[data-rang="3"] .pos-circle::after { 
	font-size: 2rem !important;
    color: #000; /* Remet une couleur visible pour l'emoji */
}

/* Remplacement du texte par l'emoji via Unicode */
.dr-results-row[data-rang="1"] .pos-circle::after { 
    content: "\1F947"; 
}
.dr-results-row[data-rang="2"] .pos-circle::after { 
    content: "\1F948"; 
}

.dr-results-row[data-rang="3"] .pos-circle::after { 
    content: "\1F949"; 
}
