@charset "UTF-8";
/*
Theme Name: WP Admin Lab — Tech Blog
Description: Blog WordPress, sécurité, performance web et data
Version: 2.0.0
Requires PHP: 8.3
*/

/* ═══════════════════════════════════════
   DESIGN TOKENS — Tech Blog v2
   ═══════════════════════════════════════ */
:root {
  /* Brand — WordPress/Ops blue */
  --brand-50: #eef6ff;
  --brand-100: #dceeff;
  --brand-200: #b8dcff;
  --brand-300: #84c5ff;
  --brand-400: #43a8f5;
  --brand-500: #1687d9;
  --brand-600: #0d6fb8;
  --brand-700: #0b5b96;
  --brand-800: #0c4a78;
  --brand-900: #102f48;

  /* Accent — Amber/Orange */
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;

  /* Neutrals */
  --gray-0: #ffffff;
  --gray-25: #fafafa;
  --gray-50: #f5f5f5;
  --gray-75: #f0f0f0;
  --gray-100: #e8e8e8;
  --gray-200: #d6d6d6;
  --gray-300: #b8b8b8;
  --gray-400: #9e9e9e;
  --gray-500: #787878;
  --gray-600: #5c5c5c;
  --gray-700: #3d3d3d;
  --gray-800: #212121;
  --gray-900: #111111;

  /* Semantic */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --error: #ef4444;
  --error-bg: #fef2f2;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;
  --fs-5xl: 3rem;

  /* Spacing — 4px grid */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-14: 3.5rem;
  --s-16: 4rem;
  --s-20: 5rem;
  --s-24: 6rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.06), 0 4px 10px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.08), 0 8px 20px rgba(0,0,0,.04);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms;
  --dur-normal: 250ms;
  --dur-slow: 400ms;

  /* Layout */
  --max-width: 1200px;
  --content-width: 720px;
}

/* ═══════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--gray-800);
  background: var(--gray-0);
}

::selection { background: var(--brand-200); color: var(--brand-900); }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700; line-height: 1.2; color: var(--gray-900);
  letter-spacing: 0;
}
h1 { font-size: var(--fs-5xl); letter-spacing: 0; }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }

p { margin-bottom: var(--s-4); color: var(--gray-600); }

a { color: var(--brand-600); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--brand-700); }

img { max-width: 100%; height: auto; display: block; }

/* ═══════════════════════════════════════
   GRADIENTS
   ═══════════════════════════════════════ */
.gradient-text {
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 58%, var(--accent-500) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-accent {
  background: linear-gradient(135deg, var(--accent-500), #f97316);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════
   CONTAINER
   ═══════════════════════════════════════ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--s-6); }
.container-sm { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--s-6); }

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5); font-size: var(--fs-sm); font-weight: 600;
  border-radius: var(--radius-md); border: 1px solid transparent;
  cursor: pointer; transition: all var(--dur-fast) var(--ease-out);
  text-decoration: none; line-height: 1.4; white-space: nowrap;
  font-family: var(--font-sans);
}
.btn-primary { background: var(--brand-800); color: #fff; border-color: var(--brand-800); }
.btn-primary:hover { background: var(--brand-900); border-color: var(--brand-900); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { border-color: var(--gray-200); background: var(--gray-0); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--gray-300); background: var(--gray-25); color: var(--gray-900); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-50); color: var(--gray-900); }
.btn-lg { padding: var(--s-4) var(--s-8); font-size: var(--fs-base); border-radius: var(--radius-lg); }
.btn-sm { padding: var(--s-2) var(--s-3); font-size: var(--fs-xs); }

/* ═══════════════════════════════════════
   HEADER — Clean & minimal
   ═══════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85); backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--gray-100);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.site-branding { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.site-brand-logo { display: block; width: clamp(172px, 16vw, 220px); height: auto; }
.site-logo-icon { display: flex; align-items: center; color: var(--brand-600); }
.card-cover-icon { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; background: rgba(255,255,255,.6); border-radius: var(--radius-xl); }
.site-title { font-size: var(--fs-xl); font-weight: 800; color: var(--gray-900); letter-spacing: 0; white-space: nowrap; }
.site-title span { color: var(--brand-600); }
.main-navigation { display: flex; align-items: center; gap: var(--s-6); }
.main-navigation a { color: #000000; font-size: var(--fs-sm); font-weight: 500; transition: color var(--dur-fast); }
.main-navigation a:hover { color: var(--gray-700); }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: var(--s-2); color: var(--gray-700); }

/* Header Actions Wrapper */
.header-actions { display: flex; align-items: center; gap: var(--s-3); }

