/* ─────────────────────────────────────────────────────────────
   Direction : « précis, posé, dossier d'ingénieur »
   Style suisse / éditorial. Filets plutôt que cartes, une seule
   couleur d'accent (émeraude = temps récupéré), aucune ombre
   décorative, mouvement réduit au strict nécessaire.
   ───────────────────────────────────────────────────────────── */
:root {
  --paper: #FAFAFA;
  --card: #FFFFFF;
  --ink: #111827;
  --ink-2: #1F2937;
  --mute: #52525B;
  --soft: #71717A;
  --line: #E4E4E7;
  --line-2: #D4D4D8;
  --accent: #10B981;
  --accent-ink: #047857;   /* émeraude lisible sur fond clair (AA) */
  --night: #18181B;

  --r-control: 6px;        /* boutons, champs */
  --r-box: 10px;           /* conteneurs, modales */

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ── Base ───────────────────────────────────────────────── */
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; font-feature-settings: "cv11", "ss01"; font-variant-numeric: tabular-nums; text-rendering: optimizeLegibility; }
body:has(dialog[open]) { overflow: hidden; }
::selection { background: #D1FAE5; color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; } }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 640px) { .wrap { padding-inline: 32px; } }
@media (min-width: 1024px) { .wrap { padding-inline: 48px; } }

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-control); font-size: 14px; }
.skip-link:focus { top: 12px; }
.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; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── Header ─────────────────────────────────────────────── */
.site-header { background: rgba(250, 250, 250, .82); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header:has(.mobile-menu:not([hidden])) { background: var(--paper); border-bottom-color: var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.wordmark-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.nav-link { position: relative; font-size: 14px; color: var(--mute); padding-block: 6px; transition: color .15s; }
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink); }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 34px; border: 1px solid var(--line-2); border-radius: var(--r-control); background: var(--card); color: var(--ink); }
@media (min-width: 768px) { .menu-toggle, .mobile-menu { display: none !important; } }
.mobile-menu { border-top: 1px solid var(--line); background: var(--paper); }
.mobile-link { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }

/* ── Boutons & liens ────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r-control); font-size: 14.5px; font-weight: 500; letter-spacing: -0.005em; border: 1px solid transparent; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15.5px; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #E4E4E7; }
.btn-outline-light { color: #fff; border-color: #52525B; }
.btn-outline-light:hover { border-color: #fff; }
@media (max-width: 400px) { .btn-lg { white-space: normal; text-align: center; height: auto; min-height: 52px; padding-block: 12px; } }
.text-link { font-size: 15px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 5px; text-decoration-thickness: 1px; transition: text-decoration-color .15s; align-self: center; }
.text-link:hover { text-decoration-color: var(--ink); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding-block: 64px 88px; }
@media (min-width: 1024px) { .hero { padding-block: 104px 128px; } }
.availability { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--accent-ink); }
.availability-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px #D1FAE5; }
.display { font-size: clamp(2.4rem, 1.6rem + 2.6vw, 3.7rem); line-height: 1.02; font-weight: 600; letter-spacing: -0.042em; text-wrap: pretty; }
.lede { max-width: 36rem; font-size: 18px; line-height: 1.65; color: var(--mute); }
@media (max-width: 640px) { .lede { font-size: 16.5px; } }

.fact-sheet { align-self: end; background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--ink); border-radius: 0 0 var(--r-box) var(--r-box); }
.fact-sheet-head { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 24px 14px; font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.fact-sheet-ref { font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--soft); }
.fact { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 15px 24px; border-top: 1px solid var(--line); }
.fact dt { font-size: 13.5px; color: var(--mute); }
.fact dd { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
@media (max-width: 420px) { .fact { grid-template-columns: 1fr; gap: 2px; } }
.fact-sheet-foot { padding: 14px 24px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); background: var(--paper); border-radius: 0 0 var(--r-box) var(--r-box); }

/* ── Sections ───────────────────────────────────────────── */
.section { padding-block: 72px 96px; }
@media (min-width: 1024px) { .section { padding-block: 96px 128px; } }
.section-head { display: grid; gap: 20px; padding-top: 22px; border-top: 1px solid var(--ink); margin-bottom: 48px; }
@media (min-width: 1024px) { .section-head { grid-template-columns: 3fr 9fr; gap: 40px; margin-bottom: 64px; } }
.section-label { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.section-label span { display: block; font-weight: 400; color: var(--mute); }
.h2 { max-width: 44rem; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); line-height: 1.08; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; }
.section-intro { margin-top: 18px; max-width: 38rem; font-size: 16px; line-height: 1.65; color: var(--mute); }
.fine-print { margin-top: 18px; font-size: 12.5px; color: var(--soft); }

