/* ==========================================================================
   BSSM - Brigade de Sécurisation des Sites Miniers
   Feuille de style unique. Thème clair verrouillé.
   Palette dérivée du logo : orange #E8792B + ardoise #2E4256
   ========================================================================== */

:root {
  /* Couleurs */
  --paper:      #F6F7F9;
  --white:      #FFFFFF;
  --ink:        #10202D;
  --slate:      #2E4256;
  --muted:      #5D7183;
  --line:       #E1E6EB;
  --line-soft:  #EDF1F4;
  --brand:      #E8792B;  /* orange du logo : aplats et fonds */
  --brand-dark: #D96A1C;  /* survol des aplats orange */
  --brand-ink:  #A85310;  /* orange lisible en TEXTE sur fond clair (AA) */
  --brand-wash: #FDF1E7;
  --dark:       #101E29;
  --dark-2:     #172936;

  /* Typographie */
  --f-display: "Sora", "Segoe UI", sans-serif;
  --f-body:    "Manrope", "Segoe UI", sans-serif;

  /* Formes : un seul rayon pour tout le site */
  --r: 4px;

  /* Rythme */
  --gut: clamp(1.25rem, 4vw, 2.5rem);
  --sec: clamp(4.5rem, 9vw, 7.5rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------- Base --------- */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.05rem, 4.3vw, 3.35rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.1rem, 1.7vw, 1.35rem); letter-spacing: -0.012em; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1.02rem, 1.35vw, 1.16rem);
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.7;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section { padding-block: var(--sec); }
.section--tight { padding-block: clamp(3rem, 6vw, 4.5rem); }

.eyebrow {
  display: inline-block;
  font-family: var(--f-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-ink);
  margin-bottom: 1rem;
}

.head-block { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.head-block p { margin-top: 1.1rem; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem; z-index: 200;
}
.skip:focus { left: 0; }

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

/* --------------------------------------------------------- Boutons ------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  white-space: nowrap;
  font-family: var(--f-display);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding: .82rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--r);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }

/* Aplat orange du logo + texte encre : la paire du logo, et elle passe AA. */
.btn--primary { background: var(--brand); color: var(--ink); }
.btn--primary:hover { background: var(--brand-dark); }

.btn--outline { background: transparent; color: var(--ink); border-color: #C9D2DA; }
.btn--outline:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

.btn--onphoto {
  background: rgba(255,255,255,.10);
  color: #fff;
  border-color: rgba(255,255,255,.55);
  backdrop-filter: blur(6px);
}
.btn--onphoto:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--brand); color: var(--ink); }

.btn--wide { width: 100%; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--f-display);
  font-size: .875rem;
  font-weight: 600;
  color: var(--brand-ink);
  text-decoration: none;
}
.arrow-link svg { transition: transform .25s var(--ease); }
.arrow-link:hover svg { transform: translateX(4px); }

/* --------------------------------------------------------- En-tête ------ */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease);
}
.site-head.is-stuck { box-shadow: 0 8px 28px -18px rgba(16,32,45,.55); }

.head-in {
  height: 92px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; text-decoration: none; margin-right: auto; }
.brand img { height: 62px; width: auto; }
.brand span { display: none; }

.head-panel { display: flex; align-items: center; gap: 1.9rem; }
.nav { display: flex; align-items: center; gap: 1.9rem; }
.nav a {
  position: relative;
  font-family: var(--f-display);
  font-size: .875rem;
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  padding-block: .35rem;
  transition: color .2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }

