/* Archéolovie, le site vitrine.
   La page est une fouille : on descend du sable d'aujourd'hui à la terre sombre de l'enfance,
   jusqu'à la trouvaille. Les jetons viennent de l'app (web/src/theme.css). */

:root {
  --bg: #f3f4f2;
  --ink: #111214;
  --muted: #62656c;
  --surface: #ffffff;
  --accent: #3236ff;
  --accent-press: #1e22c9;
  --cream: #f3e6d6;
  --gold: #f2c14e;
  --gold-soft: #f6d88a;

  --s0: #f3eee4;
  --s1: #e8dccb;
  --s2: #d9b98c;
  --s3: #c98e5a;
  --s4: #a9714a;
  --s5: #6b4330;
  --s6: #24170f;

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-ui: "Geist", system-ui, -apple-system, sans-serif;
  --font-words: "Newsreader", Georgia, serif;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--s0);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Le grain de la terre, sur toute la page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

img,
svg {
  display: block;
}

.words {
  font-family: var(--font-words);
  font-optical-sizing: auto;
  font-style: normal;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 26px;
  border-radius: 18px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn--sm {
  height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 15px;
}

.btn--lg {
  height: 62px;
  padding: 0 34px;
  border-radius: 20px;
  font-size: 17px;
}

.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(50, 54, 255, 0.55);
}

.btn--accent:hover {
  background: var(--accent-press);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -10px rgba(50, 54, 255, 0.6);
}

.btn--ink {
  background: var(--ink);
  color: #fff;
}

.btn--ink:hover {
  background: #2a2c31;
}

.btn--ghost {
  color: var(--ink);
  background: rgba(17, 18, 20, 0.06);
}

.btn--ghost:hover {
  background: rgba(17, 18, 20, 0.11);
}

.btn--glass {
  color: var(--cream);
  background: rgba(243, 230, 214, 0.1);
  border: 1px solid rgba(243, 230, 214, 0.22);
}

.btn--glass:hover {
  background: rgba(243, 230, 214, 0.18);
}

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

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px var(--gutter);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.35s ease;
}

.top--solid {
  background: rgba(243, 238, 228, 0.82);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(74, 50, 38, 0.1);
}

.top--deep {
  background: rgba(36, 23, 15, 0.7);
  color: var(--cream);
  box-shadow: 0 1px 0 rgba(243, 230, 214, 0.08);
}

.top--deep .btn--ink {
  background: var(--cream);
  color: var(--ink);
}

.top--deep .wordmark span {
  color: var(--gold-soft);
}

