/* ============================================================
   COCPEH — Design System Global CSS
   ONG Internationale — Niveau Mondial
   ============================================================ */

@import url('/css/tokens.css');

/* ---- CSS Variables ---- */
:root {
  /* Color Palette - Eco & Haiti Vibe */
  --primary: #1B4D3E;       /* Deep Forest Green */
  --primary-light: #2A7955; /* Leaf Green */
  --primary-dark: #0F3124;  /* Dark Forest */
  --accent: #E63946;        /* Haiti Red */
  --accent-light: #F25C68;
  --accent-dark: #B92A36;
  --teal: #004D99;          /* Haiti Blue instead of Teal */
  --teal-light: #1A6CBE;
  --teal-dark: #003673;
  --success: #2EC4B6;
  --warning: #FFB703;
  --danger: #E63946;
  --white: #FFFFFF;
  --ivory: #F8FAF8;         /* Slightly greenish ivory */
  --light-gray: #E0E8E3;
  --mid-gray: #A3B5AE;
  --dark-gray: #4A5751;
  --charcoal: #19221F;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, rgba(27,77,62,0.92) 0%, rgba(0,77,153,0.75) 100%);
  --gradient-accent: linear-gradient(135deg, #E63946 0%, #004D99 100%);
  --gradient-teal: linear-gradient(135deg, #004D99 0%, #1A6CBE 100%);
  --gradient-dark: linear-gradient(180deg, #1B4D3E 0%, #0F3124 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9) 0%, rgba(248,250,248,0.95) 100%);

  /* Typography */
  --font-title: var(--font-display);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(27,77,62,0.08);
  --shadow-md: 0 4px 20px rgba(27,77,62,0.12);
  --shadow-lg: 0 8px 40px rgba(27,77,62,0.18);
  --shadow-xl: 0 16px 60px rgba(27,77,62,0.25);
  --shadow-accent: 0 8px 30px rgba(230,57,70,0.35);
  --shadow-teal: 0 8px 30px rgba(0,77,153,0.30);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-nav: 1000;
  --z-modal: 2000;
  --z-toast: 3000;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Le reset ci-dessus (box-sizing: border-box global) deforme les controles
   de Leaflet (boutons zoom +/-, calques) : sa feuille de style est ecrite
   pour du content-box. On le restaure uniquement dans l'arbre de la carte. */
.leaflet-container, .leaflet-container * { box-sizing: content-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  line-height: 1.2;
  font-weight: 700;
  color: var(--primary);
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }

p { margin-bottom: var(--space-md); color: var(--dark-gray); font-size: 1rem; }
a { text-decoration: none; color: inherit; transition: color var(--transition-base); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ---- Container ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}
@media (max-width: 768px) { .container { padding: 0 var(--space-md); } }

/* ---- Section Styles ---- */
.section { padding: var(--space-3xl) 0; }
.section--dark { background: var(--primary); color: var(--white); }
.section--dark h2, .section--dark h3, .section--dark p { color: var(--white); }
.section--ivory { background: var(--ivory); }
.section--accent { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); }

.section-label {
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  display: block;
}

.section-title {
  margin-bottom: var(--space-md);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  margin-top: var(--space-sm);
}

.section-title.centered::after { margin: var(--space-sm) auto 0; }
.section-title.centered { text-align: center; }
.section-subtitle { font-size: 1.1rem; max-width: 640px; color: var(--dark-gray); }
.section-subtitle.centered { text-align: center; margin: 0 auto; }

/* ---- Navigation ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  padding: var(--space-md) 0;
  transition: all var(--transition-slow);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(27, 77, 62, 0.97); /* Forest Green dark */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  box-shadow: var(--shadow-lg);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.navbar-logo {
  width: 44px; height: 44px;
  background: var(--white);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  padding: 4px;
  overflow: hidden;
}

.navbar-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}

.navbar-name {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: 1px;
}

.navbar-tagline {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 1px;
  line-height: 1;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  letter-spacing: 0.5px;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,0.12);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  padding: 4px;
}

.lang-btn {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-title);
  color: rgba(255,255,255,0.6);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  letter-spacing: 0.5px;
}

