/* =========================================================================
   KSAR Ingénierie — feuille de style
   Design system dérivé de 03_CHARTE_GRAPHIQUE_KSAR.md
   Ordre : jetons, base, typographie, layout, composants, pages, animations
   ========================================================================= */

/* 1. Jetons ------------------------------------------------------------ */
:root {
  /* Couleurs */
  --navy-950: #07192B;
  --navy-900: #102641;
  --navy-850: #0C223C;
  --navy-700: #173E62;
  --ivory-100: #F1EEE7;
  --paper-50: #FAF8F3;
  --white: #FFFFFF;
  --graphite-800: #2C343D;
  --slate-600: #59616A;
  --mist-200: #D9DEE3;
  --champagne-500: #B99B63;
  --champagne-300: #D0BD91;
  --error: #9F3F3A;
  --error-bg: #FBF4F3;
  --success: #2E6955;
  --success-bg: #F2F7F5;

  /* Typographies — pile système propre en attendant les WOFF2 licenciés
     (Manrope / Inter / IBM Plex Mono), cf. DONNEES_A_VALIDER.md */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* Échelle fluide */
  --fs-h1: clamp(2.5rem, 1.35rem + 4.2vw, 5rem);
  --fs-h2: clamp(1.9rem, 1.3rem + 2.1vw, 3.25rem);
  --fs-h3: clamp(1.2rem, 1.05rem + .55vw, 1.6rem);
  --fs-h4: 1.125rem;
  --fs-intro: clamp(1.12rem, 1rem + .5vw, 1.35rem);
  --fs-body: clamp(1rem, .97rem + .12vw, 1.075rem);
  --fs-small: .9rem;
  --fs-label: .75rem;

  /* Espaces (base 8 px) */
  --s-1: .5rem;  --s-2: 1rem;   --s-3: 1.5rem; --s-4: 2rem;
  --s-5: 2.5rem; --s-6: 3rem;   --s-8: 4rem;   --s-12: 6rem;
  --section: clamp(4.5rem, 9vw, 9.5rem);
  --section-tight: clamp(3rem, 6vw, 6rem);

  /* Structure */
  --container: 1320px;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --header-h: 5.5rem;

  /* Détails */
  --radius: 4px;
  --radius-img: 6px;
  --border: 1px solid var(--mist-200);
  --shadow-soft: 0 18px 40px -28px rgba(7, 25, 43, .35);

  /* Mouvement */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur: 560ms;
}

