/* Perfinergie — feuille de style commune
   Concept : la courbe de charge. Bandeau marine façon tableau de bord de sous-comptage,
   contenu clair et aéré, chiffres en police mono avec leur unité. */
:root {
  /* Couleurs Perfinergie (plaquette commerciale V2) */
  --marine: #1C2430;
  --marine-deep: #0F1620;
  --vert: #00A878;
  --vert-fonce: #00795A;
  --menthe: #16E8A8;
  /* Tokens d'interface (thème clair) */
  --bg: #F7FAF9;
  --surface: #FFFFFF;
  --surface-2: #EEF3F1;
  --fg: #1C2430;
  --muted: #4A5563;
  --line: #DCE4E1;
  --accent: #00795A;
  --accent-strong: #00A878;
  --on-dark: #F2F5F4;
  --on-dark-muted: #A9B6C2;
  --hatch: rgba(0,121,90,.08);
  --shadow: 0 1px 2px rgba(15,22,32,.06), 0 8px 24px rgba(15,22,32,.06);
  /* Typographie */
  --f-display: "Lexend", "Segoe UI", system-ui, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
  --s-xs: .8125rem; --s-sm: .9375rem; --s-md: 1.0625rem; --s-lg: 1.375rem;
  --s-xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  --s-2xl: clamp(2.1rem, 1.4rem + 3vw, 3.6rem);
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1620; --surface: #172030; --surface-2: #1C2738; --fg: #E8EEEC; --muted: #A9B6C2;
    --line: #2A3546; --accent: #16E8A8; --accent-strong: #16E8A8; --hatch: rgba(22,232,168,.07);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1620; --surface: #172030; --surface-2: #1C2738; --fg: #E8EEEC; --muted: #A9B6C2;
  --line: #2A3546; --accent: #16E8A8; --accent-strong: #16E8A8; --hatch: rgba(22,232,168,.07);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: var(--s-md); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--menthe); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--menthe); color: var(--marine); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.eyebrow { font-family: var(--f-mono); font-size: var(--s-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 500; }
.lead { font-size: var(--s-lg); color: var(--muted); max-width: 60ch; line-height: 1.5; }
.btn { display: inline-flex; align-items: center; gap: .5em; font-family: var(--f-display); font-weight: 500; font-size: var(--s-sm); padding: .8em 1.3em; border-radius: 999px; text-decoration: none; border: 1.5px solid transparent; transition: transform .15s ease, background .15s ease, color .15s ease; cursor: pointer; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--menthe); color: var(--marine); }
.btn-primary:hover { background: #4ff0bf; }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn .arr { transition: transform .15s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; color: var(--on-dark); border-bottom: 1px solid rgba(255,255,255,.06); }
/* Le flou est porté par un pseudo-élément : un backdrop-filter sur l'en-tête lui-même confinerait le menu mobile (position: fixed) à la hauteur de la barre. */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(15,22,32,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a, .nav .has-mega > button { color: var(--on-dark); text-decoration: none; font-family: var(--f-display); font-size: var(--s-sm); padding: .6em .9em; border-radius: 8px; background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: .35em; }
.nav > a:hover, .nav .has-mega > button:hover, .nav .has-mega:focus-within > button { background: rgba(255,255,255,.07); }
.nav a[aria-current="page"], .nav .has-mega.current > button { color: var(--menthe); }
.nav .cta { margin-left: 8px; background: var(--menthe); color: var(--marine) !important; border-radius: 999px; padding: .6em 1.2em; }
.nav .cta:hover { background: #4ff0bf !important; }
.chev { width: 10px; height: 10px; transition: transform .2s; }
.has-mega { position: static; }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--marine-deep); border-top: 1px solid rgba(255,255,255,.08); border-bottom: 3px solid var(--menthe); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease, visibility .18s; }
.has-mega:hover .mega, .has-mega:focus-within .mega, .has-mega.open .mega { opacity: 1; visibility: visible; transform: none; }
.has-mega:hover .chev, .has-mega.open .chev { transform: rotate(180deg); }
.mega-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding-block: 28px 32px; }
.mega-col h3 { font-size: var(--s-md); margin-bottom: 12px; }
.mega-col h3 a { color: var(--on-dark); text-decoration: none; display: flex; gap: .5em; align-items: flex-start; }
.mega-col h3 a:hover { color: var(--menthe); }
.mega-col h3 svg { flex: none; width: 22px; height: 22px; color: var(--menthe); margin-top: -1px; }
.mega-col ul { list-style: none; margin: 0; padding: 0 0 0 calc(22px + .5em); display: grid; gap: 2px; border-left: 1px solid rgba(255,255,255,.08); margin-left: 10px; padding-left: 20px; }
.mega-col li a { color: var(--on-dark-muted); text-decoration: none; font-size: var(--s-sm); display: block; padding: 3px 0; }
.mega-col li a:hover { color: var(--menthe); }
.burger { display: none; background: none; border: 0; color: var(--on-dark); padding: 8px; cursor: pointer; }
.burger svg { width: 26px; height: 26px; }
.drawer { display: none; }

