/* =============================================================
   BKM PEINTURE Sàrl — Design system & site styles
   Brand sampled from the business card:
   navy #0B2945 · red #C4141F · paper #FBFBFB
   Type: Sora (display) · Manrope (body)
   ============================================================= */

/* ---------- 0. Polices auto-hébergées (OFL — voir assets/fonts/LICENCE.md) ----------
   Variables, sous-ensemble latin (couvre le français : é à ç œ €, U+202F). */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../fonts/sora-latin-var.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope-latin-var.woff2") format("woff2");
  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;
}

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand scales */
  --navy-950: #050f1c;
  --navy-900: #071e33;
  --navy-800: #0b2945; /* brand navy (card) */
  --navy-700: #123a5e;
  --navy-600: #1b4e7a;
  --navy-200: #b9c9da;
  --navy-100: #dce6f0;
  --navy-050: #eef3f8;

  --red-700: #9e101a;
  --red-600: #c4141f; /* brand red (card) */
  --red-500: #d8232f;
  --red-100: #fbe3e5;

  --paper: #fbfbfb;
  --surface: #f6f7f9;
  --grey-500: #8a94a6;

  /* Semantic (light sections default) */
  --bg: var(--paper);
  --bg-raised: #ffffff;
  --text: #122238;
  --text-soft: #3f5470;
  --line: #dee4ec;
  --brand: var(--navy-800);
  --cta: var(--red-600);
  --cta-hover: var(--red-700);
  --focus-ring: var(--red-600);

  /* Type */
  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-900: clamp(2.375rem, 5vw + 1rem, 4.25rem);   /* hero */
  --fs-800: clamp(1.875rem, 2.8vw + 0.8rem, 2.875rem); /* h2 */
  --fs-700: clamp(1.375rem, 1.2vw + 1rem, 1.75rem);  /* h3 */
  --fs-600: 1.25rem;
  --fs-500: 1.125rem;
  --fs-400: 1.0625rem; /* body 17px */
  --fs-300: 0.9375rem;
  --fs-200: 0.8125rem; /* eyebrows, captions */

  /* Space (4px rhythm) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --section-pad: clamp(4rem, 9vw, 7.5rem);

  /* Shape & depth */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-1: 0 1px 2px rgba(11, 41, 69, 0.06), 0 2px 8px rgba(11, 41, 69, 0.06);
  --shadow-2: 0 2px 6px rgba(11, 41, 69, 0.07), 0 12px 28px rgba(11, 41, 69, 0.12);
  --shadow-3: 0 4px 10px rgba(11, 41, 69, 0.1), 0 24px 48px rgba(11, 41, 69, 0.18);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-1: 150ms;
  --dur-2: 240ms;
  --dur-3: 420ms;

  /* Layout */
  --container: 72rem;
  --header-h: 5rem;
  --header-h-condensed: 4rem;
}

/* Navy ("dark") section theme — flips semantics locally */
.theme-navy {
  --bg: var(--navy-800);
  --bg-raised: var(--navy-700);
  --text: #f2f5f9;
  --text-soft: #b9c9da;
  --line: rgba(242, 245, 249, 0.16);
  --brand: #ffffff;
  --focus-ring: #ffffff;
  background-color: var(--bg);
  color: var(--text);
}

/* ---------- 2. Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: clip;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  text-wrap: balance;
  color: var(--brand);
}

h1 {
  font-size: var(--fs-900);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--fs-800);
  font-weight: 700;
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--fs-700);
  font-weight: 700;
}

p {
  max-width: 65ch;
}

a {
  color: inherit;
}

[id] {
  /* le header condensé (4rem) est celui affiché après tout défilement */
  scroll-margin-top: calc(var(--header-h-condensed) + 1rem);
}

::selection {
  background: var(--navy-800);
  color: #fff;
}

.theme-navy ::selection {
  background: var(--red-600);
}

/* Focus — visible, on-brand, never removed */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--navy-800);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--dur-1) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-color: #fff;
}

/* ---------- 3. Primitives ---------- */
.container {
  width: min(100% - clamp(2.5rem, 7vw, 5rem), var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-pad);
  position: relative;
}

.section--flush-top {
  padding-top: 0;
}

.section--wave-top {
  padding-top: calc(var(--section-pad) * 0.6);
}

.section--tight-top {
  padding-top: calc(var(--section-pad) * 0.5);
}

.section--surface {
  background: var(--surface);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-size: var(--fs-200);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-600);
  margin-bottom: var(--sp-4);
}

