/* Mise en page de chaque section, dans l'ordre du document. */

/* ---------- En-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-poster);
  font-weight: 900;
  font-size: 1.625rem;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
}

.brand__mark {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--rope);
  transform: rotate(var(--tilt-carabiner));
}

.site-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.site-nav a {
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

/* Bascule jour/nuit, comme le bouton de l'accueil de l'app. */
.theme-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: var(--stroke-outline) solid currentColor;
  border-radius: var(--radius-pill);
  background: none;
  color: inherit;
  cursor: pointer;
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
}

.theme-toggle__moon {
  display: var(--toggle-moon);
}

.theme-toggle__sun {
  display: var(--toggle-sun);
}

html:not(.js) .theme-toggle {
  display: none;
}

@media (max-width: 52rem) {
  .site-nav {
    display: none;
  }

  .theme-toggle {
    margin-left: auto;
  }
}

/* Sur un petit téléphone, le formulaire de l'accroche suffit. */
@media (max-width: 26rem) {
  .site-header .btn {
    display: none;
  }
}

/* ---------- Accroche ---------- */

/* Le ciel, le pic de l'accueil, puis le sol où il plonge : l'affiche de l'app. */
.hero {
  --ground-h: clamp(120px, 14vw, 170px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: var(--ground-h);
  background: var(--ground);
}

/* La chaîne lointaine, au pied du ciel. */
.hero__far {
  position: absolute;
  left: 0;
  bottom: calc(var(--ground-h) - 4px);
  z-index: -1;
  height: 48px;
}

.hero__ground {
  position: absolute;
  left: 0;
  bottom: calc(var(--ground-h) - 12px);
  z-index: -1;
  height: 24px;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.hero__copy {
  display: grid;
  justify-items: start;
  gap: 1.25rem;
  padding-bottom: calc(var(--ground-h) + 1.5rem);
}

.hero__kicker {
  color: var(--on-sky-muted);
}

.hero__title {
  display: grid;
  justify-items: start;
  gap: 1rem;
  text-transform: none;
}

.hero__pitch {
  font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.05;
}

.hero__question {
  margin-top: -0.4rem;
  color: var(--glow);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.1;
}

.hero__sub {
  max-width: 34rem;
  color: var(--on-sky-muted);
  font-size: 1.125rem;
}

/* Le pic se dresse à droite du téléphone : sa cordée sur l'arête, son sommet
   au-dessus. Son premier plan sombre plonge dans le sol. */
.hero__scene {
  position: relative;
  display: flex;
  align-self: end;
  padding: 120px 0 28px;
}

.hero__peak {
  position: absolute;
  bottom: 0;
  left: 140px;
  width: 480px;
  height: auto;
  max-width: none;
  aspect-ratio: 390 / 560;
}

.hero__scene .phone {
  --scale: 0.68;
}

@media (max-width: 60rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__copy {
    padding-bottom: 0;
  }

  .hero__scene {
    justify-content: center;
    padding-top: 110px;
  }

  .hero__peak {
    left: 50%;
    translate: -50% 0;
  }

  .hero__scene .phone {
    --scale: 0.6;
  }
}

/* ---------- La face ---------- */

.face__ridge {
  position: relative;
  z-index: 1;
  height: 40px;
  margin-top: -22px;
  margin-bottom: -18px;
}

.section--first {
  padding-top: calc(var(--section-y) - 18px);
}

/* ---------- Un tour en quatre temps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px;
  padding: 0 0 22px;
  overflow: hidden;
  border-radius: var(--radius-plate);
  background: var(--plate);
  color: var(--on-plate);
}

.step > :not(.step__scene) {
  margin-inline: 20px;
}

/* Un extrait de l'écran, encadré dans la plaque. */
.step__scene {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 196px;
  margin: 10px;
  padding: 14px;
  border-radius: 2px;
}

.step__scene:not(.plane-sky) {
  background: var(--face);
}

.step__scene--sky {
  justify-items: start;
}

.step__scene .s-plate,
.step__scene .s-card {
  gap: 8px;
  padding-inline: 12px;
}

.step__scene .s-name,
.step__scene .s-value {
  font-size: 22px;
}

.step__kicker {
  font-size: 19px;
}

.step__captain {
  font-family: var(--font-poster);
  font-weight: 900;
  font-size: 60px;
  line-height: 0.9;
  text-transform: uppercase;
}

.step__team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
}

.step__shelf {
  color: var(--text-secondary);
}

.step__scene .s-band {
  margin: 0;
}

.step__scene .s-keep {
  margin-left: 0;
}

.step__num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: 6px;
  border-radius: var(--radius-plate);
  background: var(--signal);
  color: var(--on-signal);
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 1.375rem;
}

