/**
 * ═══════════════════════════════════════════════════════════════════════════
 * CHARTE GRAPHIQUE PREMIUM V3.0 — COMMUNE DE N'ZÉRÉKORÉ
 * Design System Institutionnel de Nouvelle Génération
 * Septembre 2026
 *
 * Inspirations : gov.uk, service-public.fr, canada.ca, estonia.ee
 * Principes : Clarté • Accessibilité • Modernité • Efficacité
 * ═══════════════════════════════════════════════════════════════════════════
 *
 * ORGANISATION :
 *  1. Polices Google Fonts optimisées
 *  2. Design Tokens (Variables CSS)
 *  3. Thèmes (Clair / Sombre)
 *  4. Reset & Base
 *  5. Typographie raffinée
 *  6. Système de grille moderne
 *  7. Composants UI
 *  8. Navigation & Header
 *  9. Hero Sections
 * 10. Cards & Media
 * 11. Forms
 * 12. Buttons
 * 13. Alerts & Notifications
 * 14. Tables
 * 15. Footer
 * 16. Utilitaires
 * 17. Animations
 * 18. Responsive
 * 19. Print
 *
 * ═══════════════════════════════════════════════════════════════════════════
 */


/* ═══════════════════════════════════════════════════════════════════════════
   1. POLICES GOOGLE FONTS OPTIMISÉES
   ═══════════════════════════════════════════════════════════════════════════

   Public Sans : développée par l'USWDS pour les sites gouvernementaux,
   elle porte à elle seule le texte courant et l'interface

   display=swap : Affichage immédiat avec font de secours, puis swap
*/
/* Import retiré : Public Sans est déjà chargée depuis l'en-tête, et un
   @import enchaîne deux allers-retours supplémentaires. Inter faisait
   doublon avec elle pour 47 ko, sur un site dont 90 % des visites se
   font au téléphone. */


/* ═══════════════════════════════════════════════════════════════════════════
   2. DESIGN TOKENS (Variables CSS Sémantiques)
   ═══════════════════════════════════════════════════════════════════════════

   Approche "tokens" : les couleurs ont un SENS, pas juste un nom
*/
:root {
  /* ━━━ Palette Institutionnelle Guinéenne ━━━ */

  /* Bleu Républicain (Principal) */
  --blue-900: #1c2a39;
  --blue-800: #233c57;
  --blue-700: #305074;
  --blue-600: #3e6998;
  --blue-500: #4a7db5;
  --blue-100: #eef2f7;
  --blue-50: #f5f7fa;

  /* Vert Guinéen (Accent) */
  --green-900: #222b27;
  --green-800: #35453f;
  --green-700: #455951;
  --green-600: #577066;
  --green-500: #627e73;
  --green-100: #eef1f0;
  --green-50: #f5f7f6;

  /* Rouge Guinéen (Alerte) */
  --red-900: #673632;
  --red-800: #763c38;
  --red-700: #974d48;
  --red-600: #ad605a;
  --red-100: #f6eeee;
  --red-50: #faf5f5;

  /* Jaune Guinéen (Attention) */
  --yellow-900: #86533f;
  --yellow-800: #97573d;
  --yellow-700: #b97559;
  --yellow-600: #c89079;
  --yellow-100: #f7f1ee;
  --yellow-50: #faf6f5;

  /* Neutres (Grays) */
  --slate-900: #171c22;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #3a3a3a;
  --slate-500: #3a3a3a;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #ffffff;
  --slate-50: #f8fafc;
  --white: #ffffff;

  /* ━━━ Tokens Sémantiques (Ce que le CSS utilise) ━━━ */

  /* Couleurs de fond - Adoucis pour réduire la fatigue visuelle */
  --surface-ground: #ffffff;      /* Blanc pur : aucun fond de page teinté */
  --surface-elevated: var(--white);       /* Blanc pour les cartes et éléments élevés */
  --surface-overlay: var(--white);
  --surface-interactive: var(--blue-50);

  /* Couleurs de texte */
  --text-primary: #111111;
  --text-secondary: var(--slate-700);
  --text-tertiary: var(--slate-500);
  --text-inverse: var(--white);
  --text-link: var(--blue-700);
  --text-link-hover: var(--blue-900);

  /* Couleurs d'action */
  --action-primary: var(--blue-700);
  --action-primary-hover: var(--blue-900);
  --action-primary-active: var(--blue-800);
  --action-secondary: var(--green-700);
  --action-secondary-hover: var(--green-900);

  /* Couleurs de feedback */
  --feedback-success: var(--green-700);
  --feedback-success-bg: var(--green-50);
  --feedback-warning: var(--yellow-700);
  --feedback-warning-bg: var(--yellow-50);
  --feedback-error: var(--red-700);
  --feedback-error-bg: var(--red-50);
  --feedback-info: var(--blue-700);
  --feedback-info-bg: var(--blue-50);

  /* Bordures */
  --border-subtle: var(--slate-200);
  --border-default: var(--slate-300);
  --border-strong: var(--slate-400);
  --border-interactive: var(--blue-700);

  /* ━━━ Typographie ━━━ */
  --font-display: 'Public Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;

  /* Échelle typographique modulaire (ratio 1.25) */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */

  /* Line heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* ━━━ Spacing (Système 8px) ━━━ */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* ━━━ Radius (Coins arrondis) ━━━ */
  --radius-none: 0;
  --radius-sm: 0.25rem;    /* 4px */
  --radius-base: 0.375rem; /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* ━━━ Shadows (Ombres) ━━━ */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 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);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* ━━━ Transitions ━━━ */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ━━━ Layout ━━━ */
  --container-max: 1280px;
  --container-lg: 1024px;
  --container-md: 768px;
  --container-sm: 640px;
  --gutter: var(--space-6);
  --gutter-mobile: var(--space-4);

  /* ━━━ Z-Index Scale ━━━ */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-popover: 500;
  --z-toast: 600;

  /* Indique au navigateur que le site supporte les deux thèmes */
  color-scheme: light;
}