.head-cta { margin-left: .5rem; }

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--white);
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.burger i {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: background .2s;
}
.burger i::before, .burger i::after {
  content: ""; position: absolute; left: 0;
  width: 18px; height: 1.5px; background: var(--ink);
  transition: transform .3s var(--ease);
}
.burger i::before { top: -5.5px; }
.burger i::after  { top:  5.5px; }
.burger[aria-expanded="true"] i { background: transparent; }
.burger[aria-expanded="true"] i::before { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] i::after  { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 940px) {
  .head-in { height: 78px; }
  .brand img { height: 52px; }
  .burger { display: grid; }
  .head-panel { display: none; }

  /* Le panneau contient la navigation ET le bouton : il se dimensionne
     tout seul, quel que soit le nombre de liens. */
  .site-head.is-open .head-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gut) 1.5rem;
    box-shadow: 0 20px 40px -24px rgba(16,32,45,.45);
  }
  .site-head.is-open .nav { flex-direction: column; align-items: stretch; gap: 0; }
  .site-head.is-open .nav a { padding: .95rem 0; border-bottom: 1px solid var(--line-soft); font-size: 1rem; }
  .site-head.is-open .nav a::after { display: none; }
  .site-head.is-open .head-cta { margin: 1.25rem 0 0; }
  .site-head.is-open .head-cta .btn { width: 100%; }
}

/* --------------------------------------------------------- Héros -------- */

.hero {
  position: relative;
  min-height: clamp(560px, 84svh, 780px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
}
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .55;
  transform: scale(1.06);
  animation: heroIn 1.6s var(--ease) forwards;
}
@keyframes heroIn { to { transform: scale(1); } }

.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(11,22,31,.94) 0%, rgba(11,22,31,.78) 42%, rgba(11,22,31,.30) 100%),
    linear-gradient(0deg, rgba(11,22,31,.55), transparent 45%);
}
.hero__in { position: relative; z-index: 2; padding-block: clamp(5rem, 10vw, 6rem) clamp(4rem, 8vw, 5rem); }
.hero__col { max-width: 47rem; }
.hero .eyebrow { color: var(--brand); }
.hero h1 { color: #fff; }
.hero__sub {
  color: rgba(255,255,255,.80);
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.65;
  max-width: 40rem;
  margin-top: 1.35rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }

.hero__rule {
  position: absolute; left: 0; bottom: 0; z-index: 2;
  height: 4px; width: 100%;
  background: linear-gradient(90deg, var(--brand) 0 32%, transparent 32%);
}

/* bandeau de repères sous le héros */
.facts {
  background: var(--dark-2);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.facts ul {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.facts li {
  padding: 1.9rem 1.5rem;
  border-left: 1px solid rgba(255,255,255,.09);
}
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts b {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1;
}
.facts span {
  display: block;
  margin-top: .5rem;
  font-size: .82rem;
  color: rgba(255,255,255,.62);
  line-height: 1.45;
}
@media (max-width: 800px) {
  .facts ul { grid-template-columns: repeat(2, 1fr); }
  .facts li { padding: 1.4rem 1.1rem; }
  .facts li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.09); }
}

/* --------------------------------------------------------- Secteurs ----- */

.sectors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.sector {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--dark);
  isolation: isolate;
}
.sector img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .62;
  transition: transform .8s var(--ease), opacity .5s var(--ease);
}
.sector::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(11,22,31,.92) 8%, rgba(11,22,31,.28) 70%);
}
.sector:hover img { transform: scale(1.07); opacity: .78; }
.sector__txt { padding: 1.75rem 1.5rem; color: #fff; }
.sector__txt h3 { font-size: 1.18rem; }
.sector__txt p { margin-top: .5rem; font-size: .84rem; color: rgba(255,255,255,.68); line-height: 1.55; }
.sector__txt::before {
  content: ""; display: block; width: 26px; height: 3px;
  background: var(--brand); margin-bottom: 1rem;
}
@media (max-width: 900px) { .sectors { grid-template-columns: repeat(2, 1fr); } .sector { min-height: 280px; } }
@media (max-width: 520px) { .sectors { grid-template-columns: 1fr; } .sector { min-height: 240px; } }

/* --------------------------------------------------------- Split -------- */

.split {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
.split--flip { grid-template-columns: 1.08fr 0.92fr; }
.split__media { position: relative; }
.split__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r);
}
.split__media--wide img { aspect-ratio: 4 / 3; }
.split__badge {
  position: absolute;
  right: -1px; bottom: -1px;
  background: var(--brand);
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .04em;
  padding: .85rem 1.25rem;
  border-radius: var(--r) 0 var(--r) 0;
}
@media (max-width: 880px) {
  .split, .split--flip { grid-template-columns: 1fr; gap: 2.25rem; }
  .split__media { order: -1; }
  .split__media img { aspect-ratio: 16 / 10; }
}