/* 2. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--graphite-800);
  background: var(--ivory-100);
  text-rendering: optimizeLegibility;
}

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

::selection { background: var(--navy-700); color: var(--ivory-100); }

:focus-visible {
  outline: 2px solid var(--navy-700);
  outline-offset: 3px;
  border-radius: 2px;
}
.band--dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--ivory-100); }

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

.skip-link {
  position: absolute;
  left: var(--s-2); top: -4rem;
  z-index: 100;
  padding: .7rem 1.1rem;
  background: var(--navy-900);
  color: var(--ivory-100);
  border-radius: var(--radius);
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: var(--s-2); }

/* 3. Typographie ---------------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0 0 .6em;
  color: var(--navy-900);
  line-height: 1.12;
  letter-spacing: -.015em;
  font-weight: 650;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
h4 { font-size: var(--fs-h4); line-height: 1.35; }

p, ul, ol { margin: 0 0 1.1em; }
.measure { max-width: 68ch; }
.lead {
  font-size: var(--fs-intro);
  line-height: 1.55;
  color: var(--graphite-800);
  max-width: 62ch;
}
.muted { color: var(--slate-600); }
.mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: var(--s-3); }
.grid--start { align-items: start; }
.h3 { font-size: var(--fs-h3); }
figure { margin: 0; }
strong { font-weight: 650; color: var(--navy-900); }

a { color: var(--navy-700); text-underline-offset: .2em; }
a:hover { color: var(--navy-900); }

.kicker {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--slate-600);
}
.kicker::before {
  content: "";
  width: 2rem; height: 1px;
  background: var(--navy-700);
  flex: none;
}
.band--dark .kicker { color: var(--mist-200); }
.band--dark .kicker::before { background: var(--champagne-500); }

.mono-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--slate-600);
}

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

.section { padding-block: var(--section); }
.section--tight { padding-block: var(--section-tight); }

.band--ivory { background: var(--ivory-100); }
.band--paper { background: var(--paper-50); }
.band--white { background: var(--white); }
.band--dark {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-850));
  color: var(--mist-200);
}
.band--dark h1, .band--dark h2, .band--dark h3, .band--dark h4 { color: var(--ivory-100); }
.band--dark a { color: var(--ivory-100); }
.band--line-top { border-top: var(--border); }
.band--line-bottom { border-bottom: var(--border); }

.section-head { max-width: 50rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .kicker { justify-content: center; }

.grid { display: grid; gap: clamp(1.5rem, 3.5vw, 3rem); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr 1fr; }

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* 5. Boutons et liens d'action ------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .95rem 1.55rem;
  border: 1px solid var(--navy-900);
  border-radius: var(--radius);
  background: var(--navy-900);
  color: var(--ivory-100);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover, .btn:focus-visible { background: var(--navy-700); border-color: var(--navy-700); color: var(--ivory-100); }
.btn:hover .arrow, .btn:focus-visible .arrow { transform: translateX(4px); }
.btn:disabled { opacity: .65; cursor: default; }

.btn--secondary {
  background: transparent;
  color: var(--navy-900);
}
.btn--secondary:hover, .btn--secondary:focus-visible {
  background: rgba(16, 38, 65, .07);
  color: var(--navy-900);
  border-color: var(--navy-900);
}

.btn--light {
  background: transparent;
  border-color: var(--ivory-100);
  color: var(--ivory-100);
}
.btn--light:hover, .btn--light:focus-visible {
  background: var(--ivory-100);
  border-color: var(--ivory-100);
  color: var(--navy-900);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  color: var(--navy-900);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .3em;
}
.link-arrow .arrow { transition: transform .25s var(--ease); }
.link-arrow:hover { text-decoration-color: var(--champagne-500); text-decoration-thickness: 2px; }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* 6. En-tête et navigation -------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 50;
  background: var(--ivory-100);
  border-bottom: var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: var(--header-h);
  padding-block: .9rem;
}
.brand { display: inline-flex; flex: none; }
.brand img { width: clamp(138px, 13vw, 184px); height: auto; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px; height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--navy-900);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px; width: 100%;
  background: var(--navy-900);
  transition: transform .25s var(--ease), opacity .2s;
}

.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.site-nav > ul {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 2vw, 2rem);
  margin: 0; padding: 0;
  list-style: none;
}
.site-nav a:not(.btn) {
  color: var(--graphite-800);
  text-decoration: none;
  font-weight: 500;
  padding-block: .4rem;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav a:not(.btn):hover { color: var(--navy-900); border-bottom-color: var(--mist-200); }
.site-nav a[aria-current="page"] { color: var(--navy-900); border-bottom-color: var(--navy-900); }

/* Sous-menu Prestations */
.has-sub { position: relative; display: flex; align-items: center; gap: .15rem; }
.sub-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem; height: 1.7rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--graphite-800);
  cursor: pointer;
}
.sub-toggle svg { width: 12px; height: 12px; transition: transform .2s var(--ease); }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.sub {
  position: absolute;
  top: calc(100% + .65rem);
  left: -1rem;
  min-width: 21rem;
  margin: 0;
  padding: .55rem 0;
  list-style: none;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: none;
}
.sub a {
  display: block;
  padding: .55rem 1.25rem;
  border-bottom: 0 !important;
}
.sub a:hover { background: var(--paper-50); }
.has-sub.open .sub { display: block; }
html.no-js .has-sub:hover .sub,
html.no-js .has-sub:focus-within .sub { display: block; }

