/* ============================================================
   MajiChrono — Design System v2
   - Tokens sémantiques, dark mode ready, WCAG AA
   - 4pt spacing rhythm, type scale 1.25x, layered shadows
   - Respect prefers-reduced-motion, focus-visible everywhere
   ============================================================ */

/* ---------- 1) Design tokens ---------- */
:root {
  /* Brand */
  --mc-brand-50:  #E6F0FF;
  --mc-brand-100: #CCDEFF;
  --mc-brand-200: #99BDFF;
  --mc-brand-300: #669BFF;
  --mc-brand-400: #337AFF;
  --mc-brand-500: #0A66FF;  /* primary */
  --mc-brand-600: #084FCC;
  --mc-brand-700: #063C99;
  --mc-brand-800: #042866;
  --mc-brand-900: #021433;

  --mc-teal-500:  #00C2A8;
  --mc-teal-600:  #00A38E;
  --mc-teal-50:   #DCFAF5;

  --mc-amber-500: #FF7A00;
  --mc-amber-600: #DB6900;
  --mc-amber-50:  #FFF1E0;

  --mc-warn-500:  #FFC542;
  --mc-warn-50:   #FFF5DC;

  --mc-danger-500:#E53E3E;
  --mc-danger-600:#B62E2E;
  --mc-danger-50: #FDECEC;

  --mc-success-500:#16A34A;
  --mc-success-50: #DCFCE7;

  /* Neutrals */
  --mc-gray-0:    #FFFFFF;
  --mc-gray-50:   #F7F9FC;
  --mc-gray-100:  #EEF2F7;
  --mc-gray-200:  #E2E8F0;   /* divider */
  --mc-gray-300:  #CBD2DA;
  --mc-gray-400:  #94A3B8;
  --mc-gray-500:  #64748B;
  --mc-gray-600:  #475569;   /* text muted */
  --mc-gray-700:  #334155;
  --mc-gray-800:  #1E293B;
  --mc-gray-900:  #0A1628;   /* text strong */

  /* Semantic — light theme */
  --color-bg:           var(--mc-gray-50);
  --color-bg-elevated:  var(--mc-gray-0);
  --color-bg-muted:     var(--mc-gray-100);
  --color-surface:      var(--mc-gray-0);
  --color-border:       var(--mc-gray-200);
  --color-border-strong:var(--mc-gray-300);
  --color-text:         var(--mc-gray-900);
  --color-text-muted:   var(--mc-gray-600);
  --color-text-subtle:  var(--mc-gray-500);
  --color-text-inverse: var(--mc-gray-0);
  --color-primary:      var(--mc-brand-500);
  --color-primary-hover:var(--mc-brand-600);
  --color-primary-soft: var(--mc-brand-50);
  --color-accent:       var(--mc-amber-500);
  --color-success:      var(--mc-success-500);
  --color-warning:      var(--mc-warn-500);
  --color-danger:       var(--mc-danger-500);

  /* Spacing — 4pt grid */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Typography — 1.25 scale */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-family-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-size-xs:    12px;
  --font-size-sm:    13px;
  --font-size-base:  15px;
  --font-size-md:    16px;
  --font-size-lg:    18px;
  --font-size-xl:    20px;
  --font-size-2xl:   24px;
  --font-size-3xl:   30px;
  --font-size-4xl:   38px;
  --font-size-5xl:   48px;
  --font-size-6xl:   60px;
  --line-height-tight:  1.2;
  --line-height-normal: 1.55;
  --line-height-loose:  1.75;
  --letter-spacing-tight: -0.02em;
  --font-weight-regular: 400;
  --font-weight-medium:  500;
  --font-weight-semibold:600;
  --font-weight-bold:    700;
  --font-weight-black:   800;

  /* Radii */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-2xl:  28px;
  --radius-full: 999px;

  /* Shadows — layered */
  --shadow-xs:  0 1px 2px rgba(10, 22, 40, 0.04);
  --shadow-sm:  0 1px 2px rgba(10, 22, 40, 0.04), 0 1px 3px rgba(10, 22, 40, 0.06);
  --shadow-md:  0 4px 6px rgba(10, 22, 40, 0.04), 0 8px 16px rgba(10, 22, 40, 0.06);
  --shadow-lg:  0 8px 16px rgba(10, 22, 40, 0.06), 0 20px 40px rgba(10, 22, 40, 0.10);
  --shadow-xl:  0 24px 48px rgba(10, 22, 40, 0.16);
  --shadow-focus: 0 0 0 3px rgba(10, 102, 255, 0.30);

  /* Motion */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 120ms;
  --dur-base: 180ms;
  --dur-slow: 260ms;

  /* Z-index */
  --z-base: 0;
  --z-elevated: 10;
  --z-sticky: 40;
  --z-overlay: 80;
  --z-modal: 100;
  --z-toast: 200;

  /* Layout */
  --container-max: 1200px;
  --sidebar-w: 248px;
}

/* ---------- 2) Dark mode (auto via prefers-color-scheme, plus override .theme-dark) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) {
    --color-bg:           #060B16;
    --color-bg-elevated:  #0E1828;
    --color-bg-muted:     #14223A;
    --color-surface:      #0E1828;
    --color-border:       #1F2E48;
    --color-border-strong:#27395A;
    --color-text:         #E6EBF4;
    --color-text-muted:   #99A6BD;
    --color-text-subtle:  #6E7E9A;
    --color-primary:      #4185FF;
    --color-primary-hover:#609BFF;
    --color-primary-soft: rgba(10,102,255,0.16);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 6px 14px rgba(0,0,0,0.5);
    --shadow-lg: 0 12px 30px rgba(0,0,0,0.55);
    --shadow-focus: 0 0 0 3px rgba(65, 133, 255, 0.45);
  }
}

/* ---------- 3) Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; }
body {
  margin: 0;
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--color-primary-hover); }
hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-6) 0; }
code, pre, kbd { font-family: var(--font-family-mono); font-size: 0.9em; }

h1, h2, h3, h4, h5, h6 { margin: 0; line-height: var(--line-height-tight); color: var(--color-text); font-weight: var(--font-weight-bold); }
h1 { font-size: var(--font-size-4xl); letter-spacing: var(--letter-spacing-tight); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
p  { margin: 0 0 var(--space-3); }

::selection { background: var(--color-primary-soft); color: var(--color-text); }

/* Universal focus-visible */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 4) Layout primitives ---------- */
.mc-container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-5); }
.mc-stack    { display: grid; gap: var(--space-4); }
.mc-stack-lg { display: grid; gap: var(--space-6); }
.mc-row { display: flex; gap: var(--space-3); align-items: center; }
.mc-row.between { justify-content: space-between; }
.mc-row.wrap { flex-wrap: wrap; }
.mc-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.mc-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.mc-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
@media (max-width: 768px) {
  .mc-grid-2, .mc-grid-3, .mc-grid-4 { grid-template-columns: 1fr; }
}

