/* ==========================================================================
   INZANA — système visuel « instrument quantique »
   Un seul fichier, aucune dépendance, aucune police distante.
   Règles : filets de 1 px, angles vifs, un seul accent par écran, aucun flou,
   aucune animation en boucle, aucun effet qui ne porte pas une mesure.
   ========================================================================== */

@font-face {
  font-family: "Inter var";
  src: url("../fonts/inter-var.woff2") format("woff2-variations"),
       url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #05070c;
  --surface: #0a0e15;
  --surface-2: #0e141d;
  --fg: #e9eef6;
  --muted: #9db0c4;
  --line: rgba(233, 238, 246, .10);
  --line-2: rgba(233, 238, 246, .20);
  --accent: #3fe0c4;        /* mesure : livré, vérifié */
  --accent-2: #8b93ff;      /* conception : pilote, en cours */
  --alert: #ff6a4d;         /* alerte : ne décore jamais */
  --or: #c9a227;            /* filet local, usage rare */
  --ink: #04120f;
  --max: 1180px;
  --r: 2px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font: "Inter var", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --trame: 40px;
  --trame-line: rgba(233, 238, 246, .045);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0; background-color: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 17px; line-height: 1.62;
  background-image:
    linear-gradient(var(--trame-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--trame-line) 1px, transparent 1px);
  background-size: var(--trame) var(--trame);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 640px) { body { background-attachment: scroll; } }

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--ink); }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
code { font-family: var(--mono); font-size: .92em; color: var(--accent); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--ink);
  padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ------------------------------------------------------------------ typographie */
h1, h2, h3, h4 { margin: 0 0 14px; line-height: 1.1; letter-spacing: -.015em; font-weight: 680; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.22rem; letter-spacing: -.005em; }
h4 { font-size: 1rem; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
p { margin: 0 0 14px; }
.lede { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--muted); max-width: 60ch; }
.small { font-size: 14px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

/* ------------------------------------------------------------------ entête */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 11px; text-decoration: none;
  font-weight: 700; letter-spacing: .12em; font-size: 15px;
}
.brand svg { width: 30px; height: 30px; }
.brand small {
  display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  color: var(--muted); font-weight: 400; text-transform: uppercase;
}
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a {
  text-decoration: none; font-size: 14.5px; color: var(--muted);
  padding: 8px 11px; border-radius: var(--r); border-bottom: 1px solid transparent;
}
.main-nav a:hover { color: var(--fg); }
.main-nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.nav-toggle { display: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border: 1px solid var(--line-2); border-radius: var(--r);
  text-decoration: none; font-weight: 640; font-size: 15px; line-height: 1;
  background: transparent; color: var(--fg); cursor: pointer; font-family: inherit;
  transition: background .12s linear, color .12s linear, border-color .12s linear;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-primary:hover { background: #6fecd6; color: var(--ink); }
.btn-ghost { background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--surface-2); }
.btn-sm { padding: 9px 14px; font-size: 14px; }
.nav-cta { margin-left: 10px; }
@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--line-2);
    color: var(--fg); border-radius: var(--r); padding: 8px 12px; font-size: 18px; cursor: pointer;
  }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 18px;
  }
  .main-nav[data-open="true"] { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-cta { margin: 14px 0 0; }
}

/* ------------------------------------------------------------------ héros */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-trame {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .33; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.35) 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.35) 62%, transparent 100%);
}
.hero .wrap { position: relative; z-index: 1; padding: 84px 24px 68px; display: grid; gap: 44px; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-note { margin-top: 22px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }

.panneau { border: 1px solid var(--line-2); background: var(--surface); padding: 6px 0; }
.panneau dd { color: var(--fg); }
.panneau-h { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.panneau dl { margin: 0; }
.panneau .ligne { display: flex; justify-content: space-between; gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.panneau .ligne:last-child { border-bottom: 0; }
.panneau dt { color: var(--muted); }
.panneau dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.panneau .ok { color: var(--accent); }
@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; padding: 56px 24px 44px; }
  .panneau { order: 2; }
}

/* ------------------------------------------------------------------ sections */
.section { padding: 84px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section-head { max-width: 66ch; margin-bottom: 38px; }
.section-head p { color: var(--muted); margin: 0; }
.grid { display: grid; gap: 18px; }
.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: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative; border: 1px solid var(--line); background: var(--surface);
  padding: 26px 28px; border-radius: var(--r);
}
.card p { line-height: 1.65; }
.card p:last-child { margin-bottom: 0; }
.card .plus {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px;
}
.card h3 a { text-decoration: none; }
.card::after {
  content: ""; position: absolute; top: -1px; left: -1px; width: 10px; height: 10px;
  border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); opacity: .75;
}

.kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.kpi > div { background: var(--bg); padding: 20px 22px; }
.kpi strong { display: block; font-family: var(--mono); font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--fg); font-weight: 500; }
.kpi span { font-size: 13.5px; color: var(--muted); }
@media (max-width: 860px) { .kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------------ tableaux */
.table-w { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
thead th {
  text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  padding: 11px 14px; background: var(--surface); border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
td.prix, td.delai { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
td.prix { color: var(--fg); }
td.delai { color: var(--muted); }
td small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.badge {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  padding: 3px 8px; border: 1px solid var(--line-2); border-radius: var(--r);
  color: var(--muted); white-space: nowrap;
}
.b-livre { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.b-pilote { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); }
.b-concept { color: var(--alert); border-color: color-mix(in srgb, var(--alert) 40%, transparent); }

/* ------------------------------------------------------------------ listes */
.checks { list-style: none; padding: 0; margin: 16px 0 0; }
.checks li { position: relative; padding: 7px 0 7px 24px; color: var(--muted); font-size: 15px; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.plain { padding-left: 18px; color: var(--muted); }
.plain li { margin: 6px 0; }

/* ------------------------------------------------------------------ figures */
.figure { margin: 0; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); overflow: hidden; }
.figure img { display: block; width: 100%; height: auto; }
.figure figcaption {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: color-mix(in srgb, var(--fg) 76%, transparent);
}
.figure.chaine img { padding: 10px; }

/* ------------------------------------------------------------------ devis */
.estimateur { border: 1px solid var(--line); background: var(--surface); padding: 22px 24px; }
.estimateur fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.estimateur legend { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 0 8px; }
.estimateur label { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; font-size: 15px; cursor: pointer; }
.estimateur input[type="checkbox"], .estimateur input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
.estimateur .total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line-2); margin-top: 12px; padding-top: 14px; }
.estimateur .total strong { font-family: var(--mono); font-size: 26px; font-weight: 500; }
form.devis { display: grid; gap: 14px; }
form.devis .champ { display: grid; gap: 6px; }
form.devis label { font-size: 13px; color: var(--muted); }
form.devis input, form.devis textarea, form.devis select {
  font: inherit; font-size: 15px; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 11px 12px; width: 100%;
}
form.devis textarea { min-height: 120px; resize: vertical; }
form.devis .deux { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { form.devis .deux { grid-template-columns: 1fr; } }
.form-status { font-family: var(--mono); font-size: 13px; color: var(--accent); min-height: 20px; }

/* ------------------------------------------------------------------ fiches LIC */
.fiche .fiche-hero { border-bottom: 1px solid var(--line); background: var(--surface); }
.fiche .fiche-hero .wrap { padding: 36px 24px 26px; }
.fiche .crumb { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.fiche .crumb a { color: var(--muted); text-decoration: none; }
.fiche .crumb a:hover { color: var(--accent); }
.fiche h1 { margin: 0 0 12px; }
.fiche .meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fiche .specs { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; padding: 36px 0 64px; align-items: start; }
.fiche h2 { font-size: 21px; margin: 28px 0 8px; letter-spacing: 0; }
.fiche h2:first-child { margin-top: 0; }
.fiche h3 { font-size: 16px; margin: 0 0 6px; }
.fiche h5 { font-size: 15px; margin: 8px 0 4px; }
.fiche p { margin: 0 0 12px; }
.fiche ul.inclus { list-style: none; padding: 0; margin: 10px 0 0; }
.fiche ul.inclus li { border-bottom: 1px solid var(--line); padding: 8px 0 8px 22px; position: relative; color: var(--muted); font-size: 15px; }
.fiche ul.inclus li::before { content: "+"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.fiche .cas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 10px 0 0; }
.fiche .cas article { border: 1px solid var(--line); border-left: 2px solid var(--accent-2); padding: 14px 16px; background: var(--surface); }
.fiche .cas article p { font-size: 14px; color: var(--muted); margin: 0; }
.fiche details.qa { border-bottom: 1px solid var(--line); padding: 10px 0; }
.fiche details.qa summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.fiche details.qa summary::marker { color: var(--accent); }
.fiche details.qa p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.fiche aside.side { border: 1px solid var(--line); background: var(--surface); padding: 18px; }
.fiche dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13px; }
.fiche dt { color: var(--muted); }
.fiche dd { margin: 0; font-family: var(--mono); text-align: right; }
.fiche .sim { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.fiche .card { padding: 14px 16px; }
.fiche .card .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.fiche .card .ref { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.fiche .card .cible { font-size: 12px; color: var(--muted); margin-top: 6px; }
.fiche .btn.p { display: inline-block; background: var(--accent); color: var(--ink); text-decoration: none; font-weight: 650; padding: 10px 14px; }
@media (max-width: 860px) { .fiche .specs { grid-template-columns: 1fr; gap: 26px; } }

/* anciennes classes de badge des fiches (corps HTML d'origine) */
.badge.b-pret, .badge.b-dispo { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.badge.b-pilote, .badge.b-main { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); }
.badge.b-rd { color: var(--alert); border-color: color-mix(in srgb, var(--alert) 40%, transparent); }
.badge.b-cmd { color: var(--muted); }

/* ------------------------------------------------------------------ catalogue */
.cat-tools-w { position: sticky; top: 68px; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.cat-tools { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; padding: 12px 0; }
#cat-q {
  flex: 1 1 260px; min-width: 0; font: inherit; font-size: 15px;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line-2);
  padding: 10px 12px; border-radius: var(--r);
}
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chips button {
  font: inherit; font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
  background: transparent; color: var(--muted); border: 1px solid var(--line-2);
  padding: 6px 9px; border-radius: var(--r); cursor: pointer;
}
.cat-chips button[aria-pressed="true"] { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.cat-chips button:hover { border-color: var(--accent); color: var(--accent); }
.cat-chips button[aria-pressed="true"]:hover { color: var(--ink); }
[hidden] { display: none !important; }
.cat-som { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.cat-som a { text-decoration: none; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.cat-som a:hover { border-color: var(--accent); }

/* ------------------------------------------------------------------ pied */
.site-foot { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.site-foot h4 { font-size: 11px; letter-spacing: .14em; margin-bottom: 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 7px 0; font-size: 14.5px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.site-foot .bas { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.site-foot .zellige { height: 6px; margin: 0 0 34px; background: repeating-conic-gradient(from 45deg, var(--or) 0 25%, transparent 0 50%) 0 0 / 12px 12px; opacity: .22; }
@media (max-width: 860px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------------ prose légale */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.35rem; margin-top: 34px; }
.prose h3 { font-size: 1.05rem; margin-top: 24px; }
.prose ul { color: var(--muted); }
.prose table { margin: 14px 0; }

/* ------------------------------------------------------------------ bandeaux */
.band { border: 1px solid var(--line); background: var(--surface); padding: 22px 26px; display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap; }
.band strong { font-size: 1.15rem; }
.band p { margin: 0; color: var(--muted); }

@media print {
  body { background-image: none !important; }
  .site-head, .nav-toggle, .hero-trame, .cat-tools-w, .band .btn { display: none !important; }
  .card, .figure, tbody tr { break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; color: #444; }
  thead { display: table-header-group; }
}
