/* Résid'Énergie: tokens from BRAND.md (section 5 colors, section 6 type).
   Font sizes are in rem (16 px root), so a reader's larger default font in the browser scales the text.
   unslop pass (unslop by @heydamir, CC BY 4.0): 4px grid, neutral shadows.
   Type scale taken from the Impeccable v2 (branch v2-landing): smaller titles, 700 tight, body 18 px. */

@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-latin.woff2?v=1") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --teal: #038286;
  --teal-dark: #026a6e;
  --brick: #c94b27;
  --brick-hover: #b0401f;
  --ink: #1f2a2b;
  --text: #2e3a3b;
  --text-muted: #4b5859;       /* from the ink ramp, 7.4:1 on white */
  --tint-cool: #edf6f6;
  --tint-warm: #fcf4f2;
  --highlight: #f4dbd4;
  --rule: #dce5e5;
  --white: #ffffff;
  /* Derived from the palette above (only the lit window is named in BRAND.md): each one has a single job. */
  --rule-warm: #efd9d1;        /* rules on the warm cards */
  --window-lit: #ffd2bf;       /* the lit window of the logo, on teal */
  --on-ink: #e4eded;           /* links on the ink footer */
  --on-ink-muted: #b4c1c1;     /* text on the ink footer */
  --on-ink-faint: #a3b1b1;     /* the footer base line */
  --field-border: #7c8f90;     /* input borders, 3.4:1 on white */
  --placeholder: #6b7576;      /* placeholders, 4.7:1 on white */
  --error: #a8361a;            /* form errors, 6.5:1 on white */
  --scrollbar: #93c3c4;        /* scrollbar thumb on the cool tint */

  --radius: 28px;
  --content: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --section: clamp(72px, 9vw, 112px);
  --header: 76px;
  /* About 68 characters of Montserrat per line. */
  --measure: 33em;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-panel: 0 2px 6px rgba(31, 42, 43, 0.05), 0 30px 60px -40px rgba(31, 42, 43, 0.4);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 20px);
  scrollbar-color: var(--scrollbar) var(--tint-cool);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal-dark); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }

::selection { background: var(--highlight); color: var(--ink); }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
/* On a teal band the teal ring would vanish: it turns white there, like the text. */
.contract :focus-visible,
.study-request__intro :focus-visible,
.motion :focus-visible { outline-color: var(--white); }

input, textarea { caret-color: var(--teal); }

h1, h2, h3 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem); margin: 0 0 0.5em; }

/* The highlighter stroke under « au bon prix ». On the landing it is drawn once, left to right, then the proof bubble settles:
   the page's one arrival. The default state is the drawn stroke, so nothing hides if the animation never runs. */
mark {
  background: linear-gradient(transparent 58%, var(--highlight) 58%, var(--highlight) 94%, transparent 94%) left / 100% 100% no-repeat;
  color: inherit;
  padding-inline: 0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero h1 mark { animation: highlight 0.7s var(--ease) 0.3s both; }
@keyframes highlight { from { background-size: 0% 100%; } }

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header,
main > section {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.site-header { padding-block: 24px; }
/* The logo link stays a 44 px touch target, as everywhere on the page. */
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { width: clamp(190px, 17vw, 236px); }


.not-found { padding-block: clamp(48px, 10vw, 128px); }
.not-found p { max-width: 68ch; }

/* Legal pages: a narrow reading column under the site header. */
/* The rule runs full width; the logo and the link line up with the footer. */
.legal-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); max-width: none; padding-inline: max(var(--gutter), calc((100% - var(--content)) / 2)); }
.legal-header .back { font-weight: 600; font-size: 1rem; }
.legal { max-width: calc(760px + 2 * var(--gutter)); margin: 0 auto; padding: clamp(48px, 7vw, 80px) var(--gutter) clamp(72px, 10vw, 112px); }
.legal > section { max-width: none; padding-inline: 0; margin-top: 48px; }
.legal h1 { font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.2rem); }
.legal h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.8rem); margin: 0 0 12px; }
.legal p, .legal ul { margin: 0; }
.legal section p + p, .legal section p + ul, .legal section ul + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: 8px; }
.legal .updated { color: var(--text-muted); font-size: 1rem; }

