/* =====================================================================
   Ébénisterie HA — feuille de style
   Palette : noir et or, reprise de la carte d'affaires.
   Le noir profond de la carte, l'or métallique du logo, un ivoire chaud
   pour les sections claires.
   ===================================================================== */

/* ---------- tokens ---------------------------------------------------- */

:root {
  /* surfaces */
  --bg: #FAF7F0;
  --bg-alt: #F1ECE0;
  --surface: #ffffff;
  --dark: #0B0B0C;   /* le noir de la carte */
  --dark-2: #141416;
  --dark-3: #1D1D20;

  /* ink */
  --fg: #16161A;
  --fg-muted: #5E5A50;
  --dark-fg: #F6F2E9;
  --dark-muted: #BCB3A0;

  /* or — la rampe métallique du logo, du plus sombre au plus clair */
  --gold-deep: #8A5F12;
  --gold-dark: #B6821C;
  --gold: #D9A33A;
  --gold-bright: #F2C953;
  --gold-light: #F9DD92;
  --gold-sheen: #FCF3D2; /* le point de lumière du dégradé */

  /* rôles */
  --accent: #7D5A12; /* bronze, interactif sur fond clair — 6,5:1 avec du blanc */
  --accent-bright: #F2C953; /* or vif sur fond sombre — 12:1 sur --dark */
  --accent-soft: #F8EFD8; /* fond des pastilles : or pâle */

  /* triplets, pour les voiles et les ombres */
  --accent-rgb: 242, 201, 83;
  --accent-deep-rgb: 125, 90, 18;
  --dark-fg-rgb: 246, 242, 233;
  --dark-rgb: 11, 11, 12;

  --border: #E5DCC7;
  --border-dark: #2B2820;

  /* type */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* rythme vertical — densité standard */
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2rem;
  --s5: 3rem;
  --s6: 4rem;
  --s7: 6rem;
  --s8: 8.5rem;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --container: 1240px;
  --radius: 4px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(22, 18, 8, 0.07), 0 2px 8px rgba(22, 18, 8, 0.05);
  --shadow-md: 0 2px 4px rgba(22, 18, 8, 0.07), 0 12px 28px rgba(22, 18, 8, 0.09);
  --shadow-lg: 0 4px 8px rgba(22, 18, 8, 0.08), 0 24px 56px rgba(22, 18, 8, 0.13);
  --shadow-gold: 0 10px 30px rgba(var(--accent-deep-rgb), 0.25);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 240ms;

  /* z-index scale */
  --z-header: 100;
  --z-nav: 110;

  color-scheme: light;
}

/* ---------- reset ---------------------------------------------------- */

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

/* Toute règle `display:` l'emporte sur la valeur par défaut du navigateur
   pour `[hidden]`. Sans ceci, `.configurator { display: grid }` rendait le
   configurateur visible en permanence, même quand le JS le masque via
   `host.hidden = true`. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Lenis sets `.lenis` on the root itself; key off that rather than adding a
   competing class, which Lenis overwrites when it manages className. */
html.lenis {
  scroll-behavior: auto;
}

html.lenis,
html.lenis body {
  overscroll-behavior: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-locked {
  overflow: hidden;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: 'SOFT' 20, 'WONK' 1;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s3);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.65rem, 6.6vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(2rem, 4.2vw, 3.3rem);
}
h3 {
  font-size: clamp(1.2rem, 1.6vw, 1.45rem);
  line-height: 1.24;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--s2);
}

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--accent-bright);
  color: #130F04;
}

/* ---------- utilitaires ---------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(4rem, 9vw, var(--s8));
  position: relative;
}

.section--alt {
  background: var(--bg-alt);
}

.section--dark {
  background: var(--dark);
  color: var(--dark-fg);
}

.section--dark h2,
.section--dark h3 {
  color: var(--dark-fg);
}

.lead {
  font-size: clamp(1.0625rem, 1.4vw, 1.28rem);
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 60ch;
}

.section--dark .lead {
  color: var(--dark-muted);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s2);
}

.kicker::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.section--dark .kicker,
.hero .kicker {
  color: var(--accent-bright);
}

.section-head {
  max-width: 68ch;
  margin-bottom: clamp(2.5rem, 5vw, var(--s6));
}

.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- reveals -------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 620ms var(--ease), transform 720ms var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal][data-delay='1'] {
  transition-delay: 70ms;
}
[data-reveal][data-delay='2'] {
  transition-delay: 140ms;
}
[data-reveal][data-delay='3'] {
  transition-delay: 210ms;
}
[data-reveal][data-delay='4'] {
  transition-delay: 280ms;
}

/* ---------- boutons -------------------------------------------------- */