@media (max-width: 940px) {
  .nav { display: none; }
  .burger { display: block; }
  .drawer { display: block; position: fixed; inset: 68px 0 0 0; background: var(--marine-deep); color: var(--on-dark); overflow-y: auto; padding: 16px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px)); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s; }
  .drawer.open { opacity: 1; visibility: visible; }
  .drawer a { color: var(--on-dark); text-decoration: none; }
  .drawer > a, .drawer details > summary { display: block; font-family: var(--f-display); font-size: 1.15rem; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); cursor: pointer; list-style: none; }
  .drawer summary::-webkit-details-marker { display: none; }
  .drawer details details > summary { font-size: 1rem; padding: 10px 0 10px 14px; color: var(--menthe); border-bottom: 0; }
  .drawer details details ul { list-style: none; margin: 0 0 8px; padding: 0 0 0 28px; }
  .drawer details details li a { display: block; padding: 6px 0; color: var(--on-dark-muted); font-size: var(--s-sm); }
  .drawer .cta { margin-top: 20px; display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- Héros (accueil) ---------- */
.hero { position: relative; background: var(--marine); color: var(--on-dark); overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--menthe); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; padding-block: clamp(48px, 8vw, 104px) clamp(56px, 8vw, 96px); }
.hero h1 { font-size: var(--s-2xl); font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--menthe); }
.hero .lead { color: var(--on-dark-muted); margin-top: 20px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .eyebrow { color: var(--menthe); margin-bottom: 18px; display: block; }
.hero-viz { position: relative; aspect-ratio: 5 / 4; max-width: 100%; }
.hero-viz canvas { width: 100%; height: 100%; display: block; }
.hero-viz .viz-legend { position: absolute; right: 0; top: -22px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); opacity: .8; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: minmax(0, 1fr); } .hero-viz { aspect-ratio: 16 / 9; } }

/* ---------- En-tête de page intérieure ---------- */
.page-head { background: var(--marine); color: var(--on-dark); position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--menthe); }
.page-head .wrap { padding-block: clamp(40px, 6vw, 72px); position: relative; z-index: 1; }
.page-head .bars { position: absolute; right: -20px; bottom: 0; height: 100%; width: 46%; opacity: .5; pointer-events: none; }
.page-head h1 { font-size: var(--s-2xl); max-width: 18ch; }
.page-head .lead { color: var(--on-dark-muted); margin-top: 16px; }
.page-head .eyebrow { color: var(--menthe); display: block; margin-bottom: 14px; }
.crumbs { font-size: var(--s-xs); color: var(--on-dark-muted); margin-bottom: 18px; font-family: var(--f-mono); }
.crumbs a { color: var(--on-dark-muted); }

/* ---------- Sections ---------- */
section.block { padding-block: clamp(56px, 8vw, 96px); }
section.alt { background: var(--surface-2); }
.sec-head { display: grid; gap: 12px; margin-bottom: 40px; max-width: 720px; }
.sec-head h2 { font-size: var(--s-xl); }
.sec-head p { color: var(--muted); }

