/* Mon Podium — landing, quiz, analyse (index.html). Complète base.css. */

/* ---------- Structure ---------- */

.view[hidden] { display: none !important; }

body.home {
  display: flex;
  flex-direction: column;
}

.home main {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  /* Les faisceaux débordent volontairement : on coupe ici, pas de scroll horizontal. */
  overflow: hidden;
}
@supports (overflow: clip) {
  .home main { overflow: clip; }
}

.view {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 var(--gouttiere);
}

.home [tabindex="-1"]:focus { outline: none; }

/* ---------- Landing ---------- */

.landing {
  /* Hauteur du podium : ce qui reste une fois le texte, le bouton, le décompte et le pied posés. */
  --ph: clamp(108px, calc((100vh - 438px) / 1.5), 232px);
  --title-fs: clamp(30px, min(10.6vw, 6.1vh), 54px);
}
@supports (height: 1svh) {
  .landing {
    --ph: clamp(108px, calc((100svh - 438px) / 1.5), 232px);
    --title-fs: clamp(30px, min(10.6vw, 6.1svh), 54px);
  }
}

.stage {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding-top: env(safe-area-inset-top);
  margin-bottom: calc(var(--ph) * 0.5);
}

/* base.css fixe --podium-h sur .podium lui-même : on le remplace ici. */
.land-podium {
  --podium-h: var(--ph);
  width: 100%;
  max-width: calc(var(--ph) * 2.25);
  margin: auto auto 0;
}

/* Faisceaux : géométrie propre au podium (base.css fournit le flou et la matière).
   Les deux cônes partent de très haut, hors champ, et se croisent juste au-dessus
   de la marche 1, à hauteur du trophée, quelle que soit la taille de l'écran. */
.stage-beams {
  --up: 680px;                                        /* le cadre remonte jusqu'en haut de l'écran */
  --cy: calc(var(--up) - var(--podium-h) * 0.24);     /* point de croisement (repère du cadre) */
  inset: auto;
  top: calc(-1 * var(--up));
  bottom: -26px;
  left: 50%;
  width: 100vw;
  max-width: 760px;
  transform: translateX(-50%);
  z-index: -1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 110px), transparent);
          mask-image: linear-gradient(180deg, #000 calc(100% - 110px), transparent);
}
.stage-beams::before,
.stage-beams::after {
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  width: auto;
  height: auto;
  filter: blur(4px);
  opacity: 1;
}
/* Cône gauche : source à 540 px du croisement, inclinaison 52° (sin .788, cos .616). */
.stage-beams::before {
  background: conic-gradient(from 119deg at calc(50% - 425px) calc(var(--cy) - 333px),
    transparent 0deg,
    rgba(255, 240, 210, 0.035) 3.5deg,
    var(--lumiere) 8deg,
    rgba(255, 244, 224, 0.2) 9deg,
    var(--lumiere) 10deg,
    rgba(255, 240, 210, 0.035) 14.5deg,
    transparent 18deg,
    transparent 360deg);
}
.stage-beams::after {
  background: conic-gradient(from 223deg at calc(50% + 425px) calc(var(--cy) - 333px),
    transparent 0deg,
    rgba(255, 240, 210, 0.035) 3.5deg,
    var(--lumiere) 8deg,
    rgba(255, 244, 224, 0.2) 9deg,
    var(--lumiere) 10deg,
    rgba(255, 240, 210, 0.035) 14.5deg,
    transparent 18deg,
    transparent 360deg);
}

/* Trophée : petit, posé dans la lumière au-dessus de la marche 1. */
.trophy {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(100% + var(--podium-h) * 0.045);
  width: calc(var(--podium-h) * 0.29);
  transform: translateX(-50%);
}
.trophy::before {
  /* halo */
  content: "";
  position: absolute;
  z-index: -1;
  left: -95%; right: -95%;
  top: -55%; bottom: -45%;
  background: radial-gradient(closest-side, rgba(244, 226, 176, 0.26), rgba(244, 226, 176, 0.07) 55%, transparent);
}
.trophy::after {
  /* ombre portée sur la marche */
  content: "";
  position: absolute;
  z-index: -1;
  left: 4%; right: 4%;
  bottom: calc(var(--podium-h) * -0.06);
  height: calc(var(--podium-h) * 0.05);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 25, 5, 0.55), transparent);
}
.trophy img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 calc(var(--podium-h) * 0.06) rgba(244, 226, 176, 0.3));
}

