/* Loupicou — configurateur mariage
   Palette de l'identité visuelle : blanc cassé #F3F1DF, jaune golden #F2CC2C, noir #1D1D1B.
   Titres : Bodoni Moda (contraste élevé, papeterie de mariage). Texte : Jost (géométrique, proche de l'esprit de la marque). */

@font-face { font-family: "Bodoni Moda"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/bodoni-moda-latin-400-normal.woff2") format("woff2"), url("../fonts/bodoni-moda-latin-400-normal.woff") format("woff"); }
@font-face { font-family: "Bodoni Moda"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/bodoni-moda-latin-500-normal.woff2") format("woff2"), url("../fonts/bodoni-moda-latin-500-normal.woff") format("woff"); }
@font-face { font-family: "Bodoni Moda"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/bodoni-moda-latin-400-italic.woff2") format("woff2"), url("../fonts/bodoni-moda-latin-400-italic.woff") format("woff"); }
@font-face { font-family: "Jost"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/jost-latin-300-normal.woff2") format("woff2"), url("../fonts/jost-latin-300-normal.woff") format("woff"); }
@font-face { font-family: "Jost"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/jost-latin-400-normal.woff2") format("woff2"), url("../fonts/jost-latin-400-normal.woff") format("woff"); }
@font-face { font-family: "Jost"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/jost-latin-500-normal.woff2") format("woff2"), url("../fonts/jost-latin-500-normal.woff") format("woff"); }
@font-face { font-family: "Jost"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/jost-latin-600-normal.woff2") format("woff2"), url("../fonts/jost-latin-600-normal.woff") format("woff"); }

:root {
  --cream: #F3F1DF;
  --paper: #FBFAF2;
  --ink: #1D1D1B;
  --gold: #F2CC2C;
  --gold-soft: #F7E28A;
  --muted: #5B594D;
  --line: rgba(29, 29, 27, .16);
  --line-strong: rgba(29, 29, 27, .55);
  --err: #A3281E;
  --serif: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
  --sans: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 3.4vw, 80px);
  --max: 1920px;
  --aside: 372px;
  --r: 4px;
  --dock-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 999px; z-index: 50; }
.skip:focus { top: 12px; }
.noscript { margin: 24px var(--gutter); padding: 16px; background: var(--paper); border: 1px solid var(--line); }

/* ───────── En-tête et progression (les barres reprennent l'insigne Loupicou) ───────── */
.top {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand tel" "progress progress";
  align-items: center;
  gap: 14px 16px;
  padding: 16px var(--gutter) 14px;
  border-bottom: 1px solid var(--line);
}
.brand { grid-area: brand; display: inline-block; line-height: 0; }
.brand img { height: 26px; width: auto; }
.top__tel { grid-area: tel; justify-self: end; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1.05rem; padding: 6px 0; border-bottom: 1px solid var(--line-strong); }
.top__tel:hover { border-bottom-color: var(--ink); }
.progress { grid-area: progress; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; height: 76px; }
.bar { display: flex; align-items: center; }
.bar__btn {
  position: relative;
  width: var(--w); height: var(--h);
  border: 0; padding: 0; border-radius: 50%;
  background: rgba(29, 29, 27, .14);
  cursor: pointer;
  transition: background-color .35s ease, box-shadow .35s ease;
  animation: rise .75s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--i) * 70ms);
}
.bar__btn::after { content: ""; position: absolute; inset: -6px -5px; }
.bar__btn[data-state="done"] { background: var(--gold); }
.bar__btn[data-state="current"] { background: var(--gold); box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--ink); }
.bar__btn:disabled { cursor: default; }
@keyframes rise { from { transform: scaleY(.12); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.progress__label { margin: 0; font-size: .9rem; color: var(--muted); }
.progress__label strong { color: var(--ink); font-weight: 500; }

@media (min-width: 900px) {
  .top { grid-template-columns: 1fr auto 1fr; grid-template-areas: "brand progress tel"; padding-block: 14px; }
  .bars { height: 64px; }
}
/* Logo et téléphone plus grands, pour qu'ils se lisent d'un coup d'œil */
@media (min-width: 900px) { .brand img { height: 36px; } .top__tel { font-size: 1.3rem; } }
@media (min-width: 1500px) { .brand img { height: 42px; } .top__tel { font-size: 1.45rem; } }
@media (max-width: 400px) { .brand img { height: 22px; } .top__tel { font-size: .95rem; } }
/* L'en-tête suit les mêmes marges que le contenu, y compris sur les très grands écrans */
.top { padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); }

/* ───────── Mise en page ───────── */
.layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 72px) var(--gutter) calc(var(--dock-h) + 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 88px);
}
@media (min-width: 1040px) {
  .layout { grid-template-columns: minmax(0, 1fr) var(--aside); align-items: start; }
}
/* Sur grand écran, la colonne de droite (offre, carrousel) s'élargit avec la page */
@media (min-width: 1500px) { :root { --aside: 420px; } }
@media (min-width: 1800px) { :root { --aside: 460px; } }
/* .view sert de référence aux grilles : le nombre de colonnes dépend de la place réellement disponible */
.view { outline: none; animation: fade .35s ease both; container: view / inline-size; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.view h1, .view h2 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.012em; }
.view h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); line-height: 1.04; max-width: 15ch; }
.view h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.08; max-width: 20ch; }
.view h3 { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; line-height: 1.15; margin: 0; letter-spacing: -.005em; }
.lead { font-size: 1.15rem; font-weight: 300; color: var(--muted); max-width: 52ch; margin: 18px 0 0; }
.lead strong { color: var(--ink); font-weight: 500; }
.hint { color: var(--muted); font-size: .95rem; margin: 10px 0 0; }
.view > .lead + * { margin-top: 36px; }