/* Navigation mobile */
@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ivory-100);
    border-bottom: var(--border);
    padding: var(--s-2) var(--gutter) var(--s-4);
    box-shadow: var(--shadow-soft);
  }
  html.js .site-nav { display: none; }
  html.js .site-nav.is-open { display: flex; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav > ul > li { border-bottom: 1px solid var(--mist-200); }
  .site-nav a:not(.btn) { display: block; padding: .9rem 0; border-bottom: 0; }
  .has-sub { flex-wrap: wrap; }
  .sub-toggle { display: none; }
  .sub {
    position: static;
    display: block;
    min-width: 0;
    width: 100%;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 .75rem 1rem;
  }
  .sub a { padding: .45rem 0; color: var(--slate-600); }
  .site-nav .btn { margin-top: var(--s-3); justify-content: center; }
  html.js body.nav-locked { overflow: hidden; }
}

/* 7. Fil d'Ariane ------------------------------------------------------------ */
.breadcrumb { padding-block: 1.1rem; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 0; padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--slate-600);
}
.breadcrumb li + li::before { content: "/"; margin-right: .55rem; color: var(--mist-200); }
.breadcrumb a { color: var(--slate-600); }
.breadcrumb a:hover { color: var(--navy-900); }
.breadcrumb [aria-current="page"] { color: var(--navy-900); }

/* 8. Hero ---------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero .container {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
  align-items: center;
}
@media (min-width: 960px) {
  .hero .container { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(16, 38, 65, .05) 1px, transparent 1px) 0 0 / 220px 100%,
    linear-gradient(to bottom, rgba(16, 38, 65, .045) 1px, transparent 1px) 0 0 / 100% 220px;
  pointer-events: none;
}
.hero h1 { max-width: 12ch; margin-bottom: .5em; }
.hero .lead { margin-bottom: var(--s-4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }
.hero-expertises {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin: 0; padding: var(--s-3) 0 0;
  list-style: none;
  border-top: var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--slate-600);
}
.hero-expertises li + li::before { content: "·"; margin-right: 1rem; color: var(--champagne-500); }

.hero-media { position: relative; }
.hero-media::before {
  content: "";
  position: absolute;
  inset: 1rem -1rem -1rem 1rem;
  border: 1px solid rgba(16, 38, 65, .3);
  border-radius: var(--radius-img);
  pointer-events: none;
}
.hero-media img {
  position: relative;
  width: 100%;
  border-radius: var(--radius-img);
  object-fit: cover;
}
.fig-cap {
  margin-top: .8rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate-600);
}

/* 9. Bandeau d'expertises ------------------------------------------------------- */
.band-expertises {
  border-block: var(--border);
  background: var(--paper-50);
}
.band-expertises ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.4rem;
  margin: 0;
  padding: 1.15rem 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--navy-900);
}
.band-expertises li + li::before { content: "·"; margin-right: 1.4rem; color: var(--champagne-500); }

/* 10. Cartes d'expertise ----------------------------------------------------------- */
.card {
  position: relative;
  padding-top: var(--s-3);
  border-top: var(--border);
}
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 2.25rem; height: 2px;
  background: var(--navy-900);
}
.card .index {
  display: block;
  margin-bottom: .9rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .12em;
  color: var(--navy-700);
}
.card h3 { margin-bottom: .45em; font-size: 1.28rem; }
.card p { color: var(--slate-600); margin-bottom: 1.1em; }
.card .link-arrow { font-size: .95rem; }

/* 11. Blocs éditoriaux image / texte -------------------------------------------------- */
.feature { display: grid; gap: clamp(2rem, 4.5vw, 4.5rem); align-items: center; }
@media (min-width: 900px) {
  .feature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature--flip .feature-body { order: 2; }
  .feature--flip .feature-media { order: 1; }
}
.feature + .feature { margin-top: clamp(3.5rem, 7vw, 7rem); }
.feature-media img {
  width: 100%;
  border-radius: var(--radius-img);
  object-fit: cover;
}
.feature-body h2 { max-width: 18ch; }
.feature-body p { color: var(--graphite-800); }
.feature-list { padding-left: 1.1rem; color: var(--slate-600); }
.feature-list li { margin-bottom: .3em; }

