/* ═══════════════════════════════════════════════════════════════
   CaleDoHub — Design System Unifié
   ═══════════════════════════════════════════════════════════════
   Charge cette feuille sur CHAQUE page AVANT les autres styles.
   Fournit : tokens CSS, composants utilitaires, animations, accessibilité.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ─── Couleurs primaires (échelle 50-900) ────────────────── */
  --ch-coral-50: #FFF3EC;
  --ch-coral-100: #FFE0CC;
  --ch-coral-300: #FFB178;
  --ch-coral-500: #FF6B35;
  --ch-coral-700: #CC4A1E;
  --ch-coral-900: #7A2B0F;

  --ch-teal-50: #E6FAF6;
  --ch-teal-100: #BDF2E5;
  --ch-teal-300: #6DD9C1;
  --ch-teal-500: #2EC4B6;
  --ch-teal-700: #1B8F83;
  --ch-teal-900: #0F5550;

  --ch-gold-50: #FFF8E1;
  --ch-gold-100: #FFE59A;
  --ch-gold-300: #FFD166;
  --ch-gold-500: #F5B800;
  --ch-gold-700: #B38500;
  --ch-gold-900: #6B5000;

  --ch-navy-50: #E8ECF2;
  --ch-navy-100: #C8D1E0;
  --ch-navy-300: #6A7A94;
  --ch-navy-500: #1A2744;
  --ch-navy-700: #0F1A30;
  --ch-navy-900: #0A0E1A;

  --ch-accent: #06D6A0;
  --ch-accent-dark: #04A67B;
  --ch-accent-light: #6AECC6;

  /* ─── Couleurs sémantiques ───────────────────────────────── */
  --ch-success: #10B981;
  --ch-success-bg: #D1FAE5;
  --ch-warning: #F59E0B;
  --ch-warning-bg: #FEF3C7;
  --ch-danger: #EF4444;
  --ch-danger-bg: #FEE2E2;
  --ch-info: #3B82F6;
  --ch-info-bg: #DBEAFE;

  /* ─── Neutres (échelle 0-1000) ───────────────────────────── */
  --ch-white: #FFFFFF;
  --ch-gray-50: #F8FAFC;
  --ch-gray-100: #F1F5F9;
  --ch-gray-200: #E2E8F0;
  --ch-gray-300: #CBD5E1;
  --ch-gray-400: #94A3B8;
  --ch-gray-500: #64748B;
  --ch-gray-600: #475569;
  --ch-gray-700: #334155;
  --ch-gray-800: #1E293B;
  --ch-gray-900: #0F172A;

  /* ─── Surfaces ───────────────────────────────────────────── */
  --ch-bg: #FAFBFC;
  --ch-surface: #FFFFFF;
  --ch-surface-alt: #F8FAFC;
  --ch-border: #E5E7EB;
  --ch-border-strong: #CBD5E1;

  /* ─── Typographie ────────────────────────────────────────── */
  --ch-font-display: 'Righteous', 'Bebas Neue', sans-serif;
  --ch-font-body: 'Outfit', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ch-font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --ch-text-xs: 0.72rem;
  --ch-text-sm: 0.82rem;
  --ch-text-base: 0.92rem;
  --ch-text-md: 1rem;
  --ch-text-lg: 1.15rem;
  --ch-text-xl: 1.4rem;
  --ch-text-2xl: 1.8rem;
  --ch-text-3xl: 2.4rem;
  --ch-text-4xl: 3rem;
  --ch-text-5xl: 4rem;

  --ch-leading-tight: 1.2;
  --ch-leading-normal: 1.5;
  --ch-leading-relaxed: 1.75;

  /* ─── Espacement (échelle 4/8/12/16/20/24/32/40/56/80) ──── */
  --ch-space-1: 4px;
  --ch-space-2: 8px;
  --ch-space-3: 12px;
  --ch-space-4: 16px;
  --ch-space-5: 20px;
  --ch-space-6: 24px;
  --ch-space-8: 32px;
  --ch-space-10: 40px;
  --ch-space-14: 56px;
  --ch-space-20: 80px;

  /* ─── Rayons ─────────────────────────────────────────────── */
  --ch-radius-sm: 6px;
  --ch-radius-md: 10px;
  --ch-radius-lg: 14px;
  --ch-radius-xl: 20px;
  --ch-radius-2xl: 28px;
  --ch-radius-full: 9999px;

  /* ─── Ombres (élévation 1-5) ─────────────────────────────── */
  --ch-shadow-1: 0 1px 3px rgba(15, 23, 42, .06);
  --ch-shadow-2: 0 4px 12px rgba(15, 23, 42, .08);
  --ch-shadow-3: 0 8px 24px rgba(15, 23, 42, .1);
  --ch-shadow-4: 0 14px 40px rgba(15, 23, 42, .12);
  --ch-shadow-5: 0 24px 60px rgba(15, 23, 42, .15);

  --ch-shadow-glow: 0 0 0 4px rgba(6, 214, 160, .2);

  /* ─── Transitions ────────────────────────────────────────── */
  --ch-ease: cubic-bezier(.4, 0, .2, 1);
  --ch-ease-out: cubic-bezier(0, 0, .2, 1);
  --ch-ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --ch-t-fast: 120ms var(--ch-ease);
  --ch-t-base: 200ms var(--ch-ease);
  --ch-t-slow: 320ms var(--ch-ease);

  /* ─── Z-index scale ──────────────────────────────────────── */
  --ch-z-dropdown: 100;
  --ch-z-sticky: 200;
  --ch-z-overlay: 1000;
  --ch-z-modal: 9000;
  --ch-z-toast: 10000;
}