/* Search Toggle Button */
.search-toggle {
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  padding: var(--s-2); color: var(--gray-600);
  border-radius: var(--radius-md);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.search-toggle:hover { color: var(--brand-600); background: var(--brand-50); }

/* Search Dropdown */
.header-search {
  display: none;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-0);
  padding: var(--s-3) 0;
  animation: searchSlideIn 0.15s var(--ease-out);
}
.header-search.open { display: block; }

@keyframes searchSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.header-search form {
  display: flex; align-items: center; gap: var(--s-3);
  max-width: 600px; margin: 0 auto;
}

.header-search-icon {
  color: var(--gray-400); flex-shrink: 0;
}

.header-search input[type="search"] {
  flex: 1;
  padding: var(--s-3) var(--s-4);
  border: none;
  border-radius: var(--radius-md);
  background: var(--gray-25);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--gray-800);
  outline: none;
  transition: background var(--dur-fast);
}
.header-search input[type="search"]:focus {
  background: var(--gray-50);
}
.header-search input[type="search"]::placeholder {
  color: var(--gray-400);
}

.search-close {
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  padding: var(--s-2); color: var(--gray-400);
  border-radius: var(--radius-md);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.search-close:hover { color: var(--gray-700); background: var(--gray-50); }

/* ═══════════════════════════════════════
   HERO — Impactful
   ═══════════════════════════════════════ */
.hero {
  padding: var(--s-20) 0 var(--s-24);
  background: linear-gradient(180deg, #f8fbfd 0%, var(--gray-0) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,111,184,.05) 1px, transparent 1px),
              linear-gradient(180deg, rgba(13,111,184,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; max-width: 780px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-1) var(--s-4); border-radius: var(--radius-full);
  background: var(--brand-100); color: var(--brand-700);
  font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--s-6);
  border: 1px solid var(--brand-200);
}
.hero-title { font-size: var(--fs-5xl); margin-bottom: var(--s-6); line-height: 1.1; }
.hero-subtitle { font-size: var(--fs-lg); color: var(--gray-700); max-width: 540px; margin: 0 auto var(--s-8); line-height: 1.6; }
.hero-actions { display: flex; gap: var(--s-4); justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════
   BLOG CARDS — Elegant grid
   ═══════════════════════════════════════ */
.section { padding: var(--s-20) 0; }
.section-header { text-align: center; margin-bottom: var(--s-12); }
.section-label {
  display: inline-block; font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0;
  color: var(--brand-600); margin-bottom: var(--s-3);
}
.section-title { margin-bottom: var(--s-4); }
.section-subtitle { color: var(--gray-600); font-size: var(--fs-lg); max-width: 520px; margin: 0 auto; }

.blog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--s-6);
}
.blog-card {
  background: var(--gray-0); border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl); overflow: hidden;
  transition: all var(--dur-normal) var(--ease-out);
  display: flex; flex-direction: column;
}
.blog-card:hover { border-color: var(--gray-200); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.blog-card-cover.cat-cover {
  height: 200px; overflow: hidden;
  border-bottom: 1px solid var(--gray-100);
}
.blog-card-cover.cat-cover .cat-illustration {
  width: 100%; height: 100%; display: block;
}
.blog-card-body { padding: var(--s-6); flex: 1; display: flex; flex-direction: column; }
.blog-card-category {
  display: inline-block; font-size: var(--fs-xs); font-weight: 600;
  color: var(--brand-600); background: var(--brand-50);
  padding: var(--s-1) var(--s-3); border-radius: var(--radius-full);
  margin-bottom: var(--s-3); width: fit-content;
}
.blog-card-body h3 { font-size: var(--fs-xl); margin-bottom: var(--s-2); line-height: 1.3; }
.blog-card-body h3 a { color: var(--gray-900); }
.blog-card-body h3 a:hover { color: var(--brand-700); text-decoration: underline; text-underline-offset: 2px; }
.blog-card-excerpt { color: var(--gray-600); font-size: var(--fs-sm); line-height: 1.6; flex: 1; }
.blog-card-meta {
  display: flex; align-items: center; gap: var(--s-3);
  margin-top: var(--s-4); padding-top: var(--s-4);
  border-top: 1px solid var(--gray-75);
  font-size: var(--fs-xs); color: var(--gray-700);
}
.blog-card-meta .author-avatar {
  width: 24px; height: 24px; border-radius: var(--radius-full);
  background: var(--brand-200); display: flex; align-items: center;
  justify-content: center; font-size: 0.7rem; font-weight: 700;
  color: var(--brand-700);
}

/* Featured article */
.blog-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
.blog-card.featured .blog-card-cover.cat-cover { min-height: 300px; height: 100%; }
.blog-card.featured .blog-card-body h3 { font-size: var(--fs-3xl); }

/* ═══════════════════════════════════════
   NEWSLETTER CTA
   ═══════════════════════════════════════ */
.newsletter-cta {
  padding: var(--s-20) 0;
  background: #102033;
  color: #fff; text-align: center;
}
.newsletter-cta h2 { color: #fff; margin-bottom: var(--s-4); }
.newsletter-cta p { color: rgba(255,255,255,.8); margin-bottom: var(--s-8); }
.newsletter-form {
  display: flex; gap: var(--s-3); max-width: 480px; margin: 0 auto;
}
.newsletter-form input {
  flex: 1; padding: var(--s-4) var(--s-5); border-radius: var(--radius-lg);
  border: 2px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1);
  color: #fff; font-size: var(--fs-base); font-family: var(--font-sans);
  transition: border-color var(--dur-fast);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.5); }
