:root {
  --bg: #f4f4f2;
  --surface: #ebe9e4;
  --paper: #ffffff;
  --ink: #171513;
  --muted: #5e5852;
  --accent: #171513;
  --accent-ink: #ffffff;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-text: "Switzer", system-ui, sans-serif;

  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --step-head: clamp(2.5rem, 1.6rem + 3.4vw, 4.75rem);
  --step-display: clamp(3.25rem, 1.4rem + 5.6vw, 7.25rem);

  --margin: clamp(1rem, 3vw, 3rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(6rem, 12vw, 12rem);
  --screen-radius: 18px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, ul, ol, dl, dd, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; background: var(--surface); }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:target { scroll-margin-top: 5rem; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { font-weight: inherit; text-wrap: balance; }
p { max-width: 62ch; text-wrap: pretty; }
.nums { font-variant-numeric: tabular-nums; }
.wrap { padding-inline: var(--margin); }
.head { font-family: var(--font-display); font-weight: 500; font-size: var(--step-head); line-height: 1; letter-spacing: -0.015em; }
.lead { font-size: var(--step-lead); line-height: 1.4; max-width: 36ch; }

.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; text-decoration-thickness: 1px; transition: text-decoration-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: currentColor; } }
.link-plain { font-weight: 500; text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; transition: opacity var(--t-hover) ease; }
.link-plain:hover { opacity: 0.65; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.6rem; background: var(--accent); color: var(--accent-ink); font-weight: 500; text-decoration: none; white-space: nowrap; border-radius: 999px; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.button:hover { background: #3b3732; }
.button:active { transform: scale(0.97); }
.button--small { min-height: 2.5rem; padding: 0 1.15rem; font-size: var(--step-small); }
.button--clair { background: var(--bg); color: var(--ink); }
.button--clair:hover { background: #ffffff; }

/* ---------- barre ---------- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 4.25rem; background: var(--bg); font-size: var(--step-small); }
.bar__mark { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; text-decoration: none; }
.bar__nav { display: flex; gap: 2rem; }
.bar__cta { justify-self: end; }

/* ---------- hero épinglé ---------- */
.hero { position: relative; height: 100svh; }
.js .hero { height: 260svh; }
.hero__stage { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; padding-top: 4.25rem; }
.hero__texte { grid-column: 1 / span 6; }
.hero__titre { font-family: var(--font-display); font-weight: 500; font-size: var(--step-display); line-height: 0.98; letter-spacing: -0.02em; }
.hero__lead { margin-top: 2.25rem; font-size: var(--step-lead); line-height: 1.4; max-width: 30ch; }
.hero__actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; }
.hero__ecran { grid-column: 8 / span 5; justify-self: center; display: grid; justify-items: center; gap: 1.25rem; }
.hero__frames { position: relative; height: min(74svh, 46rem); aspect-ratio: 640 / 1385; border-radius: var(--screen-radius); overflow: hidden; background: var(--surface); }
.hero__frame { position: absolute; inset: 0; opacity: 0; transition: opacity 600ms var(--ease-out); }
.hero__frame.is-on { opacity: 1; }
.hero__frame:first-child { position: relative; height: 100%; }
.hero__frame img { width: 100%; height: 100%; object-fit: cover; }
.hero__legende { font-size: var(--step-small); color: var(--muted); text-align: center; }

/* ---------- réalisations ---------- */
.real { padding-block: calc(var(--section) * 0.5) var(--section); }
.real .head { margin-bottom: clamp(3rem, 6vw, 5rem); }
.projet { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.projet + .projet { margin-top: clamp(5rem, 10vw, 9rem); }
.projet__info { grid-column: 1 / span 3; display: grid; gap: 1rem; padding-bottom: 0.5rem; }
.projet__nom { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 1.4rem + 1.6vw, 3rem); line-height: 1; letter-spacing: -0.01em; }
.projet__type { font-weight: 500; }
.projet__formule { color: var(--muted); }
.projet__ecrans { grid-column: 4 / span 9; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.projet__ecrans img { width: 100%; border-radius: var(--screen-radius); }
.projet--inverse .projet__ecrans { grid-column: 1 / span 9; grid-row: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-right: calc((100% - 3 * var(--gutter)) / 12); }
.projet--inverse .projet__info { grid-column: 10 / span 3; grid-row: 1; }

/* ---------- carte vivante ---------- */
.carte { padding-block: var(--section) calc(var(--section) * 0.6); background: var(--surface); }
.carte__head { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); align-items: end; }
.carte__head .head { grid-column: 1 / span 6; }
.carte__head .lead { grid-column: 8 / span 5; }
.carte__grid { margin-top: clamp(3rem, 6vw, 5rem); display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); align-items: center; }
.apercu { grid-column: 1 / span 6; }
.invit { background: var(--paper); aspect-ratio: 4 / 5; max-width: 30rem; padding: clamp(1.75rem, 3vw, 3rem); display: flex; flex-direction: column; text-align: center; align-items: center; border-radius: 4px; }
.invit__type { font-weight: 500; font-size: var(--step-small); color: var(--muted); }
.invit__cher { margin-top: auto; font-size: var(--step-body); }
.invit__nom { margin-top: 0.25rem; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); line-height: 1.05; overflow-wrap: anywhere; transition: opacity 200ms ease; }
.invit__texte { margin-top: 1rem; max-width: 30ch; }
.invit__btn { margin-top: 1.75rem; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.3rem; background: var(--ink); color: var(--paper); font-weight: 500; font-size: var(--step-small); border-radius: 999px; }
.invit__lien { margin-top: auto; padding-top: 1.5rem; font-size: var(--step-small); color: var(--muted); }
.invit.is-flip .invit__nom, .invit.is-flip .invit__texte { opacity: 0.25; }