/* ─── Base reset & typographie ────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--ch-font-body);
  font-size: var(--ch-text-base);
  line-height: var(--ch-leading-normal);
  color: var(--ch-gray-800);
  background: var(--ch-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ch-font-display);
  line-height: var(--ch-leading-tight);
  color: var(--ch-navy-900);
  margin: 0;
}

a { color: var(--ch-accent); text-decoration: none; transition: color var(--ch-t-fast); }
a:hover { color: var(--ch-accent-dark); }

img { max-width: 100%; height: auto; }

/* ─── Focus-visible ring (accessibilité) ────────────────── */
:focus-visible {
  outline: 3px solid var(--ch-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Sélection ───────────────────────────────────────────── */
::selection { background: var(--ch-accent); color: var(--ch-navy-900); }

/* ─── Scrollbar (webkit) ──────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ch-gray-50); }
::-webkit-scrollbar-thumb { background: var(--ch-gray-300); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--ch-gray-400); }

/* ═══════════════════════════════════════════════════════════
   UTILITY — BOUTONS
   ═══════════════════════════════════════════════════════════ */

.ch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--ch-radius-md);
  border: 1.5px solid transparent;
  font-family: var(--ch-font-body);
  font-size: var(--ch-text-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all var(--ch-t-base);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.ch-btn:active:not(:disabled) { transform: translateY(1px); }
.ch-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ch-btn-primary {
  background: linear-gradient(135deg, var(--ch-accent) 0%, var(--ch-navy-500) 100%);
  color: var(--ch-white);
  box-shadow: 0 4px 14px rgba(6, 214, 160, .25);
}
.ch-btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 24px rgba(6, 214, 160, .4);
  transform: translateY(-2px);
  color: var(--ch-white);
}

.ch-btn-secondary {
  background: var(--ch-navy-900);
  color: var(--ch-white);
}
.ch-btn-secondary:hover:not(:disabled) {
  background: var(--ch-navy-700);
  color: var(--ch-white);
  transform: translateY(-1px);
}

.ch-btn-outline {
  background: var(--ch-white);
  color: var(--ch-navy-900);
  border-color: var(--ch-border);
}
.ch-btn-outline:hover:not(:disabled) {
  border-color: var(--ch-accent);
  color: var(--ch-accent);
  transform: translateY(-1px);
}

.ch-btn-ghost {
  background: transparent;
  color: var(--ch-gray-700);
}
.ch-btn-ghost:hover:not(:disabled) { background: var(--ch-gray-100); }

.ch-btn-danger {
  background: var(--ch-danger);
  color: var(--ch-white);
}
.ch-btn-danger:hover:not(:disabled) { background: #DC2626; }

.ch-btn-sm { padding: 6px 12px; font-size: var(--ch-text-xs); }
.ch-btn-lg { padding: 14px 28px; font-size: var(--ch-text-md); }
.ch-btn-xl { padding: 18px 36px; font-size: var(--ch-text-lg); }

.ch-btn-icon {
  width: 38px; height: 38px; padding: 0;
  border-radius: var(--ch-radius-full);
}

.ch-btn-block { display: flex; width: 100%; }

/* Effet ripple subtil */
.ch-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), rgba(255,255,255,.3) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ch-t-fast);
}
.ch-btn:active::before { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   UTILITY — CARDS
   ═══════════════════════════════════════════════════════════ */

.ch-card {
  background: var(--ch-surface);
  border-radius: var(--ch-radius-lg);
  box-shadow: var(--ch-shadow-1);
  overflow: hidden;
  transition: transform var(--ch-t-base), box-shadow var(--ch-t-base);
}
.ch-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--ch-shadow-3);
}