/* ═══════════════════════════════════════════════════════════════════════════
   3. PAS DE THÈME SOMBRE
   Le site n'a qu'une seule livrée : fonds blancs, titres encre. Les blocs
   « prefers-color-scheme: dark » basculaient --text-primary vers #f8fafc
   alors que les surfaces restaient blanches : chez tout visiteur dont le
   système est en mode sombre, les titres devenaient blancs sur blanc.
   ═══════════════════════════════════════════════════════════════════════════
*/


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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background: var(--surface-ground);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
}

button, [role="button"] {
  cursor: pointer;
}

/* Sélection de texte */
::selection {
  background: var(--action-primary);
  color: var(--text-inverse);
}

/* Scrollbar personnalisée (Webkit) */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--surface-elevated);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-md);
  border: 2px solid var(--surface-elevated);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   5. TYPOGRAPHIE RAFFINÉE
   ═══════════════════════════════════════════════════════════════════════════
*/
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--text-primary);
  text-wrap: balance;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl));
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}

h2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: 700;
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

h5, h6 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

p {
  margin-bottom: var(--space-4);
  max-width: 65ch;
  line-height: var(--leading-relaxed);
}

.text-lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  font-weight: 400;
}

.text-small {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.text-xs {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* Liens */
a {
  color: var(--text-link);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  text-decoration-color: currentColor;
  transition: all var(--transition-fast);
}

a:hover {
  color: var(--text-link-hover);
  text-decoration-thickness: 2px;
}

/* Focus visible (accessibilité) */
:focus-visible {
  outline: 3px solid var(--action-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ═══════════════════════════════════════════════════════════════════════════
   6. SYSTÈME DE GRILLE MODERNE
   ═══════════════════════════════════════════════════════════════════════════
*/
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter-mobile);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--gutter);
  }
}

.container-lg { max-width: var(--container-lg); }
.container-md { max-width: var(--container-md); }
.container-sm { max-width: var(--container-sm); }