.step p {
  color: var(--text-secondary);
}

.steps + .chips {
  margin-top: 2rem;
}

@media (max-width: 64rem) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Sur téléphone, les quatre temps défilent au doigt, comme une planche. */
@media (max-width: 36rem) {
  .steps {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }

  .step {
    scroll-snap-align: start;
  }
}

/* ---------- Le verdict ---------- */

.verdicts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.verdict {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: var(--radius-plate);
  background: var(--plate);
  color: var(--on-plate);
}

/* Les verdicts tombent dans l'en-tête de la montée : sur le ciel. */
.verdict__mark {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 150px;
  padding: 20px;
  background: var(--sky);
  color: var(--on-sky);
}

.verdict__shout {
  font-size: 2.25rem;
}

.verdict p {
  padding: 18px 20px 22px;
  color: var(--text-secondary);
}

@media (max-width: 64rem) {
  .verdicts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .verdict__shout {
    font-size: 3rem;
  }
}

@media (max-width: 36rem) {
  .verdicts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- La dernière carte ---------- */

.section--flip {
  position: relative;
}

.split {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.split__media {
  display: flex;
  justify-content: center;
}

.split__media .phone {
  --scale: 0.7;
}

.split__copy {
  display: grid;
  justify-items: start;
  gap: 1.25rem;
}

.split__copy .label {
  color: var(--on-sky-muted);
}

/* Les affiches finissent sur une arête : dans l'app, la face les recouvre. */
.split__poster,
.cta-band__poster {
  clip-path: polygon(0 0, 100% 0, 100% 95%, 92% 98%, 84% 94%, 75% 99%, 66% 95%, 58% 100%, 49% 94%, 40% 98%, 31% 93%, 22% 99%, 13% 95%, 6% 98%, 0 94%);
}

.split__poster {
  width: min(100%, 390px);
  height: auto;
  aspect-ratio: 390 / 272;
  margin-bottom: -0.5rem;
}

.split__lead {
  max-width: 36rem;
  color: var(--on-sky-muted);
  font-size: 1.1875rem;
}

.split__copy .ticks {
  max-width: 36rem;
}

/* La double révélation : la carte choisie à sa vraie place, puis l'autre. */
.reveal-pair {
  display: grid;
  gap: 8px;
  width: min(100%, 26rem);
  margin-top: 0.5rem;
}

.reveal-pair .s-plate {
  min-height: 56px;
}

.reveal-pair__other {
  color: var(--on-sky-muted);
  font-weight: 400;
  font-size: 1.0625rem;
}

.reveal-pair__shout {
  font-family: var(--font-poster);
  font-weight: 800;
  font-size: 1.375rem;
  line-height: 1.1;
  text-transform: uppercase;
}

@media (max-width: 52rem) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .split__media {
    order: 1;
  }

  .split__media .phone {
    --scale: 0.62;
  }
}

/* ---------- Les thèmes ---------- */

/* Le choix du thème, comme à l'écran : deux plaques et « ou ». */
.duel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  max-width: 860px;
  margin-inline: auto;
}

.shelf {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 4px;
  align-items: center;
  height: 100%;
  padding: 18px 22px;
  border-radius: var(--radius-plate);
  background: var(--plate);
  color: var(--on-plate);
}

.shelf__radio {
  grid-row: span 2;
  width: 26px;
  height: 26px;
  border: 2.5px solid var(--slot);
  border-radius: 50%;
}

.shelf__name {
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: none;
}

.shelf__def {
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.25;
}

.duel__or {
  color: var(--text-secondary);
  font-size: 1.375rem;
}

.shelf-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 860px;
  margin: 1.25rem auto 0;
  padding: 0;
  list-style: none;
}

