/* Maillage : design tokens */
:root {
  --paper: #f4f2ee;
  --paper-2: #ebe8e1;
  --white: #fbfaf8;
  --ink: #14181d;
  --steel: #3a4450;
  --muted: #5f6772;
  --line: #d6d1c7;
  --night: #11161b;
  --night-2: #182029;
  --night-line: #2a3440;
  --night-text: #c9d0d8;
  --accent: #d9481c;       /* orange minium, primaire antirouille */
  --accent-ink: #b0360f;   /* version texte, contraste AA sur papier */
  --accent-soft: #f7d9cc;
  --go: #2f7d4f;

  --f-head: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Consolas", monospace;

  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px;
  --wrap: 1180px;
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-head); font-stretch: 112%; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.7rem); font-weight: 700; max-width: 22ch; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 var(--s3); }
.mono { font-family: var(--f-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s3); }
@media (min-width: 720px) { .wrap { padding: 0 var(--s5); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; min-height: 48px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  font: 600 0.95rem/1 var(--f-body); text-decoration: none; letter-spacing: .01em;
  border-radius: var(--radius); cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 6px 18px -8px rgba(217, 72, 28, .7); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: currentColor; box-shadow: none; }
.btn-sm { padding: 10px 16px; min-height: 40px; font-size: .88rem; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(17, 22, 27, .86); color: #fff;
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--night-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.2rem/1 var(--f-head); font-stretch: 112%; letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.brand { font-size: 1.35rem; text-transform: none; letter-spacing: -0.01em; gap: 0; }
.brand-dot { color: var(--accent); }
.header-phone { margin-left: auto; margin-right: var(--s4); text-decoration: none; font-size: .88rem; color: #fff; padding: 8px 0; white-space: nowrap; }
.header-phone:hover { color: var(--accent); }
@media (max-width: 420px) { .header-phone { font-size: .8rem; margin-right: var(--s2); } }
.nav { display: flex; align-items: center; gap: var(--s4); }
.nav a:not(.btn) { text-decoration: none; font-size: .93rem; color: var(--night-text); position: relative; padding: 6px 0; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav a:not(.btn):hover { color: #fff; }
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav-toggle { display: none; }
.nav a.lang-switch { font-size: .78rem; letter-spacing: .08em; border: 1px solid var(--night-line); padding: 4px 8px; }
.nav a.lang-switch::after { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: 0; color: #fff; cursor: pointer; }
  .bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .25s var(--ease), background .25s; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -7px; } .bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--night); border-bottom: 1px solid var(--night-line);
    padding: var(--s2) var(--s3) var(--s4);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--night-line); font-size: 1rem; }
  .nav .btn { margin-top: var(--s3); }
  .nav a.lang-switch { border: 0; border-bottom: 1px solid var(--night-line); padding: 14px 0; font-size: 1rem; }
}

/* Hero */
.hero {
  position: relative; color: #fff; background: var(--night);
  padding: var(--s7) 0 var(--s8);
  overflow: hidden;
  isolation: isolate;
}
.hero::before { /* grille de calque */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--night-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--night-line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .45;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero-grid { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: var(--s5); } .hero { padding: var(--s8) 0; } }
.eyebrow { font: 500 .8rem/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: var(--s4); }
.hero h1 em { font-style: normal; color: var(--night-text); }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: var(--night-text); max-width: 54ch; margin: var(--s4) 0 var(--s5); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero-specs { list-style: none; padding: 0; margin: var(--s6) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--night-line); }
.hero-specs li { padding: var(--s3) var(--s3) 0 0; font-size: .95rem; }
.hero-specs span { display: block; font: 500 .7rem/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: #8793a0; }

.hero-visual { margin: 0; position: relative; }
.hero-visual svg { width: 100%; height: auto; max-width: 560px; margin: 0 auto; overflow: visible; }
.hero-visual figcaption { margin-top: var(--s3); text-align: center; font-size: .75rem; color: #8793a0; letter-spacing: .04em; }
.tag { display: inline-block; padding: 2px 6px; border: 1px solid #45515e; color: var(--night-text); margin: 0 2px; }
.tag-accent { border-color: var(--accent); color: var(--accent); }
.arrow { color: var(--accent); margin: 0 4px; }

/* Structure SVG */
/* Etat final par défaut (sans animation) ; .is-animated joue la séquence scan puis modèle */
#structure .pt { fill: #7fb2d9; opacity: .28; transform-box: fill-box; transform-origin: center; }
#structure .mb { fill: none; stroke: #e8ecf0; stroke-width: 1.6; stroke-linecap: square; }
#structure .mb-2 { stroke: #9aa6b2; stroke-width: 1.1; }
#structure .mb-acc { stroke: var(--accent); stroke-width: 2; }
#structure .dim { stroke: #6e7b88; stroke-width: 1; fill: none; }
#structure .dim-txt { fill: #a9b4bf; font: 500 11px var(--f-mono); letter-spacing: .06em; }
#structure .ground { fill: none; stroke: #2e3a46; stroke-width: 1; }
#structure .scanline { stroke: #7fb2d9; stroke-width: 1; opacity: 0; }

.is-animated #structure .pt { opacity: 0; animation: pt-in .5s var(--ease) forwards, pt-settle 1.2s ease forwards; animation-delay: var(--d), calc(2.8s + var(--d) * .2); }
.is-animated #structure .mb { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease) forwards; animation-delay: var(--d); }
.is-animated #structure .dim, .is-animated #structure .dim-txt { opacity: 0; animation: fade 0.8s ease 3.6s forwards; }
.is-animated #structure .scanline { animation: scan 1.8s var(--ease) .1s forwards; }
@keyframes pt-in { from { opacity: 0; transform: scale(0); } to { opacity: .95; transform: scale(1); } }
@keyframes pt-settle { from { opacity: .95; } to { opacity: .28; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes scan { 0% { opacity: 0; transform: translateX(0); } 10% { opacity: .8; } 90% { opacity: .8; } 100% { opacity: 0; transform: translateX(480px); } }

/* Sections */
.section { padding: var(--s8) 0; position: relative; }
@media (max-width: 719px) { .section { padding: var(--s7) 0; } }
.section-dark { background: var(--night); color: #fff; }
.section-dark .section-lead, .section-dark p { color: var(--night-text); }
.section-paper { background: var(--paper-2); }
.section-head { margin-bottom: var(--s6); }
.section-lead { color: var(--muted); max-width: 60ch; margin-top: var(--s4); font-size: 1.05rem; }
.kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent-ink); margin-bottom: var(--s3); }
.section-dark .kicker { color: var(--accent); }

.split { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: var(--s7); } }
.prose p { color: var(--steel); font-size: 1.05rem; }
.checks { list-style: none; padding: 0; margin: var(--s4) 0 0; border-top: 1px solid var(--line); }
.checks li { padding: 14px 0 14px 34px; border-bottom: 1px solid var(--line); position: relative; font-weight: 500; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--night-line); border: 1px solid var(--night-line); counter-reset: s; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.step { background: var(--night); padding: var(--s5) var(--s4); position: relative; transition: background .3s var(--ease); }
.step:hover { background: var(--night-2); }
.step::after { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--accent); transition: width .5s var(--ease); }
.step:hover::after { width: 100%; }
.step-num { display: block; font-size: 2rem; color: var(--accent); margin-bottom: var(--s4); line-height: 1; }
.step h3 { margin-bottom: var(--s2); color: #fff; }
.step p { font-size: .95rem; margin: 0; }

/* Cards */
.cards { display: grid; gap: var(--s3); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); gap: var(--s4); } }
.card { background: var(--white); border: 1px solid var(--line); padding: var(--s5) var(--s4); position: relative; transition: border-color .25s, transform .25s var(--ease), box-shadow .25s var(--ease); }
.card::before, .card::after { content: ""; position: absolute; width: 10px; height: 10px; border-color: var(--accent); border-style: solid; opacity: 0; transition: opacity .25s; }
.card::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.card::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.card:hover { border-color: #bdb6a9; transform: translateY(-3px); box-shadow: 0 16px 30px -22px rgba(20, 24, 29, .45); }
.card:hover::before, .card:hover::after { opacity: 1; }
.card-icon { width: 40px; height: 40px; fill: none; stroke: var(--ink); stroke-width: 1.6; margin-bottom: var(--s4); }
.card-icon circle:first-child { stroke: var(--accent); }
.card h3 { margin-bottom: var(--s2); }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }

/* Livrables */
.split-livrables { align-items: center; }
.deliverables { list-style: none; padding: 0; margin: var(--s5) 0 0; }
.deliverables li { display: grid; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); }
.deliverables li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .deliverables li { grid-template-columns: 180px 1fr; gap: var(--s3); } }
.deliverables strong { font-weight: 600; }
.deliverables span { color: var(--muted); }

