/* ══════════════════════════════════════════════════════════════════════
   Bon cadeau · Maison Hermine
   Même maison que le site : braise, or, crème, Newsreader + Archivo.
   Parti pris : on achète comme on choisit une carte posée sur la table
   à la bougie. Le fond reste sombre, le bon (en crème) est la seule chose
   qui s'allume, parce que c'est lui qu'on offre.
   Variables reprises à l'identique de site/index.html.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;

  --ink:        oklch(0.145 0.012 55);
  --ink-raised: oklch(0.185 0.014 52);
  --ink-line:   oklch(0.30 0.015 55);
  --paper:      oklch(0.955 0.010 85);
  --muted:      oklch(0.745 0.018 78);

  --ember:      oklch(0.70 0.155 48);
  --gold:       oklch(0.82 0.085 85);
  --danger:     oklch(0.76 0.13 28);

  --t-xs:   0.78rem;
  --t-s:    0.92rem;
  --t-base: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --t-lg:   clamp(1.3rem, 1.15rem + 0.7vw, 1.75rem);
  --t-xl:   clamp(1.9rem, 1.4rem + 2.2vw, 3.2rem);

  --gut: clamp(1.25rem, 5vw, 5rem);
  --rule: 1px solid var(--ink-line);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: var(--t-base);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex; flex-direction: column;
}
body > main { flex: 1; }

body::after {
  content: "";
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, .display {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 300; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance;
}
p { text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: var(--gut); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.small-title {
  font-size: var(--t-xs); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}

/* ── Barre haute (identique au site) ─────────────────────────────────── */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem var(--gut);
  background: color-mix(in oklab, var(--ink) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease-out);
}
.bar[data-scrolled="true"] { border-bottom-color: var(--ink-line); }
.bar img { width: clamp(96px, 14vw, 132px); filter: brightness(0) invert(1); opacity: 0.92; }
.bar-links { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); font-size: var(--t-s); }
.bar-links a { text-decoration: none; color: var(--muted); transition: color .2s var(--ease-out); }
.bar-links a:hover { color: var(--paper); }
.bar-links .tel {
  color: var(--paper); border: 1px solid var(--ink-line);
  padding: 0.5rem 1rem; border-radius: 999px; font-weight: 500;
  transition: transform .2s var(--ease-out), border-color .2s var(--ease-out);
}
.bar-links .tel:hover { border-color: var(--gold); color: var(--paper); }
.bar-links .tel:active { transform: scale(0.97); }
@media (max-width: 34rem) { .bar-links .nav-only { display: none; } }

/* ── Boutons (mêmes que le site) ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; border-radius: 999px; text-decoration: none;
  font: inherit; font-size: var(--t-s); font-weight: 500; cursor: pointer; border: 0;
  transition: transform .2s var(--ease-out), background .2s var(--ease-out), border-color .2s var(--ease-out);
}
.btn-plein { background: var(--paper); color: var(--ink); }
.btn-plein:hover { background: var(--gold); }
.btn-vide { border: 1px solid var(--ink-line); color: var(--paper); background: none; }
.btn-vide:hover { border-color: var(--paper); }
.btn:active { transform: scale(0.97); }

/* ── Entrée en scène ─────────────────────────────────────────────────── */
@keyframes monte { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.entre { animation: monte .8s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms); }
@media (prefers-reduced-motion: reduce) { .entre { animation: none; } }

/* ══ PAGE FORMULAIRE ═══════════════════════════════════════════════════ */
.page { padding-top: clamp(6rem, 12vh, 8rem); padding-bottom: clamp(3rem, 8vh, 6rem); }

.intro { max-width: 40rem; }
.intro h1 { font-size: var(--t-xl); margin-block: 0.9rem 1rem; }
.intro h1 em { font-style: italic; color: var(--gold); }
.intro p { color: var(--muted); max-width: 34rem; }
.reassure {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; list-style: none;
  margin-top: 1.4rem; font-size: var(--t-s); color: var(--muted);
}
.reassure li { display: flex; align-items: center; gap: 0.5rem; }
.reassure li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ember); flex: none; }

.notice {
  border: 1px solid var(--ink-line); border-left: 2px solid var(--gold);
  background: var(--ink-raised); border-radius: 4px;
  padding: 0.9rem 1.1rem; margin-bottom: 1.75rem; font-size: var(--t-s); max-width: 40rem;
}

