/* Effrenus — design system « terminal ».
   Sombre par défaut, mono pour les titres et les chiffres, arêtes franches.
   Une seule couleur d'accent, utilisée parcimonieusement. */

:root {
  --bg: #0a0c0d;
  --surface: #0f1213;
  --surface-2: #0c0f10;
  --ink: #e8ecea;
  --ink-2: #b9c2bd;
  --muted: #7d8783;
  --line: #1d2325;
  --line-strong: #2a3234;
  /* Bordures de champs : 3,4:1 sur le fond, seuil WCAG 1.4.11 (3:1). */
  --field-line: #5f6b66;

  /* Accent unique — le vert « signal ». Les anciens noms --blue/--green sont
     conservés pour ne pas casser app.css et les pages applicatives. */
  --blue: #3ddc84;
  --blue-dark: #74f0ab;
  --blue-50: #0f2418;
  --green: #3ddc84;
  --green-50: #0f2418;
  --amber: #e0b341;
  --amber-50: #241d0d;

  --radius: 2px;
  --radius-lg: 3px;
  --shadow: none;
  --shadow-soft: none;
  --max: 1200px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
a:hover { color: var(--blue); border-bottom-color: var(--blue); }
img { max-width: 100%; }
main { flex: 1 0 auto; }
footer { flex-shrink: 0; }
.container { max-width: var(--max); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* Ligne de commande et libellés */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong); padding: 7px 10px; border-radius: var(--radius);
  background: var(--surface-2);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); display: inline-block; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 12, 13, .92);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 20px; }