/* ---------- 5) Header ---------- */
.mc-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--color-bg-elevated) 85%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.mc-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  max-width: var(--container-max); margin: 0 auto;
}
.mc-logo { display: flex; align-items: center; gap: 8px; }
.mc-logo img { height: 36px; display: block; }
.mc-wordmark {
  font-family: var(--font-family-sans);
  font-weight: 800; font-style: italic;
  font-size: 22px; color: var(--color-text);
  letter-spacing: -0.5px; line-height: 1;
}
.mc-wordmark-gold { color: #E8B923; }
.mc-nav { display: flex; gap: var(--space-5); align-items: center; }
.mc-nav a { color: var(--color-text); font-weight: var(--font-weight-medium); font-size: var(--font-size-sm); }
.mc-nav a:hover { color: var(--color-primary); }
.mc-nav a.active { color: var(--color-primary); }
@media (max-width: 700px) {
  .mc-nav { gap: var(--space-3); }
  .mc-nav a:not(.mc-btn) { display: none; }
}

/* ---------- 6) Buttons ---------- */
.mc-btn {
  --btn-bg: var(--color-primary);
  --btn-fg: var(--color-text-inverse);
  --btn-bd: transparent;
  --btn-bg-hover: var(--color-primary-hover);

  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 11px 18px;
  font-family: inherit; font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold);
  line-height: 1.2; color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--radius-md);
  cursor: pointer; text-decoration: none; user-select: none;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  min-height: 44px;  /* touch target */
}
.mc-btn:hover    { background: var(--btn-bg-hover); text-decoration: none; }
.mc-btn:active   { transform: translateY(1px); }
.mc-btn:disabled, .mc-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.mc-btn-primary  { /* default */ }
.mc-btn-accent   { --btn-bg: var(--mc-amber-500); --btn-bg-hover: var(--mc-amber-600); }
.mc-btn-success  { --btn-bg: var(--mc-success-500); --btn-bg-hover: #128B3F; }
.mc-btn-danger   { --btn-bg: var(--mc-danger-500); --btn-bg-hover: var(--mc-danger-600); }
.mc-btn-ghost    {
  --btn-bg: transparent; --btn-fg: var(--color-text); --btn-bd: var(--color-border);
  --btn-bg-hover: var(--color-bg-muted);
}
.mc-btn-soft     {
  --btn-bg: var(--color-primary-soft); --btn-fg: var(--color-primary);
  --btn-bg-hover: color-mix(in srgb, var(--color-primary) 14%, transparent);
}
.mc-btn-sm   { padding: 7px 12px; min-height: 36px; font-size: var(--font-size-xs); }
.mc-btn-lg   { padding: 14px 24px; min-height: 52px; font-size: var(--font-size-md); }
.mc-btn-block{ width: 100%; }

/* ---------- 7) Card / Surfaces ---------- */
.mc-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.mc-card-hover { transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.mc-card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.mc-card-flush { padding: 0; overflow: hidden; }

/* ---------- 8) Hero ---------- */
.mc-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: var(--space-20) var(--space-5);
  color: var(--mc-gray-0);
  background: linear-gradient(135deg, #0A1628 0%, #084FCC 55%, #00C2A8 110%);
}
.mc-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(255, 122, 0, 0.30), transparent 60%),
    radial-gradient(50% 50% at 0% 100%, rgba(0, 194, 168, 0.35), transparent 60%);
  filter: saturate(1.2);
}
.mc-hero-inner { max-width: 880px; margin: 0 auto; text-align: center; }
.mc-hero h1 { font-size: clamp(36px, 5.5vw, var(--font-size-6xl)); color: inherit; letter-spacing: -0.03em; }
.mc-hero p  { font-size: clamp(16px, 2vw, var(--font-size-lg)); color: rgba(255,255,255,0.86); margin: var(--space-4) auto var(--space-8); max-width: 640px; }
.mc-hero .mc-btn:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,0.6); }
.mc-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 4px 12px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.10); color: rgba(255,255,255,0.92);
  font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.18);
  margin-bottom: var(--space-4);
}
.mc-hero-actions { display: inline-flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }

/* ---------- 9) Sections ---------- */
.mc-section { padding: var(--space-16) var(--space-5); }
.mc-section-tight { padding: var(--space-10) var(--space-5); }
.mc-section-head { text-align: center; max-width: 680px; margin: 0 auto var(--space-10); }
.mc-section-head h2 { font-size: clamp(24px, 3.4vw, var(--font-size-3xl)); margin-bottom: var(--space-2); }
.mc-section-head p  { color: var(--color-text-muted); }

.mc-feature {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.mc-feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.mc-feature-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-primary-soft); color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.mc-feature h3 { font-size: var(--font-size-lg); margin-bottom: var(--space-2); }
.mc-feature p  { color: var(--color-text-muted); margin: 0; }

/* ---------- 10) Forms ---------- */
.mc-form { display: grid; gap: var(--space-4); }
.mc-field label { display: block; font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); margin-bottom: var(--space-2); color: var(--color-text); }
.mc-field input, .mc-field select, .mc-field textarea {
  width: 100%;
  padding: 11px var(--space-4);
  font-family: inherit; font-size: var(--font-size-base);
  color: var(--color-text); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  min-height: 44px;
}
.mc-field input::placeholder, .mc-field textarea::placeholder { color: var(--color-text-subtle); }
.mc-field input:hover, .mc-field select:hover, .mc-field textarea:hover { border-color: var(--color-border-strong); }
.mc-field input:focus-visible, .mc-field select:focus-visible, .mc-field textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}
.mc-field input[aria-invalid="true"] { border-color: var(--color-danger); }
.mc-field input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px rgba(229,62,62,0.30); }
.mc-field-help  { font-size: var(--font-size-xs); color: var(--color-text-muted); margin-top: var(--space-1); }
.mc-field-error { font-size: var(--font-size-xs); color: var(--color-danger); margin-top: var(--space-1); }
.mc-field-row   { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 600px) { .mc-field-row { grid-template-columns: 1fr; } }