.btn {
  /* Le bouton plein reprend la plaque dorée de la carte : dégradé métallique,
     lettrage noir. Le texte noir sur l'or passe à 9:1, mieux que n'importe
     quel blanc posé sur la même plaque. */
  --btn-bg: linear-gradient(147deg, var(--gold-light) 0%, var(--gold) 42%, var(--gold-dark) 100%);
  --btn-fg: #130F04;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 0.97rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn:hover {
  --btn-bg: linear-gradient(147deg, var(--gold-sheen) 0%, var(--gold-light) 45%, var(--gold) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn:active {
  transform: translateY(0);
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  border-color: var(--border);
}

.btn--outline:hover {
  --btn-bg: var(--surface);
  --btn-fg: var(--accent);
  border-color: var(--accent);
}

.btn--ghost-dark {
  --btn-bg: transparent;
  --btn-fg: var(--dark-fg);
  border-color: rgba(var(--dark-fg-rgb), 0.28);
}

.btn--ghost-dark:hover {
  --btn-bg: rgba(var(--dark-fg-rgb), 0.08);
  --btn-fg: #fff;
  border-color: rgba(var(--dark-fg-rgb), 0.55);
}

.btn--lg {
  min-height: 58px;
  padding: 1rem 2rem;
  font-size: 1.02rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

/* ---------- en-tête -------------------------------------------------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-header);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}

.header.is-stuck {
  background: rgba(250, 247, 240, 0.9);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  margin-right: auto;
}

/* Le toit doré de la carte d'affaires. Le SVG porte son propre dégradé, donc
   il ne suit pas `currentColor` comme les autres icônes. */
.brand__mark {
  width: 54px;
  height: 22.5px;
  flex: none;
  overflow: visible;
}

.brand__name {
  display: block;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--fg);
}

/* « HA » est le seul mot doré du bloc-marque, comme sur la carte. Le dégradé
   est découpé dans le texte ; la couleur de repli sert aux navigateurs sans
   `background-clip: text` et aux modes de contraste forcé. */
.brand__ha {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--gold-deep);
  background: linear-gradient(145deg, var(--gold-light) 0%, var(--gold-bright) 38%, var(--gold) 62%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .brand__ha {
    color: transparent;
  }
}

/* Sur l'en-tête transparent (fond sombre du héros) l'or doit remonter en
   clarté, sinon le bas du dégradé disparaît dans le noir. */
.header:not(.is-stuck) .brand__ha,
.footer .brand__ha {
  color: var(--gold-bright);
  background: linear-gradient(145deg, var(--gold-sheen) 0%, var(--gold-light) 34%, var(--gold-bright) 62%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.brand__tag {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--fg-muted);
}

.header:not(.is-stuck) .brand__name {
  color: var(--dark-fg);
}
.header:not(.is-stuck) .brand__tag {
  color: var(--dark-muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav a {
  position: relative;
  padding: 0.6rem 0.72rem;
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: var(--fg-muted);
  transition: color var(--dur) var(--ease);
}

.header:not(.is-stuck) .nav a {
  color: var(--dark-muted);
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0.72rem;
  right: 0.72rem;
  bottom: 0.35rem;
  height: 1.5px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.nav a:hover,
.nav a.is-current {
  color: var(--fg);
}

.header:not(.is-stuck) .nav a:hover,
.header:not(.is-stuck) .nav a.is-current {
  color: #fff;
}

.nav a:hover::after,
.nav a.is-current::after {
  transform: scaleX(1);
}

.header__cta {
  display: flex;
  align-items: center;
  gap: var(--s1);
}

.tel-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.6rem;
  font-size: 0.97rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-decoration: none;
  color: var(--fg);
  border-radius: var(--radius);
  transition: color var(--dur) var(--ease);
}

.header:not(.is-stuck) .tel-link {
  color: var(--dark-fg);
}

.tel-link:hover {
  color: var(--accent-bright);
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  place-items: center;
}

.header:not(.is-stuck) .nav-toggle {
  border-color: rgba(var(--dark-fg-rgb), 0.3);
  color: var(--dark-fg);
}

.nav-toggle .icon--close,
.nav-toggle[aria-expanded='true'] .icon--menu {
  display: none;
}

.nav-toggle[aria-expanded='true'] .icon--close {
  display: block;
}

.nav-panel {
  display: none;
}

@media (max-width: 1240px) {
  .nav,
  .header__cta .btn {
    display: none;
  }
  .nav-toggle {
    display: grid;
  }
  .nav-panel {
    display: block;
    position: fixed;
    inset: 78px 0 0;
    z-index: var(--z-nav);
    background: var(--dark);
    color: var(--dark-fg);
    padding: var(--s4) var(--gutter) var(--s6);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 220ms var(--ease), transform 280ms var(--ease), visibility 220ms;
  }
  .nav-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-panel a:not(.btn) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-dark);
    font-family: var(--font-display);
    font-size: 1.5rem;
    text-decoration: none;
  }
  .nav-panel a:not(.btn) .icon {
    color: var(--accent-bright);
  }
  .nav-panel .btn-row {
    margin-top: var(--s4);
    flex-direction: column;
  }
  .nav-panel .btn {
    width: 100%;
  }
}

/* Sous 560px, le numéro cède la place au bouton de menu. */
@media (max-width: 560px) {
  /* Un libellé long tient rarement sur une ligne à cette largeur : on le
     laisse passer à la ligne plutôt que de faire déborder la page. */
  .btn {
    white-space: normal;
    text-align: center;
  }
  .tel-link__num {
    display: none;
  }
  .tel-link {
    width: 48px;
    justify-content: center;
    padding: 0;
  }
  .brand__mark {
    width: 46px;
    height: 19px;
  }
  .brand__name {
    font-size: 1rem;
  }
  /* La baseline tient sur une seule ligne (`nowrap`) : sous 560 px elle
     pousserait le téléphone et le bouton de menu hors de l'écran. Le toit et
     « Ébénisterie HA » suffisent à cette largeur. */
  .header .brand__tag {
    display: none;
  }
  .brand__tag {
    font-size: 0.62rem;
  }
  .header__inner {
    min-height: 68px;
    gap: var(--s1);
  }
  .nav-panel {
    inset: 68px 0 0;
  }
}

/* ---------- héros ---------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-block: 9rem var(--s6);
  background:
    radial-gradient(100% 78% at 78% 4%, rgba(var(--accent-rgb), 0.22), transparent 62%),
    radial-gradient(70% 60% at 6% 96%, rgba(var(--accent-deep-rgb), 0.38), transparent 70%),
    repeating-linear-gradient(93deg, rgba(252, 243, 210, 0.03) 0 2px, transparent 2px 11px),
    linear-gradient(168deg, #1A1A1D 0%, #0D0D0F 58%, #060607 100%);
  color: var(--dark-fg);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
  width: 100%;
}

.hero h1 {
  color: #fff;
  margin-bottom: var(--s3);
}

.hero h1 em {
  font-style: italic;
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
  color: var(--accent-bright);
}

.hero .lead {
  color: rgba(var(--dark-fg-rgb), 0.82);
  max-width: 48ch;
  margin-bottom: var(--s4);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.5rem;
  margin-top: var(--s4);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(var(--dark-fg-rgb), 0.2);
  border-radius: 999px;
  background: rgba(var(--dark-fg-rgb), 0.05);
  font-size: 0.83rem;
  font-weight: 500;
  color: rgba(var(--dark-fg-rgb), 0.9);
}

.badge .icon {
  width: 15px;
  height: 15px;
  color: var(--accent-bright);
}

/* Fiche de contact type « plaque d'atelier ». */
.hero__card {
  border: 1px solid rgba(var(--dark-fg-rgb), 0.16);
  border-radius: var(--radius-lg);
  background: rgba(var(--dark-rgb), 0.5);
  backdrop-filter: blur(10px);
  padding: var(--s4);
}

.hero__card h2 {
  font-size: 1.22rem;
  margin-bottom: var(--s3);
  color: #fff;
}

.spec-list {
  display: grid;
  gap: 0.15rem;
  margin-bottom: var(--s3);
}

.spec-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(var(--dark-fg-rgb), 0.1);
  font-size: 0.93rem;
  color: var(--dark-muted);
}

.spec-list li:last-child {
  border-bottom: 0;
}

.spec-list .icon {
  width: 18px;
  height: 18px;
  color: var(--accent-bright);
  margin-top: 0.2rem;
}

.spec-list strong {
  display: block;
  color: var(--dark-fg);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.spec-list a {
  text-decoration: none;
}
.spec-list a:hover {
  color: var(--accent-bright);
}

.hero__scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(var(--dark-fg-rgb), 0.5);
}

.hero__scroll .icon {
  width: 16px;
  height: 16px;
  animation: nudge 2.4s var(--ease) infinite;
}

@keyframes nudge {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: translateY(5px);
    opacity: 1;
  }
}

@media (max-width: 1080px) {
  .hero__inner {
    /* minmax(0, …) et non 1fr : une piste `1fr` ne descend pas sous le
       min-content de son contenu, et le bouton d'appel à l'action la faisait
       déborder sous 360 px. */
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .hero {
    padding-block: 7.5rem var(--s7);
  }
  .hero__scroll {
    display: none;
  }
}

/* ---------- section assemblage 3D ------------------------------------ */

.assembly {
  position: relative;
  height: 340vh;
  background: var(--dark);
}

.assembly__viewport {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.assembly canvas {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 900ms var(--ease);
}

.assembly.is-ready canvas {
  opacity: 1;
}

/* Voile pour garantir la lisibilité du texte par-dessus la scène. */
.assembly__viewport::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(var(--dark-rgb), 0.9) 0%, rgba(var(--dark-rgb), 0.2) 38%, transparent 58%),
    linear-gradient(to right, rgba(var(--dark-rgb), 0.82) 0%, rgba(var(--dark-rgb), 0.12) 42%, transparent 60%);
}

.assembly__ui {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 0 var(--gutter) clamp(1.75rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: end;
  gap: var(--s4);
  max-width: var(--container);
  margin-inline: auto;
}

.assembly__intro {
  max-width: 34ch;
  text-shadow: 0 1px 18px rgba(var(--dark-rgb), 0.75);
}

.assembly__intro h2 {
  color: #fff;
  font-size: clamp(1.75rem, 3.2vw, 2.7rem);
  margin-bottom: var(--s2);
}

.assembly__intro p {
  color: rgba(var(--dark-fg-rgb), 0.76);
  font-size: 0.97rem;
  margin: 0;
}

.assembly__hint-static {
  display: none;
}

.steps {
  display: grid;
  gap: 0.1rem;
  padding: 1.1rem 1.35rem 1.25rem;
  border: 1px solid rgba(var(--dark-fg-rgb), 0.14);
  border-radius: var(--radius-lg);
  background: rgba(var(--dark-rgb), 0.62);
  backdrop-filter: blur(14px) saturate(1.1);
}

.steps .step:first-child {
  border-top: 0;
}

.step {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(var(--dark-fg-rgb), 0.14);
  color: rgba(var(--dark-fg-rgb), 0.42);
  transition: color 420ms var(--ease), border-color 420ms var(--ease);
}

.step__num {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  padding-top: 0.2rem;
}

.step__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
}

.step__text {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  transition: grid-template-rows 480ms var(--ease), opacity 380ms var(--ease);
}

.step__text > span {
  min-height: 0;
  padding-top: 0.35rem;
  color: rgba(var(--dark-fg-rgb), 0.78);
}

.step.is-current {
  color: var(--accent-bright);
  border-top-color: var(--accent-bright);
}

.step.is-current .step__text {
  grid-template-rows: 1fr;
  opacity: 1;
}

.assembly__meter {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--gutter) 0.85rem;
  max-width: var(--container);
  margin-inline: auto;
}