.motif {
  aspect-ratio: 4 / 3;
  border: var(--border);
  border-radius: var(--radius-img);
  background: linear-gradient(165deg, var(--white), var(--paper-50));
  color: var(--navy-900);
  overflow: hidden;
}
.motif svg { width: 100%; height: 100%; }

/* 12. Méthode ------------------------------------------------------------------------- */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: etape; }
.step {
  position: relative;
  padding: 0 0 var(--s-5) 4.75rem;
}
.step::before {
  counter-increment: etape;
  content: "0" counter(etape);
  position: absolute;
  left: 0; top: .1em;
  font-family: var(--font-mono);
  font-size: .85rem;
  letter-spacing: .12em;
  color: var(--navy-700);
}
.step::after {
  content: "";
  position: absolute;
  left: 3.4rem;
  top: .45em;
  width: .85rem;
  height: 1px;
  background: var(--champagne-500);
}
.step:not(:last-child) .step-line {
  position: absolute;
  left: .55rem;
  top: 1.7em;
  bottom: .4rem;
  width: 1px;
  background: var(--mist-200);
}
.step h3 { margin-bottom: .3em; font-size: 1.3rem; }
.step p { color: var(--slate-600); max-width: 58ch; margin-bottom: 0; }

/* 13. Livrables (section sombre) -------------------------------------------------------- */
.deliverable {
  padding-top: var(--s-3);
  border-top: 1px solid var(--champagne-500);
}
.deliverable h3 { font-size: 1.1rem; margin-bottom: .35em; }
.deliverable p { color: var(--mist-200); font-size: var(--fs-small); margin-bottom: 0; }

/* 14. Appel final ------------------------------------------------------------------------ */
.cta-final { text-align: left; }
.cta-final h2 { max-width: 18ch; }
.cta-final p { max-width: 56ch; margin-bottom: var(--s-4); }

/* 15. Pied de page -------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: var(--mist-200);
  font-size: var(--fs-small);
}
.site-footer .footer-main {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  padding-block: clamp(3rem, 6vw, 5rem) var(--s-6);
}
@media (min-width: 720px) { .site-footer .footer-main { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .site-footer .footer-main { grid-template-columns: 1.35fr 1fr 1fr 1fr; } }

.footer-brand img { width: min(200px, 60vw); }
.footer-brand p { margin: var(--s-3) 0 0; max-width: 30ch; }

.site-footer h2 {
  margin-bottom: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--champagne-300);
}
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: var(--mist-200); text-decoration: none; }
.site-footer a:hover { color: var(--ivory-100); text-decoration: underline; text-underline-offset: .25em; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  justify-content: space-between;
  padding-block: var(--s-3);
  border-top: 1px solid rgba(241, 238, 231, .16);
  font-size: .84rem;
  color: rgba(217, 222, 227, .85);
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }

/* 16. Formulaires ------------------------------------------------------------------------------ */
.form-grid { display: grid; gap: var(--s-3); }
@media (min-width: 720px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid .span-2 { grid-column: 1 / -1; }
}

.field label,
fieldset legend {
  display: block;
  margin-bottom: .45rem;
  font-weight: 600;
  color: var(--navy-900);
}
.req { color: var(--error); }
.hint { display: block; margin-top: .35rem; font-size: .85rem; color: var(--slate-600); }

input[type="text"], input[type="email"], input[type="tel"],
select, textarea {
  width: 100%;
  padding: .85rem .95rem;
  font: inherit;
  color: var(--graphite-800);
  background: var(--white);
  border: 1px solid var(--mist-200);
  border-radius: var(--radius);
  transition: border-color .2s;
}
textarea { min-height: 10.5rem; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--slate-600); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--navy-700);
  outline-offset: 1px;
}
input[type="file"] { padding: .65rem .5rem; font-size: .95rem; }

