/* QuelLLM.fr — Design System */
/* Fallback metrique pour Instrument Serif italic — CLS fix cible (MISSION 100/100 vague 2, 2026-07-06).
   Scope : UNIQUEMENT .qll-hero-serif-fallback (span hero home "votre machine"), PAS --font-display global.
   Metriques calculees via fonttools sur instrument-serif-italic.woff2 vs Times New Roman (rapport vague 1). */
@font-face {
  font-family: "Instrument Serif Fallback";
  src: local("Times New Roman");
  font-style: italic;
  size-adjust: 91.1%;
  ascent-override: 108.67%;
  descent-override: 34.03%;
}

/* Match the hero fallback metrics while Inter Tight loads; the final font is unchanged. */
@font-face {
  font-family: "Inter Tight Hero Fallback";
  src: local("Arial"), local("Liberation Sans");
  size-adjust: 95.7%;
  ascent-override: 101.23%;
  descent-override: 25.20%;
  line-gap-override: 0%;
}
.qll-hero-title, .qll-hero-subtitle {
  font-family: 'Inter Tight', 'Inter Tight Hero Fallback', 'SF Pro Display', -apple-system, system-ui, sans-serif;
}

/* ------ Tokens ------ */
:root {
  /* Couleurs — mode sombre, accents néon */
  --bg: #07090c;
  --bg-elev: #0d1117;
  --bg-card: #11161d;
  --bg-card-hover: #151b24;
  --surface: #1a222e;
  --border: #1f2937;
  --border-strong: #2a3443;

  --text: #e6edf3;
  --text-dim: #a6b2c0;      /* +contrast vs fond sombre (WCAG AA) */
  --text-mute: #8792a0;     /* +contrast — était #6b7683, failed sur field-label */

  /* Néon */
  --neon: #4ade80;          /* vert terminal */
  --neon-dim: #16a34a;
  --neon-glow: rgba(74, 222, 128, 0.18);
  --violet: #a78bfa;
  --violet-glow: rgba(167, 139, 250, 0.2);
  --amber: #fbbf24;
  --rose: #fb7185;
  --cyan: #67e8f9;

  /* Statuts */
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #fb7185;

  /* Type */
  --font-sans: 'Inter Tight', 'SF Pro Display', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --font-display: 'Instrument Serif', 'Times New Roman', serif;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Shadows */
  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 0 0 1px var(--border);
  --shadow-neon: 0 0 0 1px rgba(74,222,128,0.4), 0 0 32px -8px var(--neon-glow);
}

/* Classe scopee hero : fallback nomme en 1er (pas de swap visible), Instrument Serif ensuite.
   Naffecte QUE lelement qui la porte explicitement (span .qll-hero-title), jamais --font-display. */
.qll-hero-serif-fallback {
  font-family: "Instrument Serif Fallback", "Instrument Serif", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: hidden;
}

/* Bruit de fond subtil */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1000px 600px at 10% -10%, rgba(74,222,128,0.08), transparent 50%),
    radial-gradient(800px 500px at 100% 20%, rgba(167,139,250,0.06), transparent 50%);
  z-index: 0;
}

/* Grille subtile */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 70%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }

::selection { background: var(--neon); color: #000; }

/* ——— Conteneur ——— */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

/* ——— Bouton ——— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-card-hover); border-color: #3a4757; }
.btn-primary {
  background: var(--neon);
  color: #041108;
  border-color: var(--neon);
  font-weight: 600;
  box-shadow: 0 0 24px -6px var(--neon-glow);
}
.btn-primary:hover {
  background: #5fe895;
  border-color: #5fe895;
  box-shadow: 0 0 32px -4px rgba(74,222,128,0.4);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--text); background: var(--bg-card); }

/* ——— Badge ——— */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  background: var(--bg-card);
  color: var(--text-dim);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-ok { color: var(--ok); border-color: rgba(74,222,128,0.3); background: rgba(74,222,128,0.08); }
.badge-warn { color: var(--warn); border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.08); }
.badge-bad { color: var(--bad); border-color: rgba(251,113,133,0.3); background: rgba(251,113,133,0.08); }
.badge-violet { color: var(--violet); border-color: rgba(167,139,250,0.3); background: rgba(167,139,250,0.08); }