.assembly__meter .track {
  flex: 1;
  height: 2px;
  background: rgba(var(--dark-fg-rgb), 0.16);
  overflow: hidden;
}

.assembly__meter .bar {
  height: 100%;
  background: var(--accent-bright);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 160ms linear;
}

.assembly__meter span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  color: rgba(var(--dark-fg-rgb), 0.6);
}

@media (max-width: 1080px) {
  .assembly {
    height: 300vh;
  }
  .assembly__ui {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s3);
  }
  .assembly__intro {
    max-width: none;
  }
  .assembly__intro p {
    display: none;
  }
  /* Sur mobile, seule l'étape courante reste visible. */
  .step:not(.is-current) {
    display: none;
  }
  .step {
    border-top: 0;
    padding-top: 0;
  }
}

/* Repli sans WebGL : plan d'atelier en CSS, toutes les étapes listées. */
.assembly.no-3d {
  height: auto;
}

.assembly.no-3d .assembly__viewport {
  position: static;
  height: auto;
  padding-block: clamp(4rem, 9vw, var(--s8));
}

.assembly.no-3d canvas,
.assembly.no-3d .configurator,
.assembly.no-3d .explode-labels,
.assembly.no-3d .assembly__meter {
  display: none;
}

.assembly.no-3d .assembly__viewport::before {
  display: none;
}

