/* =========================================================
   Héloïse & Raphaël — « Il était une fois »
   DA : livre de contes enchanté — nuit, or, rose, parchemin
   ========================================================= */
:root {
  --night: #0d1428;
  --night-2: #16213d;
  --night-3: #1f2d55;
  --gold: #c9a45c;
  --gold-l: #ecd59a;
  --gold-d: #8f6d2f;
  --rose: #9e1b32;
  --rose-l: #c94a5c;
  --parch: #f3e9d2;
  --parch-2: #e8d9b5;
  --ink: #2b2118;
  --ink-soft: #6a5a48;
  --deco: "Cinzel Decorative", "Cinzel", serif;
  --caps: "Cinzel", serif;
  --tale: "IM Fell English", "Cormorant Garamond", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Pinyon Script", cursive;
  --col: 480px;
  --gold-grad: linear-gradient(105deg, #8f6d2f 0%, #d6b267 22%, #f7e8b8 38%, #c79e52 55%, #efd99f 72%, #9b7a3a 100%);
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .3 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--night); scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.is-locked, html.is-locked body { overflow: hidden; }
body {
  font-family: var(--serif);
  color: var(--ink);
  background: radial-gradient(ellipse 70% 50% at 50% 0%, #1c2a52, transparent 70%), var(--night);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img, svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
.svg-lib { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- typographie ---------- */
.chap { font-family: var(--caps); font-size: 11px; letter-spacing: .42em; text-transform: uppercase; color: var(--rose); padding-left: .42em; }
.chap--light { color: var(--gold); }
.title { font-family: var(--deco); font-weight: 400; font-size: clamp(34px, 10vw, 46px); line-height: 1.12; color: var(--ink); margin: 10px auto 4px; width: fit-content; padding: 0 .1em; }
.title--light { color: var(--gold-l); }
.title--script { font-family: var(--script); font-size: clamp(44px, 12.5vw, 58px); color: var(--rose); }
.lead { font-family: var(--tale); font-size: 19px; line-height: 1.55; max-width: 32ch; margin: 14px auto 0; }
.hint { font-family: var(--tale); font-style: italic; font-size: 17px; color: var(--gold-l); opacity: .8; margin-top: 4px; }
.small { font-family: var(--serif); font-size: 15px; line-height: 1.5; }
.muted { opacity: .72; margin-top: 22px; }
.orn { width: 190px; height: 22px; margin: 16px auto; color: var(--gold); }

/* ---------- page & sections ---------- */
.page { position: relative; max-width: var(--col); margin: 0 auto; background: var(--parch); box-shadow: 0 0 0 1px rgba(201, 164, 90, .15), 0 0 120px rgba(0, 0, 0, .7); overflow-x: clip; }
.sec { position: relative; padding: 96px 26px 110px; text-align: center; }
.sec > * { position: relative; z-index: 2; }
.sec--parch { background: var(--paper), radial-gradient(ellipse 90% 60% at 50% 50%, #f8f0dc, var(--parch) 60%, #eadcb9); color: var(--ink); }
.sec--parch::before, .sec--parch::after {
  content: ""; position: absolute; z-index: 1; left: 12px; right: 12px; top: 12px; bottom: 12px;
  border: 1px solid rgba(143, 109, 47, .35); pointer-events: none;
}
.sec--parch::after { left: 17px; right: 17px; top: 17px; bottom: 17px; border-color: rgba(143, 109, 47, .18); }
.sec--night { background: radial-gradient(ellipse 80% 50% at 50% 40%, var(--night-3), var(--night-2) 50%, var(--night)); color: var(--parch); }
.sec + .sec { box-shadow: 0 -1px 0 rgba(201, 164, 90, .55); }

/* éléments détourés (images Gemini) */
.el { position: absolute !important; z-index: 6 !important; pointer-events: none; height: auto; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .35)); will-change: transform; }
.el--seam { top: -70px; left: 50%; width: 116%; max-width: none; margin-left: -58%; }
.el--candle-l { top: 26px; left: -34px; width: 24%; opacity: .95; }

/* =========================================================
   OUVERTURE — le livre
   ========================================================= */
.intro {
  position: relative;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 40% at 50% 55%, rgba(236, 196, 120, .16), transparent 70%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 5px),
    radial-gradient(ellipse at 50% 40%, #1b2850, #0b1124 75%);
  cursor: pointer;
}
.cinema { position: absolute; inset: 0; width: 100%; height: 100%; }
.book-scene { position: absolute; inset: 0; display: grid; place-items: center; perspective: 1700px; }
.candle-glow { position: absolute; left: 50%; top: 52%; width: 120vmin; height: 120vmin; margin: -60vmin 0 0 -60vmin; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 140, .22), transparent 60%); animation: flicker 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes flicker { 0%, 100% { opacity: .85; transform: scale(1); } 30% { opacity: 1; transform: scale(1.03); } 60% { opacity: .75; } }
.book { position: relative; width: min(66vw, 290px); aspect-ratio: 3 / 4.15; transform-style: preserve-3d; will-change: transform; }
.book-pages {
  position: absolute; inset: 0;
  border-radius: 2px 6px 6px 2px;
  background: var(--paper), linear-gradient(90deg, #d9c8a0, #f6eedb 8%, #f3e9d2);
  box-shadow: 2px 2px 0 #e6d7b3, 4px 4px 0 #d9c7a0, 6px 6px 0 #ccb98f, 10px 18px 40px rgba(0, 0, 0, .55);
  display: grid; place-items: center;
}
.first-page { text-align: center; padding: 20px; }
.first-page .orn { width: 140px; color: var(--gold-d); margin: 10px auto; }
.fp-small { font-family: var(--caps); font-size: 10px; letter-spacing: .4em; color: var(--rose); }
.fp-names { font-family: var(--script); font-size: 46px; line-height: 1; color: var(--ink); margin-top: 8px; }
.fp-names i { font-style: normal; font-size: 30px; color: var(--rose); }
.book-cover { position: absolute; inset: 0; transform-origin: 0 50%; transform-style: preserve-3d; will-change: transform; }
.cover-front, .cover-back { position: absolute; inset: 0; border-radius: 2px 8px 8px 2px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cover-front {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .1) 7%, transparent 9%, transparent 92%, rgba(0, 0, 0, .25)),
    repeating-radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 40% 30%, #2a3b6e, #16213d 60%, #0d1428);
  box-shadow: inset 0 0 0 1px rgba(201, 164, 90, .4), inset 0 0 40px rgba(0, 0, 0, .5), 14px 20px 40px rgba(0, 0, 0, .5);
  color: var(--gold-l);
}
.cover-front::before, .cover-front::after { content: ""; position: absolute; inset: 16px 14px 16px 26px; border: 1.5px solid rgba(201, 164, 90, .75); border-radius: 3px; }
.cover-front::after { inset: 22px 20px 22px 32px; border-width: 1px; border-color: rgba(201, 164, 90, .4); }
.cc { position: absolute; width: 34px; height: 34px; color: var(--gold); }
.cover-front .cc--tl { top: 26px; left: 36px; }
.cover-front .cc--tr { top: 26px; right: 24px; transform: scaleX(-1); }
.cover-front .cc--bl { bottom: 26px; left: 36px; transform: scaleY(-1); }
.cover-front .cc--br { bottom: 26px; right: 24px; transform: scale(-1); }
.cover-kicker { font-family: var(--caps); font-size: 10px; letter-spacing: .42em; padding-left: 12px; }
.cover-rose { width: 70px; height: 98px; color: var(--gold); filter: drop-shadow(0 0 10px rgba(236, 213, 154, .45)); margin: 6px 0 2px 12px; animation: glow 3s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 18px rgba(236, 213, 154, .8)); } }
.cover-names { font-family: var(--script); font-size: clamp(22px, 7vw, 30px); white-space: nowrap; line-height: 1.1; padding-left: 12px; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cover-names i { font-style: normal; }
.cover-date { font-family: var(--caps); font-size: 9.5px; letter-spacing: .3em; padding-left: 12px; opacity: .8; }
.cover-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 20% 30%, rgba(158, 27, 50, .35), transparent 30%),
    radial-gradient(circle at 70% 60%, rgba(31, 45, 85, .6), transparent 35%),
    radial-gradient(circle at 40% 80%, rgba(201, 164, 90, .3), transparent 30%),
    #2a1f2a;
  box-shadow: inset -10px 0 20px rgba(0, 0, 0, .4), inset 0 0 0 10px #16213d;
}
.intro-ui { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; padding: 0 24px calc(34px + env(safe-area-inset-bottom)); pointer-events: none; }
.intro-hint { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; font-family: var(--tale); font-style: italic; font-size: 17px; color: var(--parch); pointer-events: auto; }
.intro-ready { display: none; animation: blink 2.4s ease-in-out infinite; }
.intro-loading { opacity: .75; }
.intro-loading b { font-style: normal; font-family: var(--serif); font-size: 13px; margin-left: 8px; color: var(--gold-l); }
.intro.is-ready .intro-loading { display: none; }
.intro.is-ready .intro-ready { display: block; }
.intro-hint i { position: relative; width: 1px; height: 44px; background: rgba(201, 164, 90, .3); overflow: hidden; }
.intro-hint i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 14px; background: var(--gold-l); animation: drip 2s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes drip { from { transform: translateY(-14px); } to { transform: translateY(44px); } }
@keyframes blink { 50% { opacity: .35; } }
.intro-flash { position: absolute; inset: 0; z-index: 9; background: var(--paper), radial-gradient(ellipse 75% 50% at 50% 45%, #fbf5e6 0%, var(--parch) 100%); opacity: 0; pointer-events: none; }
.intro-end { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 24px; pointer-events: none; }
.names { display: flex; flex-direction: column; align-items: center; font-weight: 400; margin-top: 12px; }
.names span { font-family: var(--script); font-size: clamp(62px, 18vw, 84px); line-height: .95; color: var(--ink); }
.names i { font-family: var(--deco); font-style: normal; font-size: 30px; color: var(--rose); margin: 2px 0; }
.intro-end-date { font-family: var(--caps); font-size: 11.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--rose); margin-top: 22px; }
.intro-end .orn { color: var(--gold-d); }

/* =========================================================
   CHAPITRE I — l'histoire
   ========================================================= */
.story { padding-top: 70px; }
.medallion {
  position: relative; width: 190px; height: 240px; margin: 20px auto 26px;
  border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #233466, #0d1428);
  box-shadow: 0 0 0 3px var(--gold), 0 0 0 8px var(--parch), 0 0 0 9px rgba(143, 109, 47, .5), 0 18px 40px rgba(43, 33, 24, .3);
}
.medallion img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.medallion-rose { width: 80px; height: 112px; color: var(--gold-l); }
.tale { max-width: 34ch; margin: 0 auto; text-align: left; }
.tale p { font-family: var(--tale); font-size: 19px; line-height: 1.6; margin-bottom: 14px; }
.tale p .w { opacity: .12; }
.dropcap { float: left; font-family: var(--deco); font-size: 64px; line-height: .8; color: var(--rose); padding: 6px 8px 0 0; }
.signature { font-family: var(--script); font-size: 38px; color: var(--rose); margin-top: 18px; }
.families { font-family: var(--tale); font-style: italic; font-size: 16px; color: var(--ink-soft); margin-top: 10px; line-height: 1.5; }

/* =========================================================
   CHAPITRE II — miroir magique
   ========================================================= */
.mirror { position: relative; width: 240px; height: 320px; margin: 26px auto 4px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mirror-frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .5)); pointer-events: none; }
.mirror-glass {
  position: absolute; left: 28px; top: 30px; width: 184px; height: 240px;
  border-radius: 50%; overflow: hidden;
  background: radial-gradient(ellipse at 40% 30%, #fffaf0, #efe2c4 60%, #d7c194);
  display: grid; place-items: center;
}
.mirror-date { text-align: center; color: var(--ink); }
.mirror-date small { display: block; font-family: var(--caps); font-size: 11px; letter-spacing: .3em; color: var(--rose); }
.mirror-date b { display: block; font-family: var(--deco); font-weight: 400; font-size: 76px; line-height: 1; color: var(--rose); }
.mirror-date span { display: block; font-family: var(--script); font-size: 34px; line-height: 1; }
.mirror-date em { display: block; font-style: normal; font-family: var(--caps); font-size: 14px; letter-spacing: .3em; margin-top: 6px; }
.fog { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.mirror.is-clear .fog { pointer-events: none; }
.link-btn { font-family: var(--caps); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; color: var(--gold-l); opacity: .7; padding: 10px; }
.calendar { max-width: 300px; margin: 36px auto 0; }
.cal-title { font-family: var(--deco); font-size: 22px; color: var(--gold-l); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 14px; font-family: var(--serif); font-size: 16px; }
.cal-grid .dow { font-family: var(--caps); font-size: 10px; color: var(--gold); padding-bottom: 8px; }
.cal-grid .d { height: 34px; display: grid; place-items: center; position: relative; opacity: .85; font-variant-numeric: lining-nums; }
.cal-grid .is-day { color: var(--parch); opacity: 1; font-weight: 600; z-index: 0; }
.cal-grid .is-day::before { content: ""; position: absolute; z-index: -1; width: 34px; height: 34px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 3px rgba(201, 164, 90, .6), 0 0 18px rgba(201, 74, 92, .6); }
.countdown { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.countdown div { width: 74px; padding: 14px 0 10px; border: 1px solid rgba(201, 164, 90, .35); border-radius: 40px 40px 4px 4px; background: rgba(0, 0, 0, .15); }
.countdown b { display: block; font-family: var(--serif); font-weight: 500; font-size: 30px; color: var(--gold-l); font-variant-numeric: lining-nums tabular-nums; }
.countdown span { font-family: var(--caps); font-size: 8.5px; letter-spacing: .18em; opacity: .7; }

/* =========================================================
   CHAPITRE III — le bal (programme)
   ========================================================= */
.tl-wrap { position: relative; margin-top: 30px; }
.tl-line { position: absolute; left: 50%; top: 28px; bottom: 28px; width: 1px; margin-left: -.5px; background: rgba(143, 109, 47, .25); }
.tl-fill { position: absolute; inset: 0; background: linear-gradient(var(--gold-l), var(--gold), var(--rose)); transform-origin: 50% 0; transform: scaleY(0); }
.timeline { list-style: none; position: relative; }
.tl-item { display: grid; grid-template-columns: 1fr 62px 1fr; align-items: center; padding: 14px 0; }
.tl-item > * { grid-row: 1; }
.tl-item time { grid-column: 1; text-align: right; padding-right: 12px; font-family: var(--serif); font-style: italic; font-size: 27px; color: var(--rose); font-variant-numeric: lining-nums; }
.bud { grid-column: 2; justify-self: center; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--parch); box-shadow: 0 0 0 1px rgba(143, 109, 47, .4); transition: box-shadow .6s, background .6s; }
.bud svg { width: 30px; height: 42px; color: var(--gold-d); transform: scale(.35) rotate(-40deg); opacity: .5; transition: transform .9s cubic-bezier(.3, 1.6, .5, 1), opacity .5s, color .5s; }
.tl-item.is-on .bud { background: var(--night-2); box-shadow: 0 0 0 1px var(--gold), 0 0 0 6px rgba(201, 164, 90, .18), 0 0 20px rgba(201, 74, 92, .35); }
.tl-item.is-on .bud svg { transform: none; opacity: 1; color: var(--gold-l); }
.tl-body { grid-column: 3; text-align: left; padding-left: 12px; }
.tl-body h3 { font-family: var(--caps); font-weight: 500; font-size: 13px; letter-spacing: .12em; }
.tl-body p { font-family: var(--tale); font-size: 16px; line-height: 1.35; color: var(--ink-soft); margin-top: 4px; }
.tl-item:nth-child(even) time { grid-column: 3; text-align: left; padding: 0 0 0 12px; }
.tl-item:nth-child(even) .tl-body { grid-column: 1; text-align: right; padding: 0 12px 0 0; }

/* =========================================================
   CHAPITRE IV — le château
   ========================================================= */
.castle { position: relative; margin: 22px auto 6px; max-width: 380px; }
.castle-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 190px 190px 6px 6px; box-shadow: 0 0 0 1px var(--gold), 0 0 0 7px var(--night-2), 0 0 0 8px rgba(201, 164, 90, .4), 0 24px 50px rgba(0, 0, 0, .5); }
.castle-img + .castle-svg { display: none; }
.castle-svg { width: 100%; height: auto; overflow: visible; }
.castle-body { fill: #070b18; stroke: rgba(201, 164, 90, .55); stroke-width: 1; }
.moon { fill: #f6ecd0; filter: drop-shadow(0 0 14px rgba(246, 236, 208, .7)); }
.wins rect, .wins path { fill: #ffd27a; opacity: .08; transition: opacity .6s, filter .6s; }
.wins .on { opacity: 1; filter: drop-shadow(0 0 4px #ffcf6a); }
.venue-name { font-family: var(--deco); font-weight: 400; font-size: 24px; color: var(--gold-l); margin-top: 18px; }
.venue-addr { font-family: var(--tale); font-size: 18px; line-height: 1.5; opacity: .85; margin-top: 6px; }
.btn-row { display: flex; justify-content: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; font-family: var(--caps); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; border-radius: 2px; transition: transform .25s; }
.btn:active { transform: scale(.97); }
.btn--gold { background: var(--gold-grad); background-size: 160% 100%; color: var(--night); }
.btn--gold::after, .btn--rose::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); animation: sweep 4s ease-in-out infinite; }
@keyframes sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn--line { border: 1px solid var(--gold); color: var(--gold-l); }
.btn--dark { color: var(--rose); border-color: var(--rose); }
.btn--rose { background: linear-gradient(160deg, #b8293f, var(--rose) 60%, #6e1022); color: var(--parch); }
.btn--block { width: 100%; }
.map { position: relative; height: 210px; margin-top: 24px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(201, 164, 90, .5); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.4) sepia(.2) brightness(.95); }
.map-shield { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; font-family: var(--serif); font-size: 14px; color: var(--parch); background: linear-gradient(180deg, transparent 55%, rgba(13, 20, 40, .8)); }

/* =========================================================
   CHAPITRE V — tenue de bal
   ========================================================= */
.portraits { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.portraits figure { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 60px; }
.portraits span {
  width: 50px; height: 64px; border-radius: 50%;
  background: radial-gradient(ellipse at 35% 30%, rgba(255, 255, 255, .35), transparent 45%), var(--c);
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px var(--parch), 0 0 0 6px rgba(143, 109, 47, .45), 0 10px 18px rgba(43, 33, 24, .25);
}
.portraits figcaption { font-family: var(--caps); font-size: 9px; letter-spacing: .14em; color: var(--ink-soft); }

/* =========================================================
   CHAPITRE VI — la lettre (RSVP)
   ========================================================= */
.letter {
  position: relative; margin-top: 30px; padding: 40px 26px 30px; text-align: left;
  background: var(--paper), linear-gradient(170deg, #fbf4e2, var(--parch) 60%, #e9dab7);
  color: var(--ink);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
}
.letter .cc { color: var(--gold-d); width: 30px; height: 30px; }
.letter .cc--tl { top: 10px; left: 10px; }
.letter .cc--tr { top: 10px; right: 10px; transform: scaleX(-1); }
.letter .cc--bl { bottom: 10px; left: 10px; transform: scaleY(-1); }
.letter .cc--br { bottom: 10px; right: 10px; transform: scale(-1); }
.letter-head { font-family: var(--script); font-size: 32px; color: var(--rose); margin-bottom: 14px; }
.field { display: block; border: 0; margin-bottom: 20px; }
.field > span, .field legend { display: block; font-family: var(--caps); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-d); margin-bottom: 8px; }
.field input[type="text"], .field textarea { width: 100%; font: italic 400 19px var(--tale); color: var(--ink); background: transparent; border: 0; border-bottom: 1px dashed rgba(143, 109, 47, .55); padding: 6px 2px; border-radius: 0; outline: none; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(43, 33, 24, .35); }
.field input:focus, .field textarea:focus { border-bottom-style: solid; border-color: var(--rose); }
.pills { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pills--3 { grid-template-columns: repeat(3, 1fr); }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 4px; border: 1px solid rgba(143, 109, 47, .45); font-family: var(--tale); font-size: 17px; transition: background .3s, color .3s; }
.pill input:checked + span { background: var(--rose); color: var(--parch); border-color: var(--rose); }
.pill input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.stepper { display: flex; align-items: center; width: fit-content; border: 1px solid rgba(143, 109, 47, .45); }
.stepper button { width: 46px; height: 44px; font-size: 22px; color: var(--rose); }
.stepper output { width: 50px; text-align: center; font-size: 22px; border-left: 1px solid rgba(143, 109, 47, .45); border-right: 1px solid rgba(143, 109, 47, .45); line-height: 44px; font-variant-numeric: lining-nums; }
.if-yes { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .5s ease, opacity .4s; }
.if-yes-inner { overflow: hidden; min-height: 0; }
.if-yes.is-hidden { grid-template-rows: 0fr; opacity: 0; }
.form-error { color: var(--rose); font-style: italic; margin: -6px 0 12px; }
.sealed { text-align: center; padding: 10px 0; }
.env { position: relative; width: 220px; height: 150px; margin: 10px auto 22px; }
.env-back { position: absolute; inset: 0; background: #dcc89c; }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 90px; background: #e8d6ac; clip-path: polygon(0 0, 100% 0, 50% 100%); z-index: 2; transform-origin: 50% 0; }
.env-front { position: absolute; inset: 0; background: linear-gradient(160deg, #efe0bb, #dcc89c); clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%); z-index: 1; }
.env-seal { position: absolute; z-index: 3; left: 50%; top: 52px; width: 62px; height: 62px; margin-left: -31px; filter: drop-shadow(0 6px 8px rgba(58, 7, 18, .45)); }
.sealed-title { font-family: var(--script); font-size: 34px; line-height: 1.15; color: var(--rose); }
.sealed-text { font-family: var(--tale); font-size: 18px; color: var(--ink-soft); margin: 6px 0 4px; }
.sealed .link-btn { color: var(--gold-d); }

/* =========================================================
   ÉPILOGUE
   ========================================================= */
.finale { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
.cloche { position: relative; width: 190px; margin: 10px auto 18px; }
.cloche-img { width: 100%; height: auto; filter: drop-shadow(0 18px 24px rgba(43, 33, 24, .35)); }
.cloche-img + .cloche-svg { display: none; }
.cloche-svg { width: 160px; height: 220px; margin: 0 auto; overflow: visible; }
.cloche-svg .glass { fill: url(#g-glass); }
.cloche-rose { color: var(--rose); filter: drop-shadow(0 0 8px rgba(201, 74, 92, .55)); }
.finale .btn { margin-top: 26px; }
.final-names { font-family: var(--caps); font-size: 11px; letter-spacing: .3em; color: var(--gold-d); margin-top: 40px; }
.fin { font-family: var(--script); font-size: 46px; color: var(--ink); margin-top: 26px; }

/* =========================================================
   FX
   ========================================================= */
.sparkles { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.fx i { position: absolute; width: 10px; height: 13px; border-radius: 80% 10% 80% 10%; background: linear-gradient(135deg, #d0566a, var(--rose)); will-change: transform, opacity; }
.fx i.gold { width: 5px; height: 5px; border-radius: 50%; background: #ffe6a8; box-shadow: 0 0 6px 2px rgba(255, 214, 140, .8); }
.progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--gold-grad); transform-origin: 0 50%; transform: scaleX(0); }

.js-anim [data-reveal], .js-anim [data-stagger] > *, .js-anim .intro-end > * { opacity: 0; }
.js-anim .title { clip-path: inset(-30% 100% -30% 0); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (min-width: 520px) { .sec { padding-left: 40px; padding-right: 40px; } }
@media (max-width: 360px) {
  .mirror { transform: scale(.9); }
  .countdown div { width: 64px; }
  .portraits span { width: 44px; height: 56px; }
  .tl-item time { font-size: 23px; }
}

/* ---------- éléments Gemini détourés ---------- */
.el--corner { top: -34px; left: -30px; width: 56%; }
.el--letter { top: -74px; right: -36px; left: auto; width: 52%; scale: -1 1; z-index: 7 !important; }
.story .title, .story .chap { position: relative; z-index: 7; }

/* miroir réel (image) : la brume et la date se posent dans la glace */
.mirror-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .55)); pointer-events: none; }
.mirror.has-img { width: 230px; height: 455px; }
.mirror.has-img .mirror-frame { display: none; }
.mirror.has-img .mirror-glass { z-index: 2; left: 21%; top: 15.2%; width: 58%; height: 40.4%; }
.mirror.has-img .mirror-date b { font-size: 64px; }
.mirror.has-img .mirror-date span { font-size: 28px; }