/* ── Index des études de cas ────────────────────────────── */
.case-index { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-box); overflow: hidden; }
.case-index-head, .case-row { display: grid; grid-template-columns: 44px 104px minmax(0, 1fr) 220px 112px; align-items: baseline; gap: 20px; padding: 0 24px; }
.case-index-head { padding-block: 12px; font-size: 12px; color: var(--soft); background: var(--paper); border-bottom: 1px solid var(--line); }
.case-row { width: 100%; padding-block: 24px; text-align: left; font: inherit; color: inherit; background: transparent; border: 0; border-top: 1px solid var(--line); cursor: pointer; transition: background-color .15s; }
.case-index-head + .case-row { border-top: 0; }
.case-row:hover { background: #F7F7F8; }
.case-row:focus-visible { outline-offset: -2px; }
.cr-num { font-family: var(--mono); font-size: 13px; color: var(--soft); }
.cr-cat { font-size: 13.5px; font-weight: 500; color: var(--mute); }
.cr-title { font-size: 18px; line-height: 1.35; font-weight: 600; letter-spacing: -0.02em; text-wrap: pretty; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: text-decoration-color .15s; }
.case-row:hover .cr-title { text-decoration-color: var(--ink); }
.cr-stack { font-size: 13.5px; color: var(--mute); }
.cr-gain { justify-self: end; font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--accent-ink); white-space: nowrap; }
@media (max-width: 1023px) {
  .case-index-head { display: none; }
  .case-row { grid-template-columns: auto 1fr auto; grid-template-areas: "num cat gain" "title title title" "stack stack stack"; gap: 8px 12px; padding: 22px 20px; }
  .cr-num { grid-area: num; } .cr-cat { grid-area: cat; } .cr-gain { grid-area: gain; }
  .cr-title { grid-area: title; margin-top: 4px; } .cr-stack { grid-area: stack; }
}