.cartouche { background: var(--white); border: 2px solid var(--ink); font-size: .92rem; box-shadow: 10px 10px 0 -2px var(--paper-2), 10px 10px 0 0 var(--ink); }
.cartouche-head { display: flex; justify-content: space-between; padding: 10px 14px; background: var(--ink); color: #fff; font-size: .75rem; letter-spacing: .14em; }
.indices { width: 100%; border-collapse: collapse; }
.indices th { text-align: left; font: 500 .7rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--ink); }
.indices td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.indices td:first-child { font-size: 1.2rem; font-weight: 500; width: 52px; border-right: 1px solid var(--line); text-align: center; }
.indices tr.is-go td:first-child { color: var(--go); }
.pill { display: inline-block; white-space: nowrap; font: 500 .72rem/1 var(--f-mono); padding: 5px 8px; border: 1px solid var(--line); color: var(--muted); }
.pill-go { border-color: var(--go); color: var(--go); background: #e6f1ea; }
@media (max-width: 480px) { .indices th:last-child, .indices td:last-child { display: none; } }
.cartouche-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--ink); }
.cartouche-grid div { padding: 12px 14px; font-size: .85rem; border-right: 1px solid var(--line); }
.cartouche-grid div:last-child { border-right: 0; }
.cartouche-grid span { display: block; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cartouche-note { margin: 0; padding: 14px; font-weight: 500; font-size: .9rem; border-left: 4px solid var(--accent); }

/* Secteurs */
.sectors { display: grid; gap: var(--s3); }
@media (min-width: 860px) { .sectors { grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--ink); } }
.sector { padding: var(--s5) 0; border-top: 2px solid var(--ink); }
@media (min-width: 860px) { .sector { border-top: 0; padding: var(--s5) var(--s5) var(--s5) 0; } .sector + .sector { padding-left: var(--s5); border-left: 1px solid var(--line); } }
.sector h3 { font-size: 1.6rem; margin-bottom: var(--s3); }
.sector p { color: var(--steel); margin: 0; }
.audience { margin-top: var(--s6); display: grid; gap: var(--s4); align-items: center; padding: var(--s5); background: var(--white); border: 1px solid var(--line); }
@media (min-width: 860px) { .audience { grid-template-columns: 1.6fr 1fr; } }
.audience p { margin: 0; }
.audience-stat { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: .95rem; }
.audience-stat .big { font: 800 3.2rem/1 var(--f-head); font-stretch: 112%; color: var(--accent-ink); }

