/* CAN Toulouse 2027 — accueil « Le continent des 54 drapeaux ».
   Architecture : une seule colonne de référence (.wrap, 1400 px max, gouttière fluide) pour toutes
   les sections, un seul pas vertical (--t-section) et un seul écart de grille (--t-col). */
:root { --t-section: clamp(72px, 8vw, 120px); --t-col: clamp(32px, 5vw, 80px); }
/* Chargée après can.css : mêmes jetons (couleurs, polices, gouttière), nouvelles compositions. */

.t-titre { font-size: clamp(52px, 6.2vw, 92px); font-weight: 900; line-height: .94; letter-spacing: -.04em; text-wrap: balance; }
.t-titre em, .t-h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--gold); letter-spacing: -.01em; }
.t-h2 { font-size: clamp(38px, 4.6vw, 68px); font-weight: 900; line-height: 1; letter-spacing: -.035em; text-wrap: balance; }

/* ------------------------------------------------------------- Le mur */
.t-mur { position: relative; }
.t-mur-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--t-col); align-items: center; min-height: calc(100dvh - 84px); padding-block: clamp(32px, 4vw, 56px); }
.t-mur-gauche { display: grid; gap: 32px; align-content: center; }

/* La carte : chaque pays rempli de son drapeau, à sa place */
.t-afrique { position: relative; margin: 0; }
.t-afrique-carte svg { display: block; width: 100%; height: auto; max-height: calc(100svh - 84px - 2 * clamp(32px, 4vw, 56px)); margin-inline: auto; overflow: visible; }
/* Performance : la teinte de base est appliquée aux images (carte-drapeaux, -modulate 86,90) et l'atténuation au survol
   passe par l'opacité : plus aucun filtre recalculé sur les 54 pays à chaque survol. */
