/* ============================================================
   LINUXBEGINNER.ORG — "Your First Steps Into Linux"
   CSS statique pur — ZERO Tailwind — Ultrasyd-inspired tech design
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- DESIGN TOKENS ---------------------------------------- */
:root {
  /* Couleurs primaires */
  --forge:        #1C1917;
  --ardoise:      #2D3748;
  --gris-chaud:   #6B7280;
  --craie:        #FAF9F7;
  --parchemin:    #EEF2FF;
  --ivoire:       #FFFDF8;
  --signal:       #1D4ED8;
  --signal-sombre:#1E3A8A;
  --signal-clair: #DBEAFE;
  --code-bg:      #0D1117;
  --vert-ok:      #16A34A;
  --ambre:        #D97706;
  --rouge-alerte: #DC2626;

  /* Opacités */
  --signal-80: rgba(29,78,216,.80);
  --signal-20: rgba(29,78,216,.20);
  --signal-10: rgba(29,78,216,.10);
  --signal-06: rgba(29,78,216,.06);
  --forge-80:  rgba(28,25,23,.80);
  --forge-40:  rgba(28,25,23,.40);
  --forge-20:  rgba(28,25,23,.20);
  --forge-10:  rgba(28,25,23,.10);
  --forge-06:  rgba(28,25,23,.06);

  /* Bordures et ombres */
  --border:      #E2E8F0;
  --border-warm: #CBD5E1;
  --shadow-sm: 0 1px 3px rgba(28,25,23,.08), 0 1px 2px rgba(29,78,216,.04);
  --shadow-md: 0 4px 12px rgba(28,25,23,.10), 0 2px 6px rgba(29,78,216,.06);
  --shadow-lg: 0 8px 32px rgba(28,25,23,.12), 0 4px 16px rgba(29,78,216,.08);

  /* Typographie */
  --ff-display: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
  --ff-body:    'Source Serif 4', Georgia, serif;
  --ff-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Mesures */
  --measure-article: 700px;
  --measure-wide:    1280px;
  --measure-hero:    1440px;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  /* Transitions */
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 250ms;
  --dur:      450ms;
  --dur-slow: 650ms;
}

/* ---- RESET ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-body);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.72;
  color: var(--forge);
  background: var(--ivoire);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; height: auto; }

/* === Anti-distorsion wrappers (CODEX REGLE 14) === */
.img-hero     { aspect-ratio: 16/9; overflow: hidden; }
.img-card     { aspect-ratio: 3/2;  overflow: hidden; }
.img-body     { aspect-ratio: 3/2;  overflow: hidden; }
.img-portrait { aspect-ratio: 1/1;  overflow: hidden; border-radius: 50%; }
.img-hero img, .img-card img, .img-body img, .img-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
/* ================================================== */

a { color: inherit; }
a:hover { text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, textarea, select { font: inherit; }

/* ---- TYPOGRAPHIE ------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--forge);
}
h1 { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2.125rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1.25rem; }
strong { font-weight: 700; color: var(--ardoise); }
em { font-style: italic; }

/* Kicker */
.kicker {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 0.75rem;
}

/* Lettrine premier paragraphe */
.article-body > p:first-of-type::first-letter {
  font-family: var(--ff-display);
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 0.85;
  float: left;
  margin-right: 0.1em;
  margin-top: 0.05em;
  color: var(--signal);
}

/* ---- LAYOUT ----------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--article {
  max-width: var(--measure-article);
}

/* ---- HEADER ----------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.site-header.scrolled {
  background: rgba(255,253,248,.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--forge);
  text-decoration: none;
}
.site-header.scrolled .site-logo { color: var(--forge); }
.site-header:not(.scrolled) .site-logo { color: var(--craie); }
.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--signal);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.site-header:not(.scrolled) .nav-link { color: rgba(255,253,248,.85); }
.site-header:not(.scrolled) .nav-link:hover { background: rgba(255,253,248,.12); color: white; }
.site-header.scrolled .nav-link { color: var(--ardoise); }
.site-header.scrolled .nav-link:hover { background: var(--signal-10); color: var(--signal); }

.nav-cta {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  background: var(--signal);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease);
}
.nav-cta:hover { background: var(--signal-sombre); color: white; }

/* Hamburger mobile */
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: all var(--dur-fast) var(--ease);
}
.site-header:not(.scrolled) .hamburger { color: white; }
.site-header.scrolled .hamburger { color: var(--forge); }

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--forge);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile .nav-link {
  color: var(--craie);
  font-size: 1.25rem;
}
.nav-mobile .nav-link:hover { color: var(--signal); background: transparent; }
.nav-mobile .nav-cta { font-size: 1rem; }
.nav-mobile-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--craie);
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
}