/* Zone */
.zone { margin-top: var(--s5); }
.zone-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent-ink); margin-bottom: var(--s3); }
.zone-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 860px) { .zone-list { grid-template-columns: repeat(3, 1fr); } }
.zone-list li { background: var(--paper); padding: var(--s3) var(--s4); position: relative; }
.zone-list li::before { content: ""; display: block; width: 8px; height: 8px; background: var(--ink); transform: rotate(45deg); margin-bottom: var(--s2); }
.zone-list li:first-child::before { background: var(--accent); }
.zone-list strong { display: block; font: 700 1.1rem/1.2 var(--f-head); font-stretch: 112%; }
.zone-list span { font-size: .72rem; color: var(--muted); }

/* Realisations */
.projects { display: grid; gap: var(--s4); }
@media (min-width: 720px) { .projects { grid-template-columns: repeat(3, 1fr); } }
.project { background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.project:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -22px rgba(20, 24, 29, .45); }
.project-media { aspect-ratio: 4 / 3; background: var(--night); overflow: hidden; display: grid; place-items: center; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project:hover .project-media img { transform: scale(1.04); }
.project-body { padding: var(--s4); }
.project-meta { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-ink); margin-bottom: var(--s2); }
.project h3 { margin-bottom: var(--s2); }
.project-body p:last-child { color: var(--muted); font-size: .95rem; margin: 0; }
.project.is-placeholder .project-media {
  background: repeating-linear-gradient(45deg, var(--night) 0 12px, var(--night-2) 12px 24px);
  color: #8793a0; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  outline: 2px dashed var(--accent); outline-offset: -10px;
}

