/* ================================================================
   KiloDelta — site web
   Palette + typographie alignées sur le brand pack et l'app mobile.
   Navy #0A1628 · Surface #11203A · Cyan #4FC3F7 · Fire #FF6B35
   ================================================================ */

/* ----------------------------------------------------------------
   Fonts auto-hébergées (sous-ensemble latin uniquement).
   Pas de Google Fonts CDN : meilleure perf (pas de DNS+TLS tiers)
   et conformité RGPD (pas de transfert d'IP utilisateur vers
   fonts.gstatic.com). font-display: swap = texte affiché
   immédiatement avec font système, swappé quand Inter est chargée.
   Inter 400/600/700/800 (préchargées) sont déclarées dans critical.css ;
   ici ne restent que les graisses non critiques (Inter 500, JetBrains Mono).
   ---------------------------------------------------------------- */

/* Lien "Voir le détail →" en bas de chaque carte module sur la home.
   Pousse le visiteur vers la landing page dédiée du module. */
.module-link {
  display: inline-block;
  margin-top: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease;
}
.module-link:hover { border-bottom-color: var(--accent); }

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-600.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-700.woff2') format('woff2');
}

:root {
  --navy: #0A1628;
  --surface: #11203A;
  --surface-elev: #1B2A44;
  --border: #1F2D45;
  --border-strong: #2E4366;
  --text: #E6EDF6;
  --text-muted: #9AA8BC;
  /* --text-dim : couleur la plus claire de la palette, utilisée pour les
     labels secondaires (.spec-row .label, footer copyright). Ancienne valeur
     #5E6E85 donnait un ratio 3.3:1 sur --surface (FAIL WCAG AA).
     #8FA0B6 donne 5.4:1 sur --surface et 6.4:1 sur le footer #07101e — AA
     validé partout tout en restant visuellement plus pâle que --text-muted. */
  --text-dim: #8FA0B6;
  --accent: #4FC3F7;
  --accent-dim: #2E7CA8;
  --fire: #FF6B35;
  --warn: #FFA726;
  --success: #34C759;
  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 1180px;
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--text);
}

/* Liens dans du texte courant (paragraphes, listes, lead) — soulignés pour
   les rendre identifiables sans recourir uniquement à la couleur (WCAG 1.4.1).
   Les liens de navigation (.nav, .nav-drawer), les boutons (.btn), les cartes
   cliquables (.module-link, .card) et les liens du footer overrident ce default
   plus bas. */
p a,
li a,
.lead a,
dd a,
.kd-form a,
.section-eyebrow + p a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
p a:hover,
li a:hover,
.lead a:hover,
dd a:hover {
  text-decoration-thickness: 2px;
}

.mono {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  letter-spacing: 0.04em;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ──────────────────────────────────────────────────────────────────
   Header
   ────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.05em;
}
/* Wordmark transparent du brand pack — viewBox 600×120 (ratio 5:1).
   À 44 px de haut → ~220 px de large, lisible sur tous écrans. */
.brand img {
  height: 44px;
  width: auto;
  display: block;
}
@media (max-width: 540px) {
  .brand img {
    height: 36px;
  }
  .site-header .row {
    height: 64px;
  }
}
.nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
}

/* ──────────────────────────────────────────────────────────────────
   Hero
   ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(79, 195, 247, 0.18), transparent 50%),
    radial-gradient(ellipse at 90% 90%, rgba(255, 107, 53, 0.12), transparent 60%);
  pointer-events: none;
}
.hero .grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
}
.hero h1 {
  font-size: 56px;
  line-height: 1.05;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero h1 .accent {
  color: var(--accent);
}
.hero .lead {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 560px;
}
.hero .ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--navy);
}
.btn-primary:hover {
  background: #82d1ff;
  color: var(--navy);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ──────────────────────────────────────────────────────────────────
   Formulaire (page support)
   ────────────────────────────────────────────────────────────────── */
.kd-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.kd-form label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.kd-form input,
.kd-form textarea,
.kd-form select {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
.kd-form textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.55;
}
/* Selects : on retire le rendu natif (qui rend le contrôle plus étroit
   et hors-thème sur Safari/WebKit) et on dessine une flèche SVG inline
   à droite. Padding-right généreux pour libérer la zone de la flèche. */