/* ───────── Boutons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 28px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: 1rem; letter-spacing: .01em;
  cursor: pointer; text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--ink); color: var(--cream); }
.btn--primary:hover { background: var(--gold); color: var(--ink); }
.btn--primary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--text { background: transparent; color: var(--ink); padding: 0 8px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.btn--text:hover { text-decoration-color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--toggle { min-height: 40px; padding: 0 18px; background: transparent; border-color: var(--ink); font-size: .95rem; }
.btn--toggle[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); }
.btn--toggle.btn--remove { border-color: var(--line-strong); color: var(--ink); }
.btn--toggle:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn--toggle[aria-pressed="true"]:hover { background: var(--ink); }

/* ───────── Formulaires ───────── */
.form { display: grid; gap: 22px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
@container view (min-width: 980px) { .form { max-width: 880px; gap: 26px 28px; } }
.field { display: flex; flex-direction: column; gap: 7px; grid-column: 1 / -1; }
.field--half { grid-column: span 1; }
@media (max-width: 520px) { .field--half { grid-column: 1 / -1; } }
.field label { font-weight: 500; font-size: .95rem; }
.field input {
  width: 100%; min-height: 50px; padding: 10px 14px;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r);
  font-size: 1.05rem;
}
.field input::placeholder { color: #8b8978; }
.field input:focus { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.field input[aria-invalid="true"] { border-color: var(--err); background: #FDF6F4; }
.field__error { margin: 0; color: var(--err); font-size: .92rem; font-weight: 500; }
.field__help { margin: 0; color: var(--muted); font-size: .92rem; }

/* Date du mariage : calendrier sur mesure (remplace celui du navigateur), ouvert dès le clic sur le champ */
.datebox { position: relative; }
.field .datebox__input { cursor: pointer; padding-right: 54px; text-overflow: ellipsis; }
.field .datebox__input:hover { border-color: var(--ink); }
.datebox__icon { position: absolute; top: 0; bottom: 0; right: 0; width: 52px; display: grid; place-items: center; pointer-events: none; }
.caldlg { max-width: none; max-height: none; margin: auto; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.caldlg::backdrop { background: rgba(29, 29, 27, .55); animation: cal-fade .2s ease-out; }
@keyframes cal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.cal {
  --cell: 56px; /* ajustée par le script selon la taille de la fenêtre */
  width: calc(var(--cell) * 7 + 12px + 40px);
  padding: 18px 20px 14px;
  background: var(--paper); border: 1px solid var(--ink); border-radius: 10px;
  box-shadow: 0 40px 80px -24px rgba(29, 29, 27, .6), 0 4px 0 var(--gold);
  animation: cal-in .22s ease-out;
}
@media (prefers-reduced-motion: reduce) { .cal, .caldlg::backdrop { animation: none; } }
@media (max-width: 520px) { .caldlg { margin: auto auto 12px; } }
.cal__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 14px; margin-bottom: 12px; border-bottom: 2px solid var(--gold); }
.cal__nav { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.cal__nav:hover:not(:disabled) { background: var(--gold-soft); border-color: var(--ink); }
.cal__nav:disabled { opacity: .28; cursor: default; }
.cal__title { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 12px; border: 0; border-radius: var(--r); background: transparent; cursor: pointer; font: 400 clamp(1.5rem, calc(var(--cell) * .5), 2rem)/1 var(--serif); transition: background-color .15s ease; }
.cal__title:hover { background: rgba(242, 204, 44, .3); }
.cal__title svg { flex: 0 0 auto; opacity: .65; }
.cal__week, .cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; justify-items: center; }
.cal__week span { padding: 2px 0 8px; font-size: .88rem; color: var(--muted); }
.cal__week span:nth-child(6) { color: var(--ink); font-weight: 600; }
.cal__day { position: relative; display: grid; place-items: center; width: min(100%, var(--cell)); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font: 400 clamp(1.05rem, calc(var(--cell) * .34), 1.35rem)/1 var(--sans); font-variant-numeric: tabular-nums; transition: background-color .12s ease; }
.cal__day.is-sat { font-weight: 500; }
.cal__day:hover:not(:disabled) { background: var(--gold-soft); }
.cal__day[aria-pressed="true"] { background: var(--gold); font-weight: 600; box-shadow: 0 0 0 2px var(--ink); }
.cal__day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 17%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--ink); }
.cal__day:disabled { color: rgba(29, 29, 27, .27); cursor: default; }
.cal__day:focus-visible, .cal__mo:focus-visible, .cal__nav:focus-visible, .cal__title:focus-visible, .cal__close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cal__months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 4px 0 8px; }
.cal__mo { height: calc(var(--cell) * 1.15); padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: transparent; cursor: pointer; font-size: 1.1rem; transition: background-color .12s ease, border-color .12s ease; }
.cal__mo:hover:not(:disabled) { background: var(--gold-soft); border-color: var(--ink); }
.cal__mo.is-cur { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.cal__mo.is-sel { background: var(--gold); font-weight: 600; }
.cal__mo:disabled { opacity: .28; cursor: default; }
.cal__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.cal__sel { font: italic 400 1.12rem/1.2 var(--serif); }
.cal__hint { color: var(--muted); font-size: .96rem; }
.cal__close { flex: 0 0 auto; padding: 12px 8px; border: 0; background: transparent; cursor: pointer; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }

/* Effectif : quatre cases à cocher, un seul choix, en un clic */
.choices { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; min-width: 0; }
.choices legend { padding: 0; margin-bottom: 10px; font-weight: 500; font-size: .95rem; }
.choices__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container view (min-width: 540px) { .choices__row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.choice { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 66px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.choice:hover { border-color: var(--ink); }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: #FBF3CF; }
.choice:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.choice__label { font-family: var(--serif); font-size: 1.12rem; line-height: 1.15; font-weight: 500; white-space: nowrap; }
.choice__sub { color: var(--muted); font-size: .9rem; }
.choice__check { position: absolute; bottom: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .25s cubic-bezier(.2, .9, .3, 1.4); pointer-events: none; }
.choice__check svg { width: 13px; height: 13px; }
.choice:has(input:checked) .choice__check { opacity: 1; transform: scale(1); }
.choices .hint { margin: 12px 0 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); width: fit-content; }
.qty button {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  font-size: 1.4rem; line-height: 1; display: grid; place-items: center;
}
.qty button:hover:not(:disabled) { background: var(--gold); }
.qty button:disabled { opacity: .3; cursor: not-allowed; }
.qty input, .qty output { width: 3.6ch; text-align: center; font-weight: 500; font-size: 1.1rem; border: 0; background: transparent; padding: 0; min-height: 44px; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--sm button { width: 36px; height: 36px; font-size: 1.2rem; }
.qty--sm output { min-height: 36px; font-size: 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ───────── Aside ───────── */
.aside { display: none; }
@media (min-width: 1040px) {
  .aside { display: block; position: sticky; top: 24px; }
}
.frame { margin: 0; padding: 12px; background: var(--paper); border: 1px solid var(--line); }
.frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.frame figcaption { padding: 12px 4px 2px; font-size: .92rem; color: var(--muted); }
/* Carrousel « Nos réalisations » : fondu entre les photos, points cliquables, bouton pause */
.carousel__stage { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--line); }
.carousel .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.carousel .slide[data-on="true"] { opacity: 1; }
.carousel .slide img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.carousel .carousel__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px 0; color: var(--ink); font-family: var(--serif); font-size: 1.15rem; white-space: nowrap; }
.carousel__ctl { display: inline-flex; align-items: center; gap: 6px; }
.dots { display: inline-flex; align-items: center; }
.dots button { position: relative; width: 18px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
.dots button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--line-strong); opacity: .45; transition: transform .2s, opacity .2s, background-color .2s; }
.dots button:hover::after { opacity: .9; }
.dots button[aria-current="true"]::after { background: var(--gold); opacity: 1; transform: scale(1.35); box-shadow: 0 0 0 1px var(--ink); }
.carousel__pause, .carousel__nav { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.carousel__pause:hover, .carousel__nav:hover { background: var(--gold); border-color: var(--ink); }
.carousel__count { min-width: 3.4em; text-align: center; font-family: var(--sans, 'Jost', sans-serif); font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Photos agrandissables : bouton en coin + visionneuse plein écran */
.zoom { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(251, 250, 242, .92); color: var(--ink); cursor: pointer; box-shadow: 0 1px 6px rgba(29, 29, 27, .28); transition: background-color .15s ease, transform .15s ease; }
.zoom:hover { background: var(--gold); transform: scale(1.07); }
.gitem { position: relative; overflow: hidden; border-radius: 2px; }
.gitem img { position: absolute; inset: 0; }
.gitem img, .opt .media img, .carousel__stage img { cursor: zoom-in; }
html:has(dialog[open]) { overflow: hidden; }
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--paper); overflow: hidden; }
.lightbox::backdrop { background: rgba(29, 29, 27, .96); }
.lightbox__inner { position: relative; box-sizing: border-box; width: 100%; height: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 10px; padding: 64px 16px 20px; }
.lightbox__fig { grid-column: 2; margin: 0; min-width: 0; min-height: 0; display: grid; justify-items: center; gap: 14px; }
.lightbox__fig > img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); object-fit: contain; background: var(--ink); box-shadow: 0 12px 48px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .25s ease; }
.lightbox__fig > img.is-ready { opacity: 1; }
.lightbox__thumbs { position: relative; display: flex; justify-content: safe center; gap: 6px; max-width: 100%; padding: 3px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(251, 250, 242, .35) transparent; }
.lightbox__thumbs[hidden] { display: none; }
.lightbox__th { flex: 0 0 auto; display: block; width: 72px; height: 50px; padding: 0; border: 2px solid transparent; border-radius: 3px; background: var(--ink); overflow: hidden; cursor: pointer; opacity: .55; transition: opacity .15s ease, border-color .15s ease; }
.lightbox__th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lightbox__th:hover { opacity: .9; }
.lightbox__th.is-on { opacity: 1; border-color: var(--gold); }
.lightbox__th:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.lightbox figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: 1rem; color: rgba(251, 250, 242, .88); text-align: center; }
.lightbox__count { font-variant-numeric: tabular-nums; color: rgba(251, 250, 242, .62); }
.lightbox__btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(251, 250, 242, .4); border-radius: 50%; background: rgba(251, 250, 242, .1); color: var(--paper); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.lightbox__btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.lightbox__btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.lightbox__close { position: absolute; top: 12px; right: 12px; z-index: 2; }
@media (max-width: 640px) {
  .lightbox__inner { grid-template-columns: minmax(0, 1fr); padding: 60px 10px 16px; }
  .lightbox__fig { grid-column: 1; }
  .lightbox__prev, .lightbox__next { position: absolute; bottom: 14px; z-index: 2; background: rgba(29, 29, 27, .6); }
  .lightbox__prev { left: 14px; } .lightbox__next { right: 14px; }
  .lightbox__fig > img { max-height: calc(100dvh - 260px); }
  .lightbox__th { width: 60px; height: 42px; }
  .lightbox figcaption { padding-bottom: 54px; }
}