.theme-navy .eyebrow {
  color: #ff8f96;
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head .lead {
  margin-top: var(--sp-4);
  font-size: var(--fs-500);
  color: var(--text-soft);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3.25rem;
  padding: 0.875rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out),
    border-color var(--dur-1) var(--ease-out),
    color var(--dur-1) var(--ease-out),
    transform var(--dur-1) var(--ease-out),
    box-shadow var(--dur-1) var(--ease-out);
}

.btn svg {
  flex: none;
  transition: transform var(--dur-2) var(--ease-out);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--cta);
  color: #fff;
  box-shadow: 0 2px 8px rgba(196, 20, 31, 0.28);
}

.btn--primary:hover {
  background: var(--cta-hover);
  box-shadow: 0 4px 16px rgba(196, 20, 31, 0.36);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--brand);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--brand);
}

.theme-navy .btn--ghost,
.hero .btn--ghost {
  border-color: rgba(242, 245, 249, 0.35);
  color: #fff;
}

.theme-navy .btn--ghost:hover,
.hero .btn--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* Brush underline flourish (SVG injected inline in HTML) */
.brush-underline {
  display: block;
  width: clamp(9rem, 22vw, 13rem);
  margin-top: var(--sp-3);
  color: var(--red-600);
}

/* ---------- 4. Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  color: #fff;
  transition: height var(--dur-2) var(--ease-out),
    background-color var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out);
}

.site-header::before {
  /* gradient scrim so the transparent header reads over the hero */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5, 15, 28, 0.55), transparent);
  opacity: 1;
  transition: opacity var(--dur-2) var(--ease-out);
  pointer-events: none;
}

.site-header.is-scrolled {
  height: var(--header-h-condensed);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-2);
}

/* Fond flouté porté par un pseudo-élément : un backdrop-filter posé
   directement sur .site-header en ferait le containing block du tiroir
   mobile (position:fixed) et casserait le menu une fois la page défilée. */
.site-header.is-scrolled::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(7, 30, 51, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.site-header.is-scrolled::before {
  opacity: 0;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  width: min(100% - clamp(2rem, 5vw, 4rem), 80rem);
  margin-inline: auto;
}

.header-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 6px;
  color: #fff;
}

.header-logo svg {
  height: 2.5rem;
  width: auto;
  transition: height var(--dur-2) var(--ease-out);
}

.is-scrolled .header-logo svg {
  height: 2.125rem;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  list-style: none;
  padding: 0;
}

.site-nav .nav-cta-row {
  display: none; /* CTA du tiroir mobile — visible uniquement dans le drawer */
}

.site-nav ul a {
  position: relative;
  display: inline-block;
  padding: 0.75rem 0.25rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.88);
  transition: color var(--dur-1) var(--ease-out);
}

.site-nav ul a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0.125rem;
  height: 2px;
  background: var(--red-500);
  transition: right var(--dur-2) var(--ease-out);
}

.site-nav ul a:hover,
.site-nav ul a[aria-current="true"] {
  color: #fff;
}

.site-nav ul a:hover::after,
.site-nav ul a[aria-current="true"]::after {
  right: 0;
}

.header-actions,
.header-logo {
  /* restent au-dessus du tiroir mobile ouvert (z-index 99) */
  position: relative;
  z-index: 100;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.header-tel {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  min-height: 2.75rem;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: border-color var(--dur-1) var(--ease-out),
    background-color var(--dur-1) var(--ease-out);
}

.header-tel:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.header-cta {
  min-height: 2.75rem;
  padding: 0.625rem 1.375rem;
  font-size: 0.9375rem;
}

/* Burger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.625rem;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: max(37.5rem, min(92svh, 62rem));
  padding-block: calc(var(--header-h) + var(--sp-8)) var(--sp-9);
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: #f2f5f9;
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-5);
}

.hero-eyebrow svg {
  color: var(--red-500);
}

.hero h1 {
  color: #fff;
  max-width: 15ch;
}

.hero h1 em {
  font-style: normal;
  color: #ff9aa1;
}

.hero h1 em .u {
  position: relative;
  white-space: nowrap;
}

.hero h1 em .u > svg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.18em;
  width: 100%;
  height: 0.22em;
  color: var(--red-600);
}

.hero .hero-sub {
  margin-top: var(--sp-5);
  font-size: var(--fs-500);
  color: #c6d3e2;
  max-width: 52ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.hero-meta {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--fs-300);
  color: #b9c9da;
}

.hero-meta ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4) var(--sp-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-meta li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-meta svg {
  color: var(--red-500);
  flex: none;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.5rem;
}

.scroll-cue svg {
  animation: cue-bob 2.2s var(--ease-out) infinite;
}

@keyframes cue-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* Wave divider between themed sections */
.wave-divider {
  display: block;
  width: 100%;
  height: clamp(3rem, 8vw, 6.5rem);
  color: var(--navy-800); /* pilote le fill (currentColor) du path de vague */
  margin-bottom: -1px; /* recouvre le liseré sub-pixel contre la section navy */
}

.wave-divider--flip {
  transform: scaleY(-1);
  margin-bottom: 0;
  margin-top: -1px;
}

.wave-divider--surface {
  background: var(--surface);
}

.wave-divider svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- 6. Trust strip ---------- */
.trust {
  background: var(--surface);
  border-block: 1px solid var(--line);
  padding-block: var(--sp-6);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

.trust-item svg {
  flex: none;
  color: var(--red-600);
  margin-top: 0.125rem;
}

.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-300);
  font-weight: 700;
  color: var(--brand);
}