.newsletter-form input:focus { outline: none; border-color: rgba(255,255,255,.5); }
.newsletter-form .btn { background: #fff; color: var(--brand-700); border-color: #fff; }
.newsletter-form .btn:hover { background: var(--gray-25); }

/* ═══════════════════════════════════════
   BREADCRUMBS — SEO + Rich Snippets
   ═══════════════════════════════════════ */
.breadcrumbs {
  font-size: var(--fs-sm); color: var(--gray-500);
  padding: var(--s-4) 0; margin-bottom: var(--s-4);
  border-bottom: 1px solid var(--gray-100);
}
.breadcrumbs a { color: var(--brand-600); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   SINGLE POST
   ═══════════════════════════════════════ */
.post-header { padding: var(--s-16) 0 var(--s-8); text-align: center; }
.post-header-meta { display: flex; align-items: center; justify-content: center; gap: var(--s-4); margin-bottom: var(--s-6); }
.post-header-meta .category-tag {
  background: var(--brand-50); color: var(--brand-700); padding: var(--s-1) var(--s-4);
  border-radius: var(--radius-full); font-size: var(--fs-sm); font-weight: 600;
}
.post-header-meta .date { color: var(--gray-600); font-size: var(--fs-sm); }
.post-header-meta .read-time { color: var(--gray-600); font-size: var(--fs-sm); }
.post-header h1 { max-width: 800px; margin: 0 auto var(--s-6); }
.post-header .author-row {
  display: flex; align-items: center; justify-content: center; gap: var(--s-3);
  font-size: var(--fs-sm); color: var(--gray-600);
}
.author-row .author-avatar {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  background: var(--brand-200); display: flex; align-items: center;
  justify-content: center; font-weight: 700; color: var(--brand-700);
}

.post-content {
  max-width: var(--content-width); margin: 0 auto var(--s-20);
  padding: 0 var(--s-6);
  font-size: var(--fs-lg); line-height: 1.85; color: var(--gray-700);
}
.post-content h2 { margin-top: var(--s-12); margin-bottom: var(--s-4); font-size: var(--fs-2xl); }
.post-content h3 { margin-top: var(--s-8); margin-bottom: var(--s-3); }
.post-content p { margin-bottom: var(--s-5); }
.post-content a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 2px; }
.post-content ul, .post-content ol { margin: var(--s-4) 0 var(--s-5) var(--s-6); color: var(--gray-600); }
.post-content li { margin-bottom: var(--s-2); }
.post-content blockquote {
  border-left: 3px solid var(--brand-300); padding: var(--s-4) var(--s-6);
  margin: var(--s-8) 0; background: var(--gray-25); border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--gray-600); font-style: italic;
}
.post-content pre {
  background: var(--gray-900); color: #e2e8f0; padding: var(--s-6);
  border-radius: var(--radius-lg); overflow-x: auto; margin: var(--s-8) 0;
  font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.6;
}
.post-content code { font-family: var(--font-mono); font-size: 0.9em; }
.post-content :not(pre) > code {
  background: var(--brand-50); color: var(--brand-700);
  padding: 2px 6px; border-radius: 4px;
}
.post-content img { border-radius: var(--radius-lg); margin: var(--s-8) 0; }