.ch-card-body { padding: var(--ch-space-5); }
.ch-card-header {
  padding: var(--ch-space-4) var(--ch-space-5);
  border-bottom: 1px solid var(--ch-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--ch-space-3);
  flex-wrap: wrap;
}
.ch-card-footer {
  padding: var(--ch-space-4) var(--ch-space-5);
  border-top: 1px solid var(--ch-border);
  background: var(--ch-surface-alt);
}

/* ═══════════════════════════════════════════════════════════
   UTILITY — FORM CONTROLS
   ═══════════════════════════════════════════════════════════ */

.ch-input,
.ch-textarea,
.ch-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--ch-border);
  border-radius: var(--ch-radius-md);
  background: var(--ch-white);
  font-family: var(--ch-font-body);
  font-size: var(--ch-text-sm);
  color: var(--ch-gray-800);
  transition: all var(--ch-t-fast);
  outline: none;
}
.ch-input:hover, .ch-textarea:hover, .ch-select:hover { border-color: var(--ch-border-strong); }
.ch-input:focus, .ch-textarea:focus, .ch-select:focus {
  border-color: var(--ch-accent);
  box-shadow: var(--ch-shadow-glow);
}
.ch-input::placeholder { color: var(--ch-gray-400); }
.ch-textarea { min-height: 100px; resize: vertical; line-height: var(--ch-leading-normal); }