.t-afrique .pays { stroke: #0b0f0c; stroke-width: 1.3; stroke-linejoin: round; cursor: pointer; transform-box: fill-box; transform-origin: center; transition: opacity .25s, transform .3s cubic-bezier(.2, .8, .2, 1), stroke .2s, stroke-width .2s; }
.t-afrique .survol .pays:not(.vise):not(.choisi) { opacity: .42; }
.t-afrique .pays.vise, .t-afrique .pays:focus-visible { filter: url(#t-relief) saturate(1.1) brightness(1.08); stroke: var(--gold-2); stroke-width: 3; transform: scale(1.07); outline: none; }
.t-afrique .pays.choisi { filter: url(#t-relief) saturate(1.05); stroke: var(--gold); stroke-width: 3.5; }
.t-afrique .survol .pays.choisi:not(.vise) { opacity: .8; }
.t-afrique .pastille { stroke-width: 3; }
.t-afrique svg :focus { outline: none; }
.t-afrique svg { outline: none; border-radius: 12px; }
.t-afrique svg:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }   /* le focus clavier est rendu par le contour doré du pays (.pays:focus-visible) */
.t-afrique .t-neutres path { fill: #262e28; stroke: #0b0f0c; stroke-width: 1.3; }
/* Menu « Lequel ? » : plusieurs pays sous le doigt, dont un minuscule à l'écran */
.t-proches { position: absolute; z-index: 6; min-width: 180px; padding: 8px; border-radius: 12px; background: var(--cream); color: var(--ink); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8); }
.t-proches[hidden] { display: none; }
.t-proches p { padding: 2px 8px 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.t-proches button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; }
.t-proches button:hover, .t-proches button:focus-visible { background: var(--cream-2); outline: none; }
.t-proches .flag { width: 28px; height: 21px; }
/* Pays complet (deux équipes) : grisé, toujours survolable pour lire son nom */
.t-afrique .pays.complet:not(.vise) { filter: grayscale(1) brightness(.45); }
.t-afrique .survol .pays.complet:not(.vise) { opacity: .6; }
.t-choix.complet .t-choix-in { background: #cfc6b2; }
.t-afrique .t-portes circle { fill: var(--gold); stroke: #0b0f0c; stroke-width: 2.5; pointer-events: none; }
.t-afrique svg.entree .t-pays .pays, .t-afrique svg.entree .pastille { animation: t-pays .9s cubic-bezier(.16, 1, .3, 1) both; animation-delay: var(--retard, 0ms); }
@keyframes t-pays { from { opacity: 0; transform: scale(.55); } }
.t-afrique-bulle { position: absolute; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: var(--cream); color: var(--ink); font-weight: 800; font-size: 15px; white-space: nowrap; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .7); transform: translate(-50%, calc(-100% - 8px)); opacity: 0; pointer-events: none; transition: opacity .15s; }
.t-afrique-bulle.visible { opacity: 1; }
.t-afrique-bulle small { font-weight: 600; color: var(--ink-2); font-size: 12px; }
.t-afrique-bulle .flag { width: 24px; height: 18px; }
.t-chapo { margin-top: 26px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: #dcd8cc; max-width: 42ch; }
.t-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 32px; }
.t-actions .btn { min-height: 56px; padding: 0 26px; font-size: 16px; color: var(--gold-2); border-color: rgba(216, 187, 130, .55); }
.t-astuce { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--gold-2); }

.t-choix-in { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; background: var(--gold); color: var(--ink); border-radius: 16px; padding: 14px 14px 14px 16px; box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .8); }
.t-choix-in::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #1f7a45 0 33.3%, #e8bc26 33.3% 66.6%, #c8302b 66.6%); }
.t-choix-maillot { flex: none; width: 58px; height: 54px; display: grid; place-items: center; border-radius: 12px; background: rgba(21, 26, 22, .12); }
.t-choix-maillot:empty::before { content: ""; width: 26px; height: 26px; border-radius: 50%; border: 2px dashed rgba(21, 26, 22, .4); }
.t-choix-maillot .maillot { width: 50px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
.t-choix-maillot.habille .maillot { animation: t-habille .55s cubic-bezier(.16, 1, .3, 1); }
@keyframes t-habille { from { transform: translateY(-14px) rotate(-8deg) scale(.7); opacity: 0; } }
.t-choix-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.t-choix-txt > span { font-size: 12px; font-weight: 700; color: #5c4a22; }
.t-choix-txt b { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; }
.t-choix-txt small { font-size: 13px; color: #4f4430; line-height: 1.4; }
.t-choix-btn { flex: none; min-height: 52px; background: var(--ink); color: #fff; border-color: var(--ink); }
.t-choix-btn:hover { background: #26302a; }
.t-choix-btn[hidden] { display: none !important; }

/* ------------------------------------------------------------- Le tournoi en une ligne */
.t-ligne { position: relative; background: var(--bg-2); border-top: 1px solid var(--line); }
.t-ligne::after { content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: linear-gradient(90deg, #1f7a45 0 33.3%, #e8bc26 33.3% 66.6%, #c8302b 66.6%); }
.t-ligne-txt { padding-block: clamp(28px, 3.4vw, 44px); font-size: clamp(20px, 2.1vw, 30px); font-weight: 500; line-height: 1.45; letter-spacing: -.01em; color: #e9e5d8; text-wrap: balance; }
.t-ligne-txt b { font-weight: 900; color: #fff; }
.t-ligne-txt i { font-style: normal; color: var(--gold-ink); padding: 0 .25em; }
.t-ligne-txt small { font-size: .62em; color: var(--muted); font-weight: 400; white-space: nowrap; }
.t-ligne-in { display: flex; align-items: center; justify-content: space-between; gap: 18px 40px; flex-wrap: wrap; padding-block: clamp(28px, 3.4vw, 44px); }
.t-ligne-in .t-ligne-txt { padding-block: 0; flex: 1 1 640px; }
.t-ligne-lien { flex: none; }

/* ------------------------------------------------------------- Votre pays, vos maillots */
.t-maillots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--t-col); align-items: center; padding-block: var(--t-section); }
.t-maillots-txt p { color: #d6d3c8; font-size: 18px; line-height: 1.7; margin-top: 22px; max-width: 52ch; }
.t-maillots-txt .t-note { font-size: 13px; color: var(--muted-2); }
.t-maillots-terrain { display: grid; gap: 14px; justify-items: center; transition: opacity .2s; transform: perspective(1200px) rotateX(8deg) rotateZ(-2deg); }
.t-maillots-terrain.change { opacity: 0; }
.t-maillots-terrain .terrain { max-width: 440px; box-shadow: 0 50px 80px -40px rgba(0, 0, 0, .9); }
.t-terrain-pays { display: flex; gap: 10px; align-items: center; padding: 8px 14px; border-radius: 999px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); font-size: 14px; }

/* ------------------------------------------------------------- Autour des terrains */
.t-ambiance { position: relative; overflow: hidden; background:
  radial-gradient(ellipse 60% 80% at 85% 0%, rgba(216, 187, 130, .22), transparent 60%),
  radial-gradient(ellipse 50% 70% at 10% 100%, rgba(31, 122, 69, .4), transparent 65%),
  linear-gradient(180deg, #17221a, #111512); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.t-ambiance-in { padding-block: var(--t-section); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--t-col); align-items: end; }
.t-ambiance p { color: #dcd8cc; font-size: 19px; line-height: 1.7; max-width: 48ch; }
.t-ambiance-txt { display: grid; gap: 16px; }
.t-ambiance-txt .link-gold { display: inline; padding-bottom: 1px; font-size: inherit; }
.t-devise { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: baseline; font-family: var(--serif); font-size: clamp(34px, 5vw, 76px) !important; line-height: 1.05 !important; color: var(--gold-2) !important; max-width: none !important; border-top: 1px solid var(--line-2); padding-top: 34px; }
.t-devise i { font-style: normal; color: var(--gold-ink); }

/* ------------------------------------------------------------- Parcours */
.t-parcours { padding-block: var(--t-section); }
.t-etapes { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: etape; position: relative; }
.t-etapes::before { content: ""; position: absolute; top: 27px; left: 28px; right: 12%; height: 2px; background: linear-gradient(90deg, var(--gold) 0%, var(--line-2) 100%); }
.t-etapes li { position: relative; counter-increment: etape; display: grid; gap: 8px; align-content: start; padding-right: 28px; }
.t-etapes li::before { content: counter(etape); width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 28px; color: var(--ink); background: var(--gold); margin-bottom: 18px; position: relative; box-shadow: 0 0 0 8px var(--bg); }
.t-etapes li + li::before { background: var(--panel-2); color: var(--gold-2); border: 1px solid var(--line-2); }
.t-etapes b { font-size: 20px; font-weight: 800; }
.t-etapes span { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 30ch; }

/* ------------------------------------------------------------- Inscription : carte d'équipe + formulaire */
.t-inscription { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--t-col); align-items: start; padding-block: var(--t-section); scroll-margin-top: 84px; }
.t-inscription .form-card { max-width: none; width: 100%; }
.t-inscription-carte { max-width: 440px; width: 100%; justify-self: start; }
.t-inscription-carte { position: sticky; top: 110px; display: grid; gap: 14px; }
.t-carte { position: relative; border-radius: 22px; overflow: hidden; padding: 26px 24px 22px; background: linear-gradient(165deg, #223026, #141a16 70%); border: 1px solid var(--line-2); box-shadow: 0 40px 70px -40px rgba(0, 0, 0, .9); transition: box-shadow .4s, border-color .4s; }
.t-carte::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, #1f7a45 0 33.3%, #e8bc26 33.3% 66.6%, #c8302b 66.6%); }
.t-carte.remplie { border-color: rgba(216, 187, 130, .6); box-shadow: 0 40px 70px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(216, 187, 130, .25); }
.t-carte-tete { display: flex; gap: 12px; align-items: center; }
.t-carte-flag { width: 44px; height: 33px; border-radius: 5px; }
.t-carte-flag.vide { display: block; border: 2px dashed var(--line-2); background: transparent; box-shadow: none; }
.t-carte-tete b { display: block; font-size: 22px; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; word-break: break-word; }
.t-carte-tete small { color: var(--muted); font-size: 14px; }
.t-carte-maillot { display: grid; place-items: center; padding: 26px 0 10px; }
.t-carte-maillot .maillot { width: 62%; max-width: 210px; filter: drop-shadow(0 26px 24px rgba(0, 0, 0, .55)); }
.t-carte-cap { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 14px 0 0; border-top: 1px solid var(--line); margin-top: 10px; }
.t-carte-cap span { font-size: 13px; color: var(--muted); }
.t-carte-cap b { font-size: 16px; text-align: right; word-break: break-word; }
.t-carte-pied { margin-top: 14px; font-size: 12px; color: var(--muted-2); }
.t-carte-legende { font-size: 14px; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 1080px) {
  .t-mur-in { grid-template-columns: 1fr; min-height: 0; row-gap: 28px; }
  .t-mur-gauche { display: contents; }
  .t-mur-texte { order: 1; }
  .t-afrique { order: 2; max-width: 620px; width: 100%; justify-self: center; }
  .t-choix { order: 3; }
  .t-afrique-carte svg { max-height: none; }
  .t-maillots, .t-ambiance-in { grid-template-columns: 1fr; }
  .t-maillots-terrain { transform: none; }
  .t-inscription { grid-template-columns: 1fr; }
  .t-inscription-carte { position: sticky; top: 76px; z-index: 6; max-width: none; }
  .t-carte { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; }
  .t-carte-maillot { padding: 0; grid-row: 1; grid-column: 2; }
  .t-carte-maillot .maillot { width: 52px; }
  .t-carte-cap, .t-carte-pied, .t-carte-legende { display: none; }
  .t-carte-tete b { font-size: 18px; }
  .t-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .t-etapes::before { display: none; }
}
@media (max-width: 900px) {
  .t-choix { position: sticky; bottom: 0; z-index: 5; padding-bottom: 12px; background: linear-gradient(transparent, var(--bg) 40%); }
  /* La barre collée en bas recouvre le sud de la carte : seule la carte dorée capte le toucher,
     le dégradé au-dessus laisse passer les touchers vers les pays. */
  .t-choix { pointer-events: none; }
  .t-choix-in { pointer-events: auto; }
  /* Un pays touché remonte au-dessus de la barre s'il était caché dessous. */
  .t-afrique .pays { scroll-margin-bottom: 140px; }
}
@media (max-width: 640px) {
  .t-titre { font-size: clamp(46px, 13vw, 64px); }
  .t-choix-in { flex-wrap: wrap; gap: 10px 12px; padding: 10px; }
  .t-choix-maillot { width: 46px; height: 44px; }
  .t-choix-maillot .maillot { width: 40px; }
  .t-choix-txt small { display: none; }
  .t-choix.complet .t-choix-txt small { display: block; }
  .t-choix-btn { width: 100%; min-height: 48px; }
  .t-etapes { grid-template-columns: 1fr; }
  .t-maillots-txt p, .t-ambiance p { font-size: 16px; }
  .t-afrique .pastille { r: 32px; }   /* îles : cible tactile d’au moins 22 px une fois la carte réduite */
}
@media (prefers-reduced-motion: reduce) {
  .t-maillots-terrain, .t-carte { transition: none; }
  .t-afrique svg.entree .t-pays .pays, .t-afrique svg.entree .pastille { animation: none; }
  .t-afrique .pays { transition: none; }
}

.t-insecable { white-space: nowrap; }

/* Sections reprises du site (équipes, FAQ) : même pas vertical que le reste de la page */
.section { padding-block: var(--t-section); }

/* Réf. de préinscription dans le texte (pas de surtitre) */
#ok-zone .ok-lead b#ok-ref { letter-spacing: .06em; }

/* Barre « Votre choix » : maillot et pays sur la première ligne, bouton en pleine largeur dessous.
   Les noms longs (Sao Tomé-et-Principe, Guinée équatoriale…) ne se retrouvent plus un mot par ligne. */
.t-choix-in { flex-wrap: wrap; gap: 12px 14px; }
.t-choix-txt b { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.2; flex-wrap: nowrap; }
.t-choix-txt b .flag { flex: none; }
.t-choix-txt b span { text-wrap: balance; }
.t-choix-btn { flex: 1 1 100%; justify-content: center; text-align: center; }

/* Formulaire de préinscription (tablette et mobile) : la carte d'équipe ne suit plus le défilement */
@media (max-width: 1080px) {
  .t-inscription-carte { position: relative; top: auto; z-index: auto; }
}

/* ------------------------------------------------------------- Fond dégradé, une section sur deux
   Même ambiance que « Autour des terrains », sur toute la largeur de l’écran (body coupe le débordement).
   .t-fond-miroir inverse le sens du dégradé pour varier d’une section à l’autre. */
.t-fond { position: relative; isolation: isolate; }
.t-fond::before { content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background:
  radial-gradient(ellipse 60% 80% at 85% 0%, rgba(216, 187, 130, .22), transparent 60%),
  radial-gradient(ellipse 50% 70% at 10% 100%, rgba(31, 122, 69, .4), transparent 65%),
  linear-gradient(180deg, #17221a, #111512); }
.t-fond-miroir::before { background:
  radial-gradient(ellipse 60% 80% at 15% 0%, rgba(216, 187, 130, .2), transparent 60%),
  radial-gradient(ellipse 50% 70% at 90% 100%, rgba(31, 122, 69, .4), transparent 65%),
  linear-gradient(180deg, #17221a, #111512); }
.section.t-fond + .section, .section + .section.t-fond { border-top: 0; }
