/* ════════════════════════════════════════════════════════════
   SNH CONNECT — Design System Souverain
   Service National de l'Hygiène · République du Sénégal
   ════════════════════════════════════════════════════════════ */

/* --- Design Tokens ------------------------------------------ */
:root {
  /* Palette sénégalaise officielle */
  --sn-green: #00853F;
  --sn-green-dark: #006830;
  --sn-green-light: #1BA259;
  --sn-gold: #FDEF42;
  --sn-red: #E31B23;
  --sn-white: #FFFFFF;
  --sn-black: #0A0F0D;
  --sn-gold-premium: #C9A84C;

  /* Bleu santé / hospitalier */
  --snh-blue: #196EE6;
  --snh-blue-light: #64A6FF;
  --snh-cyan: #10B981;
  --snh-emerald: #34D399;
  --snh-alert: #FF6B6E;

  /* Surfaces */
  --surface-0: #FFFFFF;
  --surface-1: #FAFAFB;
  --surface-2: #F1F3F5;
  --surface-3: #E9ECEF;
  --surface-dark-0: #0A0F0D;
  --surface-dark-1: #111827;
  --surface-dark-2: #1F2937;
  --surface-dark-3: #374151;

  /* Texte */
  --text-primary: #0F1020;
  --text-secondary: #4A4E69;
  --text-muted: #8A8FA3;
  --text-inverse: #FFFFFF;

  /* Bordures */
  --border-subtle: rgba(15, 16, 32, 0.08);
  --border-medium: rgba(15, 16, 32, 0.15);
  --border-strong: rgba(15, 16, 32, 0.25);

  /* Ombres */
  --shadow-xs: 0 1px 2px rgba(15, 16, 32, 0.04);
  --shadow-sm: 0 2px 4px rgba(15, 16, 32, 0.06), 0 1px 2px rgba(15, 16, 32, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 16, 32, 0.08), 0 2px 4px rgba(15, 16, 32, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 16, 32, 0.12), 0 4px 8px rgba(15, 16, 32, 0.06);
  --shadow-xl: 0 24px 64px rgba(15, 16, 32, 0.18), 0 8px 16px rgba(15, 16, 32, 0.08);
  --shadow-snh: 0 8px 24px rgba(0, 133, 63, 0.25);
  --shadow-emergency: 0 8px 24px rgba(227, 27, 35, 0.25);

  /* Rayons */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Typographie */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Échelle typographique */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.5rem;
  --fs-4xl: 3.25rem;
  --fs-5xl: 4rem;
  --fs-6xl: 5.5rem;

  /* Espacements */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 180ms var(--ease-out);
  --t-base: 280ms var(--ease-out);
  --t-slow: 480ms var(--ease-out);

  /* Gradients signature */
  --grad-senegal: linear-gradient(135deg, #00853F 0%, #1BA259 100%);
  --grad-gold: linear-gradient(135deg, #C9A84C 0%, #FDEF42 100%);
  --grad-hospital: linear-gradient(135deg, #00853F 0%, #196EE6 100%);
  --grad-night: linear-gradient(135deg, #0A0F0D 0%, #1F2937 100%);
  --grad-emergency: linear-gradient(135deg, #E31B23 0%, #FF6B6E 100%);
  --grad-hero: linear-gradient(135deg, #00853F 0%, #1F2937 65%, #196EE6 100%);

  /* Layout */
  --container-xs: 640px;
  --container-sm: 768px;
  --container-md: 1024px;
  --container-lg: 1280px;
  --container-xl: 1440px;
}

/* --- Reset ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* --- Typographie --------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
h1 { font-size: clamp(2.25rem, 4vw, var(--fs-5xl)); }
h2 { font-size: clamp(1.75rem, 3vw, var(--fs-4xl)); }
h3 { font-size: clamp(1.5rem, 2.2vw, var(--fs-3xl)); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p { max-width: 68ch; }
.lead { font-size: var(--fs-md); color: var(--text-secondary); line-height: 1.7; }

/* --- Utilities ----------------------------------------------- */
.container { width: 100%; max-width: var(--container-xl); margin: 0 auto; padding: 0 var(--sp-6); }
.section { padding: var(--sp-24) 0; }
.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.mt-4 { margin-top: var(--sp-4); }
.mb-4 { margin-bottom: var(--sp-4); }
.text-center { text-align: center; }

/* --- Boutons ------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 700; font-size: var(--fs-sm);
  cursor: pointer; border: none;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-snh { background: var(--grad-senegal); color: #fff; box-shadow: var(--shadow-snh); }
.btn-snh:hover { box-shadow: 0 12px 32px rgba(0,133,63,0.35); }
.btn-gold { background: var(--grad-gold); color: var(--sn-black); }
.btn-emergency { background: var(--grad-emergency); color: #fff; box-shadow: var(--shadow-emergency); }
.btn-ghost { background: transparent; border: 1.5px solid var(--border-medium); color: var(--text-primary); }
.btn-dark { background: var(--sn-black); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: var(--fs-xs); }
.btn-lg { padding: 16px 28px; font-size: var(--fs-md); }

/* --- Eyebrow / Tag -------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.2em;
  color: var(--sn-green); text-transform: uppercase;
}
.eyebrow::before {
  content: ''; width: 18px; height: 2px; background: var(--sn-gold-premium);
}

/* --- Drapeau Sénégal helpers ---------------------------------- */
.flag-divider {
  display: inline-flex; gap: 3px;
  width: 60px; height: 5px;
}
.flag-divider span {
  flex: 1; height: 100%; border-radius: 2px;
}
.flag-divider span:nth-child(1) { background: var(--sn-green); }
.flag-divider span:nth-child(2) { background: var(--sn-gold); }
.flag-divider span:nth-child(3) { background: var(--sn-red); }

/* --- Animations ----------------------------------------------- */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

/* --- Scrollbar custom ----------------------------------------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--sn-green); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--sn-green-dark); }

/* --- Inclusion : Audio Wolof bouton géant --------------------- */
.voice-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--grad-senegal);
  color: #fff;
  border: 4px solid var(--sn-gold);
  box-shadow: 0 12px 32px rgba(0,133,63,0.35);
  cursor: pointer;
  transition: transform var(--t-fast);
}
.voice-button:hover { transform: scale(1.08); }
.voice-button.recording {
  background: var(--grad-emergency);
  border-color: var(--sn-gold);
  animation: pulse 1.5s infinite;
}
