/* ═══════════════════════════════════════════════════════════════════════════
   SECU.OUAISFIEU — DOMINATION COGNITIVE CSS
   Site nucléaire SEO/GEO — Malades longue durée Belgique
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── VARIABLES & TOKENS ─────────────────────────────────────────────────── */
:root {
  /* Couleurs sémantiques */
  --c-danger: #dc2626;
  --c-danger-dark: #991b1b;
  --c-warning: #f59e0b;
  --c-warning-dark: #b45309;
  --c-info: #0ea5e9;
  --c-info-dark: #0369a1;
  --c-success: #10b981;
  --c-success-dark: #047857;
  
  /* Palette principale */
  --c-primary: #1e3a5f;
  --c-primary-light: #2d5a8a;
  --c-secondary: #64748b;
  --c-accent: #dc2626;
  
  /* Neutres */
  --c-bg: #fafafa;
  --c-bg-alt: #ffffff;
  --c-bg-dark: #111827;
  --c-text: #1f2937;
  --c-text-muted: #6b7280;
  --c-text-inverse: #f9fafb;
  --c-border: #e5e7eb;
  --c-border-dark: #d1d5db;
  
  /* Typographie */
  --f-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --f-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
  --f-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  
  /* Tailles */
  --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --fs-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --fs-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --fs-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
  --fs-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --fs-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --fs-3xl: clamp(1.875rem, 1.5rem + 2vw, 2.5rem);
  --fs-4xl: clamp(2.25rem, 1.8rem + 2.5vw, 3.5rem);
  
  /* Espacements */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;
  
  /* Layout */
  --max-w-prose: 72ch;
  --max-w-content: 1200px;
  --max-w-wide: 1400px;
  
  /* Effets */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --transition: 200ms ease;
  --transition-slow: 400ms ease;
}

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

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

body {
  font-family: var(--f-sans);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-primary-light); }
a:focus-visible { outline: 2px solid var(--c-info); outline-offset: 2px; }

::selection { background: var(--c-primary); color: white; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-sans);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-text);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 { font-size: var(--fs-4xl); margin-top: 0; }
h2 { font-size: var(--fs-3xl); border-bottom: 2px solid var(--c-border); padding-bottom: var(--sp-2); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-base); text-transform: uppercase; letter-spacing: 0.05em; }

p { margin-bottom: 1.25em; }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 600; color: var(--c-text); }
em, i { font-style: italic; }

blockquote {
  border-left: 4px solid var(--c-primary);
  margin: var(--sp-6) 0;
  padding: var(--sp-4) var(--sp-6);
  background: var(--c-bg-alt);
  font-style: italic;
  font-size: var(--fs-lg);
  border-radius: 0 var(--radius) var(--radius) 0;
}

blockquote cite {
  display: block;
  margin-top: var(--sp-2);
  font-style: normal;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

blockquote cite::before { content: "— "; }

code {
  font-family: var(--f-mono);
  font-size: 0.9em;
  background: var(--c-bg);
  padding: 0.1em 0.3em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
}

pre {
  background: var(--c-bg-dark);
  color: var(--c-text-inverse);
  padding: var(--sp-4);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: var(--sp-6) 0;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w-content);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

.container--wide { max-width: var(--max-w-wide); }
.container--prose { max-width: var(--max-w-prose); }

.section {
  padding: var(--sp-16) 0;
}

.section--alt { background: var(--c-bg-alt); }
.section--dark { background: var(--c-bg-dark); color: var(--c-text-inverse); }
.section--accent { background: var(--c-primary); color: var(--c-text-inverse); }

/* ─── HEADER ─────────────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--c-bg-alt);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  max-width: var(--max-w-wide);
  margin: 0 auto;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--c-text);
}

.header__brand:hover { color: var(--c-primary); }

.header__logo {
  width: 2.5rem;
  height: 2.5rem;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.header__link {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-muted);
  transition: all var(--transition);
}

.header__link:hover,
.header__link--active {
  color: var(--c-primary);
  background: rgba(30, 58, 95, 0.05);
}

.header__cta {
  background: var(--c-accent);
  color: white !important;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--fs-sm);
}

.header__cta:hover {
  background: var(--c-danger-dark);
}

/* Mobile nav */
.header__toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--sp-2);
  cursor: pointer;
}