.ch-label {
  display: block;
  font-size: var(--ch-text-xs);
  font-weight: 600;
  color: var(--ch-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.ch-field { margin-bottom: var(--ch-space-4); }

.ch-field-error {
  color: var(--ch-danger);
  font-size: var(--ch-text-xs);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════
   UTILITY — BADGES
   ═══════════════════════════════════════════════════════════ */

.ch-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--ch-radius-full);
  font-size: var(--ch-text-xs);
  font-weight: 700;
  white-space: nowrap;
}
.ch-badge-success { background: var(--ch-success-bg); color: #065F46; }
.ch-badge-warning { background: var(--ch-warning-bg); color: #92400E; }
.ch-badge-danger  { background: var(--ch-danger-bg); color: #991B1B; }
.ch-badge-info    { background: var(--ch-info-bg); color: #1E40AF; }
.ch-badge-neutral { background: var(--ch-gray-100); color: var(--ch-gray-700); }

.ch-badge-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  margin-right: 4px;
}

/* ═══════════════════════════════════════════════════════════
   UTILITY — HERO
   ═══════════════════════════════════════════════════════════ */

.ch-hero {
  position: relative;
  padding: var(--ch-space-14) var(--ch-space-5);
  background: linear-gradient(135deg, var(--ch-navy-900) 0%, var(--ch-navy-500) 50%, var(--ch-accent-dark) 100%);
  color: var(--ch-white);
  overflow: hidden;
}
.ch-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(6, 214, 160, .3) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 107, 53, .2) 0%, transparent 50%);
  pointer-events: none;
}
.ch-hero-content { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; text-align: center; }
.ch-hero-title {
  font-family: var(--ch-font-display);
  font-size: clamp(2rem, 6vw, var(--ch-text-5xl));
  color: var(--ch-white);
  margin-bottom: var(--ch-space-4);
  line-height: 1.1;
}
.ch-hero-subtitle {
  font-size: clamp(1rem, 2.5vw, var(--ch-text-lg));
  opacity: .9;
  max-width: 700px;
  margin: 0 auto var(--ch-space-8);
}

/* ═══════════════════════════════════════════════════════════
   UTILITY — GRID
   ═══════════════════════════════════════════════════════════ */

.ch-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--ch-space-5);
}
.ch-container-narrow { max-width: 800px; margin: 0 auto; padding: 0 var(--ch-space-5); }

.ch-grid { display: grid; gap: var(--ch-space-5); }
.ch-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ch-grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ch-grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.ch-stack { display: flex; flex-direction: column; gap: var(--ch-space-4); }
.ch-row { display: flex; gap: var(--ch-space-3); align-items: center; flex-wrap: wrap; }
.ch-row-between { display: flex; justify-content: space-between; align-items: center; gap: var(--ch-space-3); flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════
   UTILITY — SKELETON LOADERS
   ═══════════════════════════════════════════════════════════ */

.ch-skeleton {
  background: linear-gradient(90deg, var(--ch-gray-100) 0%, var(--ch-gray-200) 50%, var(--ch-gray-100) 100%);
  background-size: 200% 100%;
  animation: ch-shimmer 1.5s infinite;
  border-radius: var(--ch-radius-sm);
  color: transparent !important;
  user-select: none;
}
@keyframes ch-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.ch-skel-text { height: 14px; margin: 6px 0; }
.ch-skel-title { height: 24px; margin: 10px 0; width: 60%; }
.ch-skel-avatar { width: 48px; height: 48px; border-radius: var(--ch-radius-full); }
.ch-skel-block { height: 120px; width: 100%; }

/* ═══════════════════════════════════════════════════════════
   UTILITY — EMPTY STATES
   ═══════════════════════════════════════════════════════════ */

.ch-empty {
  text-align: center;
  padding: var(--ch-space-10) var(--ch-space-5);
  color: var(--ch-gray-500);
}
.ch-empty-icon {
  font-size: 4rem;
  opacity: .3;
  margin-bottom: var(--ch-space-3);
  display: inline-block;
  filter: grayscale(30%);
}
.ch-empty-title {
  font-family: var(--ch-font-display);
  font-size: var(--ch-text-lg);
  color: var(--ch-gray-700);
  margin-bottom: var(--ch-space-2);
}
.ch-empty-text { font-size: var(--ch-text-sm); max-width: 420px; margin: 0 auto var(--ch-space-4); line-height: var(--ch-leading-relaxed); }

/* ═══════════════════════════════════════════════════════════
   UTILITY — MODAL
   ═══════════════════════════════════════════════════════════ */

.ch-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .78);
  backdrop-filter: blur(8px) saturate(1.5);
  -webkit-backdrop-filter: blur(8px) saturate(1.5);
  z-index: var(--ch-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--ch-space-4);
  animation: ch-fadein var(--ch-t-base);
}
.ch-modal {
  background: var(--ch-white);
  border-radius: var(--ch-radius-xl);
  box-shadow: var(--ch-shadow-5);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: ch-modal-in var(--ch-t-slow) var(--ch-ease-bounce);
}
.ch-modal-header {
  padding: var(--ch-space-5) var(--ch-space-6);
  border-bottom: 1px solid var(--ch-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--ch-space-3);
  flex-shrink: 0;
}
.ch-modal-title { font-family: var(--ch-font-display); font-size: var(--ch-text-lg); color: var(--ch-navy-900); margin: 0; }
.ch-modal-body { padding: var(--ch-space-5) var(--ch-space-6); flex: 1; overflow-y: auto; }
.ch-modal-footer {
  padding: var(--ch-space-4) var(--ch-space-6);
  border-top: 1px solid var(--ch-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--ch-space-2);
  background: var(--ch-surface-alt);
  flex-shrink: 0;
}
.ch-modal-close {
  width: 36px; height: 36px;
  border-radius: var(--ch-radius-full);
  background: var(--ch-gray-100);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ch-text-md);
  transition: all var(--ch-t-fast);
}
.ch-modal-close:hover { background: var(--ch-gray-200); transform: rotate(90deg); }