.top--hidden {
  transform: translateY(-110%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}

.brand__logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(74, 50, 38, 0.25);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.wordmark span {
  color: #b5562c;
  font-weight: 700;
}

.wordmark--light {
  color: var(--cream);
}

.wordmark--light span {
  color: var(--gold-soft);
}

.top__nav {
  display: flex;
  gap: 4px;
}

.top__nav a {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s, background 0.2s;
}

.top__nav a:hover {
  opacity: 1;
  background: rgba(17, 18, 20, 0.06);
}

.top--deep .top__nav a:hover {
  background: rgba(243, 230, 214, 0.1);
}

@media (max-width: 860px) {
  .top__nav {
    display: none;
  }
}

/* ---------- Jauge de profondeur ---------- */

.gauge {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-direction: row-reverse;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gauge--on {
  opacity: 1;
}

.gauge__track {
  position: relative;
  width: 3px;
  height: 180px;
  border-radius: 2px;
  background: rgba(74, 50, 38, 0.16);
  overflow: hidden;
}

.gauge__fill {
  position: absolute;
  inset: 0 0 auto 0;
  height: 0%;
  background: linear-gradient(#e8dccb, #c98e5a 40%, #6b4330 80%, var(--gold));
  border-radius: 2px;
}

.gauge__label {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  font-size: 12px;
  line-height: 1.3;
  color: var(--gc, #4a3226);
  transition: color 0.4s;
}

.gauge__depth {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.gauge__name {
  opacity: 0.75;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .gauge {
    display: none;
  }
}

/* ---------- Strates ---------- */

.stratum {
  position: relative;
  padding: clamp(90px, 12vw, 150px) 0 clamp(90px, 11vw, 140px);
  background: var(--sc);
  color: var(--si, var(--ink));
}

.wave {
  position: absolute;
  left: 0;
  right: 0;
  top: -79px;
  width: 100%;
  height: 80px;
  fill: var(--sc);
  pointer-events: none;
}

.s1 { --sc: var(--s1); }
.s2 { --sc: var(--s2); }
.s3 { --sc: var(--s3); }
.s4 { --sc: var(--s4); }
.s5 { --sc: var(--s5); --si: var(--cream); }
.s6 { --sc: var(--s6); --si: var(--cream); }

.eyebrow,
.kicker {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  opacity: 0.8;
}

.kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  background: currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
}

.h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 5.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.lead {
  max-width: 640px;
  margin: 26px 0 0;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  opacity: 0.88;
}

/* ---------- La surface ---------- */

.hero {
  --sc: var(--s0);
  padding-top: clamp(110px, 14vh, 150px);
  padding-bottom: clamp(100px, 12vw, 150px);
  overflow: hidden;
}

.hero::before {
  /* un soleil bas, chaud, derrière la coupe */
  content: "";
  position: absolute;
  width: 900px;
  height: 900px;
  right: -260px;
  top: -320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 193, 78, 0.24), rgba(242, 193, 78, 0) 62%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  min-height: calc(100vh - 220px);
}

.eyebrow {
  color: #8a573a;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5.4vw, 70px);
  line-height: 1;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.hero__title em {
  font-style: normal;
  color: #b5562c;
  position: relative;
  white-space: nowrap;
}

.hero__title em::after {
  /* un coup de truelle sous « vie » */
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -0.06em;
  height: 0.16em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M2 10 C40 3 80 14 120 7 S180 4 198 9' stroke='%23F2C14E' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  transform-origin: left;
  transform: scaleX(0);
  animation: trowel 0.9s 0.9s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

@keyframes trowel {
  to {
    transform: scaleX(1);
  }
}

.hero__lead {
  max-width: 520px;
  margin: 28px 0 0;
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.5;
  color: #3c3f45;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* La coupe */

.coupe {
  position: relative;
  height: min(640px, 76vh);
  min-height: 460px;
  border-radius: 32px;
  overflow: hidden;
  background: #4a3226;
  box-shadow: 0 50px 90px -40px rgba(74, 50, 38, 0.65), 0 0 0 1px rgba(74, 50, 38, 0.08);
  cursor: none;
  touch-action: pan-y;
  isolation: isolate;
}

.coupe__layers {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.coupe__band {
  position: relative;
  flex: 1;
  background: var(--c);
}

/* le bord ondulé de chaque couche, comme le logo */
.coupe__band + .coupe__band::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 16px;
  background: var(--c);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 16' preserveAspectRatio='none'%3E%3Cpath d='M0 10 C60 2 120 16 200 8 S330 2 400 9 V16 H0Z'/%3E%3C/svg%3E") center / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 16' preserveAspectRatio='none'%3E%3Cpath d='M0 10 C60 2 120 16 200 8 S330 2 400 9 V16 H0Z'/%3E%3C/svg%3E") center / 100% 100%;
}

.coupe__band:nth-child(even)::before {
  transform: scaleX(-1);
}

.coupe__name {
  position: absolute;
  left: 14px;
  top: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.55;
}

.coupe__waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
}

.coupe__finds {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.coupe__finds span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translateY(-50%);
  font-family: var(--font-words);
  font-size: clamp(15px, 1.5vw, 19px);
  white-space: nowrap;
  color: #fff8ec;
  opacity: 0.07;
  transition: opacity 0.5s ease, text-shadow 0.5s ease;
}

.coupe__finds span.lit {
  opacity: 1;
  text-shadow: 0 0 18px rgba(246, 216, 138, 0.9), 0 1px 1px rgba(0, 0, 0, 0.35);
}

.coupe__finds span:nth-child(-n + 5) {
  color: #4a3226;
}

.coupe__finds span:nth-child(-n + 5).lit {
  text-shadow: 0 0 16px rgba(255, 252, 240, 1);
}

.coupe__gem {
  position: absolute;
  left: 76%;
  top: 89%;
  z-index: 2;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
}

.coupe__gem::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-soft);
  opacity: 0.55;
  animation: ring 2.8s ease-out infinite;
}

.coupe__gem i {
  position: absolute;
  inset: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 22px 6px rgba(242, 193, 78, 0.55);
  animation: glint 2.8s ease-in-out infinite;
}

@keyframes ring {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes glint {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.35);
  }
}

/* la lanterne : la nuit tout autour, un rond de lumière chaude là où tu pointes */
.coupe__light {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(circle 150px at var(--lx, 60%) var(--ly, 40%), rgba(255, 220, 150, 0.22) 0%, rgba(255, 200, 120, 0.08) 45%, rgba(20, 12, 8, 0) 70%),
    radial-gradient(circle 260px at var(--lx, 60%) var(--ly, 40%), rgba(20, 12, 8, 0) 40%, rgba(20, 12, 8, 0.3) 100%);
  mix-blend-mode: normal;
}

.coupe::after {
  /* le petit point de la lanterne */
  content: "";
  position: absolute;
  z-index: 4;
  left: var(--lx, 60%);
  top: var(--ly, 40%);
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #fff3d6;
  box-shadow: 0 0 14px 6px rgba(255, 214, 140, 0.7);
  pointer-events: none;
}

.coupe__hint {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(20, 12, 8, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--cream);
  font-size: 13px;
  white-space: nowrap;
  transition: opacity 0.5s;
}

.coupe--touched .coupe__hint {
  opacity: 0;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .coupe {
    height: 520px;
    min-height: 0;
  }
}

/* ---------- L'idée ---------- */

.duel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
  margin-top: clamp(44px, 6vw, 72px);
}

.duel__side {
  margin: 0;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 28px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 300px;
  box-shadow: 0 30px 60px -36px rgba(74, 50, 38, 0.45);
}

.duel__side--no {
  background: rgba(255, 255, 255, 0.45);
  box-shadow: none;
  border: 1.5px dashed rgba(74, 50, 38, 0.25);
}

.duel__q {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.duel__side--no .duel__q {
  color: #8e9198;
}

.duel__a {
  flex: 1;
  margin: 22px 0 0;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.4;
  color: #2a2420;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  vertical-align: -0.2em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.duel figcaption {
  margin-top: 22px;
  font-size: 14px;
  font-weight: 600;
  color: #8a573a;
}

.duel__side--no figcaption {
  color: #8e9198;
}

.duel__vs {
  display: grid;
  place-items: center;
}

.duel__vs svg {
  width: 34px;
  height: 34px;
  fill: var(--gold);
  filter: drop-shadow(0 4px 10px rgba(242, 193, 78, 0.6));
}

.idea__text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 56px);
  margin-top: clamp(44px, 5vw, 64px);
  font-size: clamp(17px, 1.6vw, 20px);
}