/* liste numérotée d'apports */
.steps { list-style: none; margin: 2rem 0 0; padding: 0; }
.steps li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 1.1rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps b {
  font-family: var(--f-display);
  font-size: .8rem;
  font-weight: 700;
  color: var(--brand-ink);
  padding-top: .22rem;
}
.steps h3 { font-size: 1.02rem; font-weight: 600; }
.steps p { margin-top: .35rem; font-size: .92rem; color: var(--muted); line-height: 1.6; }

/* --------------------------------------------------------- Bento -------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 240px;
  padding: 1.6rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.tile:hover { border-color: #C6D0D8; transform: translateY(-3px); }
.tile h3 { font-size: 1.12rem; }
.tile p { margin-top: .55rem; font-size: .9rem; color: var(--muted); line-height: 1.6; }
.tile .arrow-link { margin-top: 1.1rem; }

/* tuiles photo */
.tile--photo { border-color: transparent; min-height: 320px; }
.tile--photo img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.tile--photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(11,22,31,.93) 12%, rgba(11,22,31,.35) 68%);
}
.tile--photo:hover img { transform: scale(1.06); }
.tile--photo h3 { color: #fff; }
.tile--photo p { color: rgba(255,255,255,.72); }
.tile--photo .arrow-link { color: #fff; }

/* tuile teintée */
.tile--wash { background: var(--brand-wash); border-color: #F4DFCC; }
.tile--ink  { background: var(--dark); border-color: var(--dark); }
.tile--ink h3 { color: #fff; }
.tile--ink p { color: rgba(255,255,255,.68); }

.tile--c2 { grid-column: span 2; }
.tile--c3 { grid-column: span 3; }
.tile--c4 { grid-column: span 4; }
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile--c2, .tile--c3, .tile--c4 { grid-column: span 1; }
  .tile--photo { min-height: 260px; }
}
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } }

/* --------------------------------------------------------- Bande sombre - */

.band {
  position: relative;
  background: var(--dark);
  color: #fff;
  overflow: hidden;
}
.band__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .22;
}
.band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(16,30,41,.96) 30%, rgba(16,30,41,.72));
}
.band .wrap { position: relative; z-index: 2; }
.band h2 { color: #fff; max-width: 22ch; }
.band .lead { color: rgba(255,255,255,.72); }

.pillars {
  list-style: none; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r);
  overflow: hidden;
}
.pillars li { background: var(--dark); padding: 1.75rem; }
.pillars h3 { font-size: 1.02rem; color: #fff; font-weight: 600; }
.pillars p { margin-top: .5rem; font-size: .9rem; color: rgba(255,255,255,.64); line-height: 1.6; }
.pillars .ico { color: var(--brand); margin-bottom: 1rem; display: block; }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }

/* --------------------------------------------------------- Citation ----- */

.quote {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 3.25rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--r);
}
.quote__mark {
  font-family: var(--f-display);
  font-size: 4.5rem;
  font-weight: 700;
  line-height: .72;
  color: var(--brand);
  opacity: .28;
}
.quote blockquote {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.15rem, 2.1vw, 1.62rem);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: -0.014em;
  color: var(--ink);
  max-width: 34ch;
}
.quote figcaption { margin-top: 1.5rem; font-size: .88rem; color: var(--muted); }
.quote figcaption b { display: block; color: var(--ink); font-family: var(--f-display); font-weight: 600; }
@media (max-width: 640px) { .quote { grid-template-columns: 1fr; } .quote__mark { display: none; } }

/* --------------------------------------------------------- CTA band ----- */

.cta {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta__in {
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 4.25rem);
}
.cta h2 { max-width: 20ch; }
.cta p { margin-top: .9rem; color: var(--muted); max-width: 52ch; }
.cta__act { display: flex; flex-direction: column; gap: .7rem; min-width: 15rem; }
.cta__act .tel {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
  display: flex; align-items: center; gap: .55rem;
}
.cta__act .tel:hover { color: var(--brand-ink); }
@media (max-width: 820px) { .cta__in { grid-template-columns: 1fr; } }