@media (max-width: 768px) {
  .header__nav { 
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-bg-alt);
    flex-direction: column;
    padding: var(--sp-4);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow);
  }
  .header__nav--open { display: flex; }
  .header__toggle { display: block; }
}

/* ─── HERO ───────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-light) 100%);
  color: white;
  padding: var(--sp-16) 0;
  text-align: center;
}

.hero--danger {
  background: linear-gradient(135deg, var(--c-danger-dark) 0%, var(--c-danger) 100%);
}

.hero__badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: var(--sp-1) var(--sp-3);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--sp-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero__title {
  font-size: var(--fs-4xl);
  margin: 0 0 var(--sp-4);
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero__subtitle {
  font-size: var(--fs-xl);
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto var(--sp-8);
  line-height: 1.5;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--sp-8);
  flex-wrap: wrap;
  margin-top: var(--sp-8);
}

.hero__stat {
  text-align: center;
}

.hero__stat-value {
  display: block;
  font-size: var(--fs-3xl);
  font-weight: 800;
}

.hero__stat-label {
  font-size: var(--fs-sm);
  opacity: 0.8;
}

/* ─── CARDS ──────────────────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-6);
}

.card {
  background: var(--c-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow);
  border: 1px solid var(--c-border);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card--link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card__icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--sp-4);
  color: var(--c-primary);
}

.card__tag {
  display: inline-block;
  background: var(--c-primary);
  color: white;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-3);
}

.card__tag--danger { background: var(--c-danger); }
.card__tag--warning { background: var(--c-warning); color: var(--c-text); }
.card__tag--info { background: var(--c-info); }
.card__tag--success { background: var(--c-success); }

.card__title {
  font-size: var(--fs-xl);
  margin: 0 0 var(--sp-2);
}

.card__desc {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  margin: 0;
}

.card__meta {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  display: flex;
  justify-content: space-between;
}

/* ─── ALERTS / NOTICES ───────────────────────────────────────────────────── */
.alert {
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--radius);
  margin: var(--sp-6) 0;
  border-left: 4px solid;
}

.alert--danger {
  background: #fef2f2;
  border-color: var(--c-danger);
  color: var(--c-danger-dark);
}

.alert--warning {
  background: #fffbeb;
  border-color: var(--c-warning);
  color: var(--c-warning-dark);
}

.alert--info {
  background: #f0f9ff;
  border-color: var(--c-info);
  color: var(--c-info-dark);
}

.alert--success {
  background: #f0fdf4;
  border-color: var(--c-success);
  color: var(--c-success-dark);
}

.alert__title {
  font-weight: 700;
  margin-bottom: var(--sp-1);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.alert__icon { width: 1.25rem; height: 1.25rem; }

/* ─── TABLES ─────────────────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  margin: var(--sp-6) 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-bg-alt);
  font-size: var(--fs-sm);
}

th, td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}

th {
  background: var(--c-primary);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
}

tr:hover td { background: rgba(30, 58, 95, 0.02); }
tr:last-child td { border-bottom: none; }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--c-primary);
  color: white;
}
.btn--primary:hover { background: var(--c-primary-light); color: white; }

.btn--danger {
  background: var(--c-danger);
  color: white;
}
.btn--danger:hover { background: var(--c-danger-dark); color: white; }

.btn--outline {
  background: transparent;
  border: 2px solid var(--c-primary);
  color: var(--c-primary);
}
.btn--outline:hover { background: var(--c-primary); color: white; }

.btn--ghost {
  background: transparent;
  color: var(--c-text-muted);
}
.btn--ghost:hover { color: var(--c-primary); background: rgba(30,58,95,0.05); }

.btn--lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--fs-base);
}

.btn__icon { width: 1.25rem; height: 1.25rem; }

/* ─── TOC ────────────────────────────────────────────────────────────────── */
.toc {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  margin: var(--sp-8) 0;
}

.toc__title {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-4);
}

.toc__list {
  list-style: none;
}

.toc__list--nested {
  margin-left: var(--sp-4);
  margin-top: var(--sp-2);
}

.toc__item { margin-bottom: var(--sp-2); }

.toc__link {
  display: block;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  transition: all var(--transition);
}

.toc__link:hover {
  color: var(--c-primary);
  background: rgba(30,58,95,0.05);
}

