/* NB-TECH SOLUTIONS — Design System (site public)
   Clair par défaut, sombre via [data-theme="dark"] sur <html>.
   Aucune couleur hors jetons. Pas de dégradés, pas de néon. */

:root {
  --bg: #F7F9FB;
  --surface: #FFFFFF;
  --sunk: #EEF2F6;
  --ink: #0F1B2D;
  --ink-2: #3E4C5E;
  --ink-3: #6B7788;
  --line: #E2E8F0;
  --primary: #0E7C86;
  --primary-soft: #E0F2F3;
  --on-primary: #FFFFFF;
  --radius: 10px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(56px, 8vw, 104px);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0E141B;
  --surface: #151D26;
  --sunk: #1B2530;
  --ink: #E6EDF3;
  --ink-2: #B4C0CC;
  --ink-3: #8593A3;
  --line: #263241;
  --primary: #3FB5BE;
  --primary-soft: #133238;
  --on-primary: #0E141B;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: .25em 0; }

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--surface); color: var(--ink);
  padding: 10px 16px; border: 2px solid var(--primary); border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* ── En-tête ─────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { flex: none; display: inline-flex; align-items: center; padding: 4px 0; text-decoration: none; color: var(--ink); border-radius: 4px; }
/* Mot-symbole : texte = couleur du thème (currentColor), trait d'union = accent (fill hérité). */
.logo { display: block; height: 36px; width: auto; color: var(--ink); fill: var(--primary); flex: none; }
.site-footer .logo { height: 34px; }
@media (max-width: 400px) { .site-header .logo { height: 34px; } }

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: 4px 2px; align-items: center; }
.site-nav a { display: block; white-space: nowrap; padding: 8px 8px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 500; }
.site-nav a:hover { color: var(--ink); background: var(--sunk); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--primary-soft); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--sunk); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.nav-toggle { display: none; }

.site-nav .nav-contact { display: none; }
@media (max-width: 1200px) {
  .site-nav .nav-contact { display: block; }
  .js .nav-toggle { display: inline-grid; }
  .header-inner { flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; margin: 0; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; padding-bottom: 12px; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: 12px; }
  .header-actions { margin-left: auto; }
  .header-actions .btn { display: none; }
}

/* ── Boutons ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: var(--radius); border: 1px solid var(--primary);
  background: var(--primary); color: var(--on-primary);
  font: 600 .98rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(.94); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--primary); }
.btn-secondary:hover { background: var(--primary-soft); filter: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ── Sections ────────────────────────────── */
.section { padding: var(--section) 0; }
.section-sunk { background: var(--sunk); }
.section-line { border-top: 1px solid var(--line); }
.eyebrow {
  display: inline-block; margin: 0 0 12px;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary);
}
.lead { font-size: clamp(1.08rem, 1.8vw, 1.22rem); color: var(--ink-2); max-width: 68ch; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head p { color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }

.page-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-hero .lead { margin-bottom: 0; }

.breadcrumb { font-size: .88rem; margin-bottom: 20px; color: var(--ink-2); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--ink-3); }
.breadcrumb a { color: var(--ink-2); }

/* ── Accueil ─────────────────────────────── */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ── Grilles et cartes ───────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .4em; }
.card p { color: var(--ink-2); }
.card ul { color: var(--ink-2); }
.card > :last-child { margin-bottom: 0; }
.card .card-link { margin-top: auto; padding-top: 8px; font-weight: 600; }
.card-num { font: 600 .82rem/1 var(--font-body); color: var(--primary); letter-spacing: .06em; margin-bottom: 14px; }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; line-height: 1.5;
  background: var(--primary-soft); color: var(--ink); border: 1px solid var(--line);
}
.tag-status { background: var(--sunk); color: var(--ink-2); }

/* ── Bande Loi 25 / appel à l'action ─────── */
.band {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary);
  border-radius: var(--radius); padding: clamp(24px, 4vw, 40px);
}
.band-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 800px) { .band-grid { grid-template-columns: 1fr; } }

.cta-block { text-align: left; max-width: 760px; }
.cta-block p { color: var(--ink-2); }

