/* =========================================================================
   LEMAR Travaux Publics — feuille de style partagee (multi-pages)
   Charte v1.3 : orange #fd4825 seule couleur forte ; ambre/turquoise en
   signalement. Polices OFL embarquees Open Sans (titres) + Caladea (corps).
   ========================================================================= */

/* ---------- polices de la charte (OFL, embarquees) ---------- */
@font-face {
  font-family: "Open Sans"; font-style: normal; font-weight: 400;
  src: url("fonts/OpenSans-Regular.ttf") format("truetype"); font-display: swap;
}
@font-face {
  font-family: "Open Sans"; font-style: normal; font-weight: 600;
  src: url("fonts/OpenSans-SemiBold.ttf") format("truetype"); font-display: swap;
}
@font-face {
  font-family: "Open Sans"; font-style: normal; font-weight: 700;
  src: url("fonts/OpenSans-Bold.ttf") format("truetype"); font-display: swap;
}
@font-face {
  font-family: "Caladea"; font-style: normal; font-weight: 400;
  src: url("fonts/Caladea-Regular.ttf") format("truetype"); font-display: swap;
}
@font-face {
  font-family: "Caladea"; font-style: italic; font-weight: 400;
  src: url("fonts/Caladea-Italic.ttf") format("truetype"); font-display: swap;
}
/* Les graisses grasses de Caladea manquaient : tout le <strong> du site etait
   graisse SYNTHETIQUEMENT par le navigateur, d'ou un gras mou qui ne ressortait
   pas. Les vraies fontes viennent du referentiel de charte
   (99. Referentiels/Charte graphique/Polices), memes licences OFL. */
@font-face {
  font-family: "Caladea"; font-style: normal; font-weight: 700;
  src: url("fonts/Caladea-Bold.ttf") format("truetype"); font-display: swap;
}
@font-face {
  font-family: "Caladea"; font-style: italic; font-weight: 700;
  src: url("fonts/Caladea-BoldItalic.ttf") format("truetype"); font-display: swap;
}

:root {
  --accent:    #fd4825;  /* orange signature — couleur forte unique */
  --amber:     #E6B450;  /* accent, signalement seulement */
  --turquoise: #3FA0B5;  /* accent, signalement seulement */
  --ink:       #333130;
  --ink-2:     #444444;  /* gris texte */
  --muted:     #888888;  /* gris secondaire */
  --hair:      #e4e0dc;
  --hair-soft: #f0edea;
  --ground:    #ffffff;
  --surface:   #fbfaf9;
  --surface-2: #f4f1ee;
  --on-accent: #ffffff;

  --title: "Open Sans", "Segoe UI", system-ui, sans-serif;
  --body:  "Caladea", "Cambria", Georgia, serif;

  --measure: 68ch;
  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --maxw: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #f4f1ee;
    --ink-2:     #d8d2cc;
    --muted:     #9a9188;
    --hair:      #33302c;
    --hair-soft: #262320;
    --ground:    #16140f;
    --surface:   #1d1a15;
    --surface-2: #23201b;
    --accent:    #ff5c39;
  }
}
:root[data-theme="dark"] {
  --ink:       #f4f1ee; --ink-2: #d8d2cc; --muted: #9a9188;
  --hair:      #33302c; --hair-soft: #262320;
  --ground:    #16140f; --surface: #1d1a15; --surface-2: #23201b;
  --accent:    #ff5c39;
}
:root[data-theme="light"] {
  --ink:       #333130; --ink-2: #444444; --muted: #888888;
  --hair:      #e4e0dc; --hair-soft: #f0edea;
  --ground:    #ffffff; --surface: #fbfaf9; --surface-2: #f4f1ee;
  --accent:    #fd4825;
}

* { box-sizing: border-box; }

/* Racine a 15px (vs 16 par defaut) : dezoome uniformement tout le systeme
   typographique base sur rem, pour un rendu un peu plus large et aere. */