/* ---------- 11) Flash / alerts ---------- */
.mc-flash {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm); font-weight: var(--font-weight-medium);
  margin: var(--space-4) 0;
  border: 1px solid transparent;
}
.mc-flash::before { content: ''; width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; background-repeat: no-repeat; background-position: center; }
.mc-flash-success { background: var(--mc-success-50); color: #166534; border-color: #B6EEC4; }
.mc-flash-success::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23166534'%3E%3Cpath fill-rule='evenodd' d='M16.704 5.29a1 1 0 010 1.42l-7.5 7.5a1 1 0 01-1.42 0l-3.5-3.5a1 1 0 011.42-1.42L8.5 12.08l6.79-6.79a1 1 0 011.41 0z'/%3E%3C/svg%3E"); }
.mc-flash-error   { background: var(--mc-danger-50); color: #9F1A1A; border-color: #F8C6C6; }
.mc-flash-error::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239F1A1A'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zM8.7 7.3a1 1 0 011.42 0L10 7.18l-.12.12L11.3 8.7a1 1 0 11-1.42 1.42L10 10l-.12-.12L8.7 11.3a1 1 0 11-1.42-1.42L8.58 10l-.12-.12L7.3 8.7a1 1 0 010-1.4z'/%3E%3C/svg%3E"); }
.mc-flash-warning { background: var(--mc-warn-50); color: #8C6900; border-color: #F0DE94; }
.mc-flash-info    { background: var(--color-primary-soft); color: var(--mc-brand-800); border-color: #C7D9FF; }

/* ---------- 12) Tables ---------- */
.mc-table-wrap {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
}
.mc-table { width: 100%; border-collapse: collapse; }
.mc-table th, .mc-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left; font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.mc-table th {
  background: var(--color-bg-muted); color: var(--color-text-muted);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px;
  position: sticky; top: 0;
}
.mc-table tbody tr { transition: background var(--dur-fast) var(--ease-out); }
.mc-table tbody tr:hover { background: var(--color-bg-muted); }
.mc-table tbody tr:last-child td { border-bottom: 0; }
.mc-table-empty { text-align: center; padding: var(--space-12) var(--space-4); color: var(--color-text-muted); font-style: italic; }

/* ---------- 13) Badges ---------- */
.mc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: var(--font-weight-bold); line-height: 1.4;
  letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid transparent;
}
.mc-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mc-badge-pending    { background: var(--mc-warn-50);   color: #8C6900;  border-color: #F0DE94; }
.mc-badge-accepted   { background: var(--mc-brand-50);  color: #084FCC;  border-color: #C7D9FF; }
.mc-badge-picking_up,
.mc-badge-picked_up,
.mc-badge-in_transit { background: var(--mc-teal-50);   color: #006C5A;  border-color: #BEEFE2; }
.mc-badge-delivered  { background: var(--mc-success-50);color: #166534;  border-color: #B6EEC4; }
.mc-badge-cancelled,
.mc-badge-failed     { background: var(--mc-danger-50); color: #9F1A1A;  border-color: #F8C6C6; }

/* ---------- 14) Admin layout ---------- */
.mc-admin-layout { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.mc-sidebar {
  background: var(--mc-gray-900); color: var(--mc-gray-0);
  padding: var(--space-6) 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.mc-sidebar .mc-logo { padding: 0 var(--space-5) var(--space-6); }
.mc-sidebar .mc-logo img { filter: brightness(0) invert(1); height: 30px; }
.mc-sidebar-section { padding: 0 var(--space-5); color: rgba(255,255,255,0.45); font-size: 11px; font-weight: var(--font-weight-bold); text-transform: uppercase; letter-spacing: 0.08em; margin: var(--space-5) 0 var(--space-2); }
.mc-sidebar a {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 10px var(--space-5);
  color: rgba(255,255,255,0.72); font-weight: var(--font-weight-medium); font-size: var(--font-size-sm);
  border-left: 3px solid transparent;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.mc-sidebar a:hover { background: rgba(255,255,255,0.05); color: var(--mc-gray-0); text-decoration: none; }
.mc-sidebar a.active { background: rgba(10,102,255,0.16); border-left-color: var(--color-primary); color: var(--mc-gray-0); }
.mc-sidebar-icon { width: 18px; text-align: center; font-size: 16px; }
.mc-admin-content { padding: var(--space-6) var(--space-8); max-width: 100%; min-width: 0; }
.mc-page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-6); }
.mc-page-head h1 { font-size: var(--font-size-3xl); }
.mc-page-head p  { color: var(--color-text-muted); margin: 4px 0 0; }
@media (max-width: 900px) {
  .mc-admin-layout { grid-template-columns: 1fr; }
  .mc-sidebar { position: relative; height: auto; }
}

/* ---------- 15) Stat cards ---------- */
.mc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-bottom: var(--space-6); }
@media (max-width: 900px) { .mc-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .mc-stats { grid-template-columns: 1fr; } }
.mc-stat {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: var(--space-4);
}
.mc-stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--color-primary-soft); color: var(--color-primary);
  font-size: 20px;
}
.mc-stat-icon.green  { background: var(--mc-success-50); color: var(--mc-success-500); }
.mc-stat-icon.amber  { background: var(--mc-amber-50);   color: var(--mc-amber-500); }
.mc-stat-icon.teal   { background: var(--mc-teal-50);    color: var(--mc-teal-600); }
.mc-stat-body { min-width: 0; }
.mc-stat-label { font-size: 11px; font-weight: var(--font-weight-bold); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.mc-stat-value { font-size: var(--font-size-3xl); font-weight: var(--font-weight-black); color: var(--color-text); line-height: 1.1; margin-top: 2px; }
.mc-stat-trend { font-size: var(--font-size-xs); color: var(--color-text-muted); margin-top: 2px; }
.mc-stat-trend.up   { color: var(--color-success); }
.mc-stat-trend.down { color: var(--color-danger); }

/* ---------- 16) Maps ---------- */
#mc-map, .mc-map {
  height: 540px; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--color-border); background: var(--color-bg-muted);
}
.leaflet-container { font-family: var(--font-family-sans) !important; }
.mc-driver-popup b { color: var(--color-primary); }

/* ---------- 17) Avatar ---------- */
.mc-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--color-primary); color: var(--color-text-inverse);
  font-weight: var(--font-weight-bold); font-size: var(--font-size-sm);
  flex-shrink: 0;
}

/* ---------- 18) Timeline ---------- */
.mc-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.mc-timeline::before {
  content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px;
  border-left: 2px solid var(--color-border);
}
.mc-timeline li { position: relative; padding: var(--space-1) 0 var(--space-3) var(--space-6); }
.mc-timeline li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--color-primary); border: 3px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-primary);
}
.mc-timeline strong { display: block; color: var(--color-text); font-size: var(--font-size-sm); }
.mc-timeline .mc-time { display: block; font-size: var(--font-size-xs); color: var(--color-text-muted); margin-top: 2px; }

/* ---------- 19) Skeleton (loading state) ---------- */
.mc-skeleton {
  background: linear-gradient(90deg, var(--color-bg-muted) 0%, var(--color-border) 50%, var(--color-bg-muted) 100%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: skel 1.4s var(--ease-in-out) infinite;
}
@keyframes skel {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- 20) Empty state ---------- */
.mc-empty {
  background: var(--color-surface); border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg); padding: var(--space-12) var(--space-5);
  text-align: center; color: var(--color-text-muted);
}
.mc-empty h3 { color: var(--color-text); margin-bottom: var(--space-2); }
.mc-empty p  { margin: 0 0 var(--space-4); }

/* ---------- 21) Footer ---------- */
.mc-footer {
  background: var(--mc-gray-900); color: rgba(255,255,255,0.72);
  padding: var(--space-10) var(--space-5);
  margin-top: var(--space-16);
}
.mc-footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-5); max-width: var(--container-max); margin: 0 auto; }
.mc-footer img   { filter: brightness(0) invert(1); height: 30px; }
.mc-footer-meta  { font-size: var(--font-size-xs); }

/* ---------- 22) Utilities ---------- */
.mc-text-center { text-align: center; }
.mc-text-muted  { color: var(--color-text-muted); }
.mc-text-subtle { color: var(--color-text-subtle); }
.mc-text-danger { color: var(--color-danger); }
.mc-text-success{ color: var(--color-success); }
.mc-text-mono   { font-family: var(--font-family-mono); }
.mc-mb-0  { margin-bottom: 0 !important; }
.mc-mt-0  { margin-top: 0 !important; }
.mc-mt-2  { margin-top: var(--space-2); }
.mc-mt-3  { margin-top: var(--space-3); }
.mc-mt-4  { margin-top: var(--space-4); }
.mc-mt-6  { margin-top: var(--space-6); }
.mc-mt-8  { margin-top: var(--space-8); }
.mc-mb-2  { margin-bottom: var(--space-2); }
.mc-mb-4  { margin-bottom: var(--space-4); }
.mc-mb-6  { margin-bottom: var(--space-6); }
.mc-divider { border-top: 1px solid var(--color-border); margin: var(--space-4) 0; }
.mc-hidden-mobile { display: initial; }
@media (max-width: 700px) { .mc-hidden-mobile { display: none; } }

/* visually-hidden but readable by screen readers */
.mc-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;
}