.post-navigation {
  max-width: var(--content-width); margin: 0 auto var(--s-20);
  padding: 0 var(--s-6); display: flex; justify-content: space-between; gap: var(--s-4);
}

/* ═══════════════════════════════════════
   TOPICS / CATEGORIES
   ═══════════════════════════════════════ */
.topics-grid {
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center;
  margin-bottom: var(--s-6);
}
.topic-tag {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) var(--s-4); border-radius: var(--radius-full);
  border: 1px solid var(--gray-200); background: var(--gray-0);
  color: var(--gray-600); font-size: var(--fs-sm); font-weight: 500;
  transition: all var(--dur-fast) var(--ease-out); text-decoration: none;
}
.topic-tag:hover { border-color: var(--brand-300); background: var(--brand-50); color: var(--brand-700); }
.topic-tag.active { background: var(--brand-800); color: #fff; border-color: var(--brand-800); }

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--gray-100); background: var(--gray-25);
  padding: var(--s-16) 0 var(--s-8);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s-12); margin-bottom: var(--s-12); }
.footer-brand { font-size: var(--fs-sm); color: var(--gray-600); }
/* a11y: h4→h2 */
.footer-brand .footer-brand-title { font-size: var(--fs-lg); color: var(--gray-900); margin-bottom: var(--s-3); }
.footer-brand h4 span { color: var(--brand-600); }
/* a11y: replaced h5 */
.footer-col .footer-col-title { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0; color: var(--gray-600); margin-bottom: var(--s-4); }
.footer-col a { display: block; font-size: var(--fs-sm); color: var(--gray-700); margin-bottom: var(--s-2); }
.footer-col a:hover { color: var(--gray-900); }
.footer-bottom {
  padding-top: var(--s-8); border-top: 1px solid var(--gray-100);
  text-align: center; color: var(--gray-600); font-size: var(--fs-xs);
}

.footer-branding {
  display: inline-block;
  margin-bottom: var(--s-3);
}
.footer-brand-logo {
  display: block;
  width: auto;
  height: 44px;
}

/* ═══════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════ */
.pagination {
  display: flex; justify-content: center; gap: var(--s-2); margin: var(--s-12) 0;
}
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 var(--s-3); border-radius: var(--radius-md);
  border: 1px solid var(--gray-200); font-size: var(--fs-sm);
  color: var(--gray-600); transition: all var(--dur-fast); white-space: nowrap;
}
.pagination .page-numbers.current { background: var(--brand-800); color: #fff; border-color: var(--brand-800); }
.pagination .page-numbers:hover:not(.current) { border-color: var(--gray-300); background: var(--gray-25); }

/* ═══════════════════════════════════════
   PAGE DEFAULT
   ═══════════════════════════════════════ */
.page-default { padding: var(--s-16) 0; }

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: none;
  opacity: 1;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --fs-5xl: 2.25rem; --fs-4xl: 1.75rem; --fs-3xl: 1.5rem;
  }
  .main-navigation { display: none; }
  /* Le menu mobile (ouvert) est défini une seule fois dans le bloc
     "Mobile navigation" plus bas — source unique pour éviter les conflits. */
  .menu-toggle { display: inline-flex; }
  .site-brand-logo { width: 190px; }
  .search-toggle { display: none; }
  .header-search input[type="search"] { font-size: var(--fs-sm); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-8); }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card.featured { grid-template-columns: 1fr; }
  .blog-card.featured .blog-card-cover { min-height: 200px; }
  .newsletter-form { flex-direction: column; }
  .hero { padding: var(--s-12) 0 var(--s-16); }
}

@media (max-width: 480px) {
  .container, .container-sm { padding: 0 var(--s-4); }
}