/* ═══════════════════════════════════════════════════════════
   UTILITY — TOAST
   ═══════════════════════════════════════════════════════════ */

#ch-toast-container {
  position: fixed;
  bottom: var(--ch-space-5);
  right: var(--ch-space-5);
  z-index: var(--ch-z-toast);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--ch-space-2);
  pointer-events: none;
  max-width: calc(100vw - var(--ch-space-8));
}
.ch-toast {
  background: var(--ch-navy-900);
  color: var(--ch-white);
  padding: 12px 18px;
  border-radius: var(--ch-radius-md);
  box-shadow: var(--ch-shadow-4);
  font-size: var(--ch-text-sm);
  font-weight: 500;
  pointer-events: auto;
  animation: ch-toast-in var(--ch-t-base);
  min-width: 240px;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ch-toast.success { background: var(--ch-success); }
.ch-toast.warning { background: var(--ch-warning); color: var(--ch-navy-900); }
.ch-toast.danger  { background: var(--ch-danger); }

/* ═══════════════════════════════════════════════════════════
   UTILITY — BACK TO TOP
   ═══════════════════════════════════════════════════════════ */

#ch-back-to-top {
  position: fixed;
  bottom: var(--ch-space-5);
  right: var(--ch-space-5);
  width: 48px; height: 48px;
  border-radius: var(--ch-radius-full);
  background: var(--ch-navy-900);
  color: var(--ch-white);
  border: none;
  cursor: pointer;
  z-index: var(--ch-z-sticky);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ch-text-md);
  box-shadow: var(--ch-shadow-3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all var(--ch-t-base);
}
#ch-back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#ch-back-to-top:hover { background: var(--ch-accent); transform: translateY(-4px); }

/* ═══════════════════════════════════════════════════════════
   UTILITY — ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

@keyframes ch-fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes ch-slideup { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ch-scale-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
@keyframes ch-modal-in { from { opacity: 0; transform: scale(.92) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes ch-toast-in { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes ch-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes ch-spin { to { transform: rotate(360deg); } }

.ch-animate-fadein { animation: ch-fadein var(--ch-t-slow) both; }
.ch-animate-slideup { animation: ch-slideup var(--ch-t-slow) both; }
.ch-animate-scale { animation: ch-scale-in var(--ch-t-slow) var(--ch-ease-bounce) both; }

/* Révélation au scroll (classe ajoutée par JS polish) */
.ch-reveal { opacity: 0; transform: translateY(30px); transition: opacity 600ms var(--ch-ease-out), transform 600ms var(--ch-ease-out); }
.ch-reveal.in-view { opacity: 1; transform: translateY(0); }