.lang-btn.active, .lang-btn:hover {
  background: var(--accent);
  color: var(--white);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-sm);
  border: none;
  background: transparent;
}

.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap;
}

/* Shimmer Sweep Animation Element */
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: none;
  z-index: 2;
  pointer-events: none;
}

.btn:hover::after {
  animation: btn-shimmer 0.85s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Icon Animations */
.btn i {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 3;
}
.btn:hover i {
  transform: scale(1.2);
}
.btn:hover i.ph-heart, .btn:hover i.ph-heart-straight {
  animation: heartBeat 0.6s ease-in-out infinite alternate;
}
.btn:hover i.ph-arrow-right, .btn:hover i.ph-paper-plane-tilt, .btn:hover i.ph-download-simple {
  transform: translate(4px, -2px) scale(1.15);
}
.btn:hover i.ph-handshake {
  animation: handShake 0.6s ease-in-out;
}

@keyframes btn-shimmer {
  100% { left: 130%; }
}
@keyframes heartBeat {
  0% { transform: scale(1); }
  100% { transform: scale(1.3); }
}
@keyframes handShake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

.btn-primary {
  background: var(--primary); /* Deep Green */
  color: var(--white);
  box-shadow: 0 4px 14px rgba(27, 77, 62, 0.25);
}
.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(42, 121, 85, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
  transition: color 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-secondary::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: var(--white);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  transition: width 0.5s ease, height 0.5s ease;
}
.btn-secondary:hover {
  color: var(--primary-dark);
  border-color: var(--white);
  transform: translateY(-3px);
}
.btn-secondary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-teal {
  background: var(--gradient-teal);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(0, 77, 153, 0.25);
}
.btn-teal:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(26, 108, 190, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  transition: color 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.btn-outline::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: var(--primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  transition: width 0.5s ease, height 0.5s ease;
}
.btn-outline:hover {
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-3px);
}
.btn-outline:hover::before {
  width: 300px;
  height: 300px;
}

.btn-sm { padding: 10px 20px; font-size: 0.8rem; }
.btn-lg { padding: 18px 40px; font-size: 1rem; }

.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- Cards ---- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-slow);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.card-glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
}

/* ---- Stats Counter ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
}

.stat-card {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  transition: all var(--transition-base);
}

.stat-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-4px);
}

.stat-number {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  margin-top: var(--space-sm);
  letter-spacing: 0.5px;
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-title);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-accent { background: rgba(200,150,62,0.15); color: var(--accent-dark); }
.badge-teal { background: rgba(0,180,216,0.15); color: var(--teal-dark); }
.badge-success { background: rgba(46,196,182,0.15); color: #1a8a80; }
.badge-primary { background: rgba(10,35,66,0.1); color: var(--primary); }

/* ---- Forms ---- */
.form-group { margin-bottom: var(--space-lg); }

.form-label {
  display: block;
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--charcoal);
  background: var(--white);
  transition: all var(--transition-base);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0,180,216,0.12);
}

