/* ============================================
   DEMISSION-INFO.FR — Design System
   Style : professionnel / institutionnel
   ============================================ */

/* --- Variables --- */
:root {
  --primary:       #1e3a5f;
  --primary-light: #2d5a8e;
  --primary-pale:  #e8f0f8;
  --primary-hover: #152d4a;
  --accent:        #c8902e;
  --accent-light:  #f5e6cc;
  --dark:          #111827;
  --dark-deeper:   #0a0f18;
  --text:          #1f2937;
  --text-light:    #6b7280;
  --bg:            #ffffff;
  --bg-alt:        #f3f4f6;
  --bg-warm:       #fafaf8;
  --border:        rgba(30,58,95,0.12);
  --shadow:        rgba(30,58,95,0.08);
  --shadow-lg:     rgba(30,58,95,0.14);
  --radius:        8px;
  --radius-lg:     12px;
  --max-width:     1200px;
  --header-h:      64px;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  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-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-hover); }

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

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Merriweather', 'Georgia', serif;
  color: var(--dark);
  line-height: 1.3;
}

h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 700; margin-top: 2.4rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.6rem; margin-bottom: 0.6rem; }
h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text); font-family: 'Inter', sans-serif; }

p { margin-bottom: 1rem; }

strong { font-weight: 600; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
  text-decoration: none;
}

.site-logo img {
  height: 48px;
  width: auto;
}

.site-logo:hover { color: var(--primary-hover); }

/* Desktop nav */
.main-nav { display: flex; align-items: center; gap: 4px; }

.main-nav > a,
.nav-dropdown > .nav-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: background .2s, color .2s;
  white-space: nowrap;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.main-nav > a:hover,
.nav-dropdown > .nav-trigger:hover {
  background: var(--primary-pale);
  color: var(--primary);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px var(--shadow-lg);
  padding: 8px 0;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 18px;
  font-size: 0.85rem;
  color: var(--text);
  transition: background .15s, color .15s;
}

.nav-dropdown-menu a:hover {
  background: var(--primary-pale);
  color: var(--primary);
}

.nav-chevron {
  width: 14px;
  height: 14px;
  transition: transform .2s;
}

.nav-dropdown:hover .nav-chevron {
  transform: rotate(180deg);
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  background: var(--bg);
  overflow-y: auto;
  padding: 16px 24px 32px;
  z-index: 99;
}

.mobile-nav.open { display: block; }

.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: 0.95rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:hover { color: var(--primary); }

.mobile-nav-section {
  margin-top: 16px;
}

.mobile-nav-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  padding-bottom: 4px;
  margin-bottom: 4px;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.8rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.breadcrumb li::after {
  content: '>';
  margin-left: 6px;
  color: var(--text-light);
  font-size: 0.7rem;
}

.breadcrumb li:last-child::after { content: none; }

.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumb li:last-child { color: var(--text); font-weight: 500; }

/* --- Page Hero --- */
.page-hero {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.5);
}

.page-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30,58,95,0.85), rgba(17,24,39,0.75));
}

.page-hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 48px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.75);
  margin-bottom: 12px;
}

.page-hero h1 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 12px;
  max-width: 720px;
}

.hero-intro {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.9);
  max-width: 640px;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Hero without image */
.page-hero-simple {
  background: linear-gradient(135deg, var(--primary), var(--dark));
  padding: 48px 0;
}

.page-hero-simple .page-hero-content {
  padding: 0 24px;
}
.page-hero-simple h1 {
  color: #fff;
}

/* --- Article Layout --- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 64px;
  align-items: start;
}

.article-body {
  min-width: 0;
  font-size: 1rem;
  line-height: 1.9;
}

.article-body h2 {
  padding-top: 8px;
  border-bottom: 2px solid var(--primary-pale);
  padding-bottom: 8px;
}

.article-body h2:first-child { margin-top: 0; }

.article-body ul, .article-body ol {
  margin: 0.8rem 0 1.2rem 1.4rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body li::marker {
  color: var(--primary-light);
}

.article-body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-figure {
  margin: 0 0 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-figure img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* --- Sidebar --- */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.sidebar-block {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-block h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-pale);
}

.sidebar-toc {
  list-style: none;
}

.sidebar-toc li {
  margin-bottom: 6px;
}

.sidebar-toc a {
  font-size: 0.85rem;
  color: var(--text);
  display: block;
  padding: 4px 0;
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: border-color .2s, color .2s;
}

.sidebar-toc a:hover,
.sidebar-toc a.active {
  border-left-color: var(--primary);
  color: var(--primary);
}

.sidebar-links {
  list-style: none;
}

.sidebar-links li {
  margin-bottom: 6px;
}

.sidebar-links a {
  font-size: 0.85rem;
  color: var(--primary-light);
  text-decoration: none;
}

.sidebar-links a:hover {
  text-decoration: underline;
}

.sidebar-cta {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 20px;
}

.sidebar-cta h4 {
  color: #fff;
  font-size: 0.95rem;
  border: none;
  padding: 0;
  margin-bottom: 8px;
  text-transform: none;
  letter-spacing: 0;
}