/* Footer, ink band (from the Impeccable v2): the logo and what we do, the legal links. No contact line. */
.site-footer { background: var(--ink); color: var(--on-ink-muted); font-size: 1.0625rem; line-height: 1.55; padding: clamp(56px, 7vw, 80px) var(--gutter) 32px; }
.site-footer__inner { max-width: var(--content); margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; gap: 40px 64px; flex-wrap: wrap; }
.site-footer__brand { max-width: 30em; }
.site-footer img { width: clamp(190px, 18vw, 236px); }
.site-footer p { margin: 0; }
.site-footer__brand p { margin-top: 20px; }
.site-footer__links { display: grid; gap: 16px; justify-items: end; text-align: right; }
.site-footer nav { display: flex; gap: 0 28px; flex-wrap: wrap; justify-content: flex-end; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a { color: var(--on-ink); text-underline-offset: 0.2em; }
.site-footer a:hover { color: var(--white); }
.site-footer :focus-visible { outline-color: var(--on-ink); }
.site-footer .site-footer__base { max-width: var(--content); margin: 48px auto 0; padding-top: 24px; border-top: 1px solid rgba(228, 237, 237, 0.16); font-size: 0.9375rem; color: var(--on-ink-faint); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--brick);
  color: var(--white);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(31, 42, 43, 0.12), 0 8px 20px -12px rgba(31, 42, 43, 0.35);
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.button:hover { background: var(--brick-hover); }
.button:active { transform: translateY(1px); }
.button--small { min-height: 44px; padding: 0 24px; font-size: 1rem; box-shadow: none; }
.button--small:hover { box-shadow: none; }

/* Landing, from the header to the establishments (style C): full-width bands, content up to --content. */
main > section.hero,
main > section.figures,
main > section.how,
main > section.establishments,
main > section.stories,
main > section.contract,
main > section.reviews,
main > section.faq { max-width: none; padding-inline: 0; }

.wrap {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-title { font-size: clamp(1.55rem, 1.15rem + 1.1vw, 2.1rem); line-height: 1.18; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-lead { margin: 16px 0 0; max-width: var(--measure); font-size: 1.125rem; color: var(--text-muted); text-wrap: pretty; }

/* Header: sticky, its button shows only when neither the hero button nor the form is on screen (assets/js/landing.js). */
.site-header--landing {
  position: sticky;
  top: 0;
  z-index: 20;
  max-width: none;
  padding: 0;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header--landing.is-scrolled { border-bottom-color: var(--rule); }
.site-header__inner {
  max-width: calc(var(--content) + 2 * var(--gutter));
  height: var(--header);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header__cta { transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s; }
.site-header__cta.is-hidden { opacity: 0; transform: translateY(-6px); visibility: hidden; pointer-events: none; }

/* 1. Hero: text on the left, the photo runs to the right edge of the screen. */
.hero {
  padding-block: 40px 96px;
  background: var(--tint-warm) linear-gradient(180deg, var(--white) 0%, var(--tint-warm) 100%);
}
.hero__grid {
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--gutter), 1fr)
    [text-start] minmax(0, 620px) [text-end]
    clamp(40px, 4.5vw, 64px)
    [photo-start] minmax(0, 636px)
    minmax(0, 1fr) [full-end];
  align-items: center;
}
.hero__text { grid-column: text; }
.hero h1 { margin: 0; font-size: clamp(2rem, 1.2rem + 1.9vw, 3rem); line-height: 1.1; letter-spacing: -0.025em; text-wrap: pretty; }
.slogan { margin: 20px 0 0; max-width: 26em; font-size: clamp(1.1rem, 1rem + 0.3vw, 1.25rem); line-height: 1.4; font-weight: 600; letter-spacing: -0.015em; color: var(--teal-dark); text-wrap: balance; }
.hero__lead { margin: 16px 0 0; max-width: 32em; font-size: 1.125rem; color: var(--text-muted); text-wrap: pretty; }
.hero__action { margin: 32px 0 0; }
.guarantees { margin: 16px 0 0; font-size: 1.125rem; font-weight: 600; color: var(--ink); }

/* The proof bubble, kept from the v1 at Julian's request, set on the unslop pass (4px grid, weight 600, neutral shadow). */
.proof {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 8px 24px 8px 12px;
  border-radius: 60px;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(31, 42, 43, 0.08), 0 16px 32px -16px rgba(31, 42, 43, 0.35);
  animation: settle 0.6s var(--ease) 0.9s both;
}
.proof__faces { display: flex; flex: none; padding-left: 12px; }
.proof__faces picture { display: block; flex: none; margin-left: -12px; }
.proof__faces img { width: 40px; height: 40px; max-width: none; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--white); }
.proof p { margin: 0; font-size: 1.125rem; line-height: 1.3; text-wrap: balance; color: var(--text-muted); }
.proof b { display: block; font-size: 1.25rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
@keyframes settle { from { opacity: 0; transform: translateY(12px); } }

.hero__photo { grid-column: photo-start / full-end; display: block; }
.hero__photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: max(480px, calc(100svh - var(--header) - 64px));
  object-fit: cover;
  border-radius: var(--radius) 0 0 160px;
  background: var(--highlight);
}

/* 2. Key figures: a white panel laid on the warm band. */
/* Above the next band, so the panel's shadow is not cut where the band ends. */
.figures { position: relative; z-index: 1; padding-block: 0 40px; background: var(--tint-warm); }
.figures__panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 48px;
  list-style: none;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
}
.figures__panel li { padding: 4px 40px; border-left: 1px solid var(--rule); }
.figures__panel li:first-child { padding-left: 0; border-left: 0; }
.figures__panel b { display: block; font-size: clamp(2.2rem, 1.6rem + 1.6vw, 3rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--teal); font-variant-numeric: lining-nums tabular-nums; }
.figures__panel span { display: block; margin-top: 12px; max-width: 22em; font-size: 1.125rem; }

/* 3. How it works: three steps, the motion beside them. */
.how { padding-block: var(--section); background: var(--tint-warm); }
/* The figures band already leaves 40 px under the panel: together, one section gap. */
.figures + .how { padding-top: calc(var(--section) - 40px); }
.how__grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(40px, 5vw, 72px); align-items: center; }
.steps { margin: 36px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 20px; padding-bottom: 28px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tint-cool);
  color: var(--teal-dark);
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
}
.steps h3 { grid-column: 2; margin: 12px 0 0; font-size: 1.1875rem; line-height: 1.4; }
.steps p { grid-column: 2; margin: 4px 0 0; max-width: var(--measure); font-size: 1.125rem; color: var(--text-muted); }