/* Grid System */
.grid {
  display: grid;
  gap: var(--gutter);
}

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

/* Auto-fit grid (responsive automatique) */
.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.grid-auto-sm {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.grid-auto-lg {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

/* Flex utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

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

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Section spacing */
.section {
  padding-block: var(--space-16);
}

.section-sm {
  padding-block: var(--space-12);
}

.section-lg {
  padding-block: var(--space-24);
}

.section-alt {
  background: var(--surface-elevated);
}


/* ═══════════════════════════════════════════════════════════════════════════
   7. COMPOSANTS UI - CARDS
   ═══════════════════════════════════════════════════════════════════════════
*/
.card {
  background: var(--surface-ground);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-default);
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  border-color: var(--border-interactive);
}

.card-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-5);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.card-body {
  padding: var(--space-5) 0;
}

.card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
  margin-top: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Card variants */
.card-elevated {
  border: none;
}

.card-bordered {
  border: 2px solid var(--border-default);
}

.card-accent {
  border-left: 4px solid var(--action-primary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   8. NAVIGATION & HEADER
   ═══════════════════════════════════════════════════════════════════════════
*/
.site-header {
  background: var(--surface-ground);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  transition: all var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--action-primary);
  transition: opacity var(--transition-fast);
}

.site-logo:hover {
  opacity: 0.85;
}

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

.main-nav {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-4);
  right: var(--space-4);
  height: 2px;
  background: var(--action-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.nav-link:hover {
  background: var(--surface-interactive);
  color: var(--action-primary);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  font-weight: 700;
  color: var(--action-primary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   9. HERO SECTIONS
   ═══════════════════════════════════════════════════════════════════════════
*/
.hero {
  position: relative;
  padding-block: var(--space-24);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--action-primary) 0%,
    var(--action-primary-hover) 100%
  );
  opacity: 0.05;
  z-index: -1;
}

.hero-content {
  max-width: 800px;
}

.hero-title {
  font-size: clamp(var(--text-4xl), 8vw, var(--text-6xl));
  font-weight: 900;
  line-height: var(--leading-none);
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--action-primary), var(--action-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
  max-width: 60ch;
}

/* Hero with image background */
.hero-image {
  background-size: cover;
  background-position: center;
  color: var(--text-inverse);
}

.hero-image::before {
  background: linear-gradient(
    to right,
    rgba(0, 40, 85, 0.95) 0%,
    rgba(0, 40, 85, 0.7) 60%,
    rgba(0, 85, 164, 0.4) 100%
  );
  opacity: 1;
}

.hero-image .hero-title {
  color: var(--text-inverse);
  -webkit-text-fill-color: var(--text-inverse);
  background: none;
}

.hero-image .hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
}


/* ═══════════════════════════════════════════════════════════════════════════
   10. BUTTONS
   ═══════════════════════════════════════════════════════════════════════════
*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: var(--leading-none);
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  min-height: 44px; /* Accessibilité touch */
}

.btn-primary {
  background: var(--action-primary);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: var(--action-primary-hover);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--action-secondary);
  color: var(--text-inverse);
}

.btn-secondary:hover {
  background: var(--action-secondary-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--action-primary);
  border-color: var(--action-primary);
}

.btn-outline:hover {
  background: var(--action-primary);
  color: var(--text-inverse);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
}

.btn-ghost:hover {
  background: var(--surface-interactive);
  color: var(--action-primary);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  min-height: 36px;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  min-height: 52px;
}

.btn-block {
  width: 100%;
}


/* ═══════════════════════════════════════════════════════════════════════════
   11. FORMS
   ═══════════════════════════════════════════════════════════════════════════
*/
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  font-family: var(--font-display);
}

