/* ============ v8.1 : vrais objets, vraie valise, photos partout ============ */
/* Jeu : les souvenirs sont de vraies photos détourées */
.game-stage { gap: 10px; padding: clamp(22px, 3vw, 34px) clamp(14px, 2.4vw, 30px) 0; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 100%, #e7d6b8 0%, transparent 60%), linear-gradient(180deg, #fbf8f1 0%, #f1e6d2 100%); }
.souvenirs { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 4px clamp(6px, 1.4vw, 16px); min-height: 104px; }
.token { width: auto; height: clamp(62px, 7vw, 92px); aspect-ratio: auto; padding: 0; border-radius: 0; background: none; box-shadow: none; cursor: grab; transition: transform .45s var(--ease-out), opacity .35s; }
.token img { display: block; height: 100%; width: auto; max-width: clamp(70px, 8.4vw, 118px); object-fit: contain; filter: drop-shadow(0 12px 12px rgba(58, 40, 18, .28)); pointer-events: none; -webkit-user-drag: none; user-select: none; }
@media (hover: hover) { .token:hover { transform: translateY(-8px) rotate(-3deg); } }
.token.is-used { opacity: 0; transform: scale(.6); pointer-events: none; }
.token.is-drag { position: fixed; z-index: 70; width: auto; height: 96px; pointer-events: none; transform: rotate(-8deg) scale(1.08); transition: none; box-shadow: none; }
.token.is-drag img { filter: drop-shadow(0 26px 22px rgba(58, 40, 18, .35)); }
.luggage { position: relative; display: block; min-height: 0; height: clamp(300px, 34vw, 400px); margin: 0 calc(-1 * clamp(14px, 2.4vw, 30px)); }
.gauge { position: absolute; left: 50%; top: 4px; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 14px; border-radius: 999px; background: rgba(255, 253, 248, .86); backdrop-filter: blur(8px); font-size: .72rem; font-weight: 500; color: var(--ink-soft); transform: translateX(-50%); box-shadow: 0 10px 24px -16px rgba(16, 36, 28, .5); white-space: nowrap; }
.gauge > i { position: relative; display: block; width: 80px; height: 6px; border-radius: 6px; background: rgba(19, 33, 27, .1); overflow: hidden; }
.gauge b { position: absolute; inset: 0 auto 0 0; width: calc(var(--fill, 0) * 100%); border-radius: inherit; background: var(--g-amber); transition: width .6s var(--ease-out); }
.game.is-hot .gauge b { background: linear-gradient(90deg, #e98b4a, #d4502f); }
.case { position: absolute; left: 50%; bottom: 6%; width: min(470px, 78%); transform: translateX(-50%); transition: left .9s var(--ease-drawer), width .9s var(--ease-drawer); animation: none; }
.case-img, .case-front { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 26px rgba(58, 40, 18, .3)); }
.case-front { position: absolute; inset: 0; z-index: 3; filter: none; pointer-events: none; }
.case-in { position: absolute; left: 7%; right: 7%; top: 30%; bottom: 17%; z-index: 2; display: block; }
.case-in img, .fbox-in img { position: absolute; left: var(--l); bottom: var(--b); width: var(--w, 30%); height: auto; transform: rotate(var(--r)); transform-origin: 50% 100%; filter: drop-shadow(0 10px 10px rgba(58, 40, 18, .3)); }
.case-gauge, .case-svg { display: none; }
.game.has-box .case { left: 34%; width: min(400px, 60%); }
.fbox { position: absolute; right: -6%; bottom: 4%; width: min(330px, 46%); display: block; opacity: 0; transform: translateX(60px) rotate(4deg) scale(.9); transition: opacity .6s, transform .9s var(--ease-drawer); }
.fbox::before, .fbox::after { display: none; }
.game.has-box .fbox { width: min(330px, 46%); opacity: 1; transform: none; }
.fbox-img, .fbox-front { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 26px rgba(58, 40, 18, .28)); }
.fbox-front { position: absolute; inset: 0; z-index: 3; filter: none; pointer-events: none; }
.fbox-in { position: absolute; left: 30%; right: 4%; top: 2%; bottom: 66%; z-index: 2; display: block; }
.fbox-tag { position: absolute; z-index: 4; left: 42%; top: 56%; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--forest); color: var(--ivory); font-size: .74rem; font-weight: 500; box-shadow: 0 10px 20px -12px rgba(16, 36, 28, .8); }
.fbox-tag img { position: static; width: 11px; filter: brightness(0) invert(88%) sepia(40%) saturate(500%) hue-rotate(350deg); }
.flyer { position: fixed; z-index: 65; pointer-events: none; transform-origin: 50% 50%; filter: drop-shadow(0 26px 22px rgba(58, 40, 18, .35)); }
.luggage.is-target .case { transform: translateX(-50%) scale(1.03); }
@media (max-width: 900px) {
  .souvenirs { min-height: 0; }
  .luggage { height: 250px; }
  .case { width: 88%; }
  .game.has-box .case { left: 33%; width: 64%; }
  .game.has-box .fbox { width: 50%; }
}