/* ---- HERO -------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-home { min-height: 100svh; }
.hero-article { min-height: 60vh; }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(28,25,23,.82) 0%, rgba(28,25,23,.55) 60%, rgba(29,78,216,.18) 100%);
}
.hero-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding: calc(64px + 3rem) var(--gutter) 3rem;
  width: 100%;
}
.hero-content .kicker { color: #93C5FD; }
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: white;
  max-width: 800px;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.hero-lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,253,248,.80);
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.6;
}
.hero-breadcrumb {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: rgba(255,253,248,.55);
  margin-bottom: 0.75rem;
}
.hero-breadcrumb a { color: inherit; text-decoration: none; }
.hero-breadcrumb a:hover { color: #93C5FD; }
.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: rgba(255,253,248,.60);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,253,248,.50);
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(6px); }
}

/* ---- CTA BUTTONS ------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease);
}
.btn-primary {
  background: var(--signal);
  color: white;
}
.btn-primary:hover { background: var(--signal-sombre); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,253,248,.40);
}
.btn-secondary:hover { border-color: white; background: rgba(255,253,248,.10); }
.btn-outline {
  background: transparent;
  color: var(--signal);
  border: 2px solid var(--signal);
}
.btn-outline:hover { background: var(--signal); color: white; }

/* ---- BADGES DIFFICULTÉ ------------------------------------ */
.badge-diff {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}
.badge-beginner     { background: rgba(22,163,74,.12);  color: #15803D; }
.badge-intermediate { background: rgba(217,119,6,.12);  color: #B45309; }
.badge-advanced     { background: rgba(220,38,38,.12);  color: #B91C1C; }

/* ---- BLOCS CODE ----------------------------------------------- */
pre, code {
  font-family: var(--ff-mono);
}
pre {
  background: var(--code-bg);
  color: #E2E8F0;
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.65;
  margin: 1.5rem 0;
  border-left: 3px solid var(--signal);
}
code:not(pre code) {
  background: var(--signal-06);
  color: var(--signal-sombre);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.875em;
}

/* ---- ARTICLE BODY ----------------------------------------- */
.article-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding: 3rem var(--gutter);
}
@media (min-width: 1024px) {
  .article-wrap { grid-template-columns: 220px 1fr; align-items: start; }
}

.article-summary {
  font-size: 1.125rem;
  font-style: italic;
  color: var(--ardoise);
  border-left: 4px solid var(--signal);
  padding: 1.25rem 1.5rem;
  background: var(--parchemin);
  border-radius: 0 10px 10px 0;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

.expert-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--parchemin);
  border: 1px solid var(--signal);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.expert-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--signal);
}
.expert-info { flex: 1; }
.expert-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--encre);
  margin: 0 0 0.2rem;
}
.expert-title {
  font-size: 0.875rem;
  color: var(--signal);
  margin: 0 0 0.5rem;
}
.expert-bio {
  font-size: 0.9rem;
  color: var(--ardoise);
  line-height: 1.55;
  margin: 0;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.78;
  color: var(--ardoise);
  max-width: var(--measure-article);
}
.article-body h2 {
  position: relative;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}
.article-body h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.article-body h2.visible::after { transform: scaleX(1); }
.article-body h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; }
.article-body ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-body ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-body a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--signal-sombre); }
.article-body blockquote {
  border-left: 4px solid var(--signal);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--parchemin);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--ardoise);
}
.article-body img {
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.article-body p:has(> img:only-child) { margin: 0; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.article-body th {
  background: var(--forge);
  color: var(--craie);
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--ff-display);
  font-size: 0.875rem;
}
.article-body td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); }
.article-body tr:nth-child(even) td { background: var(--parchemin); }

/* Callout "Tip" */
.tip-box {
  background: var(--parchemin);
  border-left: 4px solid var(--signal);
  border-radius: 0 12px 12px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  position: relative;
}
.tip-box::before {
  content: '> TIP';
  display: block;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--signal);
  margin-bottom: 0.5rem;
}