/* --------------------------------------------------------- Services ----- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.filters button {
  font-family: var(--f-display);
  font-size: .82rem;
  font-weight: 500;
  color: var(--slate);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: .6rem 1.05rem;
  cursor: pointer;
  transition: all .22s var(--ease);
}
.filters button:hover { border-color: #C6D0D8; }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 980px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .svc-grid { grid-template-columns: 1fr; } }

.svc {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.svc:hover {
  border-color: #C6D0D8;
  transform: translateY(-3px);
  box-shadow: 0 24px 44px -30px rgba(16,32,45,.6);
}
.svc__img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--dark); }
.svc__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.svc:hover .svc__img img { transform: scale(1.06); }
.svc__body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.svc__body h3 { font-size: 1.06rem; }
.svc__body p { margin-top: .65rem; font-size: .91rem; color: var(--muted); line-height: 1.65; }
.svc__tag {
  align-self: flex-start;
  margin-bottom: .9rem;
  font-family: var(--f-display);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-ink);
  background: var(--brand-wash);
  border-radius: var(--r);
  padding: .3rem .6rem;
}
.svc[hidden] { display: none; }

.svc-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--r);
}

/* --------------------------------------------------------- Contact ------ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.coord { list-style: none; margin: 2rem 0 0; padding: 0; }
.coord li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.coord li:last-child { border-bottom: 1px solid var(--line); }
.coord .ico { color: var(--brand-ink); padding-top: .18rem; }
.coord .k {
  margin: 0;
  font-family: var(--f-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.coord .v { margin: .3rem 0 0; font-size: .98rem; line-height: 1.6; }
.coord .v a { text-decoration: none; }
.coord .v a:hover { color: var(--brand-ink); }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.field { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.15rem; }
.field label {
  font-family: var(--f-display);
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink);
}
.field label .req { color: var(--brand-ink); }
.field .hint { font-size: .78rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--f-body);
  font-size: .95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #8494A2;
  border-radius: var(--r);
  padding: .78rem .9rem;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-ink);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(232,121,43,.16);
}
.field .err { display: none; font-size: .8rem; color: #B3261E; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #B3261E; background: #FDF3F2; }
.field.is-invalid .err { display: block; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* Sous 16px, iOS Safari zoome à la mise au point du champ. */
@media (max-width: 780px) {
  .field input, .field select, .field textarea { font-size: 1rem; }
}

.form-note { font-size: .8rem; color: var(--muted); margin-top: 1rem; }

.form-status {
  display: none;
  margin-top: 1.15rem;
  padding: 1rem 1.15rem;
  border-radius: var(--r);
  font-size: .9rem;
  line-height: 1.55;
}
.form-status.is-ok  { display: block; background: #EDF7EF; border: 1px solid #BFE0C6; color: #1D5A2C; }
.form-status.is-ko  { display: block; background: #FDF3F2; border: 1px solid #EFC7C3; color: #8C2018; }

.btn.is-busy { pointer-events: none; opacity: .72; }
.btn.is-busy .spin {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: none; }
.btn.is-busy .spin { display: block; }

.map-embed {
  margin-top: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--white);
}
.map-embed iframe { display: block; width: 100%; height: 320px; border: 0; filter: grayscale(.35); }

/* --------------------------------------------------------- Page interne - */

.page-head {
  position: relative;
  background: var(--dark);
  color: #fff;
  overflow: hidden;
}
.page-head img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .38;
}
.page-head::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11,22,31,.95) 25%, rgba(11,22,31,.55));
}
.page-head .wrap { position: relative; z-index: 2; padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.page-head h1 { color: #fff; max-width: 20ch; }
.page-head p { color: rgba(255,255,255,.74); max-width: 56ch; margin-top: 1.1rem; }

.crumb {
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 1.1rem;
}
.crumb a { text-decoration: none; color: rgba(255,255,255,.78); }
.crumb a:hover { color: var(--brand); }

.prose { max-width: 68ch; }
.prose h2 { margin-top: 3rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2.2rem; font-weight: 600; }
.prose p { margin-top: 1.1rem; color: var(--slate); line-height: 1.78; }
.prose ul { margin: 1.2rem 0 0; padding-left: 0; list-style: none; }
.prose ul li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: .7rem;
  color: var(--slate);
  line-height: 1.7;
}
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: .68em;
  width: 8px; height: 2px; background: var(--brand);
}