/* Chiffres clés */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.figure { padding: 28px 24px 28px 0; display: grid; gap: 6px; align-content: start; }
.figure + .figure { padding-left: 24px; border-left: 1px solid var(--line); }
.figure .num { font-family: var(--f-mono); font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem); font-weight: 500; color: var(--fg); line-height: 1; font-variant-numeric: tabular-nums; }
.figure .num small { font-size: .45em; color: var(--accent); margin-left: .15em; }
.figure .lbl { color: var(--muted); font-size: var(--s-sm); max-width: 22ch; }
.fig-note { font-size: var(--s-xs); color: var(--muted); margin-top: 14px; }
@media (max-width: 820px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } .figure:nth-child(3) { padding-left: 0; border-left: 0; } .figure:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* Cartes expertises */
.expertises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.xp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 22px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 14px; text-decoration: none; color: var(--fg); transition: border-color .2s, transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.xp::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--accent-strong); transition: width .3s ease; }
.xp:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.xp:hover::before { width: 100%; }
.xp svg.ico { width: 34px; height: 34px; color: var(--accent); }
.xp h3 { font-size: var(--s-lg); }
.xp p { color: var(--muted); font-size: var(--s-sm); }
.xp ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.xp li { font-size: var(--s-xs); padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.xp .more { font-family: var(--f-display); font-size: var(--s-sm); color: var(--accent); }
@media (max-width: 1020px) { .expertises { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .expertises { grid-template-columns: minmax(0, 1fr); } }

/* Démarche (séquence réelle) */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; position: relative; }
.step { padding: 0 24px 0 0; display: grid; gap: 10px; align-content: start; }
.step .k { font-family: var(--f-mono); font-size: var(--s-xs); color: var(--accent); display: flex; align-items: center; gap: 10px; }
.step .k::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.step h3 { font-size: var(--s-lg); }
.step p { color: var(--muted); font-size: var(--s-sm); }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; } }
@media (max-width: 520px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Logos clients */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: defile 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes defile { to { transform: translateX(-50%); } }
.logo-tile { background: #FFFFFF; border: 1px solid var(--line); border-radius: 8px; width: 156px; height: 84px; display: grid; place-items: center; padding: 12px 16px; flex: none; }
.logo-tile img { max-height: 56px; max-width: 120px; width: auto; object-fit: contain; transition: transform .25s; }
.logo-tile:hover img { transform: scale(1.06); }
.logo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.logo-wall .logo-tile { width: auto; }

/* Missions emblématiques */
.missions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mission { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.photo-slot { aspect-ratio: 16 / 9; max-width: 100%; position: relative; background: repeating-linear-gradient(135deg, var(--hatch) 0 10px, transparent 10px 20px), var(--surface-2); display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.photo-slot span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface); padding: 4px 10px; border-radius: 4px; border: 1px dashed var(--line); }
.mission .body { padding: 22px 22px 24px; display: grid; gap: 10px; align-content: start; }
.mission .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-family: var(--f-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.mission .sector { color: var(--accent); }
.mission .type { color: var(--muted); }
.mission .type::before { content: "/ "; }
.mission h3 { font-size: 1.2rem; }
.mission p { color: var(--muted); font-size: var(--s-sm); }
.mission .data { font-family: var(--f-mono); font-size: var(--s-xs); color: var(--fg); background: var(--surface-2); border-radius: 6px; padding: 8px 10px; }
@media (max-width: 980px) { .missions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .missions { grid-template-columns: minmax(0, 1fr); } }

/* Qualifications : 4 cartes, logo au-dessus du texte */
.qualifs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.qualif { display: grid; grid-template-rows: auto 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.qualif .mark { height: 172px; background: #FFFFFF; border-radius: 6px; display: grid; place-items: center; padding: 10px; }
.qualif .mark img { max-height: 104px; max-width: 100%; width: auto; object-fit: contain; }
.qualif .mark.tall { padding: 4px; }
.qualif .mark.tall img { max-height: 164px; }
.qualif strong { display: block; font-family: var(--f-display); font-weight: 500; font-size: var(--s-sm); }
.qualif span { color: var(--muted); font-size: var(--s-xs); }
@media (max-width: 960px) { .qualifs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .qualifs { grid-template-columns: minmax(0, 1fr); } }

/* Pages expertise : prestations */
.presta-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.presta-toc { position: sticky; top: calc(88px + env(safe-area-inset-top, 0px)); display: grid; gap: 2px; border-left: 2px solid var(--line); }
.presta-toc a { color: var(--muted); text-decoration: none; font-size: var(--s-sm); padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent; }
.presta-toc a:hover, .presta-toc a.active { color: var(--fg); border-left-color: var(--accent-strong); }
.presta-toc .t { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); padding: 0 0 8px 16px; }
.presta-list { display: grid; gap: 20px; }
.presta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; scroll-margin-top: 100px; }
.presta h2 { font-size: 1.45rem; margin-bottom: 10px; }
.presta p { color: var(--muted); }
.presta ul.points { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.presta ul.points li { padding-left: 20px; position: relative; font-size: var(--s-sm); }
.presta ul.points li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 2px; background: var(--accent-strong); }
.presta .photo-slot { border: 1px solid var(--line); border-radius: 8px; aspect-ratio: 4 / 3; align-self: start; }
@media (max-width: 900px) { .presta-layout { grid-template-columns: minmax(0, 1fr); } .presta-toc { display: none; } .presta { grid-template-columns: minmax(0, 1fr); } }

.refs-band { background: var(--marine); color: var(--on-dark); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; }
.refs-band h2 { font-size: var(--s-xl); }
.refs-band .eyebrow { color: var(--menthe); }
.refs-band ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.refs-band li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; color: var(--on-dark); }
.refs-band li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--menthe); margin-top: .5em; }
@media (max-width: 760px) { .refs-band { grid-template-columns: minmax(0, 1fr); } }