.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Print */
@media print {
  .site-header, .site-footer, .newsletter-cta { display: none; }
  body { color: #000; font-size: 12pt; }
}

/* ═══════════════════════════════════════
   PRO DESIGN PASS — WP/Admin/Ops
   ═══════════════════════════════════════ */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
h5,
h6,
.site-title,
.section-label,
.category-tag {
  letter-spacing: 0;
}

:root {
  --brand-50: #eef6ff;
  --brand-100: #dceeff;
  --brand-200: #b8dcff;
  --brand-300: #84c5ff;
  --brand-400: #43a8f5;
  --brand-500: #1687d9;
  --brand-600: #0d6fb8;
  --brand-700: #0b5b96;
  --brand-800: #0c4a78;
  --brand-900: #102f48;
  --accent-400: #2dd4bf;
  --accent-500: #0f766e;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent-500);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -120px;
  left: var(--s-4);
  z-index: 100000;
  background: var(--brand-900);
  color: #fff;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius-md);
  font-weight: 700;
}

.skip-link:focus {
  top: var(--s-3);
}

.site-header {
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid #dbe3ea;
  box-shadow: 0 1px 0 rgba(16,47,72,.04);
}

.main-navigation a {
  color: #1f2937;
}

.main-navigation a.btn-primary {
  color: #fff;
}

.main-navigation a.btn-primary:hover {
  color: #fff;
}

.btn-primary,
.topic-tag.active,
.pagination .page-numbers.current {
  background: var(--brand-800);
  border-color: var(--brand-800);
}

.btn-primary:hover {
  background: var(--brand-900);
  border-color: var(--brand-900);
}

.btn-outline {
  border-color: #cfd8e3;
  color: #27364a;
}

.hero {
  background:
    linear-gradient(90deg, rgba(13,111,184,.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(13,111,184,.06) 1px, transparent 1px),
    linear-gradient(180deg, #f8fbfd 0%, #ffffff 82%) !important;
  background-size: 40px 40px, 40px 40px, auto;
  border-bottom: 1px solid #e7edf3;
  padding: var(--s-16) 0 var(--s-20);
}

.hero::before {
  display: none;
}

.hero-inner {
  max-width: 860px;
}

.hero-badge,
.section-label,
.blog-card-category,
.post-header-meta .category-tag {
  background: #e8f7f5;
  color: #0f615b;
  border: 1px solid #bfe7e1;
  border-radius: 999px;
  text-transform: none;
}

.gradient-text,
.gradient-text-accent,
.section-title {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #102033;
}

.hero-title {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  color: #334155;
  max-width: 650px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
  margin: 0 auto var(--s-8);
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid #d7e2ea;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: #334155;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.blog-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-5);
}

.blog-card {
  border-color: #dfe7ee;
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.blog-card:hover {
  border-color: #b8c8d8;
  box-shadow: 0 14px 34px rgba(16,47,72,.08);
  transform: translateY(-2px);
}

.blog-card.featured {
  border-left: 3px solid var(--accent-500);
}

.blog-card-cover.cat-cover {
  background: #f3f7fa;
}

.blog-card-cover.cat-cover .cat-illustration {
  filter: saturate(.78) contrast(.98);
}

.post-content,
.post-content p,
.post-content ul,
.post-content ol {
  color: #334155;
}

.post-content h2 {
  margin-top: var(--s-12);
  padding-top: var(--s-6);
  border-top: 1px solid #e4ebf2;
}

.post-content h3 {
  color: var(--brand-800);
}

.post-content a {
  color: var(--brand-700);
}

.code-block-wrapper {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
}

.code-block-wrapper pre,
.post-content pre {
  max-width: 100%;
  overflow-x: auto;
  background: #0b1220;
  color: #dbeafe;
  border: 1px solid #22314a;
  border-radius: var(--radius-md);
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

.post-content pre code {
  display: inline;
  min-width: max-content;
  background: transparent;
  color: inherit;
  padding: 0;
}

.post-content :not(pre) > code {
  overflow-wrap: anywhere;
  background: #eef6ff;
  color: #0b5b96;
}

.copy-code-btn {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-1) var(--s-3);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.08);
  color: #cbd5e1;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
}

.copy-code-btn:hover {
  background: rgba(255,255,255,.16);
  color: #fff;
}

.toc-container {
  background: #f8fbfd;
  border: 1px solid #dfe7ee;
  border-left: 3px solid var(--accent-500);
  border-radius: var(--radius-md);
  padding: var(--s-5);
  margin-bottom: var(--s-8);
}

.toc-title {
  margin-bottom: var(--s-3);
  color: #102033;
  font-size: var(--fs-lg);
  font-weight: 800;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: var(--s-2);
}

.toc-list a {
  color: #334155;
  font-size: var(--fs-sm);
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--brand-700);
}

.toc-h3 {
  padding-left: var(--s-5);
}

.author-box {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin: var(--s-10) 0;
  padding: var(--s-5);
  background: #f8fbfd;
  border: 1px solid #dfe7ee;
  border-radius: var(--radius-md);
}

.post-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-4);
  max-width: 720px;
  margin: var(--s-10) auto;
  padding: 0 var(--s-6);
}