.summary { background: var(--paper); border: 1px solid var(--line); padding: 26px 24px 22px; }
.summary h2 { font-size: 1.7rem; margin: 0 0 4px; }
.summary__meta { margin: 0 0 18px; color: var(--muted); font-size: .95rem; }
.summary__group { margin: 18px 0 0; }
.summary__group h3 { font-family: var(--sans); font-size: .9rem; font-weight: 500; color: var(--muted); margin: 0 0 6px; letter-spacing: .01em; }
.summary ul { list-style: none; margin: 0; padding: 0; }
.summary li { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-top: 1px solid var(--line); font-size: .98rem; line-height: 1.35; }
.summary li small { display: block; color: var(--muted); font-size: .85rem; }
.summary li .p { white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary__empty { color: var(--muted); font-size: .98rem; margin: 14px 0 0; }
.summary__total { margin-top: 20px; padding-top: 16px; border-top: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.summary__total strong { font-family: var(--serif); font-weight: 500; font-size: 2rem; line-height: 1; font-variant-numeric: lining-nums; }
.summary__note { margin: 8px 0 0; color: var(--muted); font-size: .88rem; }

/* ───────── Cartes de choix ───────── */
.grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); margin-top: 36px; }
@media (min-width: 700px) { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Grand écran : les quatre packs côte à côte, les options sur trois colonnes */
@container view (min-width: 1120px) { .grid--packs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; } }
@container view (min-width: 980px) { .grid--opts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; } }
@container view (min-width: 1240px) {
  .grid--opts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
  /* cartes plus étroites : le nom de l'article passe sur sa propre ligne, prix et quantité dessous */
  .grid--opts .opt__line { flex-wrap: wrap; row-gap: 6px; }
  .grid--opts .opt__line > .opt__line-text { flex: 1 1 100%; }
  .grid--opts .opt__line > .opt__line-ctrl { margin-left: auto; }
  .grid--opts .opt__body { padding-inline: 18px; }
  .grid--opts .opt__lines, .grid--opts .opt__sub, .grid--opts .opt__clear { margin-inline: 18px; }
}

