/* ============================================================
   SummerContest — TNCO
   Charte : crème / bleu encre, typographie fine espacée,
   icônes en traits, motifs de vagues. (cf. brochure 2026)
   ============================================================ */

:root {
  --creme: #F2F0EA;
  --creme-2: #EAE7DD;
  --blanc: #FBFAF6;
  --encre: #2F3A56;
  --encre-2: #4A5571;
  --encre-3: #5F6A89; /* assez foncé pour rester lisible sur crème (contraste AA) */
  --ligne: rgba(47, 58, 86, .16);
  --sable: #C9A97C;
  --sable-fonce: #8A6F42; /* version texte du sable, lisible sur fond clair */
  --or: #D9B25F;
  --argent: #AEB6C4;
  --bronze: #C08552;
  --coeur: #E25C5C;
  --nuit: #1C2438;
  --ombre: 0 18px 50px rgba(47, 58, 86, .10);
  --ombre-forte: 0 24px 70px rgba(28, 36, 56, .22);
  --rayon: 20px;
  --police: "Jost", "Futura", "Avenir Next", "Century Gothic", sans-serif;
  --entete-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; } /* l'attribut hidden gagne toujours, même sur les blocs flex/grid */
html { scroll-behavior: smooth; }
body {
  font-family: var(--police);
  font-weight: 300;
  background: var(--creme);
  color: var(--encre);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: var(--encre); }
::selection { background: var(--encre); color: var(--creme); }

.ic { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Typo commune ---------- */
.surtitre {
  font-size: .8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .42em;
  color: var(--encre-2);
  margin-bottom: 1rem;
}
.surtitre-clair { color: rgba(251, 250, 246, .85); }

.titre-tranche {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: .3em;
  text-indent: .3em; /* compense la dernière lettre espacée */
  line-height: 1.15;
}

.vague {
  width: 64px; height: 15px;
  color: var(--encre-3);
  margin: 1.2rem 0 1.8rem;
}
.vague-claire { color: rgba(251, 250, 246, .8); }

.conteneur { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.conteneur-etroit { max-width: 640px; margin: 0 auto; padding: 0 24px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.7em;
  border-radius: 999px;
  font-weight: 400;
  font-size: .92rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1.5px solid var(--encre);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(47,58,86,.18); }
.btn:active { transform: translateY(0); }
.btn-plein { background: var(--encre); color: var(--creme); }
.btn-plein:hover { background: var(--encre-2); }
.btn-contour { background: transparent; color: var(--encre); }
.btn-clair { background: var(--creme); border-color: var(--creme); color: var(--encre); }
.btn-contour-clair { background: transparent; border-color: rgba(251,250,246,.85); color: var(--blanc); }
.btn-contour-clair:hover { background: rgba(251,250,246,.12); }
.btn-large { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.btn-rond {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--ligne);
  background: var(--blanc);
  color: var(--encre);
  transition: transform .2s ease, border-color .2s ease;
  position: relative;
  overflow: hidden;
  flex: none;
}
.btn-rond:hover { transform: translateY(-2px); border-color: var(--encre); }
.btn-rond-clair { background: rgba(28,36,56,.5); border-color: rgba(251,250,246,.3); color: var(--blanc); }

/* ============================================================
   EN-TÊTE
   ============================================================ */
#entete {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--entete-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 clamp(16px, 3vw, 40px);
  transition: background .35s ease, box-shadow .35s ease, color .35s ease;
  color: var(--blanc);
}
#entete.plein {
  background: rgba(242, 240, 234, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--ligne);
  color: var(--encre);
}
body.page-interne #entete { background: rgba(242,240,234,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--ligne); color: var(--encre); }

.marque { display: inline-flex; align-items: center; gap: 12px; }
.marque-logo { width: 46px; height: 46px; color: currentColor; }
.marque-texte { display: flex; flex-direction: column; line-height: 1.15; }
.marque-texte strong { font-weight: 500; letter-spacing: .3em; font-size: .95rem; }
.marque-texte small { font-weight: 300; letter-spacing: .34em; font-size: .62rem; text-transform: uppercase; opacity: .8; }

#nav-principal { display: flex; gap: clamp(14px, 2vw, 30px); margin-left: auto; }
#nav-principal a {
  font-size: .82rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: .2em;
  padding: .4em 0;
  position: relative;
  opacity: .92;
  white-space: nowrap;
}
#nav-principal a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1.5px; background: currentColor;
  transition: right .3s ease;
}
#nav-principal a:hover::after { right: 0; }

.entete-actions { display: flex; align-items: center; gap: 12px; }
.btn-edition { font-size: .8rem; padding: .7em 1.4em; }
#entete:not(.plein):not(.interne) .btn-edition { border-color: var(--creme); background: var(--creme); color: var(--encre); }
#entete.plein .btn-edition { background: var(--encre); color: var(--creme); border-color: var(--encre); }
#entete .btn-rond { background: transparent; color: currentColor; border-color: currentColor; opacity: .9; }
#avatar-entete { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

#btn-burger { display: none; flex-direction: column; gap: 5px; }
.burger-trait { width: 18px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
#btn-burger[aria-expanded="true"] .burger-trait:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
#btn-burger[aria-expanded="true"] .burger-trait:nth-child(2) { opacity: 0; }
#btn-burger[aria-expanded="true"] .burger-trait:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

#menu-mobile {
  position: fixed; inset: var(--entete-h) 0 auto 0; z-index: 55;
  background: rgba(242, 240, 234, .98);
  backdrop-filter: blur(14px);
  box-shadow: var(--ombre-forte);
  border-bottom: 1px solid var(--ligne);
}
#menu-mobile nav { display: flex; flex-direction: column; padding: 18px 26px 26px; }
#menu-mobile a {
  padding: 14px 0;
  font-size: 1rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 300;
  border-bottom: 1px solid var(--ligne);
  color: var(--encre);
}
#menu-mobile a:last-child { border-bottom: none; }
#menu-mobile .lien-fort { font-weight: 500; }

/* ============================================================
   BANNIÈRE VIDÉO
   ============================================================ */