.layout { display: grid; gap: clamp(2rem, 5vh, 3rem) 0; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); column-gap: clamp(3rem, 6vw, 6rem); align-items: start; }
  .layout > .intro, .layout > .step { grid-column: 1; }
  .layout > .preview { grid-column: 2; grid-row: 1 / span 4; position: sticky; top: 5.5rem; }
}

/* Étapes */
.step h2 { font-size: var(--t-lg); display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1.1rem; }
.step h2 .num { font-style: italic; color: var(--gold); font-size: 0.8em; }
.step h2 .opt { margin-left: auto; align-self: center; font-family: 'Archivo', sans-serif; font-size: var(--t-xs); letter-spacing: 0.04em; color: var(--gold); border: 1px solid color-mix(in oklab, var(--gold) 45%, transparent); border-radius: 999px; padding: 0.2rem 0.7rem; white-space: nowrap; }
.step { border-top: var(--rule); padding-top: 1.5rem; }

/* Montant */
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.chip {
  font: inherit; font-weight: 500; color: var(--paper); cursor: pointer;
  min-height: 3.25rem; border-radius: 999px; border: 1px solid var(--ink-line);
  background: none; font-variant-numeric: tabular-nums;
  transition: background .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.chip:hover { border-color: var(--paper); }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.amount { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; margin-top: 1.5rem; }
.round {
  width: 3.5rem; height: 3.5rem; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--ink-line); background: none; color: var(--paper);
  font-family: 'Newsreader', serif; font-size: 2rem; line-height: 1;
  display: grid; place-items: center; padding-bottom: 0.2rem;
  transition: border-color .2s var(--ease-out), transform .2s var(--ease-out), background .2s var(--ease-out);
}
.round:hover { border-color: var(--gold); }
.round:active { transform: scale(0.94); }
.round:disabled { opacity: 0.35; cursor: not-allowed; }
.amount-field {
  display: flex; align-items: baseline; justify-content: center; gap: 0.35rem;
  border-bottom: 1px solid var(--gold); padding-bottom: 0.15rem; min-width: 0;
}
.amount-field:focus-within { border-bottom-color: var(--ember); box-shadow: 0 1px 0 var(--ember); }
.amount-field input {
  background: none; border: 0; outline: none; color: var(--paper); text-align: right;
  font-family: 'Newsreader', Georgia, serif; font-weight: 300; letter-spacing: -0.03em;
  font-size: clamp(3.4rem, 15vw, 5rem); line-height: 1.1; width: 3ch; max-width: 100%;
  font-variant-numeric: tabular-nums; border-radius: 0;
}
.amount-field .eur { font-family: 'Newsreader', serif; font-weight: 300; font-size: clamp(1.8rem, 8vw, 2.6rem); color: var(--gold); }

.hint { font-size: var(--t-s); color: var(--muted); margin-top: 0.75rem; }