/* ---------- 23) Split auth layout ---------- */
.mc-auth-layout {
  display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh;
  background: var(--color-bg);
}
.mc-auth-aside {
  position: relative; isolation: isolate; overflow: hidden;
  padding: var(--space-12) var(--space-10);
  color: var(--mc-gray-0);
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(160deg, #0A1628 0%, #084FCC 45%, #00C2A8 110%);
}
.mc-auth-aside::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 50% at 70% 10%, rgba(255,122,0,0.20), transparent 65%);
}
.mc-auth-aside h2 { font-size: clamp(28px, 3vw, 40px); color: inherit; max-width: 480px; }
.mc-auth-aside p  { color: rgba(255,255,255,0.78); max-width: 460px; }
.mc-auth-aside-points { list-style: none; padding: 0; margin: var(--space-6) 0 0; display: grid; gap: var(--space-3); max-width: 460px; }
.mc-auth-aside-points li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--font-size-sm); color: rgba(255,255,255,0.84); }
.mc-auth-aside-points li::before { content: '✓'; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: rgba(255,255,255,0.18); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.mc-auth-main { display: flex; align-items: center; justify-content: center; padding: var(--space-8); }
.mc-auth-card { width: 100%; max-width: 420px; }
@media (max-width: 900px) {
  .mc-auth-layout { grid-template-columns: 1fr; }
  .mc-auth-aside { display: none; }
}

/* ---------- 24) Tabs / segmented ---------- */
.mc-segmented {
  display: inline-flex; padding: 4px;
  background: var(--color-bg-muted); border-radius: var(--radius-md);
  gap: 2px;
}
.mc-segmented button, .mc-segmented a {
  border: 0; background: transparent; padding: 8px 14px;
  font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-muted);
  border-radius: var(--radius-sm); cursor: pointer;
}
.mc-segmented .active, .mc-segmented [aria-current="true"] {
  background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-xs);
}

/* ---------- 25) Spinner ---------- */
.mc-spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================================================================
   ANIMATIONS & MICRO-INTERACTIONS — MajiChrono polish
   =================================================================== */

/* ---------- Keyframes ---------- */
@keyframes mc-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes mc-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes mc-scale-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes mc-slide-left {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes mc-slide-right {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes mc-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes mc-pulse-ring {
  0%   { transform: scale(0.85); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}
@keyframes mc-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes mc-gradient {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes mc-rotate {
  to { transform: rotate(360deg); }
}
@keyframes mc-bounce-soft {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* ---------- Helpers prêts à l'emploi ---------- */
.mc-anim-fade-up    { animation: mc-fade-up    var(--dur-slow) var(--ease-out) both; }
.mc-anim-fade-in    { animation: mc-fade-in    var(--dur-slow) var(--ease-out) both; }
.mc-anim-scale-in   { animation: mc-scale-in   var(--dur-base) var(--ease-out) both; }
.mc-anim-slide-l    { animation: mc-slide-left  var(--dur-slow) var(--ease-out) both; }
.mc-anim-slide-r    { animation: mc-slide-right var(--dur-slow) var(--ease-out) both; }
.mc-anim-float      { animation: mc-float 3s var(--ease-in-out) infinite; }
.mc-anim-bounce     { animation: mc-bounce-soft 2s var(--ease-in-out) infinite; }
.mc-anim-spin       { animation: mc-rotate 1s linear infinite; }

/* Stagger (à appliquer aux enfants pour effet en cascade) */
.mc-stagger > * { opacity: 0; animation: mc-fade-up var(--dur-slow) var(--ease-out) forwards; }
.mc-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.mc-stagger > *:nth-child(2) { animation-delay: 0.15s; }
.mc-stagger > *:nth-child(3) { animation-delay: 0.25s; }
.mc-stagger > *:nth-child(4) { animation-delay: 0.35s; }
.mc-stagger > *:nth-child(5) { animation-delay: 0.45s; }
.mc-stagger > *:nth-child(6) { animation-delay: 0.55s; }

/* Reveal-on-scroll (déclenché par JS via class .mc-in-view) */
.mc-reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.mc-reveal.mc-in-view { opacity: 1; transform: translateY(0); }
.mc-reveal-delay-1 { transition-delay: 0.08s; }
.mc-reveal-delay-2 { transition-delay: 0.16s; }
.mc-reveal-delay-3 { transition-delay: 0.24s; }
.mc-reveal-delay-4 { transition-delay: 0.32s; }

/* ---------- Boutons : ripple + glow + lift ---------- */
.mc-btn {
  position: relative;
  overflow: hidden;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}
.mc-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(10, 102, 255, 0.45);
}
.mc-btn-primary:hover:not(:disabled) {
  box-shadow: 0 10px 28px -6px rgba(10, 102, 255, 0.55);
}
.mc-btn-accent:hover:not(:disabled) {
  box-shadow: 0 10px 28px -6px rgba(232, 185, 35, 0.55);
}
.mc-btn-danger:hover:not(:disabled) {
  box-shadow: 0 10px 28px -6px rgba(229, 62, 62, 0.55);
}
.mc-btn::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.4), transparent 60%);
  opacity: 0; transition: opacity var(--dur-base) var(--ease-out);
  pointer-events: none;
}
.mc-btn:hover::before { opacity: 0.5; }

/* ---------- Cards : lift + glow border ---------- */
.mc-card-interactive {
  cursor: pointer;
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}
.mc-card-interactive:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -12px rgba(10, 22, 40, 0.18);
  border-color: var(--color-primary);
}

/* ---------- Liens : underline animée ---------- */
.mc-link-anim { position: relative; display: inline-block; }
.mc-link-anim::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--color-primary);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.mc-link-anim:hover::after {
  transform: scaleX(1); transform-origin: left;
}

/* ---------- Stats counter (gros chiffres) ---------- */
.mc-counter {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--mc-teal-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* ---------- Mesh gradient hero (animated) ---------- */
.mc-hero-mesh {
  background:
    radial-gradient(at 20% 30%, rgba(10, 102, 255, 0.4) 0px, transparent 50%),
    radial-gradient(at 80% 0%,  rgba(0, 194, 168, 0.35) 0px, transparent 50%),
    radial-gradient(at 0% 80%,  rgba(232, 185, 35, 0.25) 0px, transparent 50%),
    radial-gradient(at 80% 80%, rgba(255, 122, 0, 0.20) 0px, transparent 50%),
    linear-gradient(135deg, #0A1628 0%, #142850 100%);
  background-size: 200% 200%;
  animation: mc-gradient 18s ease infinite;
}

/* ---------- Hero floating decorations ---------- */
.mc-hero-deco {
  position: absolute; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), transparent 70%);
  animation: mc-float 6s ease-in-out infinite;
}

/* ---------- Skeleton shimmer ---------- */
.mc-skeleton {
  background: linear-gradient(90deg,
    var(--color-bg-muted) 0%,
    var(--color-border) 50%,
    var(--color-bg-muted) 100%);
  background-size: 200% 100%;
  animation: mc-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ---------- Pulse dot (live indicator) ---------- */
.mc-pulse-dot {
  position: relative;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--color-success);
}
.mc-pulse-dot::before {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%; background: var(--color-success);
  animation: mc-pulse-ring 1.6s ease-out infinite;
}

/* ---------- Feature card avec icône qui flotte ---------- */
.mc-feature {
  position: relative; overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.mc-feature::after {
  content: ''; position: absolute; top: -50px; right: -50px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-primary-soft), transparent 70%);
  opacity: 0; transform: scale(0.6);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.mc-feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.mc-feature:hover::after { opacity: 1; transform: scale(1); }
.mc-feature:hover .mc-feature-icon {
  animation: mc-bounce-soft 0.8s var(--ease-out);
}

/* ---------- Section header avec accent ---------- */
.mc-eyebrow-anim {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.mc-eyebrow-anim::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-primary);
  animation: mc-pulse-ring 1.8s ease-out infinite;
  position: relative;
}

/* ---------- Step number (gros chiffre stylé) ---------- */
.mc-step {
  position: relative;
  transition: transform var(--dur-slow) var(--ease-out);
}
.mc-step:hover { transform: translateY(-6px); }
.mc-step-num {
  font-size: 80px; font-weight: 900;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1; letter-spacing: -0.04em;
}

