/* Le Déclic Photobooth — v6 « La borne en arrière-plan » (31 octobre 2026)
   Direction v4b conservée : polices, palette, ton. Ce qui change : une grande borne 3D fixe derrière la page,
   le texte à gauche, la borne à droite.
   Polices locales (OFL) : Fraunces pour l'affichage, Karla pour le texte.
   Palette : #e8e3df fond · #f4eee7 surface · #5d1f2a encre · #a85a34 filet · #8a4a28 sur-titres · #2b1418 scène sombre. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/fraunces-latin-full-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/karla-latin-wght-normal.woff2') format('woff2');
}

:root {
  --canvas: #e8e3df;
  --surface: #f4eee7;
  --ink: #5d1f2a;
  --ink-soft: #74404b;
  --filet: #a85a34;
  --eyebrow: #8a4a28;
  --scene: #2b1418;
  --hover: #46161f;
  --border: rgba(93, 31, 42, .16);
  --border-strong: rgba(93, 31, 42, .32);
  --contour: #8f6871;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Karla', system-ui, sans-serif;
  --gouttiere: clamp(20px, 5vw, 72px);
  --col: min(50vw, 640px);
  --courbe: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--filet); outline-offset: 3px; border-radius: 2px; }
.sequence :focus-visible, .site-foot :focus-visible { outline-color: #f4eee7; }

.skip {
  position: absolute; left: 0; top: 0; z-index: 60;
  width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  background: var(--ink); color: var(--surface);
}
.skip:focus { width: auto; height: auto; clip-path: none; overflow: visible; left: 8px; top: 8px; padding: 10px 16px; }

/* ---------- la scène : fixe derrière tout ---------- */
.fond {
  position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100lvh; z-index: 0; overflow: hidden;
  background: radial-gradient(58% 72% at 72% 54%, #f7f2ec 0%, #efe9e3 46%, var(--canvas) 100%);
}
.fond::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(62% 80% at 72% 50%, #4a1f28 0%, var(--scene) 62%, #1d0d10 100%);
  opacity: var(--ombre, 0);
  pointer-events: none;
}
.fond-toile {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity 1s ease;
}
.fond-affiche {
  position: absolute; z-index: 1;
  right: clamp(-40px, 2vw, 40px); top: 50%;
  width: auto; height: min(100vh, 58vw); max-width: none;
  transform: translateY(-50%);
  transition: opacity .7s ease;
}
/* L'affiche attend : la borne apparaît d'un seul geste quand elle arrive vite ; sinon l'affiche prend la place.
   Sans JS, sans WebGL ou en mouvement réduit, elle est là tout de suite. */
.fond-affiche { opacity: 0; animation: affiche-tardive .7s ease 2.2s forwards; }
@keyframes affiche-tardive { to { opacity: 1; } }
.sans-scene .fond-affiche, .attente .fond-affiche { opacity: 1; animation: none; }
.borne-prete .fond-toile { opacity: 1; }
.borne-prete .fond-affiche { opacity: 0; animation: none; }
.sans-borne .fond { display: none; }

.eclair {
  position: fixed; inset: 0; z-index: 40; background: #fffaf3; opacity: 0; pointer-events: none;
}
.eclair.actif { animation: eclair .75s ease-out; }
@keyframes eclair { 0% { opacity: 0; } 7% { opacity: .96; } 100% { opacity: 0; } }

/* le déclencheur reste à portée de main pendant la visite */
.declencheur {
  position: fixed; right: clamp(18px, 2.6vw, 36px); bottom: clamp(18px, 3vh, 32px); z-index: 30;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--surface); background: var(--ink); border: 0; border-radius: 40px;
  padding: 13px 22px 13px 14px; cursor: pointer;
  box-shadow: 0 10px 28px rgba(43, 20, 24, .22);
  transition: background-color .18s ease, opacity .3s ease, transform .3s var(--courbe), visibility .3s;
}
.declencheur:hover { background: var(--hover); }
.declencheur .pastille {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--surface);
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 10px var(--surface);
}
.declencheur.range, .declencheur.sur-sombre { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(10px); }