.form-control::placeholder { color: var(--mid-gray); }
textarea.form-control { resize: vertical; min-height: 120px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---- Toast Notifications ---- */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 300px;
  animation: slideInRight 0.3s ease;
  color: var(--white);
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--teal); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---- Page Header ---- */
.page-header {
  background: var(--gradient-dark);
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 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='%23C8963E' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='30'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header-content { position: relative; z-index: 1; }
.page-header h1 { color: var(--white); margin-bottom: var(--space-md); }
.page-header p { color: rgba(255,255,255,0.75); font-size: 1.1rem; max-width: 600px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.breadcrumb a { color: rgba(255,255,255,0.6); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: rgba(255,255,255,0.3); }
.breadcrumb-current { color: var(--accent); font-weight: 600; }

/* ---- Footer ---- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: var(--space-3xl) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-top: var(--space-md); line-height: 1.8; }

.footer-heading {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.footer-links { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer-links a { font-size: 0.9rem; color: rgba(255,255,255,0.6); transition: color var(--transition-fast); }
.footer-links a:hover { color: var(--accent); padding-left: 4px; }

.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.social-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  transition: all var(--transition-base);
  text-decoration: none;
}

.social-btn:hover { background: var(--accent); color: var(--white); transform: translateY(-2px); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-lg) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom-links { display: flex; gap: var(--space-lg); }
.footer-bottom-links a { color: rgba(255,255,255,0.4); transition: color var(--transition-fast); }
.footer-bottom-links a:hover { color: var(--accent); }

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-up { animation: fadeInUp 0.7s ease forwards; }
.animate-left { animation: fadeInLeft 0.7s ease forwards; }
.animate-right { animation: fadeInRight 0.7s ease forwards; }
.animate-scale { animation: scaleIn 0.5s ease forwards; }
.animate-float { animation: float 4s ease-in-out infinite; }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }
[data-reveal-delay="5"] { transition-delay: 0.5s; }

/* ---- Loading Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, var(--light-gray) 25%, var(--ivory) 50%, var(--light-gray) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,49,36,0.8);
  backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.modal-overlay.open .modal { transform: scale(1); }
.modal-close {
  position: absolute;
  top: var(--space-lg); right: var(--space-lg);
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--light-gray);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--dark-gray);
  transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--danger); color: var(--white); }

/* ---- Progress Bar ---- */
.progress-bar {
  height: 8px;
  background: var(--light-gray);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Grid Utilities ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- Flex Utilities ---- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ---- Text Utilities ---- */
.text-white { color: var(--white) !important; }
.text-accent { color: var(--accent) !important; }
.text-teal { color: var(--teal) !important; }
.text-primary { color: var(--primary) !important; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.font-bold { font-weight: 700; }
.font-title { font-family: var(--font-title); }

/* ---- Spacing Utilities ---- */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ---- Responsive Navigation ---- */
@media (max-width: 1024px) {
  .navbar-nav { display: none; }
  .hamburger { display: flex; }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--primary-dark);
  z-index: calc(var(--z-nav) - 1);
  padding: 100px var(--space-xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}

.mobile-menu.open { transform: translateX(0); }

.mobile-nav-link {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  color: rgba(255,255,255,0.85);
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color var(--transition-fast);
}

.mobile-nav-link:hover { color: var(--accent); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--ivory); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---- Selection ---- */
::selection { background: var(--accent); color: var(--white); }

/* ---- Print ---- */
@media print { .navbar, .footer, .btn { display: none !important; } }

/* ============================================================
   WOW FACTOR - WORLD CLASS UI EXPERIENCES
   ============================================================ */

/* 1. Ambient Floating Blobs Background */
body {
  position: relative;
  z-index: 0;
}
body::before, body::after {
  content: '';
  position: fixed;
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  animation: ambientFloat 25s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.1;
}
body::before {
  background: var(--teal);
  top: -10%; left: -10%;
}
body::after {
  background: var(--accent);
  bottom: -10%; right: -10%;
  animation-delay: -12.5s;
}

@keyframes ambientFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10vw, 15vh) scale(1.2); }
  100% { transform: translate(-5vw, 10vh) scale(0.9); }
}

/* 2. Advanced Conic Gradient Card Borders */
@property --spin-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.card {
  position: relative;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 3px;
  background: conic-gradient(from var(--spin-angle), var(--accent), var(--teal), var(--success), var(--accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 10;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 0 30px rgba(230, 57, 70, 0.15), 0 0 30px rgba(0, 77, 153, 0.15);
}

.card:hover::after {
  opacity: 1;
  animation: spinBorderAngle 3s linear infinite;
}

@keyframes spinBorderAngle {
  to { --spin-angle: 360deg; }
}

/* ---- Blocs de contenu (systeme de zones CMS) ---- */
.bloc-texte { margin: 0 0 var(--space-md) 0; }
.bloc-image { max-width: 100%; height: auto; margin-bottom: var(--space-md); border-radius: var(--radius-md); }
.bloc-image-legende { margin: 0 0 var(--space-md) 0; }
.bloc-image-legende img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.bloc-image-legende figcaption { font-size: 0.85rem; color: var(--mid-gray); margin-top: var(--space-xs); }
.bloc-citation { margin: 0 0 var(--space-md) 0; padding-left: var(--space-md); border-left: 3px solid var(--accent); font-style: italic; }
.bloc-citation cite { display: block; margin-top: var(--space-xs); font-style: normal; font-size: 0.85rem; color: var(--mid-gray); }