/* Contact */
.contact-list { margin: var(--s5) 0 0; display: grid; gap: var(--s4); }
.contact-list dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: #8793a0; margin-bottom: 4px; }
.contact-list dd { margin: 0; color: #fff; }
.contact-list a { color: #fff; text-decoration-color: var(--accent); text-underline-offset: 4px; font-size: 1.1rem; }
.form { background: var(--night-2); border: 1px solid var(--night-line); padding: var(--s5) var(--s4); display: grid; gap: var(--s3); }
@media (min-width: 720px) { .form { padding: var(--s5); } }
.field-row { display: grid; gap: var(--s3); }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-weight: 500; color: #fff; }
.opt { color: #8793a0; font-weight: 400; }
.form input, .form select, .form textarea {
  width: 100%; font: 400 1rem/1.4 var(--f-body); color: #fff;
  background: var(--night); border: 1px solid #36424f; border-radius: var(--radius);
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 72, 28, .25); }
.form [aria-invalid="true"] { border-color: #e2674a; }
.form ::placeholder { color: #6b7784; }
.form-note { font-size: .82rem; margin: 0; color: #8793a0 !important; }
.form-status { margin: 0; font-size: .9rem; min-height: 1.2em; }
.form-status.is-error { color: #f09a82 !important; }
.form-status.is-ok { color: #8fd1a8 !important; }

/* Footer */
.site-footer { background: #0b0f13; color: var(--night-text); padding: var(--s6) 0 var(--s5); font-size: .9rem; }
.footer-inner { display: grid; gap: var(--s4); }
@media (min-width: 860px) { .footer-inner { grid-template-columns: 1.3fr 1fr 1.4fr auto; align-items: start; } }
.footer-contact { font-style: normal; display: grid; gap: 4px; }
.footer-contact a { color: #fff; text-decoration: none; }
.footer-contact a:hover { color: var(--accent); }
.brand-footer { color: #fff; margin-bottom: var(--s2); }
.footer-tag { max-width: 40ch; color: #8793a0; margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); }
.footer-copy { margin: 0; color: #6b7784; font-size: .8rem; }

/* Reveal au scroll (JS ajoute .js sur <html>) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--rd, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Pages légales */
.legal { padding: var(--s7) 0 var(--s8); }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: var(--s5); }
.legal h2 { font-size: 1.3rem; margin: var(--s5) 0 var(--s3); max-width: none; }
.legal p, .legal li { color: var(--steel); max-width: 70ch; }
.todo { background: var(--accent-soft); padding: 0 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}