fieldset {
  margin: 0;
  padding: var(--s-2) var(--s-3) var(--s-3);
  border: 1px solid var(--mist-200);
  border-radius: var(--radius);
}
fieldset legend { padding: 0 .45rem; margin-bottom: 0; }

.choice {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  margin: .55rem 0 0;
  font-weight: 400 !important;
  color: var(--graphite-800);
}
.choice input {
  width: 1.1rem; height: 1.1rem;
  margin-top: .22rem;
  accent-color: var(--navy-900);
  flex: none;
}

.field--error input,
.field--error select,
.field--error textarea,
fieldset.field--error { border-color: var(--error); }
.error-msg {
  display: block;
  margin-top: .4rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--error);
}

.form-alert {
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--error);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--error-bg);
  color: var(--graphite-800);
}
.form-alert h2 { font-size: 1.05rem; color: var(--error); margin-bottom: .4em; }
.form-alert ul { margin: 0; padding-left: 1.1rem; }
.form-alert a { color: var(--error); font-weight: 600; }

.form-success {
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--success);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--success-bg);
}

/* Honeypot : hors écran, jamais display:none (certains robots le détectent) */
.hp {
  position: absolute !important;
  left: -6000px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* 17. Éléments de page ---------------------------------------------------------------------------- */
.page-head { padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2rem, 4vw, 3.5rem); }
.page-head h1 { max-width: 20ch; }
.page-head .lead { margin-bottom: 0; }

.aside-box {
  padding: var(--s-3) var(--s-4);
  border: var(--border);
  border-top: 2px solid var(--navy-900);
  border-radius: var(--radius);
  background: var(--white);
}
.aside-box h2, .aside-box h3 { font-size: 1.05rem; }
.aside-box ul { margin: 0; padding-left: 1.1rem; color: var(--slate-600); }
.aside-box li { margin-bottom: .35em; }

.encadre {
  padding: var(--s-3) var(--s-4);
  border-left: 3px solid var(--champagne-500);
  background: var(--paper-50);
  color: var(--graphite-800);
}
.band--dark .encadre { background: rgba(241, 238, 231, .06); color: var(--mist-200); }

.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li {
  position: relative;
  padding: 0 0 .55em 1.6rem;
  color: var(--graphite-800);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: .65rem; height: .65rem;
  border: 1.5px solid var(--navy-700);
}

.def-list { margin: 0; }
.def-list dt { font-weight: 650; color: var(--navy-900); margin-top: var(--s-3); }
.def-list dd { margin: .25rem 0 0; color: var(--slate-600); max-width: 62ch; }

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: baseline;
  padding-block: var(--s-2);
  border-bottom: var(--border);
}
.contact-line .mono-label { min-width: 8.5rem; }
.contact-line a { font-size: 1.15rem; font-weight: 600; color: var(--navy-900); }

.a-valider {
  background: var(--champagne-300);
  color: var(--navy-900);
  padding: 0 .35em;
  border-radius: 2px;
}

.legal-page h2 { font-size: 1.35rem; margin-top: var(--s-6); }
.legal-page p, .legal-page ul { max-width: 70ch; color: var(--graphite-800); }

.related { border-top: var(--border); }

/* 18. Animations d'apparition ----------------------------------------------------------------------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }
html.js [data-reveal]:nth-child(2) { transition-delay: 70ms; }
html.js [data-reveal]:nth-child(3) { transition-delay: 140ms; }
html.js [data-reveal]:nth-child(n+4) { transition-delay: 210ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
}

/* 19. Impression -------------------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .breadcrumb, .no-print, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }
  .section { padding-block: 1.5rem; }
}

/* Grille de la page devis + impression de la checklist */
.devis-grid { grid-template-columns: 1fr; }
@media (min-width: 960px) {
  .devis-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}