/* ---------- en-tête ---------- */
.site-head {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 30px;
  padding: 22px var(--gouttiere);
}
.site-head .logo-link { display: inline-flex; flex: none; line-height: 0; }
.site-head .logo-link img { width: 196px; height: auto; display: block; }
.site-head nav { display: flex; align-items: center; gap: 28px; margin-left: clamp(10px, 2.6vw, 44px); }
.site-head nav a {
  font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; white-space: nowrap;
  text-decoration: none; padding: 6px 0 4px; border-bottom: 1px solid transparent;
  transition: border-color .18s ease-out;
}
.site-head nav a:hover, .site-head nav a[aria-current="page"] { border-bottom-color: var(--filet); }
.head-cta {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  text-decoration: none; padding: 11px 20px; border: 1px solid var(--ink); color: var(--ink);
  margin-left: auto; background: #f7f2ec;
  transition: background-color .18s ease, color .18s ease;
}
@media (hover: hover) { .head-cta:hover { background: var(--ink); color: var(--surface); } }

/* ---------- contenu : colonne de gauche, la droite appartient à la borne ---------- */
main { position: relative; z-index: 2; }
.borne-prete main { touch-action: pan-y; }
.avec-borne.borne-prete main { cursor: grab; }
.glisse, .glisse main { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.borne-prete .col, .borne-prete .fiche { cursor: auto; }

.ecran {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: clamp(60px, 9vh, 110px) var(--gouttiere);
}
.ouverture { min-height: calc(100vh - 100px); padding-top: clamp(20px, 4vh, 48px); }
.col { width: var(--col); max-width: 100%; }

.label {
  display: block; font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--eyebrow);
  margin-bottom: 18px; max-width: none;
}
h1 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "wght" 540, "SOFT" 0, "WONK" 0;
  font-weight: 540;
  font-size: clamp(38px, 4.9vw, 74px);
  line-height: 1.03;
  letter-spacing: -.018em;
  text-wrap: balance;
}
h2 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 110, "wght" 540;
  font-weight: 540;
  font-size: clamp(29px, 3.2vw, 46px);
  line-height: 1.08; letter-spacing: -.012em;
  text-wrap: balance;
}
h2.label {
  font-family: var(--sans); font-size: 12px; font-weight: 700; line-height: 1.5; letter-spacing: .16em;
  font-variation-settings: normal;
}
h2.petit { font-size: 22px; margin-top: 34px; }
.chapeau { margin-top: clamp(20px, 2.6vw, 30px); font-size: clamp(17px, 1.32vw, 20px); line-height: 1.58; max-width: 48ch; }
.accroche { font-family: var(--serif); font-size: 21px; font-variation-settings: "opsz" 40, "wght" 440; line-height: 1.3; margin-top: 14px; max-width: 34ch; }
.body { max-width: 52ch; margin-top: 20px; }
.body p + p { margin-top: 14px; }
p { text-wrap: pretty; }

.actions { display: flex; gap: 12px; margin-top: clamp(26px, 3.2vw, 38px); flex-wrap: wrap; }
.btn {
  display: inline-block; font-family: var(--sans); cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; padding: 17px 28px; border-radius: 1px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn.p { background: var(--ink); color: var(--surface); border: 1px solid var(--ink); }
@media (hover: hover) { .btn.p:hover { background: var(--hover); border-color: var(--hover); } }
.btn.s { background: transparent; color: var(--ink); border: 1px solid var(--border-strong); }
@media (hover: hover) { .btn.s:hover { border-color: var(--ink); } }

.link {
  display: inline-block; margin-top: 14px; padding-top: 5px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; border-bottom: 1px solid var(--filet); padding-bottom: 3px;
  transition: border-color .18s ease-out;
}
.link:hover { border-bottom-color: var(--ink); }
.lien-texte { text-decoration-color: var(--filet); text-underline-offset: 3px; }

.legende-3d {
  margin-top: 22px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--eyebrow); line-height: 1.5;
}

