:root {
  --nuit: #0d1636; --nuit2: #17234e; --nuit3: #26346a; --or: #f7c00a; --or-fonce: #c99600;
  --ivoire: #f5efdf; --brume: #aeb6d2; --rouge: #d8392f; --velours: #101c47;
  --serif: 'Fraunces', Georgia, serif; --sans: 'Inter', system-ui, sans-serif; --enseigne: 'Limelight', 'Fraunces', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--nuit); color: var(--ivoire); font: 400 16px/1.5 var(--sans); min-height: 100dvh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; border-radius: 4px; }
h1, h2 { font-family: var(--serif); font-weight: 600; margin: 0; line-height: 1.12; letter-spacing: -.01em; }
h1:focus { outline: none; }
p { margin: 0; }
#app { min-height: 100dvh; display: flex; flex-direction: column; }
.ecran { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 16px 112px; }
.intro { color: var(--brume); margin-top: 8px; max-width: 60ch; }

/* La bande de photos : la progression, quatre poses */
.bande { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.retour { background: none; border: 0; width: 44px; height: 44px; margin-left: -10px; font-size: 22px; color: var(--ivoire); }
.poses { display: flex; gap: 4px; padding: 5px; background: #fff8e8; border-radius: 3px; transform: rotate(-.6deg); box-shadow: 0 2px 0 #0006; }
.pose { width: 34px; height: 26px; background: var(--nuit3); display: grid; place-items: center; font: 600 12px var(--sans); color: var(--brume); }
.pose.faite { background: var(--or); color: var(--nuit); }
.pose.ici { background: var(--nuit); color: var(--or); }
.bande small { margin-left: auto; color: var(--brume); font-size: 13px; }

/* La barre du bas : une seule action */
.levier { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--nuit) 28%); display: flex; justify-content: center; }
.levier > div { width: 100%; max-width: 520px; display: flex; gap: 10px; }
.btn { flex: 1; min-height: 54px; border: 0; border-radius: 999px; background: var(--or); color: var(--nuit); font-weight: 600; font-size: 17px; padding: 0 22px; box-shadow: 0 4px 0 var(--or-fonce); transition: transform .08s, box-shadow .08s; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--or-fonce); }
.btn:disabled { background: var(--nuit3); color: var(--brume); box-shadow: none; cursor: not-allowed; }
.btn.second { flex: 0 1 auto; background: transparent; color: var(--ivoire); box-shadow: inset 0 0 0 1.5px var(--brume); font-weight: 500; font-size: 16px; }