.devis-aside { align-self: start; }
@media (min-width: 960px) {
  .devis-aside { position: sticky; top: var(--s-3); }
}
@media print {
  .print-hide { display: none !important; }
  .devis-aside { border: 1px solid #000; }
}

/* =====================================================================
   Refonte « premium » — hero cinématique, marquee, planches, implantation
   ===================================================================== */

/* --- Hero cinématique (vidéo de marque en arrière-plan) --------------- */
.hero-cinema {
  position: relative;
  min-height: clamp(560px, 88vh, 920px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--navy-950);
  color: var(--ivory-100);
}
.hero-cinema .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-cinema::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7,25,43,.42) 0%, rgba(7,25,43,.18) 45%, rgba(7,25,43,.72) 100%),
    linear-gradient(90deg, rgba(7,25,43,.62) 0%, rgba(7,25,43,.12) 60%);
  pointer-events: none;
}
.hero-cinema .container {
  position: relative;
  z-index: 1;
  padding-top: var(--s-6);
  padding-bottom: var(--s-8);
}
.hero-cinema .kicker { color: var(--champagne-500); }
.hero-cinema .kicker::before { background: var(--champagne-500); }
.hero-cinema h1 {
  color: var(--ivory-100);
  max-width: 15ch;
  font-size: clamp(2.7rem, 6.2vw, 5.4rem);
}
.hero-cinema .lead {
  color: var(--mist-200);
  max-width: 52ch;
}
.hero-cinema .btn--light:hover { color: var(--navy-950); }
.hero-cinema .btn--secondary {
  border-color: rgba(241,238,231,.45);
  color: var(--ivory-100);
}
.hero-cinema .btn--secondary:hover {
  border-color: var(--ivory-100);
  background: rgba(241,238,231,.08);
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: var(--s-3);
  width: 1px;
  height: 56px;
  background: rgba(241,238,231,.35);
  overflow: hidden;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 0; top: -40%;
  width: 100%; height: 40%;
  background: var(--ivory-100);
  animation: cue 2.4s cubic-bezier(.65,0,.35,1) infinite;
}
@keyframes cue { to { top: 110%; } }

.video-toggle {
  position: absolute;
  right: var(--s-3);
  bottom: var(--s-3);
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(241,238,231,.5);
  border-radius: 50%;
  background: rgba(7,25,43,.35);
  color: var(--ivory-100);
  cursor: pointer;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.video-toggle:hover { border-color: var(--ivory-100); background: rgba(7,25,43,.6); }
.video-toggle svg { width: 15px; height: 15px; }
.video-toggle .icon-play { display: none; }
.video-toggle.is-paused .icon-play { display: block; }
.video-toggle.is-paused .icon-pause { display: none; }

/* --- Bandeau expertises défilant (marquee sobre) ----------------------- */
.marquee { overflow: hidden; }
.marquee .container { max-width: none; padding: 0; }
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee-track ul {
  flex-wrap: nowrap;
  justify-content: flex-start;
  padding-inline: .7rem;
}
.marquee-track li { white-space: nowrap; }
.marquee-track ul li:first-child::before {
  content: "·";
  margin-right: 1.4rem;
  color: var(--champagne-500);
}
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* --- Planches d'étude (cartes expertises imagées) ---------------------- */
.tile-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--paper-50);
  border: 1px solid var(--mist-200);
  transition: transform .32s var(--ease), border-color .32s var(--ease), box-shadow .32s var(--ease);
}
.tile-card:hover,
.tile-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--navy-700);
  box-shadow: 0 18px 40px -22px rgba(7, 25, 43, .35);
}
.tile-media { position: relative; overflow: hidden; }
.tile-media img { display: block; width: 100%; height: auto; }
.tile-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(16,38,65,.10));
  opacity: 0;
  transition: opacity .32s var(--ease);
}
.tile-card:hover .tile-media::after { opacity: 1; }
.tile-body {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-2);
  border-top: 1px solid var(--mist-200);
}
.tile-body .index {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--champagne-500);
}
.tile-body h3 { margin: 0; font-size: 1.06rem; flex: 1; }
.tile-body .arrow {
  transition: transform .18s var(--ease);
  color: var(--navy-700);
}
.tile-card:hover .tile-body .arrow { transform: translateX(5px); }

