/* ============================================================
   Annonce-naissance — Bleu nuit & crème
   Poétique, doux, éditorial
   ============================================================ */

:root {
  --ink: oklch(0.22 0.045 255);
  --ink-soft: oklch(0.32 0.04 255);
  --ink-deep: oklch(0.16 0.05 260);
  --cream: oklch(0.965 0.015 85);
  --cream-warm: oklch(0.94 0.02 80);
  --cream-deep: oklch(0.88 0.025 80);
  --gold: oklch(0.72 0.08 80);
  --gold-soft: oklch(0.82 0.05 85);
  --mute: oklch(0.55 0.03 255);

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --script: "Italianno", "Pinyon Script", cursive;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body {
  position: relative;
}

/* ---------- Decorative starfield ------------------------------ */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(1px 1px at 12% 18%, var(--cream) 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 62%, var(--cream) 50%, transparent 51%),
    radial-gradient(1px 1px at 42% 8%, var(--cream) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 68% 44%, var(--gold-soft) 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 73%, var(--cream) 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 22%, var(--cream) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 88%, var(--cream) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 34% 35%, var(--gold-soft) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 78%, var(--cream) 50%, transparent 51%),
    radial-gradient(1px 1px at 74% 14%, var(--cream) 50%, transparent 51%);
  background-size: 100% 100%;
}

/* ---------- Main horizontal rail ------------------------------ */
.rail {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }

.scene {
  flex: 0 0 100vw;
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 6vw;
}

/* ---------- Shared type scale --------------------------------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
}
.overline {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.55;
}
.script {
  font-family: var(--script);
  font-weight: 400;
  line-height: 0.9;
}
.display {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1;
}
.body {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--cream);
  opacity: 0.88;
  text-wrap: pretty;
}
.meta {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.5;
}
.rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
  border: 0;
}
.rule-cream {
  width: 100%;
  height: 1px;
  background: var(--cream);
  opacity: 0.12;
  border: 0;
}

/* ---------- Reveal animation --------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.scene.is-active .reveal { opacity: 1; transform: none; }
.scene.is-active .r-1 { transition-delay: 0.05s; }
.scene.is-active .r-2 { transition-delay: 0.18s; }
.scene.is-active .r-3 { transition-delay: 0.32s; }
.scene.is-active .r-4 { transition-delay: 0.46s; }
.scene.is-active .r-5 { transition-delay: 0.6s; }
.scene.is-active .r-6 { transition-delay: 0.74s; }
.scene.is-active .r-7 { transition-delay: 0.88s; }

/* ---------- Placeholder imagery ------------------------------ */
.ph {
  background-color: var(--cream);
  background-image:
    repeating-linear-gradient(
      135deg,
      oklch(0.88 0.03 80) 0 2px,
      transparent 2px 11px
    );
  color: var(--ink);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.ph::after {
  content: attr(data-label);
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--ink-soft);
  opacity: 0.7;
}

/* ============================================================
   Scene 01 — Hero / annonce principale
   ============================================================ */
.scene-hero {
  flex-direction: column;
  text-align: center;
  gap: 28px;
}
.scene-hero .brand {
  position: absolute;
  top: 4vh;
  left: 0; right: 0;
  text-align: center;
}
.scene-hero .script-hello {
  font-size: clamp(54px, 7vw, 96px);
  color: var(--gold-soft);
}
.scene-hero .name {
  font-size: clamp(72px, 14vw, 200px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 0.95;
}
.scene-hero .name em {
  font-family: var(--script);
  font-style: normal;
  font-weight: 400;
  font-size: 1.1em;
  color: var(--gold-soft);
  letter-spacing: 0;
}
.scene-hero .date-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 0.8;
}
.scene-hero .date-line::before,
.scene-hero .date-line::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--cream);
  opacity: 0.5;
}
.scene-hero .sub {
  font-size: 16px;
  letter-spacing: 0.2em;
  opacity: 0.55;
  text-transform: uppercase;
}
.scene-hero .scroll-cue {
  position: absolute;
  bottom: 4vh;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  opacity: 0.45;
  animation: pulse 3s ease-in-out infinite;
}
.scene-hero .scroll-cue::after {
  content: "Faire défiler  →";
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: translateX(0); }
  50% { opacity: 0.7; transform: translateX(6px); }
}

/* ============================================================
   Scene 02 — Détails naissance
   ============================================================ */