.assembly.no-3d .assembly__ui {
  position: static;
  padding-inline: var(--gutter);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.assembly.no-3d .assembly__hint-motion {
  display: none;
}

.assembly.no-3d .assembly__hint-static {
  display: block;
}

.assembly.no-3d .step {
  display: grid !important;
  color: var(--dark-muted);
}

.assembly.no-3d .step__text {
  grid-template-rows: 1fr;
  opacity: 1;
}


/* ---------- configurateur de matériaux -------------------------------- */

.configurator {
  padding: 1.15rem 1.35rem 1.3rem;
  border: 1px solid rgba(var(--dark-fg-rgb), 0.16);
  border-radius: var(--radius-lg);
  background: rgba(var(--dark-rgb), 0.68);
  backdrop-filter: blur(14px) saturate(1.1);
  display: grid;
  gap: 0.85rem;
  animation: config-in 420ms var(--ease) both;
}

@keyframes config-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.configurator__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.configurator__lead {
  margin: -0.6rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: rgba(var(--dark-fg-rgb), 0.66);
}

.configurator__cta {
  width: 100%;
  min-height: 46px;
  margin-top: 0.15rem;
}

/* The step list hands over to the configurator at the end of the build. */
.assembly.is-configuring .steps {
  display: none;
}

@media (max-width: 1080px) {
  .configurator {
    padding: 0.9rem 1rem 1rem;
  }
  .configurator__lead {
    display: none;
  }
}


/* ---------- vue éclatée ------------------------------------------------ */

.configurator__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}

.explode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0 0.7rem;
  border: 1px solid rgba(var(--dark-fg-rgb), 0.26);
  border-radius: 999px;
  background: transparent;
  color: rgba(var(--dark-fg-rgb), 0.78);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.explode-toggle .icon {
  width: 15px;
  height: 15px;
}

.explode-toggle:hover {
  color: #fff;
  border-color: rgba(var(--dark-fg-rgb), 0.5);
  background: rgba(var(--dark-fg-rgb), 0.08);
}

.explode-toggle.is-on {
  color: #fff;
  border-color: var(--accent-bright);
  background: rgba(var(--accent-rgb), 0.2);
}

/* Callouts projected from the 3D scene. */
.explode-labels {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 420ms var(--ease);
}

.explode-labels.is-visible {
  opacity: 1;
}

.explode-label {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(var(--dark-fg-rgb), 0.2);
  border-radius: 999px;
  background: rgba(var(--dark-rgb), 0.82);
  backdrop-filter: blur(6px);
  color: var(--dark-fg);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transform-origin: left center;
  transition: opacity 260ms var(--ease);
}

/* A dot marking the component the callout belongs to. */
.explode-label::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.25);
}

/* The intro copy would collide with the callouts. */
.assembly.is-exploded .assembly__intro {
  opacity: 0.25;
  transition: opacity 320ms var(--ease);
}

/* In exploded view the fiche needs the room, so the lead copy steps aside. */
.assembly.is-exploded .configurator__lead {
  display: none;
}

.assembly.is-exploded .configurator {
  max-width: 24rem;
  margin-left: auto;
}