/* ---------- Testimonial card ---------- */
.mc-testimonial {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: var(--space-6);
  position: relative;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.mc-testimonial::before {
  content: '"'; position: absolute; top: -14px; left: 18px;
  font-size: 80px; font-family: serif; line-height: 1;
  color: var(--color-primary);
  opacity: 0.4;
}
.mc-testimonial:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.mc-quote { font-size: var(--font-size-md); color: var(--color-text); line-height: 1.65; margin: var(--space-4) 0; font-style: italic; }
.mc-author { display: flex; align-items: center; gap: 12px; }
.mc-author-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--mc-teal-500));
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.mc-author-name { font-weight: 700; color: var(--color-text); }
.mc-author-role { font-size: var(--font-size-xs); color: var(--color-text-muted); }

/* ---------- Stat tile gros chiffre ---------- */
.mc-stat-big {
  text-align: center;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.mc-stat-big:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.mc-stat-big-value {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  color: var(--color-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}
.mc-stat-big-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: 8px;
  font-weight: 600;
}

/* ---------- Inputs : meilleure focus + glow ---------- */
.mc-field input, .mc-field select, .mc-field textarea {
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}
.mc-field input:focus-visible, .mc-field select:focus-visible, .mc-field textarea:focus-visible {
  background: color-mix(in srgb, var(--color-primary-soft) 50%, white);
  box-shadow: 0 0 0 4px rgba(10, 102, 255, 0.18);
}

/* ---------- Page transition (entrée douce) ---------- */
main { animation: mc-fade-in 0.4s var(--ease-out); }

/* ---------- Smooth scroll global ---------- */
html { scroll-behavior: smooth; }

/* ---------- Custom scrollbar (webkit) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg-muted); }
::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 5px;
  border: 2px solid var(--color-bg-muted);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-subtle); }

/* ---------- Accent gold (logo MajiChrono) ---------- */
.mc-gold      { color: #E8B923; }
.mc-bg-gold   { background: #E8B923; color: #0A1628; }
.mc-btn-gold {
  background: linear-gradient(135deg, #F5D26C 0%, #E8B923 60%, #B8881A 100%);
  color: #0A1628;
}
.mc-btn-gold:hover:not(:disabled) {
  box-shadow: 0 10px 28px -6px rgba(232, 185, 35, 0.6);
}

/* ---------- Section dark inverse ---------- */
.mc-section-dark {
  background: #0A1628;
  color: rgba(255,255,255,0.92);
  padding: var(--space-16) var(--space-5);
}
.mc-section-dark h2,
.mc-section-dark h3 { color: white; }
.mc-section-dark .mc-text-muted { color: rgba(255,255,255,0.65); }
.mc-section-dark .mc-eyebrow-anim {
  background: rgba(255,255,255,0.08);
  color: white;
  border-color: rgba(255,255,255,0.18);
}

/* ---------- FAQ accordion ---------- */
.mc-faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease-out);
}
.mc-faq-item[open] { border-color: var(--color-primary); }
.mc-faq-summary {
  cursor: pointer;
  padding: var(--space-4) var(--space-5);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600;
  color: var(--color-text);
  list-style: none;
  transition: background var(--dur-fast) var(--ease-out);
}
.mc-faq-summary::-webkit-details-marker { display: none; }
.mc-faq-summary:hover { background: var(--color-bg-muted); }
.mc-faq-summary::after {
  content: '+'; font-size: 22px; font-weight: 300;
  transition: transform var(--dur-base) var(--ease-out);
  color: var(--color-primary);
}
.mc-faq-item[open] .mc-faq-summary::after { content: '×'; transform: rotate(90deg); }
.mc-faq-body { padding: 0 var(--space-5) var(--space-4); color: var(--color-text-muted); line-height: 1.65; }

/* ---------- Hover photo overlay ---------- */
.mc-photo-overlay {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
}
.mc-photo-overlay img {
  transition: transform 0.6s var(--ease-out);
}
.mc-photo-overlay:hover img { transform: scale(1.05); }

/* ---------- Loading dots ---------- */
.mc-loading-dots { display: inline-flex; gap: 6px; }
.mc-loading-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-primary);
  animation: mc-bounce-soft 1s infinite;
}
.mc-loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.mc-loading-dots span:nth-child(3) { animation-delay: 0.3s; }

/* ---------- Wordmark gold (logo officiel MajiChrono) ---------- */
.mc-logo .mc-wordmark { font-family: var(--font-family-sans); font-weight: 800; font-style: italic; font-size: 22px; color: var(--color-text); letter-spacing: -0.5px; line-height: 1; }
.mc-logo .mc-wordmark-gold { color: #E8B923; }


/* ---------- Header scrolled state ---------- */
.mc-header {
  transition: box-shadow var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.mc-header-scrolled {
  box-shadow: 0 4px 14px -8px rgba(10, 22, 40, 0.12);
}

/* ---------- Back to top ---------- */
#mc-back-to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--color-primary); color: white;
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px -8px rgba(10, 102, 255, 0.5);
  opacity: 0; transform: translateY(20px) scale(0.8);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.2s;
  z-index: var(--z-sticky);
}
#mc-back-to-top.visible {
  opacity: 1; transform: translateY(0) scale(1);
}
#mc-back-to-top:hover {
  transform: translateY(-2px) scale(1);
  box-shadow: 0 16px 40px -8px rgba(10, 102, 255, 0.65);
}

/* ============================================================
   RESPONSIVE — Mobile-first overrides
   Breakpoints :
   • Phone     ≤ 480px
   • Phone L   ≤ 600px
   • Tablet    ≤ 768px
   • Desktop S ≤ 900px
   ============================================================ */

/* ---------- Container : padding adaptatif ---------- */
@media (max-width: 600px) {
  .mc-container { padding: 0 var(--space-4); }
}
@media (max-width: 380px) {
  .mc-container { padding: 0 var(--space-3); }
}

/* ---------- Hero : padding réduit sur mobile ---------- */
@media (max-width: 768px) {
  .mc-hero {
    padding: var(--space-12) var(--space-4) !important;
  }
  .mc-hero h1 { font-size: clamp(28px, 8vw, 44px); }
  .mc-hero p  { font-size: 15px; }
  .mc-hero-actions { flex-direction: column; gap: 10px; width: 100%; }
  .mc-hero-actions .mc-btn { width: 100%; }
}

/* ---------- Header nav : hamburger sur mobile ---------- */
.mc-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text);
}
.mc-nav-toggle svg { display: block; }

@media (max-width: 700px) {
  .mc-header-inner { padding: 10px var(--space-4); }
  .mc-logo img     { height: 30px; }
  .mc-logo .mc-wordmark { font-size: 18px !important; }
  .mc-nav-toggle   { display: inline-flex; }
  .mc-nav {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--color-bg-elevated);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-3) var(--space-4);
    transform: translateX(100%);
    transition: transform 0.3s var(--ease-out);
    z-index: var(--z-overlay);
    overflow-y: auto;
    border-top: 1px solid var(--color-border);
  }
  .mc-nav.open { transform: translateX(0); }
  .mc-nav > * {
    width: 100%;
    padding: 14px var(--space-3);
    border-radius: var(--radius-md);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
  }
  .mc-nav > *:last-child { border-bottom: 0; }
  .mc-nav .mc-btn { justify-content: center; margin-top: var(--space-2); border-bottom: 0; }
  .mc-hidden-mobile { display: block !important; } /* afficher dans le menu */
}

/* ---------- Footer : empilement sur mobile ---------- */
@media (max-width: 700px) {
  .mc-footer { padding: var(--space-8) var(--space-4); }
  .mc-footer-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-4);
  }
  .mc-footer-inner > div { width: 100%; }
}