/* ── Services détaillés ──────────────────── */
.service { padding: 40px 0; border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 0; padding-top: 0; }
.service h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; margin-top: 20px; }
@media (max-width: 760px) { .service-grid { grid-template-columns: 1fr; } }
.service-grid h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); font-family: var(--font-body); margin-bottom: 8px; }
.service-grid ul, .service-grid p { color: var(--ink-2); }
.service-grid .span-2 { grid-column: 1 / -1; }

blockquote.quote {
  margin: 0; padding: 14px 18px; background: var(--sunk); border-radius: var(--radius);
  border-left: 3px solid var(--primary); color: var(--ink); font-style: italic;
}
blockquote.quote p { margin: 0; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .9rem; color: var(--ink-2); background: var(--surface); }
.toc a:hover { color: var(--ink); border-color: var(--primary); }

/* ── Étapes (approche) ───────────────────── */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps > li { position: relative; padding: 0 0 36px 64px; margin: 0; counter-increment: step; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--primary); color: var(--primary);
  font: 700 1.05rem/1 var(--font-head);
}
.steps > li::after { content: ""; position: absolute; left: 20px; top: 46px; bottom: 4px; width: 2px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps h2 { font-size: 1.35rem; margin-bottom: .3em; }
.steps p, .steps ul { color: var(--ink-2); }

/* ── Schémas SVG ─────────────────────────── */
.diagram { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(12px, 2vw, 20px); }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { font-size: .88rem; color: var(--ink-2); margin-top: 10px; }
.d-zone { fill: var(--primary-soft); stroke: var(--primary); stroke-width: 1.5; stroke-dasharray: 6 5; }
.d-box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.d-box-strong { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.d-box-sunk { fill: var(--sunk); stroke: var(--line); stroke-width: 1.5; }
.d-line { stroke: var(--ink-3); stroke-width: 1.6; fill: none; }
.d-line-dash { stroke: var(--ink-3); stroke-width: 1.6; fill: none; stroke-dasharray: 5 5; }
.d-arrow { fill: var(--ink-3); }
.d-t { fill: var(--ink); font: 600 14px var(--font-body); }
.d-s { fill: var(--ink-2); font: 400 12px var(--font-body); }
.d-z { fill: var(--primary); font: 700 11px var(--font-body); letter-spacing: .08em; }
.d-t2 { fill: var(--ink); font: 600 12.5px var(--font-body); }
.d-t3 { fill: var(--ink); font: 600 11px var(--font-body); }
.d-note { fill: var(--ink-2); font: italic 400 11.5px var(--font-body); }
.d-num { fill: var(--primary); font: 700 17px var(--font-head); text-anchor: middle; }
.d-node { fill: var(--surface); stroke: var(--primary); stroke-width: 2.5; }
.d-doc { fill: var(--primary-soft); stroke: var(--primary); stroke-width: 1.5; stroke-linejoin: round; }
.d-box-acc { fill: var(--primary-soft); stroke: var(--primary); stroke-width: 1.5; }
.d-line-acc { stroke: var(--primary); stroke-width: 2; fill: none; }
.d-line-faint { stroke: var(--ink-3); stroke-width: 1.3; fill: none; stroke-dasharray: 3 4; }
.d-arrow-acc { fill: var(--primary); }
.diagram-pair { align-items: stretch; }
.diagram-service { margin: 0 0 48px; }
.diagram-center { max-width: 760px; }
.diagram-timeline .only-narrow { display: none; }
@media (max-width: 700px) {
  .diagram-timeline .only-wide { display: none; }
  .diagram-timeline .only-narrow { display: block; max-width: 420px; }
}
.section-title-sm { font-size: 1.2rem; margin-bottom: 20px; }
.lab-sketch { margin: 4px 0 8px; padding: 10px 12px; background: var(--sunk); border-radius: 8px; }
.lab-sketch svg { display: block; width: 100%; max-width: 420px; height: auto; }

/* ── Laboratoires / réalisations ─────────── */
.lab-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.lab-id { font: 700 1rem/1 var(--font-head); color: var(--primary); }
.card dl { margin: 0; }
.card dt { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); margin-top: 12px; }
.card dd { margin: 4px 0 0; color: var(--ink-2); }

/* ── À propos : fondateur ─────────────── */
.founder { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.founder-photo { display: block; width: 100%; height: auto; border-radius: var(--radius); background: var(--sunk); }
@media (max-width: 720px) { .founder { grid-template-columns: 1fr; } .founder-photo { max-width: 280px; } }

/* ── Encadrés ────────────────────────────── */
.note { background: var(--sunk); border-radius: var(--radius); padding: 16px 20px; color: var(--ink-2); font-size: .95rem; }
.note > :last-child { margin-bottom: 0; }
.todo {
  border: 2px dashed var(--primary); border-radius: var(--radius); padding: 16px 20px;
  background: var(--primary-soft); color: var(--ink);
}
.todo strong:first-child { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.todo > :last-child { margin-bottom: 0; }
.draft-flag {
  display: inline-block; margin-bottom: 16px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--primary); color: var(--ink); background: var(--primary-soft);
  font-size: .82rem; font-weight: 600;
}

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }

/* ── Formulaire ──────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 5vw, 56px); align-items: start; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.form fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.form legend { font: 600 1.1rem/1.3 var(--font-head); margin-bottom: 12px; padding: 0; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .96rem; }
.field .hint { display: block; font-size: .88rem; color: var(--ink-2); margin: -2px 0 8px; font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 11px 12px; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--ink-3); border-radius: 8px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.req { color: var(--primary); }
.field label.check, .check { display: flex; font-weight: 400; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--primary); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; padding: 12px 16px; border-radius: 8px; display: none; }
.form-status.is-visible { display: block; }
.form-status.is-ok { background: var(--primary-soft); color: var(--ink); border: 1px solid var(--primary); }
.form-status.is-error { background: var(--sunk); color: var(--ink); border: 1px solid var(--ink-2); }
.turnstile-slot { margin: 8px 0 16px; min-height: 0; }

.booking { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.booking iframe { width: 100%; height: 640px; border: 0; border-radius: 8px; background: var(--bg); }

/* ── Pied de page ────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 32px; font-size: .95rem; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-body); color: var(--ink); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .88rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ── Journal ─────────────────────────────── */
.article-meta { margin: 16px 0 0; font-size: .92rem; color: var(--ink-2); }
.journal-card h2 a { color: var(--ink); text-decoration: none; }
.journal-card h2 a:hover { color: var(--primary); text-decoration: underline; }
.journal-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.journal-note { margin-top: 32px; }
.related { max-width: 760px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.related-kicker { margin: 0 0 4px; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.related-link { margin: 0 0 6px; font: 600 1.15rem/1.35 var(--font-head); }
.related-more { margin: 0; color: var(--ink-2); }
.back-link { margin-top: 32px; font-weight: 600; }

/* ── Infolettre (pied de page, fin d'article) ─ */
.newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px 48px; align-items: start; }
.newsletter-pied { padding-bottom: 36px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.newsletter-article { grid-template-columns: 1fr; margin-top: 40px; padding: clamp(20px, 3vw, 28px); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius); }
.newsletter .newsletter-title, .site-footer .newsletter-title { font: 700 1.2rem/1.3 var(--font-head); letter-spacing: -0.01em; text-transform: none; color: var(--ink); margin: 0 0 8px; }
.newsletter-purpose { margin: 0; color: var(--ink-2); }
.newsletter-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: end; }
.newsletter-row label { grid-column: 1 / -1; font-weight: 600; font-size: .95rem; color: var(--ink); }
.newsletter-row input {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--ink-3); border-radius: 8px;
}
.newsletter-row input:focus { outline: 3px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.newsletter .check { margin-top: 12px; font-size: .9rem; }
.newsletter .check a { color: var(--primary); }
.newsletter .turnstile-slot { margin: 8px 0 0; }
.newsletter .form-status { margin-top: 12px; font-size: .95rem; }
@media (max-width: 760px) { .newsletter { grid-template-columns: 1fr; } }
@media (max-width: 380px) { .newsletter-row { grid-template-columns: 1fr; } .newsletter-row .btn { width: 100%; } }

/* ── Bandeau témoins ─────────────────────── */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80;
  max-width: 640px; margin: 0 auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: 0 8px 24px rgba(15, 27, 45, .12);
}
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; font-size: .94rem; color: var(--ink-2); }
.consent .btn-row { margin-top: 0; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .site-nav a, .icon-btn { transition: background-color .15s ease, color .15s ease, filter .15s ease; }
}
@media print {
  .site-header, .site-footer, .consent, .btn-row { display: none; }
}

.h3-like { font-size: 1.25rem; font-weight: 600; }
