/* QuelLLM.fr — Design System */
/* ------ 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);
}

* { 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: #6b7280 !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; }
}


/* CLS fix 2026-05-23 — bllmf-hero-glow shifts at paint */
.bllmf-hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  min-height: 100%;
  contain: strict;
}

/* Header responsive 2026-05-26 (hamburger) — the center nav had no mobile rule and
   overflowed off-screen below ~720px. On mobile we hide the inline nav + CTAs and
   expose a hamburger that opens a slide-in drawer (built by /js/nav-mobile.js).
   Desktop is untouched. */
.bllmf-burger { display: none; }
.bllmf-drawer { display: none; }
@media (max-width: 720px) {
  header .container { display: flex !important; justify-content: space-between !important; align-items: center !important; gap: 12px !important; }
  header .nav-links { display: none !important; }
  header .bllmf-cta-wrap { display: none !important; }
  .bllmf-burger {
    display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; width: 44px; height: 44px; padding: 0; flex: none;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 9px; cursor: pointer;
  }
  .bllmf-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .25s ease, opacity .2s ease; }
  .bllmf-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .bllmf-burger.is-open span:nth-child(2) { opacity: 0; }
  .bllmf-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .bllmf-drawer {
    display: block; position: fixed; inset: 0; z-index: 200;
    background: rgba(7,9,12,0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  .bllmf-drawer.is-open { opacity: 1; pointer-events: auto; }
  .bllmf-drawer-panel {
    position: absolute; top: 0; right: 0; height: 100%; width: min(80vw, 300px);
    display: flex; flex-direction: column; gap: 2px; padding: 84px 22px 28px;
    background: var(--bg-elev); border-left: 1px solid var(--border);
    box-shadow: -24px 0 60px rgba(0,0,0,0.55);
    transform: translateX(100%); transition: transform .25s ease; overflow-y: auto;
  }
  .bllmf-drawer.is-open .bllmf-drawer-panel { transform: translateX(0); }
  .bllmf-drawer-panel a { color: var(--text); text-decoration: none; font-size: 17px; padding: 13px 4px; border-bottom: 1px solid var(--border); }
  .bllmf-drawer-cta { margin-top: 14px; border: 1px solid var(--border-strong) !important; border-radius: 10px; text-align: center; font-weight: 500; }
  .bllmf-drawer-cta.primary { margin-top: 16px; background: var(--neon); color: #04140a !important; border-color: var(--neon) !important; font-weight: 600; }
}