/* ---------- tirages : trois emplacements nommés, jamais meublés ---------- */
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); margin-top: 8px; }
.tirage { display: grid; gap: 12px; align-content: start; }
.tirage .cadre {
  aspect-ratio: 3 / 4.2; background: var(--surface);
  border: 10px solid #faf6f1; border-bottom-width: 34px;
  box-shadow: 0 14px 30px rgba(43, 20, 24, .13), 0 1px 2px rgba(43, 20, 24, .12);
  display: flex; align-items: flex-end; padding: 10px;
}
.tirage:nth-child(1) .cadre { transform: rotate(-1.4deg); }
.tirage:nth-child(2) .cadre { transform: translateY(-8px) rotate(.8deg); }
.tirage:nth-child(3) .cadre { transform: rotate(1.6deg); }
.tirage .cadre span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.35; }
.tirage figcaption { font-size: 13px; color: var(--ink-soft); line-height: 1.42; }

/* ---------- registre : des lignes, pas des cartes ---------- */
.ledger { margin-top: 28px; border-top: 1px solid var(--border-strong); }
.ledger-row { padding: 18px 0; border-bottom: 1px solid var(--border-strong); }
.ledger-row h3 {
  font-family: var(--serif); font-variation-settings: "opsz" 80, "wght" 520;
  font-weight: 520; font-size: 21px; line-height: 1.2; margin-bottom: 4px;
}
.ledger-row p { font-size: 16px; max-width: 52ch; }

.points { list-style: none; margin-top: 22px; border-top: 1px solid var(--border-strong); }
.points li { padding: 12px 0; border-bottom: 1px solid var(--border-strong); max-width: 54ch; }
.liens-suite { list-style: none; }

/* ---------- étapes ---------- */
.steps { list-style: none; counter-reset: s; margin-top: 28px; display: grid; gap: 20px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--serif); font-variation-settings: "opsz" 60; font-weight: 540;
  font-size: 20px; color: var(--eyebrow); line-height: 1.25;
}
.steps strong { display: block; font-weight: 700; }
.steps span { display: block; }
.steps span::first-letter { text-transform: uppercase; }

