/* ============================================
   VIGIL-HOME.FR — Design System v2
   Protection, confiance, chaleur humaine
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette principale */
  --primary: #1B3A6B;
  --primary-dark: #0F2240;
  --primary-mid: #2A5298;
  --accent: #D4920A;
  --accent-hover: #B07208;
  --accent-light: #FEF3DC;
  --accent-mid: #F0A820;

  /* Sémantique */
  --green: #2A7D4F;
  --green-light: #E6F4EC;
  --danger: #B83232;
  --danger-light: #FDEAEA;
  --warning: #C86F00;
  --warning-light: #FEF0E0;

  /* Textes */
  --text: #1C1C2A;
  --text-muted: #566474;
  --text-light: #8796A3;
  --text-lighter: #AAB5BE;

  /* Surfaces */
  --bg: #F7F3EE;
  --surface: #FFFFFF;
  --surface-warm: #FDFBF7;
  --bg-dark: #0F2240;

  /* Bordures */
  --border: #DDD5C8;
  --border-light: #EDE8E0;

  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(27,58,107,.08);
  --shadow: 0 4px 12px rgba(27,58,107,.10), 0 2px 4px rgba(27,58,107,.06);
  --shadow-lg: 0 12px 32px rgba(27,58,107,.14), 0 4px 8px rgba(27,58,107,.08);
  --shadow-xl: 0 24px 48px rgba(27,58,107,.16);
  --shadow-amber: 0 8px 24px rgba(212,146,10,.20);

  /* Formes */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  /* Transition */
  --transition: .25s cubic-bezier(.4,0,.2,1);

  /* Layout */
  --max-w: 1200px;

  /* Polices */
  --font-title: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-mid); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

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

/* --- Typographie --- */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  color: var(--primary);
  line-height: 1.3;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); letter-spacing: -.005em; margin-bottom: .5rem; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-family: var(--font); font-weight: 700; }
h4 { font-size: 1.05rem; font-family: var(--font); font-weight: 700; }

p { margin-bottom: 1rem; color: var(--text); }
.lead { font-size: 1.15rem; color: var(--text-muted); line-height: 1.85; }
.small { font-size: .875rem; color: var(--text-muted); }

/* Accent sur titre */
.title-accent { color: var(--accent); }

/* --- Header / Nav --- */
.site-header {
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -.01em;
}
.logo svg { width: 32px; height: 32px; }
.logo span.accent { color: var(--accent); }
.logo:hover { color: var(--primary); }

.nav-links { display: flex; gap: 4px; list-style: none; align-items: center; }
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: .9rem;
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  background: var(--accent-light);
  color: var(--primary);
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 28px; height: 28px; color: var(--primary); }

/* --- Home Hero (page d'accueil) --- */
.home-hero {
  background: var(--primary);
  background-image:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(42,82,152,.6) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(212,146,10,.12) 0%, transparent 50%);
  color: #fff;
  padding: clamp(64px, 10vw, 120px) 0;
  position: relative;
  overflow: hidden;
}

/* Motif géométrique discret en overlay */
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.home-hero .container { position: relative; z-index: 2; }
.home-hero h1 { color: #fff; margin-bottom: 20px; max-width: 720px; font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.home-hero .lead { color: rgba(255,255,255,.82); max-width: 620px; margin-bottom: 36px; font-size: 1.15rem; }

.home-hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }

.home-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  max-width: 820px;
}
.home-hero-stat {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.home-hero-stat .number {
  font-family: var(--font-title);
  font-size: 2.4rem;
  font-weight: 700;
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}
.home-hero-stat .number.danger { color: #F98080; }
.home-hero-stat .number.warning { color: #FBBF24; }
.home-hero-stat .number.success { color: #6EE7B7; }
.home-hero-stat .number.accent { color: var(--accent-mid); }
.home-hero-stat .label { font-size: .82rem; color: rgba(255,255,255,.65); line-height: 1.4; }

/* --- Bandeau de mise à jour --- */
.update-banner {
  background: var(--surface-warm);
  border-bottom: 1px solid var(--border-light);
  font-size: .88rem;
  color: var(--text-muted);
  padding: 10px 0;
}
.update-banner .container { display: flex; align-items: center; gap: 10px; }
.update-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(42,125,79,.15);
}

/* --- Bloc "En bref" (optimisé GEO / LLM) --- */
.key-takeaways {
  max-width: 820px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--surface-warm) 100%);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px 32px 24px;
  box-shadow: var(--shadow-sm);
}
.key-takeaways-title {
  font-size: 1.35rem;
  margin-bottom: 14px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.key-takeaways-title::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.key-takeaways-list { list-style: none; padding: 0; margin: 0 0 14px; }
.key-takeaways-list li {
  position: relative;
  padding: 8px 0 8px 28px;
  border-bottom: 1px dashed var(--border-light);
  font-size: 1rem;
  line-height: 1.6;
}
.key-takeaways-list li:last-child { border-bottom: none; }
.key-takeaways-list li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 16px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.key-takeaways-source {
  font-size: .82rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* --- Illustration accueil (SVG inline) --- */
.home-illustration {
  max-width: 820px;
  margin: 36px auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.home-illustration svg { width: 100%; height: auto; display: block; }

/* --- Hero Small (sous-pages) --- */
.hero-sm {
  background: var(--primary);
  background-image: radial-gradient(ellipse 60% 80% at 90% 50%, rgba(42,82,152,.5) 0%, transparent 55%);
  color: #fff;
  padding: 52px 0 44px;
  position: relative;
  overflow: hidden;
}
.hero-sm::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.018'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-sm .container { position: relative; z-index: 2; }
.hero-sm h1 { color: #fff; margin-bottom: 12px; font-size: clamp(1.75rem, 3vw, 2.6rem); }
.hero-sm .lead { color: rgba(255,255,255,.78); margin-bottom: 0; }

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: .85rem;
  margin-bottom: 16px;
  color: rgba(255,255,255,.55);
}
.breadcrumb a { color: rgba(255,255,255,.65); }
.breadcrumb a:hover { color: rgba(255,255,255,.95); }
.breadcrumb span { color: rgba(255,255,255,.4); }

/* --- Sections --- */
.section { padding: 80px 0; }
.section-alt { background: var(--surface); }
.section-warm { background: var(--surface-warm); }
.section-dark { background: var(--primary-dark); color: #fff; }

.section-title {
  font-family: var(--font-title);
  text-align: center;
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

/* Décoration titre section */
.section-label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  text-align: center;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.card-body { padding: 28px; }

.card-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-light);
  color: var(--accent-hover);
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.card-tag.green { background: var(--green-light); color: var(--green); }
.card-tag.danger { background: var(--danger-light); color: var(--danger); }

.card-title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--primary);
  font-weight: 700;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--accent-hover); }
.card-text { color: var(--text-muted); font-size: .93rem; margin-bottom: 18px; line-height: 1.65; }

.card-link {
  font-weight: 600;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-mid);
}
.card-link svg { width: 15px; height: 15px; transition: transform var(--transition); }
.card-link:hover { color: var(--accent-hover); }
.card-link:hover svg { transform: translateX(4px); }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.6rem;
  background: var(--accent-light);
}
.card-icon.blue { background: #DBEAFE; }
.card-icon.green { background: var(--green-light); }
.card-icon.orange { background: var(--warning-light); }
.card-icon.red { background: var(--danger-light); }
.card-icon.purple { background: #EDE9FE; }
.card-icon.teal { background: #CCFBF1; }
.card-icon.amber { background: var(--accent-light); }

/* Ligne accent sur top de card */
.card-accent-top {
  border-top: 3px solid var(--accent);
}
.card-accent-top.green { border-top-color: var(--green); }
.card-accent-top.danger { border-top-color: var(--danger); }

/* --- Article Content --- */
.article-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 60px 24px;
}
.article-content h2 {
  margin-top: 52px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.article-content h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--accent);
}
.article-content h3 { margin-top: 32px; margin-bottom: 12px; }
.article-content h4 { margin-top: 24px; margin-bottom: 10px; color: var(--primary-mid); }
.article-content p { margin-bottom: 18px; line-height: 1.82; }
.article-content ul, .article-content ol {
  margin: 18px 0 18px 20px;
}
.article-content li { margin-bottom: 10px; line-height: 1.7; }
.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 18px 24px;
  margin: 28px 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--primary);
}
.article-content strong { color: var(--primary); font-weight: 700; }

