/* Mise en page : colonne de lecture alignée à gauche, une seule signalétique rouge (plaques du hero), le reste en noir, blanc et gris chaud. */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f3f2;
  --ink: #1b1b1a;
  --muted: #5f5856;
  --line: #e4dedc;
  --red: #b3261e;
  --red-ink: #ffffff;
  --band-ink-bg: #1b1b1a;
  --band-ink-fg: #f4f1f0;
  --p1: #b3261e; --p1-bg: #f8e3e1;
  --p2: #8a5a00; --p2-bg: #f8ecd2;
  --p3: #2f5d50; --p3-bg: #dfeee9;
  --font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem; --step-0: 1.0625rem; --step-1: 1.25rem; --step-2: 1.6rem; --step-3: 2.15rem; --step-4: clamp(2.1rem, 4.2vw + 1rem, 3.6rem);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151413; --bg-alt: #1d1b1a; --ink: #eeeae8; --muted: #b0a8a5; --line: #34302e;
    --red: #d7463c; --red-ink: #ffffff; --band-ink-bg: #0f0e0d; --band-ink-fg: #eeeae8;
    --p1: #ff8a80; --p1-bg: #3a1a17; --p2: #f0c46a; --p2-bg: #352a12; --p3: #8fd1bc; --p3-bg: #15302a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151413; --bg-alt: #1d1b1a; --ink: #eeeae8; --muted: #b0a8a5; --line: #34302e;
  --red: #d7463c; --red-ink: #ffffff; --band-ink-bg: #0f0e0d; --band-ink-fg: #eeeae8;
  --p1: #ff8a80; --p1-bg: #3a1a17; --p2: #f0c46a; --p2-bg: #352a12; --p3: #8fd1bc; --p3-bg: #15302a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-0); line-height: 1.6; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: 72rem; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.muted { color: var(--muted); }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 38em; }

