/* ==========================================================================
   Merlin Tech — feuille de style principale (v2, octobre 2026)
   Direction : « Swiss technical ». Encre marine du logo, papier froid,
   tracés de circuit gris repris du logo, un seul accent (LED verte) réservé
   aux états et au schéma d'accueil.
   ========================================================================== */

/* ---- Police auto-hébergée (aucun appel à un service tiers) ---- */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Jetons de design ---- */
:root {
  --ink:      #0d1528;   /* marine du logo */
  --ink-2:    #3d4659;   /* texte secondaire */
  --ink-3:    #6b7385;   /* texte tertiaire, AA sur papier */
  --paper:    #f4f6f9;   /* fond froid */
  --white:    #ffffff;
  --trace:    #c4c9d3;   /* gris des tracés du logo */
  --rule:     #dde1e8;   /* filets */
  --led:      #17915a;   /* accent unique : états, schéma */
  --err:      #b42318;

  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --sp: clamp(64px, 9vw, 120px);   /* espacement vertical des sections */
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--font); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--led); outline-offset: 3px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--white); padding: 10px 14px; z-index: 100; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---- Boutons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px; border-radius: 4px;
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--ink); transition: background-color .15s, color .15s;
}
.btn--solid { background: var(--ink); color: var(--white); }
.btn--solid:hover { background: #1e2a47; }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--white); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---- Barre utilitaire ---- */
.utility { background: var(--ink); color: #c9cfdb; font-size: 14px; }
.utility__in { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 16px; }
.utility__contact { display: flex; gap: 24px; flex-wrap: wrap; }
.utility__contact a { text-decoration: none; }
.utility__contact a:hover { color: var(--white); }
.lang { display: flex; gap: 2px; }
.lang button {
  background: none; border: 0; color: #9aa3b5; font: 600 13px/1 var(--font);
  padding: 8px 8px; cursor: pointer; border-radius: 3px;
}
.lang button:hover { color: var(--white); }
.lang button[aria-pressed="true"] { color: var(--white); background: rgba(255,255,255,.1); }

/* ---- En-tête ---- */
.masthead { position: sticky; top: 0; z-index: 50; background: rgba(244,246,249,.94); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.masthead.is-scrolled { border-bottom-color: var(--rule); }
.masthead__in { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.brand img { height: 64px; width: auto; }
.primary { display: flex; align-items: center; gap: 4px; }
.primary a { text-decoration: none; font-weight: 500; font-size: 16px; padding: 10px 14px; border-radius: 4px; color: var(--ink-2); }
.primary a:hover, .primary a.is-active { color: var(--ink); }
.primary a.is-active { box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.primary .primary__cta { margin-left: 12px; border: 1.5px solid var(--ink); color: var(--ink); font-weight: 600; }
.primary .primary__cta:hover { background: var(--ink); color: var(--white); }
.navtoggle { display: none; }

/* ---- Accueil ---- */
.hero { padding: clamp(48px, 7vw, 96px) 0 0; }
.hero__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__kicker { font-size: 15px; font-weight: 500; color: var(--led); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.hero__kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--led); box-shadow: 0 0 0 4px rgba(23,145,90,.15); }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); font-weight: 650; letter-spacing: -0.03em; line-height: 1.04; max-width: 15ch; }
.hero__lead { margin-top: 24px; font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 54ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Schéma circuit : élément signature, inspiré directement des tracés du logo */
.schematic { margin: 0; }
.schematic svg { width: 100%; height: auto; overflow: visible; }
.traces path { fill: none; stroke: var(--trace); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pads circle { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.nodes rect { fill: var(--white); stroke: var(--ink); stroke-width: 2; }
.nodes .led { fill: var(--led); }
.schematic__legend { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 8px; border-top: 1px solid var(--ink); }
.sl { padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.sl b { font-weight: 600; font-size: 16px; }
.sl i { font-style: normal; color: var(--ink-3); font-size: 14px; }
.sl--b { text-align: center; } .sl--c { text-align: right; }
.sl--a { padding-left: 2px; }

/* Animation unique au chargement : les tracés se dessinent */
@media (prefers-reduced-motion: no-preference) {
  .js .traces path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.6s cubic-bezier(.6,0,.2,1) forwards; }
  .js .traces path:nth-child(n+4) { animation-delay: .35s; }
  .js .traces path:nth-child(n+8) { animation-delay: .6s; }
  .js .nodes .led { animation: blink 1s 1.6s ease-out both; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes blink { 0% { opacity: 0; } 40% { opacity: 1; } 60% { opacity: .35; } 100% { opacity: 1; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(56px, 7vw, 88px); border-top: 1px solid var(--rule); }
.facts li { padding: 22px 20px 26px 0; display: flex; flex-direction: column; gap: 4px; }
.facts li + li { padding-left: 20px; border-left: 1px solid var(--rule); }
.facts strong { font-weight: 600; font-size: 17px; }
.facts span { color: var(--ink-3); font-size: 15px; }

/* ---- Sections ---- */
.section { padding: var(--sp) 0; }
.section--tint { background: var(--white); border-block: 1px solid var(--rule); }
.section__head { max-width: 680px; margin-bottom: clamp(40px, 5vw, 64px); }
.section__head h2 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -0.025em; }
.section__head p { margin-top: 16px; color: var(--ink-2); font-size: 18px; }
.split { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.section__head--side { margin-bottom: 0; position: sticky; top: 120px; }

/* ---- Pratiques produits ---- */
.practice { display: grid; grid-template-columns: 280px 1fr; gap: clamp(24px, 4vw, 56px); padding: 48px 0; border-top: 1.5px solid var(--ink); }
.practice:last-child { padding-bottom: 0; }
.practice__id h3 { font-size: 28px; letter-spacing: -0.02em; }
.practice__scope { margin-top: 10px; color: var(--ink-2); }
.practice__status { margin-top: 18px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.practice__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--led); flex: none; }
.practice__note { margin-top: 14px; font-size: 15px; color: var(--ink-2); padding-left: 15px; border-left: 2px solid var(--trace); }
.practice__items { display: grid; grid-template-columns: repeat(3, 1fr); }
/* Gamme 10ZiG (photos produits), console 10ZiG Manager, captures Liquidware */
.range-wrap { grid-column: 2; border-top: 1px solid var(--rule); padding-top: 28px; }
.range-wrap h4 { font-size: 17px; margin-bottom: 18px; }
.range { display: grid; grid-template-columns: 1.55fr 1fr 0.8fr 0.8fr; gap: 28px; align-items: start; }
.range figure { margin: 0; }
.range__img { height: 150px; display: flex; align-items: flex-end; }
.range img { display: block; max-height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: left bottom; }
.range figcaption { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 2px; }
.range figcaption b { font-weight: 600; font-size: 16px; }
.range figcaption span { color: var(--ink-3); font-size: 14px; }
.range__link { margin-top: 20px; }
.range__link a { font-weight: 600; font-size: 15.5px; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: var(--trace); }
.range__link a:hover { text-decoration-color: var(--ink); }
.mgr { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--rule); }
.mgr img { width: 100%; height: auto; background: var(--white); border: 1px solid var(--rule); border-radius: 4px; padding: 14px; }
.mgr h4 { font-size: 17px; }
.mgr p { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; }
.item__shot { margin: 0 0 18px; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; background: var(--white); }
.item__shot img { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; object-position: left top; }
.practice__hook { margin-top: 12px; font-size: 18px; font-weight: 500; line-height: 1.4; color: var(--ink); }
/* Cycle Panop : séquence réelle en 5 étapes, d'où la numérotation */
.cycle-wrap { grid-column: 2; border-top: 1px solid var(--rule); padding-top: 28px; }
.cycle-wrap h4 { font-size: 17px; margin-bottom: 18px; }
.cycle { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: step; }
.cycle li { padding-right: 16px; }
.cycle li + li { padding-left: 16px; border-left: 1px solid var(--rule); }
.cycle b { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; }
.cycle b::before { counter-increment: step; content: counter(step); flex: none; width: 24px; height: 24px; border: 1.5px solid var(--ink); border-radius: 50%; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.cycle span { display: block; margin-top: 8px; font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.item { padding: 0 24px; display: flex; flex-direction: column; }
.item:first-child { padding-left: 0; }
.item + .item { border-left: 1px solid var(--rule); }
.item h4 { font-size: 20px; }
.item__sub { margin-top: 4px; color: var(--ink-3); font-size: 15px; }
.item ul { margin: 18px 0 22px; display: grid; gap: 8px; font-size: 15.5px; color: var(--ink-2); line-height: 1.45; }
.item li { padding-left: 16px; position: relative; }
.item li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 1.5px; background: var(--ink-3); }
.item__link { margin-top: auto; font-weight: 600; font-size: 15.5px; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: var(--trace); align-self: flex-start; }
.item__link:hover { text-decoration-color: var(--ink); }

/* ---- Environnements ---- */
.envlist { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.envlist > div { padding: 22px 0; border-top: 1px solid var(--rule); }
.envlist dt { font-weight: 600; font-size: 18px; }
.envlist dd { margin: 6px 0 0; color: var(--ink-2); font-size: 15.5px; }

/* ---- Pourquoi nous ---- */
.why { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.why__args { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 40px; }
.why__args h3 { font-size: 19px; }
.why__args p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.partners { background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: 28px; }
.partners h3 { font-size: 17px; margin-bottom: 12px; }
.partners table { width: 100%; border-collapse: collapse; font-size: 15px; }
.partners th, .partners td { text-align: left; padding: 12px 0; border-top: 1px solid var(--rule); vertical-align: top; }
.partners th { font-weight: 600; padding-right: 16px; white-space: nowrap; }
.partners td { color: var(--ink-2); }

/* ---- Références ---- */
.sectors { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--rule); border-top: 1px solid var(--rule); }
.sectors li { padding: 28px 24px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.sectors strong { font-weight: 600; font-size: 19px; }
.sectors span { color: var(--ink-3); font-size: 15px; }

/* ---- Contact ---- */
.contact__grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact__info h2 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -0.025em; }
.contact__info > p { margin-top: 16px; color: var(--ink-2); font-size: 18px; }
.coords { margin: 36px 0 0; }
.coords > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--rule); }
.coords dt { color: var(--ink-3); font-size: 15px; }
.coords dd { margin: 0; }
.coords a { text-decoration: none; font-weight: 500; }
.coords a:hover { text-decoration: underline; }
.contact__host { margin-top: 24px; font-size: 14px; color: var(--ink-3); }

.form { background: var(--white); border: 1px solid var(--rule); border-radius: 6px; padding: clamp(24px, 3.5vw, 40px); display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form h3 { grid-column: 1 / -1; font-size: 21px; margin-bottom: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 14.5px; font-weight: 500; }
.req { color: var(--ink-3); }
.field input, .field select, .field textarea {
  font: 400 16px/1.4 var(--font); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--rule); border-radius: 4px; padding: 12px 14px; width: 100%;
  transition: border-color .15s, background-color .15s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--trace); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: var(--white); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--err); }
.field__err { color: var(--err); font-size: 13.5px; min-height: 0; }
.field__err:empty { display: none; }
.form__privacy { font-size: 13.5px; color: var(--ink-3); }
.form__privacy a { color: var(--ink-2); }
.form__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form__status { font-size: 15px; font-weight: 500; }
.form__status.is-ok { color: var(--led); }
.form__status.is-err { color: var(--err); }

/* ---- Pied de page ---- */
.footer { background: var(--ink); color: #b8c0d0; font-size: 15px; padding-top: 72px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.footer__brand img { height: 64px; width: auto; margin-bottom: 18px; }
.footer__brand p { max-width: 36ch; }
.footer h2 { color: var(--white); font-size: 15px; font-weight: 600; letter-spacing: 0; margin-bottom: 14px; }
.footer ul { display: grid; gap: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; }
.footer__base { display: flex; padding-inline: 0; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 22px; padding-bottom: 28px; border-top: 1px solid rgba(255,255,255,.12); font-size: 14px; }
.footer__legal { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---- Pages légales ---- */
.legal { padding: clamp(48px, 7vw, 88px) 0 var(--sp); }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(32px, 4vw, 46px); letter-spacing: -0.025em; }
.legal .legal__meta { margin-top: 12px; color: var(--ink-3); font-size: 15px; }
.legal h2 { font-size: 22px; margin: 44px 0 12px; padding-top: 20px; border-top: 1px solid var(--rule); }
.legal p, .legal li { color: var(--ink-2); max-width: 70ch; }
.legal p + p { margin-top: 12px; }
.legal ul { list-style: disc; padding-left: 22px; margin: 10px 0; display: grid; gap: 6px; }
.legal dl { display: grid; grid-template-columns: 200px 1fr; gap: 10px 20px; margin: 16px 0; }
.legal dt { color: var(--ink-3); }
.legal dd { margin: 0; }
.legal .back { display: inline-block; margin-bottom: 28px; font-weight: 600; }
.legal .legal__intro { margin-top: 28px; }

/* ---- Responsive ---- */
@media (max-width: 1080px) {
  .practice { grid-template-columns: 1fr; }
  .practice__id { max-width: 620px; }
  .cycle-wrap { grid-column: 1; }
  .range-wrap { grid-column: 1; }
  .cycle { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
  .cycle li:nth-child(4) { padding-left: 0; border-left: 0; }
}
@media (max-width: 940px) {
  .navtoggle {
    display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
    background: none; border: 1.5px solid var(--ink); border-radius: 4px; cursor: pointer;
  }
  .navtoggle__bar, .navtoggle__bar::before, .navtoggle__bar::after { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: transform .2s; }
  .navtoggle__bar::before, .navtoggle__bar::after { content: ""; position: absolute; left: 0; }
  .navtoggle__bar::before { top: -6px; } .navtoggle__bar::after { top: 6px; }
  .navtoggle[aria-expanded="true"] .navtoggle__bar { background: transparent; }
  .navtoggle[aria-expanded="true"] .navtoggle__bar::before { transform: translateY(6px) rotate(45deg); }
  .navtoggle[aria-expanded="true"] .navtoggle__bar::after { transform: translateY(-6px) rotate(-45deg); }
  .primary { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 20px; }
  .primary.is-open { display: flex; }
  .primary a { padding: 14px 0; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .primary a.is-active { box-shadow: none; }
  .primary .primary__cta { margin: 16px 0 0; text-align: center; border-radius: 4px; }
  .hero__grid, .split, .why, .contact__grid { grid-template-columns: 1fr; }
  .schematic { max-width: 520px; }
  .section__head--side { position: static; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .utility__contact li:nth-child(n+2) { display: none; }
  .brand img { height: 44px; }
  .practice__items { grid-template-columns: 1fr; }
  .cycle { grid-template-columns: 1fr; row-gap: 0; }
  .range { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .range__img { height: 120px; }
  .mgr { grid-template-columns: 1fr; gap: 16px; }
  .cycle li, .cycle li + li, .cycle li:nth-child(4) { padding: 14px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .item { padding: 24px 0; }
  .item + .item { border-left: 0; border-top: 1px solid var(--rule); }
  .item:first-child { padding-top: 8px; }
  .envlist, .why__args { grid-template-columns: 1fr; }
  .sectors { grid-template-columns: 1fr 1fr; }
  .form { grid-template-columns: 1fr; }
  .coords > div { grid-template-columns: 1fr; gap: 2px; }
  .legal dl { grid-template-columns: 1fr; gap: 2px; }
  .legal dd { margin-bottom: 10px; }
}
@media (max-width: 420px) {
  .facts { grid-template-columns: 1fr; }
  .facts li, .facts li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .facts li:first-child { border-top: 0; }
  .sectors { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media print {
  .utility, .masthead, .schematic, .form, .footer__legal { display: none; }
  body { background: #fff; }
}