@media (max-width: 1080px) {
  .explode-label {
    font-size: 0.66rem;
    padding: 0.22rem 0.45rem;
  }
}

/* ---------- fiche de pièce (vue éclatée) ------------------------------- */

/* The callouts are buttons: they are the keyboard route into the inspector,
   since a 3D canvas cannot be tabbed through. */
.explode-labels.is-visible .explode-label {
  pointer-events: auto;
}

.explode-label {
  font-family: inherit;
  cursor: pointer;
}

.explode-label:hover,
.explode-label:focus-visible {
  border-color: var(--accent-bright);
  color: #fff;
}

.explode-label.is-selected {
  border-color: var(--accent-bright);
  background: rgba(var(--accent-rgb), 0.92);
  color: #130F04;
}

.explode-label.is-selected::before {
  background: #130F04;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.4);
}

.inspect__hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(var(--dark-fg-rgb), 0.62);
}

.inspect {
  display: grid;
  gap: 0.55rem;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.inspect__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}

.inspect__eyebrow {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.inspect__close {
  min-height: 30px;
  padding: 0 0.6rem;
  border: 1px solid rgba(var(--dark-fg-rgb), 0.26);
  border-radius: 999px;
  background: transparent;
  color: rgba(var(--dark-fg-rgb), 0.78);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.inspect__close:hover {
  color: #fff;
  border-color: rgba(var(--dark-fg-rgb), 0.5);
}

.inspect__title {
  margin: 0;
  font-size: 1.15rem;
  color: #fff;
}

.inspect__lead {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(var(--dark-fg-rgb), 0.72);
}

.inspect__services {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inspect__services li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.84rem;
  line-height: 1.4;
  color: rgba(var(--dark-fg-rgb), 0.86);
}

.inspect__services li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 1.5px;
  background: var(--accent-bright);
}

/* ---------- territoire : le globe ------------------------------------- */

.territory {
  position: relative;
  height: 280vh;
  background: var(--dark);
  color: var(--dark-fg);
}

.territory__viewport {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.territory canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

.territory.is-ready canvas {
  opacity: 1;
}

/* Voile : le texte reste lisible, le globe garde la droite. */
.territory__viewport::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(var(--dark-rgb), 0.85) 0%, transparent 34%),
    linear-gradient(to right, rgba(var(--dark-rgb), 0.86) 0%, rgba(var(--dark-rgb), 0.3) 34%, transparent 52%);
}

.territory__labels {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.globe-label {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-left: 0.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--dark-fg);
  white-space: nowrap;
  opacity: 0;
  text-shadow: 0 1px 10px rgba(var(--dark-rgb), 0.95), 0 0 2px rgba(var(--dark-rgb), 0.9);
  will-change: transform, opacity;
}

/* Le point de la ville est dessiné par la scène ; l'étiquette se décale. */
.globe-label::before {
  content: '';
  width: 14px;
  height: 1px;
  background: rgba(var(--accent-rgb), 0.7);
  flex: none;
}

.globe-label--t1 {
  font-size: 0.95rem;
}

.globe-label--water {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: rgba(var(--accent-rgb), 0.85);
  transform-origin: left center;
}

.globe-label--water::before {
  display: none;
}

.globe-label--home {
  margin-top: -0.2rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--accent-bright);
}

.globe-label--home::before {
  width: 22px;
  background: var(--accent-bright);
}

.territory__ui {
  position: absolute;
  inset: 0 0 0;
  z-index: 3;
  padding: clamp(5.5rem, 12vh, 8rem) var(--gutter) clamp(2.5rem, 6vh, 4rem);
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: space-between;
  justify-items: start;
  max-width: var(--container);
  margin-inline: auto;
  pointer-events: none;
}

.territory__ui > * {
  pointer-events: auto;
}

.territory__intro {
  max-width: 30ch;
  text-shadow: 0 1px 18px rgba(var(--dark-rgb), 0.75);
}

.territory__intro h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: var(--s2);
}

.territory__hint {
  margin: 0;
  color: rgba(var(--dark-fg-rgb), 0.72);
  font-size: 0.97rem;
}

.territory__phases {
  align-self: end;
  width: min(100%, 25rem);
}

.territory__phases a {
  color: var(--accent-bright);
  font-weight: 600;
  white-space: nowrap;
}

.territory__readout {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(1.25rem, 3vh, 2rem);
  z-index: 3;
  display: grid;
  justify-items: end;
  gap: 0.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: rgba(var(--dark-fg-rgb), 0.5);
}

.territory__readout [data-territory-alt] {
  color: var(--accent-bright);
}

@media (max-width: 860px) {
  .territory {
    height: 240vh;
  }
  .territory__viewport::before {
    background:
      linear-gradient(to bottom, rgba(var(--dark-rgb), 0.85) 0%, transparent 26%),
      linear-gradient(to top, rgba(var(--dark-rgb), 0.92) 0%, rgba(var(--dark-rgb), 0.4) 30%, transparent 46%);
  }
  .territory__ui {
    padding-top: 5rem;
    padding-bottom: 1.25rem;
  }
  .territory__intro h2 {
    font-size: 2rem;
    margin-bottom: 0.4rem;
  }
  .territory__hint {
    display: none;
  }
  .territory__phases {
    width: 100%;
    padding: 0.8rem 1rem 0.9rem;
  }
  .territory__phases .step:not(.is-current) {
    display: none;
  }
  .territory__readout {
    top: 5.4rem;
    bottom: auto;
  }
  .globe-label {
    font-size: 0.7rem;
  }
  .globe-label--t1 {
    font-size: 0.82rem;
  }
  .globe-label--home {
    font-size: 1.1rem;
  }
}