/* Reflet de la lumière sur le haut de la marche 1. */
.land-podium .step-1::after {
  content: "";
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 22%;
  background: radial-gradient(50% 100% at 50% 0%, rgba(255, 252, 235, 0.55), transparent 75%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.land-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.land-title {
  font-size: var(--title-fs);
  line-height: 0.94;
  margin: 0 0 16px;
  text-wrap: balance;
}
.land-title .or-texte,
.land-title-2 { display: block; }
.land-title-2 { color: var(--projecteur); }

.land-cta { margin-bottom: 14px; }

/* Décompte : tableau d'affichage de stade. */
.countdown {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.scoreboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--r-sm);
  background:
    radial-gradient(rgba(255, 244, 224, 0.045) 0.7px, transparent 1.1px) 0 0 / 4px 4px,
    linear-gradient(180deg, #020A06, #03110A);
  box-shadow:
    inset 0 0 0 1px rgba(216, 181, 106, 0.3),
    inset 0 1px 0 rgba(255, 244, 224, 0.06),
    0 10px 24px -14px rgba(0, 0, 0, 0.9);
}
.scoreboard .cell {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  min-height: 48px;
  padding: 8px 2px 6px;
}
.scoreboard .cell + .cell { box-shadow: inset 1px 0 0 rgba(216, 181, 106, 0.16); }
.scoreboard b {
  display: inline-flex;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  color: var(--or-clair);
  text-shadow: 0 0 10px rgba(244, 226, 176, 0.42), 0 0 2px rgba(244, 226, 176, 0.5);
}
.scoreboard b span {
  display: inline-block;
  width: 0.56em;
  text-align: center;
}
.scoreboard i {
  font-style: normal;
  font-size: 13px;
  line-height: 1;
  color: var(--texte-3);
}
.cd-caption {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--texte-3);
  text-align: center;
}
.cd-done {
  margin: 0;
  padding: 12px 0;
  font-size: 16px;
  color: var(--texte-2);
  text-align: center;
}
.countdown.is-done .scoreboard,
.countdown.is-done .cd-caption { display: none; }

/* Compteur de podiums : place réservée, n'apparaît que si ≥ 100. */
.stats {
  min-height: 20px;
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--texte-2);
  text-align: center;
  visibility: hidden;
}
.stats.is-on { visibility: visible; }
.stats b { color: var(--or); font-weight: 600; }

.noscript {
  margin: 12px 0 0;
  text-align: center;
  color: var(--texte-2);
}

/* Pied de page de la landing : compact, liens à grande zone de tap sans prendre de hauteur. */
.home-footer {
  overflow: hidden; /* les zones de tap élargies des liens ne doivent pas créer de scroll */
  gap: 0 20px;
  padding: 6px var(--gouttiere) calc(8px + env(safe-area-inset-bottom));
}
.home-footer .disclaimer {
  flex-basis: 100%;
  margin: 0 auto 2px;
  max-width: 440px;
  line-height: 1.4;
}
.home-footer a {
  position: relative;
  padding: 3px 0;
}
.home-footer a::after {
  content: "";
  position: absolute;
  inset: -12px -9px;
}
body:not(.is-landing) .home-footer { display: none; }

/* Écrans très courts (navigateur intégré avec barres, petit Android) : on resserre. */
@media (max-height: 620px) {
  .topbar { min-height: 46px; }
  .land-title { margin-bottom: 12px; }
  .land-cta { margin-bottom: 10px; }
  .scoreboard .cell { min-height: 42px; padding: 6px 2px 4px; }
  .scoreboard b { font-size: 28px; }
  .countdown { min-height: 64px; }
  .cd-caption { margin-top: 5px; }
}