.trust-item span {
  font-size: var(--fs-200);
  color: var(--text-soft);
}

/* ---------- 7. Service cards ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-5);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out);
}

.service-card::before {
  /* accent edge reveal */
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--red-600), var(--red-500));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur-3) var(--ease-out);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-2);
  border-color: var(--navy-100);
}

.service-card:hover::before {
  transform: scaleY(1);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius);
  background: var(--navy-050);
  color: var(--navy-800);
  transition: background-color var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out);
}

.service-card:hover .service-icon {
  background: var(--navy-800);
  color: #fff;
}

.service-card h3 {
  font-size: var(--fs-600);
}

.service-card .hook {
  font-family: var(--font-display);
  font-size: var(--fs-300);
  font-weight: 600;
  color: var(--red-600);
}

.service-card p {
  font-size: var(--fs-300);
  color: var(--text-soft);
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-300);
  color: var(--navy-800);
  text-decoration: none;
}

.card-link svg {
  transition: transform var(--dur-2) var(--ease-out);
}

.card-link:hover svg {
  transform: translateX(4px);
}

.card-link:hover {
  color: var(--red-600);
}

/* ---------- 8. Service detail rows ---------- */
.detail-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.detail-row + .detail-row {
  border-top: 1px solid var(--line);
}

.detail-row:nth-child(even) .detail-media {
  order: 2;
}

.detail-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  aspect-ratio: 5 / 4;
}

.detail-media svg,
.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-flag {
  position: absolute;
  inset: auto 0.75rem 0.75rem auto;
  z-index: 1;
  padding: 0.375rem 0.75rem;
  background: rgba(7, 30, 51, 0.82);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.detail-copy h2 {
  margin-bottom: var(--sp-4);
}

.detail-copy p + p {
  margin-top: var(--sp-3);
}

.detail-copy .benefits {
  margin: var(--sp-4) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--sp-2);
}

.detail-copy .benefits li {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  font-size: var(--fs-300);
  color: var(--text-soft);
}

.detail-copy .benefits svg {
  flex: none;
  color: var(--red-600);
  margin-top: 0.2rem;
}

.detail-copy .btn {
  margin-top: var(--sp-5);
}

/* ---------- 9. Method / timeline ---------- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  counter-reset: step;
}

.method-step {
  position: relative;
  padding: var(--sp-6) var(--sp-5);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  counter-increment: step;
}

.method-step::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy-100);
  line-height: 1;
  margin-bottom: var(--sp-4);
  transition: color var(--dur-2) var(--ease-out);
}

.method-step:hover::before {
  color: var(--red-600);
}

.method-step::after {
  /* connective arrow between steps */
  content: "";
  position: absolute;
  top: 50%;
  right: -1.375rem;
  width: 1.25rem;
  height: 2px;
  background: var(--line);
}

.method-step:last-child::after {
  display: none;
}

.method-step h3 {
  font-size: var(--fs-500);
  margin-bottom: var(--sp-2);
}

.method-step p {
  font-size: var(--fs-300);
  color: var(--text-soft);
}