/* --- Bande sombre texturée par la vidéo de marque ---------------------- */
.band-video { position: relative; overflow: hidden; }
.band-video .band-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .16;
  pointer-events: none;
}
.band-video > .container { position: relative; z-index: 1; }

/* --- Méthode horizontale (accueil) ------------------------------------- */
.steps-h {
  display: grid;
  gap: var(--s-3);
  counter-reset: steph;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 1100px) { .steps-h { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 640px) and (max-width: 1099px) { .steps-h { grid-template-columns: repeat(2, 1fr); } }
.steps-h li {
  counter-increment: steph;
  border-top: 2px solid var(--navy-900);
  padding-top: var(--s-2);
  position: relative;
}
.steps-h li::before {
  content: "0" counter(steph);
  display: block;
  font-family: var(--font-mono);
  font-size: .85rem;
  letter-spacing: .08em;
  color: var(--champagne-500);
  margin-bottom: .55rem;
}
.steps-h h3 { margin: 0 0 .4rem; font-size: 1.12rem; }
.steps-h p { margin: 0; color: var(--slate-600); font-size: .97rem; }

/* --- Implantation / repère cartographique ------------------------------ */
.locator {
  position: relative;
  border: 1px solid var(--mist-200);
  background: var(--paper-50);
}
.locator svg { display: block; width: 100%; height: auto; }
.locator .ring { fill: none; stroke: var(--mist-200); }
.locator .road { stroke: var(--mist-200); stroke-width: 1.5; }
.locator .road--main { stroke: var(--slate-600); opacity: .5; }
.locator .lbl {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .12em;
  fill: var(--slate-600);
}
.locator .lbl--city { fill: var(--navy-900); font-size: 15px; }
.locator .accent { fill: var(--champagne-500); }
.locator .mark { fill: var(--navy-900); }
.locator .compass-line { stroke: var(--slate-600); stroke-width: 1.5; }
.locator .compass-tri { fill: var(--slate-600); }
.locator .pin { fill: var(--navy-900); }
.locator .pin-ring {
  fill: none;
  stroke: var(--champagne-500);
  stroke-width: 2;
  transform-origin: center;
  transform-box: fill-box;
  animation: pin 2.6s ease-out infinite;
}
@keyframes pin {
  0%   { transform: scale(.45); opacity: .9; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}
.addr-card .contact-line:first-child { border-top: 0; padding-top: 0; }
.map-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-2);
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .scroll-cue::after { animation: none; }
  .locator .pin-ring { animation: none; opacity: .6; transform: scale(1); }
}
.tile-body .h3-like {
  flex: 1;
  font-weight: 650;
  letter-spacing: -0.012em;
  font-size: 1.06rem;
  line-height: 1.3;
  color: var(--navy-900);
}

/* --- Visuels éditoriaux pleine largeur & vidéos encadrées --------------- */
.visual-band { position: relative; }
.visual-band img {
  display: block;
  width: 100%;
  height: clamp(300px, 46vw, 540px);
  object-fit: cover;
}
.visual-band .fig-cap {
  margin: .6rem 0 0;
}
.visual-band + .section { border-top: 0; }

.video-frame {
  position: relative;
  border: 1px solid var(--mist-200);
  background: var(--navy-950);
  overflow: hidden;
}
.video-frame video { display: block; width: 100%; height: auto; }
.video-frame .video-toggle {
  right: var(--s-2);
  bottom: var(--s-2);
}
.video-frame--paper { background: var(--paper-50); }
.video-frame--paper .video-toggle {
  border-color: var(--slate-600);
  color: var(--navy-900);
  background: rgba(250, 248, 243, .6);
}
.video-frame--paper .video-toggle:hover {
  border-color: var(--navy-900);
  background: rgba(250, 248, 243, .9);
}