/* ---------- Quiz ---------- */

.quiz,
.analyse { padding-top: env(safe-area-inset-top); }

.quiz::before {
  /* Une lumière lointaine venue des tribunes. */
  content: "";
  position: absolute;
  inset: 0 -40%;
  z-index: -1;
  background: radial-gradient(55% 34% at 50% -6%, rgba(255, 240, 210, 0.08), transparent 70%);
  pointer-events: none;
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}
.quiz-mark { font-size: 18px; opacity: 0.85; }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: var(--tap);
  min-width: var(--tap);
  margin-left: -10px;
  padding: 0 14px 0 6px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--texte-2);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.btn-back svg { width: 24px; height: 24px; }
.btn-back:hover { color: var(--projecteur); }

.quiz-body {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 0 24px;
}
.quiz-body.is-in { animation: q-in 120ms var(--ease) both; }
.quiz-body.is-in.from-left { animation-name: q-in-back; }
@keyframes q-in { from { opacity: 0; transform: translateX(14px); } }
@keyframes q-in-back { from { opacity: 0; transform: translateX(-14px); } }

.q-num {
  display: flex;
  align-items: baseline;
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.8;
}
.q-n {
  font-size: 46px;
  color: var(--or);
}
.q-of {
  margin-left: 2px;
  font-size: 22px;
  color: var(--texte-3);
}

.q-title {
  margin: 0 0 24px;
  font-size: clamp(25px, 7.2vw, 31px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.answers {
  display: grid;
  gap: 10px;
}

/* Les réponses sont des plaques de tribune : fond pelouse, filet or à gauche. */
.answer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 14px 18px 14px 20px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--pelouse);
  box-shadow: inset 0 0 0 1px rgba(255, 244, 224, 0.05);
  color: var(--texte);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 120ms var(--ease), color 120ms var(--ease), transform 120ms var(--ease), opacity 120ms var(--ease);
}
.answer::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--metal-vertical);
  transition: width 120ms var(--ease);
}
.answer::after {
  /* remplissage or brossé au moment du choix */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--brossage), var(--metal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 150ms var(--ease);
}
.answer:active { transform: scale(0.992); }
@media (hover: hover) {
  .answer:hover { background: var(--pelouse-2); }
}
.answer-label { flex: 1 1 auto; }

.answer.is-chosen { background: var(--pelouse-2); }
.answer.is-chosen::before { width: 5px; }
.answer-check {
  flex: none;
  width: 22px; height: 22px;
  color: var(--or);
}

.answer.is-picked { color: var(--nuit); }
.answer.is-picked::after { transform: scaleX(1); }
.answer.is-picked .answer-check,
.answer.is-picked .answer-mark { color: var(--nuit); background-color: var(--nuit); }
.answers.has-pick .answer:not(.is-picked) { opacity: 0.45; }

/* Petites marques monochromes (Q1), en masque doré. */
.answer-mark {
  flex: none;
  background-color: var(--or);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  opacity: 0.9;
}
.mark-fifa {
  width: 45px; height: 15px;
  -webkit-mask-image: url("/assets/img/logos/fifa.png");
          mask-image: url("/assets/img/logos/fifa.png");
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}
.mark-ldc {
  /* on ne garde que le ballon étoilé (haut du logo) */
  width: 26px; height: 25px;
  -webkit-mask-image: url("/assets/img/logos/ldc.png");
          mask-image: url("/assets/img/logos/ldc.png");
  -webkit-mask-size: 53.6px 51.9px;
          mask-size: 53.6px 51.9px;
  -webkit-mask-position: -13.7px 0;
          mask-position: -13.7px 0;
}
.answer.is-chosen .answer-mark { margin-right: 0; }