/* Premier paragraphe plus grand */
.article-content .intro-text {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
}

/* --- Stat Cards --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  border-top: 3px solid var(--accent);
  transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.stat-card .stat-number {
  font-family: var(--font-title);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-card .stat-number.primary { color: var(--primary); }
.stat-card .stat-number.green { color: var(--green); }
.stat-card .stat-number.danger { color: var(--danger); }
.stat-card .stat-label {
  font-size: .88rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.stat-card .stat-source {
  font-size: .75rem;
  color: var(--text-lighter);
  margin-top: 8px;
}

/* --- Highlight / Info Boxes --- */
.highlight-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: #fff;
  padding: 32px 36px;
  border-radius: var(--radius);
  margin: 32px 0;
}
.highlight-box h3 { color: #fff; margin-bottom: 10px; font-family: var(--font-title); }
.highlight-box p { color: rgba(255,255,255,.82); margin: 0; }

.info-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 24px 0;
}
.info-box.warning { background: var(--warning-light); border-color: #FCD38A; }
.info-box.success { background: var(--green-light); border-color: #86EFAC; }
.info-box.danger { background: var(--danger-light); border-color: #FCA5A5; }
.info-box.amber { background: var(--accent-light); border-color: #F0C060; }

.info-box-title {
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
  color: var(--primary);
}

/* --- Chart Container --- */
.chart-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin: 32px 0;
}
.chart-container h3 {
  margin-bottom: 6px;
  text-align: center;
  font-family: var(--font-title);
  color: var(--primary);
  font-size: 1.15rem;
}
.chart-subtitle {
  text-align: center;
  font-size: .85rem;
  color: var(--text-light);
  margin-bottom: 24px;
}
.chart-wrapper {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

/* --- Focus visible --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Table Wrapper (responsive) --- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.table-wrapper table {
  margin: 0;
  border: none;
  border-radius: 0;
  min-width: 600px;
}

/* --- Comparison Table --- */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
  font-size: .9rem;
}
.comparison-table thead { background: var(--primary); color: #fff; }
.comparison-table th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  font-family: var(--font);
  font-size: .88rem;
  letter-spacing: .02em;
}
.comparison-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}
.comparison-table tbody tr:hover { background: var(--accent-light); }
.comparison-table tbody tr:last-child td { border-bottom: none; }
.check { color: var(--green); font-weight: 700; }
.cross { color: var(--danger); font-weight: 700; }
.badge-best {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
  margin-left: 6px;
}

/* --- TOC (Table of Contents) --- */
.toc {
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}
.toc-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--primary);
  font-family: var(--font-title);
}
.toc ol { padding-left: 20px; }
.toc li { margin-bottom: 8px; }
.toc a { color: var(--text-muted); font-size: .93rem; }
.toc a:hover { color: var(--accent-hover); }

/* --- Sources / References --- */
.source {
  font-size: .82rem;
  color: var(--text-lighter);
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  margin-top: 6px;
}
.sources-list {
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin: 32px 0;
}
.sources-list h4 { margin-bottom: 14px; font-size: .95rem; }
.sources-list li { font-size: .88rem; color: var(--text-muted); margin-bottom: 8px; }
.sources-list a { color: var(--primary-mid); text-decoration: underline; }
.sources-list a:hover { color: var(--accent-hover); }