.scene-stats {
  justify-content: flex-start;
}
.stats-wrap {
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
.stats-lead .script-h {
  font-size: clamp(60px, 7vw, 110px);
  color: var(--gold-soft);
  margin-bottom: 8px;
}
.stats-lead .title {
  font-size: clamp(40px, 5vw, 72px);
  margin-bottom: 32px;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid oklch(0.96 0.015 85 / 0.15);
  border-left: 1px solid oklch(0.96 0.015 85 / 0.15);
}
.stat {
  padding: 32px 28px;
  border-right: 1px solid oklch(0.96 0.015 85 / 0.15);
  border-bottom: 1px solid oklch(0.96 0.015 85 / 0.15);
}
.stat .k {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 10px;
}
.stat .v {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
}
.stat .u {
  font-family: var(--sans);
  font-size: 12px;
  opacity: 0.6;
  margin-left: 4px;
  letter-spacing: 0.05em;
}

/* ============================================================
   Scene 03 — Photos (triptyque)
   ============================================================ */
.scene-photos {
  flex-direction: column;
  gap: 40px;
}
.scene-photos .header {
  text-align: center;
}
.scene-photos .header .script-h {
  font-size: clamp(70px, 8vw, 120px);
  color: var(--gold-soft);
}
.triptych {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  height: 58vh;
}
.triptych .ph { width: 100%; height: 100%; }
.triptych .ph:nth-child(1) { transform: translateY(24px); }
.triptych .ph:nth-child(3) { transform: translateY(-16px); }

/* ============================================================
   Scene 04 — Mot des parents
   ============================================================ */
.scene-words {
  justify-content: center;
}
.words-wrap {
  max-width: 760px;
  text-align: center;
}
.words-wrap .mark {
  font-family: var(--script);
  font-size: 140px;
  color: var(--gold-soft);
  line-height: 0.6;
  margin-bottom: 20px;
}
.words-wrap p {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.55;
  font-weight: 300;
  font-style: italic;
  text-wrap: balance;
}
/* Preserve user-entered line breaks when parentsNote comes from the admin
   textarea; single-paragraph prose still renders fine (lone \n collapse to
   a single space is the pre-line default). */
.parents-note { white-space: pre-line; }
.words-wrap .signed {
  margin-top: 36px;
  font-family: var(--script);
  font-size: 52px;
  color: var(--gold-soft);
}

/* ============================================================
   Scene 05 — Famille / arbre
   ============================================================ */
.scene-family { justify-content: center; }
.family-wrap {
  max-width: 1100px;
  width: 100%;
  text-align: center;
}
.family-wrap .title {
  font-size: clamp(42px, 5vw, 68px);
  margin-bottom: 8px;
}
.family-wrap .script-h {
  font-family: var(--script);
  font-size: clamp(48px, 6vw, 80px);
  color: var(--gold-soft);
  margin-bottom: 48px;
}
.tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  position: relative;
}
.tree-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  position: relative;
}
.tree-line {
  width: 1px;
  height: 36px;
  background: oklch(0.72 0.08 80 / 0.5);
}
.tree-line-h {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 1px;
  background: oklch(0.72 0.08 80 / 0.5);
}
.node {
  text-align: center;
}
.node .rel {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 6px;
}
.node .name {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.02em;
}
.node.child .name {
  font-family: var(--script);
  font-size: 58px;
  color: var(--gold-soft);
  line-height: 1;
}

/* ============================================================
   Scene 06 — Chronologie
   ============================================================ */
.scene-timeline { justify-content: center; }
.timeline-wrap { max-width: 1100px; width: 100%; }
.timeline-wrap .title {
  font-size: clamp(40px, 5vw, 64px);
  margin-bottom: 6px;
}
.timeline-wrap .script-h {
  font-family: var(--script);
  font-size: clamp(46px, 5.5vw, 76px);
  color: var(--gold-soft);
  margin-bottom: 50px;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: relative;
  padding-top: 18px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6%;
  right: 6%;
  height: 1px;
  background: oklch(0.96 0.015 85 / 0.15);
}
.tick {
  position: relative;
  padding: 28px 12px 0;
  text-align: left;
}
.tick::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  width: 13px;
  height: 13px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--ink);
  transform: translateY(0);
}
.tick.now::before {
  background: var(--gold);
}
.tick .date {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.tick .label {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.3;
  opacity: 0.9;
}

/* ============================================================
   Scene 07 — Galerie
   ============================================================ */
.scene-gallery { flex-direction: column; gap: 36px; }
.scene-gallery .header { text-align: center; }
.scene-gallery .header .script-h {
  font-size: clamp(64px, 7vw, 100px);
  color: var(--gold-soft);
}
.gallery {
  display: block;
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}
.gallery .ph {
  width: calc(33.333% - 8px);
  margin-bottom: 12px;
  float: left; /* Masonry picks up the default block flow; float is a harmless hint for no-JS fallback. */
  height: auto;
}
@media (max-width: 820px) {
  .gallery .ph { width: calc(50% - 6px); }
}
@media (max-width: 520px) {
  .gallery .ph { width: 100%; }
}
.gallery .ph > img,
.gallery .ph > picture > img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   Scene 09 — Liste de naissance
   ============================================================ */
.scene-registry { justify-content: center; }
.reg-wrap {
  max-width: 1100px;
  width: 100%;
}
.reg-head {
  text-align: center;
  margin-bottom: 48px;
}
.reg-head .script-h {
  font-family: var(--script);
  font-size: clamp(56px, 6.5vw, 92px);
  color: var(--gold-soft);
  line-height: 0.9;
}
.reg-head .title {
  font-size: clamp(32px, 3.5vw, 48px);
  margin-top: 6px;
}
.reg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.gift {
  border: 1px solid oklch(0.96 0.015 85 / 0.15);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.3s var(--ease);
}
.gift:hover { border-color: oklch(0.72 0.08 80 / 0.5); }
.gift .ph {
  height: 140px;
  width: 100%;
}
.gift .g-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  line-height: 1.2;
}
.gift .g-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
}
.gift .g-status {
  color: var(--gold);
}
.gift.taken { opacity: 0.55; }
.gift.taken .g-status { color: var(--cream); opacity: 0.6; }
.gift.taken .g-name { text-decoration: line-through; text-decoration-thickness: 0.5px; }