.callout {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  background: var(--brand-wash);
  border: 1px solid #F4DFCC;
  border-radius: var(--r);
}
.callout h3 { font-size: 1rem; font-weight: 600; }
.callout p { margin-top: .5rem; font-size: .93rem; color: var(--slate); }

/* --------------------------------------------------------- Directeur ---- */

/* Deux colonnes : la fiche du Directeur Général reste visible pendant
   la lecture du mot, le texte défile à côté. */
.dg-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: start;
}

.dg-card {
  position: sticky;
  top: 116px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

/* La photo est détourée sur fond blanc : le cadre doit être blanc pur
   pour que le détourage reste invisible. */
.dg-card__photo {
  background: var(--white);
  padding-top: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.dg-card__photo img {
  display: block;
  width: 100%;
  max-width: 330px;
  height: auto;
}

.dg-card__id {
  background: var(--dark);
  color: #fff;
  padding: 1.35rem 1.4rem;
}
.dg-card__id::before {
  content: "";
  display: block;
  width: 26px; height: 3px;
  background: var(--brand);
  margin-bottom: .95rem;
}
.dg-card__id b {
  display: block;
  font-family: var(--f-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
}
.dg-card__id span {
  display: block;
  margin-top: .38rem;
  font-size: .82rem;
  color: rgba(255,255,255,.66);
}

@media (max-width: 900px) {
  .dg-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .dg-card { position: static; max-width: 360px; }
}

/* Vignette dans la citation de la page d'accueil.
   La photo source est un plan mi-buste : on recadre sur le visage en
   surdimensionnant l'image dans un cadre qui rogne. */
.quote__by { display: flex; align-items: center; gap: .95rem; margin-top: 1.6rem; }

.quote__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--white);
}
.quote__thumb img {
  position: absolute;
  width: 216%;
  max-width: none;
  height: auto;
  left: -42%;
  top: -5%;
}

.quote__who b {
  display: block;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  line-height: 1.3;
}
.quote__who > span { display: block; margin-top: .2rem; font-size: .84rem; color: var(--muted); }

/* --------------------------------------------------------- Réseaux ------ */

.social {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--slate);
  text-decoration: none;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .18s var(--ease);
}
.social a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--ink);
  transform: translateY(-2px);
}
.social a:active { transform: translateY(0); }

/* Adresse pas encore renseignée : visible, mais inerte. */
.social a.is-todo {
  opacity: .38;
  cursor: default;
  pointer-events: none;
}

/* Variante pied de page (fond sombre) */
.social--foot a { border-color: rgba(255,255,255,.16); color: rgba(255,255,255,.72); }
.social--foot a:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.social--foot a.is-todo { opacity: .32; }