.idea__text p {
  margin: 0;
}

.idea__text p:first-child {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.03em;
}

@media (max-width: 800px) {
  .duel {
    grid-template-columns: 1fr;
  }
  .duel__side {
    min-height: 0;
  }
  .duel__a {
    min-height: 3em;
  }
  .duel__vs svg {
    width: 24px;
    height: 24px;
  }
  .idea__text {
    grid-template-columns: 1fr;
  }
}

/* ---------- Une soirée ---------- */

.story {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: clamp(40px, 6vw, 100px);
  margin-top: 40px;
}

.story__steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  min-height: 74vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 520px;
  opacity: 0.32;
  transition: opacity 0.45s ease;
}

.step:first-child {
  min-height: 60vh;
}

.step--on {
  opacity: 1;
}

.step__n {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #8a573a;
  font-variant-numeric: tabular-nums;
}

.step h3 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.step p {
  margin: 18px 0 0;
  font-size: 18px;
  color: #2c261f;
}

.story__stage {
  position: sticky;
  top: calc(50vh - 340px);
  height: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.story__dots {
  display: none;
  gap: 6px;
  margin-top: 18px;
}

.story__dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(74, 50, 38, 0.25);
  transition: background 0.3s, width 0.3s;
}

.story__dots i.on {
  width: 22px;
  border-radius: 4px;
  background: #4a3226;
}

/* Le téléphone */

.phone {
  position: relative;
  width: 320px;
  height: 660px;
  border-radius: 52px;
  padding: 11px;
  background: #16171a;
  box-shadow: inset 0 0 0 2px #3a3c42, 0 60px 100px -40px rgba(58, 36, 26, 0.75), 0 20px 40px -20px rgba(58, 36, 26, 0.5);
  flex: none;
}

.phone::before {
  content: "";
  position: absolute;
  z-index: 6;
  top: 22px;
  left: 50%;
  width: 96px;
  height: 28px;
  margin-left: -48px;
  border-radius: 20px;
  background: #000;
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: var(--bg);
  font-size: 14px;
  line-height: 1.4;
}

.scr {
  position: absolute;
  inset: 0;
  padding: 64px 18px 24px;
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.phone[data-step="1"] .scr--today,
.phone[data-step="2"] .scr--today,
.phone[data-step="3"] .scr--today,
.phone[data-step="4"] .scr--found,
.phone[data-step="5"] .scr--frise {
  opacity: 1;
  transform: none;
}

.notif {
  position: absolute;
  z-index: 5;
  top: 60px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  transform: translateY(-140%);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.4s;
}

.phone[data-step="1"].phone--notif .notif {
  transform: none;
  opacity: 1;
}

.notif__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex: none;
}

.notif b {
  font-weight: 600;
}

.notif span {
  float: right;
  color: var(--muted);
  font-size: 12px;
}

.notif p {
  margin: 2px 0 0;
  color: #2a2c31;
}

.app__bar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 8px 4px 16px;
}

.app__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.app__date {
  color: var(--muted);
  font-size: 13px;
}