#banniere {
  position: relative;
  height: 100vh; /* repli pour les navigateurs sans svh */
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  background: var(--nuit);
}
#pause-hero {
  position: absolute; right: 18px; bottom: 22px; z-index: 2;
}
#video-hero {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.banniere-voile {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(28,36,56,.42) 0%, rgba(28,36,56,.12) 35%, rgba(28,36,56,.18) 62%, rgba(242,240,234,.96) 100%);
}
.banniere-contenu {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  color: var(--blanc);
  padding: 0 20px;
}
.titre-hero {
  display: flex; flex-direction: column;
  font-size: clamp(3rem, 11vw, 8.2rem);
  font-weight: 200;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: .22em;
  text-indent: .22em;
  text-shadow: 0 4px 30px rgba(28,36,56,.35);
}
.titre-hero span { display: block; animation: hero-lettres 1.1s ease both; }
.titre-hero span:nth-child(2) { animation-delay: .18s; }
@keyframes hero-lettres {
  from { opacity: 0; transform: translateY(26px); letter-spacing: .34em; }
  to { opacity: 1; transform: none; letter-spacing: .22em; }
}
.banniere-contenu .surtitre { animation: fondu 1s ease both; }
.banniere-contenu .vague { margin: 1.6rem auto; animation: fondu 1.2s .35s ease both; }
.hero-accroche {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  letter-spacing: .06em;
  max-width: 640px;
  text-shadow: 0 2px 16px rgba(28,36,56,.45);
  animation: fondu 1.2s .45s ease both;
}
.hero-boutons { display: flex; gap: 14px; margin-top: 2.2rem; flex-wrap: wrap; justify-content: center; animation: fondu 1.2s .6s ease both; }
@keyframes fondu { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.indice-defiler {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1.5px solid rgba(47,58,86,.55);
  border-radius: 14px;
  display: flex; justify-content: center;
}
.indice-defiler span {
  width: 3px; height: 8px; border-radius: 2px;
  background: var(--encre);
  margin-top: 7px;
  animation: molette 1.8s ease-in-out infinite;
}
@keyframes molette { 0%,100% { transform: translateY(0); opacity: 1; } 55% { transform: translateY(14px); opacity: 0; } }

/* ============================================================
   TRANCHES DE CONTENU
   ============================================================ */
.tranche { padding: clamp(70px, 9vw, 120px) 0; }
.tranche-contraste { background: var(--creme-2); }

.concept-intro { max-width: 780px; }
.concept-intro p + p { margin-top: 1em; }
.concept-intro strong { font-weight: 500; }

.etapes {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 3rem;
  counter-reset: etape;
}
.carte {
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}
.etape {
  position: relative;
  padding: 30px 24px 26px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.etape:hover { transform: translateY(-6px); box-shadow: var(--ombre-forte); }
.etape-numero {
  position: absolute; top: 18px; right: 20px;
  font-size: 2rem; font-weight: 200; color: var(--encre-3);
  letter-spacing: .08em;
}
.rond-icone {
  width: 54px; height: 54px;
  border: 1.5px solid var(--encre);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
}
.rond-icone .ic { width: 26px; height: 26px; }
.rond-icone.grand { width: 64px; height: 64px; }
.rond-icone.grand .ic { width: 30px; height: 30px; }
.etape h3, .categorie h3 {
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.etape p, .categorie p { font-size: .95rem; color: var(--encre-2); }

.badge-annuel {
  display: inline-flex; align-items: center; gap: .6em;
  margin-top: 2.6rem;
  padding: .75em 1.5em;
  border: 1.5px solid var(--encre);
  border-radius: 999px;
  font-size: .88rem;
  letter-spacing: .08em;
  background: var(--blanc);
}

/* Catégories */
.grille-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 3rem;
}
.categorie {
  padding: 34px 26px 30px;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
}
.categorie:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--ombre-forte); }
.categorie-sous {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .3em;
  color: var(--sable-fonce);
  font-weight: 500;
  margin-bottom: .9rem;
}

/* Le spot */
.spot-grille {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 34px;
  margin-top: 2.4rem;
  align-items: stretch;
}
.spot-infos h3 {
  display: flex; align-items: center; gap: .5em;
  font-weight: 500; font-size: 1.15rem; letter-spacing: .06em;
  margin-bottom: 1rem;
}
.spot-adresse {
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: .04em;
  border-left: 2px solid var(--sable);
  padding-left: 14px;
  margin-bottom: 1.2rem;
}
.spot-infos p strong { font-weight: 500; }
.spot-boutons { display: flex; gap: 12px; margin-top: 1.8rem; flex-wrap: wrap; }
.spot-carte {
  border-radius: var(--rayon);
  overflow: hidden;
  border: 1px solid var(--ligne);
  box-shadow: var(--ombre);
  min-height: 340px;
  background: var(--creme-2);
}
.spot-carte iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }

/* Teasers galeries */
.grille-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 2.6rem;
}
.teaser {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  display: flex; align-items: flex-end;
  transition: transform .3s ease, box-shadow .3s ease;
}
.teaser:hover { transform: translateY(-6px); box-shadow: var(--ombre-forte); }
.teaser-visuel {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .6s ease;
}
.teaser:hover .teaser-visuel { transform: scale(1.05); }
.teaser::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28,36,56,0) 30%, rgba(28,36,56,.82) 100%);
}
.teaser-legende {
  position: relative; z-index: 1;
  color: var(--blanc);
  padding: 26px;
  display: grid; gap: 4px;
}
.teaser-legende .ic { width: 26px; height: 26px; margin-bottom: .4rem; }
.teaser-legende strong { font-weight: 500; letter-spacing: .2em; text-transform: uppercase; font-size: 1.05rem; }
.teaser-legende span:last-child { font-size: .9rem; opacity: .85; }

/* ============================================================
   ÉDITION 2026 — PODIUMS
   ============================================================ */