/* La cabine */
.cabine { position: relative; width: min(100%, 360px); margin: 0 auto; background: var(--or); border-radius: 14px 14px 4px 4px; padding: 0 16px 16px; box-shadow: 0 0 0 3px #0a1029, 0 26px 60px -18px #f7c00a55; }
.fronton { margin: 0 -16px; padding: 12px 8px 10px; background: var(--nuit2); border-radius: 12px 12px 0 0; text-align: center; color: var(--or); font: 400 clamp(24px, 7.4vw, 31px)/1 var(--enseigne); border-bottom: 3px solid #0a1029; position: relative; }
.ampoules { display: flex; justify-content: space-between; padding: 0 2px 8px; }
.ampoules i { width: 7px; height: 7px; border-radius: 50%; background: #ffe89a; box-shadow: 0 0 7px #ffd84d; animation: amp 1.6s infinite steps(2); }
.ampoules i:nth-child(even) { animation-delay: .8s; }
@keyframes amp { 50% { opacity: .35; } }
.loge { position: relative; height: clamp(250px, 44dvh, 340px); margin-top: 14px; background: radial-gradient(90% 70% at 50% 25%, #fff6d0, #d9b24a 65%, #7d5f12); overflow: hidden; border: 3px solid #0a1029; }
.loge img.majordome { position: absolute; left: 50%; bottom: 8%; width: 58%; transform: translateX(-50%); border-radius: 50%; }
.loge img.tirage { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rideau { position: absolute; top: 0; bottom: 0; width: 52%; transition: transform .9s cubic-bezier(.65,0,.25,1); background: repeating-linear-gradient(90deg, #0c1538 0 11px, #1d2c6b 16px, #2a3b83 19px, #101a44 25px 28px); box-shadow: 0 0 22px #000a; }
.rideau.g { left: 0; transform: translateX(-62%); transform-origin: left; }
.rideau.d { right: 0; transform: translateX(62%); }
.ferme .rideau.g, .ferme .rideau.d { transform: none; }
.tringle { position: absolute; z-index: 2; top: 0; left: 0; right: 0; height: 7px; background: linear-gradient(#f3e3ad, #8a6b12); }
.plaque { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--nuit); font-weight: 600; font-size: 13px; }
.voyant { display: inline-flex; align-items: center; gap: 6px; }
.voyant i { width: 10px; height: 10px; border-radius: 50%; background: #2a8f4c; box-shadow: 0 0 0 2px #0a1029; }
.ferme ~ .plaque .voyant i, .occupee .voyant i { background: var(--rouge); box-shadow: 0 0 0 2px #0a1029, 0 0 12px var(--rouge); }
.fente { height: 12px; margin-top: 10px; background: #0a1029; border-radius: 3px; box-shadow: inset 0 3px 3px #000; }

/* Accueil */
.accueil { justify-content: flex-start; gap: 22px; padding-top: 22px; }
.accueil h1 { font-size: clamp(30px, 8.6vw, 42px); text-align: center; text-wrap: balance; }
.accueil .sous { text-align: center; color: var(--brume); max-width: 42ch; margin: 10px auto 0; }
.signature { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--brume); font-size: 13px; }
.signature img { width: 24px; height: 24px; border-radius: 50%; }
.signature b { font-family: var(--serif); color: var(--ivoire); font-size: 15px; font-weight: 600; }

/* Pose 1 : les convives */
h1.titre { font-size: clamp(26px, 6.8vw, 36px); }
.chaises { position: sticky; top: 0; z-index: 3; margin: 16px -16px 0; padding: 10px 16px; background: var(--nuit); display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; border-bottom: 1px solid var(--nuit3); }
.chaise { aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--nuit3); background: none; padding: 0; display: grid; place-items: center; font: 600 clamp(9px, 2.6vw, 13px) var(--sans); color: var(--nuit); min-width: 0; }
.chaise.pris { background: var(--or); border: 0; }
.recherche { position: relative; margin-top: 14px; }
.recherche input { width: 100%; min-height: 50px; border-radius: 10px; border: 1.5px solid var(--nuit3); background: var(--nuit2); padding: 0 14px; }
.recherche input::placeholder { color: var(--brume); }
.onglets { display: flex; gap: 6px; overflow-x: auto; margin: 12px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; }
.onglets::-webkit-scrollbar { display: none; }
.onglet { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--nuit3); background: none; font-size: 14px; color: var(--brume); }
.onglet[aria-pressed=true] { background: var(--ivoire); color: var(--nuit); border-color: var(--ivoire); font-weight: 600; }
.carte { list-style: none; margin: 8px 0 0; padding: 0; }
@media (min-width: 640px) { .carte { columns: 2; column-gap: 20px; } }
.carte li { break-inside: avoid; }
.mets { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 2px; background: none; border: 0; border-bottom: 1px solid #ffffff14; text-align: left; min-height: 62px; }
.mets .nom { font: 600 18px/1.2 var(--serif); display: block; }
.mets .ligne { font-size: 13.5px; color: var(--brume); display: block; margin-top: 2px; }
.mets .coche { margin-left: auto; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--nuit3); display: grid; place-items: center; font-size: 15px; color: var(--nuit); }
.mets[aria-pressed=true] .coche { background: var(--or); border-color: var(--or); }
.mets[aria-pressed=true] .nom { color: var(--or); }
.mets:disabled { opacity: .45; cursor: not-allowed; }
.camee { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--nuit2); box-shadow: inset 0 0 0 1.5px var(--or-fonce); display: grid; place-items: center; font: 500 15px var(--serif); color: var(--or); }
.hors { margin-top: 10px; padding: 14px; border-radius: 10px; background: var(--nuit2); }
.hors button { display: block; width: 100%; margin-top: 10px; min-height: 48px; border-radius: 999px; border: 0; background: var(--ivoire); color: var(--nuit); font-weight: 600; }
.refus { color: #ffb4ad; }

/* Pose 2 : le plan de table */
.plan { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; position: relative; }
.toi { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; background: var(--or); color: var(--nuit); border-radius: 10px 10px 2px 2px; font: 600 18px var(--serif); }
.cote { font-size: 13px; color: var(--brume); }
.place { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 58px; padding: 6px 8px; background: var(--nuit2); border: 2px solid transparent; border-radius: 8px; text-align: left; transition: transform .15s; }
.place .camee { width: 34px; height: 34px; font-size: 13px; }
.place span.n { font: 500 15px/1.15 var(--serif); min-width: 0; overflow-wrap: anywhere; }
.place.choisie { border-color: var(--or); transform: scale(1.03); background: var(--nuit3); }
.aide { margin-top: 12px; min-height: 24px; color: var(--brume); font-size: 14px; }
h2.objet-t { font-size: 22px; margin-top: 26px; }
.objets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.objet { min-height: 88px; padding: 10px 6px; border-radius: 10px; border: 1.5px solid var(--nuit3); background: none; font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.objet b { font-size: 26px; font-weight: 400; line-height: 1; }
.objet[aria-pressed=true] { background: var(--ivoire); color: var(--nuit); border-color: var(--ivoire); font-weight: 600; }

/* Pose 3 : la photo */
.viseur { position: relative; width: min(100%, 420px); aspect-ratio: 1; margin: 16px auto 0; background: #0a1029; border: 10px solid var(--or); border-radius: 6px; overflow: hidden; display: grid; place-items: center; text-align: center; }
.viseur video, .viseur img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viseur video { transform: scaleX(-1); }
.viseur p { padding: 24px; color: var(--brume); position: relative; }
.compte { position: absolute; inset: 0; display: grid; place-items: center; font: 400 130px/1 var(--enseigne); color: var(--or); text-shadow: 0 4px 18px #000; z-index: 2; }
.ovale { position: absolute; left: 22%; right: 22%; top: 12%; bottom: 14%; border: 2px dashed #ffffffaa; border-radius: 50%; z-index: 1; pointer-events: none; }
.actions-photo { display: flex; gap: 8px; width: min(100%, 420px); margin: 12px auto 0; }
.actions-photo .btn { font-size: 15px; min-height: 50px; padding: 0 10px; }
.accord { display: flex; gap: 12px; align-items: flex-start; width: min(100%, 420px); margin: 16px auto 0; font-size: 14px; color: var(--brume); cursor: pointer; }
.accord input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--or); }
.erreur { width: min(100%, 420px); margin: 12px auto 0; color: #ffb4ad; font-size: 14px; }

/* Le développement */
.dev { justify-content: center; gap: 18px; text-align: center; padding-bottom: 32px; }
.dev .replique { font: italic 500 20px/1.3 var(--serif); min-height: 2.6em; max-width: 32ch; margin: 0 auto; }
#flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 20; }
#flash.pan { animation: pan .32s ease-out; }
@keyframes pan { 0% { opacity: .95; } 100% { opacity: 0; } }

/* La révélation */
.revele { padding-top: 12px; max-width: 1040px; }
.bouche { height: 16px; margin: 0 auto; width: min(100%, 720px); background: var(--or); border-radius: 4px 4px 0 0; position: relative; z-index: 2; box-shadow: 0 6px 8px #0009; }
.bouche::after { content: ''; position: absolute; left: 3%; right: 3%; bottom: 3px; height: 5px; background: #0a1029; border-radius: 2px; }
.sortie { overflow: hidden; }
.tableau { border: 8px solid #fff8e8; border-top-width: 5px; background: #fff8e8; animation: sortir 2.1s cubic-bezier(.3,.7,.25,1) both; }
@keyframes sortir { from { transform: translateY(-101%); } to { transform: none; } }
.defile { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--or) transparent; }
.defile img { display: block; height: clamp(250px, 44vw, 440px); width: auto; max-width: none; animation: developper 4s ease-out both; }
@media (min-width: 900px) { .defile img { width: 100%; height: auto; } }
@keyframes developper { 0% { filter: sepia(1) brightness(1.9) contrast(.35) blur(7px); } 45% { filter: sepia(.8) brightness(1.25) contrast(.7) blur(2px); } 100% { filter: none; } }
.legende { color: var(--brume); font-size: 13px; margin-top: 8px; text-align: center; }
.apercu { color: var(--nuit); background: var(--or); font-size: 13px; font-weight: 500; padding: 8px 12px; border-radius: 6px; margin-top: 10px; }
.verdict { margin-top: 26px; max-width: 62ch; animation: arrivee .6s 2.6s both; }
@keyframes arrivee { from { opacity: 0; transform: translateY(8px); } }
.verdict .tues { color: var(--or); font: italic 500 18px var(--serif); }
.verdict h1 { font-size: clamp(34px, 9vw, 54px); margin-top: 2px; }
.verdict > p { margin-top: 12px; font: 400 18px/1.5 var(--serif); }
.obs { list-style: none; padding: 0; margin: 18px 0 0; }
.obs li { padding: 12px 0; border-top: 1px solid #ffffff1c; color: #dfe3f2; }
.partage { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.partage button { flex: 1 1 150px; min-height: 48px; border-radius: 999px; background: none; border: 1.5px solid var(--brume); font-weight: 500; }
.note { margin-top: 18px; font-size: 13px; color: var(--brume); }
.note a { color: var(--or); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

.dialogues { margin-top: 26px; max-width: 62ch; animation: arrivee .6s 2.4s both; }
.dialogues h2 { font-size: 24px; }
.scene { margin-top: 14px; padding: 14px 16px; background: var(--nuit2); border-left: 3px solid var(--or); border-radius: 0 10px 10px 0; }
.scene p { font: italic 400 17px/1.45 var(--serif); }
.scene p + p { margin-top: 8px; }
.scene b { font: 600 14px var(--sans); font-style: normal; color: var(--or); margin-right: 6px; }
.dialogues .legende { text-align: left; }

.hors .choix { display: block; width: 100%; margin-top: 8px; min-height: 52px; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--nuit3); background: var(--nuit); color: var(--ivoire); text-align: left; font-weight: 400; font-size: 14px; }
.hors .choix b { font: 600 16px var(--serif); color: var(--or); }
.hors button.discret { background: none; color: var(--brume); box-shadow: inset 0 0 0 1.5px var(--nuit3); font-weight: 500; font-size: 14px; }