/* ---------- 10. Entreprise ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.about-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-3);
  aspect-ratio: 4 / 5;
  max-height: 34rem;
}

.about-media svg {
  width: 100%;
  height: 100%;
}

.about-copy p + p {
  margin-top: var(--sp-3);
}

.about-copy .signature {
  margin-top: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.about-copy .signature .avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--navy-800);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.about-copy .signature strong {
  display: block;
  font-family: var(--font-display);
  color: var(--brand);
}

.about-copy .signature span {
  font-size: var(--fs-300);
  color: var(--text-soft);
}

/* ---------- 11. Stats (navy) ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  text-align: center;
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat span {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--fs-300);
  color: var(--navy-200);
}

.stat .todo {
  display: inline-block;
  margin-top: var(--sp-2);
  padding: 0.125rem 0.625rem;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- 12. Réalisations / gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}

.gallery-item {
  position: relative;
  border: 0;
  padding: 0;
  background: none;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  aspect-ratio: 4 / 3;
  transition: transform var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

.gallery-item svg,
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 3rem 1rem 0.875rem;
  /* dégradé opaque derrière tout le texte, y compris sur deux lignes */
  background: linear-gradient(
    to top,
    rgba(5, 15, 28, 0.92) 0%,
    rgba(5, 15, 28, 0.82) 55%,
    rgba(5, 15, 28, 0) 100%
  );
  color: #fff;
  font-size: var(--fs-300);
  font-weight: 600;
  text-align: left;
}

/* Lightbox */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 64rem);
  width: 100%;
}

.lightbox::backdrop {
  background: rgba(5, 15, 28, 0.88);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox-inner {
  position: relative;
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.lightbox-media {
  aspect-ratio: 4 / 3;
}

.lightbox-media svg,
.lightbox-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  color: #fff;
}

.lightbox-bar p {
  font-size: var(--fs-300);
  margin: 0;
}

.lightbox-controls {
  display: flex;
  gap: var(--sp-2);
}

.lightbox-controls button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out),
    border-color var(--dur-1) var(--ease-out);
}

.lightbox-controls button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

/* ---------- 13. Zone d'intervention ---------- */
.zone-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.zone-map {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  background: var(--navy-050);
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out);
}

.zone-map:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-3, var(--shadow-2));
}

.zone-map > svg {
  width: 100%;
  height: auto;
  display: block;
}

.zone-map-badge {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: rgba(5, 15, 28, 0.82);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}

.zone-map-badge svg {
  flex-shrink: 0;
}

.zone-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  list-style: none;
  padding: 0;
  margin-top: var(--sp-5);
}

.zone-list li {
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-300);
  font-weight: 600;
  color: var(--text-soft);
}

.zone-list li.is-hq {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
}

/* ---------- 14. Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.contact-channels {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.channel {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  color: #fff;
  text-decoration: none;
  transition: background-color var(--dur-1) var(--ease-out),
    border-color var(--dur-1) var(--ease-out),
    transform var(--dur-1) var(--ease-out);
}

a.channel:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateX(4px);
}

.channel .channel-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: none;
  border-radius: 50%;
  background: var(--red-600);
  color: #fff;
}

.channel--whatsapp .channel-icon {
  background: #0e7c3a; /* vert assombri : blanc dessus >= 4.5:1 */
}

.channel > span:last-child {
  min-width: 0; /* autorise la réduction du bloc texte (email long) */
}

.channel b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-400);
  overflow-wrap: anywhere;
}

.channel span {
  font-size: var(--fs-300);
  color: var(--navy-200);
}

/* Form */
.quote-form {
  /* carte blanche posée sur section navy : on ré-ancre les tokens clairs */
  --line: #dee4ec;
  --text-soft: #3f5470;
  --focus-ring: var(--red-600);
  background: #fff;
  color: var(--navy-900);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-3);
  display: grid;
  gap: var(--sp-4);
}

.quote-form .form-title {
  font-family: var(--font-display);
  font-size: var(--fs-600);
  font-weight: 700;
  color: var(--navy-800);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.field {
  display: grid;
  gap: 0.375rem;
}

.field label {
  font-family: var(--font-display);
  font-size: var(--fs-300);
  font-weight: 700;
  color: var(--navy-800);
}

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

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--navy-900);
  transition: border-color var(--dur-1) var(--ease-out),
    box-shadow var(--dur-1) var(--ease-out);
}

.field textarea {
  resize: vertical;
  min-height: 7rem;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--grey-500);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--navy-800);
  box-shadow: 0 0 0 3px rgba(11, 41, 69, 0.18);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--red-600);
}

.field .error {
  /* région live toujours rendue : display:none ferait rater
     l'annonce aux lecteurs d'écran au moment de l'injection */
  display: block;
  min-height: 0;
  margin: 0;
  font-size: var(--fs-200);
  font-weight: 600;
  color: var(--red-700);
}