/* --- CTA Section --- */
.cta-section {
  background: var(--primary-dark);
  background-image: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(42,82,152,.4) 0%, transparent 55%);
  color: #fff;
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(212,146,10,.12) 0%, transparent 65%);
  border-radius: 50%;
}
.cta-section .container { position: relative; z-index: 2; }
.cta-section h2 { color: #fff; margin-bottom: 14px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-section p { color: rgba(255,255,255,.75); max-width: 580px; margin: 0 auto 36px; font-size: 1.05rem; }

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .975rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-amber);
}
.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary-mid);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.35);
}
.btn-outline:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-color: rgba(255,255,255,.7);
}
.btn-dark {
  background: var(--primary);
  color: #fff;
}
.btn-dark:hover {
  background: var(--primary-mid);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-group { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* --- Footer --- */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,.65);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p {
  color: rgba(255,255,255,.45);
  font-size: .9rem;
  max-width: 280px;
  margin-top: 12px;
  line-height: 1.65;
}

.footer-col h4 {
  color: rgba(255,255,255,.9);
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(255,255,255,.48);
  font-size: .88rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent-mid); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  color: rgba(255,255,255,.3);
}

/* Badge GSC/confiance dans footer */
.footer-trust {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 20px;
}
.footer-trust-badge {
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Sidebar Layout --- */
.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 52px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px;
}
.sidebar { position: sticky; top: 96px; align-self: start; }
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.sidebar-card h4 { margin-bottom: 16px; font-size: .95rem; color: var(--primary); }
.sidebar-card ul { list-style: none; }
.sidebar-card li { margin-bottom: 10px; }
.sidebar-card a { color: var(--text-muted); font-size: .88rem; }
.sidebar-card a:hover { color: var(--accent-hover); }

/* --- Timeline --- */
.timeline { position: relative; padding-left: 36px; margin: 32px 0; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--primary-mid));
  border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-item h4 { margin-bottom: 6px; color: var(--primary); }
.timeline-item p { color: var(--text-muted); font-size: .93rem; }

/* --- Checklist --- */
.checklist { list-style: none; margin: 24px 0; }
.checklist li {
  padding: 13px 16px 13px 46px;
  position: relative;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: .94rem;
  color: var(--text);
  transition: background var(--transition);
}
.checklist li:hover { background: var(--surface-warm); }
.checklist li::before {
  content: '\2713';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
}
.checklist li.warn::before { content: '\26A0'; color: var(--warning); }
.checklist li.cross::before { content: '\2717'; color: var(--danger); }