/* ---- TOC --------------------------------------------------- */
/* Fallback: when no TOC present, article spans full width */
@media (min-width: 1024px) {
  .article-wrap:not(:has(.toc)) > * { grid-column: 1 / -1; }
}

.toc {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 1.25rem;
  background: var(--craie);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.875rem;
}
.toc-title {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gris-chaud);
  margin-bottom: 0.75rem;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 0.4rem; }
.toc-list a {
  color: var(--ardoise);
  text-decoration: none;
  font-family: var(--ff-display);
  transition: color var(--dur-fast);
  display: block;
  padding: 0.2rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
}
.toc-list a:hover { color: var(--signal); border-left-color: var(--signal); }
@media (max-width: 1023px) { .toc { display: none; } }

/* ---- FAQ --------------------------------------------------- */
.faq-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}
.faq-title {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--forge);
  background: var(--craie);
  cursor: pointer;
  transition: background var(--dur-fast);
  gap: 1rem;
}
.faq-question:hover { background: var(--parchemin); }
.faq-item.open .faq-question { background: var(--parchemin); color: var(--signal); }
.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--signal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--signal);
  transition: transform var(--dur-fast) var(--ease);
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding: 1rem 1.25rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--ardoise);
  line-height: 1.7;
  background: var(--ivoire);
}
.faq-item.open .faq-answer { display: block; }

/* ---- CARDS ------------------------------------------------- */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.guide-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.guide-card-img {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--parchemin);
}
.guide-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur) var(--ease);
}
.guide-card:hover .guide-card-img img { transform: scale(1.05); }
.guide-card-body {
  padding: 1.25rem;
}
.guide-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--forge);
}
.guide-card-body p {
  font-size: 0.875rem;
  color: var(--gris-chaud);
  margin: 0;
  line-height: 1.5;
}
.guide-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: var(--gris-chaud);
}

/* ---- BLOG LISTING ------------------------------------------ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.blog-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.blog-card-img {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--parchemin);
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur) var(--ease);
}
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-body { padding: 1.25rem; }
.blog-card-body .kicker { font-size: 0.65rem; margin-bottom: 0.4rem; }
.blog-card-body h2, .blog-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--forge);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.blog-card-body p {
  font-size: 0.85rem;
  color: var(--gris-chaud);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-date {
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--border);
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: var(--gris-chaud);
}

/* ---- BLOG FILTER --------------------------------------------- */
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  background: transparent;
  color: var(--gris-chaud);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--signal);
  border-color: var(--signal);
  color: #fff;
}
.blog-card.hidden { display: none; }

/* ---- "A WEEK WITH" SÉRIE ---- */
.week-series-badge {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--code-bg);
  color: var(--signal);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--signal-20);
}

/* ---- RELATED ---------------------------------------------- */
.related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}
.related-title {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gris-chaud);
  margin-bottom: 1rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.related-card {
  background: var(--craie);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  text-decoration: none;
  color: var(--forge);
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--dur-fast) var(--ease);
}
.related-card:hover { background: var(--signal-10); border-color: var(--signal-20); color: var(--signal); }

/* ---- SECTIONS HOMEPAGE ------------------------------------ */
.section { padding: 5rem 0; }
.section--dark {
  background: var(--forge);
  color: var(--craie);
}
.section--parchemin { background: var(--parchemin); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header .kicker { display: block; }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.section-lead {
  font-size: 1.075rem;
  color: var(--gris-chaud);
  max-width: 600px;
  margin-inline: auto;
}
.section--dark .section-title { color: white; }
.section--dark .section-lead { color: rgba(255,253,248,.65); }

/* Section immersive */
.section-immersive {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
}
.section-immersive .hero-bg { position: absolute; }
.section-immersive .hero-overlay { position: absolute; opacity: 0.88; }
.section-immersive-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin-inline: auto;
  text-align: center;
  padding-inline: var(--gutter);
}
.section-immersive-content h2 { color: white; margin-bottom: 1rem; }
.section-immersive-content p { color: rgba(255,253,248,.75); margin-bottom: 1.75rem; font-size: 1.075rem; }