.post-navigation > div {
  min-width: 0;
}

.post-navigation > div:last-child {
  text-align: right;
}

.post-navigation a {
  display: inline-block;
  max-width: 100%;
  padding: var(--s-4);
  background: #f8fbfd;
  border: 1px solid #dfe7ee;
  border-radius: var(--radius-md);
  color: #27364a;
  font-size: var(--fs-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.post-navigation a:hover {
  background: #eef6ff;
  border-color: #b8dcff;
  color: var(--brand-800);
}

.comment-list .comment {
  padding: var(--s-5);
  margin-bottom: var(--s-4);
  background: #fff;
  border: 1px solid #dfe7ee;
  border-radius: var(--radius-md);
}

.comment-list .comment-author {
  color: #102033;
  font-weight: 700;
}

.comment-list .comment-meta {
  margin-bottom: var(--s-3);
  color: #64748b;
  font-size: var(--fs-xs);
}

.newsletter-cta {
  margin-top: var(--s-12);
  padding: var(--s-12) 0;
  background: #102033;
  color: #fff;
}

.newsletter-cta p {
  color: #cbd5e1;
}

.newsletter-form input {
  background: #fff;
  color: #102033;
  border-color: rgba(255,255,255,.3);
}

.newsletter-form input::placeholder {
  color: #64748b;
}

.newsletter-form .btn {
  background: var(--accent-500);
  border-color: var(--accent-500);
  color: #fff;
}

.site-footer {
  margin-top: var(--s-16);
  background: #101827;
  color: #d7dee8;
  padding: var(--s-14) 0 var(--s-8);
}

.site-footer p,
.footer-brand {
  color: #d7dee8;
}

.footer-brand .footer-brand-title,
.footer-col .footer-col-title {
  color: #f8fafc;
}

.footer-brand .footer-brand-title span {
  color: #67e8f9;
}

.site-footer a,
.footer-col a {
  color: #cbd5e1;
}

.site-footer a:hover,
.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-color: rgba(255,255,255,.12);
  color: #cbd5e1;
}

.cookie-banner {
  position: fixed;
  right: var(--s-4);
  bottom: var(--s-4);
  left: var(--s-4);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s-3) var(--s-4);
  background: rgba(255,255,255,.98);
  border: 1px solid #dfe7ee;
  border-radius: var(--radius-md);
  box-shadow: 0 18px 48px rgba(16,24,39,.16);
  color: #334155;
  font-size: var(--fs-sm);
}

.cookie-banner.is-visible {
  display: flex;
}

.cookie-banner a {
  color: var(--brand-700);
  font-weight: 700;
}

.cookie-actions {
  display: flex;
  flex: 0 0 auto;
  gap: var(--s-2);
}

.cookie-banner button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 14px;
  background: var(--brand-800);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.cookie-banner button:hover {
  background: var(--brand-900);
}

.cookie-banner .cookie-secondary {
  background: #eef2f7;
  color: #27364a;
}

.cookie-banner .cookie-secondary:hover {
  background: #dfe7ee;
  color: #102033;
}

.back-to-top {
  position: fixed;
  right: var(--s-5);
  bottom: var(--s-5);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-800);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  box-shadow: 0 12px 28px rgba(16,47,72,.24);
  transition: opacity .2s ease, transform .2s ease, bottom .2s ease;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--brand-900);
  color: #fff;
}

body.cookie-visible .back-to-top {
  bottom: 86px;
}