/* Champs */
.field + .field { margin-top: 1.25rem; }
.field label, .field .lab { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-weight: 500; font-size: var(--t-s); margin-bottom: 0.45rem; }
.field .opt { font-weight: 400; color: var(--muted); font-size: var(--t-xs); letter-spacing: 0.04em; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; font-size: 1.0625rem; color: var(--paper);
  background: var(--ink-raised); border: 1px solid var(--ink-line); border-radius: 10px;
  padding: 0.85rem 1rem; min-height: 3.25rem;
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out);
}
.field textarea { min-height: 7.5rem; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in oklab, var(--muted) 70%, transparent); }
.field input:hover, .field textarea:hover { border-color: color-mix(in oklab, var(--muted) 50%, var(--ink-line)); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ember); outline-offset: 1px; border-color: var(--gold); border-radius: 10px; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.count { font-size: var(--t-xs); color: var(--muted); text-align: right; margin-top: 0.35rem; margin-bottom: 0; font-variant-numeric: tabular-nums; }
.count.max { color: var(--gold); }
.err { color: var(--danger); font-size: var(--t-s); margin-top: 0.45rem; }
.err[hidden] { display: none; }
.duo + .field { margin-top: 1.25rem; }
.duo { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
.duo > .field + .field { margin-top: 0; }
@media (min-width: 34rem) { .duo { grid-template-columns: 1fr 1fr; } }

/* ── Le bon : RÉPLIQUE du PDF (pdf/template.html + pdf/style.css) ─────────
   Toutes les cotes du PDF sont reprises en millimètres et en points :
   --u = 1 mm, --pt = 1 pt, rapportés à la largeur de la fiche (A4 = 210 mm).
   La fiche garde donc exactement les proportions du PDF, à toute largeur.
   Seuls les petits textes ont un plancher (max(Npx, …)) pour rester lisibles
   sur téléphone ; « Agrandir » montre la fiche à pleine échelle.
   Polices : mêmes fichiers que le PDF (sous-ensemble latin, fonts/). */
@font-face { font-family: 'BC-NR';  font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/nr-regular.woff2') format('woff2'); }
@font-face { font-family: 'BC-NR';  font-weight: 400; font-style: italic; font-display: swap; src: url('fonts/nr-italic.woff2') format('woff2'); }
@font-face { font-family: 'BC-NRD'; font-weight: 300; font-style: normal; font-display: swap; src: url('fonts/nrd-light.woff2') format('woff2'); }
@font-face { font-family: 'BC-NRD'; font-weight: 300; font-style: italic; font-display: swap; src: url('fonts/nrd-light-italic.woff2') format('woff2'); }
@font-face { font-family: 'BC-AR';  font-weight: 400; font-display: swap; src: url('fonts/ar-regular.woff2') format('woff2'); }
@font-face { font-family: 'BC-AR';  font-weight: 500; font-display: swap; src: url('fonts/ar-medium.woff2') format('woff2'); }
@font-face { font-family: 'BC-AR';  font-weight: 600; font-display: swap; src: url('fonts/ar-semibold.woff2') format('woff2'); }

.preview { position: relative; isolation: isolate; }
.preview::before {
  content: ""; position: absolute; inset: -2rem -1rem; z-index: -1;
  background: radial-gradient(60% 55% at 50% 55%, color-mix(in oklab, var(--ember) 22%, transparent), transparent 72%);
  pointer-events: none;
}
.preview-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.9rem; }
.preview-head .small-title { font-family: 'Archivo', sans-serif; }
.preview-head p { font-size: var(--t-xs); color: var(--muted); text-align: right; }

.bon-scroll { overflow-x: auto; overflow-y: hidden; border-radius: 3px; scrollbar-width: thin; }
.bon-scroll:not([data-zoom]) { overflow: visible; }
.bon-scroll[data-zoom] .bon { width: 190%; }
.bon-zoom {
  display: none; margin: 0.7rem auto 0; min-height: 2.5rem; padding: 0 1rem; border-radius: 999px;
  border: 1px solid var(--ink-line); background: none; color: var(--paper); font: inherit; font-size: var(--t-s); cursor: pointer;
}
.bon-zoom:hover { border-color: var(--gold); }
@media (max-width: 40rem) { .bon-zoom { display: block; } }

.bon {
  container-type: inline-size;
  --u: calc(100cqw / 210);
  --pt: calc(var(--u) * 0.352778);
  --b-paper: #ffffff; --b-ink: #241a14; --b-soft: #5a4a40; --b-titre: #241a14; --b-montant: #241a14; --b-accent: #80501e; --b-cadre: #241a14; --b-filet: #80501e; --b-rayon: #80501e; --b-orn: #80501e; --b-pointe: #80501e; --b-hair: #b9a58c; --b-tint: #ffffff; --b-cadre-w: .9;
  position: relative; width: 100%; aspect-ratio: 210 / 297;
  background: var(--b-paper); color: var(--b-ink);
  font-family: 'BC-NR', Georgia, serif; font-size: calc(10 * var(--pt)); line-height: normal; letter-spacing: normal; text-transform: none; font-weight: 400;
  box-shadow: 0 30px 60px -20px oklch(0 0 0 / .7), 0 10px 24px -10px oklch(0 0 0 / .5);
}
/* Les trois habillages : mêmes variables que pdf/render.py (THEMES), vérifiées par un test. */
.bon[data-theme="bleu"] { --b-paper: #fbf8f0; --b-ink: #12303f; --b-soft: #3f5866; --b-titre: #0a3d62; --b-montant: #0a3d62; --b-accent: #17678c; --b-cadre: #0277aa; --b-filet: #0b5a3a; --b-rayon: #0277aa; --b-orn: #0b5a3a; --b-pointe: #0b5a3a; --b-hair: #a9c3cf; --b-tint: #e7f1f5; --b-cadre-w: 1.3; }
.bon[data-theme="braise"] { --b-paper: #fbf3e6; --b-ink: #2b1810; --b-soft: #5b4034; --b-titre: #7a2a0e; --b-montant: #7a2a0e; --b-accent: #8f3a17; --b-cadre: #a8481f; --b-filet: #b8862b; --b-rayon: #b4501f; --b-orn: #a8481f; --b-pointe: #a8481f; --b-hair: #dcc4a0; --b-tint: #f7e6d2; --b-cadre-w: 1.5; }
.bon { text-rendering: geometricPrecision; font-kerning: normal; }
.bon *, .bon *::before, .bon *::after { box-sizing: border-box; }
.bon p { text-wrap-style: auto; }
.bon-cadre { position: absolute; inset: calc(11 * var(--u)); border: max(1px, calc(var(--b-cadre-w) * var(--pt))) solid var(--b-cadre); }
.bon-cadre::after { content: ""; position: absolute; inset: calc(1.7 * var(--u)); border: max(.75px, calc(.4 * var(--pt))) solid var(--b-filet); }
/* ornements d'angle : seulement en bleu et braise */
.bon-coins i { display: none; position: absolute; width: calc(3.4 * var(--u)); height: calc(3.4 * var(--u)); background: var(--b-orn); border: calc(.9 * var(--u)) solid var(--b-paper); z-index: 3; }
.bon[data-theme="bleu"] .bon-coins i, .bon[data-theme="braise"] .bon-coins i { display: block; }
.bon[data-theme="bleu"] .bon-coins i { border-radius: 50%; } .bon[data-theme="braise"] .bon-coins i { transform: rotate(45deg); }
.bon-coins i:nth-child(1) { left: calc(9.3 * var(--u)); top: calc(9.3 * var(--u)); } .bon-coins i:nth-child(2) { right: calc(9.3 * var(--u)); top: calc(9.3 * var(--u)); }
.bon-coins i:nth-child(3) { left: calc(9.3 * var(--u)); bottom: calc(9.3 * var(--u)); } .bon-coins i:nth-child(4) { right: calc(9.3 * var(--u)); bottom: calc(9.3 * var(--u)); }
.bon-pointe path { fill: var(--b-pointe); } .bon-pointe rect { fill: var(--b-paper); }
.bon-pointe { position: absolute; left: 50%; bottom: calc(11 * var(--u)); width: calc(7 * var(--u)); height: calc(5 * var(--u)); margin: 0 0 calc(-2.6 * var(--u)) calc(-3.5 * var(--u)); z-index: 3; }

.bon-col {
  position: absolute; inset: calc(11 * var(--u)); z-index: 2;
  padding: calc(10 * var(--u)) calc(17 * var(--u)) calc(9 * var(--u));
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.bon-logo { width: calc(62 * var(--u)); height: auto; display: block; max-width: none; }
.bon-h1 { color: var(--b-titre); width: 100%; font-family: 'BC-NRD', serif; font-style: italic; font-weight: 300; font-size: calc(54 * var(--pt)); line-height: 1; margin-top: calc(5.5 * var(--u)); letter-spacing: -.005em; }
.bon-accroche { font-family: 'BC-AR', sans-serif; font-weight: 500; font-size: max(6.5px, calc(8.2 * var(--pt))); letter-spacing: .3em; text-transform: uppercase; color: var(--b-accent); margin-top: calc(2.6 * var(--u)); padding-left: .3em; }

.bon .lbl { font-family: 'BC-AR', sans-serif; font-weight: 500; font-size: max(6.5px, calc(8.2 * var(--pt))); letter-spacing: .24em; text-transform: uppercase; color: var(--b-soft); }
.bon-noms { align-items: flex-start; display: flex; gap: calc(14 * var(--u)); justify-content: center; width: 100%; margin-top: calc(6 * var(--u)); }
.bon-noms .n { flex: 1 1 0; max-width: calc(78 * var(--u)); min-width: 0; display: block; }
.bon-noms .nom { font-family: 'BC-NR', serif; font-style: italic; line-height: 1.12; margin-top: calc(1.6 * var(--u)); overflow-wrap: anywhere; }
.bon-noms .n.vide .ligne { height: calc(9 * var(--u)); border-bottom: max(.75px, calc(.5 * var(--pt))) solid var(--b-hair); margin-top: calc(1 * var(--u)); }
.bon.serre .bon-noms { margin-top: calc(4 * var(--u)); }

.bon-zone { padding: calc(6 * var(--u)) 0 calc(1 * var(--u)); flex: 1 1 auto; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bon-mot { width: calc(122 * var(--u)); display: flex; flex-direction: column; align-items: center; }
.bon.serre .bon-mot { margin-top: calc(2 * var(--u)); }
.bon-mot p { font-family: 'BC-NR', serif; font-style: italic; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.38; color: var(--b-ink); }
.bon-devise { font-family: 'BC-NR', serif; font-style: italic; font-size: max(9px, calc(15 * var(--pt))); color: var(--b-soft); width: calc(100 * var(--u)); line-height: 1.4; }

.bon-valeur { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; padding-top: calc(5 * var(--u)); }
.bon-soleil { width: calc(27 * var(--u)); height: calc(14.2 * var(--u)); display: block; margin-bottom: calc(2.5 * var(--u)); }
.bon-soleil line { stroke: var(--b-rayon); } .bon-soleil ellipse { fill: var(--b-montant); }
.bon.serre .bon-soleil { margin-bottom: 0; }
/* cartouche derrière le montant (bleu, braise) : hors flux, la mise en page ne bouge pas */
.bon-valeur::before { display: none; content: ""; position: absolute; left: calc(-10 * var(--u)); right: calc(-10 * var(--u)); top: calc(2 * var(--u)); bottom: calc(-3 * var(--u)); z-index: -1; background: var(--b-tint); border-top: max(.75px, calc(.5 * var(--pt))) solid var(--b-filet); border-bottom: max(.75px, calc(.5 * var(--pt))) solid var(--b-filet); }
.bon[data-theme="bleu"] .bon-valeur::before, .bon[data-theme="braise"] .bon-valeur::before { display: block; }
.bon[data-theme="bleu"] .bon-bas, .bon[data-theme="braise"] .bon-bas { border-top-color: transparent; }
.bon-montant { font-family: 'BC-NRD', serif; font-weight: 300; font-size: calc(112 * var(--pt)); line-height: .82; letter-spacing: -.02em; margin-top: calc(2.5 * var(--u)); margin-bottom: calc(5 * var(--u)); font-variant-numeric: lining-nums; position: relative; color: var(--b-montant); }
.bon-montant.q { font-size: calc(96 * var(--pt)); }
.bon.serre .bon-montant { font-size: calc(88 * var(--pt)); }
.bon.serre .bon-montant.q { font-size: calc(76 * var(--pt)); }
.bon-montant.tick { animation: tick .45s var(--ease-out); }
@keyframes tick { from { transform: translateY(5px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bon-montant.tick { animation: none; } }
.bon-euros { display: flex; align-items: center; justify-content: center; gap: calc(6 * var(--u)); width: 100%; }
.bon-euros .f { display: block; width: calc(56 * var(--u)); height: calc(5 * var(--u)); position: relative; }
.bon-euros .f::before, .bon-euros .f::after, .bon-euros .f i { content: ""; position: absolute; left: 0; right: 0; border-top: max(.75px, calc(.5 * var(--pt))) solid var(--b-filet); }
.bon-euros .f::before { top: calc(.4 * var(--u)); } .bon-euros .f i { top: calc(2.4 * var(--u)); } .bon-euros .f::after { top: calc(4.4 * var(--u)); }
.bon-euros .f.g::before { left: calc(6 * var(--u)); } .bon-euros .f.g::after { left: calc(12 * var(--u)); }
.bon-euros .f.d::before { right: calc(6 * var(--u)); } .bon-euros .f.d::after { right: calc(12 * var(--u)); }
.bon-euros > span:not(.f) { font-family: 'BC-AR', sans-serif; font-weight: 500; font-size: max(7px, calc(11 * var(--pt))); letter-spacing: .5em; text-transform: uppercase; margin-right: -.5em; color: var(--b-montant); }

.bon-bas { display: grid; grid-template-columns: calc(34 * var(--u)) 1fr calc(52 * var(--u)); gap: calc(7 * var(--u)); align-items: center; width: 100%; margin-top: calc(6 * var(--u)); padding-top: calc(5 * var(--u)); border-top: max(.75px, calc(.5 * var(--pt))) solid var(--b-hair); text-align: left; }
.bon.serre .bon-bas { margin-top: calc(4 * var(--u)); padding-top: calc(3.5 * var(--u)); }
.bon-qr { width: calc(34 * var(--u)); position: relative; }
.bon-qr img { width: calc(34 * var(--u)); height: calc(34 * var(--u)); display: block; max-width: none; box-shadow: 0 0 0 calc(2.2 * var(--u)) #fff; }
.bon-qr b { position: absolute; left: 50%; top: calc(17 * var(--u)); transform: translate(-50%, -50%); background: #fff; color: var(--b-soft); font-family: 'BC-AR', sans-serif; font-weight: 600; font-size: max(6px, calc(7.4 * var(--pt))); letter-spacing: .08em; text-transform: uppercase; padding: .35em .6em; white-space: nowrap; border: 1px solid var(--b-hair); }
.bon-qr small { display: block; margin-top: calc(1 * var(--u)); font-family: 'BC-AR', sans-serif; font-size: max(6px, calc(7.6 * var(--pt))); letter-spacing: .04em; color: var(--b-soft); text-align: center; }
.bon[data-theme="bleu"] .bon-qr small, .bon[data-theme="braise"] .bon-qr small { margin-top: calc(2.6 * var(--u)); }
.bon-num .lbl { display: block; }
.bon-code { font-family: 'BC-AR', sans-serif; font-weight: 600; font-size: calc(17.5 * var(--pt)); letter-spacing: .07em; margin-top: calc(1.4 * var(--u)); white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--b-ink); opacity: .55; }
.bon-dates { margin-top: calc(3 * var(--u)); font-family: 'BC-NR', serif; font-size: max(6.4px, calc(11.5 * var(--pt))); line-height: 1.45; }
.bon-dates b { font-weight: 400; font-style: italic; font-size: 1.087em; }
.bon-resa { font-family: 'BC-NR', serif; font-size: max(6.5px, calc(10 * var(--pt))); line-height: 1.42; border-left: max(.75px, calc(.5 * var(--pt))) solid var(--b-hair); padding-left: calc(5 * var(--u)); overflow-wrap: anywhere; }
.bon-resa .lbl { display: block; margin-bottom: calc(1.2 * var(--u)); }
.bon-resa strong { font-family: 'BC-AR', sans-serif; font-weight: 600; font-size: max(7px, calc(11 * var(--pt))); letter-spacing: .03em; display: block; margin: calc(.6 * var(--u)) 0 calc(.8 * var(--u)); }

.bon-cond { width: 100%; margin-top: calc(5 * var(--u)); padding-top: calc(3.5 * var(--u)); border-top: max(.75px, calc(.5 * var(--pt))) solid var(--b-hair); font-family: 'BC-AR', sans-serif; font-size: max(6px, calc(8.6 * var(--pt))); line-height: 1.5; color: var(--b-soft); text-align: center; }
.bon-cond b { font-weight: 600; color: var(--b-ink); }
.bon.serre .bon-logo { width: calc(52 * var(--u)); }
.bon.serre .bon-h1 { font-size: calc(44 * var(--pt)); margin-top: calc(3 * var(--u)); }
.bon.serre .bon-cond { margin-top: calc(3.5 * var(--u)); }

.bon-note { margin-top: 0.9rem; font-size: var(--t-xs); color: var(--muted); text-align: center; line-height: 1.5; }
.bon-note strong { color: var(--paper); font-weight: 500; }

/* ── Règles, avant l'achat ───────────────────────────────────────────── */
.regles { list-style: none; display: grid; gap: 0.7rem; font-size: var(--t-s); color: var(--muted); }
.regles li { display: grid; grid-template-columns: 1.1rem 1fr; gap: 0.5rem; }
.regles li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ember); margin-top: 0.62em; justify-self: center; }
.regles strong { color: var(--paper); font-weight: 500; }
.regles a { color: var(--paper); text-underline-offset: 3px; text-decoration-color: var(--ink-line); }
.regles a:hover { text-decoration-color: var(--gold); }

.regles-bloc { margin-top: 2rem; padding: 1.25rem 1.25rem 1.35rem; border: 1px solid var(--ink-line); border-radius: 10px; background: var(--ink-raised); }
.regles-bloc .small-title { font-family: 'Archivo', sans-serif; margin-bottom: 0.95rem; }
.hint { max-width: 36rem; }
.field .hint { margin-top: 0.45rem; }

/* Case à cocher */
.check { display: grid; grid-template-columns: 1.75rem 1fr; gap: 0.85rem; align-items: start; margin-top: 1.5rem; padding: 1rem 1.1rem; border: 1px solid var(--ink-line); border-radius: 10px; cursor: pointer; font-size: var(--t-s); }
.check:has(input[aria-invalid="true"]) { border-color: var(--danger); }
.check input { appearance: none; -webkit-appearance: none; width: 1.75rem; height: 1.75rem; margin: 0; border: 1px solid var(--muted); border-radius: 6px; background: var(--ink); cursor: pointer; display: grid; place-content: center; }
.check input::after { content: ""; width: 0.9rem; height: 0.5rem; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .15s var(--ease-out); }
.check input:checked { background: var(--gold); border-color: var(--gold); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check input:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.check a { text-underline-offset: 3px; }
.check-err { margin-top: 0.45rem; }

/* Payer */
.alerte { border: 1px solid var(--danger); background: color-mix(in oklab, var(--danger) 10%, var(--ink)); border-radius: 10px; padding: 0.9rem 1.1rem; margin-top: 1.5rem; font-size: var(--t-s); }
.alerte[hidden] { display: none; }
.payer {
  width: 100%; margin-top: 1.5rem; min-height: 3.75rem; font-size: 1.1rem; gap: 0.7rem;
}
.payer[aria-busy="true"] { opacity: 0.75; cursor: progress; }
.payer svg { flex: none; }
.payer .spin { display: none; width: 1rem; height: 1rem; border: 2px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: tourne .8s linear infinite; }
.payer[aria-busy="true"] .spin { display: block; }
.payer[aria-busy="true"] svg { display: none; }
@keyframes tourne { to { transform: rotate(360deg); } }
.confiance { list-style: none; margin-top: 1.1rem; display: grid; gap: 0.5rem; font-size: var(--t-xs); color: var(--muted); text-align: center; line-height: 1.5; }
.confiance a { color: var(--paper); text-underline-offset: 3px; }

/* ── Pied ────────────────────────────────────────────────────────────── */
footer { border-top: var(--rule); padding-block: 2.5rem; font-size: var(--t-s); color: var(--muted); }
.pied { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; align-items: center; }
.pied a { text-decoration: none; transition: color .2s var(--ease-out); }
.pied a:hover { color: var(--paper); }

/* ══ PAGE MERCI ════════════════════════════════════════════════════════ */
.merci { max-width: 40rem; margin-inline: auto; text-align: center; padding-top: clamp(1rem, 4vh, 3rem); }
.merci [data-etat] { display: none; }
#merci[data-state="pending"] [data-etat="pending"],
#merci[data-state="ready"] [data-etat="ready"],
#merci[data-state="slow"] [data-etat="slow"],
#merci[data-state="invalid"] [data-etat="invalid"] { display: block; }
.merci h1 { font-size: var(--t-xl); margin-block: 1rem 1rem; }
.merci h1 em { font-style: italic; color: var(--gold); }
.merci p { color: var(--muted); }
.merci .lead { font-size: var(--t-lg); font-family: 'Newsreader', serif; font-weight: 300; color: var(--paper); }
.flamme { width: 3.25rem; height: 3.25rem; margin: 0 auto 1.5rem; position: relative; }
.flamme::before, .flamme::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--ember); animation: onde 2s var(--ease-out) infinite; }
.flamme::after { animation-delay: 1s; }
.flamme i { position: absolute; inset: 38%; border-radius: 50%; background: var(--ember); box-shadow: 0 0 22px 4px color-mix(in oklab, var(--ember) 60%, transparent); }
@keyframes onde { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .flamme::before, .flamme::after { animation: none; opacity: .5; } }

.btn-grand { min-height: 4rem; padding-inline: 2.2rem; font-size: 1.1rem; margin-top: 2rem; width: 100%; max-width: 24rem; }
.suite { list-style: none; counter-reset: s; text-align: left; margin: 2.5rem auto 0; max-width: 28rem; display: grid; gap: 1rem; border-top: var(--rule); padding-top: 1.75rem; }
.suite li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; color: var(--muted); font-size: var(--t-s); }
.suite li::before { content: counter(s); font-family: 'Newsreader', serif; font-style: italic; font-size: 1.4rem; line-height: 1; color: var(--gold); }
.suite strong { color: var(--paper); font-weight: 500; }
.merci .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2rem; }

/* ══ PAGE CONDITIONS ═══════════════════════════════════════════════════ */
.cgv { max-width: 44rem; margin-inline: auto; }
.cgv h1 { font-size: var(--t-xl); margin-block: 0.9rem 1rem; }
.cgv .chapo { color: var(--muted); }
.cgv .provisoire { margin-top: 1.5rem; border: 1px dashed var(--gold); border-radius: 6px; padding: 0.8rem 1rem; font-size: var(--t-s); color: var(--gold); }
.cgv section { margin-top: 2.5rem; border-top: var(--rule); padding-top: 1.5rem; }
.cgv h2 { font-size: var(--t-lg); margin-bottom: 0.8rem; }
.cgv h2 .num { font-style: italic; color: var(--gold); margin-right: 0.5rem; font-size: 0.85em; }
.cgv p, .cgv li { color: var(--muted); }
.cgv p + p, .cgv p + ul, .cgv ul + p { margin-top: 0.8rem; }
.cgv ul { padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.cgv strong { color: var(--paper); font-weight: 500; }
.cgv a { text-underline-offset: 3px; }
.cgv .fiche { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; color: var(--muted); }
.cgv .fiche dt { color: var(--paper); }
.todo { background: color-mix(in oklab, var(--gold) 22%, transparent); color: var(--gold); padding: 0 0.35em; border-radius: 3px; font-style: normal; }
.retour { display: inline-block; margin-top: 3rem; }

/* idées de petit mot */
.mots { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.9rem; }
.mots-t { flex: 0 0 100%; font-size: var(--t-s); color: var(--muted); }
.mot { min-height: 2.75rem; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--ink-line); background: transparent; color: var(--paper); font: inherit; font-size: var(--t-s); cursor: pointer; transition: border-color .2s var(--ease-out), color .2s var(--ease-out), transform .2s var(--ease-out); }
.mot:hover, .mot:focus-visible { border-color: var(--gold); color: var(--gold); }
.mot:active { transform: scale(0.97); }

/* ── Choix du design : trois vignettes (le même bon, en miniature) ───────── */
.themes { margin-top: 1.75rem; }
.themes-t { font-weight: 500; font-size: var(--t-s); margin-bottom: 0.2rem; }
.themes-liste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.8rem; }
.theme {
  display: flex; flex-direction: column; align-items: stretch; gap: 0.5rem; text-align: left;
  padding: 0.55rem 0.55rem 0.8rem; background: transparent; color: var(--paper); font: inherit; cursor: pointer;
  border: 1px solid var(--ink-line); border-radius: 10px;
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.theme:hover { border-color: var(--muted); }
.theme:active { transform: scale(0.98); }
.theme:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.theme[aria-pressed="true"] { border-color: var(--gold); background: var(--ink-raised); box-shadow: 0 0 0 1px var(--gold); }
.tv-vig { display: block; position: relative; width: 100%; aspect-ratio: 210 / 297; overflow: hidden; border-radius: 2px; box-shadow: 0 8px 18px -8px oklch(0 0 0 / .7); }
.tv-vig .bon { position: absolute; left: 0; top: 0; width: 600px; box-shadow: none; transform-origin: 0 0; transform: scale(var(--s, .2)); pointer-events: none; }
.tv-nom { font-weight: 500; font-size: var(--t-s); line-height: 1.25; padding-inline: 0.15rem; }
.theme[aria-pressed="true"] .tv-nom::before { content: "\2713\00a0"; color: var(--gold); }
.tv-sub { font-size: var(--t-xs); color: var(--muted); line-height: 1.35; padding-inline: 0.15rem; }
@media (max-width: 24rem) { .themes-liste { gap: 0.4rem; } .theme { padding: 0.4rem 0.4rem 0.65rem; } }
@media (max-width: 30rem) { .tv-nom { font-size: 0.86rem; } .tv-sub { font-size: 0.74rem; } }