/* ---------- Section spacing réduit ---------- */
@media (max-width: 768px) {
  .mc-section       { padding: var(--space-10) var(--space-4); }
  .mc-section-tight { padding: var(--space-8) var(--space-4); }
  .mc-section-head h2 { font-size: clamp(22px, 5vw, 32px); }
}

/* ---------- Stat big tile ---------- */
@media (max-width: 480px) {
  .mc-stat-big        { padding: var(--space-4); }
  .mc-stat-big-value  { font-size: clamp(28px, 9vw, 40px); }
  .mc-counter         { font-size: clamp(36px, 12vw, 60px); }
}

/* ---------- Feature cards padding ---------- */
@media (max-width: 600px) {
  .mc-feature { padding: var(--space-4); }
}

/* ---------- Steps : numéro plus petit ---------- */
@media (max-width: 768px) {
  .mc-step-num { font-size: 56px; }
  .mc-step     { padding: var(--space-5); }
}

/* ---------- Admin layout : sidebar en drawer mobile ---------- */
@media (max-width: 900px) {
  .mc-admin-layout {
    grid-template-columns: 1fr;
    display: block;
  }
  .mc-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 80%; max-width: 320px;
    height: 100vh;
    z-index: var(--z-modal);
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-out);
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
  }
  .mc-sidebar.open { transform: translateX(0); }
  .mc-admin-content {
    padding: var(--space-4);
    padding-top: 72px; /* place pour topbar mobile */
  }
}

/* ---------- Topbar admin mobile (apparaît < 900px) ---------- */
.mc-admin-topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  padding: 0 var(--space-4);
  align-items: center;
  justify-content: space-between;
  z-index: calc(var(--z-modal) - 1);
}
.mc-admin-topbar .mc-admin-toggle {
  background: transparent;
  border: 1px solid var(--color-border);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text);
}
.mc-admin-topbar-title {
  font-weight: 800; color: var(--color-text);
  font-size: 16px;
}
.mc-admin-topbar-user {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--mc-teal-500));
  color: white; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
}
@media (max-width: 900px) {
  .mc-admin-topbar { display: flex; }
}

/* Overlay derrière drawer */
.mc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.5);
  z-index: calc(var(--z-modal) - 2);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
.mc-overlay.visible {
  display: block;
  opacity: 1;
}

/* ---------- Stats grid admin mobile ---------- */
@media (max-width: 600px) {
  .mc-stats { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .mc-stat { padding: var(--space-3); flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .mc-stat-value { font-size: 22px; }
}
@media (max-width: 380px) {
  .mc-stats { grid-template-columns: 1fr; }
}

/* ---------- Tables : scroll horizontal sur petit écran ---------- */
.mc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mc-table { min-width: 600px; }
@media (max-width: 768px) {
  .mc-table th, .mc-table td { padding: var(--space-2) var(--space-3); font-size: 13px; }
}

/* ---------- Page head mobile ---------- */
@media (max-width: 768px) {
  .mc-page-head {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }
  .mc-page-head h1 { font-size: 22px; }
}

/* ---------- Profile layout : grid → stack mobile ---------- */
@media (max-width: 900px) {
  .mc-profile-grid {
    display: block !important;
  }
  .mc-profile-grid > aside {
    position: static !important;
    margin-bottom: var(--space-4);
  }
}

/* ---------- Client new-delivery / delivery : grid → stack ---------- */
.mc-grid-form-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 900px) {
  .mc-grid-form-map { grid-template-columns: 1fr; }
  .mc-grid-form-map > .mc-card-flush { position: static !important; }
  .mc-grid-form-map .mc-map { height: 340px !important; }
}

/* ---------- Cards admin payments / KYC : aérer ---------- */
@media (max-width: 600px) {
  .mc-card { padding: var(--space-4); }
  .mc-card form { flex-direction: column !important; align-items: stretch !important; }
  .mc-card form .mc-btn { width: 100%; }
}

/* ---------- Forms larges mobile ---------- */
@media (max-width: 600px) {
  .mc-field input, .mc-field select, .mc-field textarea {
    font-size: 16px; /* éviter le zoom iOS sur focus */
  }
}

/* ---------- Auth split-screen mobile ---------- */
@media (max-width: 900px) {
  .mc-auth-layout { display: block; min-height: 100vh; }
  .mc-auth-aside  { display: none; }
  .mc-auth-main   { padding: var(--space-4); min-height: 100vh; display: flex; align-items: center; }
  .mc-auth-card   { padding-top: var(--space-3); }
}

/* ---------- Eyebrow petit ---------- */
@media (max-width: 480px) {
  .mc-eyebrow-anim { font-size: 10px; padding: 4px 10px; }
}

/* ---------- Buttons : touch comfort ---------- */
@media (max-width: 768px) {
  .mc-btn { min-height: 48px; }
  .mc-btn-sm { min-height: 40px; }
  .mc-btn-lg { min-height: 56px; }
}

/* ---------- Map height responsive ---------- */
@media (max-width: 600px) {
  #mc-map, .mc-map { height: 360px !important; }
}

/* ---------- Back to top : plus petit mobile ---------- */
@media (max-width: 600px) {
  #mc-back-to-top { bottom: 16px; right: 16px; width: 42px; height: 42px; }
}

/* ---------- Hero deco : cacher sur mobile (perf + clarté) ---------- */
@media (max-width: 600px) {
  .mc-hero-deco { opacity: 0.5; }
}

/* ---------- Segmented : wrap mobile ---------- */
.mc-segmented { flex-wrap: wrap; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }

/* ---------- Auth brand sur mobile (logo + wordmark visible) ---------- */
.mc-auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: var(--space-4) 0 var(--space-2);
}
.mc-auth-brand img { height: 38px; }
.mc-auth-brand-text {
  font-family: var(--font-family-sans);
  font-style: italic; font-weight: 800;
  font-size: 22px;
  color: var(--color-text);
  letter-spacing: -0.4px;
}

/* ============================================================
   ANIMATIONS v2 — Pack premium
   ============================================================ */

/* ---------- Keyframes additionnels ---------- */
@keyframes mc-slide-down {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes mc-zoom-in {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes mc-rotate-in {
  from { opacity: 0; transform: rotate(-12deg) scale(0.9); }
  to   { opacity: 1; transform: rotate(0) scale(1); }
}
@keyframes mc-progress {
  0%   { width: 0%; }
  60%  { width: 75%; }
  100% { width: 100%; }
}
@keyframes mc-checkmark {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
@keyframes mc-toast-in {
  from { opacity: 0; transform: translateY(-20px) translateX(-50%); }
  to   { opacity: 1; transform: translateY(0)     translateX(-50%); }
}
@keyframes mc-fab-pulse {
  0%, 100% { box-shadow: 0 12px 28px -6px rgba(10, 102, 255, 0.55), 0 0 0 0 rgba(10, 102, 255, 0.5); }
  50%      { box-shadow: 0 12px 28px -6px rgba(10, 102, 255, 0.55), 0 0 0 14px rgba(10, 102, 255, 0); }
}

/* ---------- Scroll progress bar (haut) ---------- */
#mc-scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), var(--mc-teal-500), var(--color-accent));
  z-index: var(--z-toast);
  transition: width 0.08s linear;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px rgba(10, 102, 255, 0.5);
  pointer-events: none;
}

/* ---------- Top loader (changement de page) ---------- */
#mc-page-loader {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  z-index: var(--z-toast);
  transition: width 0.3s var(--ease-out), opacity 0.3s;
  pointer-events: none;
}
#mc-page-loader.active { animation: mc-progress 1.2s ease-out forwards; }
#mc-page-loader.done   { width: 100% !important; opacity: 0; }

/* ---------- Page entrance (toutes pages internes) ---------- */
main, .mc-admin-content {
  animation: mc-fade-up 0.5s var(--ease-out) both;
}

/* ---------- Card 3D tilt (subtil) ---------- */
.mc-card-interactive,
.mc-feature,
.mc-stat-big,
.mc-step,
.mc-testimonial {
  transform-style: preserve-3d;
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out),
    border-color 0.3s var(--ease-out);
}