.pick-wrap { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .2s ease, box-shadow .2s ease; }
.pick-wrap:hover { border-color: var(--line-strong); }
.pick-wrap:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pick-wrap:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 4px; }
.pick { display: flex; flex-direction: column; cursor: pointer; flex: 1; }
.pick__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pick__sub { margin: 0; color: var(--muted); font-size: .95rem; }
.pick__text { margin: 0; font-size: 1rem; line-height: 1.5; }
.pick__price { margin-top: auto; padding-top: 12px; display: flex; align-items: baseline; gap: 8px; font-family: var(--serif); font-size: 1.75rem; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums; }
.pick__price small { font-family: var(--sans); font-size: .9rem; font-weight: 400; color: var(--muted); }
.check { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .25s cubic-bezier(.2, .9, .3, 1.4); box-shadow: 0 0 0 2px var(--paper); pointer-events: none; }
.pick-wrap:has(input:checked) .check { opacity: 1; transform: scale(1); }
.tag--added { display: inline-flex; align-items: center; gap: 6px; }
.tag--added svg { width: 14px; height: 14px; flex-shrink: 0; }
.tag { position: absolute; top: 14px; left: 14px; z-index: 2; background: var(--gold); color: var(--ink); font-size: .85rem; font-weight: 500; padding: 4px 12px; border-radius: 999px; box-shadow: 0 0 0 2px var(--paper); }