/* ============================================================
   Scene 10 — Infos pratiques
   ============================================================ */
.scene-info { justify-content: center; }
.info-wrap {
  max-width: 1000px;
  width: 100%;
}
.info-head {
  text-align: center;
  margin-bottom: 48px;
}
.info-head .script-h {
  font-family: var(--script);
  font-size: clamp(56px, 6.5vw, 92px);
  color: var(--gold-soft);
  line-height: 0.9;
}
.info-head .title {
  font-size: clamp(32px, 3.5vw, 48px);
  margin-top: 6px;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
.info-card {
  border-top: 1px solid var(--gold);
  padding-top: 24px;
}
.info-card .label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.info-card .value {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 300;
  line-height: 1.3;
  margin-bottom: 10px;
}
.info-card .note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  opacity: 0.7;
  line-height: 1.5;
}

/* ============================================================
   Scene 11 — Remerciements (final)
   ============================================================ */
.scene-end {
  flex-direction: column;
  text-align: center;
  gap: 24px;
}
.scene-end .script-h {
  font-family: var(--script);
  font-size: clamp(100px, 14vw, 220px);
  color: var(--gold-soft);
  line-height: 0.85;
}
.scene-end .sig {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 0.7;
}
.scene-end .mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-top: 40px;
}

/* ============================================================
   Chrome — navigation, progress, music, tweaks
   ============================================================ */
.chrome-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 30px;
  pointer-events: none;
}
.chrome-top > * { pointer-events: auto; }
.wordmark {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  opacity: 0.8;
}
.wordmark .dot { color: var(--gold); }

.music-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid oklch(0.96 0.015 85 / 0.25);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 9px 16px;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.3s var(--ease);
}
.music-btn:hover { border-color: var(--gold); color: var(--gold); }
.music-btn .bars {
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
  height: 10px;
}
.music-btn .bars span {
  display: block;
  width: 2px;
  background: currentColor;
  height: 40%;
  animation: none;
  border-radius: 1px;
}
.music-btn.playing .bars span {
  animation: barPulse 1.1s ease-in-out infinite;
}
.music-btn.playing .bars span:nth-child(1) { animation-delay: 0s; }
.music-btn.playing .bars span:nth-child(2) { animation-delay: 0.15s; }
.music-btn.playing .bars span:nth-child(3) { animation-delay: 0.3s; }
.music-btn.playing .bars span:nth-child(4) { animation-delay: 0.45s; }
@keyframes barPulse {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

.chrome-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 30px;
  gap: 20px;
  pointer-events: none;
}
.chrome-bottom > * { pointer-events: auto; }

.progress {
  flex: 1;
  display: flex;
  gap: 6px;
  max-width: 560px;
}
.progress .seg {
  flex: 1;
  height: 2px;
  background: oklch(0.96 0.015 85 / 0.15);
  cursor: pointer;
  transition: background 0.3s var(--ease);
  position: relative;
}
.progress .seg:hover { background: oklch(0.96 0.015 85 / 0.3); }
.progress .seg.active { background: var(--gold); }
.progress .seg.done { background: oklch(0.72 0.08 80 / 0.4); }

.nav-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid oklch(0.96 0.015 85 / 0.25);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease);
}
.nav-btn:hover { border-color: var(--gold); color: var(--gold); }
.nav-btn:disabled { opacity: 0.2; cursor: not-allowed; }
.nav-btn svg { width: 14px; height: 14px; }

.scene-count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  opacity: 0.55;
  min-width: 54px;
  text-align: center;
}

/* Scene index badge */
.scene-badge {
  position: absolute;
  top: 5vh;
  left: 6vw;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  opacity: 0.35;
}