.form-label-required::after {
  content: ' *';
  color: var(--feedback-error);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-ground);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--border-strong);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-interactive);
  box-shadow: 0 0 0 4px var(--surface-interactive);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-help {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

.form-error {
  display: block;
  font-size: var(--text-sm);
  color: var(--feedback-error);
  font-weight: 500;
  margin-top: var(--space-2);
}

.form-input.is-invalid {
  border-color: var(--feedback-error);
}

.form-input.is-invalid:focus {
  box-shadow: 0 0 0 4px var(--feedback-error-bg);
}


/* ═══════════════════════════════════════════════════════════════════════════
   12. ALERTS & NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════
*/
.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  border-left: 4px solid;
  margin-block: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.alert-icon {
  flex-shrink: 0;
  font-size: var(--text-xl);
  line-height: 1;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 700;
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
}

.alert-info {
  background: var(--feedback-info-bg);
  border-left-color: var(--feedback-info);
  color: var(--text-primary);
}

.alert-success {
  background: var(--feedback-success-bg);
  border-left-color: var(--feedback-success);
  color: var(--text-primary);
}

.alert-warning {
  background: var(--feedback-warning-bg);
  border-left-color: var(--feedback-warning);
  color: var(--text-primary);
}

.alert-error {
  background: var(--feedback-error-bg);
  border-left-color: var(--feedback-error);
  color: var(--text-primary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   13. TABLES
   ═══════════════════════════════════════════════════════════════════════════
*/
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-block: var(--space-6);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

thead {
  background: var(--surface-elevated);
}

thead th {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-default);
}

tbody td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

tbody tr:hover {
  background: var(--surface-elevated);
}

tbody tr:last-child td {
  border-bottom: none;
}


/* ═══════════════════════════════════════════════════════════════════════════
   14. FOOTER
   ═══════════════════════════════════════════════════════════════════════════
*/
.site-footer {
  background: var(--surface-elevated);
  border-top: 1px solid var(--border-subtle);
  padding-block: var(--space-16);
  margin-top: var(--space-24);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer-section h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--text-sm);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-link);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}


/* ═══════════════════════════════════════════════════════════════════════════
   15. UTILITAIRES
   ═══════════════════════════════════════════════════════════════════════════
*/

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--action-primary);
  color: var(--text-inverse);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  z-index: var(--z-popover);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Spacing utilities */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Font weights */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }


/* ═══════════════════════════════════════════════════════════════════════════
   16. ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════
*/
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-up {
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ═══════════════════════════════════════════════════════════════════════════
   17. RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════
*/
@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-block: var(--space-16);
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    padding: var(--space-3) var(--space-4);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Stats responsive - 3 colonnes sur tablette */
  .hf-stats__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  /* Stats responsive - 2 colonnes sur mobile */
  .hf-stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hf-stat {
    padding: 24px 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hf-stat:nth-last-child(-n+2) {
    border-bottom: none;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   18. HOME PAGE - STATISTICS SECTION
   ═══════════════════════════════════════════════════════════════════════════
*/

/* Bandeau statistiques avec fond sombre et chiffres contrastés */
.hf-stats {
  background: linear-gradient(135deg, #171c22 0%, #1e293b 100%);
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* Grille responsive 6 colonnes */
.hf-stats__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

/* Cellule statistique */
.hf-stat {
  padding: 32px 20px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.hf-stat:last-child {
  border-right: none;
}

/* Chiffres - Blanc pur pour contraste AAA */
.hf-stat__num {
  font-size: clamp(1.4rem, 2vw, 2.2rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

/* Accent vert - Plus clair et plus contrasté sur fond sombre */
.hf-stat__num-accent {
  color: #3a3a3a; /* Vert clair contrasté (WCAG AAA) */
}

/* Label - Blanc avec opacité élevée */
.hf-stat__label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sous-texte - Gris clair */
.hf-stat__sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.70);
  margin-top: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   19. REDUCED MOTION & PRINT
   ═══════════════════════════════════════════════════════════════════════════
*/
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .nav,
  .btn,
  .skip-link {
    display: none;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  a {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }

  .section {
    padding-block: 1rem;
    page-break-inside: avoid;
  }
}