.qcard {
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.qcard__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.qcard__q {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.qcard__field {
  margin-top: 16px;
  min-height: 150px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f3f4f2;
  transition: background 0.3s, box-shadow 0.3s;
}

.phone[data-step="2"] .qcard__field {
  box-shadow: inset 0 0 0 2px var(--accent);
  background: #fff;
}

.qcard__answer {
  margin: 0;
  font-size: 17px;
  line-height: 1.38;
  color: #1d1b19;
}

.qcard__ph {
  color: #9a9da3;
}

.qcard__answer mark {
  background: none;
  color: inherit;
  border-radius: 4px;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

.phone[data-step="3"] .qcard__answer mark {
  background: color-mix(in srgb, var(--f) 16%, transparent);
  box-shadow: 0 2px 0 var(--f);
}

.qcard__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

.qcard__send {
  padding: 8px 14px;
  border-radius: 12px;
  background: #e3e4e1;
  color: #9a9da3;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.3s, color 0.3s;
}

.phone--typed .qcard__send {
  background: var(--accent);
  color: #fff;
}

.sieve {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: #8a573a;
  opacity: 0;
  transition: opacity 0.4s;
}

.phone[data-step="3"] .sieve {
  opacity: 1;
}

.sieve__dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--gold);
  transform: rotate(45deg);
  animation: glint 1s ease-in-out infinite;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 4px 0;
}

.tag {
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--f) 13%, #fff);
  color: var(--f);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s, transform 0.4s;
}

.phone[data-step="3"] .tag {
  opacity: 1;
  transform: none;
}

.phone[data-step="3"] .tag:nth-child(2) { transition-delay: 0.15s; }
.phone[data-step="3"] .tag:nth-child(3) { transition-delay: 0.3s; }
.phone[data-step="3"] .tag:nth-child(4) { transition-delay: 0.45s; }

/* Écran Trouvailles : le moment de la révélation, sombre */

.scr--found {
  background: #111214;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scr--found::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 200px;
  width: 280px;
  height: 280px;
  margin-left: -140px;
  border-radius: 50%;
  background: #3236ff;
  opacity: 0.24;
  filter: blur(60px);
}

.found__kicker {
  position: relative;
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #9ea2ff;
}

.found__title {
  position: relative;
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  white-space: nowrap;
  letter-spacing: -0.03em;
}

.found__fan {
  position: relative;
  width: 100%;
  height: 250px;
  margin-top: 34px;
}

.mini {
  position: absolute;
  left: 50%;
  top: 0;
  width: 132px;
  margin-left: -66px;
  padding: 7px 7px 10px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.55);
  font-size: 12px;
  line-height: 1.2;
}

.scr--found .mini {
  width: 116px;
  margin-left: -58px;
  transform: translate(var(--x), calc(var(--y, 0px) + 40px)) rotate(var(--r)) scale(0.8);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.15), opacity 0.4s;
}

.phone[data-step="4"] .scr--found .mini {
  transform: translate(var(--x), var(--y, 0px)) rotate(var(--r));
  opacity: 1;
}

.phone[data-step="4"] .scr--found .mini:nth-child(1) { transition-delay: 0.2s; }
.phone[data-step="4"] .scr--found .mini:nth-child(2) { transition-delay: 0.35s; z-index: 2; }
.phone[data-step="4"] .scr--found .mini:nth-child(3) { transition-delay: 0.5s; }

.mini__fam {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 3px 6px;
  font-size: 10px;
  font-weight: 700;
}

.mini__fam svg {
  width: 11px;
  height: 11px;
}

.mini__art {
  display: block;
  aspect-ratio: 230 / 150;
  border-radius: 9px;
  overflow: hidden;
}

.mini__art svg {
  width: 100%;
  height: 100%;
}