/* Sans 3D : la section devient un simple encart de texte. */
.territory.no-3d {
  height: auto;
}

.territory.no-3d .territory__viewport {
  position: relative;
  height: auto;
}

.territory.no-3d canvas,
.territory.no-3d .territory__labels,
.territory.no-3d .territory__readout,
.territory.no-3d .territory__hint,
.territory.no-3d .territory__viewport::before {
  display: none;
}

.territory.no-3d .territory__ui {
  position: relative;
  gap: var(--s4);
  padding-block: var(--s7);
}

.territory.no-3d .step,
.territory.no-3d .step:not(.is-current) {
  display: grid;
  color: var(--accent-bright);
}

.territory.no-3d .step__text {
  grid-template-rows: 1fr;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  /* Le globe est montré à mi-chemin, figé : Saguenay et ses environs. */
  .territory {
    height: 100svh;
  }
  .territory__hint {
    display: none;
  }
}

/* ---------- simulateur de tarification -------------------------------- */

.estimator__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.estimator__form {
  display: grid;
  gap: 0.9rem;
}

.q {
  margin: 0;
  padding: 1.2rem 1.3rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  min-width: 0;
}

.q__title {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0;
  margin-bottom: 0.85rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--fg);
}

.q__num {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.q__hint {
  margin: -0.4rem 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--fg-muted);
}

.q__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.55rem;
}

.q__options--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr));
}

/* Une option = une carte cliquable ; le bouton radio reste natif (clavier,
   lecteurs d'écran), simplement masqué visuellement. */
.opt {
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.opt:hover {
  border-color: var(--gold);
}

.opt:has(input:checked) {
  border-color: var(--gold-dark);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--gold-dark);
}

.opt:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.opt__label {
  font-weight: 600;
  font-size: 0.93rem;
  line-height: 1.3;
  color: var(--fg);
}

.opt__note {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--fg-muted);
}

.q__items {
  display: grid;
}

.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
}

.item:first-child {
  border-top: 0;
  padding-top: 0;
}

.item__text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.item__label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--fg);
}

.item__hint {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.item.is-on .item__label {
  color: var(--accent);
}

.stepper {
  display: inline-flex;
  align-items: center;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
}

.stepper__btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}

.stepper__btn:hover {
  background: var(--accent-soft);
}

.stepper input {
  width: 2.6rem;
  height: 40px;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  -moz-appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.q__km {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.8rem;
  max-width: 18rem;
}

.q__km label {
  font-size: 0.85rem;
  font-weight: 600;
}

.q__km input {
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font: inherit;
}

/* Le résumé reste en vue pendant qu'on répond. */
.estimator__summary {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem 1.5rem 1.4rem;
  border-radius: var(--radius-lg);
  background: var(--dark);
  color: var(--dark-fg);
  box-shadow: var(--shadow-lg, 0 18px 50px rgba(0, 0, 0, 0.18));
}

.estimator__eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.estimator__total {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.4vw, 3.2rem);
  font-weight: 600;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.estimator__range,
.estimator__duration {
  margin: 0;
  font-size: 0.9rem;
  color: var(--dark-muted);
}

.estimator__duration {
  color: var(--dark-fg);
  font-weight: 600;
}

.estimator__note {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-left: 2px solid var(--accent-bright);
  background: rgba(var(--accent-rgb), 0.1);
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--dark-fg);
}

.estimator__details {
  border-top: 1px solid var(--border-dark);
  padding-top: 0.7rem;
}

.estimator__details summary {
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent-bright);
}

.estimator__lines {
  display: grid;
  gap: 0.35rem;
  margin: 0.75rem 0 0;
}

.line {
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  font-size: 0.84rem;
  color: rgba(var(--dark-fg-rgb), 0.78);
}

.line dt,
.line dd {
  margin: 0;
}

.line dd {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.line--sub {
  margin-top: 0.3rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border-dark);
  color: var(--dark-fg);
}

.line--total {
  padding-top: 0.4rem;
  border-top: 1px solid var(--border-dark);
  color: #fff;
  font-weight: 700;
}

.estimator__pay ul {
  display: grid;
  gap: 0.3rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.estimator__pay li {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: rgba(var(--dark-fg-rgb), 0.78);
}

.estimator__pay strong {
  color: var(--dark-fg);
  font-variant-numeric: tabular-nums;
}

.estimator__send {
  width: 100%;
  margin-top: 0.3rem;
}

.estimator__summary.is-empty .estimator__send,
.estimator__summary.is-empty .estimator__details,
.estimator__summary.is-empty .estimator__pay {
  display: none;
}

.estimator__fine {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: rgba(var(--dark-fg-rgb), 0.55);
}

/* Barre de total, seulement sur téléphone, collée en bas pendant les
   questions (le résumé, lui, vient après). */
.estimator__bar {
  display: none;
}

@media (max-width: 900px) {
  .estimator__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .estimator__summary {
    position: static;
  }
  .estimator__bar {
    position: sticky;
    bottom: 0.75rem;
    z-index: 5;
    display: block;
    width: fit-content;
    margin: -3.5rem auto 0;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    background: var(--dark);
    color: var(--accent-bright);
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  }
  .estimator__bar.is-hidden {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  .q {
    padding: 1rem 1rem 1.1rem;
  }
}

/* ---------- grilles de contenu --------------------------------------- */

.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr));
}