/* --- Progress / Rating Bars --- */
.rating-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.rating-bar .label { min-width: 130px; font-size: .88rem; font-weight: 500; color: var(--text-muted); }
.rating-bar .bar {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.rating-bar .bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width .8s ease;
}
.rating-bar .bar-fill.high { background: var(--green); }
.rating-bar .bar-fill.mid { background: var(--accent); }
.rating-bar .bar-fill.low { background: var(--danger); }
.rating-bar .value { font-size: .84rem; font-weight: 700; min-width: 40px; color: var(--primary); }

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--surface);
}
.faq-question {
  width: 100%;
  border: none;
  font-family: inherit;
  text-align: left;
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  transition: background var(--transition);
  font-size: .95rem;
  color: var(--primary);
}
.faq-question:hover { background: var(--surface-warm); }
.faq-question:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.faq-question .icon {
  transition: transform var(--transition);
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-left: 16px;
}
.faq-item.open .faq-question .icon { transform: rotate(45deg); }
.faq-item.open .faq-question { background: var(--accent-light); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.faq-item.open .faq-answer { max-height: 600px; }
.faq-answer-inner {
  padding: 6px 24px 20px;
  color: var(--text-muted);
  line-height: 1.75;
  font-size: .94rem;
}

/* --- Compteurs animés --- */
.count-badge {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

/* --- Numérotation stylisée --- */
.numbered-list { list-style: none; counter-reset: num-list; margin: 24px 0; }
.numbered-list li {
  counter-increment: num-list;
  padding: 16px 20px 16px 56px;
  position: relative;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}
.numbered-list li::before {
  content: counter(num-list);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
}
.numbered-list li strong { color: var(--primary); display: block; margin-bottom: 4px; }
.numbered-list li p { margin: 0; font-size: .93rem; color: var(--text-muted); }

/* --- Erreur card (pour page erreurs) --- */
.erreur-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: all var(--transition);
}
.erreur-card:hover { box-shadow: var(--shadow); }
.erreur-card.warn { border-left-color: var(--warning); }
.erreur-card.ok { border-left-color: var(--green); }
.erreur-card-title {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  font-size: .97rem;
}
.erreur-card p { font-size: .9rem; color: var(--text-muted); margin: 0; }

/* --- Prestataire card --- */
.prestataire-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  transition: all var(--transition);
}
.prestataire-card:hover { box-shadow: var(--shadow-lg); border-color: var(--accent); }
.prestataire-card.featured {
  border-color: var(--accent);
  position: relative;
}
.prestataire-card.featured::before {
  content: 'Le plus répandu en France';
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 10px;
  letter-spacing: .03em;
}
.prestataire-name {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 6px;
}
.prestataire-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.prestataire-meta-item {
  font-size: .88rem;
  color: var(--text-muted);
}
.prestataire-meta-item strong { color: var(--primary); font-size: 1rem; }

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s ease, transform .65s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .nav-toggle { display: block; }
  .card-grid, .card-grid-2, .card-grid-3 { grid-template-columns: 1fr; }
  .home-hero-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .comparison-table { font-size: .82rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .comparison-table th, .comparison-table td { padding: 10px 10px; white-space: nowrap; }
  .home-hero-cta { flex-direction: column; align-items: flex-start; }
  .key-takeaways { padding: 22px 18px; }
}

@media (max-width: 480px) {
  .home-hero-stats { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .article-content { padding: 40px 16px; }
  .prestataire-meta { flex-direction: column; gap: 8px; }
}

/* --- Erreur 404 --- */
.error-404 { padding: 80px 20px; text-align: center; }
.error-404-inner { max-width: 560px; margin: 0 auto; }
.error-code {
  display: block;
  font-family: var(--font-title);
  font-size: 6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 16px;
}
.error-404 h1 { font-size: 1.8rem; margin-bottom: 12px; }
.error-404 p { color: var(--text-muted); margin-bottom: 32px; }
.btn-home {
  display: inline-block;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-bottom: 48px;
}
.btn-home:hover { background: var(--primary-mid); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.error-suggestions h2 { font-size: 1rem; color: var(--text-muted); margin-bottom: 12px; font-family: var(--font); }
.error-suggestions ul { list-style: none; padding: 0; }
.error-suggestions li { margin-bottom: 8px; }
.error-suggestions a { color: var(--primary-mid); text-decoration: underline; }

/* --- Article Image --- */
.article-img {
  margin: 36px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface-warm);
}
.article-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .4s ease;
}
.article-img:hover img { transform: scale(1.015); }
.article-img figcaption {
  padding: 10px 16px;
  font-size: .82rem;
  color: var(--text-muted);
  background: var(--surface-warm);
  border-top: 1px solid var(--border-light);
  font-style: italic;
}

/* --- Page Image Banner (sous hero-sm) --- */
.page-image-banner {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  background: var(--border-light);
}
.page-image-banner img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .page-image-banner img { height: 240px; }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .sidebar, .cta-section { display: none; }
  .home-hero, .hero-sm { background: #fff !important; color: #000 !important; padding: 20px 0; }
  .home-hero h1, .hero-sm h1 { color: #000 !important; }
}

/* --- Préférence "réduire les animations" --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}