.media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink); border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0; }
.media--wide { aspect-ratio: 16 / 10; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--brand { display: grid; place-items: center; }
.media--brand svg { width: 38%; height: auto; max-height: 70%; }

.contents { border-top: 1px solid var(--line); }
.contents summary { cursor: pointer; padding: 14px 22px; font-weight: 500; font-size: .95rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.contents summary::-webkit-details-marker { display: none; }
.contents summary::after { content: "+"; font-size: 1.3rem; line-height: 1; }
.contents[open] summary::after { content: "−"; }
.contents ul { margin: 0; padding: 0 22px 18px; list-style: none; display: grid; gap: 4px; font-size: .96rem; }
.contents li { padding-left: 16px; position: relative; }
.contents li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px var(--ink); }

.advice { margin: 28px 0 0; padding: 16px 20px; background: var(--paper); border-left: 4px solid var(--gold); max-width: 62ch; }
.advice p { margin: 0; }
.advice p + p { margin-top: 6px; color: var(--muted); font-size: .95rem; }

/* ───────── Vinyle bar ───────── */
.feature { display: grid; gap: 28px; margin-top: 34px; }
@media (min-width: 760px) { .feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } }
.gallery { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery .g0 { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.gallery .g1, .gallery .g2 { aspect-ratio: 1 / 1; }
/* Grand écran : une grande photo à gauche, deux plus petites empilées à droite */
@container view (min-width: 980px) {
  .feature { gap: 48px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .gallery { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 4 / 3; gap: 10px; }
  .gallery .g0 { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: auto; }
  .gallery .g1, .gallery .g2 { grid-column: 2; aspect-ratio: auto; }
  .gallery .g1 { grid-row: 1; }
  .gallery .g2 { grid-row: 2; }
}
.feature__text { display: flex; flex-direction: column; gap: 16px; }
.feature__text p { margin: 0; }
.feature__price { font-family: var(--serif); font-size: 2.2rem; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums; }
.feature__price small { font-family: var(--sans); font-size: .95rem; font-weight: 400; color: var(--muted); margin-left: 6px; }
.feature__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ───────── Options ───────── */
.opt { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .2s ease, box-shadow .2s ease; }
.opt[data-active="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.opt__body { padding: 20px 22px 8px; display: flex; flex-direction: column; gap: 8px; }
.opt__accroche { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.08rem; line-height: 1.3; color: var(--muted); }
.opt__desc { margin: 4px 0 0; font-size: .98rem; line-height: 1.5; }
.opt__note { margin: 4px 0 0; padding: 9px 12px; background: #FBF3CF; border-left: 3px solid var(--gold); border-radius: 0 3px 3px 0; font-size: .95rem; font-weight: 500; line-height: 1.4; }
.opt__lines { margin: 12px 22px 0; display: grid; }
.opt__line { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.opt__line-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.opt__line-text strong { font-weight: 500; }
.opt__line-text small { color: var(--muted); font-size: .88rem; }
.opt__line-ctrl { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.opt__unit { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; font-size: .98rem; }
.opt__unit small { color: var(--muted); font-weight: 400; }
.opt__sub { margin: 0 22px; padding: 12px 0 4px; border-top: 1px solid var(--line); }
.opt__sub legend { font-weight: 500; font-size: .92rem; padding: 0; }
.opt fieldset.opt__sub { border-width: 1px 0 0; border-style: solid; border-color: var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 10px; }
.chip { position: relative; }
.chip span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .92rem; cursor: pointer; background: var(--cream); }
.chip i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-block; }
.chip input:checked + span { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.opt__clear { margin: 0 22px 14px; text-align: right; }
.opt__foot { height: 14px; }
.opt__radio { display: flex; align-items: center; gap: 12px; cursor: pointer; flex: 1; min-width: 0; }
.opt__radio input { width: 20px; height: 20px; accent-color: var(--ink); flex-shrink: 0; margin: 0; }

/* ───────── Récapitulatif final ───────── */
.recap { margin-top: 34px; display: grid; gap: 30px; max-width: 760px; }
.recap__main { display: grid; gap: 30px; min-width: 0; }
/* Grand écran : vos informations à gauche, le détail de l'offre et les boutons à droite */
@container view (min-width: 1000px) {
  .recap { max-width: none; grid-template-columns: minmax(250px, 4fr) minmax(0, 8fr); gap: clamp(32px, 4vw, 80px); align-items: start; }
  .facts { grid-template-columns: minmax(0, 1fr); }
}
.facts { display: grid; gap: 22px 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding: 24px; background: var(--paper); border: 1px solid var(--line); }
.facts h3 { font-size: 1.25rem; margin-bottom: 8px; }
.facts p { margin: 0; line-height: 1.5; }
.facts .muted { color: var(--muted); }
.lines { width: 100%; border-collapse: collapse; }
.lines caption { text-align: left; font-family: var(--serif); font-size: 1.25rem; font-weight: 500; padding: 0 0 8px; }
.lines th { text-align: left; font-weight: 500; font-size: .88rem; color: var(--muted); padding: 6px 0; border-bottom: 1px solid var(--line-strong); }
.lines th:not(:first-child), .lines td:not(:first-child) { text-align: right; white-space: nowrap; padding-left: 16px; }
.lines td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
.lines td small { display: block; color: var(--muted); font-size: .86rem; }
.lines tbody.group-start td { border-top: 0; }
.group-title td { padding: 22px 0 6px !important; font-family: var(--serif); font-size: 1.2rem; border-bottom: 0 !important; font-variant-numeric: normal; }
.totals { margin-left: auto; width: min(100%, 360px); display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.totals .grand { margin-top: 8px; padding-top: 12px; border-top: 2px solid var(--ink); color: var(--ink); align-items: baseline; }
.totals .grand strong { font-family: var(--serif); font-weight: 500; font-size: 2.4rem; line-height: 1; font-variant-numeric: lining-nums; }
.totals .grand span { font-weight: 500; }
.included { margin: 0; padding: 14px 18px; background: var(--gold-soft); border-radius: var(--r); font-weight: 500; }
.consent { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; max-width: 62ch; }
.consent input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--ink); flex-shrink: 0; }
.consent span { font-size: .98rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.status { margin: 0; min-height: 1.5em; font-weight: 500; }
.status--err { color: var(--err); }
.status--ok { color: var(--ink); }
.done { padding: 26px 26px 24px; background: var(--paper); border: 1px solid var(--ink); border-left-width: 6px; border-left-color: var(--gold); }
.done h3 { margin-bottom: 8px; }
.done p { margin: 0; }
.done p + p { margin-top: 8px; color: var(--muted); }
.legal { color: var(--muted); font-size: .9rem; max-width: 70ch; margin: 0; }

/* ───────── Barre de navigation fixe ───────── */
.dock { position: fixed; inset: auto 0 0 0; z-index: 20; background: rgba(251, 250, 242, .95); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
/* trois colonnes : Retour à gauche, total au centre, Continuer à droite ; les deux boutons ont le même visuel et la même largeur minimale, le total reste centré même quand Retour est caché */
.dock__inner { max-width: var(--max); margin: 0 auto; min-height: var(--dock-h); padding: 12px var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.dock .btn { min-width: 9.5rem; }
#dock-back { grid-column: 1; justify-self: start; }
#dock-next { grid-column: 3; justify-self: end; }
.dock__total { grid-column: 2; margin: 0; text-align: center; line-height: 1.2; font-size: .88rem; color: var(--muted); }
.dock__total strong { display: block; white-space: nowrap; font-family: var(--serif); font-weight: 500; font-size: 1.55rem; color: var(--ink); font-variant-numeric: lining-nums; }
@media (max-width: 520px) { .dock .btn { padding: 0 18px; min-width: 7rem; } .dock__total strong { font-size: 1.12rem; } .dock__inner { gap: 8px; } }

/* ───────── Grands écrans : tout tient sans défiler quand c'est possible ─────────
   Les hauteurs (photos, marges, titres) suivent la hauteur de la fenêtre (vh). */
@media (min-width: 1040px) {
  :root { --dock-h: 64px; }
  .top { padding-block: 8px 6px; row-gap: 2px; }
  .bars { height: 54px; }
  .bar__btn { height: calc(var(--h) * .7); }
  .progress { gap: 2px; }
  .progress__label { font-size: .86rem; }
  .layout { padding-top: clamp(16px, 3vh, 34px); padding-bottom: calc(var(--dock-h) + 24px); }
  .dock__inner { padding-block: 8px; }
  .dock .btn { min-height: 44px; }
  .view h1 { font-size: min(clamp(2.3rem, 5.2vw, 4.1rem), 8.5vh, 7.4cqw); }
  .view h2 { font-size: min(clamp(1.9rem, 3.6vw, 2.9rem), 5.6vh, 7.6cqw); }
  .view > .lead + * { margin-top: clamp(16px, 2.6vh, 30px); }
  .grid--formule .media { aspect-ratio: auto; height: clamp(170px, 31vh, 340px); }
  .grid--packs .media { aspect-ratio: auto; height: clamp(120px, 21vh, 240px); }
  .grid--opts .media { aspect-ratio: auto; height: clamp(120px, 19vh, 210px); }
  .pick__body { padding: 16px 22px 18px; gap: 6px; }
  .contents summary { padding: 11px 22px; }
  .advice { margin-top: clamp(12px, 2vh, 28px); padding: 12px 18px; }
  .form { row-gap: clamp(14px, 2.4vh, 26px); }
  .field input { min-height: clamp(42px, 5.2vh, 50px); }
  .lines td { padding-block: clamp(6px, 1.2vh, 12px); }
  .group-title td { padding: clamp(10px, 2vh, 22px) 0 4px !important; }
  .facts { padding: 20px 22px; gap: 16px 28px; }
}
/* Titres et chapeaux sur une seule ligne quand la colonne est assez large */
@container view (min-width: 400px) {
  .view h1, .view h2 { max-width: none; }
  .lead { max-width: 84ch; margin-top: 10px; }
}
/* Vinyle Bar : grande photo + deux petites, la hauteur suit celle de la fenêtre */
@container view (min-width: 760px) {
  .gallery { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: auto; height: clamp(280px, 54vh, 560px); gap: 10px; }
  .gallery .g0 { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: auto; }
  .gallery .g1, .gallery .g2 { grid-column: 2; aspect-ratio: auto; }
  .gallery .g1 { grid-row: 1; }
  .gallery .g2 { grid-row: 2; }
}
/* Étapes 1 et 2 : la photo « Nos réalisations » prend la moitié de la page, et le tout est centré en hauteur */
@media (min-width: 1040px) {
  .layout[data-step="1"], .layout[data-step="2"] {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center; align-content: center;
    min-height: calc(100dvh - 92px);
    padding-top: 24px;
  }
  .layout[data-step="1"] .aside, .layout[data-step="2"] .aside { position: static; }
  .layout[data-step="1"] .carousel__stage, .layout[data-step="2"] .carousel__stage { aspect-ratio: auto; height: clamp(260px, calc(100dvh - 300px), 780px); }
}
/* Offre finale : la colonne de droite fait double emploi, le récapitulatif prend toute la largeur */
.layout[data-step="7"] { grid-template-columns: minmax(0, 1fr); }
.layout[data-step="7"] .aside { display: none; }
.recap__table { min-width: 0; }
.recap__end { display: grid; gap: 22px; align-content: start; min-width: 0; }
@container view (min-width: 1000px) { .recap__end { gap: clamp(14px, 2.2vh, 22px); } }
@container view (min-width: 1180px) {
  .recap { grid-template-columns: minmax(230px, 3fr) minmax(0, 10fr); }
  .recap__main { grid-template-columns: minmax(0, 6fr) minmax(290px, 4fr); column-gap: clamp(28px, 3vw, 64px); align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel .slide { transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
}
.nb { white-space: nowrap; }