.logo {
  font: 600 15px/1 var(--mono); letter-spacing: -.01em; color: var(--ink);
  border-bottom: 0;
}
.logo b { color: var(--blue); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 24px; font: 12.5px/1 var(--mono); color: var(--muted); }
.nav-links a { color: var(--muted); border-bottom: 0; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch{display:inline-flex;align-items:center;gap:8px;font:600 10px/1 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.lang-switch a,.lang-switch .lang-current{display:inline-flex;align-items:center;gap:5px;color:inherit;border-bottom:0;text-decoration:none;padding:0}
.lang-switch a{opacity:.65}
.lang-switch a:hover{opacity:1;color:var(--ink)}
.lang-switch .lang-current{color:var(--ink)}
.lang-switch .lang-current span:last-child{position:relative}
.lang-switch .lang-current span:last-child::after{content:"";position:absolute;left:0;right:0;bottom:-5px;height:1px;background:var(--blue)}
.lang-switch .lang-sep{width:1px;height:11px;background:var(--line-strong);display:block;flex:0 0 auto}
.lang-switch .flag{display:block;flex:0 0 auto;border-radius:1px}
.nav-mobile-only { display: none; }
.nav-toggle {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  background: transparent; color: var(--ink-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius); font: 600 11px/1 var(--mono); letter-spacing: .06em;
  text-transform: uppercase; cursor: pointer;
}
.nav-toggle[aria-expanded="true"] { border-color: var(--blue); color: var(--ink); }
.nav-toggle-icon {
  display: inline-block; width: 12px; height: 8px;
  border-top: 2px solid currentColor; border-bottom: 2px solid currentColor;
}

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius);
  font: 600 12px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase;
  border: 1px solid var(--field-line); cursor: pointer; transition: .12s ease;
  text-decoration: none; white-space: nowrap; border-bottom-width: 1px;
}
.btn.primary { background: var(--blue); color: #07130c; border-color: var(--blue); }
.btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #07130c; }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--blue); color: var(--ink); }
.btn.small { padding: 8px 12px; font-size: 11px; }
.btn.block { width: 100%; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center;
  padding: 64px 0 56px;
}
h1 {
  font: 500 clamp(27px, 3.2vw, 38px)/1.12 var(--mono); letter-spacing: -.015em;
  margin: 16px 0 18px; color: var(--ink);
}
h1 em { font-style: normal; color: var(--blue); }
.lead { font-size: 16.5px; line-height: 1.6; color: var(--muted); max-width: 56ch; margin: 0 0 26px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.trial { margin-top: 12px; font: 12px/1.5 var(--mono); color: var(--blue); }
.trust {
  display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 30px;
  font: 12px/1.5 var(--mono); color: var(--muted);
}
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust span::before { content: "·"; color: var(--line-strong); }

/* Bloc terminal */
.term {
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  background: var(--surface-2); overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  font: 11px/1 var(--mono); color: var(--muted); text-transform: lowercase;
}
.term-dots { display: inline-flex; gap: 4px; }
.term-dots i { width: 6px; height: 6px; background: var(--line-strong); display: inline-block; border-radius: 50%; }
.term-body {
  margin: 0; padding: 16px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 12.5px/1.75 var(--mono); color: var(--ink-2);
}
.term-body .tok-cmd { color: var(--blue); }
.term-body .tok-key { color: var(--ink); }
.term-body .tok-str { color: var(--green); }
.term-body .tok-dim { color: var(--muted); }

/* Sections */
section { padding: 52px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
h2 { font: 500 clamp(20px, 2.6vw, 26px)/1.2 var(--mono); letter-spacing: -.01em; margin: 0 0 6px; color: var(--ink); }
.section-sub { color: var(--muted); margin: 0; font-size: 14.5px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* Trois colonnes sans icônes-chips */
.features { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); }
.feature { padding: 22px; border-right: 1px solid var(--line); }
.feature:last-child { border-right: 0; }
.feature .ico { color: var(--blue); margin-bottom: 12px; }
.feature h3 { margin: 0 0 6px; font: 500 14px/1.3 var(--mono); color: var(--ink); }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* Tableaux */
.table-card { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
th {
  font: 600 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line-strong);
}
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.model-name { font-weight: 600; color: var(--ink); font-family: var(--mono); font-size: 12.5px; }
.model-id { display: block; color: var(--muted); font: 11px/1.4 var(--mono); margin-top: 2px; }

/* Pastilles d'état (statut, santé) */
.pill {
  display: inline-block; padding: 2px 6px; border-radius: 0;
  font: 600 10px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid currentColor;
}
.pill.good { color: var(--blue); }
.pill.mid { color: var(--amber); }

/* Packs */
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.pack {
  background: transparent; border: 0; border-right: 1px solid var(--line);
  padding: 22px; position: relative; display: flex; flex-direction: column;
}
.pack:last-child { border-right: 0; }
.pack.popular { background: var(--surface-2); box-shadow: inset 0 2px 0 var(--blue); }
.pack .badge {
  position: static; align-self: flex-start; margin-bottom: 10px;
  font: 600 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue);
}
.pack h3, .pack h2 { margin: 0; font: 500 13px/1.3 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pack .price { font: 500 32px/1.1 var(--mono); letter-spacing: -.02em; margin: 10px 0 2px; color: var(--ink); }
.pack .credits { color: var(--blue); font: 11.5px/1.4 var(--mono); }
.pack p, .pack .desc { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.pack ul { list-style: none; padding: 0; margin: 14px 0 20px; display: grid; gap: 7px; }
.pack li { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.pack li svg { color: var(--blue); flex: none; margin-top: 3px; }
.pack .btn, .pack .actions { margin-top: auto; }

/* Code */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.hero > *, .split > * { min-width: 0; }
.term, .code-card, pre { max-width: 100%; }
.code-card { background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 18px 20px; overflow: hidden; }
.code-card .code-top { display: flex; gap: 4px; margin-bottom: 14px; }
.code-card .code-top i { width: 6px; height: 6px; background: var(--line-strong); border-radius: 50%; display: inline-block; }
pre { margin: 0; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); font: 12.5px/1.7 var(--mono); }
.tok-key { color: var(--ink); } .tok-str { color: var(--green); } .tok-com { color: var(--muted); }

/* FAQ */
.faq { max-width: 820px; }
details { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; margin-bottom: 8px; background: transparent; }
summary {
  cursor: pointer; font: 500 13px/1.4 var(--mono); padding: 14px 16px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  color: var(--ink);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 15px; font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); font-size: 13.5px; margin: 0; padding: 0 16px 14px; line-height: 1.6; }

/* Bandeau final */
.cta-band {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-band h2 { margin: 0 0 4px; font-size: 22px; }
.cta-band p { margin: 0; color: var(--muted); }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 44px; margin-top: 16px; }
.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-brand { max-width: 320px; font-size: 12.5px; color: var(--muted); }
.foot-brand .logo { display: block; }
.foot-links { display: flex; gap: 44px; flex-wrap: wrap; }
.foot-col { display: grid; gap: 7px; font: 12px/1.4 var(--mono); align-content: start; }
.foot-col b { color: var(--muted); font: 600 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.foot-col a { color: var(--ink-2); border-bottom: 0; }
.foot-col a:hover { color: var(--blue); }
.foot-bottom {
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line);
  font: 11px/1.5 var(--mono); color: var(--muted);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* Tarifs */
.page-hero { padding: 56px 0 20px; }
.page-hero h1 { margin: 14px 0 10px; max-width: 22ch; }
.page-hero .lead { max-width: 62ch; }
.compare-note {
  display: flex; gap: 12px; align-items: flex-start;
  border-left: 2px solid var(--blue); padding: 12px 0 12px 14px;
  font: 12.5px/1.6 var(--mono); color: var(--muted); margin-top: 22px;
}
.compare-note svg { color: var(--blue); flex: none; }
.included { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: var(--radius); }
.included .item { padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; }
.included .item:nth-child(2n) { border-right: 0; }
.included .item:nth-last-child(-n+2) { border-bottom: 0; }
.included .item b { display: block; margin-bottom: 3px; font: 500 12.5px/1.3 var(--mono); color: var(--ink); }
.included .item p { margin: 0; color: var(--muted); font-size: 12.5px; }

/* Responsive */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 44px 0 36px; }
  .features { grid-template-columns: 1fr; }
  .feature { border-right: 0; border-bottom: 1px solid var(--line); }
  .feature:last-child { border-bottom: 0; }
  .packs { grid-template-columns: 1fr; }
  .pack { border-right: 0; border-bottom: 1px solid var(--line); }
  .pack:last-child { border-bottom: 0; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .included { grid-template-columns: 1fr; }
  .included .item { border-right: 0; }
  .included .item:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .included .item:last-child { border-bottom: 0; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-actions { display: flex; margin-left: auto; }
  .nav-actions .btn { display: none; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 60px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px 16px 14px; background: var(--surface);
    border-bottom: 1px solid var(--line-strong);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 0; font-size: 14px; color: var(--ink-2);
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-mobile-only { display: block; }
  .container { padding: 0 16px; }
  section { padding: 36px 0; }
  pre, .term-body { font-size: 11.5px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  th, td { padding: 10px 12px; }
  /* Tableau tarifs (4 colonnes) : masque le contexte sur mobile. */
  .compact-mobile th:nth-child(2), .compact-mobile td:nth-child(2) { display: none; }
  .table-scroll th.num, .table-scroll td.num { white-space: nowrap; }
  .compact-mobile, .models-table { table-layout: fixed; }
  /* Catalogue (6 colonnes) : garde modèle + prix d'entrée/sortie. */
  .models-table th:nth-child(2), .models-table td:nth-child(2),
  .models-table th:nth-child(5), .models-table td:nth-child(5),
  .models-table th:nth-child(6), .models-table td:nth-child(6) { display: none; }
  .table-scroll th, .table-scroll td { overflow-wrap: anywhere; }
  .table-scroll code { word-break: break-all; }
  .page-hero { padding: 40px 0 16px; }
  .foot-links { gap: 28px; }
}

/* Bac à sable (section d'essai sur la page d'accueil) */
.hint { color: var(--muted); font: 11px/1.5 var(--mono); }
.demo-box {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); padding: 16px;
}
.demo-row { display: flex; gap: 12px; flex-wrap: wrap; }
.demo-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.demo-field-key { flex: 1 1 320px; }
.demo-field-model { flex: 0 1 320px; }
.demo-field label {
  font: 600 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-2);
}
.key-row { display: flex; gap: 8px; }
.key-row input { width: auto; flex: 1 1 auto; min-width: 0; }
.demo-box input, .demo-box select, .demo-box textarea {
  width: 100%; background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--field-line); border-radius: var(--radius);
  padding: 10px 11px; font: 14px/1.5 var(--mono);
}
.demo-box input::placeholder, .demo-box textarea::placeholder {
  color: var(--muted); opacity: 1;
}
.demo-box input:focus, .demo-box select:focus, .demo-box textarea:focus {
  border-color: var(--blue);
}
.demo-box textarea { resize: vertical; }
.demo-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px;
}
.demo-status { margin-top: 0; }
.demo-out {
  white-space: pre-wrap; margin: 12px 0 0; min-height: 0; overflow-wrap: anywhere;
  color: var(--ink-2); font: 12.5px/1.7 var(--mono);
}
.demo-out:empty, #demo-meta:empty { display: none; }
.demo-out.error { color: var(--amber); }
#demo-meta { margin: 8px 0 0; }
.demo-error {
  margin: 12px 0 0; padding-left: 10px; border-left: 2px solid var(--amber);
  color: var(--amber); font: 12.5px/1.5 var(--mono);
}
.hint a { color: var(--ink-2); }
.packs-error {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 22px; color: var(--muted);
}
.packs-error p { margin: 0; }

/* Accessibilité : anneau de focus explicite (WCAG 2.4.7) + lien d'évitement. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--blue); color: #07130c; padding: 10px 14px;
  font: 600 12px/1 var(--mono); text-decoration: none; border: 0;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Confort : respect du réglage « réduire les animations » et cibles tactiles. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
@media (max-width: 720px) {
  .btn, button { min-height: 44px; }
}

/* Confort de navigation : les ancres ne passent pas sous la barre fixe. */
[id] { scroll-margin-top: 76px; }
@media (max-width: 720px) {
  .trust span::before { content: none; }
}

/* iOS zoome au focus sous 16px : les champs de la démo restent à 16px sur mobile. */
@media (max-width: 720px) {
  .demo-box input, .demo-box select, .demo-box textarea { font-size: 16px; }
  .demo-field-model { flex: 1 1 100%; }
  .key-row { flex-wrap: wrap; }
  .key-row input { flex: 1 1 100%; }
  .key-row .btn { flex: 1 1 0; }
}

.auto-badge{display:inline-block;padding:3px 6px;border:1px solid var(--blue);border-radius:2px;color:var(--blue);font:600 9.5px/1 var(--mono);letter-spacing:.08em;text-transform:uppercase;background:rgba(61,220,132,.08);vertical-align:middle}