#vue-edition { padding-bottom: clamp(70px, 9vw, 110px); }
.edition-entete {
  background:
    radial-gradient(1200px 500px at 50% -80px, rgba(74,85,113,.55), transparent 70%),
    var(--nuit);
  color: var(--blanc);
  padding: calc(var(--entete-h) + clamp(48px, 8vw, 90px)) 0 clamp(120px, 14vw, 170px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.edition-entete::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 90px;
  background: var(--creme);
  clip-path: ellipse(75% 100% at 50% 100%);
}
.titre-edition {
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: .28em;
  text-indent: .28em;
}
.edition-entete .vague { margin-left: auto; margin-right: auto; }
.edition-date {
  display: flex; flex-direction: column; align-items: center;
  margin: 1.4rem 0 1rem;
  text-transform: uppercase;
}
.edition-jour, .edition-mois { font-size: 1rem; letter-spacing: .5em; text-indent: .5em; font-weight: 300; opacity: .9; }
.edition-numero {
  font-size: clamp(5rem, 12vw, 8.5rem);
  font-weight: 100;
  line-height: 1;
  margin: .05em 0;
  font-variant-numeric: lining-nums;
}
.edition-accroche { max-width: 560px; margin: 0 auto; opacity: .85; font-size: 1.02rem; }

.grille-podiums {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: clamp(-60px, -6vw, -30px);
  position: relative; z-index: 1;
}
.podium-carte {
  padding: 26px 26px 0;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
/* Dans une rangée, les scènes s'étirent pour garder les vagues au ras du bas
   même quand la carte voisine est plus haute (figurine). */
.podium-carte .scene-podium { flex: 1; }
.podium-carte:hover { transform: translateY(-6px); box-shadow: var(--ombre-forte); }
.podium-entete {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 4px;
}
.podium-entete .rond-icone { margin-bottom: 0; width: 46px; height: 46px; }
.podium-entete .rond-icone .ic { width: 22px; height: 22px; }
.podium-entete h3 { font-weight: 500; letter-spacing: .16em; text-transform: uppercase; font-size: 1.05rem; }
.podium-entete small { display: block; font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--encre-3); }

/* --- La scène : un coin de plan d'eau ------------------------------------ */
.scene-podium {
  position: relative;
  margin: 10px -26px 0;
  padding: 64px 22px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 14px;
  min-height: 280px;
  overflow: hidden;
  background: linear-gradient(180deg, #FCFBF7 0%, #F4F1E8 55%, #ECE8DC 100%);
}
.soleil {
  position: absolute; top: 18px; right: 22px;
  width: 58px; height: 58px;
  border: 1.5px solid rgba(201, 169, 124, .6);
  border-radius: 50%;
  animation: soleil-pulse 6s ease-in-out infinite;
}
.soleil::after {
  content: ""; position: absolute; inset: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(217,178,95,.35), rgba(217,178,95,.08) 70%);
}
@keyframes soleil-pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.07); opacity: 1; } }

/* Le câble et son rider qui traverse la scène */
.cable {
  position: absolute; top: 17%; left: -6%; right: -6%;
  height: 1.5px;
  background: rgba(47, 58, 86, .3);
  transform: rotate(-3.5deg);
  pointer-events: none;
}
.cable .rider {
  position: absolute; top: 0; left: -12%;
  width: 30px; height: 36px;
  color: var(--encre);
  animation: tyrolienne 13s linear infinite;
}
.cable .rider svg { width: 100%; height: 100%; }
@keyframes tyrolienne {
  0% { left: -12%; transform: translateY(0) rotate(0deg); }
  22% { transform: translateY(-6px) rotate(-8deg); }
  45% { transform: translateY(1px) rotate(3deg); }
  70% { transform: translateY(-5px) rotate(-6deg); }
  100% { left: 110%; transform: translateY(0) rotate(0deg); }
}

/* Chaque place : étiquette + ponton flottant */
.place {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  opacity: 0;
  transform: translateY(46px);
}
.podium-carte.anime .place { animation: place-monte .8s cubic-bezier(.2, .8, .25, 1) forwards; }
.podium-carte.anime .place[data-rang="2"] { animation-delay: .1s; }
.podium-carte.anime .place[data-rang="1"] { animation-delay: .3s; }
.podium-carte.anime .place[data-rang="3"] { animation-delay: .5s; }
@keyframes place-monte { to { opacity: 1; transform: none; } }

.flotteur {
  display: flex; flex-direction: column; align-items: center;
  width: 100%;
  animation: flotte 4.2s ease-in-out infinite;
}
.place[data-rang="2"] .flotteur { animation-duration: 4.8s; animation-delay: .6s; }
.place[data-rang="3"] .flotteur { animation-duration: 3.8s; animation-delay: 1.1s; }
@keyframes flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.place-etiquette {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  margin-bottom: 12px;
  text-align: center;
}
.place-nom {
  font-weight: 500;
  letter-spacing: .07em;
  font-size: 1.05rem;
  line-height: 1.15;
  word-break: break-word;
  max-width: 130px;
}
.place[data-rang="1"] .place-nom { font-size: 1.3rem; font-weight: 600; }
.place[data-rang="1"] .place-nom::after {
  content: ""; display: block;
  width: 40px; height: 8px; margin: 3px auto 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 10"><path d="M1 5 Q 6.5 0.5, 12 5 T 23 5 T 34 5 T 45 5" fill="none" stroke="%23D9B25F" stroke-width="2" stroke-linecap="round"/></svg>') no-repeat center / contain;
}
.place.vide .place-nom { color: var(--encre-3); font-weight: 300; }