.kd-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%239AA8BC' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='1 1.5 6 6.5 11 1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
.kd-form select::-ms-expand { display: none; }
.kd-form select option {
  background: var(--surface);
  color: var(--text);
}
.kd-form input:focus,
.kd-form textarea:focus,
.kd-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(122, 200, 255, 0.18);
}
.kd-form .form-err {
  color: var(--fire);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}
/* Helper labels mono-uppercase pour les formulaires modernes (feedback,
   verify) qui n'utilisent pas .form-row mais des <label><span>label</span>...</label>
   inline. Reproduit le style des labels classiques. */
.kd-form > label > span:first-child,
.kd-form details > div > label > span:first-child {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

/* ──────────────────────────────────────────────────────────────────
   Mockup mobile (placeholder de l'app sur smartphone)
   ────────────────────────────────────────────────────────────────── */

/* Bloc qui héberge le device — fond carroyé tactique avec fade radial. */
.device-stage {
  position: relative;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.device-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 195, 247, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 195, 247, 0.10) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center;
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    black 35%,
    transparent 78%
  );
  mask-image: radial-gradient(
    ellipse at center,
    black 35%,
    transparent 78%
  );
  pointer-events: none;
  z-index: -1;
}
/* Halo cyan diffus derrière le téléphone pour souligner la profondeur. */
.device-stage::after {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(79, 195, 247, 0.20) 0%,
    rgba(255, 107, 53, 0.08) 40%,
    transparent 70%
  );
  filter: blur(24px);
  pointer-events: none;
  z-index: -1;
}

/* Mockup mobile — l'image contient déjà son propre châssis (rendu shots.so),
   donc pas de cadre/notch CSS supplémentaire. On laisse juste un drop-shadow
   et un sizing responsive. */
.device-mockup {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55))
          drop-shadow(0 0 24px rgba(79, 195, 247, 0.18));
  pointer-events: none;
  user-select: none;
}

/* Figure walking ray sur la page méthodologie : flottée à droite du texte
   en desktop, empilée au-dessus du texte en mobile. */
.walking-ray-figure {
  float: right;
  width: 260px;
  max-width: 40%;
  margin: 4px 0 12px 24px;
  text-align: center;
}
.walking-ray-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.walking-ray-figure figcaption {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
}

/* Figure mockup de module flottée à droite du texte (utilisée sur /carte
   et autres pages module pour illustrer une fonctionnalité). L'image
   contient déjà son châssis téléphone — pas de cadre supplémentaire. */
.module-figure {
  float: right;
  width: 220px;
  max-width: 38%;
  margin: 4px 0 16px 28px;
  text-align: center;
}
.module-figure img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45))
          drop-shadow(0 0 16px rgba(79, 195, 247, 0.14));
}
.module-figure figcaption {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 10px;
}

@media (max-width: 720px) {
  .walking-ray-figure,
  .module-figure {
    float: none;
    width: 100%;
    max-width: 280px;
    margin: 12px auto 20px;
  }
}

/* Loupe au survol — version "lightbox-on-hover" : au passage de la souris,
   un overlay fixe centré dans le viewport affiche le PNG source à grande
   taille (qualité native, pas un upscale CSS d'un thumbnail).
   Le PNG est lu via la variable CSS --zoom-src définie en inline sur la
   figure parente. Désactivé sur pointer tactile. */
.zoom-on-hover {
  cursor: zoom-in;
}
.walking-ray-figure,
.module-figure {
  position: relative;
}
.walking-ray-figure::after,
.module-figure::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(85vw, 580px);
  height: min(85vh, 1200px);
  background-image: var(--zoom-src);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 20px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.75),
              0 0 0 1px rgba(79, 195, 247, 0.25);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1000;
}
.walking-ray-figure:hover::after,
.module-figure:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
/* Léger feedback sur le thumbnail au survol (pas de scale, juste un peu
   d'élévation pour signaler l'interaction). */