.reglages { grid-column: 8 / span 5; display: grid; gap: 2rem; }
.choix { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choix legend, .nom > span { display: block; width: 100%; padding: 0; margin-bottom: 0.9rem; font-weight: 500; }
.choix label { position: relative; }
.choix input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choix span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.15rem; background: var(--bg); border-radius: 999px; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.choix label:hover span { background: #ffffff; }
.choix input:checked + span { background: var(--ink); color: var(--bg); }
.choix input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.choix label:active span { transform: scale(0.96); }
.field { width: 100%; min-height: 3.25rem; padding: 0.7rem 1rem; background: var(--bg); border: 0; border-radius: 4px; font-size: max(1rem, var(--step-body)); }
.field:focus { background: #ffffff; }
.reglages__note { color: var(--muted); }
.reglages .button { justify-self: start; }

/* ---------- suivi ---------- */
.suivi { padding-block: calc(var(--section) * 0.6) var(--section); display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); row-gap: clamp(3rem, 5vw, 4.5rem); align-items: end; }
.suivi__texte { grid-column: 1 / span 7; display: grid; gap: 1.5rem; }
.suivi__texte .lead { max-width: 44ch; }
.suivi__rsvp { grid-column: 1 / span 3; }
.suivi__admin { grid-column: 4 / span 9; }
.suivi figure img { width: 100%; border-radius: var(--screen-radius); }
.suivi__admin img { border-radius: 8px; }
.suivi figcaption { margin-top: 0.9rem; font-size: var(--step-small); color: var(--muted); }

/* ---------- formules : billets ---------- */
.formules { background: var(--surface); padding-block: var(--section); }
.formules .head { margin-bottom: clamp(3rem, 5vw, 4.5rem); }
.ticket { --notch: 28px; position: relative; display: grid; grid-template-columns: 7fr 3fr; width: min(100%, 68rem); margin-inline: auto; background: var(--paper); }
.ticket + .ticket { margin-top: 2rem; }
.ticket::before, .ticket::after { content: ""; position: absolute; left: 70%; width: var(--notch); height: var(--notch); margin-left: calc(var(--notch) / -2); border-radius: 50%; background: var(--surface); }
.ticket::before { top: calc(var(--notch) / -2); }
.ticket::after { bottom: calc(var(--notch) / -2); }
.ticket__main { padding: clamp(1.75rem, 3vw, 2.75rem); display: flex; flex-direction: column; gap: 2.25rem; border-right: 6px dotted var(--surface); }
.ticket__nom { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.25rem, 1.4rem + 2.4vw, 3.5rem); line-height: 1; }
.ticket__liste { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 2rem; margin-top: auto; }
.ticket__liste li { max-width: 30ch; }
.ticket__stub { padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1.25rem, 2vw, 2rem); display: flex; flex-direction: column; justify-content: center; text-align: center; }
.ticket__prix { margin-inline: auto; font-family: var(--font-display); font-weight: 600; font-size: clamp(2.25rem, 1.4rem + 2vw, 3.25rem); line-height: 1; white-space: nowrap; }
.ticket__unite { margin: 0.4rem auto 0; color: var(--muted); }
.ticket__btn { margin-top: 1.75rem; display: flex; align-items: center; justify-content: center; min-height: 3.25rem; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500; border-radius: 999px; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.ticket__btn:hover { background: #3b3732; }
.ticket__btn:active { transform: scale(0.97); }
.mesure { width: min(100%, 68rem); margin: 4rem auto 0; display: grid; grid-template-columns: 7fr 5fr; column-gap: var(--gutter); row-gap: 1rem; align-items: baseline; }
.mesure__titre { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 1.4rem + 1.6vw, 2.75rem); line-height: 1; grid-row: span 2; }
.mesure a { justify-self: start; }

/* ---------- étapes ---------- */
.etapes { padding-block: var(--section); }
.etapes__liste { margin-top: clamp(3rem, 5vw, 4.5rem); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.etapes__liste li { display: grid; align-content: start; gap: 0.9rem; padding-top: 1.5rem; }
.etapes__liste h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.75rem, 1.3rem + 1vw, 2.25rem); line-height: 1.05; }
.etapes__liste p { max-width: 30ch; }
.etapes__liste li:nth-child(2) { margin-top: 3rem; }
.etapes__liste li:nth-child(3) { margin-top: 6rem; }
.etapes__liste li:nth-child(4) { margin-top: 9rem; }