.form-note {
  font-size: var(--fs-200);
  color: var(--text-soft);
  margin: 0;
}

.form-status {
  /* région live toujours dans l'arbre d'accessibilité */
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: var(--fs-300);
  font-weight: 600;
}

.form-status.is-success {
  padding: var(--sp-4);
  background: #e8f6ec;
  color: #14522a;
  border: 1px solid #bde3c8;
}

.form-status.is-error {
  padding: var(--sp-4);
  background: var(--red-100);
  color: var(--red-700);
  border: 1px solid #f3c2c6;
}

/* ---------- 15. Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: #c6d3e2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--sp-6);
  padding-block: var(--sp-8) var(--sp-6);
}

.footer-brand {
  color: #fff;
}

.footer-brand svg {
  height: 3.25rem;
  width: auto;
}

.footer-brand p {
  margin-top: var(--sp-4);
  font-size: var(--fs-300);
  max-width: 36ch;
}

.footer-col h3 {
  color: #fff;
  font-size: var(--fs-300);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--sp-2);
}

.footer-col a {
  color: #c6d3e2;
  text-decoration: none;
  font-size: var(--fs-300);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem; /* cible tactile */
  transition: color var(--dur-1) var(--ease-out);
}

.footer-col a:hover {
  color: #fff;
}

.footer-col li {
  font-size: var(--fs-300);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--fs-200);
  color: #8fa3b8;
}

.footer-bottom nav {
  display: flex;
  gap: var(--sp-5);
}

.footer-bottom a {
  color: inherit;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem; /* cible tactile */
  padding: 0.25rem;
}

.footer-bottom a:hover {
  color: #fff;
}

/* ---------- 16. Sticky mobile action bar ---------- */
.mobile-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(7, 30, 51, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 24px rgba(5, 15, 28, 0.25);
}

.mobile-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  color: #fff;
}

.mobile-bar .bar-tel {
  background: var(--navy-800);
}

.mobile-bar .bar-wa {
  background: #0e7c3a; /* vert assombri : blanc dessus >= 4.5:1 */
}

/* ---------- 17. Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* No-JS and reduced-motion: content always visible */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- 18. Responsive ---------- */
@media (max-width: 68rem) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .method-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .method-step::after {
    display: none;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablette & petits laptops : tiroir de navigation — le header desktop
   complet (logo + 5 liens + téléphone + CTA) a besoin d'environ 1150px */
@media (max-width: 72rem) {
  .nav-toggle {
    display: flex;
  }

  .header-actions {
    margin-left: auto;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    margin: 0;
    padding: calc(var(--header-h) + 2rem) clamp(2rem, 8vw, 4rem) 2rem;
    background: linear-gradient(170deg, var(--navy-900), var(--navy-800));
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--dur-2) var(--ease-out),
      visibility 0s linear var(--dur-2);
  }

  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    z-index: 99;
    transition-delay: 0s;
  }

  .site-nav ul {
    flex-direction: column;
    gap: var(--sp-2);
  }

  .site-nav ul a {
    font-size: 1.5rem;
    padding: 0.75rem 0;
  }

  .site-nav .nav-cta-row {
    margin-top: var(--sp-6);
    display: grid;
    gap: var(--sp-3);
  }

  .header-cta {
    display: none; /* le CTA vit dans le tiroir */
  }
}

@media (max-width: 56rem) {
  .header-tel span.tel-label {
    display: none;
  }

  .detail-row,
  .about-grid,
  .zone-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .detail-row:nth-child(even) .detail-media {
    order: 0;
  }

  .about-media {
    max-height: 26rem;
    aspect-ratio: 16 / 10;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-bar {
    display: grid;
  }

  body:has(.mobile-bar) {
    padding-bottom: 3.5rem; /* espace pour la barre mobile fixe */
  }

  .scroll-cue {
    display: none;
  }
}

@media (max-width: 23rem) {
  /* très petits écrans : le header garde logo + burger ; le téléphone
     reste accessible via le tiroir et la barre mobile fixe */
  .header-tel {
    display: none;
  }

  .header-logo svg {
    height: 2.125rem;
  }
}

@media (max-width: 34rem) {
  .services-grid,
  .method-grid,
  .trust-grid,
  .gallery-grid,
  .footer-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  .hero {
    min-height: max(34rem, min(88svh, 46rem));
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 19. Reduced motion ---------- */
@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;
    transition-delay: 0ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .scroll-cue svg {
    animation: none;
  }
}