/* Le sac en scène : vrais objets, vrai scan */
.bd-item { width: clamp(70px, 7.5vw, 112px); height: auto; margin-left: calc(clamp(70px, 7.5vw, 112px) / -2); border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 18px 16px rgba(58, 40, 18, .3)); display: block; }
.bd-phone { position: absolute; right: -2%; top: 16%; z-index: 4; width: clamp(96px, 10vw, 140px); aspect-ratio: 9 / 19; padding: 5px; border-radius: 24px; background: linear-gradient(150deg, #3b5a4d, #0a1611 60%); box-shadow: inset 0 0 0 1.5px #4d6d60, 0 30px 50px -20px rgba(16, 36, 28, .7); opacity: 0; }
.bd-phone-screen { position: relative; display: block; height: 100%; overflow: hidden; border-radius: 19px; background: #20302a; }
.bd-view { position: absolute; inset: -10%; background: url("../assets/img/sac-detoure.webp") 38% 62% / 340% no-repeat, #d9ccb4; filter: saturate(.9) brightness(.92); }
.bd-corners { position: absolute; left: 22%; right: 22%; top: 34%; aspect-ratio: 1; background:
  linear-gradient(var(--amber-hi), var(--amber-hi)) 0 0 / 12px 2px no-repeat, linear-gradient(var(--amber-hi), var(--amber-hi)) 0 0 / 2px 12px no-repeat,
  linear-gradient(var(--amber-hi), var(--amber-hi)) 100% 0 / 12px 2px no-repeat, linear-gradient(var(--amber-hi), var(--amber-hi)) 100% 0 / 2px 12px no-repeat,
  linear-gradient(var(--amber-hi), var(--amber-hi)) 0 100% / 12px 2px no-repeat, linear-gradient(var(--amber-hi), var(--amber-hi)) 0 100% / 2px 12px no-repeat,
  linear-gradient(var(--amber-hi), var(--amber-hi)) 100% 100% / 12px 2px no-repeat, linear-gradient(var(--amber-hi), var(--amber-hi)) 100% 100% / 2px 12px no-repeat; }
.bd-phone small { position: absolute; left: 0; right: 0; bottom: 10%; text-align: center; font-size: .56rem; font-weight: 500; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.bd-trail { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.bd-trail path { fill: none; stroke: var(--forest); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; opacity: .5; }
@media (max-width: 900px) { .bd-phone { right: 0; top: 8%; } }

/* Photos : le principe, la confiance, la feuille de route, participer */
.brief-list li { flex-direction: column; gap: 14px; }
.brief-img { position: relative; width: 100%; margin: 0; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: var(--sand); box-shadow: 0 30px 60px -44px rgba(16, 36, 28, .6); }
.brief-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
@media (hover: hover) { .brief-list li:hover .brief-img img { transform: scale(1.04); } }
.brief-img .brief-ico { position: absolute; left: 12px; bottom: 12px; width: 44px; height: 44px; font-size: 1.2rem; box-shadow: 0 10px 20px -10px rgba(16, 36, 28, .8); }
.trust-list li { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 14px; }
.trust-img { grid-column: 1 / -1; margin: 0; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: var(--sand); }
.trust-img img { width: 100%; height: 100%; object-fit: cover; }
.road-img { margin: 0 0 14px; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--sand); box-shadow: 0 24px 50px -40px rgba(16, 36, 28, .6); }
.road-img img { width: 100%; height: 100%; object-fit: cover; }
.road-list .is-now .road-img { box-shadow: 0 0 0 2px var(--amber), 0 24px 50px -40px rgba(16, 36, 28, .6); }
.join-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .42; mix-blend-mode: luminosity; }
@media (max-width: 860px) { .road-img { aspect-ratio: 16 / 9; } }
.game { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }
.gauge { top: auto; bottom: 12px; }
.case { bottom: 17%; }
.fbox { bottom: 15%; }
.luggage { height: clamp(330px, 30vw, 430px); }
@media (max-width: 900px) { .game { grid-template-columns: 1fr; } .luggage { height: 290px; } }
.token { display: block; height: auto; }
.token img { height: clamp(58px, 6.4vw, 90px); width: auto; max-width: clamp(80px, 9vw, 130px); }
.souvenirs { flex-wrap: nowrap; gap: clamp(4px, 1.2vw, 14px); }
@media (max-width: 600px) { .souvenirs { flex-wrap: wrap; } .token img { height: 58px; } }
.fbox .fbox-img { position: relative; left: auto; bottom: auto; width: 100%; filter: drop-shadow(0 30px 26px rgba(58, 40, 18, .28)); }
.fbox .fbox-front { position: absolute; left: 0; top: 0; bottom: auto; width: 100%; filter: none; }
.fbox .fbox-in img { filter: drop-shadow(0 10px 10px rgba(58, 40, 18, .3)); }
.game.has-box .souvenirs { min-height: 0; }
.bd-trail path { vector-effect: none; stroke-width: 1.4; stroke-dasharray: 1 1; }
.bd-items { top: -12%; }
.bd-item { width: clamp(84px, 9vw, 136px); margin-left: calc(clamp(84px, 9vw, 136px) / -2); }
.bd-phone { right: -6%; top: 10%; }
.join-bg { opacity: .5; -webkit-mask-image: radial-gradient(70% 60% at 50% 42%, rgba(0,0,0,.15) 0%, #000 90%); mask-image: radial-gradient(70% 60% at 50% 42%, rgba(0,0,0,.15) 0%, #000 90%); }
.fbox-tag { white-space: nowrap; }
@media (max-width: 900px) { .fbox-tag { font-size: .62rem; padding: 4px 9px; left: 36%; } .bd-phone { width: 82px; right: 1%; top: 34%; } .bd-ok { right: auto; left: 2%; top: 6%; font-size: .78rem; } }

/* v8.2 : valise plus présente, objets à l'échelle */
.case-in img, .fbox-in img { width: auto; height: var(--h, 60%); max-width: 46%; object-fit: contain; }
.case { width: min(560px, 88%); bottom: 15%; }
.game.has-box .case { left: 37%; width: min(480px, 66%); }
.game.has-box .fbox { width: min(300px, 40%); }
.fbox { right: -4%; }
.luggage { height: clamp(360px, 34vw, 470px); }
@media (max-width: 900px) { .luggage { height: 300px; } .case { width: 96%; } .game.has-box .case { left: 36%; width: 70%; } .game.has-box .fbox { width: 44%; } }

/* v8.2 : écran de scan cadré sur le QR code du sac */
.bd-view { position: absolute; inset: 0; overflow: hidden; background: #d9ccb4; filter: none; }
.bd-view img { position: absolute; left: -45%; top: 46%; width: 253%; max-width: none; height: auto; margin-top: -159%; filter: saturate(.95) brightness(.95); }
.bd-corners { left: 16%; right: 16%; top: 46%; aspect-ratio: .9; transform: translateY(-50%); }
.bd-phone-screen::after { content: ""; position: absolute; left: 18%; right: 18%; top: 46%; height: 2px; background: var(--amber-hi); box-shadow: 0 0 10px 2px rgba(245, 208, 140, .8); animation: phoneScan 1.8s var(--ease-io) infinite; }
@keyframes phoneScan { 0%, 100% { transform: translateY(-40px); } 50% { transform: translateY(40px); } }
.bd-scan { left: 25.6%; top: 51%; width: 24%; height: 27.4%; }
.bd-trail { display: none; }

/* v8.2 : ouverture prête dès le premier affichage, sans flash */
.js .hero .mask { display: block; }
.js .hero .mask { opacity: 0; }
.js .hero .hero-copy > *, .js .hero .seal { opacity: 0; }
.js .hero .mask-hint { display: flex; opacity: 0; }
.no-mask .hero .mask, .no-mask .hero .mask-hint { display: none !important; }
.no-mask .hero .hero-copy > *, .no-mask .hero .seal { opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) { .js .hero .mask, .js .hero .mask-hint { display: none; } .js .hero .hero-copy > *, .js .hero .seal { opacity: 1; } }
.mask-word, .mask-intro { will-change: transform; }

/* v8.2 : l'app sur téléphone, lisible et entière */
.how-caption { display: none; }
@media (max-width: 900px) {
  .how .phone-wrap { top: 58px; padding: 10px 0 12px; margin: 0 calc(-1 * clamp(20px, 4vw, 56px)); background: var(--page); box-shadow: 0 22px 22px -22px rgba(16, 36, 28, .25); }
  .how .phone-wrap::before { display: none; }
  .how .phone { width: min(190px, 50vw); --pad: 8px; border-radius: 34px; }
  .how .screen, .how .tabbar, .how .phone-bar, .how .phone-notch, .how .phone-glare { zoom: .625; }
  .how .phone-glare { border-radius: 39px; }
  .how-caption { display: flex; gap: 12px; align-items: flex-start; width: min(420px, calc(100% - 40px)); margin: 12px auto 0; padding: 12px 14px; border-radius: 18px; background: #fffdf8; text-align: left; box-shadow: 0 16px 30px -24px rgba(16, 36, 28, .6); }
  .how-caption .num { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--forest); color: var(--ivory); font-size: .8rem; font-weight: 600; }
  .how-caption h3 { font-size: 1rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
  .how-caption p { margin-top: 3px; font-size: .84rem; line-height: 1.45; color: var(--ink-soft); }
  .how-caption.is-new > * { animation: up .45s var(--ease-out) both; }
  .how-caption.is-new > div { animation-delay: .05s; }
  .how-steps .how-step { min-height: 62vh; opacity: 0 !important; pointer-events: none; }
  .how-steps .how-step:last-child { min-height: 30vh; }
}

/* v8.3 : vidéos */
.story:not([data-city="lisbonne"]) .scene-clip video { opacity: 1; }
.story:not([data-city="lisbonne"]) .scene-clip > video:not([data-city]) { opacity: 0; }
.scene-clip video[data-city] { opacity: 0; }
.scene-clip video[data-city].on { opacity: 1; }
.brief-img video { width: 100%; height: 100%; object-fit: cover; }

/* v8.3 : sur mobile, le téléphone est réduit d'un bloc (cadre et écran ensemble), plus de coins décalés */
@media (max-width: 900px) {
  .how .phone, .dm-phone .phone { width: 304px !important; --pad: 11px; border-radius: 50px; transform: scale(var(--ps)); transform-origin: top center; margin-bottom: calc(655.3px * (var(--ps) - 1)); }
  .how .phone { --ps: .64; }
  .dm-phone .phone { --ps: .82; }
  .how .screen, .how .tabbar, .how .phone-bar, .how .phone-notch, .how .phone-glare,
  .dm-phone .screen, .dm-phone .tabbar, .dm-phone .phone-bar, .dm-phone .phone-notch, .dm-phone .phone-glare { zoom: 1 !important; }
  .how .screen, .dm-phone .screen { border-radius: 39px; }
  .how .phone-glare, .dm-phone .phone-glare { border-radius: 39px; }
}
@media (max-width: 360px) { .how .phone { --ps: .58; } .dm-phone .phone { --ps: .74; } }

/* v8.4 : on peut changer son vote */
.vote.is-done .vote-opt { cursor: pointer; }
.vote.is-done .vote-opt.is-mine { cursor: default; }
@media (hover: hover) { .vote.is-done .vote-opt:not(.is-mine):hover { background: rgba(244, 239, 228, .14); } }
.vote.is-busy { pointer-events: none; opacity: .85; }
/* v8.5 : la dernière étape laisse assez de place pour que le téléphone reste en place */
.how-steps .how-step:last-child { min-height: 88vh; }
@media (max-width: 900px) { .how-steps .how-step:last-child { min-height: 80vh; } }

/* v8.6 : ouverture fluide, le calque du masque est composité */
.hero .mask { will-change: opacity, transform; backface-visibility: hidden; }
.mask-intro { will-change: auto; }
/* v8.6 : grain en simple transparence (le mode multiply forçait à recalculer toute la page à chaque image) */
.grain { mix-blend-mode: normal; opacity: .028; transform: translateZ(0); }