/* ---------- questions ---------- */
.faq { padding-block: 0 var(--section); }
.faq__row { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); align-items: baseline; }
.faq__row + .faq__row { margin-top: clamp(3rem, 5vw, 4.5rem); }
.faq__q { grid-column: 1 / span 6; font-family: var(--font-display); font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); font-weight: 500; line-height: 1.1; }
.faq__q--titre { color: var(--muted); }
.faq__a { grid-column: 8 / span 5; max-width: 40ch; }

/* ---------- contact ---------- */
.contact { background: var(--ink); color: var(--bg); padding-block: var(--section); }
.contact__in { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); align-items: end; }
.contact__titre { grid-column: 1 / span 7; font-family: var(--font-display); font-weight: 500; font-size: var(--step-display); line-height: 0.98; letter-spacing: -0.02em; }
.contact__col { grid-column: 9 / span 4; display: grid; gap: 1.75rem; justify-items: start; }
.contact__tels { display: grid; gap: 0.6rem; width: 100%; }
.contact__tels div { display: flex; justify-content: space-between; gap: 1rem; }
.contact__tels dt { color: #b9b3ab; }

/* ---------- pied ---------- */
.pied { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 1.5rem; padding-block: 2rem; font-size: var(--step-small); background: var(--ink); color: #b9b3ab; }
.pied nav { display: flex; gap: 1.5rem; }
.pied nav a { color: var(--bg); }
.pied__an { justify-self: end; }

.flottant { display: none; }

/* ---------- tablette ---------- */
@media (max-width: 1000px) {
  .hero__texte { grid-column: 1 / span 7; }
  .hero__ecran { grid-column: 8 / span 5; }
  .hero__frames { height: min(62svh, 40rem); }
  .projet__info, .projet--inverse .projet__info { grid-column: 1 / -1; grid-row: 1; margin-bottom: 2rem; }
  .projet__ecrans, .projet--inverse .projet__ecrans { grid-column: 1 / -1; grid-row: 2; padding-right: 0; }
  .carte__head, .carte__grid { grid-template-columns: 1fr; row-gap: 1.5rem; }
  .carte__head .head, .carte__head .lead, .apercu, .reglages { grid-column: 1; }
  .carte__grid { row-gap: 2.5rem; }
  .etapes__liste { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .etapes__liste li:nth-child(n) { margin-top: 0; }
  .faq__q { grid-column: 1 / span 7; }
  .contact__titre { grid-column: 1 / span 7; }
  .contact__col { grid-column: 8 / span 5; }
}

/* ---------- téléphone ---------- */
@media (max-width: 700px) {
  .bar { position: absolute; grid-template-columns: 1fr auto; height: 3.75rem; }
  .bar__nav { display: none; }
  .js .hero { height: auto; }
  .hero { height: auto; }
  .hero__stage { position: static; height: auto; display: block; padding-top: 6rem; }
  .hero__lead { margin-top: 1.5rem; }
  .hero__ecran { margin-top: 3rem; }
  .real { padding-top: var(--section); }
  .hero__frames { height: auto; width: min(78vw, 22rem); }
  .hero__frame { transition: none; }
  .projet__ecrans, .projet--inverse .projet__ecrans { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0.75rem; margin-inline: calc(var(--margin) * -1); padding-inline: var(--margin); scrollbar-width: none; }
  .projet__ecrans img { flex: 0 0 62vw; scroll-snap-align: start; }
  .suivi__texte, .suivi__rsvp, .suivi__admin { grid-column: 1 / -1; }
  .suivi__rsvp { width: 70%; }
  .ticket { grid-template-columns: 1fr; }
  .ticket::before, .ticket::after { display: none; }
  .ticket__main { border-right: 0; border-bottom: 6px dotted var(--surface); padding-bottom: 2.25rem; }
  .ticket__stub { position: relative; padding-top: 2.75rem; }
  .ticket__stub::before, .ticket__stub::after { content: ""; position: absolute; top: calc(var(--notch) / -2 - 3px); width: var(--notch); height: var(--notch); border-radius: 50%; background: var(--surface); }
  .ticket__stub::before { left: calc(var(--notch) / -2); }
  .ticket__stub::after { right: calc(var(--notch) / -2); }
  .ticket__liste { grid-template-columns: 1fr; }
  .mesure { grid-template-columns: 1fr; }
  .mesure__titre { grid-row: auto; }
  .etapes__liste { grid-template-columns: 1fr; }
  .faq__row { grid-template-columns: 1fr; }
  .faq__q, .faq__a { grid-column: 1; }
  .faq__q { font-size: 1.75rem; }
  .faq__a { margin-top: 0.75rem; }
  .contact__in { grid-template-columns: 1fr; row-gap: 2.5rem; }
  .contact__titre, .contact__col { grid-column: 1; }
  .pied { grid-template-columns: 1fr; gap: 0.6rem; padding-bottom: 6rem; }
  .pied__an { justify-self: start; }
  .flottant { display: inline-flex; position: fixed; right: 16px; bottom: 16px; z-index: 30; transition: opacity var(--t-hover) ease; }
  .flottant.is-off { opacity: 0; visibility: hidden; transition: opacity var(--t-hover) ease, visibility 0s linear var(--t-hover); }
}

/* ---------- mouvement ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .hero__titre { animation: monte 900ms var(--ease-out) both 100ms; }
  .js .hero__lead { animation: monte 900ms var(--ease-out) both 220ms; }
  .js .hero__actions { animation: monte 900ms var(--ease-out) both 320ms; }
  .js .hero__frames { animation: ouvre 1200ms var(--ease-in-out) both 150ms; }
  .projet__ecrans img { transition: transform 400ms var(--ease-out); }
  .projet__ecrans img:hover { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .js .hero { height: 100svh; }
  .hero__frame:not(:first-child) { display: none; }
}
@keyframes monte { from { opacity: 0; transform: translateY(24px); } }
@keyframes ouvre { from { clip-path: inset(100% 0 0 0 round var(--screen-radius)); } to { clip-path: inset(0 round var(--screen-radius)); } }