html { scroll-behavior: smooth; font-size: 15px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 1.12rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

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

h1, h2, h3, .u-title { font-family: var(--title); color: var(--ink); margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
h3 { font-size: 1.06rem; font-weight: 600; letter-spacing: .005em; }
p { margin: 0; max-width: var(--measure); }

.eyebrow {
  font-family: var(--title); font-size: .72rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0;
}
.rule-no {
  font-family: var(--title); font-size: .72rem; font-weight: 700;
  letter-spacing: .05em; color: var(--accent); font-variant-numeric: tabular-nums;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

/* ---------- masthead / navigation ---------- */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}
.masthead__in {
  position: relative;
  max-width: var(--maxw); margin: 0 auto; padding: .6rem var(--pad);
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { margin-right: auto; display: flex; align-items: center; }
.brand img { height: 46px; width: auto; }
@media (max-width: 560px) { .brand img { height: 40px; } }
.nav { display: flex; gap: 1.5rem; }
.nav a {
  font-family: var(--title); font-size: .8rem; font-weight: 600;
  letter-spacing: .04em; color: var(--ink-2); text-decoration: none;
  padding: .3rem 0; border-bottom: 2px solid transparent; transition: color .18s, border-color .18s;
}
.nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.nav a.is-active { color: var(--ink); border-bottom-color: var(--accent); }

/* menu mobile : bascule sans JS (checkbox), source de liens unique.
   Le checkbox est masque visuellement mais reste focusable au clavier. */
.navcb { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.navbtn { display: none; width: 40px; height: 40px; cursor: pointer; align-items: center; justify-content: center; }
.navcb:focus-visible ~ .navbtn { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 821px) { .navcb { display: none; } }  /* inutile sur desktop : nav toujours visible */
.navbtn span, .navbtn span::before, .navbtn span::after {
  content: ""; display: block; width: 22px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s;
}
.navbtn span { position: relative; }
.navbtn span::before { position: absolute; top: -7px; left: 0; }
.navbtn span::after  { position: absolute; top: 7px;  left: 0; }

@media (max-width: 820px) {
  .navbtn { display: flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--ground); border-bottom: 1px solid var(--hair);
    padding: .25rem var(--pad) 1rem;
    box-shadow: 0 16px 30px rgba(0,0,0,.08);
  }
  .navcb:checked ~ .nav { display: flex; }
  .nav a { padding: .85rem 0; border-bottom: 1px solid var(--hair-soft); border-left: 0; }
  .nav a.is-active { border-bottom-color: var(--hair-soft); color: var(--accent); }
  .navcb:checked ~ .navbtn span { background: transparent; }
  .navcb:checked ~ .navbtn span::before { transform: translateY(7px) rotate(45deg); }
  .navcb:checked ~ .navbtn span::after  { transform: translateY(-7px) rotate(-45deg); }
}

/* case Lauréat : logo à côté du texte (logo sombre en thème clair, blanc en sombre) */
.fact--laureat { display: flex; align-items: center; gap: .85rem; }
.fact__logo { height: 54px; width: auto; display: block; flex: none; }
.fact__badge .on-dark { display: none; }
@media (prefers-color-scheme: dark) { .fact__badge .on-light { display: none; } .fact__badge .on-dark { display: block; } }
:root[data-theme="light"] .fact__badge .on-light { display: block; }
:root[data-theme="light"] .fact__badge .on-dark { display: none; }
:root[data-theme="dark"] .fact__badge .on-light { display: none; }
:root[data-theme="dark"] .fact__badge .on-dark { display: block; }
@media (max-width: 760px) { .fact__logo { height: 46px; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: flex-end; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,17,12,.28) 0%, rgba(20,17,12,.10) 30%, rgba(20,17,12,.62) 78%, rgba(20,17,12,.86) 100%),
    linear-gradient(90deg, rgba(20,17,12,.55) 0%, rgba(20,17,12,0) 60%);
}
.hero__in { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad) clamp(2.5rem, 6vw, 4.5rem); width: 100%; }
.hero__tag {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--title); font-size: .72rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: #fff; margin-bottom: 1.3rem;
}
.hero__tag::before { content: ""; width: 26px; height: 3px; background: var(--accent); }
.hero h1 {
  color: #fff; font-size: clamp(2.3rem, 6vw, 4.3rem); line-height: .98;
  letter-spacing: -.02em; font-weight: 700; max-width: 17ch;
  text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__lede {
  color: rgba(255,255,255,.92); font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  margin-top: 1.4rem; max-width: 52ch; text-shadow: 0 1px 12px rgba(0,0,0,.4);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.1rem; }

.btn {
  font-family: var(--title); font-size: .82rem; font-weight: 700; letter-spacing: .04em;
  text-decoration: none; padding: .85rem 1.6rem; border: 2px solid var(--accent);
  background: var(--accent); color: var(--on-accent); transition: background .18s, border-color .18s, color .18s;
  display: inline-block;
}
.btn:hover { background: #e23c1d; border-color: #e23c1d; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--ink { color: var(--ink); background: transparent; border-color: var(--hair); }
.btn--ink:hover { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }

/* lien « voir tout » de fin de section */
.morelink {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.8rem;
  font-family: var(--title); font-weight: 700; font-size: .82rem; letter-spacing: .03em;
  color: var(--accent); text-decoration: none;
}
.morelink::after { content: "→"; transition: transform .2s; }
.morelink:hover::after { transform: translateX(4px); }

/* ---------- en-tete de page interne ---------- */
.pagehead { border-bottom: 1px solid var(--hair); background: var(--surface); }
.pagehead__in { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.6rem, 6vw, 4.2rem) var(--pad) clamp(2.2rem, 5vw, 3.4rem); }
.pagehead .eyebrow { margin-bottom: .9rem; }
.pagehead h1 {
  font-family: var(--title); font-weight: 700; color: var(--ink);
  font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.04; letter-spacing: -.018em;
  max-width: 20ch; text-wrap: balance;
}
.pagehead h1 em { font-style: normal; color: var(--accent); }
.pagehead p { margin-top: 1.1rem; color: var(--ink-2); font-size: 1.12rem; max-width: 62ch; }
.crumb { font-family: var(--title); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb span { color: var(--accent); }

/* ---------- en-tete de page : BANDEAU photo + texte en surimpression ---------- */
.pagehero { position: relative; display: flex; align-items: flex-end; min-height: min(56vh, 460px); overflow: hidden; border-bottom: 1px solid var(--hair); }
.pagehero__bg { position: absolute; inset: 0; z-index: 0; }
.pagehero__bg img { width: 100%; height: 100%; object-fit: cover; }
.pagehero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,17,12,.30) 0%, rgba(20,17,12,.12) 34%, rgba(20,17,12,.66) 82%, rgba(20,17,12,.88) 100%),
    linear-gradient(90deg, rgba(20,17,12,.58) 0%, rgba(20,17,12,0) 62%);
}
.pagehero__in { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; width: 100%; padding: 0 var(--pad) clamp(2rem, 5vw, 3.4rem); }
.pagehero .crumb { color: rgba(255,255,255,.8); margin-bottom: 1rem; }
.pagehero .crumb a { color: rgba(255,255,255,.8); }
.pagehero .crumb a:hover { color: #fff; }
.pagehero .crumb span { color: var(--accent); }
.pagehero .eyebrow { color: #fff; font-size: .8rem; letter-spacing: .2em; margin-bottom: 1.1rem; display: inline-flex; align-items: center; gap: .65rem; }
.pagehero .eyebrow::before { content: ""; width: 30px; height: 3px; background: var(--accent); flex: none; }
.pagehero h1 {
  font-family: var(--title); font-weight: 700; color: #fff;
  font-size: clamp(2.2rem, 5.6vw, 3.6rem); line-height: 1.0; letter-spacing: -.022em;
  max-width: 20ch; text-wrap: balance; text-shadow: 0 2px 30px rgba(0,0,0,.45);
}
.pagehero h1 em { font-style: normal; color: var(--accent); }
.pagehero__lede { color: rgba(255,255,255,.9); margin-top: 1.1rem; max-width: 60ch; font-size: 1.12rem; text-shadow: 0 1px 12px rgba(0,0,0,.45); }
/* zoom lent optionnel, coupe si reduced-motion */
.pagehero__bg img { animation: kenburns 22s ease-out both; }
@media (prefers-reduced-motion: reduce) { .pagehero__bg img { animation: none; } }

/* ---------- facts / piliers ---------- */
.facts { background: var(--surface-2); border-bottom: 1px solid var(--hair); }
.facts__in { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 1.6rem 1.25rem 1.6rem 0; border-right: 1px solid var(--hair); }
.fact:last-child { border-right: 0; }
.fact__v { font-family: var(--title); font-size: 1.4rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.fact__v span { color: var(--accent); }
.fact__k { font-family: var(--title); font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: .35rem; }
@media (max-width: 760px) {
  .facts__in { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(-n+2) { border-bottom: 1px solid var(--hair); }
}

/* bande « 3 piliers » — recit de valeur (pas de chiffres) */
.pillars { background: var(--ground); border-bottom: 1px solid var(--hair); }
.pillars__in { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); display: grid; grid-template-columns: repeat(3, 1fr); }
.pillar { padding: 2rem 1.6rem 2rem 0; border-right: 1px solid var(--hair); }
.pillar:last-child { border-right: 0; }
.pillar h3 { display: flex; align-items: baseline; gap: .6rem; color: var(--ink); font-size: 1.08rem; }
.pillar h3::before { content: ""; width: 22px; height: 3px; background: var(--accent); flex: none; transform: translateY(-4px); }
.pillar p { margin-top: .6rem; font-size: .96rem; color: var(--muted); max-width: 40ch; }
@media (max-width: 760px) {
  .pillars__in { grid-template-columns: 1fr; }
  .pillar { border-right: 0; border-bottom: 1px solid var(--hair); padding: 1.5rem 0; }
  .pillar:last-child { border-bottom: 0; }
}

/* ---------- trust band (donneurs d'ordre) ---------- */
.trust { background: var(--ground); border-bottom: 1px solid var(--hair); }
.trust__in { max-width: var(--maxw); margin: 0 auto; padding: 1.6rem var(--pad); display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.trust__k { font-family: var(--title); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.trust__list { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.6rem; }
.trust__c { font-family: var(--title); font-size: 1.02rem; font-weight: 700; color: var(--ink-2); letter-spacing: .01em; }
@media (prefers-color-scheme: dark) { .trust__c { color: var(--ink); } }

/* ---------- zone de chalandise (accueil) ---------- */
.zone { background: var(--surface-2); border-bottom: 1px solid var(--hair); }
.zone__in { max-width: var(--maxw); margin: 0 auto; padding: 1.5rem var(--pad); display: grid; grid-template-columns: auto 1fr; gap: .7rem 2rem; align-items: center; }
.zone__k { font-family: var(--title); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.zone__tiers { display: flex; flex-wrap: wrap; gap: .7rem 2.2rem; }
.zone__t { display: flex; align-items: baseline; gap: .55rem; }
.zone__dep { font-family: var(--title); font-weight: 700; color: var(--accent); font-size: .96rem; letter-spacing: .01em; white-space: nowrap; }
.zone__lbl { font-family: var(--title); font-size: .88rem; color: var(--ink-2); }
@media (max-width: 760px) { .zone__in { grid-template-columns: 1fr; } }

/* ---------- strata section ---------- */
.stratum { border-bottom: 1px solid var(--hair); padding-block: clamp(3.2rem, 7vw, 5.5rem); background: var(--ground); }
.stratum--alt { background: var(--surface); }
.stratum__in { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); display: grid; grid-template-columns: 9rem 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); }
.stratum__label { display: flex; flex-direction: column; gap: .5rem; position: sticky; top: 5.5rem; align-self: start; }
.stratum__label .rule-no { font-size: 2.7rem; line-height: .85; letter-spacing: -.02em; font-weight: 700; }
.stratum__label .eyebrow { font-size: .78rem; letter-spacing: .16em; color: var(--ink-2); }
.stratum__label .rule-no::after { content: ""; display: block; width: 34px; height: 3px; background: var(--accent); margin-top: .7rem; }
@media (max-width: 880px) {
  .stratum__in { grid-template-columns: 1fr; gap: 1.25rem; }
  .stratum__label { flex-direction: row; align-items: center; gap: .8rem; position: static; }
  .stratum__label .rule-no { font-size: 1.7rem; }
  .stratum__label .rule-no::after { display: none; }
}
.stratum__body { min-width: 0; }
.lede { margin-top: 1rem; color: var(--ink-2); font-size: 1.1rem; }

/* ---------- capabilities ---------- */
.caps { list-style: none; margin: 2.4rem 0 0; padding: 0; border-top: 1px solid var(--hair); }
.cap { display: grid; grid-template-columns: 2.6rem 1fr; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--hair); }
.cap__i { font-family: var(--title); font-size: .78rem; font-weight: 700; color: var(--accent); padding-top: .25rem; font-variant-numeric: tabular-nums; }
.cap p { margin-top: .35rem; font-size: .98rem; color: var(--muted); max-width: 64ch; }

/* ---------- reference cards with photos ---------- */
.refgrid { margin-top: 1.75rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.1rem; }
.refcard { background: var(--ground); border: 1px solid var(--hair); overflow: hidden; display: flex; flex-direction: column; }
.refcard__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.refcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.refcard:hover .refcard__img img { transform: scale(1.045); }
.refcard__b { padding: 1rem 1.1rem 1.2rem; border-top: 2px solid var(--accent); }
.refcard__c { font-family: var(--title); font-size: .64rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.refcard__t { font-family: var(--title); font-size: 1.02rem; font-weight: 700; color: var(--ink); margin-top: .3rem; }
.refcard__d { font-size: .92rem; color: var(--muted); margin-top: .4rem; }
/* tags technique / solution (facon Keller) */
.refcard__tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .8rem; }
.refcard__tag { font-family: var(--title); font-size: .64rem; font-weight: 600; letter-spacing: .03em; padding: .25rem .55rem; border: 1px solid var(--hair); color: var(--ink-2); background: var(--surface); white-space: nowrap; }

/* ---------- track record list (founders) ---------- */
.track { margin-top: 1.5rem; display: grid; gap: 0; border-top: 1px solid var(--hair); }
.trk { display: grid; grid-template-columns: 1fr auto; gap: 1rem 1.5rem; align-items: baseline; padding: .95rem 0; border-bottom: 1px solid var(--hair); }
.trk__l { display: flex; flex-direction: column; gap: .15rem; }
.trk__t { font-family: var(--title); font-weight: 600; color: var(--ink); font-size: 1rem; }
.trk__t b { color: var(--turquoise); font-weight: 700; }
.trk__d { font-size: .9rem; color: var(--muted); }
.trk__m { font-family: var(--title); font-size: .82rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 560px) { .trk { grid-template-columns: 1fr; } .trk__m { text-align: left; } }

.note { margin-top: 2rem; padding: 1rem 1.2rem; border-left: 3px solid var(--turquoise); background: var(--surface-2); font-size: .95rem; color: var(--ink-2); max-width: var(--measure); }
.note strong { color: var(--ink); font-family: var(--title); font-weight: 700; }

/* ---------- means / quality cells ---------- */
.grid2 { margin-top: 1.75rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.cell { background: var(--ground); padding: 1.5rem 1.4rem; }
.cell h3 { display: flex; align-items: baseline; gap: .55rem; }
.cell h3::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: none; transform: translateY(-1px); }
.cell p { margin-top: .5rem; font-size: .95rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.75rem; padding: 0; list-style: none; }
.chip { font-family: var(--title); font-size: .72rem; font-weight: 600; padding: .45rem .75rem; border: 1px solid var(--hair); color: var(--ink-2); background: var(--ground); }
.chip b { color: var(--accent); font-weight: 700; }

/* ---------- secteurs d'intervention (marches) ---------- */
.secteurs { margin-top: 2.2rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
.secteur { background: var(--ground); padding: 1.7rem 1.6rem 1.8rem; display: flex; flex-direction: column; }
.secteur__n { font-family: var(--title); font-size: .68rem; font-weight: 700; letter-spacing: .08em; color: var(--accent); font-variant-numeric: tabular-nums; }
.secteur h3 { margin-top: .35rem; font-size: 1.12rem; color: var(--ink); }
.secteur p { margin-top: .55rem; font-size: .95rem; color: var(--muted); }
.secteur__ref { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--hair-soft); font-family: var(--title); font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.secteur__ref b { color: var(--ink-2); font-weight: 700; }
@media (max-width: 700px) { .secteurs { grid-template-columns: 1fr; } }

/* photo d'accompagnement au sein d'une section (accueil, direction) */
.sectionphoto { margin-top: 2.2rem; border: 1px solid var(--hair); overflow: hidden; cursor: zoom-in; aspect-ratio: 16 / 9; background: var(--surface-2); }
.sectionphoto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .55s ease; }
.sectionphoto:hover img { transform: scale(1.04); }

/* ---------- secteurs : bandeau défilant (marquee) ---------- */
.secteur-marquee {
  margin-top: 2.2rem; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.secteur-track { display: flex; gap: 1.1rem; width: max-content; animation: marquee 44s linear infinite; }
.secteur-marquee:hover .secteur-track,
.secteur-marquee:focus-within .secteur-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.secteur-card { flex: 0 0 300px; border: 1px solid var(--hair); background: var(--ground); overflow: hidden; display: flex; flex-direction: column; }
.secteur-card__img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-2); }
.secteur-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.secteur-card__b { padding: 1rem 1.15rem 1.2rem; border-top: 2px solid var(--accent); }
.secteur-card__n { font-family: var(--title); font-size: .64rem; font-weight: 700; letter-spacing: .09em; color: var(--accent); font-variant-numeric: tabular-nums; }
.secteur-card h3 { margin-top: .3rem; font-size: 1.04rem; color: var(--ink); }
.secteur-card p { margin-top: .45rem; font-size: .9rem; color: var(--muted); }
.secteur-card__ref { margin-top: .8rem; padding-top: .6rem; border-top: 1px solid var(--hair-soft); font-family: var(--title); font-size: .62rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.secteur-card__ref b { color: var(--ink-2); font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .secteur-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .secteur-track { animation: none; }
}

/* ---------- carrousel 16:9 (secteurs) ---------- */
.carousel { position: relative; margin-top: 2.2rem; border: 1px solid var(--hair); overflow: hidden; background: var(--ink); }
.carousel__track { display: flex; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.carousel__slide { position: relative; flex: 0 0 100%; aspect-ratio: 16 / 9; }
.carousel__slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel__slide::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,17,12,.10) 0%, rgba(20,17,12,.04) 38%, rgba(20,17,12,.74) 100%),
    linear-gradient(90deg, rgba(20,17,12,.62) 0%, rgba(20,17,12,0) 56%);
}
.carousel__cap { position: absolute; z-index: 1; left: 0; bottom: 0; padding: clamp(1.2rem, 3.5vw, 2.6rem); max-width: 62ch; }
.carousel__n { font-family: var(--title); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.carousel__cap h3 { font-family: var(--title); color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.4rem); font-weight: 700; margin-top: .35rem; letter-spacing: -.015em; line-height: 1.05; }
.carousel__cap p { color: rgba(255,255,255,.92); margin-top: .7rem; font-size: 1.02rem; max-width: 52ch; text-shadow: 0 1px 10px rgba(0,0,0,.45); }
.carousel__ref { display: inline-block; margin-top: .85rem; font-family: var(--title); font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.carousel__ref b { color: #fff; }
.carousel__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--ground) 84%, transparent); color: var(--ink);
  font-family: var(--title); font-size: 1.7rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: background .18s, color .18s; backdrop-filter: blur(4px);
}
.carousel__nav:hover { background: var(--accent); color: var(--on-accent); }
.carousel__prev { left: .8rem; } .carousel__next { right: .8rem; }
.carousel__dots { position: absolute; z-index: 2; bottom: 1rem; right: 1.1rem; display: flex; gap: .45rem; }
.carousel__dot { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: rgba(255,255,255,.42); transition: background .18s; }
.carousel__dot[aria-current="true"] { background: var(--accent); }
@media (max-width: 560px) {
  .carousel__nav { width: 40px; height: 40px; font-size: 1.4rem; }
  .carousel__cap p { display: none; }
}