/* À propos */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.prose { display: grid; gap: 16px; max-width: 62ch; }
.prose p { color: var(--muted); }
.prose h2 { font-size: var(--s-xl); color: var(--fg); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; }
.checks svg { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.checks strong { font-family: var(--f-display); font-weight: 500; display: block; }
.checks span { color: var(--muted); font-size: var(--s-sm); }
.benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.benefit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 8px; align-content: start; }
.benefit h3 { font-size: 1.1rem; }
.benefit p { color: var(--muted); font-size: var(--s-sm); }
@media (max-width: 860px) { .split, .benefits { grid-template-columns: minmax(0, 1fr); } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.card-contact { background: var(--marine); color: var(--on-dark); border-radius: var(--radius); padding: 32px; display: grid; gap: 20px; }
.card-contact .who { font-family: var(--f-display); font-size: var(--s-lg); }
.card-contact .role { color: var(--on-dark-muted); font-size: var(--s-sm); }
.coord { display: grid; gap: 4px; }
.coord .k { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--menthe); }
.coord .v { font-size: var(--s-md); user-select: all; word-break: break-word; }
.copy { background: rgba(255,255,255,.08); color: var(--on-dark); border: 0; border-radius: 6px; font-size: var(--s-xs); padding: 4px 10px; cursor: pointer; justify-self: start; font-family: var(--f-body); }
.copy:hover { background: rgba(255,255,255,.15); }
form.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
form.contact .full { grid-column: 1 / -1; }
form.contact label { display: grid; gap: 6px; font-size: var(--s-sm); font-weight: 500; }
form.contact input, form.contact select, form.contact textarea { font: inherit; font-size: var(--s-md); padding: .7em .8em; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); width: 100%; }
form.contact textarea { min-height: 140px; resize: vertical; }
form.contact input:focus, form.contact select:focus, form.contact textarea:focus { outline: 2px solid var(--accent-strong); outline-offset: 0; border-color: transparent; }
form.contact .rgpd { font-size: var(--s-xs); color: var(--muted); font-weight: 400; }
form.contact button { justify-self: start; border: 0; }
.form-msg { grid-column: 1 / -1; font-size: var(--s-sm); padding: 12px 14px; border-radius: 8px; background: var(--surface-2); color: var(--fg); border-left: 3px solid var(--accent-strong); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { form.contact { grid-template-columns: minmax(0, 1fr); } }

/* Bandeau d'appel */
.cta-band { background: var(--marine); color: var(--on-dark); }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-block: clamp(40px, 6vw, 64px); }
.cta-band h2 { font-size: var(--s-xl); max-width: 22ch; }
.cta-band p { color: var(--on-dark-muted); margin-top: 8px; }