.sidebar-cta p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 14px;
}

.sidebar-cta a {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  padding: 8px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  transition: background .2s;
}

.sidebar-cta a:hover {
  background: var(--primary-pale);
}

.sidebar-service-public {
  text-align: center;
  padding: 24px 20px;
}
.sidebar-service-public img {
  margin: 0 auto 12px;
  display: block;
  width: 200px;
  height: auto;
}
.sidebar-service-public p {
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}
.sidebar-service-public p a {
  color: var(--primary-light);
  font-weight: 600;
}

/* --- Info Box --- */
.info-box {
  background: var(--primary-pale);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.info-box h3 {
  font-size: 0.95rem;
  margin: 0 0 6px;
  color: var(--primary);
}

.info-box p:last-child { margin-bottom: 0; }

/* Warning box */
.warning-box {
  background: #fef3cd;
  border-left: 4px solid #d4a017;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.warning-box p:last-child { margin-bottom: 0; }

/* --- Service Public block --- */
.service-public-block {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 2rem 0;
  font-size: 0.88rem;
}

.service-public-block img {
  width: 44px;
  height: auto;
  flex-shrink: 0;
}

.service-public-block span {
  color: var(--text-light);
}

.service-public-block a {
  font-weight: 600;
  color: var(--primary-light);
  text-decoration: underline;
}

/* --- Tables --- */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--primary);
  color: #fff;
}

th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
}

td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}

tbody tr:nth-child(even) { background: var(--bg-alt); }
tbody tr:hover { background: var(--primary-pale); }

/* --- Steps (ordered lists styled) --- */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 16px 16px 56px;
  margin-bottom: 12px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 14px;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- FAQ Accordion --- */
.faq-list {
  margin: 1.5rem 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-alt);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: background .2s;
}

.faq-question:hover { background: var(--primary-pale); }

.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--primary);
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform .2s;
}

.faq-item.open .faq-question::after {
  content: '-';
}

.faq-answer {
  display: none;
  padding: 0 20px 16px;
  font-size: 0.92rem;
  line-height: 1.7;
}

.faq-item.open .faq-answer { display: block; }
.faq-answer p:last-child { margin-bottom: 0; }

/* --- Homepage --- */
.home-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
  padding: 56px 0;
  color: #fff;
}

.home-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.home-hero-text h1 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 16px;
  line-height: 1.2;
}

.home-hero-text p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  max-width: 520px;
  line-height: 1.6;
}

.home-hero-img {
  display: flex;
  justify-content: center;
}

.home-hero-img img {
  width: 100%;
  max-width: 440px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  object-fit: cover;
}

.home-search {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.home-search input {
  width: 100%;
  padding: 14px 48px 14px 20px;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.home-search input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.home-search button {
  position: absolute;
  right: 6px; top: 6px;
  width: 40px; height: 40px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tool cards */
.tools-section {
  padding: 56px 0;
  background: var(--bg-alt);
}

.section-title {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 40px;
  font-size: 0.95rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .2s, transform .15s;
}

.tool-card:hover {
  box-shadow: 0 6px 20px var(--shadow-lg);
  transform: translateY(-2px);
  color: var(--text);
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-pale);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
  color: var(--primary);
}

.tool-card h3 {
  font-size: 1rem;
  margin: 0 0 6px;
  color: var(--dark);
  font-family: 'Inter', sans-serif;
}

.tool-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

/* Reassurance section */
.home-reassurance {
  padding: 56px 0;
  background: var(--bg);
}

.home-reassurance-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.home-reassurance-img img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px var(--shadow-lg);
  object-fit: cover;
  max-height: 320px;
}

.home-reassurance-text h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--dark);
}

.home-reassurance-text p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 16px;
}

.home-reassurance-text ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-reassurance-text ul li {
  font-size: 0.92rem;
  color: var(--text);
  padding: 6px 0 6px 24px;
  position: relative;
  line-height: 1.5;
}

.home-reassurance-text ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* Category cards */
.categories-section {
  padding: 56px 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.category-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .2s, border-color .2s;
}

.category-card:hover {
  box-shadow: 0 4px 16px var(--shadow);
  border-color: var(--primary-light);
  color: var(--text);
}

.category-card h3 {
  font-size: 1rem;
  color: var(--primary);
  margin: 0 0 6px;
  font-family: 'Inter', sans-serif;
}

.category-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0 0 10px;
  line-height: 1.5;
}

.category-card .card-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-light);
}

/* Article list (for hub pages) */
.article-list {
  list-style: none;
  padding: 0;
}

.article-list li {
  border-bottom: 1px solid var(--border);
}

.article-list a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  text-decoration: none;
  color: var(--text);
  transition: color .2s;
}

.article-list a:hover { color: var(--primary); }