/* ---------- services : catégories dépliables -------------------------- */

.svc-list {
  display: grid;
  gap: 0.75rem;
}

.svc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.svc[open],
.svc:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}

/* The whole header row is the hit target, so it gets a comfortable height
   and the default disclosure triangle is removed on every engine. */
.svc > summary {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 72px;
  padding: 1rem clamp(1rem, 2.2vw, 1.5rem);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.svc > summary::-webkit-details-marker,
.svc > summary::marker {
  display: none;
  content: '';
}

.svc > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

.svc__icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-deep-rgb), 0.14);
}

.svc__icon .icon {
  width: 25px;
  height: 25px;
  stroke-width: 1.4;
}

.svc__title {
  flex: 1 1 auto;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--fg);
}

/* The arrow points right when closed and turns down when open: the state is
   readable without relying on the browser's own marker. */
.svc__arrow {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  opacity: 0.75;
}

.svc[open] .svc__arrow {
  transform: rotate(90deg);
  opacity: 1;
}

.svc > summary:hover .svc__arrow {
  opacity: 1;
  transform: translateX(3px);
}

.svc[open] > summary:hover .svc__arrow {
  transform: rotate(90deg) translateX(3px);
}

.svc__body {
  padding: 0 clamp(1rem, 2.2vw, 1.5rem) clamp(1.25rem, 2.2vw, 1.75rem);
}

.svc__items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 0.1rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: prestation;
  border-top: 1px solid var(--border);
  padding-top: var(--s2);
}

.svc__items li {
  counter-increment: prestation;
  position: relative;
  padding: 0.5rem 0 0.5rem 2.1rem;
  font-size: 0.97rem;
  color: var(--fg-muted);
  border-bottom: 1px solid rgba(229, 220, 199, 0.6);
}

.svc__items li::before {
  content: counter(prestation, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  opacity: 0.8;
}

/* The résidentiel / commercial pair is a plain checklist, not a numbered
   sequence — nothing here happens in order. */
.svc__items--plain {
  border-top: 0;
  padding-top: 0.25rem;
  grid-template-columns: 1fr;
}

.svc__items--plain li::before {
  content: '';
  top: 1.15rem;
  width: 12px;
  height: 1.5px;
  background: var(--accent);
  opacity: 0.55;
}

.svc__split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--s3) 2rem;
  border-top: 1px solid var(--border);
  padding-top: var(--s2);
}

.svc__split h4 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.svc-note {
  margin: var(--s4) 0 0;
  font-size: 0.95rem;
  color: var(--fg-muted);
}

/* ---------- notre histoire ------------------------------------------- */

.story__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

/* The sticky element has to be the grid item itself: a sticky child can only
   travel inside its parent's box, and the aside is only as tall as the list. */
.story__aside {
  position: sticky;
  top: 96px;
}

.story__facts {
  display: grid;
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.story__facts li {
  display: grid;
  gap: 0.2rem;
  padding-top: var(--s2);
  border-top: 1px solid var(--border-dark);
}

.story__facts strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent-bright);
}

.story__facts span {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--dark-muted);
}

.story__prose p {
  margin: 0 0 var(--s3);
  font-size: clamp(1rem, 1.25vw, 1.08rem);
  line-height: 1.75;
  color: var(--dark-muted);
}

.story__prose p:last-child {
  margin-bottom: 0;
}

.story__quote {
  margin: var(--s4) 0;
  padding: 0 0 0 clamp(1rem, 2.5vw, 1.75rem);
  border-left: 2px solid var(--accent-bright);
}

.story__quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  font-style: italic;
  line-height: 1.35;
  color: var(--dark-fg);
}

.story__close {
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--border-dark);
}

.story__prose .story__close {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.9vw, 1.35rem);
  line-height: 1.5;
  color: var(--dark-fg);
}

.story__sign {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: var(--s4);
  border-top: 1px solid var(--border-dark);
}

.story__mark {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-bright);
}

.story__creed {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--dark-muted);
}

@media (max-width: 1080px) {
  .story__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .story__aside {
    position: static;
  }
  .story__facts {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }
}

/* ---------- pourquoi nous -------------------------------------------- */

.reasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.5rem, 3vw, 2.75rem);
  counter-reset: reason;
}

.reason {
  counter-increment: reason;
  padding-top: var(--s3);
  border-top: 2px solid var(--border);
}

.reason::before {
  content: counter(reason, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--gold-deep);
  opacity: 0.5;
  margin-bottom: var(--s2);
}

.reason h3 {
  margin-bottom: 0.4rem;
}

.reason p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

/* Les provenances : la même carte numérotée que les engagements, mais sur
   quatre colonnes — à trois, la quatrième tombait seule sur sa rangée. */