/* Responsive */
@media (max-width: 900px) {
  .stats-wrap { grid-template-columns: 1fr; gap: 32px; }
  .triptych { grid-template-columns: 1fr; height: auto; }
  .triptych .ph { height: 28vh; transform: none !important; }
  .reg-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .timeline::before { display: none; }
  .tree-row { gap: 24px; }
}

/* ---- Photos (real content) --------------------------------
   Only applies when the .ph element actually contains an image.
   Empty .ph keeps the cream-hatched placeholder rule defined at
   the top of this file (with its data-label rendered via ::after). */
.ph:has(> img), .ph:has(> picture) {
  background: oklch(0.22 0.045 255);
  background-image: none;
}
.ph:has(> img)::after, .ph:has(> picture)::after { content: none; }
.ph > img, .ph > picture > img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ---- Gift reservation modal ------------------------------- */
.gift-modal {
  border: 0;
  padding: 32px;
  background: oklch(0.22 0.045 255);
  color: var(--cream);
  max-width: 440px;
  width: min(440px, 90vw);
  border-radius: 4px;
  font-family: var(--serif);
  /* The global `* { margin: 0 }` reset (line 25) kills the UA default
     `dialog[open] { margin: auto }` that centers the dialog. Reinstate it. */
  margin: auto;
}
.gift-modal::backdrop { background: rgba(10,12,20,.75); }
.gift-modal h3 { font-weight: 300; font-size: 28px; }
.gift-modal-range { color: var(--gold); font-size: 14px; letter-spacing: .2em; margin: 6px 0 18px; text-transform: uppercase; }
.gift-modal label { display:block; font-size: 15px; opacity:.85; margin-top: 16px; }
.gift-modal input, .gift-modal textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid oklch(0.96 0.015 85 / 0.3);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 17px;
  padding: 6px 2px;
  width: 100%;
  /* Replace the browser's default focus rectangle (which bled over the label
     text above) with a gold underline that matches the modal's accent. */
  outline: none;
  transition: border-bottom-color 120ms;
}
.gift-modal input:focus, .gift-modal textarea:focus {
  border-bottom-color: var(--gold);
}
/* Kill the global keyboard focus-ring (styles.css:976-985) specifically
   inside the gift modal — the outline-offset: 4px rectangle bled over
   the label text above. The gold border-bottom above is our focus
   indicator instead. Specificity (0,2,1) > the global (0,1,1). */
.gift-modal input:focus-visible, .gift-modal textarea:focus-visible {
  outline: none;
}
.gift-modal textarea { resize: vertical; }
.gift-modal-actions { display:flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.gift-modal-actions button {
  background: transparent; color: var(--cream); border: 1px solid oklch(0.96 0.015 85 / 0.3);
  padding: 10px 18px; font-family: var(--serif); font-size: 16px; cursor: pointer; border-radius: 2px;
}
.gift-modal-actions button.primary { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.gift-modal-actions button[disabled] { opacity:.4; cursor: not-allowed; }
.gift-modal-error { color: oklch(0.76 0.1 25); font-style: italic; margin-top: 16px; font-size: 14px; }

/* ============================================================
   Mobile — vertical feed (M2)
   ============================================================ */
@media (max-width: 820px) {
  html, body { overflow: auto; }
  .rail {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    height: auto;
    min-height: 100svh;
  }
  .scene {
    flex: 0 0 auto;
    width: 100vw;
    height: auto;
    min-height: 100svh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    align-items: flex-start;
    padding: 72px 6vw 88px;
  }
  .scene-hero, .scene-words, .scene-end { align-items: center; }
  .chrome-top {
    padding: 14px 16px;
    gap: 10px;
    background: linear-gradient(to bottom, var(--bg) 40%, transparent);
  }
  .chrome-bottom {
    bottom: 0;
    padding: 14px 16px 18px;
    gap: 12px;
    background: linear-gradient(to top, var(--bg) 40%, transparent);
  }
  .wordmark { font-size: 11px; letter-spacing: 0.3em; }
  .music-btn { font-size: 9px; letter-spacing: 0.2em; padding: 7px 12px; gap: 6px; }
  .scene-badge { top: 42px; font-size: 11px; }
  .scene-hero .scroll-cue { bottom: 80px; }
  .scene-hero .scroll-cue::after { content: "Faire défiler ↓"; }
  .triptych { grid-template-columns: 1fr; gap: 16px; }
  .triptych .ph { height: auto; aspect-ratio: 4 / 3; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .tree-row { flex-direction: column; gap: 20px; }

  .scene-count { font-size: 12px; }
  .nav-btn { width: 36px; height: 36px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .rail { scroll-behavior: auto; scroll-snap-type: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   Focus ring — visible outline for keyboard navigation
   ============================================================ */
button, a, input, textarea, select { outline: none; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.seg:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}
