/* ================================================================
   AXEANE KOMPTA — DESIGN SYSTEM  |  Tokens & Foundations
   ================================================================
   Source de vérité : EcranTableEntreprises.html + template-v1
   Style : SaaS moderne (Stripe / Notion / Linear / Vercel)

   PRÉFIXE : .ax-   (toutes les classes)
   MIGRATION : progressive — ne casse rien de l'existant
   ================================================================ */

/* ================================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ================================================================ */
:root {
  /* ── Primary (Indigo) ── */
  --ax-primary: rgb(63, 81, 181);
  --ax-primary-dark: rgb(48, 63, 159);
  --ax-primary-light: #c5cae9;
  --ax-primary-50: #e8eaf6;
  --ax-primary-rgb: 63, 81, 181;

  /* ── Accent (Orange CTA) ── */
  --ax-accent: #ec781d;
  --ax-accent-dark: #d46815;
  --ax-accent-light: #fef3e8;

  /* ── Secondary (Blue) ── */
  --ax-secondary: #2362b0;
  --ax-secondary-dark: #1b4f94;

  /* ── Success ── */
  --ax-success: #4caf50;
  --ax-success-light: #e8f5e9;
  --ax-success-border: #c8e6c9;
  --ax-success-text: #388e3c;

  /* ── Warning ── */
  --ax-warning: #f59e0b;
  --ax-warning-light: #fffbeb;
  --ax-warning-border: #fde68a;
  --ax-warning-text: #92400e;

  /* ── Danger ── */
  --ax-danger: #f52738; /* base (more vivid red) */
  --ax-danger-hover: #f8bebe; /* hover = previous danger */
  --ax-danger-border: #f87171; /* unchanged (still works) */
  --ax-danger-light: #fecaca; /* more red than before */
  --ax-danger-text: #7f1d1d; /* keep for contrast */

  /* ── Info ── */
  --ax-info: #2563eb;
  --ax-info-light: #eff6ff;
  --ax-info-border: #bfdbfe;
  --ax-info-text: #1e40af;

  /* ── Surfaces ── */
  --ax-body: #f3f4f8;
  --ax-card: #ffffff;
  --ax-panel: #eef0f4;

  /* ── Text hierarchy ── */
  --ax-text: #1f2937;
  --ax-text-strong: #0f172a;
  --ax-text-bold: #111827;
  --ax-text-body: #374151;
  --ax-text-sec: #64748b;
  --ax-text-light: #94a3b8;
  --ax-text-muted: #9ca3af;
  --ax-text-disabled: #d1d5db;

  /* ── Borders ── */
  --ax-border: #e5e7eb;
  --ax-border-strong: #d5d8e0;
  --ax-border-input: #cbd5e1;
  --ax-border-light: #f3f4f6;
  --ax-border-hover: #cbd5e1;
  --ax-border-focus: #2563eb;

  /* ── Shadows ── */
  --ax-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --ax-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.06);
  --ax-shadow-md: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.06);
  --ax-shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);

  /* ── Row zebra (contraste ON — référence grandLivre.js V2) ── */
  --ax-row-odd: #ffffff;
  --ax-row-even: #eef0f8;
  --ax-row-hover: rgba(63, 81, 181, 0.14);

  /* ── Radii ── */
  --ax-radius: 12px;
  --ax-radius-sm: 8px;
  --ax-radius-xs: 6px;
  --ax-radius-pill: 999px;

  /* ── Transitions ── */
  --ax-tr: all 0.2s ease;
  --ax-tr-fast: all 0.15s ease;

  /* ── Typography ── */
  --ax-font:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ax-font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
}

/* ================================================================
   2. GLOBAL TYPOGRAPHY — Inter font for all migrated screens
   Excludes <i> (Font Awesome) and glyphicons to prevent icon breakage.
   ================================================================ */
.ax-container *:not(i):not([class*="glyphicon"]) {
  font-family: var(--ax-font) !important;
}


/* ================================================================
   3. ANIMATIONS
   ================================================================ */
@keyframes ax-pulse-amber {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.35);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0);
  }
}

@keyframes ax-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes ax-modal-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes ax-fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ax-lift {
  from {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.04),
      0 0 1px rgba(0, 0, 0, 0.06);
  }
  to {
    box-shadow:
      0 8px 24px rgba(0, 0, 0, 0.08),
      0 2px 6px rgba(0, 0, 0, 0.06);
  }
}

@keyframes ax-border-glow {
  0% {
    border-color: var(--ax-border, #e5e7eb);
  }
  50% {
    border-color: var(--ax-primary, #3f51b5);
  }
  100% {
    border-color: var(--ax-border, #e5e7eb);
  }
}

@keyframes ax-check-pop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes ax-slide-in-right {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