/* The motion slot: 16:9. Until the video file exists, a still: thirty windows, one lit, like the logo's. */
.motion {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(31, 42, 43, 0.06), 0 30px 60px -36px rgba(31, 42, 43, 0.4);
}
.motion__stage { position: absolute; inset: 0; }
.motion[data-motion="still"] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(24px, 2.4vw, 32px); padding: 32px 8%; }
.motion[data-motion="still"] .motion__stage { position: static; display: grid; place-items: center; width: 100%; }
.motion__windows { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, 1vw, 12px); width: min(34%, 260px); }
.motion__windows i { aspect-ratio: 1 / 1; border: 2px solid rgba(255, 255, 255, 0.78); border-radius: 22%; }
.motion__windows i.lit { background: var(--window-lit); border-color: var(--window-lit); box-shadow: 0 6px 16px -6px rgba(31, 42, 43, 0.45); }
.motion figcaption { text-align: center; font-size: clamp(1.125rem, 1.4vw, 1.25rem); line-height: 1.4; }
.motion figcaption b { display: block; text-wrap: balance; font-size: clamp(1.125rem, 1.75vw, 1.5rem); line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }
.motion[data-motion="live"] figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.motion video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.motion__sound {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(31, 42, 43, 0.82);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.motion__sound[hidden] { display: none; }
.motion__sound:hover { background: var(--ink); }
.motion__sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.motion__sound[aria-pressed="false"] .motion__sound-on,
.motion__sound[aria-pressed="true"] .motion__sound-off { display: none; }

/* 4. Establishments: four large photo tiles, a text card laid on each. */
.establishments { padding-block: var(--section); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.tile { position: relative; }
.tile__photo { display: block; }
.tile__photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: var(--highlight); }
.tile__text {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 20px 24px;
  border-radius: 12px; /* nested: 28 outer minus 16 inset */
  background: var(--white);
  box-shadow: 0 14px 30px -18px rgba(31, 42, 43, 0.45);
}
.tile h3 { margin: 0; font-size: 1.25rem; line-height: 1.3; }
.tile p { margin: 4px 0 0; font-size: 1.125rem; line-height: 1.5; color: var(--text-muted); text-wrap: pretty; }
.establishments__more { max-width: 28em; margin: 48px auto 0; text-align: center; text-wrap: balance; font-size: 1.125rem; font-weight: 600; color: var(--ink); }

/* 5. Stories: four warm cards, each led by its figure (the Impeccable logic, smaller). */
.stories { padding-block: var(--section); }
.establishments + .stories { padding-top: 0; }
.stories__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.story {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.2vw, 44px);
  border-radius: var(--radius);
  background: var(--tint-warm);
}
.story h3 { margin: 0; font-size: clamp(1.1875rem, 1.4vw, 1.3125rem); line-height: 1.3; text-wrap: balance; }
.story p { margin: 12px 0 0; max-width: var(--measure); color: var(--text-muted); text-wrap: pretty; }
.story .story__figure { margin: 0 0 16px; max-width: none; font-size: clamp(2rem, 1.5rem + 1.2vw, 2.6rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--teal); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }

/* 6. Only the contract changes: full teal band, white text; the heading and its photo on the left, the four points as ruled rows on the right.
   The photo fills what the heading leaves, so it ends exactly on the last row of the list. */
.contract { padding-block: var(--section); background: var(--teal); color: var(--white); }
.contract__grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 96px); align-items: stretch; }
.contract h2, .contract h3 { color: var(--white); }
.contract .section-lead { color: var(--white); }
.contract__head { display: flex; flex-direction: column; }
.contract__photo { position: relative; display: block; flex: 1 1 auto; min-height: 280px; margin-top: 40px; }
.contract__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); background: var(--teal-dark); }
.contract__list { margin: 0; padding: 0; list-style: none; }
.contract__list li {
  display: grid;
  grid-template-columns: minmax(0, 13em) minmax(0, 1fr);
  gap: 8px 40px;
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}
.contract__list li:first-child { padding-top: 0; border-top: 0; }
.contract__list li:last-child { padding-bottom: 0; }
.contract__list h3 { margin: 0; font-size: 1.1875rem; line-height: 1.3; text-wrap: balance; }
.contract__list p { margin: 0; max-width: var(--measure); }

/* 7. Reviews (from the Impeccable v2): the quote with the figure leads on the left, the two others stacked on the right, ruled rows on the warm band. */
.reviews { padding-block: var(--section); background: var(--tint-warm); }
.reviews__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 clamp(40px, 6vw, 96px); align-items: start; }
.review { display: flex; flex-direction: column; gap: 24px; margin: 0; padding-block: 32px; border-top: 1px solid var(--rule-warm); }
.review--lead { grid-row: span 2; border-top: 2px solid var(--ink); }
.review--lead + .review { border-top: 2px solid var(--ink); }
.review blockquote { margin: 0; }
.review blockquote p { margin: 0; color: var(--ink); font-size: 1.125rem; line-height: 1.55; font-weight: 500; letter-spacing: -0.01em; text-wrap: pretty; }
.review--lead blockquote p { font-size: clamp(1.25rem, 1rem + 0.7vw, 1.6rem); line-height: 1.4; font-weight: 600; }
.review blockquote p::before { content: "«\00a0"; color: var(--teal); }
.review blockquote p::after { content: "\00a0»"; color: var(--teal); }
.review figcaption { color: var(--text-muted); line-height: 1.45; }
.review figcaption b { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 700; }

/* 8. FAQ: the heading on top, the ten questions under it in two columns of five, across the full width.
   Two separate columns, so opening a question only pushes down its own column. */
.faq { padding-block: var(--section); }
.faq__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; align-items: start; }
.faq__col { display: grid; gap: 12px; }
.faq details {
  padding-inline: 28px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--white);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.faq details[open] { background: var(--tint-cool); border-color: var(--tint-cool); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
  transition: color 0.15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--teal-dark); }