/* En-tête */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 1.5rem; padding-block: 0.75rem; flex-wrap: wrap; }
.brand { display: inline-flex; color: var(--ink); }
.logo { height: 3.2rem; width: auto; display: block; }
.logo-sm { height: 2.6rem; }
.nav { display: flex; gap: 1.4rem; margin-left: auto; font-size: var(--step--1); font-weight: 500; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.bar-tel { font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 720px) {
  .bar { gap: 0.6rem 1rem; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 1.1rem; }
  .bar-tel { margin-left: auto; }
  .logo { height: 2.8rem; }
}

/* Boutons */
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn { display: inline-flex; align-items: center; min-height: 3rem; padding: 0.7rem 1.3rem; font-weight: 600; font-size: var(--step--1); text-decoration: none; border: 2px solid var(--red); border-radius: 0; }
.btn-solid { background: var(--red); color: var(--red-ink); }
.btn-solid:hover { filter: brightness(0.92); }
.btn-line { color: var(--ink); background: transparent; border-color: var(--ink); }
.btn-line:hover { background: var(--bg-alt); }

/* Hero : la signalétique */
.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(2.5rem, 6vw, 5rem); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.hero-text { display: grid; gap: 1.5rem; min-width: 0; }
.hero-side { min-width: 0; }
.side-label { font-size: var(--step--1); color: var(--muted); margin-bottom: 0.75rem; font-weight: 500; }
.plates { display: grid; gap: 6px; }
.plate { background: var(--red); color: var(--red-ink); font-weight: 700; font-size: var(--step-1); letter-spacing: 0.04em; text-transform: uppercase; padding: 0.8rem 1.1rem; border-radius: 2px; display: flex; justify-content: space-between; align-items: center; }
@media (max-width: 820px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .plates { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
  .plate { font-size: var(--step-0); }
}

/* Bandes */
.band { padding-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.band > .wrap > h2 { margin-bottom: 2rem; }
.band-alt { background: var(--bg-alt); }
.band-ink { background: var(--band-ink-bg); color: var(--band-ink-fg); border-top: 0; }

.situations { display: grid; border-top: 1px solid var(--line); }
.situations li { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 1rem 2rem; padding-block: 1.1rem; border-bottom: 1px solid var(--line); align-items: baseline; }
.situations a { color: var(--red); font-weight: 600; text-decoration: none; }
.situations a:hover { text-decoration: underline; }
@media (max-width: 720px) { .situations li { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; } }

.prestas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.presta { display: grid; gap: 0.7rem; align-content: start; height: 100%; padding: 1.8rem; background: var(--bg); text-decoration: none; }
.presta p { color: var(--muted); }
.presta .more { font-size: var(--step--1); font-weight: 600; color: var(--red); margin-top: 0.4rem; }
.presta:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 720px) { .prestas { grid-template-columns: minmax(0, 1fr); } }

/* Rapports */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split-text { display: grid; gap: 1.2rem; }
.split-text h2 { margin-bottom: 0.3rem; }
.levels { list-style: decimal; padding-left: 1.3rem; display: grid; gap: 0.8rem; }
.levels li::marker { font-weight: 700; color: var(--red); }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

.sheet { margin: 0; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 18px 40px -24px rgba(27, 27, 26, 0.35); padding: 1.4rem; display: grid; gap: 1rem; min-width: 0; }
.sheet-head { display: flex; justify-content: space-between; font-size: var(--step--1); font-weight: 700; border-bottom: 3px solid var(--red); padding-bottom: 0.5rem; }
.sheet-ref { font-weight: 500; color: var(--muted); }
.sheet-title { font-weight: 700; font-size: var(--step-1); line-height: 1.3; }
.sheet-title small { font-weight: 500; font-size: var(--step--1); color: var(--muted); }
.table-scroll { overflow-x: auto; }
.sheet table { width: 100%; border-collapse: collapse; font-size: var(--step--1); min-width: 30rem; }
.sheet th { text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding: 0.4rem 0.5rem 0.4rem 0; }
.sheet td { border-bottom: 1px solid var(--line); padding: 0.6rem 0.5rem 0.6rem 0; vertical-align: top; }
.sheet .num { font-variant-numeric: tabular-nums; font-weight: 700; width: 2rem; }
.chip { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 2px; white-space: nowrap; }
.chip.p1 { color: var(--p1); background: var(--p1-bg); }
.chip.p2 { color: var(--p2); background: var(--p2-bg); }
.chip.p3 { color: var(--p3); background: var(--p3-bg); }
.sheet figcaption { font-size: 0.8rem; color: var(--muted); }

/* Méthode : vraie séquence */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 0.5rem; align-content: start; border-top: 3px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(step); font-weight: 800; font-size: var(--step-2); color: var(--red); font-variant-numeric: tabular-nums; }
.steps p { color: var(--muted); font-size: var(--step--1); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Parcours */
.bio { display: grid; grid-template-columns: minmax(0, 1fr); }
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; filter: grayscale(0.15); }
.bio-text { display: grid; gap: 1rem; max-width: 40em; }
.quals { font-weight: 600; color: var(--red); }
@media (max-width: 720px) { .bio { grid-template-columns: minmax(0, 1fr); } .portrait { max-width: 18rem; } }

/* Références */
#references .muted { margin: -1rem 0 2rem; max-width: 40em; }
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.case { background: var(--bg); padding: 1.3rem; display: grid; gap: 0.4rem; align-content: start; }
.case-type { font-weight: 700; color: var(--red); font-size: var(--step--1); }
.case-what { font-weight: 600; }
.case-where { color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; }

/* Contact */
.contact h2 { margin-bottom: 2rem; }
.coords { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 3rem; }
.coords dt { font-size: var(--step--1); opacity: 0.7; }
.coords dd { margin: 0.2rem 0 0; font-size: var(--step-1); font-weight: 600; overflow-wrap: anywhere; }
.coords a { text-decoration: none; border-bottom: 2px solid var(--red); }
@media (max-width: 620px) { .coords { grid-template-columns: minmax(0, 1fr); } }

/* Pages prestation */
.svc-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; }
.svc-hero .wrap { display: grid; gap: 1.2rem; }
.crumb { font-size: var(--step--1); color: var(--muted); }
.crumb a { color: var(--muted); }
.svc-body { display: grid; gap: 2.5rem; padding-bottom: 4rem; }
.svc-block { display: grid; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.8rem; max-width: 52rem; }
.svc-block > p { max-width: 40em; }
.ticks { display: grid; gap: 0.55rem; }
.ticks li { position: relative; padding-left: 1.4rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.6rem; height: 0.6rem; background: var(--red); border-radius: 1px; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.duo > div { display: grid; gap: 0.7rem; align-content: start; }
.duo > div > p { color: var(--muted); }
@media (max-width: 720px) { .duo { grid-template-columns: minmax(0, 1fr); } }
.legal p { line-height: 1.8; }

.cta-band { background: var(--bg-alt); border-top: 1px solid var(--line); padding-block: 3.5rem; }
.cta-in { display: grid; gap: 1.1rem; }
.cta-in p { color: var(--muted); max-width: 36em; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; font-size: var(--step--1); color: var(--muted); }
.foot { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
.foot-id { display: grid; gap: 0.8rem; color: var(--ink); }
.foot-id p { color: var(--muted); }
.foot-nav, .foot-contact { display: grid; gap: 0.4rem; align-content: start; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 720px) { .foot { grid-template-columns: minmax(0, 1fr); } }

/* Demande de devis */
.devis { padding-bottom: 4rem; }
.devis form { display: grid; gap: 2.5rem; max-width: 52rem; }
.grp { display: grid; gap: 1.2rem; border-top: 1px solid var(--line); padding-top: 1.8rem; }
.grp h2, .mpanel h3 { font-size: var(--step-2); }
.mpanel { display: grid; gap: 1.2rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 1.5rem; }
@media (max-width: 620px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.fld { display: grid; gap: 0.4rem; min-width: 0; border: 0; padding: 0; margin: 0; }
.fld label, .fld legend { font-size: var(--step--1); font-weight: 600; padding: 0; }
.fld legend { margin-bottom: 0.5rem; }
.req { color: var(--red); }
.fld input[type="text"], .fld input[type="email"], .fld input[type="tel"], .fld textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--muted); border-radius: 0; padding: 0.7rem 0.8rem; min-height: 2.9rem; width: 100%; box-sizing: border-box; }
.fld input:focus-visible, .fld textarea:focus-visible, .opt input:focus-visible + span, .mtab input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.fld input[aria-invalid="true"] { border-color: var(--red); border-width: 2px; }
.opts, .mtabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.opt, .mtab { position: relative; }
.opt input, .mtab input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span, .mtab span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.4rem 0.9rem; border: 1px solid var(--line); font-size: var(--step--1); cursor: pointer; background: var(--bg); }
.opt input:checked + span, .mtab input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--bg); font-weight: 600; }
.mtab span { font-weight: 500; }
.small { font-size: var(--step--1); }
.form-error { color: var(--red); font-weight: 600; }
button.btn { font-family: inherit; cursor: pointer; }
#devis-status { white-space: pre-wrap; overflow-wrap: anywhere; }
.bio-lead { font-size: var(--step-1); font-weight: 600; }
.roles { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.roles > div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; padding-block: 0.7rem; border-bottom: 1px solid var(--line); }
.roles dt { font-weight: 700; color: var(--red); }
.roles dd { margin: 0; }
@media (max-width: 520px) { .roles > div { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; } }
.hide-wrap { display: contents; }