/* Rail de progression : 8 segments, comme les poteaux d'une ligne de touche. */
.rail {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 7px;
  padding: 18px 0 calc(22px + env(safe-area-inset-bottom));
}
.rail i {
  position: relative;
  height: 4px;
  border-radius: 1px;
  background: rgba(255, 244, 224, 0.13);
  transition: background-color 120ms var(--ease);
}
.rail i::before {
  /* poteau */
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 2px; height: 12px;
  border-radius: 1px 1px 0 0;
  background: inherit;
}
.rail i.is-done { background: var(--or-sombre); }
.rail i.is-done::before { background: var(--or); }
.rail i.is-current {
  background: var(--or-clair);
  box-shadow: 0 0 12px rgba(244, 226, 176, 0.5);
}

/* ---------- Analyse ---------- */

.analyse {
  --ph: clamp(92px, 17vh, 150px);
}
@supports (height: 1svh) {
  .analyse { --ph: clamp(92px, 17svh, 150px); }
}
.analyse-top { justify-content: center; }

.a-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: calc(var(--ph) * 0.62) 0 22px;
}
.a-podium {
  --podium-h: var(--ph);
  width: 100%;
  max-width: calc(var(--ph) * 2.25);
}
.a-podium .stage-beams { --cy: calc(var(--up) - var(--podium-h) * 0.32); }

.dust {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 12px;
  width: 100vw;
  max-width: 560px;
  height: calc(var(--ph) * 2.1);
  transform: translateX(-50%);
  pointer-events: none;
}

.a-body {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  padding: 6px 0 calc(28px + env(safe-area-inset-bottom));
}

.a-title {
  margin: 0 0 20px;
  font-size: clamp(34px, 10.4vw, 48px);
  color: var(--projecteur);
}

.a-steps {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 13px;
}
.a-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  line-height: 1.35;
  color: var(--texte-3);
  transition: color 200ms var(--ease);
}
.a-step.is-current { color: var(--projecteur); font-weight: 600; }
.a-step.is-done { color: var(--texte-2); }

.a-dot {
  position: relative;
  flex: none;
  width: 20px; height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(255, 244, 224, 0.2);
}
.is-current .a-dot {
  box-shadow: inset 0 0 0 1.5px rgba(216, 181, 106, 0.35);
}
.is-current .a-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--or-clair);
  border-right-color: var(--or);
  animation: tourne 800ms linear infinite;
}
.a-steps.is-paused .is-current .a-dot::after { animation: none; border-color: var(--carton); }
.is-done .a-dot {
  background: var(--metal);
  box-shadow: none;
}
.is-done .a-dot::after {
  content: "";
  position: absolute;
  left: 5px; top: 5px;
  width: 9px; height: 5px;
  border-left: 2px solid var(--nuit);
  border-bottom: 2px solid var(--nuit);
  transform: rotate(-45deg);
}

.a-meter {
  display: flex;
  align-items: center;
  gap: 14px;
}
.a-bar {
  position: relative;
  flex: 1 1 auto;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 244, 224, 0.1);
  overflow: hidden;
}
.a-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--metal);
  transform: scaleX(0);
  transform-origin: left center;
  box-shadow: 0 0 12px rgba(244, 226, 176, 0.5);
}
.a-pct {
  flex: none;
  min-width: 2.6em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  color: var(--or-clair);
  text-align: right;
}
.a-pct::after {
  content: "%";
  margin-left: 2px;
  font-size: 0.62em;
  color: var(--texte-3);
}

.a-error {
  margin-top: 22px;
  display: grid;
  gap: 12px;
  justify-items: center;
}
.a-err-msg {
  justify-self: stretch;
  margin: 0 0 2px;
  padding-left: 14px;
  border-left: 3px solid var(--carton);
  font-size: 16px;
  line-height: 1.45;
}

/* ---------- Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  .quiz-body.is-in { animation: none; }
  .answer, .answer::before, .answer::after { transition: none; }
  .dust { display: none; }
  .is-current .a-dot::after { animation: none; border-color: var(--or); border-left-color: transparent; border-bottom-color: transparent; }
}