.walking-ray-figure:hover .zoom-on-hover,
.module-figure:hover .zoom-on-hover {
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.55))
          drop-shadow(0 0 18px rgba(79, 195, 247, 0.28));
  transition: filter 0.2s ease;
}
/* Sur tactile / petit écran : pas d'overlay, le tap ouvre le PNG nativement
   via le navigateur. */
@media (hover: none), (max-width: 720px) {
  .walking-ray-figure::after,
  .module-figure::after {
    display: none;
  }
  .zoom-on-hover {
    cursor: default;
  }
}

/* ──────────────────────────────────────────────────────────────────
   Sections génériques
   ────────────────────────────────────────────────────────────────── */
section {
  padding: 80px 0;
}
section.alt {
  background: linear-gradient(180deg, var(--navy) 0%, #0c1d36 100%);
}
.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 700;
}
.section-title {
  font-size: 36px;
  line-height: 1.15;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-subtitle {
  color: var(--text-muted);
  margin: 0 0 48px;
  font-size: 16px;
  max-width: 720px;
}

/* ──────────────────────────────────────────────────────────────────
   Modules grid
   ────────────────────────────────────────────────────────────────── */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.module-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.module-card .num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.module-card h3 {
  margin: 6px 0 8px;
  font-size: 19px;
  font-weight: 700;
}
.module-card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}
.module-card .tags {
  margin-top: 14px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.module-card .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(79, 195, 247, 0.10);
  color: var(--accent);
  border: 1px solid rgba(79, 195, 247, 0.3);
}