.faq summary:focus-visible { outline-offset: 6px; border-radius: 6px; }
.faq__sign { position: relative; flex: none; width: 24px; height: 24px; }
.faq__sign::before,
.faq__sign::after { content: ""; position: absolute; left: 4px; right: 4px; top: 11px; height: 2px; border-radius: 2px; background: var(--teal); transition: transform 0.3s var(--ease); }
.faq__sign::after { transform: rotate(90deg); }
.faq details[open] .faq__sign::after { transform: rotate(0deg); }
.faq details p { margin: -4px 0 0; padding-bottom: 24px; max-width: var(--measure); color: var(--text-muted); }
/* The answer unfolds instead of jumping in: a short fade everywhere, and the height itself where the browser can
   animate to auto. Closing is quicker than opening. */
.faq details[open] p { animation: faq-answer 0.26s var(--ease); }
@keyframes faq-answer { from { opacity: 0; transform: translateY(-4px); } }
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.18s var(--ease), content-visibility 0.18s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; transition-duration: 0.26s; }
}

/* Phones: the button bar fixed at the bottom, between the hero and the form (assets/js/landing.js). */
.mobile-cta { display: none; }

@media (max-width: 900px) {
  .hero { padding-block: 16px 64px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); row-gap: 28px; padding-inline: var(--gutter); }
  .hero__text, .hero__photo { grid-column: 1; }
  .hero__photo { order: -1; }
  .hero__photo img { aspect-ratio: 16 / 11; max-height: none; border-radius: var(--radius) var(--radius) var(--radius) 90px; }

  .figures__panel { grid-template-columns: minmax(0, 1fr); padding: 8px 28px; }
  .figures__panel li, .figures__panel li:first-child { padding: 24px 0; border-left: 0; }
  .figures__panel li + li { border-top: 1px solid var(--rule); }

  .how__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .how__text { display: contents; }
  .how .section-title { order: 1; }
  .motion { order: 2; }
  .steps { order: 3; margin-top: 8px; }

  .tiles { grid-template-columns: minmax(0, 1fr); }

  .stories__list { grid-template-columns: minmax(0, 1fr); }
  .contract__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .faq__list { grid-template-columns: minmax(0, 1fr); }
  .contract__photo { flex: none; min-height: 0; margin-top: 32px; }
  .contract__photo img { position: static; height: auto; aspect-ratio: 4 / 3; }
}

@media (max-width: 600px) {
  :root { --header: 64px; --gutter: 16px; }
  .site-header__cta { display: none; }
  .hero h1 { font-size: clamp(1.7rem, 7.2vw, 2rem); }
  .slogan { margin-top: 16px; font-size: 1.125rem; }
  .hero__lead, .section-lead { font-size: 1.125rem; }
  .hero__action .button { width: 100%; }
  .guarantees { font-size: 1.0625rem; }
  .proof { padding-right: 20px; }
  .proof p { font-size: 1.0625rem; }
  .proof__faces img { width: 32px; height: 32px; }
  .section-head { margin-bottom: 36px; }
  .figures__panel { padding: 4px 24px; }
  .steps p, .tile p, .figures__panel span { font-size: 1.0625rem; }
  /* On a phone the still flows (windows, then caption); the video keeps its 16:9. */
  .motion[data-motion="still"] { aspect-ratio: auto; padding: 32px 20px 28px; }
  .motion__windows { width: min(52%, 200px); gap: 8px; }
  .motion figcaption { font-size: 1.0625rem; }
  .motion figcaption b { font-size: 1.125rem; }
  .tile__photo img { aspect-ratio: 4 / 3; }
  .tile__text { position: relative; left: auto; right: auto; bottom: auto; margin: -56px 12px 0; padding: 16px 20px; }
  .tile h3 { font-size: 1.25rem; }
  .establishments__more { font-size: 1.125rem; text-align: left; }

  .story h3 { font-size: 1.1875rem; }
  .contract__list li { grid-template-columns: minmax(0, 1fr); padding: 24px 0; }
  .contract__list li:first-child { padding-top: 0; }
  .contract__list h3 { font-size: 1.1875rem; }
  .review--lead blockquote p { font-size: 1.25rem; }
  .faq details { padding-inline: 20px; }
  .faq summary { font-size: 1.0625rem; padding: 20px 0; gap: 16px; }

  .mobile-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--rule);
    box-shadow: 0 -12px 28px -20px rgba(31, 42, 43, 0.45);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0.35s;
  }
  .mobile-cta.is-visible { transform: none; visibility: visible; }
  .mobile-cta .button { width: 100%; min-height: 56px; }

  .site-footer__links { justify-items: start; text-align: left; }
  .site-footer nav { justify-content: flex-start; }
}