.mini b {
  display: block;
  margin: 8px 3px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.found__ghost {
  position: relative;
  display: block;
  line-height: 1.5;
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1.5px dashed #3a3c42;
  color: #b9bbc0;
  font-size: 12.5px;
  text-align: left;
}

.found__ghost .words {
  color: #fff;
  font-size: 14px;
}

.ghostdot {
  display: inline-block;
  margin-right: 6px;
  vertical-align: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px dashed #8e9198;
  flex: none;
}

.found__btn {
  position: relative;
  margin-top: auto;
  align-self: stretch;
  padding: 16px;
  border-radius: 18px;
  background: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

/* Écran Frise */

.frise {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 20px;
  overflow: hidden;
}

.frise__band {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 56px;
  padding: 0 14px;
  background: var(--c);
  color: var(--ink);
  transition: box-shadow 0.4s, transform 0.4s;
}

.frise__band b {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}

.frise__band i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.55;
}

.frise__band--empty {
  background: repeating-linear-gradient(45deg, var(--c) 0 7px, color-mix(in srgb, var(--c) 80%, #000) 7px 9px);
}

.frise__band em {
  font-style: normal;
  font-size: 12px;
  opacity: 0.7;
}

.phone[data-step="5"] .frise__band--new {
  box-shadow: inset 0 0 0 2.5px var(--gold);
}

.frise__band i.frise__new {
  width: 12px;
  height: 12px;
  background: var(--gold);
  opacity: 1;
  border-radius: 2px;
  transform: rotate(45deg) scale(0);
  box-shadow: 0 0 12px 3px rgba(242, 193, 78, 0.8);
  transition: transform 0.6s 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.6);
}

.phone[data-step="5"] .frise__new {
  transform: rotate(45deg) scale(1);
}

.frise__note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  font-size: 13px;
  color: var(--muted);
}

.frise__ok {
  font-weight: 600;
  color: var(--ink);
}

.frise__note .words {
  color: var(--ink);
  font-size: 15px;
}

@media (max-width: 900px) {
  .story {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .story__stage {
    order: -1;
    position: relative;
    top: 0;
    height: auto;
  }
  .story__dots {
    display: flex;
  }
  .story__steps {
    margin-top: 30px;
  }
  .step {
    min-height: 0;
    opacity: 1;
    display: none;
    text-align: center;
    margin: 0 auto;
  }
  .step--on {
    display: flex;
    animation: rise 0.5s ease both;
  }
}

@media (max-width: 380px) {
  .phone {
    transform: scale(0.9);
    margin: -33px 0;
  }
}

/* ---------- Les cartes ---------- */

.deck {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin: clamp(56px, 7vw, 90px) auto 0;
  padding: 30px 0 10px;
  perspective: 1200px;
}

.ccard {
  --u: 1px;
  position: relative;
  width: calc(250 * var(--u));
  height: calc(350 * var(--u));
  border-radius: calc(22 * var(--u));
  background: #fff;
  color: var(--ink);
  padding: calc(10 * var(--u));
  display: flex;
  flex-direction: column;
  flex: none;
  box-shadow: 0 30px 50px -18px rgba(58, 36, 26, 0.55);
  transform: translateY(var(--lift, 0)) rotate(var(--rot, 0deg)) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.35s;
  will-change: transform;
}

.deck .ccard + .ccard {
  margin-left: -12px;
}

.deck .ccard:hover {
  --lift: -24px;
  --rot: 0deg;
  z-index: 3;
  box-shadow: 0 50px 70px -20px rgba(58, 36, 26, 0.6);
}

/* le reflet qui suit le pointeur */
.ccard::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 45%);
  opacity: 0;
  transition: opacity 0.3s;
  mix-blend-mode: soft-light;
}

.ccard:hover::after {
  opacity: 1;
}