.social-title {
  margin-top: 2.5rem;
  font-family: var(--f-display);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.social-title + .social { margin-top: 1rem; }

/* --------------------------------------------------------- Pied --------- */

.site-foot { background: var(--dark); color: rgba(255,255,255,.66); }
.foot-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.foot-top h4 {
  font-family: var(--f-display);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 1.15rem;
}
.foot-logo {
  background: #fff;
  border-radius: var(--r);
  padding: .6rem .8rem;
  display: inline-block;
  margin-bottom: 1.25rem;
}
.foot-logo img { height: 56px; width: auto; }
.foot-top p { font-size: .9rem; line-height: 1.7; max-width: 34ch; }
.foot-top ul { list-style: none; margin: 0; padding: 0; }
.foot-top li { margin-bottom: .7rem; font-size: .9rem; }
.foot-top a { text-decoration: none; color: rgba(255,255,255,.66); transition: color .2s var(--ease); }
.foot-top a:hover { color: var(--brand); }
.foot-top address { font-style: normal; font-size: .9rem; line-height: 1.75; }
@media (max-width: 860px) { .foot-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-top { grid-template-columns: 1fr; } }

.foot-bot {
  border-top: 1px solid rgba(255,255,255,.10);
  padding-block: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  justify-content: space-between;
  font-size: .8rem;
}
.foot-bot a { text-decoration: none; color: rgba(255,255,255,.66); }
.foot-bot a:hover { color: var(--brand); }

/* ==========================================================================
   TÉLÉPHONES MOBILES
   Bloc placé en fin de feuille : il prime sur les règles de base.
   ========================================================================== */

@media (max-width: 720px) {

  /* --- Titres : les valeurs de bureau produisaient 4 lignes en 360px --- */
  h1 { font-size: clamp(1.75rem, 7.4vw, 2.4rem); line-height: 1.14; }
  h2 { font-size: clamp(1.5rem, 6.2vw, 2rem); line-height: 1.15; }
  h3 { font-size: 1.05rem; }
  .lead { font-size: 1rem; }

  /* --- Héros ------------------------------------------------------- */
  .hero { min-height: clamp(500px, 76svh, 640px); }
  .hero__in { padding-block: 3.25rem 3.5rem; }
  .hero__sub { font-size: 1rem; margin-top: 1.1rem; }
  .hero__cta { flex-direction: column; align-items: stretch; gap: .65rem; margin-top: 1.85rem; }
  .hero__cta .btn { width: 100%; }
  .hero__rule { background: linear-gradient(90deg, var(--brand) 0 46%, transparent 46%); }

  /* --- Repères : deux colonnes lisibles ---------------------------- */
  .facts li { padding: 1.35rem 1rem; }
  .facts b { font-size: 1.6rem; }
  .facts span { font-size: .78rem; }

  /* --- Cibles tactiles : 44px minimum ------------------------------ */
  .btn { padding: .95rem 1.4rem; }
  .filters button { padding-block: .78rem; }
  a.arrow-link { min-height: 44px; }
  .coord .v a, .foot-top a, .foot-bot a { display: inline-block; padding-block: .2rem; }

  /* --- Filtres des services : bande défilante plutôt que 3 rangées -- */
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin-inline: calc(var(--gut) * -1);
    padding-inline: var(--gut);
  }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: 0 0 auto; scroll-snap-align: start; }

  /* --- Blocs de contenu -------------------------------------------- */
  .split__media img { aspect-ratio: 3 / 2; }
  .split__badge { font-size: .72rem; padding: .7rem 1rem; }
  .steps li { grid-template-columns: 2rem 1fr; gap: .85rem; padding: 1.15rem 0; }
  .tile { padding: 1.35rem; }
  .tile--photo { min-height: 230px; }
  .pillars li { padding: 1.45rem; }
  .quote { padding: 1.6rem 1.35rem; }
  .quote blockquote { font-size: 1.12rem; }

  /* Dernière tuile du bento : bouton pleine largeur */
  .bento .btn { width: 100%; }

  /* --- Appel à l'action -------------------------------------------- */
  .cta__act { min-width: 0; }
  .cta__act .tel { justify-content: center; padding-top: .35rem; }

  /* --- Contact ------------------------------------------------------ */
  .coord li { grid-template-columns: 1.9rem 1fr; gap: .8rem; }
  .map-embed iframe { height: 240px; }
  .form-card { padding: 1.35rem 1.15rem; }

  /* --- Pied de page -------------------------------------------------- */
  .foot-bot { flex-direction: column; gap: .5rem; }
}

/* Très petits écrans (iPhone SE, Android d'entrée de gamme) */
@media (max-width: 380px) {
  :root { --gut: 1.05rem; }
  .facts ul { grid-template-columns: 1fr; }
  .facts li { border-left: 0; padding-left: 0; }
  .facts li + li { border-top: 1px solid rgba(255,255,255,.09); }
  .hero__rule { background: var(--brand); height: 3px; }
}

/* --------------------------------------------------------- Révélations -- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg { animation: none; transform: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* --------------------------------------------------------- Impression --- */

@media print {
  .site-head, .hero__cta, .cta, .burger { display: none !important; }
  body { background: #fff; }
  .reveal { opacity: 1; transform: none; }
}
