/* Thème Escrime Grand Est — recoloration non destructive des classements importés.
   Palette : bleu #0067FF / #005EE9, navy #0F172A, slate #364151, bleu clair #E7F6FF, bordure #D1DAE5. */
.ice-theme-ge,
.ice-theme-ge td,
.ice-theme-ge th,
.ice-theme-ge span,
.ice-theme-ge em,
.ice-theme-ge p { font-family: 'Poppins', Arial, Helvetica, sans-serif !important; }
.ice-theme-ge { color: #364151; }
.ice-theme-ge b { color: #0F172A; }
.ice-theme-ge #TableClsst,
.ice-theme-ge #TableClsst td { border-color: #D1DAE5 !important; }
.ice-theme-ge #TableClsst tr[style*="BDD7EE"] td,
.ice-theme-ge #TableClsst td[style*="BDD7EE"] { background-color: #E7F6FF !important; color: #0F172A !important; }
.ice-theme-ge #TableClsst tr[style*="DDEBF7"] td { background-color: #F3F9FF !important; color: #364151 !important; }
.ice-theme-ge #TableClsst tr[style*="CDCDCD"] td { background-color: #0067FF !important; border-color: #005EE9 !important; }
.ice-theme-ge #TableClsst tr[style*="CDCDCD"] td,
.ice-theme-ge #TableClsst tr[style*="CDCDCD"] td strong { color: #FFFFFF !important; }
.ice-theme-ge #TableClsst tr[style*="C6E0B4"] td { background-color: #FFFFFF !important; }
.ice-theme-ge #TableClsst tr[style*="E2ECDA"] td { background-color: #E7F6FF !important; }
.ice-theme-ge #TableClsst img { vertical-align: middle; }
.ice-theme-ge span[style*="16pt"] b { color: #0067FF !important; }

/* Matrice [classements ...] */
.ice-matrix { font-family: 'Poppins', Arial, Helvetica, sans-serif; color: #364151; margin: 0 0 1.5em; }
.ice-matrix-saison { font-size: 15px; font-weight: 600; color: #0F172A; margin: 1.2em 0 0.5em; }
.ice-matrix-table { border-collapse: collapse; width: 100%; max-width: 720px; font-size: 13px; }
.ice-matrix-table th,
.ice-matrix-table td { border: 1px solid #D1DAE5; padding: 8px 14px; text-align: center !important; }
.ice-matrix-table thead th { background: #E7F6FF; color: #0F172A; font-weight: 600; }
.ice-matrix-table th.ice-genre { background: #F3F9FF; color: #0F172A; font-weight: 600; text-align: center; white-space: nowrap; }
.ice-matrix-table td a { color: #0067FF; text-decoration: none; font-weight: 500; }
.ice-matrix-table td a:hover { color: #005EE9; text-decoration: underline; }
.ice-matrix-table td.ice-void { background: #FAFBFC; }

/* Lien de téléchargement ZIP (fichiers .txt) sous chaque tableau */
.ice-zip { margin: 12px 0 0; font-size: 13px; color: #364151; font-family: 'Poppins', Arial, Helvetica, sans-serif; }
.ice-zip a { color: #0067FF; font-weight: 500; text-decoration: underline; }
.ice-zip a:hover { color: #005EE9; }

/* =========================================================================
 * Accessibilité daltonisme (tous types) + niveaux de gris
 * Principe : aucune information portée par la seule couleur + contrastes AA.
 * ------------------------------------------------------------------------- */

/* Les liens ne dépendent plus de la couleur : soulignement systématique */
.ice-matrix-table td a,
.ice-theme-ge a,
.ice-zip a {
	color: #0056D0 !important;              /* bleu assombri : contraste AA sur blanc */
	text-decoration: underline !important;
	text-underline-offset: 2px;
}
.ice-matrix-table td a:hover,
.ice-theme-ge a:hover,
.ice-zip a:hover {
	color: #003E9E !important;
}

/* Repère clavier visible (utile aussi hors daltonisme) */
.ice-matrix a:focus-visible,
.ice-zip a:focus-visible,
.ice-theme-ge a:focus-visible {
	outline: 2px solid #0F172A;
	outline-offset: 2px;
}

/* En-têtes bleus des tableaux importés : bleu plus foncé -> texte blanc lisible (AA) */
.ice-theme-ge #TableClsst tr[style*="CDCDCD"] td {
	background-color: #005EE9 !important;
}

/* En-tête de la matrice : garder le texte foncé sur fond clair (fort contraste) */
.ice-matrix-table thead th,
.ice-matrix-table th.ice-genre {
	color: #0F172A !important;
}

/* Cellule vide vs remplie : la différence se lit au texte/lien, pas à la couleur.
   On garde un très léger fond pour le repère visuel, sans en faire une info. */
.ice-matrix-table td.ice-void { background: #F4F6F8 !important; }

/* Aération entre les tableaux de saison (lisibilité) */
.ice-matrix-saison { margin-top: 2.2em !important; }
.ice-matrix > .ice-matrix-saison:first-child { margin-top: 0.4em !important; }
.ice-matrix-table { margin-bottom: 0.4em; }
.ice-zip { margin-bottom: 1.8em !important; }

/* Nom de la compétition dans l'en-tête de colonne (2.10.0).
   L'export ClassEscrime ne le met que dans la légende de bas de page ;
   l'extension le remonte sous le libellé « T-n ». */
#TableClsst .ice-competition {
	display: block;
	font-size: 0.78em;
	font-weight: normal;
	line-height: 1.15;
	padding: 2px 4px;
	white-space: normal;
}

/* Colonnes « Nom » et « Club » : une seule ligne (2.10.1).
   Les clubs sont tronqués à 12 caractères par l'export ; le retour à la ligne
   faisait paraître les valeurs coupées en deux (« STRASBOURG » / « E »,
   « MAGNIN » / « GROSSI »). Seules ces colonnes sont visées : les noms de
   compétition en en-tête doivent, eux, pouvoir revenir à la ligne. */
#TableClsst .ice-nowrap { white-space: nowrap; }

/* Puces de place (2.11.1) — reprises de la maquette Sabre Laser.
   Le rond est un FOND de cellule, pas un <span> : le script de tri de
   ClassEscrime lit l'innerHTML de la cellule et exige un nombre nu, sans quoi
   il trie en texte et le classement part dans le désordre. */
#TableClsst td.ice-rang {
	text-align: center;
	color: #ffffff;
	font-weight: 800;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 26px 26px;
}
#TableClsst td.ice-medal-or {
	background-image: radial-gradient(circle at 35% 30%, #fef3c7, #d4a017 65%, #92700a);
}
#TableClsst td.ice-medal-argent {
	background-image: radial-gradient(circle at 35% 30%, #f8fafc, #b6bcc4 65%, #7c828a);
}
#TableClsst td.ice-medal-bronze {
	background-image: radial-gradient(circle at 35% 30%, #f3c99a, #b5651d 65%, #7a4210);
}
#TableClsst td.ice-medal-standard {
	background-image: radial-gradient(circle at 35% 30%, #8b97a8, #475569 62%, #334155);
}

/* =====================================================================
   Gabarit .ligue-classement (export GRANDORIA) : suppression du scroll
   horizontal.  (2.11.3)

   Les selecteurs sont prefixes par `body` a dessein : la feuille de style
   de l'export est inline DANS LE BODY de la page importee, donc posterieure
   a cette feuille-ci, chargee dans le <head>.  A specificite egale elle
   l'emporterait et les regles ci-dessous seraient sans effet.

   Le masquage de colonnes est restreint par :has() aux tableaux comptant
   exactement 14 colonnes, c'est-a-dire au gabarit actuel : un export a
   structure differente n'est pas touche.
   ===================================================================== */

/* 1. Retour a la ligne autorise (l'export met tout en nowrap). */
body .ligue-classement thead th,
body .ligue-classement tbody td { white-space: normal; }
body .ligue-classement tbody td { overflow-wrap: anywhere; }

/* 2. Densite reduite. */
body .ligue-classement table    { font-size: 12px; }
body .ligue-classement thead th { padding: 9px 7px; font-size: 10px; letter-spacing: .04em; }
body .ligue-classement tbody td { padding: 8px 7px; }

/* 3. Le masquage des colonnes est passe cote serveur (2.12.1) :
      voir ice_colonnes_masquees() dans le PHP. Les numeros de licence ne sont
      plus seulement caches, ils ne sont plus envoyes au navigateur. */

/* 4. Sous 700px : une carte par tireur. Les libelles sont reinjectes en CSS,
      l'export ne portant aucun attribut exploitable. */
@media (max-width: 700px) {
  body .ligue-classement .lc-table-wrapper { overflow-x: visible; padding: 4px 12px 18px; }
  body .ligue-classement thead { display: none; }
  body .ligue-classement table,
  body .ligue-classement tbody,
  body .ligue-classement tbody tr,
  body .ligue-classement tbody td { display: block; width: auto; }
  body .ligue-classement tbody tr {
    border: 1px solid #e2e8f0; border-radius: 12px;
    margin: 0 0 10px; padding: 10px 14px;
  }
  body .ligue-classement tbody td {
    border: 0; padding: 3px 0;
    display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  }
  body .ligue-classement tbody td::before {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: #64748b; flex: 0 0 auto;
  }
  body .ligue-classement tbody td:nth-child(2)::before  { content: 'Nom'; }
  body .ligue-classement tbody td:nth-child(3)::before  { content: 'Prénom'; }
  body .ligue-classement tbody td:nth-child(4)::before  { content: 'Territoire'; }
  body .ligue-classement tbody td:nth-child(5)::before  { content: 'Club'; }
  body .ligue-classement tbody td:nth-child(6)::before  { content: 'Division'; }
  body .ligue-classement td.lc-rang { width: auto; text-align: left; margin-bottom: 4px; }
}

/* Lien de téléchargement du détail (2.12.0). */
body .ice-lien-detail { margin: 0 0 6px; padding: 0 20px; text-align: right; font-size: 12px; }
body .ice-lien-detail a { color: #0f766e; text-decoration: none; border-bottom: 1px solid currentColor; }
body .ice-lien-detail a:hover { color: #115e59; }