/* ---- HOMEPAGE SIDEBAR LAYOUT ------------------------------ */
.hp-guides-wrapper {
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: clamp(2rem, 5vw, 4rem);
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}
.hp-sidebar {
  width: 220px;
  flex-shrink: 0;
}
.hp-sidebar-sticky {
  position: sticky;
  top: 80px;
}
.hp-sidebar-title {
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gris-chaud);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.hp-sidebar-list { display: flex; flex-direction: column; gap: 0; }
.hp-sidebar-item {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gris-chaud);
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  transition: color var(--dur-fast), background var(--dur-fast);
  display: block;
  line-height: 1.3;
}
.hp-sidebar-item:hover { color: var(--signal); background: var(--signal-10); text-decoration: none; }
.hp-sidebar-item.active { color: var(--signal); font-weight: 500; }
.hp-guides-main { flex: 1; min-width: 0; }

/* ---- CONTACT --------------------------------------------- */
.contact-wrap {
  max-width: 640px;
  margin: 4rem auto;
  padding-inline: var(--gutter);
}
.contact-form {
  background: var(--parchemin);
  border: 1px solid var(--border-warm);
  border-radius: 16px;
  padding: 2.5rem;
}
.contact-form h1 { margin-bottom: 0.5rem; }
.contact-form p { color: var(--gris-chaud); margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  color: var(--ardoise);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--forge);
  font-size: 1rem;
  transition: border-color var(--dur-fast);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--signal);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-submit {
  width: 100%;
  padding: 0.85rem;
  background: var(--signal);
  color: white;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.form-submit:hover { background: var(--signal-sombre); }

/* ---- FOOTER ----------------------------------------------- */
.site-footer {
  background: var(--forge);
  color: var(--craie);
  padding: 4rem 0 2rem;
}
.footer-inner {
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.footer-brand h3 {
  color: white;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255,253,248,.50);
  line-height: 1.6;
  margin: 0;
}
.footer-col h4 {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,253,248,.40);
  margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a {
  font-family: var(--ff-display);
  font-size: 0.9375rem;
  color: rgba(255,253,248,.65);
  text-decoration: none;
  transition: color var(--dur-fast);
}
.footer-col a:hover { color: var(--signal); }
.footer-bottom {
  border-top: 1px solid rgba(255,253,248,.10);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: rgba(255,253,248,.35);
}
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--signal); }

/* ---- PLAN DU SITE ----------------------------------------- */
.sitemap-wrap {
  max-width: var(--measure-article);
  margin: 3rem auto;
  padding-inline: var(--gutter);
}
.sitemap-section { margin-bottom: 2.5rem; }
.sitemap-section h2 { margin-bottom: 1rem; font-size: 1.25rem; }
.sitemap-section ul { list-style: none; }
.sitemap-section li { border-bottom: 1px solid var(--border); }
.sitemap-section a {
  display: block;
  padding: 0.6rem 0;
  color: var(--signal);
  text-decoration: none;
  font-family: var(--ff-display);
  font-size: 0.9375rem;
}
.sitemap-section a:hover { text-decoration: underline; }

/* ---- LEGAL / ABOUT / 404 ---------------------------------- */
.legal-wrap, .about-wrap {
  max-width: var(--measure-article);
  margin: 3rem auto;
  padding-inline: var(--gutter);
  padding-bottom: 4rem;
}
.legal-wrap h1, .about-wrap h1 { margin-bottom: 2rem; }
.legal-wrap h2, .about-wrap h2 { margin-top: 2rem; margin-bottom: 0.75rem; font-size: 1.25rem; }

.error-wrap {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem var(--gutter);
}
.error-code {
  font-family: var(--ff-display);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 800;
  color: var(--signal-10);
  line-height: 1;
  margin-bottom: -1rem;
  position: relative;
}
.error-code::after {
  content: '404';
  position: absolute;
  inset: 0;
  color: var(--signal);
  opacity: 0.15;
}

/* ---- ANIMATIONS REVEAL ------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---- UTILITAIRES ------------------------------------------ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* ---- RESPONSIVE ------------------------------------------ */
@media (max-width: 1200px) {
  .hp-guides-wrapper { gap: 2rem; }
}
@media (max-width: 1023px) {
  .hp-sidebar { display: none; }
  .hp-guides-wrapper { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .guides-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-content { padding-top: calc(64px + 2rem); }
}