.ccard--rare,
.ccard--precieuse,
.ccard--tresor {
  border: calc(5 * var(--u)) solid transparent;
  padding: calc(6 * var(--u));
  background: linear-gradient(#fff, #fff) padding-box, var(--frame) border-box;
}

.ccard--rare {
  --frame: linear-gradient(140deg, #eef2f6 0%, #a8b5c3 30%, #f7f9fb 52%, #8b9aab 78%, #dfe5ec 100%);
}

.ccard--precieuse {
  --frame: linear-gradient(140deg, #fbedc0 0%, #d6a53a 28%, #fff4cf 50%, #b9861d 76%, #f3d98c 100%);
}

.ccard--tresor {
  --frame: conic-gradient(from var(--ang, 200deg), #f5b5e4, #b9a8ff, #9fe3f2, #c8f5c2, #ffe39a, #ffb8c6, #f5b5e4);
  animation: iris 6s linear infinite;
}

@property --ang {
  syntax: "<angle>";
  inherits: false;
  initial-value: 200deg;
}

@keyframes iris {
  to {
    --ang: 560deg;
  }
}

.ccard__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(4 * var(--u)) calc(6 * var(--u)) calc(8 * var(--u));
}

.ccard__family {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  font-size: calc(12 * var(--u));
  font-weight: 700;
}

.ccard__num {
  font-size: calc(12 * var(--u));
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ccard__scenebox {
  position: relative;
  flex: none;
}

.ccard__scene {
  display: block;
  aspect-ratio: 230 / 150;
  border-radius: calc(14 * var(--u));
  overflow: hidden;
}

.ccard__scene svg {
  width: 100%;
  height: 100%;
}

.lvl {
  position: absolute;
  top: calc(8 * var(--u));
  left: calc(8 * var(--u));
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  height: calc(24 * var(--u));
  padding: 0 calc(9 * var(--u));
  border-radius: calc(12 * var(--u));
  line-height: calc(24 * var(--u));
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: calc(13 * var(--u));
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.lvl small {
  font-family: var(--font-ui);
  font-size: calc(10 * var(--u));
  opacity: 0.75;
}

.ccard__body {
  padding: calc(12 * var(--u)) calc(6 * var(--u)) 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ccard__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: calc(19 * var(--u));
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.ccard__quote {
  margin: calc(6 * var(--u)) 0 0;
  font-size: calc(17 * var(--u));
  line-height: 1.2;
  color: #3c3f45;
}

.ccard__foot {
  margin-top: auto;
  padding-top: calc(6 * var(--u));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: calc(12 * var(--u));
  font-weight: 600;
}

.ccard__epoch {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  white-space: nowrap;
}

.ccard__epoch i {
  width: calc(10 * var(--u));
  height: calc(10 * var(--u));
  border-radius: 50%;
}

.rdots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.rdots i {
  width: calc(7 * var(--u));
  height: calc(7 * var(--u));
  border-radius: 4px;
  background: #d1d3ce;
}

.rdots i:first-of-type {
  margin-left: 3px;
}

.rdots--commune i.on { background: #a9aca6; }
.rdots--rare i.on { background: #8597ab; }
.rdots--precieuse i.on { background: #c48f1f; }
.rdots--tresor i.on { background: linear-gradient(135deg, #e48bd0, #8f7cf0 50%, #4fc7d9); }

.metals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 980px;
  margin: clamp(48px, 6vw, 70px) auto 0;
}

.metal b {
  display: block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.metal p {
  margin: 4px 0 0;
  font-size: 15px;
  opacity: 0.8;
}

.metal__chip {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(58, 36, 26, 0.15);
}

.metal__chip--rare { background: linear-gradient(140deg, #eef2f6 0%, #a8b5c3 30%, #f7f9fb 52%, #8b9aab 78%, #dfe5ec 100%); }
.metal__chip--precieuse { background: linear-gradient(140deg, #fbedc0 0%, #d6a53a 28%, #fff4cf 50%, #b9861d 76%, #f3d98c 100%); }
.metal__chip--tresor { background: linear-gradient(90deg, #f5b5e4, #b9a8ff, #9fe3f2, #c8f5c2, #ffe39a, #ffb8c6); }

.quiet {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  max-width: 900px;
  margin: clamp(70px, 9vw, 120px) auto 0;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 32px;
  background: rgba(255, 248, 236, 0.22);
  border: 1px solid rgba(255, 248, 236, 0.35);
}

.quiet .ccard {
  --u: 0.82px;
  transform: none;
}

.quiet__text h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.04em;
}

.quiet__text p {
  margin: 14px 0 0;
  font-size: 18px;
}

.quiet__aside {
  font-size: 15px !important;
  opacity: 0.8;
}

@media (max-width: 900px) {
  .deck {
    flex-wrap: wrap;
    gap: 22px 0;
  }
  .deck .ccard {
    --u: 0.66px;
  }
  .deck .ccard + .ccard {
    margin-left: -26px;
  }
  .metals {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .deck {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    gap: 14px;
  }
  .deck .ccard {
    --u: 0.62px;
    --lift: 0px !important;
  }
  .deck .ccard + .ccard {
    margin-left: 0;
  }
  .quiet {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
  }
}

/* ---------- Creuser ---------- */

.tool__name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tool__name svg {
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 50%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  background: radial-gradient(circle at 35% 30%, #e4a77a, #b9683d 70%);
  color: #fff6ea;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 2px 6px rgba(74, 40, 20, 0.3);
}

.balade {
  margin-top: clamp(50px, 6vw, 80px);
  border-radius: 32px;
  overflow: hidden;
  background: #17110d;
  color: var(--cream);
  box-shadow: 0 50px 90px -40px rgba(30, 16, 8, 0.8);
}

.balade__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 30px;
  padding: 26px clamp(22px, 3vw, 36px) 0;
}

.balade__q {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(17px, 1.8vw, 22px);
  letter-spacing: -0.03em;
  line-height: 1.25;
  transition: opacity 0.3s;
}

.balade__q span {
  color: var(--gold-soft);
}

.balade__plan {
  position: relative;
  margin: 18px clamp(10px, 2vw, 24px) 0;
  aspect-ratio: 640 / 340;
  cursor: none;
  touch-action: pan-y;
}

.plan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.plan--base .plan__rooms path {
  fill: rgba(243, 230, 214, 0.05);
  stroke: rgba(243, 230, 214, 0.55);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.plan--base .plan__out {
  fill: rgba(140, 170, 110, 0.12) !important;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
}

.plan__walk {
  fill: none;
  stroke: rgba(242, 193, 78, 0.45);
  stroke-width: 2;
  stroke-dasharray: 1 9;
  stroke-linecap: round;
}

.plan__tree {
  fill: rgba(140, 170, 110, 0.22);
}

.plan--lit {
  z-index: 3;
}

.plan--lit g path {
  fill: rgba(246, 216, 138, 0);
  stroke: rgba(246, 216, 138, 0);
  stroke-width: 2.5;
  transition: fill 0.8s ease, stroke 0.8s ease;
}

.plan--lit text {
  fill: var(--cream);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  text-anchor: middle;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.plan--lit text.q {
  font-family: var(--font-words);
  font-weight: 400;
  font-size: 15px;
  fill: var(--gold-soft);
}

.plan--lit g.lit path {
  fill: rgba(246, 216, 138, 0.13);
  stroke: rgba(246, 216, 138, 0.9);
}

.plan--lit g.lit text {
  opacity: 1;
}

.balade__dark {
  position: absolute;
  inset: -2px;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle var(--lr, 130px) at var(--lx, 40%) var(--ly, 50%), rgba(255, 214, 140, 0.16), rgba(23, 17, 13, 0) 55%, rgba(23, 17, 13, 0.9) 100%);
}

.balade__plan::after {
  content: "";
  position: absolute;
  z-index: 4;
  left: var(--lx, 40%);
  top: var(--ly, 50%);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #fff3d6;
  box-shadow: 0 0 16px 8px rgba(255, 214, 140, 0.6);
  pointer-events: none;
}

.balade__hint {
  position: absolute;
  z-index: 5;
  right: 12px;
  bottom: 8px;
  margin: 0;
  font-size: 13px;
  color: rgba(243, 230, 214, 0.6);
  transition: opacity 0.5s;
}

.balade--touched .balade__hint {
  opacity: 0;
}

.balade__foot {
  margin: 0;
  padding: 18px clamp(22px, 3vw, 36px) 28px;
  font-size: 15px;
  color: rgba(243, 230, 214, 0.72);
  max-width: 760px;
}

.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}

.tool {
  display: flex;
  flex-direction: column;
  padding: 26px clamp(22px, 3vw, 34px) 30px;
  border-radius: 32px;
  background: #fbf7f0;
  box-shadow: 0 30px 60px -36px rgba(58, 36, 26, 0.6);
}

.tool .tool__name {
  color: #4a3226;
}

.tool__q {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.tool__text {
  margin: 10px 0 0;
  font-size: 15.5px;
  color: #5b4a3e;
}

.cross__stage {
  position: relative;
  height: 220px;
  margin-top: 18px;
}

.cross__stage .mini {
  top: 22px;
  width: 136px;
  margin-left: -68px;
  box-shadow: 0 20px 34px -14px rgba(58, 36, 26, 0.55);
  transition: transform 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.mini--l {
  transform: translateX(-260%) rotate(-20deg);
}

.mini--r {
  transform: translateX(260%) rotate(20deg);
}

.tool--cross.play .mini--l {
  transform: translateX(-62%) rotate(-7deg);
}

.tool--cross.play .mini--r {
  transform: translateX(62%) rotate(7deg);
}

.cross__spark {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 46%;
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  transform: scale(0) rotate(-40deg);
  opacity: 0;
}

.cross__spark svg {
  width: 100%;
  height: 100%;
  fill: var(--gold);
  filter: drop-shadow(0 0 12px rgba(242, 193, 78, 0.9));
}

.tool--cross.play .cross__spark {
  animation: spark 1.6s 0.75s ease forwards;
}

@keyframes spark {
  0% {
    transform: scale(0) rotate(-40deg);
    opacity: 0;
  }
  35% {
    transform: scale(1.25) rotate(10deg);
    opacity: 1;
  }
  100% {
    transform: scale(0.55) rotate(45deg);
    opacity: 0.9;
  }
}

.cross__via {
  margin: 4px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: #8a573a;
  opacity: 0;
  transition: opacity 0.6s 1.3s;
}

.tool--cross.play .cross__via {
  opacity: 1;
}

.side__line {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 10px;
  align-items: center;
  height: 220px;
  margin-top: 18px;
}

.side__line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: repeating-linear-gradient(90deg, #c98e5a 0 6px, transparent 6px 12px);
}

.side__chip {
  position: relative;
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 70px;
  padding: 12px;
  border-radius: 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.side__chip--ghost {
  border: 1.5px dashed #c98e5a;
  background: #fbf7f0;
  color: #8a573a;
  transition: background 0.4s, color 0.4s, transform 0.4s, border-color 0.4s;
}

.side__chip--main {
  min-height: 110px;
  background: #8c5a3c;
  color: var(--cream);
  box-shadow: 0 16px 30px -14px rgba(58, 36, 26, 0.7);
}

.side__chip--main .words {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
}

.side__chip--main small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.7;
}

.tool--side.play .side__chip--ghost:last-child {
  background: #f6d88a;
  border-color: #d6a53a;
  color: #4a3226;
  transform: translateY(-4px);
  animation: nudge 2.4s 0.6s ease-in-out infinite;
}

@keyframes nudge {
  50% {
    transform: translateY(-4px) translateX(4px);
  }
}

@media (max-width: 900px) {
  .tools {
    grid-template-columns: 1fr;
  }
  .balade__plan {
    aspect-ratio: 640 / 380;
  }
}

@media (max-width: 560px) {
  .plan--lit text {
    font-size: 19px;
  }
  .plan--lit text.q {
    display: none;
  }
}

/* ---------- Les règles ---------- */

.s5 {
  background: linear-gradient(var(--s5), #4a3226 70%, #3a2619);
}

.bigquote {
  margin: 0;
}

.bigquote p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
  max-width: 1000px;
}

.bigquote span {
  color: var(--gold-soft);
}

.s5 .lead {
  opacity: 0.8;
}

.rules {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2px;
  margin: clamp(50px, 6vw, 80px) 0 0;
  padding: 0;
  border-radius: 28px;
  overflow: hidden;
}

.rule {
  position: relative;
  padding: 30px 28px 32px;
  background: rgba(243, 230, 214, 0.06);
  transition: background 0.3s;
}

.rule:hover {
  background: rgba(243, 230, 214, 0.11);
}

.rule__n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgba(246, 216, 138, 0.8);
}

.rule h3 {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.rule p {
  margin: 10px 0 0;
  font-size: 15.5px;
  color: rgba(243, 230, 214, 0.75);
}

.link-arrow {
  display: inline-flex;
  gap: 8px;
  margin-top: 36px;
  font-weight: 600;
  color: var(--gold-soft);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(246, 216, 138, 0.4);
  padding-bottom: 3px;
  transition: gap 0.2s, border-color 0.2s;
}

.link-arrow:hover {
  gap: 14px;
  border-color: var(--gold-soft);
}

/* ---------- La trouvaille ---------- */

.s5 + .s6 .wave {
  fill: #24170f;
}

.finale {
  padding-bottom: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 30%, #3b2516 0%, var(--s6) 70%);
  text-align: center;
  overflow: hidden;
}

.finale__wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: clamp(90px, 12vw, 150px);
}

.gem {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 40px;
}

.gem svg {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  fill: var(--gold);
  filter: drop-shadow(0 0 30px rgba(242, 193, 78, 0.8));
  animation: float 5s ease-in-out infinite;
}

.gem__facet {
  fill: #fbe7ae;
}

.gem__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(246, 216, 138, 0.6);
  animation: ring 3.6s ease-out infinite;
}

.gem__ring:nth-child(2) {
  animation-delay: 1.2s;
}

.gem__ring:nth-child(3) {
  animation-delay: 2.4s;
}

.gem i {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffe9b0;
  box-shadow: 0 0 8px 2px rgba(255, 220, 140, 0.8);
  animation: mote 4s ease-out infinite;
}

.gem i:nth-of-type(1) { --dx: -90px; --dy: -60px; animation-delay: 0s; }
.gem i:nth-of-type(2) { --dx: 80px; --dy: -80px; animation-delay: 0.7s; }
.gem i:nth-of-type(3) { --dx: 110px; --dy: 20px; animation-delay: 1.4s; }
.gem i:nth-of-type(4) { --dx: -100px; --dy: 40px; animation-delay: 2.1s; }
.gem i:nth-of-type(5) { --dx: 20px; --dy: -110px; animation-delay: 2.8s; }
.gem i:nth-of-type(6) { --dx: -30px; --dy: 100px; animation-delay: 3.3s; }

@keyframes mote {
  0% {
    transform: translate(-50%, -50%);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)));
    opacity: 0;
  }
}

@keyframes float {
  50% {
    transform: translateY(-8px);
  }
}

.finale__title {
  color: var(--cream);
}

.finale__lead {
  margin-left: auto;
  margin-right: auto;
  color: rgba(243, 230, 214, 0.78);
}

.finale__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

.finale__small {
  margin: 22px 0 0;
  font-size: 14px;
  color: rgba(243, 230, 214, 0.55);
}

.foot {
  border-top: 1px solid rgba(243, 230, 214, 0.1);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  text-align: left;
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 14px;
}

.foot nav a {
  color: rgba(243, 230, 214, 0.65);
  text-decoration: none;
}

.foot nav a:hover {
  color: var(--cream);
}

/* ---------- Apparitions ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* la surface n'attend personne : elle apparaît dès l'arrivée */
.js .hero .reveal {
  opacity: 1;
  transform: none;
  animation: surface 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.hero .reveal:nth-child(2) { animation-delay: 0.08s; }
.hero .reveal:nth-child(3) { animation-delay: 0.16s; }
.hero .reveal:nth-child(4) { animation-delay: 0.24s; }
.hero .coupe.reveal { animation-delay: 0.2s; }

@keyframes surface {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}
.rules .reveal:nth-child(3n + 2) { transition-delay: 0.08s; }
.rules .reveal:nth-child(3n) { transition-delay: 0.16s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .hero__cta .btn {
    flex: 1 1 100%;
  }
  .finale__cta .btn {
    flex: 1 1 100%;
  }
  .coupe__finds span {
    font-size: 14px;
  }
  .coupe__name {
    font-size: 9.5px;
    left: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero__title em::after {
    transform: none;
  }
}

.coupe__finds span.seen:not(.lit) {
  opacity: 0.3;
}

/* Ce qui entre par les côtés (les cartes croisées) ne doit pas élargir la page sur mobile */
.stratum {
  overflow-x: clip;
}

.nobr {
  white-space: nowrap;
}