/* ——— Card ——— */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: all 0.2s;
}
.card:hover { border-color: var(--border-strong); background: var(--bg-card-hover); }

/* ——— Inputs ——— */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-weight: 600;
  font-family: var(--font-mono);
}
.select, .input {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.15s;
  width: 100%;
  appearance: none;
}
.select:focus, .input:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px var(--neon-glow);
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239ba7b4' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* ——— Section ——— */
.section {
  padding: 100px 0;
  position: relative;
}
.section-tight { padding: 60px 0; }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neon);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--neon);
}
.section-title {
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.03em;
  max-width: 800px;
  font-weight: 400;
}
.section-title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--neon);
}
.section-subtitle {
  font-size: 18px;
  color: var(--text-dim);
  margin-top: 16px;
  max-width: 640px;
}

/* ——— Divider ——— */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 0;
}

/* ——— Utility ——— */
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-display); font-style: italic; }
.dim { color: var(--text-dim); }
.mute { color: var(--text-mute); }

/* Blink cursor */
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
.cursor { display: inline-block; width: 0.5em; height: 1em; background: var(--neon); vertical-align: text-bottom; animation: blink 1s infinite; margin-left: 2px; }

/* Glow pulse */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--neon-glow); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #3a4757; }

/* ============ RESPONSIVE MOBILE OVERRIDES ============ */
/* Safe-area iOS notch */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* iOS auto-zoom prevention on input focus */
@media (max-width: 768px) {
  input[type="text"],
  input[type="number"],
  input[type="search"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Tablette */
@media (max-width: 900px) {
  .section { padding: 64px 0; }
  .section-tight { padding: 40px 0; }
  .section-title { font-size: clamp(28px, 5.5vw, 44px); letter-spacing: -0.025em; }
  .section-subtitle { font-size: 16px; margin-top: 12px; }
  .card { padding: 20px; }
  .btn { min-height: 44px; padding: 10px 16px; }
  body { font-size: 15px; }
}

/* Mobile large */
@media (max-width: 720px) {
  .container { padding: 0 18px; }
  .section { padding: 48px 0; }
  .section-tight { padding: 32px 0; }
  .section-title { font-size: clamp(26px, 7.5vw, 40px); }
  .card { padding: 16px; border-radius: 12px; }
}

/* Mobile petit */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .section { padding: 36px 0; }
  .section-title { font-size: clamp(22px, 8vw, 32px); line-height: 1.15; }
  .section-eyebrow { font-size: 11px; margin-bottom: 12px; }
  .card { padding: 14px; }
  body { font-size: 14.5px; }
}

/* Tap target accessibility mobile (no-hover devices) */
@media (hover: none) and (max-width: 900px) {
  a.btn, button.btn { min-height: 44px; min-width: 44px; }
  nav a, nav button { min-height: 40px; }
}

/* Tables → scroll horizontal sur petit écran avec ombre indicative */
@media (max-width: 720px) {
  .scroll-x-mobile {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .scroll-x-mobile::-webkit-scrollbar { height: 6px; }
}

/* Section bottom-gradient line invisibility issues fix */
@media (max-width: 480px) {
  body::before { opacity: 0.6; } /* atténue le noise gradient sur petit écran */
}

/* ——————————————————————————————————————————————————————————————
   Footer SEO compact (2026-05-14 v2) — densification SANS troncature
   Tous les liens du footer (Modèles populaires, Guides populaires, Classements)
   restent visibles pour préserver le signal SEO (Google dévalue les liens
   cachés par overflow). Densification via : font 11px + padding réduit
   + gap minimal + multi-colonne CSS sur les listes longues. Hauteur totale
   du footer ~40-60 % de moins qu'avant grâce à la densification seule.
   —————————————————————————————————————————————————————————————— */
.seo-footer { padding: 28px 24px 18px !important; }
.seo-footer .seo-row { display: grid !important; grid-template-columns: 1fr 1.4fr !important; gap: 18px 24px; margin-bottom: 12px; }
@media (max-width: 720px) { .seo-footer .seo-row { grid-template-columns: 1fr !important; } }
.seo-footer .seo-block { margin-bottom: 14px !important; }
.seo-footer .seo-block h2 {
  font-size: 10.5px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8792a0 !important;
  margin: 0 0 7px 0 !important;
  font-weight: 600;
}
.seo-footer .seo-pills {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 3px 4px !important;
}
.seo-footer .seo-pills a {
  font-size: 11px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  line-height: 1.45 !important;
  background: rgba(74, 222, 128, 0.025);
  border: 1px solid rgba(74, 222, 128, 0.08) !important;
  color: #a6b2c0 !important;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.seo-footer .seo-pills a.wide {
  white-space: normal !important;
  max-width: 100%;
}
.seo-footer .seo-pills a:hover {
  background: rgba(74, 222, 128, 0.10);
  border-color: rgba(74, 222, 128, 0.30) !important;
  color: #e6edf3 !important;
}
.seo-footer .seo-bottom {
  margin-top: 10px !important;
  padding-top: 9px !important;
  font-size: 10.5px !important;
  color: #8b95a3 !important;
  border-top: 1px solid #1a1f27;
}

/* Hubs SEO : /guides /catalogue /comparateur ajoutent .seo-pills-full.
   Hérité dans le HTML par inject-internal-links.py. Aucun effet visuel
   différenciant — la classe sert juste de marqueur sémantique (pas de
   troncature ailleurs, donc rien à override). */
.seo-footer .seo-pills-full { /* no-op : tout est déjà full */ }

/* Mobile : encore plus dense */
@media (max-width: 720px) {
  .seo-footer { padding: 22px 14px 14px !important; }
  .seo-footer .seo-pills { gap: 3px !important; }
  .seo-footer .seo-pills a { font-size: 10.5px !important; padding: 2px 6px !important; }
  .seo-footer .seo-block h2 { font-size: 10px !important; }
  .seo-footer .seo-block { margin-bottom: 12px !important; }
}

/* a11y perfopt 2026-05-28 : spans meta atténués (opacity:0.6, #545b65 sur fond sombre = 2.9) -> couleur claire AA */
span[style*="opacity: 0.6"], span[style*="opacity:0.6"] {
  opacity: 1 !important;
  color: #9aa3b2 !important;
}

/* ——————————————————————————————————————————————————————————————
   CTA kit site-wide (qk-*) — PLAN-CTA-SITEWIDE-2026-09-05.md §2.
   Consommé par project/components/kit-cta.jsx (React) et lib/kit-cta.mjs (HTML statique) —
   garder les deux jumeaux en phase sur le markup si ces classes changent. Mobile-first,
   aucune hauteur fixe.
   —————————————————————————————————————————————————————————————— */

/* Ligne pack — 2e ligne sous chaque CTA kit ("ou tous les kits à vie — 49 € →") */
.qk-bundle-line { font-size: 13px; color: var(--text-dim); }
.qk-bundle-line a { color: var(--neon); font-weight: 600; text-decoration: none; }
.qk-bundle-line a:hover { text-decoration: underline; }

/* Strip — 1 ligne above-the-fold */
.qk-strip {
  display: block;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.4;
  text-decoration: none;
}
.qk-strip:hover { border-color: var(--neon); color: var(--text); }

/* Card — titre, pitch, puces, CTA + ligne pack, lien guide gratuit */
.qk-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.09), rgba(74, 222, 128, 0.02) 55%);
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin: 24px 0;
}
.qk-card-badge {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.5);
  display: grid;
  place-items: center;
  color: var(--neon);
  font-size: 15px;
  font-weight: 700;
}
.qk-card-body { min-width: 0; flex: 1; }
.qk-card-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.qk-card-text { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; margin: 0 0 10px; }
.qk-card-bullets {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 12px;
  padding: 0;
  font-size: 12px;
  color: var(--text-mute);
}
.qk-card-bullets li { display: flex; align-items: center; gap: 5px; }
.qk-card-bullets li::before { content: '·'; color: var(--neon); }
.qk-card-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.qk-card-cta {
  display: inline-block;
  background: var(--neon);
  color: #06120a;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  text-decoration: none;
}
.qk-card-guide { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--text-dim); }