.article-list .list-thumb {
  width: 80px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.article-list .list-title {
  font-weight: 500;
  font-size: 0.92rem;
}

/* --- Interactive Tools --- */
.tool-container {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 2rem 0;
}

.tool-highlight {
  background: linear-gradient(135deg, #edf3fa 0%, #dce8f5 100%);
  border: 2px solid var(--primary);
  box-shadow: 0 6px 24px rgba(30, 58, 95, 0.15);
  padding: 0;
  overflow: hidden;
}

.tool-highlight-header {
  background: var(--primary);
  color: #fff;
  padding: 20px 32px;
}

.tool-highlight-header h2 {
  color: #fff;
  margin: 0 0 4px;
  font-size: 1.3rem;
  border: none;
  padding: 0;
}

.tool-highlight-header p {
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
  margin: 0;
}

.tool-highlight-body {
  padding: 28px 32px 32px;
}

.tool-container h2 {
  margin-top: 0;
  border-bottom: none;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color .2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-pale);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.btn-secondary:hover { background: var(--primary-pale); }

.result-box {
  background: var(--primary-pale);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

.result-box h3 {
  margin: 0 0 12px;
  color: var(--primary);
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.result-row:last-child { border-bottom: none; }

.result-row .label { color: var(--text-light); }
.result-row .value { font-weight: 600; color: var(--dark); }

.result-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 0;
  margin-top: 8px;
  border-top: 2px solid var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

/* Quiz */
.quiz-progress {
  height: 6px;
  background: var(--bg-alt);
  border-radius: 3px;
  margin-bottom: 24px;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width .4s ease;
}

.quiz-question {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--dark);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.quiz-option {
  display: block;
  padding: 14px 18px;
  background: var(--bg-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  text-align: left;
  color: var(--text);
  transition: border-color .2s, background .2s;
}

.quiz-option:hover {
  border-color: var(--primary-light);
  background: var(--primary-pale);
}

.quiz-option.selected {
  border-color: var(--primary);
  background: var(--primary-pale);
  font-weight: 600;
}

/* --- Footer --- */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 0;
  font-size: 0.85rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand p {
  margin-bottom: 16px;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color .2s;
  font-size: 0.85rem;
}

.footer-col a:hover { color: #fff; }

.footer-service-public {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.footer-service-public img {
  width: 32px;
  height: auto;
}

.footer-service-public a {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
}

.footer-bottom a {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
}

/* --- 404 --- */
.error-404 {
  padding: 80px 20px;
  text-align: center;
}

.error-404-inner {
  max-width: 560px;
  margin: 0 auto;
}

.error-code {
  display: block;
  font-size: 6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 16px;
  font-family: 'Merriweather', serif;
}

.error-404 h1 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.error-404 p {
  color: var(--text-light);
  margin-bottom: 32px;
}

.btn-home {
  display: inline-block;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 48px;
  transition: background .2s;
}

.btn-home:hover { background: var(--primary-hover); color: #fff; }

.error-suggestions h2 {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.error-suggestions ul { list-style: none; }
.error-suggestions li { margin-bottom: 8px; }
.error-suggestions a { color: var(--primary-light); text-decoration: underline; }

/* --- Hub page (category) --- */
.hub-header {
  background: linear-gradient(135deg, var(--primary), var(--dark));
  padding: 48px 0;
  color: #fff;
}

.hub-header h1 { color: #fff; margin-bottom: 8px; }
.hub-header p { color: rgba(255,255,255,0.85); max-width: 640px; margin: 0; }

.hub-content {
  padding: 40px 0 64px;
}

.hub-intro {
  font-size: 1.02rem;
  color: var(--text-light);
  line-height: 1.7;
  max-width: 780px;
  margin-bottom: 28px;
}

.hub-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.hub-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .2s, transform .15s;
}

.hub-card:hover {
  box-shadow: 0 6px 20px var(--shadow);
  transform: translateY(-2px);
  color: var(--text);
}

.hub-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.hub-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-pale) 0%, #d0e0f0 100%);
  font-size: 2.2rem;
  border-bottom: 2px solid var(--border);
}

.hub-card-body {
  padding: 18px 20px;
}

.hub-card-body h3 {
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  margin: 0 0 6px;
  color: var(--dark);
}

.hub-card-body p {
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .sidebar-cta {
    grid-column: 1 / -1;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  html { font-size: 16px; }

  .main-nav { display: none; }
  .burger { display: flex; }

  .page-hero h1 { font-size: 1.6rem; }
  .page-hero-content { padding: 32px 24px; }
  .page-hero { min-height: 220px; }

  .home-hero-inner { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .home-hero-text h1 { font-size: 1.8rem; }
  .home-hero-img img { max-width: 340px; }
  .home-hero { padding: 40px 0; }
  .home-reassurance-inner { grid-template-columns: 1fr; gap: 24px; }
  .home-reassurance-img { order: -1; }
  .home-reassurance-img img { max-height: 240px; width: 100%; }

  .hub-articles {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .tool-container {
    padding: 20px 16px;
  }

  .tool-highlight {
    padding: 0;
  }

  .tool-highlight-body {
    padding: 20px 16px 24px;
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .page-hero h1 { font-size: 1.4rem; }
  .hero-intro { font-size: 0.9rem; }

  .article-layout { padding: 20px 16px 48px; }
}