/* ─── ARTICLE ────────────────────────────────────────────────────────────── */
.article {
  padding: var(--sp-12) 0;
}

.article__header {
  text-align: center;
  margin-bottom: var(--sp-12);
}

.article__meta {
  display: flex;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  margin-top: var(--sp-4);
}

.article__content {
  max-width: var(--max-w-prose);
  margin: 0 auto;
}

.article__content > * + * {
  margin-top: var(--sp-6);
}

/* ─── DATA HIGHLIGHT ─────────────────────────────────────────────────────── */
.data-box {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-light) 100%);
  color: white;
  padding: var(--sp-8);
  border-radius: var(--radius-xl);
  text-align: center;
  margin: var(--sp-8) 0;
}

.data-box__value {
  font-size: var(--fs-4xl);
  font-weight: 800;
  display: block;
}

.data-box__label {
  font-size: var(--fs-lg);
  opacity: 0.9;
}

.data-box__source {
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  opacity: 0.7;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
  margin: var(--sp-8) 0;
}

.data-grid__item {
  background: var(--c-bg-alt);
  padding: var(--sp-6);
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--c-border);
}

.data-grid__value {
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--c-primary);
}

.data-grid__label {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  margin-top: var(--sp-1);
}

/* ─── TIMELINE ───────────────────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: var(--sp-8);
  margin: var(--sp-8) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--c-border);
}

.timeline__item {
  position: relative;
  padding-bottom: var(--sp-8);
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__marker {
  position: absolute;
  left: calc(-1 * var(--sp-8) + 0.5rem);
  width: 1rem;
  height: 1rem;
  background: var(--c-primary);
  border-radius: 50%;
  border: 3px solid var(--c-bg);
}

.timeline__item--danger .timeline__marker { background: var(--c-danger); }
.timeline__item--warning .timeline__marker { background: var(--c-warning); }

.timeline__date {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: var(--sp-1);
}

.timeline__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}

.timeline__desc {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

/* ─── ACCORDION / FAQ ────────────────────────────────────────────────────── */
.accordion {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--sp-6) 0;
}

.accordion__item {
  border-bottom: 1px solid var(--c-border);
}

.accordion__item:last-child { border-bottom: none; }

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  background: var(--c-bg-alt);
  border: none;
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}

.accordion__trigger:hover { background: var(--c-bg); }

.accordion__icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform var(--transition);
}

.accordion__item--open .accordion__icon { transform: rotate(180deg); }

.accordion__content {
  display: none;
  padding: var(--sp-4) var(--sp-6);
  background: white;
}

.accordion__item--open .accordion__content { display: block; }

/* ─── SHARE BAR ──────────────────────────────────────────────────────────── */
.share {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--c-bg-alt);
  border-radius: var(--radius);
  margin: var(--sp-8) 0;
}

.share__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-text-muted);
}

.share__btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--c-bg);
  color: var(--c-text-muted);
  transition: all var(--transition);
}

.share__btn:hover {
  background: var(--c-primary);
  color: white;
}

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
.footer {
  background: var(--c-bg-dark);
  color: var(--c-text-inverse);
  padding: var(--sp-16) 0 var(--sp-8);
  margin-top: auto;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-8);
  margin-bottom: var(--sp-12);
}

.footer__title {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-4);
  color: var(--c-text-inverse);
}

.footer__links {
  list-style: none;
}

.footer__link {
  display: block;
  padding: var(--sp-1) 0;
  color: rgba(255,255,255,0.7);
  font-size: var(--fs-sm);
  transition: color var(--transition);
}

.footer__link:hover { color: white; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.5);
}

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

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--c-text-muted); }
.text-danger { color: var(--c-danger); }
.text-success { color: var(--c-success); }
.text-primary { color: var(--c-primary); }

.font-bold { font-weight: 700; }
.font-mono { font-family: var(--f-mono); }

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-4 { margin-top: var(--sp-4); }
.mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-8 { margin-bottom: var(--sp-8); }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-4 { gap: var(--sp-4); }
.gap-8 { gap: var(--sp-8); }

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

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─── PRINT ──────────────────────────────────────────────────────────────── */
@media print {
  .header, .footer, .share, .toc, .btn { display: none !important; }
  body { font-size: 12pt; line-height: 1.5; }
  a { color: inherit; text-decoration: underline; }
  .section { padding: 1rem 0; }
}