/* Mobile refinements */
@media (max-width: 768px) {
  .header-inner {
    height: 64px;
  }

  .site-brand-logo {
    width: min(190px, 62vw);
  }

  /* ===== Mobile navigation (source unique) ===== */
  /* Le backdrop-filter du header crée un bloc conteneur qui "piège" les
     enfants position:fixed. On le neutralise en mobile pour que le menu
     plein écran s'ancre bien au viewport. Header en blanc solide. */
  .site-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #ffffff;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #d7e2ea;
    border-radius: var(--radius-md);
    background: #fff;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--dur-fast), border-color var(--dur-fast);
  }
  .menu-toggle:active { background: var(--gray-50); }

  /* Hamburger animé -> croix */
  .menu-toggle-bars { position: relative; display: block; width: 22px; height: 16px; }
  .menu-toggle-bars span {
    position: absolute; left: 0; height: 2.5px; width: 100%;
    background: var(--gray-800); border-radius: 2px;
    transition: transform .28s var(--ease-out), opacity .2s var(--ease-out), top .28s var(--ease-out);
  }
  .menu-toggle-bars span:nth-child(1) { top: 0; }
  .menu-toggle-bars span:nth-child(2) { top: 6.75px; }
  .menu-toggle-bars span:nth-child(3) { top: 13.5px; }
  .menu-toggle.is-open .menu-toggle-bars span:nth-child(1) { top: 6.75px; transform: rotate(45deg); }
  .menu-toggle.is-open .menu-toggle-bars span:nth-child(2) { opacity: 0; }
  .menu-toggle.is-open .menu-toggle-bars span:nth-child(3) { top: 6.75px; transform: rotate(-45deg); }

  /* Menu plein écran solide, sous le header (style app mobile) */
  .main-navigation {
    position: fixed;
    top: 64px; left: 0; right: 0; bottom: 0;
    height: calc(100svh - 64px);
    z-index: 1001;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s-3) 0 calc(var(--s-8) + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: #ffffff;
    border-top: 1px solid var(--gray-100);
    /* état fermé : invisible et non interactif */
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s var(--ease-out), transform .24s var(--ease-out), visibility .2s;
  }
  .main-navigation.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .main-navigation a {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    margin: 0 var(--s-4);
    padding: 0 var(--s-2);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--gray-900);
    border-bottom: 1px solid var(--gray-100);
  }
  /* Chevron à droite de chaque lien (sauf le bouton) */
  .main-navigation a:not(.btn)::after {
    content: "";
    width: 8px; height: 8px; flex-shrink: 0;
    border-top: 2px solid var(--gray-300);
    border-right: 2px solid var(--gray-300);
    transform: rotate(45deg);
  }
  .main-navigation a:active { background: var(--gray-50); }
  .main-navigation a.btn-primary {
    justify-content: center;
    margin: var(--s-6) var(--s-5) 0;
    min-height: 52px;
    color: #fff;
    border-bottom: 0;
    border-radius: var(--radius-md);
  }

  /* Backdrop inutile avec un menu plein écran solide */
  .nav-backdrop { display: none; }

  body.menu-open { overflow: hidden; }
  /* Ne pas laisser le bandeau cookies / back-to-top passer au-dessus du menu */
  body.menu-open .cookie-banner,
  body.menu-open .back-to-top { display: none !important; }

  /* Respect des préférences de mouvement réduit */
  @media (prefers-reduced-motion: reduce) {
    .main-navigation, .nav-backdrop, .menu-toggle-bars span { transition: none; }
  }

  .hero {
    padding: var(--s-10) 0 var(--s-12);
  }

  .hero-title {
    font-size: var(--fs-4xl);
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-card.featured {
    display: flex;
    flex-direction: column;
    border-left: 0;
    border-top: 3px solid var(--accent-500);
  }

  .blog-card.featured .blog-card-cover.cat-cover {
    width: 100%;
    height: 200px;
    min-height: 200px;
  }

  .post-header-meta {
    flex-wrap: wrap;
  }

  .post-content {
    max-width: 100%;
    padding: 0 var(--s-4);
    font-size: var(--fs-base);
  }

  .code-block-wrapper {
    margin-right: calc(var(--s-4) * -1);
    margin-left: calc(var(--s-4) * -1);
    border-radius: 0;
  }

  .code-block-wrapper pre,
  .post-content pre {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .post-navigation {
    grid-template-columns: 1fr;
    padding: 0 var(--s-4);
  }

  .post-navigation > div,
  .post-navigation > div:last-child {
    text-align: left;
  }

  .post-navigation a {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }

  .author-box {
    align-items: flex-start;
  }

  .cookie-banner {
    align-items: stretch;
    flex-direction: column;
    gap: var(--s-2);
    font-size: var(--fs-xs);
  }

  .cookie-actions {
    width: 100%;
    flex-direction: column;
  }

  .cookie-banner button {
    width: 100%;
  }

  body.cookie-visible .back-to-top {
    bottom: 138px;
  }
}

@media (max-width: 480px) {
  .container,
  .container-sm {
    padding: 0 var(--s-4);
  }

  .footer-grid {
    gap: var(--s-6);
  }
}