/* Médailles métalliques avec reflet balayé */
.medaille {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 1.05rem;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .75);
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.medaille::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.75) 46%, transparent 60%);
  background-size: 260% 100%;
  animation: medaille-eclat 3.4s ease-in-out infinite;
}
@keyframes medaille-eclat { 0%, 55% { background-position: 130% 0; } 85%, 100% { background-position: -50% 0; } }
.place[data-rang="1"] .medaille {
  width: 48px; height: 48px; font-size: 1.25rem;
  background: radial-gradient(circle at 32% 28%, #F8E1A0, #DCAE4C 58%, #B4842A);
  box-shadow: 0 8px 22px rgba(217, 178, 95, .55);
}
.place[data-rang="2"] .medaille {
  background: radial-gradient(circle at 32% 28%, #F0F3F8, #B9C0CC 58%, #939CAC);
  box-shadow: 0 6px 16px rgba(151, 160, 176, .45);
}
.place[data-rang="3"] .medaille {
  background: radial-gradient(circle at 32% 28%, #E8BC96, #C08552 58%, #96603A);
  box-shadow: 0 6px 16px rgba(192, 133, 82, .45);
}
.couronne {
  position: absolute; top: -15px; left: 50%;
  width: 22px; height: 13px;
  margin-left: -11px;
  color: var(--or);
  filter: drop-shadow(0 2px 3px rgba(180, 132, 42, .5));
  animation: couronne-danse 3.4s ease-in-out infinite;
}
@keyframes couronne-danse { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(6deg) translateY(-1.5px); } }
.porte-medaille { position: relative; }
.etincelle {
  position: absolute;
  color: var(--or);
  font-size: .8rem;
  animation: etincelle-pulse 2.2s ease-in-out infinite;
}
.etincelle:nth-child(1) { top: -6px; right: -14px; animation-delay: .3s; }
.etincelle:nth-child(2) { bottom: 0; left: -15px; font-size: .6rem; animation-delay: 1.2s; }
@keyframes etincelle-pulse { 0%, 100% { transform: scale(.4); opacity: 0; } 50% { transform: scale(1.15) rotate(20deg); opacity: 1; } }

/* Piles de palettes en bois (une palette = 38px : 2 planches + traverses),
   effet roots wake park — l'or en a 4, l'argent 3, le bronze 2. */
.ponton {
  position: relative;
  width: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="38" viewBox="0 0 64 38"><rect x="0" y="1" width="64" height="11" rx="1.5" fill="%23B5804C"/><rect x="0" y="9.5" width="64" height="2.5" fill="%23906038"/><line x1="4" y1="5" x2="26" y2="5" stroke="%23C8935C" stroke-width="1" opacity=".7"/><line x1="36" y1="7" x2="58" y2="7" stroke="%238F5F33" stroke-width="1" opacity=".6"/><rect x="5" y="14" width="20" height="11" rx="1" fill="%237C4F28"/><rect x="39" y="14" width="20" height="11" rx="1" fill="%23764B26"/><rect x="0" y="27" width="64" height="11" rx="1.5" fill="%23A9743F"/><rect x="0" y="35.5" width="64" height="2.5" fill="%23855832"/><line x1="8" y1="31" x2="30" y2="31" stroke="%23BE8850" stroke-width="1" opacity=".6"/></svg>');
  background-size: 64px 38px;
  background-repeat: repeat;
  background-position: center bottom;
  filter: drop-shadow(0 12px 18px rgba(28, 36, 56, .3));
  display: flex; align-items: center; justify-content: center;
}
.ponton::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  border-radius: 2px;
  opacity: .9;
}
.place[data-rang="1"] .ponton { height: 152px; }
.place[data-rang="1"] .ponton::after { background: linear-gradient(90deg, #B4842A, #F8E1A0, #B4842A); }
.place[data-rang="2"] .ponton { height: 114px; }
.place[data-rang="2"] .ponton::after { background: linear-gradient(90deg, #939CAC, #F0F3F8, #939CAC); }
.place[data-rang="3"] .ponton { height: 76px; }
.place[data-rang="3"] .ponton::after { background: linear-gradient(90deg, #96603A, #E8BC96, #96603A); }
.ponton-num {
  font-weight: 400;
  font-size: 2.8rem;
  color: rgba(46, 26, 11, .34); /* effet gravé au fer dans le bois */
  line-height: 1;
  transform: translateY(-6px);
}

/* Rider détouré debout sur son ponton */
.figurine {
  height: 175px;
  width: auto;
  position: relative;
  z-index: 2;
  margin-bottom: -4px; /* les pieds touchent le ponton */
  filter: drop-shadow(0 12px 16px rgba(28, 36, 56, .35));
}
/* Les dauphins sont un peu plus petits que le vainqueur */
.place[data-rang="2"] .figurine, .place[data-rang="3"] .figurine { height: 150px; }
.ponton.avec-figurine { overflow: visible; }
.medaille-ponton {
  position: absolute;
  top: -22px;
  left: 8px;
  z-index: 3;
}
.medaille-ponton .medaille { width: 38px; height: 38px; font-size: 1rem; }
.plaque {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  background: linear-gradient(180deg, #F8E1A0, #D9AC4B);
  color: var(--encre);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: .3em 1em;
  border-radius: 6px;
  border: 1px solid rgba(180, 132, 42, .6);
  box-shadow: 0 3px 10px rgba(28, 36, 56, .35);
  white-space: nowrap;
}

/* Place vide : une bouée qui attend son rider */
.place.vide .flotteur { animation-duration: 3.4s; }
.bouee {
  width: 54px; height: 54px;
  color: var(--encre-2);
  margin-bottom: 24px;
  animation: bouee-roule 5s ease-in-out infinite;
}
@keyframes bouee-roule { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(9deg); } }
.place-libre {
  font-size: .64rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--encre-3);
  margin-bottom: 10px;
}

/* L'eau : deux nappes de vagues qui défilent */
.vagues { position: absolute; left: 0; right: 0; bottom: 0; height: 54px; pointer-events: none; z-index: 2; }
.vague-nappe {
  position: absolute; left: 0; right: 0; bottom: 0; height: 100%;
  background-repeat: repeat-x;
  background-position: 0 bottom;
  background-size: 130px 50px;
}
.vague-nappe.fond {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="130" height="50" viewBox="0 0 130 50"><path d="M0 26 Q 16 12 32.5 26 T 65 26 T 97.5 26 T 130 26 V50 H0 Z" fill="rgba(93,120,160,0.38)"/></svg>');
  animation: vague-defile 9s linear infinite;
}
.vague-nappe.avant {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="130" height="50" viewBox="0 0 130 50"><path d="M0 34 Q 16 21 32.5 34 T 65 34 T 97.5 34 T 130 34 V50 H0 Z" fill="rgba(63,84,124,0.45)"/></svg>');
  animation: vague-defile 6s linear infinite reverse;
}
@keyframes vague-defile { from { background-position-x: 0; } to { background-position-x: -130px; } }

/* Les riders des quatre cartes ne traversent pas en même temps */
.podium-carte:nth-child(2) .rider { animation-delay: -3.5s; }
.podium-carte:nth-child(3) .rider { animation-delay: -7s; }
.podium-carte:nth-child(4) .rider { animation-delay: -10s; }

/* Confettis du vainqueur (déclenchés à l'apparition) */
.confettis { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.confettis span {
  position: absolute;
  top: -12px;
  left: var(--x);
  width: 7px; height: 11px;
  border-radius: 2px;
  background: var(--c);
  opacity: 0;
}
.podium-carte.anime .confettis span {
  animation: confetti-chute 1.9s cubic-bezier(.3, .6, .6, 1) forwards;
  animation-delay: var(--d);
}
@keyframes confetti-chute {
  0% { opacity: 0; transform: translateY(0) rotate(0) ; }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translateY(230px) rotate(560deg); }
}
.edition-suite { text-align: center; margin-top: clamp(50px, 7vw, 80px); }
.edition-suite p { letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; color: var(--encre-2); margin-bottom: 1.2rem; }
.edition-suite .hero-boutons { margin-top: 0; animation: none; }

/* ============================================================
   GALERIES (photos / vidéos)
   ============================================================ */
#vue-photos, #vue-videos { padding: calc(var(--entete-h) + clamp(40px, 6vw, 70px)) 0 clamp(70px, 9vw, 110px); }
.galerie-entete { text-align: center; margin-bottom: clamp(30px, 5vw, 50px); position: relative; }

/* Signature du pilote de drone, en marge de la galerie vidéos */
.credit-videos {
  position: absolute;
  right: 10px;
  bottom: -16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}
.credit-videos img {
  height: 150px;
  width: auto;
  filter: drop-shadow(0 8px 12px rgba(28, 36, 56, .28));
}
.credit-drone {
  width: 44px; height: 20px;
  color: var(--encre-2);
  align-self: flex-start;
  margin: 0 0 2px -26px;
  animation: drone-vol 4.5s ease-in-out infinite;
}
@keyframes drone-vol {
  0%, 100% { transform: translate(0, 0) rotate(-3deg); }
  50% { transform: translate(10px, -7px) rotate(4deg); }
}
.credit-legende {
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .28em;
  text-indent: .28em;
  text-transform: uppercase;
  color: var(--encre-3);
  white-space: nowrap;
}
.credit-legende span { color: var(--sable-fonce); }
@media (max-width: 1080px) {
  .credit-videos { position: static; margin: 22px auto 0; }
  .credit-videos img { height: 118px; }
  .credit-drone { align-self: center; margin: 0 0 2px 92px; }
}
.galerie-entete .vague { margin-left: auto; margin-right: auto; }
.galerie-note { max-width: 640px; margin: 0 auto; color: var(--encre-2); font-size: .98rem; }

.grille-galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.carte-media {
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.carte-media:hover { transform: translateY(-5px); box-shadow: var(--ombre-forte); }
.carte-media-visuel {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
  background: var(--creme-2);
  border: none; padding: 0; width: 100%;
}
.carte-media-visuel img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.carte-media:hover .carte-media-visuel img { transform: scale(1.06); }
.badge-lecture {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--blanc);
  background: linear-gradient(180deg, rgba(28,36,56,.08), rgba(28,36,56,.34));
}
.badge-lecture .ic { width: 54px; height: 54px; filter: drop-shadow(0 4px 14px rgba(28,36,56,.5)); transition: transform .3s ease; }
.carte-media:hover .badge-lecture .ic { transform: scale(1.12); }
.badge-duree {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(28,36,56,.72);
  color: var(--blanc);
  font-size: .74rem; letter-spacing: .08em;
  padding: .25em .7em;
  border-radius: 999px;
}
.badge-populaire {
  position: absolute; left: 10px; top: 10px;
  background: var(--or);
  color: #fff;
  font-size: .68rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  padding: .35em .8em;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(217,178,95,.55);
}
.sans-poster {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--encre), var(--encre-2));
  color: rgba(251,250,246,.6);
}
.sans-poster .ic { width: 44px; height: 44px; }

.carte-media-pied {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 12px;
}
.action-media {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .45em .7em;
  border-radius: 999px;
  font-size: .88rem;
  color: var(--encre-2);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.action-media:hover { background: var(--creme-2); color: var(--encre); transform: translateY(-1px); }
.action-media .compteur { font-weight: 400; font-size: .85rem; }
.action-media.aime { color: var(--coeur); }
.action-media.aime .ic use, .action-media.aime .ic { color: var(--coeur); }
.action-media.aime svg path { fill: currentColor; }
@keyframes battement { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
.action-media.bat .ic { animation: battement .45s ease; }
.action-cestmoi { margin-left: auto; font-size: .8rem; letter-spacing: .06em; border: 1px solid var(--ligne); }
.action-cestmoi:hover { border-color: var(--encre); background: var(--blanc); }
.action-cestmoi.attente { color: var(--sable-fonce); border-color: var(--sable); pointer-events: none; }
.action-cestmoi.confirme { color: var(--blanc); background: var(--encre); border-color: var(--encre); pointer-events: none; }

.chips-tags { display: flex; align-items: center; gap: 6px; padding: 0 12px 4px; flex-wrap: wrap; }
.chip-tag {
  display: inline-flex; align-items: center; gap: .45em;
  font-size: .78rem;
  background: var(--creme-2);
  border-radius: 999px;
  padding: .2em .8em .2em .25em;
  color: var(--encre-2);
}
.chip-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--encre); color: var(--creme);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .66rem; font-weight: 500;
  overflow: hidden; flex: none;
}
.chip-avatar img { width: 100%; height: 100%; object-fit: cover; }

.galerie-vide {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  color: var(--encre-3);
  letter-spacing: .1em;
}

/* ============================================================
   LIGHTBOX — DIAPO
   ============================================================ */
#lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
#lightbox[hidden] { display: none; }
.lightbox-fond {
  position: absolute; inset: 0;
  background: rgba(20, 26, 42, .94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lightbox-scene {
  position: relative; z-index: 1;
  width: min(1060px, calc(100vw - 130px));
  max-height: calc(100vh - 60px);
  max-height: calc(100svh - 60px);
  display: flex; flex-direction: column;
  animation: fondu .35s ease both;
}
.lightbox-media {
  border-radius: var(--rayon) var(--rayon) 0 0;
  overflow: hidden;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
}
.lightbox-media img, .lightbox-media video {
  max-height: calc(100vh - 190px);
  max-height: calc(100svh - 190px);
  width: 100%;
  object-fit: contain;
}
.lightbox-media iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 190px);
  max-height: calc(100svh - 190px);
  border: 0;
  display: block;
  background: #000;
}
.lightbox-barre {
  background: var(--blanc);
  border-radius: 0 0 var(--rayon) var(--rayon);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.lightbox-tags { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.lightbox-tags:empty { display: none; }
.lightbox-actions { display: flex; align-items: center; gap: 4px; flex: 1; }
.lightbox-position { font-size: .8rem; letter-spacing: .16em; color: var(--encre-3); }
.lightbox-fermer { position: absolute; top: 22px; right: 22px; z-index: 2; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(251,250,246,.35);
  color: var(--blanc);
  background: rgba(28,36,56,.5);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.lightbox-nav:hover { background: rgba(28,36,56,.85); transform: translateY(-50%) scale(1.06); }
.lightbox-prec { left: 22px; }
.lightbox-suiv { right: 22px; }

/* Panneau commentaires */
.panneau-commentaires {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 3;
  width: min(400px, 92vw);
  background: var(--blanc);
  box-shadow: -18px 0 50px rgba(20,26,42,.35);
  display: flex; flex-direction: column;
  animation: glisse-droite .3s ease both;
}
@keyframes glisse-droite { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.panneau-commentaires header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--ligne);
}
.panneau-commentaires h3 { display: flex; align-items: center; gap: .5em; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; font-size: .95rem; }
.liste-commentaires { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.commentaire { display: flex; gap: 10px; }
.commentaire .chip-avatar { width: 34px; height: 34px; font-size: .8rem; }
.commentaire-corps { background: var(--creme); border-radius: 4px 16px 16px 16px; padding: 8px 14px; flex: 1; }
.commentaire-corps strong { font-weight: 500; font-size: .88rem; }
.commentaire-corps p { font-size: .92rem; color: var(--encre-2); word-wrap: break-word; }
.commentaire-corps time { font-size: .7rem; color: var(--encre-3); letter-spacing: .06em; }
.commentaires-vide { text-align: center; color: var(--encre-3); padding: 30px 10px; font-size: .9rem; }
#form-commentaire { padding: 14px 20px 20px; border-top: 1px solid var(--ligne); display: grid; gap: 10px; }
#form-commentaire input {
  width: 100%;
  border: 1.5px solid var(--ligne);
  border-radius: 12px;
  padding: .6em .9em;
  background: var(--creme);
  font-size: .92rem;
}
#form-commentaire input:focus { outline: none; border-color: var(--encre); background: var(--blanc); }
.deux-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.champ-envoi { display: flex; gap: 8px; }
.champ-envoi input { flex: 1; }
.champ-envoi .btn { padding: .55em 1.2em; font-size: .8rem; }

/* ============================================================
   MODALES
   ============================================================ */
.modale { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modale[hidden] { display: none; }
.modale-fond { position: absolute; inset: 0; background: rgba(20,26,42,.65); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.modale-carte {
  position: relative; z-index: 1;
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre-forte);
  padding: 34px 30px 30px;
  animation: fondu .3s ease both;
}
.modale-fermer { position: absolute; top: 14px; right: 14px; }
.modale-titre { font-weight: 300; letter-spacing: .2em; text-transform: uppercase; font-size: 1.3rem; text-align: center; }
.modale-sous { text-align: center; color: var(--encre-2); font-size: .92rem; margin: .8rem 0 1.4rem; }

.onglets {
  display: flex;
  background: var(--creme);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1.4rem;
}
.onglet {
  flex: 1;
  padding: .6em;
  border-radius: 999px;
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--encre-2);
  transition: background .25s ease, color .25s ease;
}
.onglet.actif { background: var(--encre); color: var(--creme); }

.form-auth { display: grid; gap: 14px; }
.form-auth label { display: grid; gap: 5px; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--encre-2); }
.form-auth label small { text-transform: none; letter-spacing: 0; }
.form-auth input {
  border: 1.5px solid var(--ligne);
  border-radius: 12px;
  padding: .7em 1em;
  background: var(--creme);
  font-size: 1rem;
}
.form-auth input:focus { outline: none; border-color: var(--encre); background: var(--blanc); }
.form-note { display: flex; gap: .6em; align-items: flex-start; font-size: .82rem; color: var(--encre-2); background: var(--creme); border-radius: 12px; padding: .8em 1em; }
.form-note .ic { margin-top: .15em; }
.form-erreur { color: #B4433A; font-size: .88rem; text-align: center; }

/* E-mail simulé */
.modale-email { width: min(560px, 100%); padding: 26px; }
.email-bandeau {
  background: #FFF3D6;
  border: 1px solid #E8D5A0;
  color: #7A6023;
  font-size: .8rem;
  border-radius: 10px;
  padding: .6em 1em;
  text-align: center;
  margin-bottom: 16px;
}
.email-carte { border: 1px solid var(--ligne); border-radius: 14px; overflow: hidden; }
.email-ligne {
  padding: .55em 1.1em;
  border-bottom: 1px solid var(--ligne);
  font-size: .88rem;
  display: flex; gap: .8em;
}
.email-ligne > span:first-child { color: var(--encre-3); min-width: 44px; text-transform: uppercase; font-size: .72rem; letter-spacing: .12em; padding-top: .2em; }
.email-corps { padding: 1.4em 1.3em; display: grid; gap: 1em; font-size: .95rem; }
.email-bouton { text-align: center; }
.email-petit { font-size: .78rem; color: var(--encre-3); }

/* ============================================================
   COMPTE / ORGA
   ============================================================ */
#vue-compte, #vue-orga, #vue-verifier { padding: calc(var(--entete-h) + clamp(40px, 6vw, 70px)) 0 clamp(70px, 9vw, 110px); min-height: 70svh; }
.carte-centree { padding: 44px 34px; text-align: center; display: grid; gap: 16px; justify-items: center; }
.carte-centree h2 { font-weight: 300; letter-spacing: .18em; text-transform: uppercase; font-size: 1.4rem; }

.compte-entete {
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}
.avatar-bloc { position: relative; }
.avatar-grand {
  width: 108px; height: 108px;
  border-radius: 50%;
  background: var(--encre); color: var(--creme);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 300;
  overflow: hidden;
  border: 3px solid var(--blanc);
  box-shadow: var(--ombre);
}
.avatar-grand img { width: 100%; height: 100%; object-fit: cover; }
.avatar-modifier {
  position: absolute; right: -2px; bottom: -2px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--encre); color: var(--creme);
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid var(--creme);
  transition: transform .2s ease;
}
.avatar-modifier:hover { transform: scale(1.08); }
.avatar-modifier .ic { width: 17px; height: 17px; }
.compte-identite h1 { font-weight: 400; font-size: 1.7rem; letter-spacing: .04em; }
.compte-identite .pseudo { color: var(--sable-fonce); font-weight: 500; letter-spacing: .06em; }
.compte-identite p { color: var(--encre-2); font-size: .92rem; }

.compte-grille { display: grid; grid-template-columns: 1fr 1.2fr; gap: 26px; align-items: start; }
.bloc-compte { padding: 28px 26px; }
.bloc-compte > h2 {
  font-weight: 500; font-size: .95rem;
  letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: .6em;
}
.bloc-compte .form-auth input { background: var(--creme); }
.pleine-largeur { grid-column: 1 / -1; }

.mini-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.mini-media { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4/3; background: var(--creme-2); border: 1px solid var(--ligne); }
.mini-media img { width: 100%; height: 100%; object-fit: cover; }
.mini-media .sans-poster .ic { width: 30px; height: 30px; }
.mini-statut {
  position: absolute; left: 8px; bottom: 8px;
  font-size: .64rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  padding: .3em .8em; border-radius: 999px;
  background: rgba(28,36,56,.78); color: var(--blanc);
}
.mini-statut.attente { background: rgba(201,169,124,.92); }
.mini-statut.valide { background: rgba(93,138,110,.92); }
.note-vide { color: var(--encre-3); font-size: .9rem; }

.zone-depot {
  border: 2px dashed var(--ligne);
  border-radius: 16px;
  padding: 34px 20px;
  text-align: center;
  color: var(--encre-2);
  transition: border-color .25s ease, background .25s ease;
  cursor: pointer;
  display: grid; gap: 8px; justify-items: center;
}
.zone-depot:hover, .zone-depot.survol { border-color: var(--encre); background: var(--creme); }
.zone-depot .ic { width: 34px; height: 34px; }
.zone-depot strong { font-weight: 500; }
.zone-depot small { font-size: .78rem; color: var(--encre-3); }
.barre-progression { height: 8px; border-radius: 99px; background: var(--creme-2); overflow: hidden; margin-top: 12px; }
.barre-progression > span { display: block; height: 100%; width: 0; background: var(--encre); border-radius: 99px; transition: width .2s ease; }

.ligne-attente {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ligne);
}
.ligne-attente:last-child { border-bottom: none; }
.ligne-attente .apercu {
  width: 86px; height: 62px; border-radius: 10px; overflow: hidden; flex: none;
  background: var(--creme-2); position: relative;
  border: none; padding: 0;
}
.ligne-attente .apercu img, .ligne-attente .apercu video { width: 100%; height: 100%; object-fit: cover; }
.apercu-cliquable { cursor: zoom-in; transition: transform .2s ease, box-shadow .2s ease; }
.apercu-cliquable:hover { transform: scale(1.04); box-shadow: 0 6px 16px rgba(28, 36, 56, .3); }
.apercu-lecture {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--blanc);
  background: rgba(28, 36, 56, .25);
  pointer-events: none;
}
.apercu-lecture .ic { width: 26px; height: 26px; filter: drop-shadow(0 2px 6px rgba(28,36,56,.6)); }

/* Surcouche de prévisualisation de l'espace orga */
.apercu-orga { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; }
.apercu-orga-fond { position: absolute; inset: 0; background: rgba(20, 26, 42, .92); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.apercu-orga-scene { position: relative; z-index: 1; max-width: min(960px, calc(100vw - 40px)); animation: fondu .25s ease both; }
.apercu-orga-scene img, .apercu-orga-scene video {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  max-height: calc(100svh - 80px);
  border-radius: 14px;
  box-shadow: var(--ombre-forte);
}
.apercu-orga-fermer { position: absolute; top: 18px; right: 18px; z-index: 2; }

/* Vignette de secours : une image de la vidéo, sans lecture */
.vignette-video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ligne-attente .infos { flex: 1; font-size: .92rem; }
.ligne-attente .infos strong { font-weight: 500; }
.ligne-attente .infos small { color: var(--encre-3); display: block; }
.ligne-attente .actions { display: flex; gap: 8px; }
.btn-mini { padding: .5em 1.1em; font-size: .74rem; }
.btn-refuser { border-color: #B4433A; color: #B4433A; }
.btn-refuser:hover { background: #B4433A; color: #fff; }

/* --- Espace orga : tableau des inscrits + suppression de médias --- */
.defile-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tableau-inscrits {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  min-width: 560px;
}
.tableau-inscrits th {
  text-align: left;
  font-weight: 500;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--encre-3);
  padding: 8px 14px 8px 0;
  border-bottom: 1.5px solid var(--ligne);
}
.tableau-inscrits td {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--ligne);
  color: var(--encre-2);
  white-space: nowrap;
}
.tableau-inscrits td strong { color: var(--encre); font-weight: 500; }
.tableau-inscrits tr:last-child td { border-bottom: none; }
.puce-attente { color: var(--sable-fonce); font-weight: 700; }

.mini-supprimer {
  position: absolute; top: 6px; right: 6px;
  width: 30px; height: 30px;
  background: rgba(28, 36, 56, .78);
  border-color: transparent;
  color: var(--blanc);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.mini-media:hover .mini-supprimer, .mini-supprimer:focus-visible { opacity: 1; }
.mini-supprimer:hover { background: #B4433A; transform: scale(1.08); }
.mini-supprimer .ic { width: 14px; height: 14px; }
@media (hover: none) { .mini-supprimer { opacity: 1; } }

.deconnexion { margin-top: 30px; text-align: center; }
.lien-discret { color: var(--encre-3); font-size: .8rem; letter-spacing: .1em; }
.lien-discret:hover { color: var(--encre); text-decoration: underline; }

/* ============================================================
   PIED DE PAGE
   ============================================================ */
#pied { background: var(--nuit); color: rgba(251,250,246,.85); padding: clamp(50px, 7vw, 70px) 0 0; }
.pied-grille {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.marque-pied { margin-bottom: 14px; }
.pied-bloc p { font-size: .9rem; opacity: .75; max-width: 320px; }
.pied-nav { display: flex; flex-direction: column; gap: 8px; }
.pied-nav a { font-size: .84rem; letter-spacing: .16em; text-transform: uppercase; opacity: .75; transition: opacity .2s ease; width: fit-content; }
.pied-nav a:hover { opacity: 1; }
.pied-sponsor-titre { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; opacity: .55; margin-bottom: 14px; }
.pied-sponsor a { display: inline-block; background: var(--blanc); border-radius: 12px; padding: 10px 16px; opacity: .85; transition: opacity .25s ease, transform .25s ease; }
.pied-sponsor a:hover { opacity: 1; transform: translateY(-2px); }
.pied-sponsor img { height: 40px; width: auto; }
.pied-bas {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid rgba(251,250,246,.12);
  padding-top: 18px; padding-bottom: 22px;
  font-size: .8rem; opacity: .75;
}
.pied-bas .lien-discret { color: inherit; opacity: .7; }

/* ============================================================
   DIVERS
   ============================================================ */
#toasts {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 130;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
  width: min(480px, calc(100vw - 40px));
}
.toast {
  background: var(--encre); color: var(--creme);
  padding: .8em 1.5em;
  border-radius: 999px;
  font-size: .9rem;
  letter-spacing: .04em;
  box-shadow: var(--ombre-forte);
  animation: toast-in .3s ease both;
  text-align: center;
}
.toast.erreur { background: #B4433A; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

:focus-visible { outline: 2px solid var(--encre); outline-offset: 3px; border-radius: 4px; }
/* Sur les fonds sombres, le liseré de focus doit être clair pour rester visible */
#lightbox :focus-visible,
.banniere-contenu :focus-visible,
#pause-hero:focus-visible,
.edition-entete :focus-visible,
#pied :focus-visible { outline-color: var(--creme); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1150px) {
  #nav-principal { gap: 14px; }
  #nav-principal a { font-size: .74rem; letter-spacing: .14em; }
  .marque-texte strong { font-size: .85rem; }
  .marque-texte small { font-size: .56rem; }
}
@media (max-width: 1024px) {
  .etapes { grid-template-columns: repeat(2, 1fr); }
  .grille-categories { grid-template-columns: repeat(2, 1fr); }
  .compte-grille { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  #nav-principal { display: none; }
  #btn-burger { display: inline-flex; }
  .btn-edition { font-size: .72rem; padding: .65em 1.1em; }
  .spot-grille { grid-template-columns: 1fr; }
  .grille-podiums { grid-template-columns: 1fr; }
  .pied-grille { grid-template-columns: 1fr 1fr; }
  .panneau-commentaires {
    top: auto; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: min(66svh, 560px);
    border-radius: 22px 22px 0 0;
    animation: glisse-haut .3s ease both;
  }
  @keyframes glisse-haut { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .lightbox-scene { width: calc(100vw - 24px); }
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-prec { left: 10px; }
  .lightbox-suiv { right: 10px; }
  .lightbox-fermer { top: 14px; right: 14px; }
  .lightbox-media img, .lightbox-media video, .lightbox-media iframe { max-height: calc(100svh - 230px); }
}
@media (max-width: 640px) {
  :root { --entete-h: 64px; }
  #entete { gap: 10px; padding: 0 12px; }
  #entete .marque-texte { display: none; }
  .entete-actions { gap: 8px; margin-left: auto; }
  .marque-logo { width: 38px; height: 38px; }
  .etapes { grid-template-columns: 1fr; }
  #pause-hero { right: 12px; bottom: 14px; }
  .grille-categories { grid-template-columns: 1fr; }
  .grille-teaser { grid-template-columns: 1fr; }
  .teaser { min-height: 220px; }
  .deux-champs { grid-template-columns: 1fr; }
  .pied-grille { grid-template-columns: 1fr; gap: 28px; }
  .pied-bas { flex-direction: column; gap: 6px; text-align: center; }
  .compte-entete { flex-direction: column; text-align: center; }
  .scene-podium { min-height: 236px; padding: 56px 14px 0; gap: 8px; margin: 10px -20px 0; }
  .podium-carte { padding: 22px 20px 0; }
  .place[data-rang="1"] .ponton { height: 114px; }
  .place[data-rang="2"] .ponton { height: 76px; }
  .place[data-rang="3"] .ponton { height: 76px; }
  .place[data-rang="1"] .place-nom { font-size: 1.15rem; }
  .soleil { width: 44px; height: 44px; }
  .figurine { height: 135px; }
  .place[data-rang="2"] .figurine, .place[data-rang="3"] .figurine { height: 114px; }
  .plaque { font-size: .68rem; padding: .28em .7em; }
  .medaille-ponton { top: -18px; left: 4px; }
  .medaille-ponton .medaille { width: 32px; height: 32px; font-size: .9rem; }
  .hero-boutons .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .place { opacity: 1; transform: none; }
  .confettis { display: none; }
}