/* Bandeau de fin — gamme complète + bouton bundle */
.qk-band {
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.05), var(--bg-card) 60%);
  border-radius: var(--r-xl);
  padding: 28px 22px;
  margin: 48px 0;
  text-align: center;
}
.qk-band-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.qk-band-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon);
}
.qk-band-title { font-size: 20px; font-weight: 500; color: var(--text); letter-spacing: -0.01em; }
.qk-band-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }
.qk-chip {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.qk-chip:hover { border-color: var(--neon); color: var(--text); }
.qk-chip-active { border-color: var(--neon); color: var(--text); background: rgba(74, 222, 128, 0.1); font-weight: 600; }
.qk-band-cta {
  display: inline-block;
  background: var(--neon);
  color: #04130a;
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: var(--r-md);
  text-decoration: none;
}

@media (min-width: 640px) {
  .qk-band { padding: 34px 32px; }
  .qk-band-head { flex-direction: row; align-items: baseline; gap: 10px; justify-content: center; }
}

/* Lead box — capture email « mémo » hors kit (matériel, guides/classements sans kit) — jumeau
   HTML de GuideMemoCapture (project/components/guide-page.jsx). lib/kit-cta.mjs::leadBoxHtml.
   PLAN-CTA-SITEWIDE-2026-09-05.md §3 P1. */
.qk-lead { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); padding: 20px 24px; margin: 32px 0; }
.qk-lead-eyebrow { font-family: var(--font-mono); font-size: 10px; color: var(--neon); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.qk-lead-title { font-size: 15.5px; font-weight: 600; color: var(--text); line-height: 1.4; margin: 0 0 6px; }
.qk-lead-text { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; margin: 0 0 14px; max-width: 640px; }
.qk-lead-form { display: flex; flex-wrap: wrap; gap: 10px; position: relative; }
.qk-lead-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.qk-lead-input { flex: 1 1 220px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 14px; }
.qk-lead-btn { padding: 11px 18px; border-radius: 10px; border: 0; background: var(--neon); color: #04130a; font-weight: 700; font-size: 14px; cursor: pointer; }
.qk-lead-msg { font-size: 12.5px; margin: 8px 0 0; }
.qk-lead-msg.ok { color: var(--neon); }
.qk-lead-msg.err { color: #ff9b92; }
.qk-lead-note { font-size: 11px; color: var(--text-mute); margin: 10px 0 0; }

/* === PERF-CV 2026-09-06 === Sections sous la ligne de flottaison : le navigateur saute leur style/layout tant
   qu'elles sont hors écran (accueil : Style & Layout 2,5 s sur mobile lab). Zéro impact SEO (HTML inchangé),
   ancres et scroll gérés nativement. `auto` conserve la taille rendue une fois affichée (pas de saut). */
.section { content-visibility: auto; contain-intrinsic-size: auto 900px; }
/* === /PERF-CV === */

/* Reserve the measured guide section size while its off-screen content is skipped. */
#guides.section { contain-intrinsic-size: auto 3400px; }
@media (max-width: 1100px) { #guides.section { contain-intrinsic-size: auto 4400px; } }
@media (max-width: 900px) { #guides.section { contain-intrinsic-size: auto 8600px; } }

/* Distinguish text links without relying on color alone. */
main p a { text-decoration: underline; }