/* ── Newsletter ─────────────────────────────────────────── */
.newsletter { margin-top: 24px; display: grid; gap: 28px; padding: 32px 24px; background: var(--night); color: #fff; border-radius: var(--r-box); }
@media (min-width: 768px) { .newsletter { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; padding: 40px; } }
.newsletter-title { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.025em; }
.newsletter-text { margin-top: 8px; font-size: 15px; line-height: 1.6; color: #A1A1AA; }
.nl-field { display: flex; gap: 8px; }
.nl-input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; background: #27272A; border: 1px solid #3F3F46; border-radius: var(--r-control); color: #fff; font: inherit; font-size: 15px; outline: 0; transition: border-color .15s; }
.nl-input::placeholder { color: #71717A; }
.nl-input:focus { border-color: #A1A1AA; }
.nl-field.is-error .nl-input { border-color: #F87171; }
.nl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border: 0; border-radius: var(--r-control); background: #fff; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; transition: background-color .15s; }
.nl-btn:hover { background: #E4E4E7; }
.nl-btn:disabled { cursor: default; }
.nl-spinner { display: none; width: 13px; height: 13px; border: 1.5px solid #D4D4D8; border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading .nl-spinner { display: inline-block; }
.is-success .nl-btn { background: var(--accent); color: #fff; }
.nl-feedback { margin-top: 12px; min-height: 1.3rem; font-size: 13px; color: #A1A1AA; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 440px) { .nl-field { flex-direction: column; } .nl-btn { width: 100%; } }

/* ── Offres : un seul bloc, colonnes séparées par des filets ── */
.offers { display: grid; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-box); }
@media (min-width: 1024px) { .offers { grid-template-columns: repeat(3, 1fr); } }
.offer { position: relative; display: flex; flex-direction: column; padding: 32px 28px; border-top: 1px solid var(--line); }
.offer:first-child { border-top: 0; }
@media (min-width: 1024px) { .offer { border-top: 0; border-left: 1px solid var(--line); padding: 36px 32px; } .offer:first-child { border-left: 0; } }
.offer-featured { background: #FCFCFC; box-shadow: inset 0 3px 0 var(--ink); }
@media (max-width: 1023px) { .offer-featured { box-shadow: inset 3px 0 0 var(--ink); } }
.offer-flag { position: absolute; top: 18px; right: 24px; font-size: 12px; font-weight: 600; color: var(--ink); }
.offer-kicker { font-size: 13px; color: var(--mute); }
.offer-title { margin-top: 6px; font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; }
.offer-price { margin-top: 28px; font-family: var(--mono); font-size: 36px; line-height: 1; font-weight: 500; letter-spacing: -0.04em; }
.offer-delay { margin-top: 10px; font-size: 13.5px; color: var(--mute); }
.offer-list { margin: 28px 0 32px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.offer-list li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.5; color: #3F3F46; }
.offer .btn { margin-top: auto; }

/* ── Méthode ────────────────────────────────────────────── */
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 40px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.step { padding-top: 20px; border-top: 1px solid var(--line-2); }
.step-num { display: block; font-family: var(--mono); font-size: 13px; color: var(--soft); }
.step-title { margin-top: 28px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.step-time { margin-top: 6px; font-family: var(--mono); font-size: 13px; color: var(--accent-ink); }
.step-text { margin-top: 14px; font-size: 15px; line-height: 1.65; color: var(--mute); }

.profile { margin-top: 72px; display: grid; gap: 24px; padding: 32px 0 0; border-top: 1px solid var(--line); }
@media (min-width: 1024px) { .profile { grid-template-columns: 3fr 9fr; gap: 40px; margin-top: 96px; } }
.profile-id { display: flex; align-items: center; gap: 14px; }
.monogram { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: none; background: var(--ink); color: #fff; border-radius: var(--r-control); font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.profile-name { font-size: 15px; font-weight: 600; }
.profile-role { font-size: 13.5px; color: var(--mute); }
.profile-quote { margin: 0; max-width: 46rem; font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.5; font-weight: 500; letter-spacing: -0.018em; color: var(--ink); text-wrap: pretty; }

/* ── Clôture & pied de page ─────────────────────────────── */
.closing { background: var(--night); color: #fff; padding-block: 88px; }
@media (min-width: 1024px) { .closing { padding-block: 120px; } }
.closing-label { font-size: 14px; color: #A1A1AA; }
.closing-title { margin-top: 18px; font-size: clamp(2.1rem, 1.3rem + 3vw, 3.6rem); line-height: 1.04; font-weight: 600; letter-spacing: -0.04em; text-wrap: balance; }
.footer { background: var(--night); color: #A1A1AA; font-size: 13.5px; border-top: 1px solid #27272A; }
.footer a, .footer button { color: #D4D4D8; transition: color .15s; }
.footer a:hover, .footer button:hover { color: #fff; }
.footer button { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #52525B; cursor: pointer; }

/* ── Modales (<dialog> natif) ───────────────────────────── */
.modal { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100%; height: 100%; margin: 0; color: var(--ink); }
.modal::backdrop { background: rgba(17, 24, 39, .45); }
.modal[open] { display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .modal[open] { align-items: center; padding: 24px; } }
.modal-panel { width: 100%; max-width: 560px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--card); border-radius: var(--r-box) var(--r-box) 0 0; box-shadow: 0 24px 64px -16px rgba(17, 24, 39, .28); overflow: hidden; }
@media (min-width: 640px) { .modal-panel { border-radius: var(--r-box); max-height: 88dvh; } }
.modal-panel-lg { max-width: 760px; }
.modal[open] .modal-panel { animation: modalIn .24s var(--ease); }
.modal.is-closing .modal-panel { animation: modalOut .16s ease forwards; }
.modal.is-closing::backdrop { opacity: 0; transition: opacity .16s; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes modalOut { to { opacity: 0; transform: translateY(8px); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 14px 28px; border-bottom: 1px solid var(--line); }
.modal-kicker { font-size: 13px; font-weight: 600; }
.modal-close { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--r-control); color: var(--mute); cursor: pointer; transition: background-color .15s, color .15s; }
.modal-close:hover { background: #F4F4F5; color: var(--ink); }
.modal-body { padding: 28px 24px 36px; overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 640px) { .modal-body { padding: 36px 40px 44px; } }
.modal-title { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; }

/* Étude de cas */
.cs-title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.05rem); line-height: 1.12; font-weight: 600; letter-spacing: -0.032em; text-wrap: balance; }
.cs-lede { margin-top: 14px; font-size: 16px; line-height: 1.65; color: var(--mute); }
.cs-kpis { margin-top: 28px; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink); }
@media (min-width: 640px) { .cs-kpis { grid-template-columns: repeat(4, 1fr); } }
.cs-kpi { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.cs-kpi b { display: block; font-family: var(--mono); font-size: 19px; font-weight: 500; letter-spacing: -0.03em; }
.cs-kpi:first-child b { color: var(--accent-ink); }
.cs-kpi span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--mute); }
.cs-h { margin-top: 40px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.cs-p { margin-top: 10px; font-size: 15.5px; line-height: 1.7; color: #3F3F46; }
.cs-arch { margin-top: 14px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.cs-arch li { display: grid; grid-template-columns: 8.5rem 1fr; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.6; color: #3F3F46; }
.cs-arch li b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
@media (max-width: 520px) { .cs-arch li { grid-template-columns: 1fr; gap: 2px; } }
.cs-steps { margin-top: 14px; padding: 0; list-style: none; counter-reset: s; }
.cs-steps li { position: relative; counter-increment: s; padding: 0 0 14px 36px; font-size: 15px; line-height: 1.6; color: #3F3F46; }
.cs-steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 1px; font-family: var(--mono); font-size: 12.5px; color: var(--soft); }
.cs-steps li b { color: var(--ink); font-weight: 600; }
.cs-roi { margin-top: 14px; border-top: 1px solid var(--line); font-size: 14.5px; }
.cs-roi div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cs-roi div span:last-child { font-family: var(--mono); font-size: 13.5px; text-align: right; white-space: nowrap; }
.cs-roi .is-total { border-bottom: 1px solid var(--ink); font-weight: 600; }
.cs-roi .is-total span:last-child { color: var(--accent-ink); }
.cs-note { margin-top: 12px; font-size: 13px; line-height: 1.6; color: var(--mute); }
.cs-tags { margin-top: 12px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.chip { font-size: 14px; color: #3F3F46; }
.cs-cta { margin-top: 36px; display: flex; flex-direction: column; gap: 16px; padding: 22px 24px; border-radius: var(--r-box); background: var(--night); color: #fff; }
@media (min-width: 640px) { .cs-cta { flex-direction: row; align-items: center; justify-content: space-between; } }
.cs-cta p { font-size: 15px; font-weight: 500; }
.cs-cta-sub { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: #A1A1AA; }

/* Options de pack */
.pack-options { margin-top: 24px; padding: 0; border: 0; border-top: 1px solid var(--line); }
.pack-opt { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color .15s; }
.pack-opt:hover { background: var(--paper); }
.pack-opt input { accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.pack-opt:has(input:checked) .po-name { font-weight: 600; }
.po-name { font-size: 15px; }
.po-meta { font-size: 13px; color: var(--mute); }
.po-price { margin-left: auto; font-family: var(--mono); font-size: 14px; white-space: nowrap; }

/* Mentions légales */
.prose-legal h2 { font-size: 1.65rem; font-weight: 600; letter-spacing: -0.03em; }
.prose-legal h3 { margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.prose-legal p, .prose-legal li { margin-top: 8px; font-size: 14.5px; line-height: 1.7; color: #3F3F46; }
.prose-legal dl { margin-top: 10px; display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; font-size: 14px; }
.prose-legal dt { color: var(--mute); }
.prose-legal dd { margin: 0; }
@media (max-width: 520px) { .prose-legal dl { grid-template-columns: 1fr; gap: 0; } .prose-legal dd { margin-bottom: 8px; } }
.prose-legal a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.prose-legal a:hover { text-decoration-color: var(--ink); }