/* ──────────────────────────────────────────────────────────────────
   Workflow 3-steps
   ────────────────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.step {
  position: relative;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step .num {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--navy);
  border-radius: 50%;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
}
.step h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* ──────────────────────────────────────────────────────────────────
   Specs (côte-à-côte)
   ────────────────────────────────────────────────────────────────── */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.spec-row {
  background: var(--surface);
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.spec-row .label {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.spec-row .value {
  margin-top: 4px;
  font-weight: 700;
  font-size: 15px;
}

/* ──────────────────────────────────────────────────────────────────
   FAQ
   ────────────────────────────────────────────────────────────────── */
.faq-list {
  max-width: 820px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  font-size: 18px;
  color: var(--accent);
  font-weight: 800;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item .answer {
  padding: 0 18px 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ──────────────────────────────────────────────────────────────────
   Footer
   ────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 24px;
  font-size: 12px;
  color: var(--text-dim);
  background: #07101e;
}
.site-footer .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.site-footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
/* Colonne « Modules » : une ligne de liens vers chaque page module, au-dessus
   de la ligne copyright / liens généraux. Même typo et mêmes couleurs que
   les liens du pied de page. */
.site-footer .footer-modules {
  display: flex;
  align-items: baseline;
  gap: 10px 18px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.site-footer .footer-h {
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-right: 6px;
}
.site-footer .footer-modules ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer a {
  color: var(--text-muted);
  font-weight: 500;
}
.site-footer a:hover {
  color: var(--text);
}

/* ──────────────────────────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .hero {
    padding: 64px 0 48px;
  }
  .hero .grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero h1 {
    font-size: 40px;
  }
  .section-title {
    font-size: 28px;
  }
  section {
    padding: 56px 0;
  }
}
@media (max-width: 540px) {
  .nav {
    display: none;
  }
  .hero h1 {
    font-size: 32px;
  }
  .device-mockup {
    max-width: 200px;
  }
}

/* ══ Bandeau d'annonce (Paramètres → Réglages généraux) ══ */
.kd-announce{padding:10px 0;font-size:14px;font-weight:600;text-align:center}
.kd-announce-info{background:#0e2a44;color:#9fd4f5;border-bottom:1px solid #1F2D45}
.kd-announce-warn{background:#3a2410;color:#FFC58A;border-bottom:1px solid #5a3a16}
/* ══════════════════════════════════════════════════════════════════════
   HOME — refonte : stats dynamiques, carte live mise en avant, articles,
   Instagram. Responsive, sans dépendance. (features/home-refonte)
   ══════════════════════════════════════════════════════════════════════ */
.kd-stats-band{border-top:1px solid var(--border);border-bottom:1px solid var(--border);background:var(--surface)}
.kd-stats{display:grid;grid-template-columns:repeat(4,1fr)}
.kd-stat{padding:22px 14px;text-align:center;border-right:1px solid var(--border)}
.kd-stat:last-child{border-right:0}
.kd-stat .n{font-size:28px;font-weight:800;color:var(--accent);line-height:1;font-variant-numeric:tabular-nums}
.kd-stat .l{font-size:11px;color:var(--text-muted);margin-top:6px;letter-spacing:.02em}

/* Carte live mise en avant */
.kd-live-wrap{display:grid;grid-template-columns:1fr 1.05fr;gap:26px;align-items:center}
.kd-live{position:relative;display:block;border-radius:var(--radius-lg,16px);overflow:hidden;border:1px solid var(--border);
 min-height:260px;text-decoration:none;background:radial-gradient(120% 120% at 30% 20%,#16324f,#0c1c30 60%,#08121f)}
.kd-live-grid{position:absolute;inset:0;background-image:linear-gradient(rgba(79,195,247,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(79,195,247,.06) 1px,transparent 1px);background-size:26px 26px}
.kd-live-badge{position:absolute;top:14px;left:14px;z-index:3;font-size:11px;font-weight:800;letter-spacing:.5px;color:#fff;background:rgba(255,107,53,.95);padding:5px 11px;border-radius:999px;display:flex;align-items:center;gap:7px}
.kd-live-badge .d{width:7px;height:7px;border-radius:50%;background:#fff;animation:kdBlink 1.2s infinite}
.kd-live-cap{position:absolute;left:0;right:0;bottom:0;z-index:3;padding:16px;font-size:12px;color:var(--text-muted);background:linear-gradient(transparent,rgba(6,15,26,.92))}
.kd-fire{position:absolute;width:11px;height:11px;border-radius:50%;background:var(--fire);z-index:2;animation:kdPulse 2s infinite}
@keyframes kdPulse{0%{box-shadow:0 0 0 0 rgba(255,107,53,.55)}70%{box-shadow:0 0 0 15px rgba(255,107,53,0)}100%{box-shadow:0 0 0 0 rgba(255,107,53,0)}}
@keyframes kdBlink{50%{opacity:.35}}

/* Articles */
.kd-arts{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:18px}
.kd-art{display:block;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius,10px);padding:16px;text-decoration:none;color:var(--text);transition:border-color .18s,transform .18s}
.kd-art:hover{border-color:var(--accent);transform:translateY(-2px)}
.kd-art h3{font-size:15px;font-weight:700;line-height:1.3;margin:9px 0 7px}
.kd-art p{font-size:13px;color:var(--text-muted);line-height:1.55;margin:0}
.kd-art-m{font-size:11px;color:var(--text-muted);margin-top:12px}

/* Instagram reels */
.kd-reels{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:18px}
.kd-reel{position:relative;display:block;aspect-ratio:9/16;border-radius:var(--radius,10px);overflow:hidden;border:1px solid var(--border);background:#0c1c30;text-decoration:none}
.kd-reel img{width:100%;height:100%;object-fit:cover;display:block}
.kd-reel-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:30px;color:rgba(255,255,255,.92);text-shadow:0 2px 8px rgba(0,0,0,.5)}
.kd-reel-cap{position:absolute;left:0;right:0;bottom:0;padding:10px;font-size:11px;color:#fff;background:linear-gradient(transparent,rgba(6,15,26,.92))}

@media (max-width:820px){
  .kd-live-wrap{grid-template-columns:1fr}
  .kd-stats{grid-template-columns:repeat(2,1fr)}
  .kd-stat:nth-child(2){border-right:0}
  .kd-arts{grid-template-columns:1fr}
  .kd-reels{grid-template-columns:repeat(2,1fr)}
}

/* ══ HOME v2 — héro animé + explorateur de modules ══ */
.hero .container{position:relative;z-index:2}
.kd-aurora{position:absolute;inset:-30%;z-index:1;pointer-events:none;
 background:radial-gradient(38% 38% at 20% 30%,rgba(79,195,247,.20),transparent 60%),
 radial-gradient(34% 34% at 82% 22%,rgba(255,107,53,.16),transparent 60%),
 radial-gradient(42% 42% at 62% 82%,rgba(79,195,247,.12),transparent 60%);
 filter:blur(24px);animation:kdDrift 16s ease-in-out infinite alternate}
@keyframes kdDrift{0%{transform:translate(0,0) scale(1)}100%{transform:translate(4%,3%) scale(1.14)}}
.kd-ember{position:absolute;bottom:40px;width:4px;height:4px;border-radius:50%;background:var(--fire);z-index:1;opacity:0;pointer-events:none;box-shadow:0 0 8px rgba(255,107,53,.7);animation:kdRise 7s linear infinite}
@keyframes kdRise{0%{transform:translateY(0);opacity:0}12%{opacity:.9}100%{transform:translateY(-320px);opacity:0}}
.kd-grad{background:linear-gradient(90deg,#4FC3F7,#FF6B35);-webkit-background-clip:text;background-clip:text;color:transparent}

.kd-expl-hint{color:var(--accent);font-weight:600}
.kd-expl{display:grid;grid-template-columns:280px 1fr;gap:18px;margin-top:22px;border:1px solid var(--border);border-radius:16px;overflow:hidden;background:var(--navy)}
.kd-mod-list{border-right:1px solid var(--border);max-height:460px;overflow:auto}
.kd-mod-item{display:block;width:100%;text-align:left;background:none;padding:12px 14px;cursor:pointer;border:0;border-bottom:1px solid rgba(31,45,77,.6);transition:background .15s}
.kd-mod-item:hover{background:var(--surface)}
.kd-mod-item.kd-on{background:linear-gradient(90deg,rgba(79,195,247,.14),transparent);border-left:3px solid var(--accent);padding-left:11px}
.kd-mod-item .knum{display:block;font-size:10px;color:var(--text-muted);letter-spacing:.5px;font-weight:800}
.kd-mod-item .knm{display:block;font-size:13px;font-weight:700;color:var(--text);margin-top:2px}
.kd-mod-panels{padding:8px 6px}
.kd-mod-panels .module-card{display:none;border:0;background:transparent;margin:0;padding:16px 20px}
.kd-mod-panels .module-card.kd-on{display:block;animation:kdFade .25s ease}
.kd-mod-panels .module-card:hover{transform:none}
@keyframes kdFade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

@media(prefers-reduced-motion:reduce){.kd-aurora,.kd-ember{animation:none}.kd-ember{display:none}.kd-mod-panels .module-card.kd-on{animation:none}}
@media(max-width:820px){.kd-expl{grid-template-columns:1fr}.kd-mod-list{max-height:210px}}

/* ══ HOME v2b — bento (carte live + chiffres) + reveal au scroll ══ */
.kd-bento{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:1fr;gap:14px;margin-top:22px}
.kd-b-map{grid-column:span 2;grid-row:span 2;min-height:340px}
.kd-b-map-cap{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;flex-direction:column;gap:3px;padding:16px 18px;background:linear-gradient(to top,rgba(10,22,40,.94),rgba(10,22,40,0))}
.kd-b-map-cap strong{font-size:16px;color:var(--text)}
.kd-b-map-cap span{font-size:12.5px;color:var(--text-muted)}
.kd-b-stat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:18px 14px;text-align:center;background:var(--surface-elev);border:1px solid var(--border);border-radius:var(--radius-lg);transition:transform .18s ease,border-color .18s ease}
.kd-b-stat:hover{transform:translateY(-3px);border-color:var(--accent)}
.kd-b-stat .n{font-size:32px}
.kd-b-stat .l{margin-top:0;font-size:12.5px;line-height:1.35}
@media(max-width:820px){
  .kd-bento{grid-template-columns:1fr 1fr}
  .kd-b-map{grid-column:span 2;grid-row:auto;min-height:210px}
  .kd-b-stat .n{font-size:26px}
}

.reveal{opacity:0;transform:translateY(18px);transition:opacity .6s ease,transform .6s ease;will-change:opacity,transform}
.reveal.reveal-in{opacity:1;transform:none}
@media(prefers-reduced-motion:reduce){.reveal{opacity:1;transform:none;transition:none}}