/* ---------- la séquence du déclic : le fond passe au sombre, le texte reste, la borne agit ---------- */
/* Sans la scène 3D (pas de JS, mouvement réduit, pas de WebGL), c'est une simple bande sombre avec son texte. */
.sequence { position: relative; background: var(--scene); }
.sequence-texte { display: flex; align-items: center; padding: clamp(60px, 9vh, 110px) var(--gouttiere); color: #fdf8f2; }
.temps { display: none; }
.scene-active .sequence { background: none; margin-top: 34vh; }
.scene-active .sequence + .ecran { margin-top: 34vh; }
.scene-active .temps { display: block; height: 125vh; }
.scene-active .sequence-texte {
  position: sticky; top: 0; height: 100vh; margin-bottom: -100vh; padding-block: 0;
  pointer-events: none; opacity: calc((var(--ombre, 0) - .55) * 2.2);
}
.sequence-texte .col { pointer-events: auto; }
.sequence .label { color: #e8b894; }
.sequence h2 { color: #fdf8f2; }
.sequence .body { color: rgba(250, 242, 234, .9); }
.sequence .btn.p { background: #f4eee7; color: var(--scene); border-color: #f4eee7; }
.sequence .btn.s { color: #fdf8f2; border-color: rgba(250, 242, 234, .6); background: var(--scene); }
@media (hover: hover) { .sequence .btn.p:hover { background: #fff; border-color: #fff; } }

/* ---------- le formulaire : une fiche, pas un tableur ---------- */
.formulaire-page { padding-top: 24px; }
.col-large { width: min(56vw, 700px); }
.fiche {
  margin-top: 30px; background: rgba(250, 246, 241, .9);
  padding: clamp(24px, 3vw, 38px); display: grid; gap: 22px;
  box-shadow: 0 24px 60px rgba(43, 20, 24, .1), 0 1px 2px rgba(43, 20, 24, .08);
}
.champs-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.champs-trois { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 22px; align-items: end; }
.champs-trois label { display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: 6px; min-height: 2.8em; }
.champ label, .choix legend {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--eyebrow); margin-bottom: 6px; line-height: 1.35;
}
.option { font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--ink-soft); font-size: 12.5px; }
.champ input, .champ textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--contour); border-radius: 0;
  padding: 8px 0 9px; transition: border-color .18s ease;
}
.champ textarea { border: 1px solid var(--contour); padding: 12px 14px; resize: vertical; margin-top: 4px; }
.champ input:focus, .champ textarea:focus { border-color: var(--ink); }
.champ textarea::placeholder { color: var(--ink-soft); opacity: .8; }
.choix { border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choix legend { width: 100%; margin-bottom: 10px; }
.choix label { position: relative; cursor: pointer; }
.choix input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choix label span {
  display: inline-block; padding: 10px 16px; font-size: 14.5px; line-height: 1.2;
  border: 1px solid var(--contour); border-radius: 40px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
@media (hover: hover) { .choix label:hover span { border-color: var(--ink); } }
.choix input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.choix input:checked + span::before { content: "✓\00a0"; }
@media (forced-colors: active) { .choix input:checked + span { outline: 2px solid Highlight; } }
.choix input:focus-visible + span { outline: 2px solid var(--filet); outline-offset: 2px; }
.envoi { display: flex; align-items: center; gap: 22px; }
.envoi .btn { flex: none; }
.envoi p { font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
.statut { font-size: 15px; line-height: 1.5; }
.statut:not(:empty) { padding: 14px 16px; border-left: 3px solid var(--filet); background: var(--surface); }

/* ---------- la vraie photo : fenêtre native, en plein écran au téléphone ---------- */
.photo {
  margin: auto; width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto;
  border: 0; padding: 24px; background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px rgba(43, 20, 24, .4);
}
.photo::backdrop { background: rgba(43, 20, 24, .62); }
.photo h2 { font-size: 30px; margin-bottom: 12px; outline: 0; }
.photo .actions { margin-top: 20px; }
.photo-erreur { font-size: 15px; line-height: 1.45; }
.photo-erreur:not(:empty) { margin-top: 14px; }
.photo-note { margin-top: 14px; font-size: 14px; }
.photo-cadre { position: relative; aspect-ratio: 1080 / 1320; overflow: hidden; background: var(--scene); }
.photo-cadre video { display: block; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.photo-compte {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-variation-settings: "opsz" 144, "wght" 500; font-size: 140px; color: #fff;
  text-shadow: 0 4px 30px rgba(43, 20, 24, .55);
}
.photo-eclair { position: absolute; inset: 0; background: #fffaf3; opacity: 0; pointer-events: none; }
.photo-eclair.actif { animation: eclair .75s ease-out; }
.photo-tirage { display: block; max-width: 100%; max-height: 50dvh; margin: 0 auto; box-shadow: 0 14px 34px rgba(43, 20, 24, .22); }
.photo-choix { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 16px; font-size: 15.5px; line-height: 1.35; cursor: pointer; }
.photo-choix input { flex: none; width: 22px; height: 22px; accent-color: var(--ink); }
.photo-active { overflow: hidden; }
.photo-confirmation {
  position: fixed; left: 16px; right: 16px; bottom: calc(82px + env(safe-area-inset-bottom, 0px)); z-index: 35;
  width: fit-content; max-width: 420px; margin: 0 auto; padding: 14px 20px;
  font-size: 15.5px; line-height: 1.4; text-align: center; color: #f4eee7; background: var(--ink);
  border: 1px solid rgba(244, 238, 231, .35); box-shadow: 0 14px 34px rgba(43, 20, 24, .3);
  opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .3s ease, transform .3s var(--courbe);
}
.photo-confirmation.visible { opacity: 1; pointer-events: auto; transform: none; }
.photo-confirmation a { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.photo-impression main, .photo-impression .site-head, .photo-impression .site-foot, .photo-impression .declencheur { opacity: 0; pointer-events: none; transition: opacity .4s ease; }

/* ---------- page de texte : centrée, sans borne ---------- */
.page-texte { background: var(--surface); padding: clamp(50px, 7vw, 96px) var(--gouttiere); }
.feuille { max-width: 68ch; margin: 0 auto; }
.feuille h1 { font-size: clamp(34px, 4vw, 54px); margin-bottom: 24px; }
.feuille h2 { font-size: 25px; margin: 34px 0 10px; }
.feuille em { color: var(--ink-soft); }
.feuille p { margin-bottom: 12px; }

/* ---------- pied de page : opaque, il recouvre la scène ---------- */
.site-foot { position: relative; z-index: 3; background: var(--ink); color: var(--surface); padding: clamp(50px, 6vw, 84px) var(--gouttiere) 28px; }
.site-foot .inner { max-width: 1240px; margin: 0 auto; }
.site-foot .foot-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: clamp(24px, 4vw, 54px); }
.foot-logo { display: block; width: 260px; height: auto; margin-bottom: 20px; }
.site-foot h2 { color: var(--surface); font-size: 20px; margin-bottom: 12px; font-variation-settings: "opsz" 80, "wght" 520; }
.site-foot p, .site-foot li { color: rgba(238, 230, 224, .92); font-size: 14.5px; }
.site-foot a { display: inline-block; padding-block: 3px; color: rgba(238, 230, 224, .92); text-decoration: none; border-bottom: 1px solid rgba(232, 227, 223, .34); transition: border-color .18s ease-out; }
.site-foot a:hover { border-bottom-color: var(--surface); }
.site-foot ul { list-style: none; display: grid; gap: 6px; }
.site-foot .foot-bottom {
  margin-top: 44px; padding-top: 18px; border-top: 1px solid rgba(232, 227, 223, .22);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 12px; color: rgba(232, 227, 223, .74);
}

/* ---------- mouvement du texte : visible par défaut, entrée discrète si le JS l'autorise ---------- */
.anime .rise:not(.is-in) { opacity: 0; transform: translateY(14px); }
.anime .rise { transition: opacity .6s var(--courbe), transform .6s var(--courbe); }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .001ms !important; animation: none !important; }
  .eclair { display: none; }
  .fond-affiche { opacity: 1; }
}

/* ---------- écrans étroits : la borne passe en haut, le texte glisse dessus en panneaux ---------- */
@media (max-width: 1200px) {
  :root { --col: 44vw; }
  .col-large { width: 48vw; }
}
@media (max-width: 1080px) {
  /* le logo mène déjà à l'accueil : le menu tient sur une ligne */
  .site-head nav a[href$="/"]:first-child { display: none; }
  .site-head nav { gap: 18px; }
  .site-head .logo-link img { width: 164px; }
  .site-head nav a { letter-spacing: .08em; }
  .head-cta { padding: 10px 14px; font-size: 11.5px; letter-spacing: .08em; }
  .champs-trois { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .site-head { gap: 16px; }
  .site-head .logo-link img { width: 136px; }
  .site-head nav { margin-left: 0; gap: 14px; }
  .site-head nav a { letter-spacing: .05em; font-size: 11.5px; }
  .head-cta { padding: 9px 12px; letter-spacing: .05em; }
}
@media (max-width: 860px) and (orientation: portrait), (max-width: 739px) {
  .site-head { flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px 6px; background: var(--canvas); }
  .site-head .logo-link img { width: 132px; }
  .site-head nav { order: 3; margin-left: 0; width: 100%; gap: 0 14px; flex-wrap: wrap; justify-content: space-between; }
  .site-head nav a { display: inline-block; font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 8px 0; }
  .site-head nav a[href$="/"]:first-child { display: inline-block; }
  .head-cta { margin-left: auto; padding: 8px 11px; font-size: 11px; letter-spacing: .06em; }

  .fond { background: radial-gradient(90% 46% at 50% 30%, #f7f2ec 0%, #efe9e3 52%, var(--canvas) 100%); }
  .fond::after { background: radial-gradient(90% 50% at 50% 32%, #4a1f28 0%, var(--scene) 66%, #1d0d10 100%); }
  .fond-affiche { right: auto; left: 50%; top: 8vh; height: 50vh; transform: translateX(-50%); }

  .ecran { display: block; min-height: 0; padding: 50vh 16px 0; }
  .ouverture { padding-top: 34vh; min-height: 0; }
  .col, .col-large { width: 100%; }
  .col {
    background: rgba(244, 238, 231, .965); padding: 26px 22px 28px;
    box-shadow: 0 16px 40px rgba(43, 20, 24, .1);
  }
  h1 { font-size: clamp(32px, 9vw, 44px); }
  h2 { font-size: 28px; }
  .chapeau { font-size: 16.5px; }
  .actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .btn { text-align: center; }
  .legende-3d { display: none; }

  .strip { grid-template-columns: 1fr; gap: 14px; }
  .tirage { grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
  .tirage .cadre { border-width: 5px; border-bottom-width: 14px; padding: 5px; }
  .tirage figcaption { font-size: 14px; }
  .tirage .cadre span { font-size: 11px; letter-spacing: .04em; }

  .sequence-texte .col { background: none; box-shadow: none; padding: 0; }
  .scene-active .sequence { margin-top: 30vh; }
  .scene-active .sequence + .ecran { margin-top: 20vh; }
  /* 100vh passe sous la barre de Safari : svh est la hauteur quand cette barre est affichée */
  .scene-active .sequence-texte { height: 100vh; height: 100svh; margin-bottom: -100vh; margin-bottom: -100svh; padding: 0 16px 16px; align-items: flex-end; }
  .photo-offerte .sequence .actions { display: none; }
  .photo-offerte.scene-active .sequence-texte { padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
  .sequence .actions { flex-direction: row; flex-wrap: wrap; margin-top: 16px; }
  .sequence .btn.p { flex: 1 0 100%; }
  .sequence .btn.s { flex: 1 1 40%; padding-inline: 8px; }
  .scene-active .sequence-texte .col { background: rgba(43, 20, 24, .9); padding: 22px; }
  .scene-active .temps { height: 100vh; }

  .formulaire-page { padding-top: 34vh; }
  .formulaire-page .col { padding: 22px 16px 24px; }
  .fiche { padding: 18px 14px; background: #faf6f1; }
  .champs-deux, .champs-trois { grid-template-columns: 1fr; gap: 18px; }
  .envoi { flex-direction: column; align-items: stretch; gap: 12px; }

  .photo { width: 100%; max-width: none; height: 100dvh; max-height: none; padding: 20px 16px; }
  .photo .actions { flex-direction: column; }
  /* Sans photo, on touche la borne elle-même : le bouton n'apparaît qu'au clavier.
     Avec la photo, il reste à portée du pouce dès l'arrivée, au-dessus de la barre de Safari. */
  html:not(.photo-offerte) .declencheur:not(:focus-visible) { opacity: 0; pointer-events: none; }
  .photo-offerte .declencheur {
    left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: fit-content; min-height: 52px; margin-inline: auto; padding: 14px 24px 14px 16px; font-size: 13px;
  }
  /* un seul bouton sur téléphone : il reste là sur le fond sombre, en couleurs inversées */
  .photo-offerte .declencheur.sur-sombre:not(.range) {
    opacity: 1; visibility: visible; pointer-events: auto; transform: none; background: #f4eee7; color: var(--scene);
  }
  .photo-offerte .declencheur.sur-sombre .pastille {
    border-color: var(--scene); box-shadow: inset 0 0 0 3px #f4eee7, inset 0 0 0 10px var(--scene);
  }
  /* la barre de Safari laisse voir sous la fenêtre : rien de la page ne doit dépasser */
  .photo-active main, .photo-active .site-foot { visibility: hidden; }
  .site-foot { margin-top: 44vh; }
  .sans-borne .site-foot { margin-top: 0; }
  .site-foot .foot-top { grid-template-columns: 1fr; gap: 26px; }
}
/* petit téléphone : la séquence garde de la place pour voir la borne */
@media (max-width: 739px) and (max-height: 700px) {
  .sequence .body { display: none; }
}
@media (max-width: 359px) {
  .site-head nav a[href$="/"]:first-child { display: none; }
  .site-head nav { justify-content: flex-start; gap: 0 16px; }
}