/* numéro un peu plus marqué aussi sur les labels de sections split */
.split__label .rule-no { font-size: 1.7rem; line-height: 1; }
.split__label { align-items: center; }

/* ---------- direction ---------- */
.team { margin-top: 1.75rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.person { border-top: 3px solid var(--accent); padding-top: 1.1rem; }
/* Emplacement portrait : initiales aujourd'hui, remplacable par <img> plus tard
   sans changer la mise en page (meme carre 68px). */
.person__ph { width: 68px; height: 68px; margin-bottom: .9rem; background: var(--surface-2); border: 1px solid var(--hair); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.person__ph span { font-family: var(--title); font-weight: 700; font-size: 1.25rem; letter-spacing: .04em; color: var(--muted); }
.person__ph img { width: 100%; height: 100%; object-fit: cover; }
.person__n { font-family: var(--title); font-weight: 700; color: var(--ink); font-size: 1.15rem; }
.person__r { font-family: var(--title); font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-top: .25rem; }
.person__q { font-family: var(--body); font-style: italic; color: var(--ink-2); margin-top: .7rem; font-size: 1.02rem; }
.person p { font-size: .93rem; color: var(--muted); margin-top: .5rem; }

/* ---------- contact ---------- */
.contact__grid { margin-top: 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.contact dt { font-family: var(--title); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.contact dd { margin: 0; color: var(--ink); font-size: 1rem; line-height: 1.6; }
.contact dd a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.contact dd a:hover { border-bottom-color: var(--accent); }

/* encart recrutement (page contact) */
.hire { margin-top: 2.6rem; padding: 1.6rem 1.7rem; border: 1px solid var(--hair); border-left: 3px solid var(--accent); background: var(--surface-2); max-width: var(--measure); }
.hire h3 { color: var(--ink); font-size: 1.1rem; }
.hire p { margin-top: .5rem; font-size: .96rem; color: var(--ink-2); }
.hire a { color: var(--accent); text-decoration: none; font-family: var(--title); font-weight: 700; }
.hire a:hover { text-decoration: underline; }

/* ---------- formulaire de consultation + dépôt DCE ---------- */
.cform { margin-top: 2rem; max-width: 760px; }
.cform__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.cf { display: flex; flex-direction: column; gap: .4rem; }
.cf--full { grid-column: 1 / -1; }
.cf__l { font-family: var(--title); font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cf__l b { color: var(--accent); }
.cf__i { font-family: var(--body); font-size: 1rem; color: var(--ink); background: var(--ground); border: 1px solid var(--hair); padding: .7rem .8rem; transition: border-color .15s; width: 100%; }
.cf__i:focus { outline: none; border-color: var(--accent); }
textarea.cf__i { resize: vertical; min-height: 120px; }
select.cf__i { appearance: none; -webkit-appearance: none; cursor: pointer; }
.cform__drop { margin-top: 1.2rem; position: relative; border: 1px dashed var(--hair); background: var(--surface); padding: 1.5rem; text-align: center; transition: border-color .15s, background .15s; }
.cform__drop.is-drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.cf-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cform__droplbl { display: flex; flex-direction: column; gap: .25rem; pointer-events: none; }
.cform__droplbl b { font-family: var(--title); font-weight: 700; color: var(--ink); font-size: 1rem; }
.cform__droplbl span { font-size: .85rem; color: var(--muted); }
.cform__files { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; text-align: left; }
.cform__files li { font-family: var(--title); font-size: .82rem; color: var(--ink-2); display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--hair); padding-top: .35rem; }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-consent { display: flex; align-items: flex-start; gap: .55rem; margin-top: 1.1rem; font-family: var(--title); font-size: .82rem; color: var(--ink-2); max-width: 60ch; }
.cf-consent input { margin-top: .2rem; accent-color: var(--accent); flex: none; }
.cform__foot { display: flex; align-items: center; gap: 1.2rem; margin-top: 1.4rem; flex-wrap: wrap; }
.cform__foot .btn { cursor: pointer; }
.cform__foot .btn[disabled] { opacity: .55; cursor: default; }
.cform__msg { font-family: var(--title); font-size: .88rem; }
.cform__msg.is-ok { color: var(--turquoise); }
.cform__msg.is-err { color: var(--accent); }
@media (max-width: 620px) { .cform__grid { grid-template-columns: 1fr; } }

/* ---------- CTA de bas de page (accueil) ---------- */
.cta { background: var(--surface-2); border-bottom: 1px solid var(--hair); }
.cta__in { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 6vw, 4.6rem) var(--pad); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.cta h2 { max-width: 24ch; }
.cta p { color: var(--ink-2); max-width: 54ch; }
.cta .hero__cta { justify-content: center; margin-top: 1rem; }

/* ---------- footer ---------- */
.foot { background: var(--surface-2); border-top: 1px solid var(--hair); padding: 2.4rem 0; }
.foot__in { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.foot img { height: 34px; width: auto; }
.foot__brand { display: flex; flex-direction: column; gap: .55rem; }
.foot__devise { font-family: var(--body); font-style: italic; font-size: .98rem; color: var(--accent); margin: 0; }
.foot__nav { display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; }
.foot__nav a { font-family: var(--title); font-size: .76rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.foot__nav a:hover { color: var(--accent); }
.foot__legal { font-family: var(--title); font-size: .74rem; color: var(--muted); line-height: 1.7; text-align: right; }
.foot__recrut { font-family: var(--title); font-size: .8rem; font-weight: 600; }
.foot__recrut a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.foot__recrut a:hover { border-bottom-color: var(--accent); }
@media (max-width: 560px) { .foot__legal { text-align: left; } }

/* ---------- reveal ---------- */
.rise { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; transition: none; } }

/* ---------- hero : zoom lent (Ken Burns) ---------- */
@keyframes kenburns { from { transform: scale(1.07); } to { transform: scale(1); } }
.hero__bg img { animation: kenburns 20s ease-out both; }
@media (prefers-reduced-motion: reduce) { .hero__bg img { animation: none; } }

/* ---------- bande photo pleine largeur ---------- */
.divider { position: relative; min-height: min(52vh, 440px); display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--hair); }
.divider__bg { position: absolute; inset: 0; z-index: 0; }
.divider__bg img, .divider__vid { width: 100%; height: 100%; object-fit: cover; display: block; }
.divider__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,17,12,.82) 0%, rgba(20,17,12,.5) 48%, rgba(20,17,12,.14) 100%); }
.divider__in { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 2.5rem var(--pad); width: 100%; }
.divider__q { font-family: var(--title); font-weight: 700; color: #fff; font-size: clamp(1.4rem, 3.4vw, 2.4rem); line-height: 1.12; max-width: 20ch; text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,.45); }
.divider__c { font-family: var(--body); font-style: italic; color: rgba(255,255,255,.85); margin-top: 1rem; max-width: 44ch; font-size: 1.05rem; }

/* ---------- mosaique chantiers ---------- */
.gallery { margin-top: 1.1rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; aspect-ratio: 4 / 3; overflow: hidden; display: block; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease, filter .3s ease; filter: saturate(.97); }
.gallery button:hover img, .gallery button:focus-visible img { transform: scale(1.07); filter: saturate(1.06); }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---------- savoir-faire : cartes illustrees ---------- */
.domaines { margin-top: 2.2rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.domaine { border: 1px solid var(--hair); background: var(--ground); overflow: hidden; display: flex; flex-direction: column; }
.domaine__img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.domaine__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.domaine:hover .domaine__img img { transform: scale(1.05); }
.domaine__b { padding: 1.1rem 1.25rem 1.35rem; border-top: 2px solid var(--accent); }
.domaine__n { font-family: var(--title); font-size: .68rem; font-weight: 700; letter-spacing: .08em; color: var(--accent); font-variant-numeric: tabular-nums; }
.domaine h3 { margin-top: .3rem; }
.domaine p { margin-top: .55rem; font-size: .93rem; color: var(--muted); }
@media (max-width: 700px) { .domaines { grid-template-columns: 1fr; } }

/* ---------- section image/texte alternee ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--hair); background: var(--ground); }
.split--alt { background: var(--surface); }
.split__media { position: relative; min-height: 400px; overflow: hidden; cursor: zoom-in; }
.split__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.split__media:hover img { transform: scale(1.04); }
.split__body { padding: clamp(2.6rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; }
.split__label { display: flex; align-items: baseline; gap: .7rem; margin-bottom: 1rem; }
@media (min-width: 861px) { .split--rev .split__media { order: 2; } }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split__media { min-height: 260px; order: 0 !important; } }

.split .grid2 { margin-top: 1.5rem; }

/* ---------- parallaxe douce ---------- */
/* L'image deborde legerement de son cadre pour que la translation ne revele
   aucun bord. La translation JS reste inferieure a la marge de debordement. */
.px { will-change: transform; transition: none; }
.divider__bg img.px { height: 122%; top: -11%; bottom: auto; }
.split__media img.px { height: 114%; top: -7%; bottom: auto; }
@media (prefers-reduced-motion: reduce) { .px { transform: none !important; } }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(12,10,8,.93); display: none; align-items: center; justify-content: center; padding: 2rem; }
.lb.open { display: flex; }
.lb img { max-width: min(92vw, 1400px); max-height: 86vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb__close { position: absolute; top: .8rem; right: 1.2rem; background: none; border: 0; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; font-family: var(--title); }
.lb__cap { position: absolute; bottom: 1.1rem; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.85); font-family: var(--title); font-size: .82rem; padding: 0 1rem; }

/* =========================================================================
   RUBRIQUE « NOTRE HISTOIRE » — la serie (cycle 1)
   Gabarit du 08/2026 : colonne 700px, corps 18px, interligne 1.6.
   Les couleurs viennent des tokens de charte : --accent #fd4825,
   --ink-2 #444444, --muted #888888. On ne redeclare pas de valeurs en dur,
   sinon le mode sombre du site (deja en place) casse sur cette rubrique.
   ========================================================================= */

/* ---------- colonne de lecture commune ----------
   Le gabarit impose 700px de TEXTE. Le site est en box-sizing: border-box,
   donc un max-width de 700px avec des marges laterales donnerait une colonne
   plus etroite que demandee : on ajoute les gouttieres au max-width.
   Corollaire : dans cette rubrique, aucun bloc n'utilise le raccourci
   `padding` — il remettrait les gouttieres a zero et desalignerait la
   colonne. On ecrit padding-block / padding-inline. */
.serie-col {
  --gut: clamp(1.25rem, 4vw, 2rem);
  max-width: calc(700px + 2 * var(--gut));
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* ---------- page d'index ---------- */
.serie-intro { padding-block: clamp(2.6rem, 6vw, 4.5rem) clamp(1.6rem, 4vw, 2.4rem); }
.serie-intro h1 { font-family: var(--title); font-weight: 700; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; color: var(--ink); margin: 0 0 1.2rem; }
.serie-intro .chapo { font-family: var(--body); font-size: 1.15rem; line-height: 1.6; color: var(--ink-2); margin: 0; }

/* margin-block / padding-block seulement : un `margin: 0` ecraserait le
   `margin-inline: auto` de .serie-col et decalerait toute la liste a gauche. */
.serie-liste { list-style: none; margin-block: 0; padding-block: 0 clamp(3rem, 7vw, 5rem); }
.serie-liste > li { border-top: 1px solid var(--hair); }
.serie-liste > li:last-child { border-bottom: 1px solid var(--hair); }

.serie-item { display: grid; grid-template-columns: 132px 1fr; gap: 1.4rem; align-items: start; padding: 1.5rem 0; text-decoration: none; color: inherit; }
.serie-item:hover .serie-item__titre { color: var(--accent); }
.serie-item__vignette { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.serie-item__vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.serie-item__num { font-family: var(--title); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: .4rem; }
.serie-item__titre { font-family: var(--title); font-weight: 600; font-size: 1.22rem; line-height: 1.25; color: var(--ink); margin: 0 0 .45rem; transition: color .2s ease; }
.serie-item__accroche { font-family: var(--body); font-size: 1rem; line-height: 1.55; color: var(--ink-2); margin: 0 0 .5rem; }
.serie-item__date { font-family: var(--title); font-size: .78rem; color: var(--muted); margin: 0; }

/* Ligne grisee : l'episode annonce, pas encore paru. Non cliquable. */
.serie-item--avenir { display: grid; grid-template-columns: 132px 1fr; gap: 1.4rem; padding: 1.5rem 0; opacity: .62; }
.serie-item--avenir .serie-item__vignette { display: flex; align-items: center; justify-content: center; }
.serie-item--avenir .serie-item__vignette span { font-family: var(--title); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.serie-item--avenir .serie-item__num { color: var(--muted); }

@media (max-width: 560px) {
  .serie-item, .serie-item--avenir { grid-template-columns: 92px 1fr; gap: 1rem; }
}

/* ---------- page d'episode ---------- */
.episode { padding-bottom: clamp(3rem, 7vw, 5rem); }
.episode .fil-ariane { font-family: var(--title); font-size: .8rem; color: var(--muted); padding-block: 1.6rem 0; }
.episode .fil-ariane a { color: var(--muted); text-decoration: none; }
.episode .fil-ariane a:hover { color: var(--accent); }
.episode .fil-ariane span { color: var(--ink-2); }

.episode > header { padding-block: clamp(1.8rem, 4vw, 2.6rem) 1.6rem; }
.episode-numero { font-family: var(--title); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 0 0 .8rem; display: inline-flex; align-items: center; gap: .65rem; }
.episode-numero::before { content: ""; width: 30px; height: 3px; background: var(--accent); flex: none; }
.episode > header h1 { font-family: var(--title); font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 2.85rem); line-height: 1.12; color: var(--ink); margin: 0 0 1.1rem; }
.episode .chapo { font-family: var(--body); font-weight: 700; font-size: 1.18rem; line-height: 1.55; color: var(--ink); margin: 0; }

.episode > figure { margin: 0 0 clamp(1.8rem, 4vw, 2.6rem); }
.episode > figure img { width: 100%; height: auto; display: block; }
.episode > figure figcaption { font-family: var(--title); font-size: .78rem; color: var(--muted); padding-top: .6rem; }

/* Corps : 18px et interligne 1.6 imposes par le gabarit. */
.episode .corps { font-family: var(--body); font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.episode .corps p { margin: 0 0 1.35em; }
.episode .corps strong { color: var(--ink); font-weight: 700; }
.episode .corps h2 { font-family: var(--title); font-weight: 600; font-size: 1.3rem; line-height: 1.3; color: var(--ink); margin: 2.4rem 0 1rem; }
.episode .corps em { font-style: italic; }

.episode-navigation { display: grid; gap: .55rem; margin-top: clamp(2.4rem, 5vw, 3.4rem); padding-top: 1.5rem; border-top: 1px solid var(--hair); font-family: var(--title); font-size: .92rem; }
.episode-navigation a { color: var(--ink-2); text-decoration: none; }
.episode-navigation a:hover { color: var(--accent); }
.episode-navigation a[href$="notre-histoire/"] { color: var(--muted); font-size: .84rem; }

/* Bloc de fin : encart sobre, pas de pop-up (regle du gabarit). */
.episode-fin { margin-top: clamp(2.2rem, 5vw, 3rem); padding: 1.5rem 1.6rem; background: var(--surface); border-left: 3px solid var(--accent); font-family: var(--body); font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
.episode-fin p { margin: 0; }
.episode-fin a { color: var(--accent); font-weight: 700; }

/* La regle globale `p { max-width: var(--measure) }` (68ch) rognerait le texte
   a ~600px alors que le gabarit fixe la colonne a 700px : la photo, elle, fait
   bien 700px et le decalage se verrait. Dans la rubrique, c'est la colonne qui
   fait la mesure. */
.serie-intro .chapo,
.episode .chapo,
.episode .corps p,
.episode-fin p { max-width: none; }

/* Navigation de bas d'episode sur une ligne des qu'il y a la place, comme au
   gabarit : precedent a gauche, index au centre, suivant a droite. Le placement
   est EXPLICITE car publier.sh supprime le lien d'un episode non paru : la nav
   peut ne contenir qu'un ou deux liens, et l'auto-placement les decalerait. */
@media (min-width: 640px) {
  .episode-navigation { grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.2rem; }
  .episode-navigation a[rel="prev"] { grid-column: 1; justify-self: start; }
  .episode-navigation a:not([rel])  { grid-column: 2; justify-self: center; }
  .episode-navigation a[rel="next"] { grid-column: 3; justify-self: end; text-align: right; }
}

/* ---------- fleches laterales de navigation entre episodes ----------
   Fixes, centrees verticalement : elles suivent la lecture au lieu d'attendre
   en bas de page. Angles vifs et filet fin, comme le reste du site (aucun
   border-radius ailleurs que les puces du carrousel).
   Elles portent data-ep : publier.sh les retire quand l'episode vise n'est pas
   en ligne, exactement comme le lien du bas de page. */
.ep-fleche {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  width: 52px; height: 52px;
  display: none;                 /* affichees seulement quand la place existe */
  align-items: center; justify-content: center;
  border: 1px solid var(--hair);
  background: color-mix(in srgb, var(--ground) 84%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, .10);
  color: var(--ink);
  font-family: var(--title); font-size: 1.4rem; line-height: 1;
  text-decoration: none;
  transition: color .18s, border-color .18s, background .18s;
}
.ep-fleche:hover {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}

/* Ancrees sur la COLONNE, pas sur les bords de l'ecran : sur un grand moniteur
   des fleches collees aux bords se lisent comme du decor de navigateur, pas
   comme « article precedent / suivant ». 434px = la demi-colonne (350) + une
   gouttiere (32) + la fleche (52). Le max() les empeche de sortir de l'ecran
   sur les fenetres etroites. */
.ep-fleche--prev { left:  max(.75rem, calc(50% - 434px)); }
.ep-fleche--next { right: max(.75rem, calc(50% - 434px)); }

/* La colonne fait 700px + gouttieres, soit ~764px. Deux fleches de 52px avec
   leurs marges demandent ~110px de chaque cote : en dessous de 1024px elles
   mordraient sur le texte. La navigation de bas de page prend le relais. */
@media (min-width: 1024px) { .ep-fleche { display: flex; } }
