/* ==========================================================================
   nations.css : la grille des 54 sélections et sa fiche.
   L'effet de survol est celui du dossier Tour de France : entrée immédiate,
   sortie retardée, ce qui laisse une traînée quand on glisse d'une case à
   l'autre. Les valeurs sont celles de l'aperçu réglé ensemble.
   ========================================================================== */

.nations-grille {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 1px;
  background: var(--filet);
  border: 1px solid var(--filet);
  border-radius: 10px;
  overflow: visible;          /* sinon le zoom est rogné */
}
@media (max-width: 1100px) { .nations-grille { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 820px)  { .nations-grille { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px)  { .nations-grille { grid-template-columns: repeat(3, 1fr); } }

.nation-case {
  border: 0; background: var(--nuit-2); color: var(--encre);
  padding: 16px 8px 13px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), box-shadow .5s ease, background .45s ease;
  transition-delay: .22s;     /* la traîne : la case quittée redescend en retard */
  will-change: transform;
}
.nation-case:hover, .nation-case:focus-visible {
  background: var(--nuit-3);
  transform: scale(1.12) translateY(-5px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .45);
  position: relative; z-index: 3;
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), box-shadow .26s ease, background .2s ease;
  transition-delay: 0s;       /* zoom immédiat à l'entrée */
  outline: none;
}
.nation-case:focus-visible { box-shadow: 0 0 0 2px var(--rose), 0 16px 34px rgba(0, 0, 0, .45); }
.nation-case-bel { box-shadow: inset 3px 0 0 var(--rose); }

.nation-blason { width: 58%; aspect-ratio: 1; display: grid; place-items: center; }
.nation-blason img { width: 100%; height: 100%; object-fit: contain; }
.nation-vide { font: 700 .78rem/1 var(--chiffre); color: var(--encre-douce); }
.nation-nom { font: 600 .8rem/1.2 var(--texte); text-align: center; }
.nation-ligue { font-size: .64rem; color: var(--encre-douce); letter-spacing: .08em; }

@media (prefers-reduced-motion: reduce) {
  .nation-case, .nation-case:hover { transition: background .2s ease; transform: none; }
}

/* ---- La fiche ----------------------------------------------------------- */
.nation-fiche {
  width: min(620px, calc(100vw - 32px)); max-height: 86vh; overflow: auto;
  padding: 26px; border: 1px solid var(--filet); border-top: 4px solid var(--rose);
  border-radius: 18px; background: var(--nuit-2); color: var(--encre);
}
.nation-fiche::backdrop { background: rgba(3, 6, 50, .72); backdrop-filter: blur(4px); }
.nation-fermer {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--filet); background: transparent; color: var(--encre); cursor: pointer; font-size: 1.1rem;
}
.nation-fermer:hover { background: var(--rose); border-color: var(--rose); color: #fff; }

.nf-tete { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.nf-logo { width: 64px; height: 64px; object-fit: contain; }
.nf-titre { margin: 0; font: 800 1.5rem/1.1 var(--titre); }
.nf-sous { margin: 2px 0 0; color: var(--encre-douce); font-size: .88rem; }

.nf-infos { margin: 0 0 18px; display: grid; gap: 7px; }
.nf-ligne { display: flex; gap: 12px; font-size: .9rem; }
.nf-ligne dt { min-width: 128px; color: var(--encre-douce); }
.nf-ligne dd { margin: 0; }

.nf-section { margin: 20px 0 10px; font: 700 .76rem/1 var(--texte); letter-spacing: .1em; text-transform: uppercase; color: var(--rose); }
.nf-resultats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nf-resultats li { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.nf-issue { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: .7rem; font-weight: 700; color: #fff; }
.nf-resultats li[data-issue="v"] .nf-issue { background: #1f9d55; }
.nf-resultats li[data-issue="n"] .nf-issue { background: #8a8fb5; }
.nf-resultats li[data-issue="d"] .nf-issue { background: #b4341f; }
.nf-adversaire { flex: 1; }
.nf-score { font-weight: 700; }
.nf-date { color: var(--encre-douce); font-size: .76rem; }

.nf-poste { margin: 14px 0 6px; font: 700 .8rem/1 var(--texte); color: var(--encre-douce); }
.nf-joueurs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
@media (max-width: 520px) { .nf-joueurs { grid-template-columns: 1fr; } }
.nf-joueurs li { display: flex; gap: 10px; font-size: .86rem; }
.nf-numero { min-width: 22px; color: var(--encre-douce); font-size: .76rem; }
.nf-attente { color: var(--encre-douce); }
.nf-source { margin: 18px 0 0; font-size: .74rem; color: var(--encre-douce); }

/* ==========================================================================
   Fiche d'un match en direct (js/matchlive.js)
   ========================================================================== */
.ml-cliquable { cursor: pointer; position: relative; }
.ml-cliquable::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--rose); opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.ml-cliquable:hover::after, .ml-cliquable:focus-visible::after { opacity: 1; }

.ml-fiche {
  width: min(680px, calc(100vw - 32px)); max-height: 88vh; overflow: auto;
  padding: 24px; border: 1px solid var(--filet); border-top: 4px solid var(--rose);
  border-radius: 18px; background: var(--nuit-2); color: var(--encre);
}
.ml-fiche::backdrop { background: rgba(3, 6, 50, .74); backdrop-filter: blur(4px); }
.ml-fermer {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--filet); background: transparent; color: var(--encre); cursor: pointer; font-size: 1.1rem;
}
.ml-fermer:hover { background: var(--rose); border-color: var(--rose); color: #fff; }

.ml-tete { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin-bottom: 6px; }
.ml-equipe { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ml-nom { font: 700 1rem/1.2 var(--texte); }
.ml-centre { text-align: center; }
.ml-score { font: 800 2.4rem/1 var(--chiffre); display: flex; gap: 10px; justify-content: center; }
.ml-tiret { opacity: .45; }
.ml-minute { margin: 6px 0 0; font: 700 .78rem/1 var(--chiffre); color: var(--rose); display: flex; align-items: center; gap: 6px; justify-content: center; }
.ml-point { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); animation: foule-pouls 2.2s ease-in-out infinite; }
.ml-lieu { margin: 0 0 14px; text-align: center; font-size: .82rem; color: var(--encre-douce); }

.ml-section { margin: 20px 0 10px; font: 700 .76rem/1 var(--texte); letter-spacing: .1em; text-transform: uppercase; color: var(--rose); }
.ml-faits { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ml-fait { display: flex; align-items: center; gap: 10px; font-size: .9rem; padding: 7px 10px; border-radius: 10px; background: var(--nuit-3); }
.ml-fait[data-camp="ext"] { flex-direction: row-reverse; text-align: right; }
.ml-min { min-width: 34px; color: var(--encre-douce); font-size: .78rem; }
.ml-icone { font-size: .95rem; }
.ml-texte { flex: 1; }
.ml-vide, .ml-attente { color: var(--encre-douce); font-size: .88rem; }

.ml-effectifs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 560px) { .ml-effectifs { grid-template-columns: 1fr; } .ml-tete { grid-template-columns: 1fr; } }
.ml-sous { margin: 0 0 8px; font: 700 .86rem/1 var(--texte); }
.ml-joueurs { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.ml-joueurs li { display: flex; gap: 8px; font-size: .82rem; align-items: baseline; }
.ml-numero { min-width: 20px; color: var(--encre-douce); font-size: .74rem; }
.ml-poste { margin-left: auto; color: var(--encre-douce); font-size: .72rem; }
.ml-source { margin: 18px 0 0; font-size: .74rem; color: var(--encre-douce); }