.shelf-list li {
  padding: 6px 12px;
  border: var(--stroke-hairline) dashed var(--slot);
  border-radius: var(--radius-plate);
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 1.125rem;
}

.shelf-list::before {
  content: 'Et aussi\00a0:';
  align-self: center;
  margin-right: 4px;
  color: var(--text-secondary);
  font-family: var(--font-map);
  font-style: italic;
  font-weight: 500;
}

@media (max-width: 44rem) {
  .duel {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .shelf {
    width: 100%;
  }
}

/* À vous : une question par thème, la réponse sous la plaque. */
.quiz {
  margin-top: clamp(3rem, 7vw, 4.5rem);
}

.quiz__title {
  margin-bottom: 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
}

.quiz__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.quiz__item {
  border-radius: var(--radius-plate);
  background: var(--plate);
  color: var(--on-plate);
}

.quiz__item summary {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 18px 56px 18px 20px;
  list-style: none;
  cursor: pointer;
}

.quiz__item summary::-webkit-details-marker {
  display: none;
}

/* Tant qu'elle est cachée, la réponse est une cote inconnue. */
.quiz__item summary::after {
  content: '?\00a0?\00a0?';
  position: absolute;
  right: 18px;
  top: 50%;
  translate: 0 -50%;
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 1.25rem;
}

.quiz__item[open] summary::after {
  content: '';
}

.quiz__shelf {
  color: var(--text-secondary);
  font-family: var(--font-map);
  font-style: italic;
  font-weight: 500;
  font-size: 0.9375rem;
}

.quiz__q {
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
}

.quiz__a {
  margin: 0 12px 12px;
  padding: 12px 14px;
  border-radius: var(--radius-plate);
  background: var(--signal);
  color: var(--on-signal);
  line-height: 1.4;
}

.quiz__hint {
  margin-top: 1.25rem;
  color: var(--text-secondary);
  text-align: center;
}

@media (max-width: 64rem) {
  .quiz__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 36rem) {
  .quiz__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Pensé pour la soirée ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px 22px;
  border-radius: var(--radius-plate);
  background: var(--plate);
  color: var(--on-plate);
}

.feature__icon {
  width: 34px;
  height: 34px;
}

.feature__icon--teams {
  display: flex;
  gap: 6px;
  width: auto;
}

.feature__icon--teams svg {
  width: 34px;
  height: 34px;
}

.feature p {
  color: var(--text-secondary);
}

@media (max-width: 64rem) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 36rem) {
  .features {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Bandeau final ---------- */

.cta-band {
  --ground-h: 90px;
  position: relative;
  isolation: isolate;
  padding-top: var(--section-y);
  padding-bottom: calc(var(--ground-h) + 2rem);
}

.cta-band::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: var(--ground-h);
  background: var(--ground);
}

.cta-band__ground {
  position: absolute;
  left: 0;
  bottom: calc(var(--ground-h) - 12px);
  z-index: -1;
  height: 24px;
}

.cta-band__inner {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  text-align: center;
}

.cta-band__poster {
  width: min(100%, 520px);
  height: auto;
  aspect-ratio: 390 / 272;
}

.cta-band__inner > p {
  max-width: 34rem;
  color: var(--on-sky-muted);
  font-size: 1.125rem;
}

/* ---------- Pied de page ---------- */

.site-footer__inner {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-block: 8px 40px;
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

.site-footer nav a {
  font-weight: 700;
  text-decoration: none;
}

.site-footer nav a:hover {
  text-decoration: underline;
}

.site-footer__legal {
  max-width: 40rem;
  color: var(--on-sky-muted);
  font-size: 0.9375rem;
}

/* ---------- Page de confidentialité ---------- */

/* `minmax(0, 1fr)` : un mot plus large que l'écran ne doit pas élargir la
   colonne, ni pousser le texte hors de la page. */
.legal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
}

.legal h1 {
  font-size: clamp(2rem, 10vw, 4rem);
}

.legal h2 {
  margin-top: 1.4rem;
  font-size: clamp(1.7rem, 5vw, 2.2rem);
}

.legal ul {
  display: grid;
  gap: 0.8rem;
  padding-left: 1.25rem;
}

.legal__date {
  color: var(--text-secondary);
}