/* Délais échelonnés pour groupes */
.ch-stagger > * { opacity: 0; animation: ch-slideup 600ms var(--ch-ease-out) both; }
.ch-stagger > *:nth-child(1) { animation-delay: 0ms; }
.ch-stagger > *:nth-child(2) { animation-delay: 80ms; }
.ch-stagger > *:nth-child(3) { animation-delay: 160ms; }
.ch-stagger > *:nth-child(4) { animation-delay: 240ms; }
.ch-stagger > *:nth-child(5) { animation-delay: 320ms; }
.ch-stagger > *:nth-child(6) { animation-delay: 400ms; }
.ch-stagger > *:nth-child(7) { animation-delay: 480ms; }
.ch-stagger > *:nth-child(8) { animation-delay: 560ms; }
.ch-stagger > *:nth-child(9) { animation-delay: 640ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .ch-reveal { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════
   UTILITY — SPINNER
   ═══════════════════════════════════════════════════════════ */

.ch-spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--ch-gray-200);
  border-top-color: var(--ch-accent);
  border-radius: 50%;
  animation: ch-spin 720ms linear infinite;
}
.ch-spinner-lg { width: 40px; height: 40px; border-width: 3px; }

/* ═══════════════════════════════════════════════════════════
   UTILITY — ACCESSIBILITÉ
   ═══════════════════════════════════════════════════════════ */

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

.ch-skip-link {
  position: absolute;
  top: -40px;
  left: var(--ch-space-4);
  background: var(--ch-navy-900);
  color: var(--ch-white);
  padding: var(--ch-space-2) var(--ch-space-4);
  border-radius: var(--ch-radius-md);
  z-index: var(--ch-z-toast);
  transition: top var(--ch-t-base);
}
.ch-skip-link:focus { top: var(--ch-space-2); color: var(--ch-white); }

/* ═══════════════════════════════════════════════════════════
   UTILITY — LAYOUT HELPERS
   ═══════════════════════════════════════════════════════════ */

.ch-section { padding: var(--ch-space-14) var(--ch-space-5); }
.ch-section-sm { padding: var(--ch-space-10) var(--ch-space-5); }
.ch-section-title {
  font-family: var(--ch-font-display);
  font-size: clamp(1.6rem, 4vw, var(--ch-text-3xl));
  color: var(--ch-navy-900);
  margin-bottom: var(--ch-space-2);
  text-align: center;
}
.ch-section-subtitle {
  font-size: var(--ch-text-base);
  color: var(--ch-gray-500);
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--ch-space-8);
  line-height: var(--ch-leading-relaxed);
}

.ch-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ch-border), transparent);
  margin: var(--ch-space-8) 0;
  border: none;
}

/* Amélioration des cards existantes (espace-pro, admin, etc.) */
.card, .chm-wrap, .cha-dashboard { transition: box-shadow var(--ch-t-base); }

/* Uniformise tous les boutons existants (btn, cha-*, chm-*) */
button:not(.ch-modal-close):not([class*="ch-skel"]) { transition: all var(--ch-t-base); }
input, textarea, select { transition: all var(--ch-t-fast); }

/* Images et médias - lazy fallback */
img[loading="lazy"] { opacity: 0; transition: opacity 400ms; }
img[loading="lazy"].loaded { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE UTILITIES
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  :root {
    --ch-space-14: 40px;
    --ch-space-20: 56px;
  }
  .ch-section { padding: var(--ch-space-10) var(--ch-space-4); }
  .ch-hide-mobile { display: none !important; }
  .ch-modal { max-height: 95vh; margin: 0 auto; }
  .ch-modal-body { padding: var(--ch-space-4); }
}
@media (min-width: 769px) {
  .ch-hide-desktop { display: none !important; }
}
@media (min-width: 1024px) {
  :root { --ch-text-base: 0.95rem; }
}