.brands {
  counter-reset: reason;
  row-gap: clamp(1.75rem, 3vw, 2.5rem);
}

/* ---------- secteurs (bande sombre) ---------------------------------- */

.sector {
  padding: var(--s4);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(var(--accent-rgb), 0.07), rgba(var(--dark-fg-rgb), 0.015));
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.sector:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  transform: translateY(-4px);
}

.sector .icon {
  width: 30px;
  height: 30px;
  color: var(--accent-bright);
  margin-bottom: var(--s3);
}

.sector h3 {
  font-size: 1.12rem;
  margin-bottom: 0.4rem;
}

.sector p {
  margin: 0;
  color: var(--dark-muted);
  font-size: 0.92rem;
}

.compliance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
  margin-top: clamp(2rem, 4vw, 3.25rem);
  padding-top: var(--s4);
  border-top: 1px solid var(--border-dark);
}

.compliance p {
  margin: 0;
  color: var(--dark-muted);
  font-size: 0.95rem;
  max-width: 62ch;
}

/* ---------- processus ------------------------------------------------ */

.process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.phase {
  position: relative;
  padding-top: var(--s4);
}

.phase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.phase::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.phase__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.phase h3 {
  margin-bottom: 0.5rem;
}

.phase p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

/* ---------- contact -------------------------------------------------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.form {
  display: grid;
  gap: var(--s3);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: var(--s3);
}

.field {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg);
}

.field label .req {
  color: var(--accent);
}

.field .hint {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.field input,
.field select,
.field textarea {
  /* Un <input> porte une largeur intrinsèque (size=20) que `min-width: auto`
     rend incompressible. Sans ce 0, le formulaire refuse de descendre sous
     ~470 px et fait défiler toute la page de côté sur un téléphone. */
  min-width: 0;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.field textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.6;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b5b4c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.4rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-deep-rgb), 0.16);
  outline: none;
}

.field [aria-invalid='true'] {
  border-color: #b3261e;
  background: #fdf6f5;
}

.field .error {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.15rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #B3182B;
}

.field .error:not(:empty)::before {
  content: '';
  width: 14px;
  height: 14px;
  flex: none;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.form-status {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  background: #FDEFF0;
  border: 1px solid #F1C7CC;
  color: #B3182B;
}

.form-status.is-success {
  background: #f0f5ec;
  border: 1px solid #ccdfc2;
  color: #2f5121;
}

/* Bloc coordonnées, ton sombre pour équilibrer le formulaire. */
.contact__aside {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--dark);
  color: var(--dark-fg);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.contact__aside h3 {
  color: #fff;
  font-size: 1.35rem;
}

.contact__aside > * {
  position: relative;
  z-index: 1;
}

.contact__aside .spec-list li {
  font-size: 0.95rem;
}

.cta-tel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: var(--s3);
  padding: var(--s3);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  border-radius: var(--radius);
  background: rgba(var(--accent-rgb), 0.1);
  text-decoration: none;
  transition: background var(--dur) var(--ease);
}

.cta-tel:hover {
  background: rgba(var(--accent-rgb), 0.2);
}

.cta-tel .icon {
  width: 28px;
  height: 28px;
  color: var(--accent-bright);
}

.cta-tel small {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark-muted);
}

.cta-tel strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

@media (max-width: 960px) {
  .contact {
    /* minmax(0, …) et non 1fr : une piste `1fr` ne descend pas sous le
       min-content de son contenu, et le formulaire repoussait la page. */
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- bande d'appel final -------------------------------------- */

.final {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(90% 100% at 20% 0%, rgba(var(--accent-rgb), 0.22), transparent 60%),
    linear-gradient(150deg, #1C1C1F, #0A0A0B);
  color: var(--dark-fg);
  text-align: center;
}

.final h2 {
  color: #fff;
  max-width: 24ch;
  margin-inline: auto;
}

.final .lead {
  margin-inline: auto;
  margin-bottom: var(--s4);
}

.final .btn-row {
  justify-content: center;
}

/* ---------- pied de page --------------------------------------------- */

.footer {
  background: #0A0A0B;
  color: var(--dark-muted);
  padding-block: var(--s6) var(--s4);
  font-size: 0.92rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s4);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--border-dark);
}

.footer h4 {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dark-fg);
  margin: 0 0 var(--s2);
}

.footer li {
  margin-bottom: 0.45rem;
}

.footer a {
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.footer a:hover {
  color: var(--accent-bright);
}

.footer .brand__name {
  color: var(--dark-fg);
}
.footer .brand__tag {
  color: var(--dark-muted);
}

.footer__note {
  max-width: 44ch;
  margin-top: var(--s2);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s2);
  padding-top: var(--s4);
  font-size: 0.85rem;
}

.footer__bottom p {
  margin: 0;
}

/* ---------- accessibilité ------------------------------------------- */

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -140%);
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  /* La cuisine est présentée assemblée, sans défilement long. */
  .assembly {
    height: 100svh;
  }
  .assembly__hint-motion {
    display: none;
  }
  .assembly__hint-static {
    display: block;
  }
  .step:not(.is-current) {
    opacity: 0.55;
  }
}

@media print {
  .header,
  .assembly,
  .hero__scroll,
  .nav-panel {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