/* ---------- Form button : loading state ---------- */
.mc-btn.is-loading {
  pointer-events: none;
  position: relative;
  color: transparent !important;
}
.mc-btn.is-loading::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: mc-rotate 0.7s linear infinite;
  top: 50%; left: 50%;
  margin: -9px 0 0 -9px;
  color: white;
}

/* ---------- Toast notifications ---------- */
.mc-toast {
  position: fixed; top: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px;
  z-index: var(--z-toast);
  animation: mc-toast-in 0.35s var(--ease-out);
  max-width: 90%; min-width: 280px;
  font-weight: 500;
}
.mc-toast.success { border-left: 4px solid var(--color-success); }
.mc-toast.error   { border-left: 4px solid var(--color-danger); }
.mc-toast.info    { border-left: 4px solid var(--color-primary); }
.mc-toast-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.mc-toast.success .mc-toast-icon { background: var(--mc-success-50); color: var(--color-success); }
.mc-toast.error   .mc-toast-icon { background: var(--mc-danger-50);  color: var(--color-danger);  }
.mc-toast.info    .mc-toast-icon { background: var(--color-primary-soft); color: var(--color-primary); }
.mc-toast.leave   { animation: none; opacity: 0; transform: translateY(-20px) translateX(-50%); transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out); }

/* Flash messages auto-anim */
.mc-flash {
  animation: mc-slide-down 0.4s var(--ease-out) both;
  position: relative;
}

/* ---------- Table rows : hover lift ---------- */
.mc-table tbody tr {
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.mc-table tbody tr:hover {
  background: var(--color-bg-muted);
  /* léger lift sans casser le layout */
  transform: translateX(2px);
}

/* ---------- Lien anim partout (via JS) ---------- */
.mc-nav a:not(.mc-btn),
.mc-sidebar a:not(.mc-btn) {
  position: relative;
  transition: color var(--dur-fast) var(--ease-out);
}

/* ---------- FAB pulse (call-to-action attractif) ---------- */
.mc-fab-pulse {
  animation: mc-fab-pulse 2s ease-in-out infinite;
}

/* ---------- Success checkmark anim ---------- */
.mc-success-check {
  display: inline-block;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--mc-success-50);
  color: var(--color-success);
  font-size: 32px;
  display: flex; align-items: center; justify-content: center;
  animation: mc-checkmark 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ---------- Cards entrance stagger (auto-applied via JS) ---------- */
.mc-auto-stagger > * {
  opacity: 0;
  transform: translateY(20px);
}
.mc-auto-stagger > *.mc-in-view {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

/* ---------- Lien avec underline rapide partout ---------- */
.mc-nav a:not(.mc-btn):hover,
.mc-sidebar a:not(.mc-btn):hover {
  color: var(--color-primary);
}

/* ---------- Image / svg fade-in (lazy) ---------- */
img.mc-lazy {
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
img.mc-lazy.loaded { opacity: 1; }

/* ---------- Inputs : label flottant subtil ---------- */
.mc-field input:focus + .mc-field-help,
.mc-field textarea:focus + .mc-field-help {
  color: var(--color-primary);
}

/* ---------- Section dark : parallax-light hero ---------- */
.mc-section-dark .mc-eyebrow-anim {
  animation: mc-zoom-in 0.6s var(--ease-out) both;
}

/* ---------- Step number animation ---------- */
.mc-step:hover .mc-step-num {
  transform: scale(1.05);
  transition: transform 0.4s var(--ease-out);
}

/* ---------- Map controls polish ---------- */
.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: var(--shadow-md) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
}
.leaflet-control-zoom-in, .leaflet-control-zoom-out {
  background: var(--color-surface) !important;
  border: 0 !important;
  color: var(--color-text) !important;
  transition: background var(--dur-fast) var(--ease-out);
}
.leaflet-control-zoom-in:hover, .leaflet-control-zoom-out:hover {
  background: var(--color-primary-soft) !important;
  color: var(--color-primary) !important;
}

/* ---------- Stat number hover (anim subtile sur survol) ---------- */
.mc-stat-value {
  transition: transform var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.mc-stat:hover .mc-stat-value {
  transform: scale(1.05);
  color: var(--color-primary);
}

/* ---------- Badge bounce subtil ---------- */
.mc-badge {
  transition: transform var(--dur-fast) var(--ease-out);
}
.mc-table tr:hover .mc-badge { transform: scale(1.05); }

/* ---------- Input zoom-in subtil au focus ---------- */
.mc-field input,
.mc-field select,
.mc-field textarea {
  transform-origin: left center;
}
.mc-field input:focus,
.mc-field select:focus,
.mc-field textarea:focus {
  transform: scale(1.005);
}


/* ---------- Sidebar admin : badge pulse ---------- */
.mc-sidebar a span[aria-label*="attente"] {
  animation: mc-fab-pulse 2s infinite;
}

/* ---------- Timeline animation ---------- */
.mc-timeline li {
  opacity: 0;
  animation: mc-fade-up 0.5s var(--ease-out) forwards;
}
.mc-timeline li:nth-child(1) { animation-delay: 0.05s; }
.mc-timeline li:nth-child(2) { animation-delay: 0.15s; }
.mc-timeline li:nth-child(3) { animation-delay: 0.25s; }
.mc-timeline li:nth-child(4) { animation-delay: 0.35s; }
.mc-timeline li:nth-child(5) { animation-delay: 0.45s; }
.mc-timeline li:nth-child(6) { animation-delay: 0.55s; }
.mc-timeline li:nth-child(n+7) { animation-delay: 0.65s; }
.mc-timeline li::before {
  animation: mc-zoom-in 0.6s var(--ease-out) both;
  animation-delay: inherit;
}

/* ---------- Badge sidebar admin : couleur changeante ---------- */
.mc-sidebar-section { transition: color 0.3s ease; }

/* ---------- Skeleton "carte" placeholder ---------- */
.mc-card-skeleton {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.mc-card-skeleton .mc-skel-bar {
  background: linear-gradient(90deg, var(--color-bg-muted) 0%, var(--color-border) 50%, var(--color-bg-muted) 100%);
  background-size: 200% 100%;
  animation: mc-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  height: 14px;
}
.mc-card-skeleton .mc-skel-bar.short { width: 40%; }
.mc-card-skeleton .mc-skel-bar.medium { width: 70%; }

/* ---------- Status badge animation à l'apparition ---------- */
.mc-badge {
  animation: mc-zoom-in 0.4s var(--ease-out) both;
}

/* ---------- Avatar : effet "glow" subtle au hover ---------- */
.mc-avatar {
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.mc-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px -4px var(--color-primary);
}

/* ---------- Map markers : entrée animée ---------- */
.leaflet-marker-icon, .leaflet-marker-shadow {
  animation: mc-zoom-in 0.4s var(--ease-out) both;
}

/* ---------- Bouton "back-to-top" : icon swing au hover ---------- */
#mc-back-to-top svg {
  transition: transform var(--dur-base) var(--ease-out);
}
#mc-back-to-top:hover svg {
  transform: translateY(-2px);
}

/* ---------- Hero CTA spotlight ---------- */
.mc-hero-actions .mc-btn-accent,
.mc-hero-actions .mc-btn-gold {
  animation: mc-fab-pulse 3s ease-in-out infinite;
  animation-delay: 1.5s;
}

/* ============================================================
   FIX RESPONSIVITÉ — Corrections mobiles critiques
   ============================================================ */

/* ---------- Body anti-overflow horizontal ---------- */
html, body { overflow-x: hidden; max-width: 100%; }

/* ---------- Header sticky avec z-index correct ---------- */
.mc-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-elevated);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}