/* Mentions légales */
.legal { display: grid; gap: 32px; max-width: 760px; }
.legal h2 { font-size: 1.3rem; margin-bottom: 8px; }
.legal p, .legal li { color: var(--muted); }
.legal dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 20px; margin: 0; }
.legal dt { font-weight: 600; color: var(--fg); font-size: var(--s-sm); }
.legal dd { margin: 0; color: var(--muted); font-size: var(--s-sm); }
@media (max-width: 520px) { .legal dl { grid-template-columns: minmax(0, 1fr); } .legal dd { margin-bottom: 8px; } }

/* Pied de page */
.site-footer { background: var(--marine-deep); color: var(--on-dark-muted); font-size: var(--s-sm); }
.site-footer .grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: 56px 32px; }
.site-footer img { height: 34px; width: auto; margin-bottom: 14px; }
.site-footer h4 { color: var(--on-dark); font-size: var(--s-sm); margin-bottom: 12px; font-weight: 500; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: var(--menthe); }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.07); padding-block: 18px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: var(--s-xs); }
@media (max-width: 860px) { .site-footer .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .site-footer .grid { grid-template-columns: minmax(0, 1fr); } }

/* En-tête de page avec photo */
.page-head.has-photo .bars { opacity: .25; }
.ph-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.ph-photo { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.35); aspect-ratio: 3 / 2; max-width: 100%; }
.ph-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .ph-grid { grid-template-columns: minmax(0, 1fr); } }
.presta { grid-template-columns: minmax(0, 1fr); }

/* Photos de mission */
.mission-photo { width: 100%; aspect-ratio: 16 / 9; max-width: 100%; object-fit: cover; border-bottom: 1px solid var(--line); }

/* Galerie terrain */
.terrain { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.terrain figure { margin: 0; position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 3 / 2; max-width: 100%; background: var(--surface-2); }
.terrain img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.terrain figure:hover img { transform: scale(1.05); }
.terrain figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: var(--s-xs); color: #fff; background: linear-gradient(transparent, rgba(15,22,32,.85)); }
.terrain figure:nth-child(1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
@media (max-width: 860px) { .terrain { grid-template-columns: repeat(2, minmax(0, 1fr)); } .terrain figure:nth-child(1) { grid-row: auto; aspect-ratio: 3 / 2; } }

/* Formulaire : champ piège et captcha */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
form.contact { position: relative; }
.captcha altcha-widget { --altcha-max-width: 100%; --altcha-color-base: var(--surface); --altcha-color-text: var(--fg); --altcha-color-border: var(--line); --altcha-border-radius: 8px; --altcha-color-border-focus: var(--accent-strong); }
.form-msg.err { border-left-color: #D14343; }
button[disabled] { opacity: .6; cursor: wait; }
.obf { word-break: break-word; }

/* Coordonnées à révéler */
button.reveal { font: inherit; color: inherit; background: none; border: 1px dashed currentColor; border-radius: 6px; padding: 2px 10px; cursor: pointer; opacity: .9; }
button.reveal:hover { opacity: 1; border-style: solid; }
button.reveal[disabled] { cursor: progress; }
a.revealed { color: inherit; word-break: break-word; }
.card-contact a.revealed, .legal a.revealed { color: var(--menthe); }
.legal a.revealed { color: var(--accent); }
.mission-kpi { aspect-ratio: 16 / 9; max-width: 100%; display: grid; place-content: center; gap: 6px; text-align: center; padding: 16px; border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 90% at 85% 10%, rgba(22,232,168,.18), transparent 60%), linear-gradient(rgba(169,182,194,.07) 1px, transparent 1px) 0 0 / 100% 28px, var(--marine-deep); }
.mission-kpi .big { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.8rem, 2rem + 3vw, 4rem); line-height: 1; color: var(--menthe); letter-spacing: -.02em; }
.mission-kpi .lbl { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-muted); }
.topics { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.topics a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); text-decoration: none; font-size: var(--s-sm); transition: border-color .15s, color .15s; }
.topics a:hover, .topics a:focus-visible { border-color: var(--accent); color: var(--accent); }
.ph-viz { position: relative; aspect-ratio: 5 / 4; max-width: 100%; margin-top: 20px; }
.ph-viz canvas { width: 100%; height: 100%; display: block; }
.ph-viz .viz-legend { position: absolute; right: 0; top: -22px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); opacity: .8; }
@media (max-width: 860px) { .ph-viz { aspect-ratio: 4 / 3; } }
.ph-viz .viz-legend, .hero-viz .viz-legend { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
