/**
 * blog.css — habillage sombre du blog public (/blog/).
 *
 * Reprend le vocabulaire de la page d'accueil (index.php) : mêmes tokens,
 * même police Figtree, même barre de navigation et même pied de page.
 * Chargé par blog/index.php et blog/article_template.php ; la barre et le
 * pied sont rendus par header_public.php et footer_public.php.
 */

:root {
  --bg: #0a0a0d;
  --bg-2: #0e0e12;
  --surface: #151519;
  --surface-2: #1c1c22;
  --surface-3: #232329;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);

  --accent: #e8202b;                 /* aplats décoratifs : pastilles, filets */
  --accent-fill: #dc1f2a;            /* fond des boutons : texte blanc à 4,9:1 */
  --accent-hover: #c41a24;
  --accent-text: #ff4d4d;            /* texte rouge : 5,6:1 sur --surface */
  --accent-soft: rgba(232, 32, 43, 0.13);
  --accent-ring: rgba(232, 32, 43, 0.34);
  --accent-glow: rgba(232, 32, 43, 0.30);

  --text: #f4f4f6;
  --text-muted: #a9a9b3;
  --text-subtle: #8a8a94;            /* 5,4:1 sur --bg (le #74747e de l'accueil est sous 4,5:1) */

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --maxw: 1180px;

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

/* La barre collante fait 69 px : un élément atteint au clavier ne doit pas passer dessous */
html { scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.ico { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 15px; line-height: 1;
  padding: 12px 20px; border-radius: var(--radius); border: 1px solid transparent;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.btn .ico { width: 17px; height: 17px; }
.btn-primary { background: var(--accent-fill); color: #fff; box-shadow: 0 6px 20px -8px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 12px 28px -10px var(--accent-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-soft { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-soft:hover { background: var(--surface-3); border-color: var(--border-strong); transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- Barre de navigation ---------- */
.bnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 13, 0.84);   /* ≥ 4,5:1 pour les liens même sur une vignette blanche */
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.bnav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.bnav-brand { display: flex; align-items: center; flex-shrink: 0; border-radius: 8px; }
.bnav-brand img { height: 34px; width: auto; }
.bnav-links { display: flex; align-items: center; gap: 4px; }
.bnav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; font-size: 15px; text-decoration: none;
  transition: color .15s ease, background .15s ease;
}
.bnav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.bnav-link.is-active { color: var(--text); }
.bnav-link.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -15px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
.bnav-links .btn { margin-left: 10px; }

/* ---------- Pied de page ---------- */
.bfoot { background: #08080a; border-top: 1px solid var(--border); padding: 64px 0 32px; margin-top: 96px; }
.bfoot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.bfoot-brand img { height: 30px; width: auto; margin-bottom: 16px; }
.bfoot-brand p { margin: 0; color: var(--text-muted); font-size: 14.5px; max-width: 34ch; }
.bfoot-social { display: flex; gap: 10px; margin-top: 20px; }
.bfoot-social a {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.bfoot-social a:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }
.bfoot-social svg { width: 17px; height: 17px; }
.bfoot-col h2 { margin: 0 0 18px; font-size: 14px; font-weight: 700; color: var(--text); }
.bfoot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.bfoot-col a {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--text-muted); font-size: 14.5px; text-decoration: none; transition: color .15s ease;
}
.bfoot-col a .ico { color: var(--text-subtle); }
.bfoot-col a:hover { color: var(--text); }
.bfoot-bottom {
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.bfoot-tbr { display: flex; align-items: center; gap: 10px; color: var(--text-subtle); font-size: 13px; text-decoration: none; }
.bfoot-tbr-tile {
  width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 9px; line-height: 1.05; text-align: center;
}
.bfoot-copy { margin: 0; color: var(--text-subtle); font-size: 13px; }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .bfoot-grid { grid-template-columns: 1fr 1fr; }
  .bfoot-brand { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .bnav-link { display: none; }
  .bnav-brand img { height: 30px; }
  .bfoot { margin-top: 64px; }
  .bfoot-grid { grid-template-columns: 1fr; }
}