@media (max-width: 1080px) {
  .reviews__grid { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
  .review--lead { grid-row: auto; }
  .review--lead + .review { border-top: 1px solid var(--rule-warm); }
}

/* Study Request form (#demande): a full teal band; the title on top, then one wide white card, fields in two columns. */
main > section.study-request {
  max-width: none;
  padding: clamp(72px, 9vw, 112px) 0;
  background: var(--teal);
  color: var(--white);
}
.study-request__inner {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.study-request__intro { margin-bottom: 40px; }
.study-request h2 {
  color: var(--white);
  font-size: clamp(1.55rem, 1.15rem + 1.1vw, 2.1rem);
  margin: 0;
}

.study-form {
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  padding: clamp(28px, 3.5vw, 44px);
  box-shadow: 0 2px 6px rgba(31, 42, 43, 0.12), 0 30px 60px -30px rgba(31, 42, 43, 0.5);
}
.study-form [hidden] { display: none !important; }
.study-form__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; align-items: start; }
.study-form__send-error { grid-column: 1 / -1; }
.study-form h3 { font-size: 1.375rem; margin: 0; }
.study-form h3:focus { outline: 0; }

.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field label { font-size: 1rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.field__optional { font-weight: 400; color: var(--text-muted); }
.field__hint { margin: 0; font-size: 0.9375rem; line-height: 1.45; color: var(--text-muted); text-wrap: pretty; }
.field input:not([type="checkbox"]) {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1.5px solid var(--field-border);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: 400 1.125rem/1.2 "Montserrat", system-ui, sans-serif;
  transition: border-color 0.15s;
}
.field input::placeholder { color: var(--placeholder); opacity: 1; }
.field input:not([type="checkbox"]):hover { border-color: var(--text); }
.field input:not([type="checkbox"]):focus { border-color: var(--teal); }
.field__amount { position: relative; }
.field__amount input:not([type="checkbox"]) { padding-right: 44px; }
.field__unit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}
.field__error { margin: 0; font-size: 0.9375rem; line-height: 1.45; font-weight: 600; color: var(--error); }
.field__error:empty { display: none; }
.field--invalid input:not([type="checkbox"]) { border-color: var(--error); }

.field--consent { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: start; }
.field--consent input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--teal);
  cursor: pointer;
}
.field--consent label { font-size: 0.9375rem; font-weight: 400; line-height: 1.5; color: var(--text-muted); cursor: pointer; }
.field--consent .field__error { grid-column: 2; }
.field--consent .field__note { grid-column: 2; margin: 0; font-size: 0.9375rem; line-height: 1.5; }
/* The privacy link reads as inline text but takes a 44 px tall touch area. */
.field--consent .field__note a { display: inline-block; padding-block: 12px; margin-block: -12px; }
.field--consent.field--invalid input { outline: 2px solid var(--error); outline-offset: 2px; }

.study-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.study-form__submit {
  align-self: center;
  width: 100%;
  min-height: 56px;
  border: 0;
  font: 700 1.0625rem/1.2 "Montserrat", system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(31, 42, 43, 0.12), 0 8px 20px -12px rgba(31, 42, 43, 0.35);
}
.study-form__submit:disabled { opacity: 0.75; cursor: progress; }
.study-form__send-error { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--error); }
.study-form__send-error a { color: inherit; font-weight: 600; overflow-wrap: anywhere; }

.study-form__thanks { display: grid; gap: 16px; }
.study-form__thanks h3 { color: var(--teal-dark); }
.study-form__thanks p { margin: 0; color: var(--text-muted); }

@media (max-width: 900px) {
  .study-form__fields { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 640px) {
  .study-form { padding: 28px 20px; }
  .study-form__submit { padding-inline: 12px; }
}

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