/* ---------- Stagger : ne PAS cacher si animations désactivées ---------- */
.mc-stagger > * {
  opacity: 1;
  animation: mc-fade-up var(--dur-slow) var(--ease-out) both;
}
@media (prefers-reduced-motion: reduce) {
  .mc-stagger > *,
  .mc-reveal,
  .mc-anim-fade-up,
  .mc-anim-fade-in,
  .mc-anim-scale-in,
  .mc-anim-slide-l,
  .mc-anim-slide-r {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Hero mobile : hauteur compacte + contenu centré ---------- */
@media (max-width: 768px) {
  .mc-hero {
    padding: var(--space-10) var(--space-4) !important;
    min-height: auto !important;
  }
  .mc-hero-inner {
    padding: var(--space-4) 0;
  }
  .mc-hero h1 {
    font-size: clamp(28px, 7vw, 38px) !important;
    line-height: 1.1 !important;
    margin: var(--space-3) 0 !important;
  }
  .mc-hero p {
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin: var(--space-3) auto !important;
  }
  .mc-hero-deco {
    display: none; /* moins de surcharge GPU mobile */
  }
}

/* ---------- Trust badges hero : stacker sur mobile ---------- */
@media (max-width: 700px) {
  .mc-hero-inner > div:last-child {
    flex-direction: column !important;
    gap: var(--space-2) !important;
    margin-top: var(--space-6) !important;
  }
}

/* ---------- Cards : éviter débordement horizontal ---------- */
.mc-card { max-width: 100%; box-sizing: border-box; min-width: 0; }
.mc-card > * { min-width: 0; }

/* ---------- Grid form+map : forcer 1 colonne mobile, override inline ---------- */
.mc-grid-form-map {
  display: grid !important;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 900px) {
  .mc-grid-form-map,
  .mc-grid-form-map[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- Form inside card "Suivi public" : input + button stack mobile ---------- */
@media (max-width: 600px) {
  .mc-card form[action$="/track"] {
    flex-direction: column;
    gap: var(--space-2);
  }
  .mc-card form[action$="/track"] > * { width: 100%; }
}

/* ---------- Container : empêcher débordement ---------- */
.mc-container { box-sizing: border-box; }

/* ---------- Section hero margin négative : à supprimer mobile (cause overflow) ---------- */
@media (max-width: 768px) {
  .mc-hero[style*="margin"] {
    margin: 0 calc(-1 * var(--space-4)) var(--space-6) !important;
  }
}

/* ---------- Decorations dans CTA (cercles) : cacher sur mobile ---------- */
@media (max-width: 768px) {
  section .mc-hero-deco { display: none !important; }
}

/* ---------- Stats grid mobile : forcer 2 colonnes ---------- */
@media (max-width: 600px) {
  .mc-grid-4 { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
}
@media (max-width: 360px) {
  .mc-grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Steps : éviter chevauchement ligne décorative mobile ---------- */
@media (max-width: 900px) {
  .mc-grid-3 + div[aria-hidden="true"],
  .mc-grid-3 > div[aria-hidden="true"] { display: none; }
}

/* ---------- Footer : empêcher débordement nav links ---------- */
@media (max-width: 600px) {
  .mc-footer-inner nav {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- Header mobile : padding compact ---------- */
@media (max-width: 600px) {
  .mc-header-inner { padding: 10px var(--space-3); gap: var(--space-2); }
  .mc-logo .mc-wordmark { font-size: 16px !important; }
  .mc-logo img { height: 28px !important; }
}

/* ---------- Section avec padding lourd : réduire mobile ---------- */
@media (max-width: 768px) {
  .mc-section,
  .mc-section-tight { padding: var(--space-8) var(--space-4) !important; }
  .mc-section-dark  { padding: var(--space-10) var(--space-4) !important; }
}

/* ---------- Cards "À propos" CTA : moins de padding mobile ---------- */
@media (max-width: 600px) {
  section .mc-reveal[style*="padding: var(--space-16)"] {
    padding: var(--space-8) var(--space-4) !important;
  }
}


/* ============================================================
   HOME HERO + TRACK — Styles propres remplaçant les inline
   ============================================================ */

/* ---------- Hero home : padding compact + responsive ---------- */
.mc-hero-home {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-5)) var(--space-10);
  padding: var(--space-16) var(--space-5) var(--space-12);
}
@media (max-width: 768px) {
  .mc-hero-home {
    margin: 0 calc(-1 * var(--space-4)) var(--space-6);
    padding: var(--space-8) var(--space-4) var(--space-10);
  }
}

/* Decorations positions */
.mc-hero-deco-tr { width: 380px; height: 380px; top: -100px; right: -120px; }
.mc-hero-deco-bl { width: 280px; height: 280px; bottom: -80px; left: -80px; animation-delay: -3s; }
@media (max-width: 768px) {
  .mc-hero-deco-tr, .mc-hero-deco-bl { display: none; }
}

/* Hero inner : position relative pour passer au-dessus des deco */
.mc-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--space-2);
}

/* Eyebrow sur fond sombre */
.mc-eyebrow-inverse {
  background: rgba(255,255,255,0.10);
  color: white;
  border-color: rgba(255,255,255,0.18);
}

/* Titre hero */
.mc-hero-title {
  font-size: clamp(28px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: var(--space-3) 0;
  color: white;
}
.mc-hero-title-gold {
  background: linear-gradient(135deg, #E8B923 0%, #F5D26C 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Sous-titre */
.mc-hero-sub {
  font-size: clamp(14px, 2vw, 18px);
  max-width: 640px;
  margin: 0 auto var(--space-6);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
}

/* Bouton ghost adapté au fond sombre */
.mc-btn-on-dark {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}
.mc-btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

/* Hero actions : auto wrap + col mobile */
.mc-hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  align-items: center;
}
@media (max-width: 600px) {
  .mc-hero-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: var(--space-2);
  }
  .mc-hero-actions .mc-btn { width: 100%; }
}

/* Trust badges */
.mc-trust-badges {
  list-style: none;
  margin: var(--space-8) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6);
}
.mc-trust-badges li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}
@media (max-width: 600px) {
  .mc-trust-badges {
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-5);
  }
  .mc-trust-badges li { font-size: 13px; }
}

/* ---------- Section "Track public" sous le hero ---------- */
.mc-track-section {
  margin-top: -40px;
  position: relative;
  z-index: 3;
}
@media (max-width: 768px) {
  .mc-track-section { margin-top: -20px; }
}

.mc-track-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-6);
  align-items: center;
  padding: var(--space-6);
  box-shadow: var(--shadow-xl);
}
@media (max-width: 900px) {
  .mc-track-card {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding: var(--space-5);
  }
  .mc-track-card > div:last-child { display: none; } /* illustration : cachée mobile */
}

.mc-track-title { font-size: clamp(20px, 3vw, 28px); }

/* Formulaire suivi : stack mobile */
.mc-track-card form {
  display: flex;
  gap: var(--space-2);
  max-width: 460px;
}
@media (max-width: 600px) {
  .mc-track-card form { flex-direction: column; max-width: 100%; }
  .mc-track-card form > * { width: 100%; }
}

