/* ============================================
   DESIGN TOKENS — single source of truth
   Last refactor: 2026-04-11 (dé-min CSS + tokens)
   ============================================ */
:root {
  /* === COULEURS — Brand & semantic === */
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.15);
  --primary-dark: #2563eb;
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.15);
  --success: #10b981;
  --info: #06b6d4;
  --danger: #ef4444;
  --warning: #f59e0b;
  --purple: #8b5cf6;
  --cyan: #06b6d4;

  /* === SURFACES === */
  --surface-0: #05090f;
  --surface-1: #0f172a;
  --surface-2: #1e293b;
  --surface-3: #334155;
  --surface-card: rgba(15, 23, 42, 0.6);
  --surface-card-hover: rgba(30, 41, 59, 0.7);
  /* Opacités fréquentes — préparent le light mode futur */
  --surface-1-30: rgba(15, 23, 42, 0.3);
  --surface-1-40: rgba(15, 23, 42, 0.4);
  --surface-1-50: rgba(15, 23, 42, 0.5);
  --surface-1-60: rgba(15, 23, 42, 0.6);
  --surface-1-70: rgba(15, 23, 42, 0.7);
  --surface-1-80: rgba(15, 23, 42, 0.8);
  --surface-1-90: rgba(15, 23, 42, 0.9);
  --surface-1-95: rgba(15, 23, 42, 0.95);
  --surface-2-40: rgba(30, 41, 59, 0.4);
  --surface-2-50: rgba(30, 41, 59, 0.5);
  --surface-2-60: rgba(30, 41, 59, 0.6);
  --surface-2-70: rgba(30, 41, 59, 0.7);
  --surface-2-80: rgba(30, 41, 59, 0.8);
  --surface-2-90: rgba(30, 41, 59, 0.9);
  /* Overlays neutres */
  --black-08: rgba(0, 0, 0, 0.08);
  --black-12: rgba(0, 0, 0, 0.12);
  --black-15: rgba(0, 0, 0, 0.15);
  --black-18: rgba(0, 0, 0, 0.18);
  --black-20: rgba(0, 0, 0, 0.2);
  --black-25: rgba(0, 0, 0, 0.25);
  --black-30: rgba(0, 0, 0, 0.3);
  --black-35: rgba(0, 0, 0, 0.35);
  --black-40: rgba(0, 0, 0, 0.4);
  --black-50: rgba(0, 0, 0, 0.5);
  --black-60: rgba(0, 0, 0, 0.6);
  --black-70: rgba(0, 0, 0, 0.7);
  --white-02: rgba(255, 255, 255, 0.02);
  --white-03: rgba(255, 255, 255, 0.03);
  --white-04: rgba(255, 255, 255, 0.04);
  --white-05: rgba(255, 255, 255, 0.05);
  --white-06: rgba(255, 255, 255, 0.06);
  --white-07: rgba(255, 255, 255, 0.07);
  --white-08: rgba(255, 255, 255, 0.08);
  --white-10: rgba(255, 255, 255, 0.1);
  --white-12: rgba(255, 255, 255, 0.12);
  --white-15: rgba(255, 255, 255, 0.15);
  --white-20: rgba(255, 255, 255, 0.2);
  --white-30: rgba(255, 255, 255, 0.3);
  --white-60: rgba(255, 255, 255, 0.6);
  --white-70: rgba(255, 255, 255, 0.7);
  --white-85: rgba(255, 255, 255, 0.85);

  /* === TEXTE === */
  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-faint: #475569;

  /* === BORDURES === */
  --border-subtle: rgba(148, 163, 184, 0.08);
  --border-accent: rgba(59, 130, 246, 0.12);

  /* === RADII === */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-default: 10px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-pill: 999px;

  /* === ESPACEMENTS — base 4pt + demi-pas pour valeurs fréquentes === */
  --space-0: 0;
  --space-0-5: 2px;
  --space-1: 4px;
  --space-1-5: 6px;
  --space-2: 8px;
  --space-2-5: 10px;
  --space-3: 12px;
  --space-3-5: 14px;
  --space-4: 16px;
  --space-4-5: 18px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;

  /* === TYPOGRAPHIE — échelle modulaire === */
  /* Adopter progressivement : remplacer font-size: var(--fs-base) → font-size:var(--fs-base) */
  --fs-3xs: 9px;
  --fs-2xs: 10px;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 18px;
  --fs-2xl: 22px;
  --fs-3xl: 28px;
  --fs-display: 36px;
  --fs-display-lg: 48px;
  /* Line heights */
  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-base: 1.5;
  --lh-relaxed: 1.7;
  /* Font weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* === SHADOWS === */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px var(--primary-glow);
  --shadow-glow-accent: 0 0 24px var(--accent-glow);

  /* === Z-INDEX — layering canonique === */
  --z-base: 1;
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 1000;
  --z-modal: 1100;
  --z-popover: 1200;
  --z-toast: 9000;
  --z-tooltip: 9999;

  /* === ANIMATION === */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-slow: 0.5s;
}
[data-theme="aurora"] {
  --primary: #00d4ff;
  --accent: #7c3aed;
  --primary-glow: rgba(0, 212, 255, 0.15);
  --surface-0: #0d1117;
}
[data-theme="imperial-gold"] {
  --primary: #fcd34d;
  --accent: #c9a227;
  --primary-glow: rgba(252, 211, 77, 0.12);
  --surface-0: #080808;
  --border-accent: rgba(201, 162, 39, 0.2);
}
[data-theme="ghost-protocol"] {
  --primary: #00ff41;
  --accent: #00e5cc;
  --primary-glow: rgba(0, 255, 65, 0.1);
  --surface-0: #020c02;
  --border-accent: rgba(0, 255, 65, 0.15);
}
[data-theme="hello-kitty"] {
  --primary: #e8667a;
  --accent: #c9967a;
  --primary-glow: rgba(232, 102, 122, 0.12);
  --surface-0: #1a0a10;
  --border-accent: rgba(232, 102, 122, 0.2);
}

/* Warm — compense écrans à dominante bleue (réchauffe le rendu sans toucher les couleurs source) */
[data-theme="warm"] body {
  filter: sepia(0.14) saturate(0.94) hue-rotate(-10deg) brightness(1.02);
}

/* ============================================================
   THÈME LIGHT — Mode jour expérimental (opt-in via sélecteur)
   Inverse surfaces, textes, overlays. Ne touche PAS les couleurs branded
   (--primary, --accent, --danger, --warning) qui restent identiques pour
   préserver l'identité visuelle.
   ============================================================ */
[data-theme="light"] {
  color-scheme: light;
  /* === SURFACES — inversées === */
  --surface-0: #ffffff;
  --surface-1: #f8fafc;
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;
  --surface-card: rgba(255, 255, 255, 0.85);
  --surface-card-hover: rgba(241, 245, 249, 0.95);

  /* === TEXTE — inversé === */
  --text-primary: #0f172a;
  --text-secondary: #1e293b;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-faint: #94a3b8;

  /* === BORDURES — assombries === */
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-accent: rgba(59, 130, 246, 0.2);

  /* === SURFACES OVERLAY — inversées vers gris clairs === */
  --surface-1-30: rgba(241, 245, 249, 0.5);
  --surface-1-40: rgba(241, 245, 249, 0.6);
  --surface-1-50: rgba(241, 245, 249, 0.7);
  --surface-1-60: rgba(241, 245, 249, 0.8);
  --surface-1-70: rgba(241, 245, 249, 0.85);
  --surface-1-80: rgba(241, 245, 249, 0.9);
  --surface-1-90: rgba(241, 245, 249, 0.95);
  --surface-1-95: rgba(248, 250, 252, 0.98);
  --surface-2-40: rgba(226, 232, 240, 0.5);
  --surface-2-50: rgba(226, 232, 240, 0.6);
  --surface-2-60: rgba(226, 232, 240, 0.7);
  --surface-2-70: rgba(226, 232, 240, 0.8);
  --surface-2-80: rgba(226, 232, 240, 0.9);
  --surface-2-90: rgba(226, 232, 240, 0.95);

  /* === Black/White overlays inversés === */
  /* Le "white" overlay devient un "black" overlay subtil en light mode */
  --white-02: rgba(15, 23, 42, 0.02);
  --white-03: rgba(15, 23, 42, 0.03);
  --white-04: rgba(15, 23, 42, 0.04);
  --white-05: rgba(15, 23, 42, 0.05);
  --white-06: rgba(15, 23, 42, 0.06);
  --white-07: rgba(15, 23, 42, 0.07);
  --white-08: rgba(15, 23, 42, 0.08);
  --white-10: rgba(15, 23, 42, 0.1);
  --white-12: rgba(15, 23, 42, 0.12);
  --white-15: rgba(15, 23, 42, 0.15);
  --white-20: rgba(15, 23, 42, 0.2);
  /* Inversement, "black" devient un "white" assombri (pour les shadows légères) */
  --black-08: rgba(15, 23, 42, 0.05);
  --black-12: rgba(15, 23, 42, 0.06);
  --black-15: rgba(15, 23, 42, 0.08);
  --black-18: rgba(15, 23, 42, 0.1);
  --black-20: rgba(15, 23, 42, 0.1);
  --black-25: rgba(15, 23, 42, 0.12);
  --black-30: rgba(15, 23, 42, 0.15);
  --black-35: rgba(15, 23, 42, 0.18);
  --black-40: rgba(15, 23, 42, 0.2);
  --black-50: rgba(15, 23, 42, 0.25);
  --black-60: rgba(15, 23, 42, 0.3);
  --black-70: rgba(15, 23, 42, 0.4);

  /* === Shadows — opacités réduites pour le fond clair === */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 16px 48px rgba(15, 23, 42, 0.18);
}

/* ============================================================
   LIGHT MODE — TODO (préparation requise)
   Pour activer un mode clair propre, il faut d'abord migrer ~163 rgba()
   hardcodés (rgba(15,23,42,X), rgba(30,41,59,X), rgba(0,0,0,X), rgba(255,255,255,X))
   vers des tokens semantic --surface-glass-* / --overlay-* qui s'adaptent au mode.
   Sans cette préparation, un @media (prefers-color-scheme: light) donnerait
   un rendu cassé (textes blancs sur fond blanc).
   Voir tâche dédiée dans la prochaine session.
   ============================================================ */

* {
  margin: var(--space-0);
  padding: var(--space-0);
  box-sizing: border-box;
}
body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, var(--surface-1), var(--surface-2));
  min-height: 100vh;
  color: var(--text-primary);
}
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
  background: #05090f;
}
.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  animation: loginBlob 9s ease-in-out infinite;
}
.login-blob-1 {
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.14), transparent 70%);
  top: -180px;
  left: -120px;
  animation-delay: 0s;
}
.login-blob-2 {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1), transparent 70%);
  bottom: -120px;
  right: -80px;
  animation-delay: -4.5s;
}
.login-blob-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -2s;
}
@keyframes loginBlob {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, 25px) scale(1.12);
  }
}
.login-blob-3 {
  animation: loginBlob3 11s ease-in-out infinite;
}
@keyframes loginBlob3 {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(calc(-50% + 20px), calc(-50% + 15px)) scale(1.08);
  }
}
.login-box {
  background: rgba(10, 17, 30, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-3xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(59, 130, 246, 0.12);
  box-shadow:
    0 32px 64px var(--black-60),
    0 0 0 1px var(--white-03),
    inset 0 1px 0 var(--white-05);
}
.login-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-3xl);
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.35) 0%,
    rgba(16, 185, 129, 0.12) 50%,
    transparent 70%,
    rgba(59, 130, 246, 0.08) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.login-logo {
  max-width: 180px;
  height: auto;
  margin: 0 auto 8px;
  display: block;
  filter: drop-shadow(0 0 14px rgba(59, 130, 246, 0.45))
    drop-shadow(0 0 28px rgba(59, 130, 246, 0.22));
  animation: logoPulse 3.5s ease-in-out infinite;
}
@keyframes logoPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 14px rgba(59, 130, 246, 0.45))
      drop-shadow(0 0 28px rgba(59, 130, 246, 0.22));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.7))
      drop-shadow(0 0 40px rgba(59, 130, 246, 0.35));
  }
}
.login-title {
  font-size: var(--fs-xs);
  color: var(--surface-3);
  text-align: center;
  margin-bottom: var(--space-7);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 600;
}
.login-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.25),
    rgba(16, 185, 129, 0.15),
    transparent
  );
  margin: var(--space-0) var(--space-0) var(--space-7);
}
.form-group {
  margin-bottom: var(--space-4);
}
.form-label {
  display: block;
  color: var(--text-faint);
  font-size: var(--fs-2xs);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 700;
}
.form-input {
  width: 100%;
  padding: 13px 14px;
  background: rgba(5, 9, 15, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: var(--radius-default);
  color: var(--text-primary);
  font-size: var(--fs-md);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}
.form-input::placeholder {
  color: #1e2d3d;
}
.form-input:focus {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(5, 9, 15, 0.9);
  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.09),
    0 0 14px rgba(59, 130, 246, 0.07);
}
.btn-login {
  width: 100%;
  padding: var(--space-3-5);
  background: linear-gradient(135deg, #2563eb 0%, #0d9488 100%);
  border: none;
  border-radius: var(--radius-default);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: var(--space-3-5);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.32);
}
.btn-login::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45);
}
.btn-login:hover::after {
  opacity: 1;
}
.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}
.login-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-left: 3px solid #ef4444;
  border-radius: var(--radius-sm);
  padding: var(--space-2-5) var(--space-3);
  margin-bottom: 15px;
  color: #fca5a5;
  font-size: var(--fs-base);
  display: none;
}
.login-demo {
  margin-top: var(--space-6);
  padding: var(--space-3) var(--space-3-5);
  background: rgba(5, 9, 15, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.07);
  border-radius: var(--radius-default);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}
.login-demo strong {
  color: var(--text-faint);
  display: block;
  margin-bottom: var(--space-1-5);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.login-demo .blue {
  color: #3b82f6;
}
.login-demo .green {
  color: #10b981;
}
.app-container {
  display: none;
}
.app-container.active {
  display: flex;
}
.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #080e1a 0%, #0d1526 50%, #0f1c2e 100%);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  box-shadow:
    inset -1px 0 0 rgba(59, 130, 246, 0.12),
    4px 0 24px var(--black-40),
    inset -2px 0 20px rgba(59, 130, 246, 0.04);
}
.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(59, 130, 246, 0.3) 30%,
    rgba(16, 185, 129, 0.2) 70%,
    transparent 100%
  );
  pointer-events: none;
}
.sidebar-header {
  padding: var(--space-4-5) var(--space-4) var(--space-3-5);
  border-bottom: 1px solid rgba(148, 163, 184, 0.07);
  text-align: center;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), transparent);
}
.sidebar-logo {
  max-width: 110px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}
.sidebar-nav {
  flex: 1;
  padding: var(--space-2-5) var(--space-2);
  overflow-y: auto;
}
.nav-section-label {
  font-size: var(--fs-3xs);
  font-weight: 700;
  color: var(--surface-3);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: var(--space-3) var(--space-2-5) var(--space-1);
  margin-top: var(--space-1);
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2-5) var(--space-3);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: var(--space-0-5);
  color: var(--text-dim);
  font-size: var(--fs-base);
  text-align: left;
  transition: all 0.18s ease;
  position: relative;
}
.nav-item:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-muted);
  transform: translateX(3px);
}
.nav-item:hover i {
  color: #60a5fa;
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(16, 185, 129, 0.08));
  color: var(--text-secondary);
  box-shadow:
    inset 0 0 0 1px rgba(59, 130, 246, 0.18),
    0 2px 8px rgba(59, 130, 246, 0.08);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 3px;
  background: linear-gradient(180deg, #3b82f6, #10b981);
  border-radius: 0 3px 3px 0;
  box-shadow:
    0 0 8px rgba(59, 130, 246, 0.6),
    0 0 16px rgba(59, 130, 246, 0.3);
}
.nav-item i {
  width: 20px;
  font-size: 15px;
  color: var(--text-faint);
  transition: all 0.18s ease;
  text-align: center;
}
.nav-item.active i {
  color: #60a5fa;
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.5));
}
.nav-notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: #ef4444;
  color: #fff;
  border-radius: 9px;
  font-size: var(--fs-2xs);
  font-weight: 700;
  margin-left: auto;
  padding: 0 5px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: navBadgePulse 2s ease-in-out infinite;
}
@keyframes navBadgePulse {
  0%,
  100% {
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
  }
  50% {
    box-shadow:
      0 0 14px rgba(239, 68, 68, 0.8),
      0 0 20px rgba(239, 68, 68, 0.4);
  }
}
.sidebar-footer {
  padding: var(--space-2-5) var(--space-2) var(--space-3);
  border-top: 1px solid rgba(59, 130, 246, 0.08);
  background: linear-gradient(0deg, rgba(59, 130, 246, 0.04), transparent);
}
.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
  padding: var(--space-2-5) var(--space-3);
  background: var(--surface-1-60);
  border-radius: var(--radius-default);
  margin-bottom: var(--space-2);
  border: 1px solid rgba(148, 163, 184, 0.06);
  transition: all 0.2s;
}
.user-info:hover {
  background: var(--surface-2-70);
  border-color: rgba(59, 130, 246, 0.15);
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-base);
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px var(--black-30);
}
.user-avatar.admin {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}
.user-avatar.manager {
  background: linear-gradient(135deg, #f59e0b, #3b82f6);
}
.user-avatar.auditor {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}
.user-avatar.formateur {
  background: linear-gradient(135deg, #10b981, #14b8a6);
}
.user-avatar.it {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
}
.user-avatar.rh {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
}
.user-avatar.collaborateur {
  background: linear-gradient(135deg, #10b981, #3b82f6);
}
.user-details {
  flex: 1;
  overflow: hidden;
}
.user-details .name {
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-details .role {
  font-size: var(--fs-2xs);
  color: var(--text-dim);
  text-transform: capitalize;
}
.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1-5);
  padding: var(--space-2-5);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  color: #f87171;
  font-size: var(--fs-base);
  cursor: pointer;
}
.btn-deloguer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1-5);
  padding: var(--space-2-5);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.15));
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: var(--radius-sm);
  color: #fbbf24;
  font-size: var(--fs-base);
  cursor: pointer;
  font-weight: 600;
  margin-bottom: var(--space-2);
  transition: all 0.3s;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.1);
}

/* Pointage Temps Reel - Beautiful Styles */
.pointage-status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  padding: var(--space-1-5) var(--space-3-5);
  border-radius: var(--radius-2xl);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.3px;
}
.pointage-status-pret {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.pointage-status-pret .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: statusPulse 2s ease-in-out infinite;
}
.pointage-status-absent {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
  border: 1px solid rgba(100, 116, 139, 0.25);
}
.pointage-status-connecte {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.pointage-status-connecte .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
}
.pointage-status-absent .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}
.pointage-status-pause5,
.pointage-status-pause10 {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.pointage-status-pause5 .status-dot,
.pointage-status-pause10 .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: statusPulse 1.5s ease-in-out infinite;
}
.pointage-status-pauseDej {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.pointage-status-pauseDej .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
  animation: statusPulse 1.5s ease-in-out infinite;
}
.pointage-status-debrief {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.25);
}
.pointage-status-debrief .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8b5cf6;
  box-shadow: 0 0 8px #8b5cf6;
  animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}
@keyframes pauseBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.pause-timer-cell {
  font-family: "Courier New", monospace;
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 1px;
}
.pause-timer-active {
  color: #f59e0b;
  animation: pauseBlink 1s ease-in-out infinite;
}
.pause-timer-dej {
  color: #3b82f6;
  animation: pauseBlink 1.2s ease-in-out infinite;
}
.exceeded-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2-5);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 700;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  cursor: pointer;
  transition: all 0.2s;
}
.exceeded-badge:hover {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
  transform: scale(1.05);
}
.exceeded-zero {
  color: var(--text-dim);
  font-size: var(--fs-base);
  font-weight: 500;
}
.pause-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  font-weight: 700;
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.2);
}
.total-pause-time {
  font-family: "Courier New", monospace;
  font-size: var(--fs-base);
  font-weight: 600;
  padding: var(--space-1) var(--space-2-5);
  border-radius: var(--radius-sm);
}
.total-pause-low {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
}
.total-pause-medium {
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
}
.total-pause-high {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}
/* backdrop-filter:blur retire volontairement — trop coûteux quand le tableau pointage derrière se rafraîchit en continu (re-rasterisation GPU à chaque socket event) */
.exceeded-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.82);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
  will-change: opacity;
}
.exceeded-modal {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-0);
  width: 560px;
  max-width: 90vw;
  max-height: 80vh;
  overflow: hidden;
  box-shadow:
    0 25px 60px var(--black-50),
    0 0 30px rgba(239, 68, 68, 0.1);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.exceeded-modal-header {
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.exceeded-modal-header h3 {
  margin: var(--space-0);
  font-size: var(--fs-lg);
  color: #f87171;
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
}
.exceeded-modal-close {
  background: var(--white-08);
  border: 1px solid var(--white-10);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
  transition: all 0.2s;
}
.exceeded-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.exceeded-modal-body {
  padding: var(--space-4) var(--space-6);
  overflow-y: auto;
  max-height: 60vh;
}
.exceeded-pause-card {
  background: var(--white-03);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-md);
  padding: var(--space-3-5) var(--space-4-5);
  margin-bottom: var(--space-2-5);
  transition: all 0.2s;
}
.exceeded-pause-card:hover {
  background: var(--white-06);
  border-color: var(--white-10);
}
.exceeded-pause-card.is-exceeded {
  border-left: 3px solid #ef4444;
  background: rgba(239, 68, 68, 0.04);
}
.exceeded-pause-card.is-ok {
  border-left: 3px solid #10b981;
  background: rgba(16, 185, 129, 0.04);
}
.pause-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}
.pause-card-type {
  font-size: var(--fs-base);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.pause-card-type.pause5 {
  color: #f59e0b;
}
.pause-card-type.pause10 {
  color: #f59e0b;
}
.pause-card-type.pauseDej {
  color: #3b82f6;
}
.pause-card-type.debrief {
  color: #8b5cf6;
}
.pause-card-time {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  font-family: "Courier New", monospace;
}
.pause-card-details {
  display: flex;
  gap: var(--space-5);
  align-items: center;
}
.pause-detail-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-0-5);
}
.pause-detail-label {
  font-size: var(--fs-2xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pause-detail-value {
  font-size: var(--fs-md);
  font-weight: 700;
  font-family: "Courier New", monospace;
}
.pause-detail-value.exceeded-val {
  color: #ef4444;
}
.pause-detail-value.ok-val {
  color: #10b981;
}
.pause-progress-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--white-06);
  margin-top: var(--space-2-5);
  overflow: hidden;
  position: relative;
}
.pause-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}
.pause-progress-fill.ok {
  background: linear-gradient(90deg, #10b981, #34d399);
}
.pause-progress-fill.exceeded {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}
.exceeded-summary {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  background: var(--white-02);
  border-top: 1px solid var(--white-06);
}
.exceeded-summary-item {
  flex: 1;
  text-align: center;
  padding: var(--space-2-5);
  border-radius: var(--radius-default);
  background: var(--white-03);
}
.exceeded-summary-number {
  font-size: var(--fs-2xl);
  font-weight: 800;
  font-family: "Courier New", monospace;
}
.exceeded-summary-label {
  font-size: var(--fs-2xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: var(--space-0-5);
}

/* Ticket IT System Styles */
.ticket-card {
  background: var(--white-03);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  transition: all 0.2s;
}
.ticket-card:hover {
  background: var(--white-06);
  border-color: var(--white-12);
}
.ticket-urgency-critique {
  border-left: 4px solid #ef4444;
}
.ticket-urgency-moyen {
  border-left: 4px solid #f59e0b;
}
.ticket-urgency-faible {
  border-left: 4px solid #10b981;
}
.ticket-status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2-5);
  border-radius: var(--radius-2xl);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.3px;
}
.ticket-status-en_attente {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.ticket-status-en_cours {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.ticket-status-resolu {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.ticket-status-rejete {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.ticket-urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: var(--fs-2xs);
  font-weight: 700;
  text-transform: uppercase;
}
.ticket-urgency-badge.critique {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  animation: statusPulse 1.5s infinite;
}
.ticket-urgency-badge.moyen {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.ticket-urgency-badge.faible {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.ticket-stat-card {
  background: linear-gradient(135deg, var(--white-04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--white-08);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  transition: all 0.3s;
}
.ticket-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--black-20);
}
.ticket-stat-number {
  font-size: 32px;
  font-weight: 800;
  font-family: "Courier New", monospace;
}
.ticket-stat-label {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: var(--space-1);
}
.ticket-type-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
}
.ticket-comment {
  padding: var(--space-3);
  border-radius: var(--radius-default);
  margin-bottom: var(--space-2);
}
.ticket-comment.user-comment {
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid #3b82f6;
}
.ticket-comment.it-comment {
  background: rgba(139, 92, 246, 0.08);
  border-left: 3px solid #8b5cf6;
}
.ticket-comment.internal-comment {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
}
.ticket-detail-modal {
  max-width: 650px;
}
.ticket-type-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
  padding: var(--space-2) var(--space-3);
  background: var(--white-03);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-1-5);
}
.ticket-type-bar-fill {
  height: 6px;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.btn-deloguer:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.3));
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
  transform: translateY(-1px);
}
.btn-filter {
  padding: var(--space-2) var(--space-3-5);
  background: var(--surface-2-60);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-1-5);
  transition: 0.2s;
}
.btn-filter:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}
.btn-filter.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #3b82f6;
}
.main-content {
  margin-left: 240px;
  padding: var(--space-5);
  min-height: 100vh;
  flex: 1;
}
.page-header {
  margin-bottom: var(--space-7);
  padding: var(--space-1-5) var(--space-0) var(--space-5);
  background-image:
    linear-gradient(90deg, #3b82f6, #10b981, transparent),
    linear-gradient(90deg, rgba(59, 130, 246, 0.18), rgba(16, 185, 129, 0.06), transparent);
  background-size:
    72px 2px,
    100% 1px;
  background-position:
    bottom left,
    bottom left;
  background-repeat: no-repeat;
}
.page-header h1 {
  font-size: var(--fs-3xl);
  font-weight: 800;
  margin-bottom: 5px;
  background: linear-gradient(120deg, #f1f5f9 20%, #93c5fd 60%, #6ee7b7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.page-header p {
  color: var(--text-faint);
  font-size: var(--fs-sm);
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: var(--space-1-5);
}
.page-header p::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  flex-shrink: 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.stat-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.55));
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4-5) var(--space-4-5);
  border: 1px solid rgba(148, 163, 184, 0.08);
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 2px 12px var(--black-18),
    inset 0 1px 0 var(--white-03);
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.5), rgba(16, 185, 129, 0.3), transparent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0.7;
}
.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 65%);
  pointer-events: none;
  border-radius: 0 var(--radius-lg) 0 0;
  transition: opacity 0.22s;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 32px var(--black-30),
    0 0 0 1px rgba(59, 130, 246, 0.22),
    inset 0 1px 0 var(--white-05);
  border-color: rgba(59, 130, 246, 0.2);
}
.stat-card:hover::after {
  opacity: 1.8;
}
.stat-card:has(.stat-icon.blue)::before {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.7), rgba(139, 92, 246, 0.3), transparent);
}
.stat-card:has(.stat-icon.blue):hover {
  box-shadow:
    0 12px 32px var(--black-30),
    0 0 0 1px rgba(59, 130, 246, 0.25),
    0 0 20px rgba(59, 130, 246, 0.08);
}
.stat-card:has(.stat-icon.green)::before {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.7), rgba(59, 130, 246, 0.3), transparent);
}
.stat-card:has(.stat-icon.green)::after {
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.1), transparent 65%);
}
.stat-card:has(.stat-icon.green):hover {
  box-shadow:
    0 12px 32px var(--black-30),
    0 0 0 1px rgba(16, 185, 129, 0.25),
    0 0 20px rgba(16, 185, 129, 0.07);
}
.stat-card:has(.stat-icon.orange)::before {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.7), rgba(239, 68, 68, 0.3), transparent);
}
.stat-card:has(.stat-icon.orange)::after {
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.1), transparent 65%);
}
.stat-card:has(.stat-icon.orange):hover {
  box-shadow:
    0 12px 32px var(--black-30),
    0 0 0 1px rgba(245, 158, 11, 0.22),
    0 0 20px rgba(245, 158, 11, 0.07);
}
.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3-5);
  box-shadow: 0 4px 12px var(--black-25);
}
.stat-icon.blue {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.stat-icon.green {
  background: linear-gradient(135deg, #059669, #2563eb);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.32);
}
.stat-icon.orange {
  background: linear-gradient(135deg, #d97706, #dc2626);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.32);
}
.stat-icon i {
  font-size: var(--fs-lg);
  color: #fff;
}
.stat-label {
  color: var(--text-dim);
  font-size: var(--fs-xs);
  margin-bottom: var(--space-1-5);
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.stat-value {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-5);
}
.content-card {
  background: linear-gradient(145deg, var(--surface-1-70), var(--surface-2-50));
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4-5);
  border: 1px solid rgba(148, 163, 184, 0.08);
  box-shadow:
    0 2px 12px var(--black-15),
    inset 0 1px 0 var(--white-03);
}
.content-card h3 {
  font-size: var(--fs-md);
  font-weight: 700;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: #cbd5e1;
  letter-spacing: 0.1px;
}
.content-card h3 i {
  color: #3b82f6;
  width: 18px;
  text-align: center;
}
/* Dashboard grid (pageManager) + conteneurs de graphiques Chart.js
       Chart.js avec maintainAspectRatio:false exige une hauteur parent explicite */
.dashboard-grid {
  display: grid;
  gap: var(--space-5);
}
.dashboard-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.dashboard-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 980px) {
  .dashboard-grid-2,
  .dashboard-grid-3 {
    grid-template-columns: 1fr;
  }
}
.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
}
.chart-container canvas {
  max-width: 100%;
  max-height: 100%;
}

/* ============================================
       QUALITY AUDIT MODULE
       ============================================ */
.qa-tab-bar {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding-bottom: var(--space-0);
}
.qa-tab {
  padding: 12px 22px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-dim);
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.qa-tab:hover {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.05);
}
.qa-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}
.qa-tab i {
  font-size: var(--fs-md);
}

.qa-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1-5);
}
.qa-input {
  width: 100%;
  padding: var(--space-2-5) var(--space-3);
  background: var(--surface-1-60);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--fs-base);
  transition: border-color 0.2s;
  font-family: inherit;
}
.qa-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
textarea.qa-input,
textarea.qa-criterion-comment {
  resize: vertical;
  min-height: 60px;
}

.qa-type-switch {
  display: flex;
  gap: var(--space-1-5);
  background: var(--surface-1-60);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-default);
  padding: var(--space-1);
}
.qa-type-opt {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  text-align: center;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1-5);
}
.qa-type-opt input {
  display: none;
}
.qa-type-opt.active {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.qa-live-score {
  text-align: center;
  padding: var(--space-3-5);
  background: var(--surface-1-60);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-md);
}
.qa-live-score-label {
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-1);
}
.qa-live-score-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-dim);
  transition: color 0.3s;
}

.qa-criteria-container {
  padding: var(--space-0);
}
.qa-criteria-group {
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.qa-criteria-group:last-child {
  border-bottom: none;
}
.qa-cat-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--space-3-5) var(--space-5) var(--space-2);
  margin: var(--space-0);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(59, 130, 246, 0.05);
}
.qa-cat-title i {
  font-size: var(--fs-2xs);
}
.qa-criterion-row {
  padding: var(--space-3-5) var(--space-5);
  border-top: 1px solid rgba(148, 163, 184, 0.06);
  transition: background 0.15s;
}
.qa-criterion-row:hover {
  background: rgba(148, 163, 184, 0.03);
}
.qa-criterion-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.qa-criterion-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-md);
  color: var(--text-secondary);
  flex: 1;
  min-width: 200px;
}
.qa-weight-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 22px;
  padding: var(--space-0) var(--space-2);
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-radius: 11px;
  font-size: var(--fs-xs);
  font-weight: 700;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.qa-criterion-buttons {
  display: flex;
  gap: var(--space-2);
}
.qa-btn-conforme,
.qa-btn-nc {
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: var(--surface-1-50);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: var(--space-1-5);
}
.qa-btn-conforme:hover {
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}
.qa-btn-nc:hover {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}
.qa-btn-conforme.qa-selected-c {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.qa-btn-nc.qa-selected-nc {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.qa-criterion-comment {
  width: 100%;
  margin-top: var(--space-2-5);
  padding: var(--space-2-5) var(--space-3);
  background: var(--surface-1-60);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--fs-base);
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}

.qa-history-table,
.qa-criteria-table {
  width: 100%;
  border-collapse: collapse;
}
.qa-history-table th,
.qa-criteria-table th {
  padding: var(--space-3) var(--space-3-5);
  text-align: left;
  background: var(--surface-1-50);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.qa-history-table td,
.qa-criteria-table td {
  padding: var(--space-3) var(--space-3-5);
  color: var(--text-secondary);
  font-size: var(--fs-base);
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}
.qa-history-table tr:hover {
  background: rgba(148, 163, 184, 0.03);
}
.qa-criterion-inactive {
  opacity: 0.45;
}
.qa-criterion-inactive input {
  text-decoration: line-through;
}

.qa-score-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 800;
  min-width: 60px;
}
.qa-score-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.qa-score-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.qa-score-bad {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.qa-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-default);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.qa-type-chaud {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.qa-type-froid {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.qa-active-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-default);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.qa-active-badge.on {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.qa-active-badge.off {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-dim);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.qa-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

/* Modal détail audit */
.qa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  animation: fadeIn 0.2s ease;
}
.qa-modal {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-xl);
  width: 820px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px var(--black-60);
}
.qa-modal-header {
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}
.qa-modal-header h3 {
  margin: var(--space-0);
  font-size: var(--fs-lg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
}
.qa-modal-header-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.qa-modal-close {
  background: var(--white-08);
  border: 1px solid var(--white-10);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--fs-xl);
  line-height: 1;
}
.qa-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
.qa-modal-body {
  padding: var(--space-5) var(--space-6);
  overflow-y: auto;
  flex: 1;
}
.qa-detail-header-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  background: var(--surface-1-50);
  border-radius: var(--radius-md);
}
.qa-detail-header-info > div strong {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-primary);
  font-size: var(--fs-md);
}
.qa-detail-score {
  text-align: right;
}
.qa-detail-cat {
  margin-bottom: var(--space-4);
}
.qa-detail-cat h4 {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: var(--space-1-5);
  margin: var(--space-0) var(--space-0) var(--space-2);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.qa-detail-row {
  padding: var(--space-2-5) var(--space-3);
  background: var(--surface-1-40);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-1-5);
  border-left: 3px solid transparent;
}
.qa-detail-row:has(.qa-resp-ok) {
  border-left-color: #10b981;
}
.qa-detail-row:has(.qa-resp-ko) {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.04);
}
.qa-detail-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  font-size: var(--fs-base);
  color: var(--text-secondary);
}
.qa-detail-comment {
  margin-top: var(--space-1-5);
  padding: var(--space-2) var(--space-2-5);
  background: rgba(239, 68, 68, 0.06);
  border-radius: var(--radius-xs);
  font-size: var(--fs-sm);
  color: #cbd5e1;
  font-style: italic;
}
.qa-resp-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  padding: var(--space-1) var(--space-2-5);
  border-radius: var(--radius-default);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.qa-resp-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.qa-resp-ko {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.qa-detail-global-comment {
  margin-top: var(--space-4);
  padding: var(--space-3-5);
  background: rgba(59, 130, 246, 0.05);
  border-left: 3px solid #3b82f6;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  color: #cbd5e1;
}
.qa-detail-global-comment p {
  margin: var(--space-1-5) var(--space-0) var(--space-0);
  line-height: 1.5;
}

/* Toast notifications (fallback si showNotification indispo) */
.qa-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: var(--space-3-5) var(--space-5);
  background: var(--surface-2);
  color: var(--text-primary);
  border-radius: var(--radius-default);
  box-shadow: 0 10px 30px var(--black-40);
  z-index: 100000;
  font-size: var(--fs-base);
  font-weight: 600;
  border-left: 4px solid #3b82f6;
  transform: translateX(400px);
  transition: transform 0.3s ease;
}
.qa-toast.qa-toast-show {
  transform: translateX(0);
}
.qa-toast-success {
  border-left-color: #10b981;
}
.qa-toast-error {
  border-left-color: #ef4444;
}

/* Print media — pour bouton "Imprimer / PDF" */
@media print {
  body.qa-print-mode > *:not(.qa-modal-overlay) {
    display: none !important;
  }
  body.qa-print-mode .qa-modal-overlay {
    position: static !important;
    background: #fff !important;
    padding: 0 !important;
    display: block !important;
  }
  body.qa-print-mode .qa-modal {
    background: #fff !important;
    color: #000 !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    max-height: none !important;
    width: 100% !important;
    display: block !important;
  }
  body.qa-print-mode .qa-modal-header {
    background: #fff !important;
    border-bottom: 2px solid #000 !important;
    color: #000 !important;
  }
  body.qa-print-mode .qa-modal-header h3 {
    color: #000 !important;
  }
  body.qa-print-mode .qa-modal-body {
    overflow: visible !important;
    padding: 20px !important;
  }
  body.qa-print-mode .qa-detail-header-info {
    background: #f5f5f5 !important;
    color: #000 !important;
  }
  body.qa-print-mode .qa-detail-header-info > div strong {
    color: #000 !important;
  }
  body.qa-print-mode .qa-detail-cat h4 {
    color: #000 !important;
    border-bottom: 1px solid #999 !important;
  }
  body.qa-print-mode .qa-detail-row {
    background: #fafafa !important;
    color: #000 !important;
  }
  body.qa-print-mode .qa-detail-row-head {
    color: #000 !important;
  }
  body.qa-print-mode .qa-detail-comment {
    background: #fff3f3 !important;
    color: #333 !important;
  }
  body.qa-print-mode .qa-resp-ok {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border-color: #10b981 !important;
  }
  body.qa-print-mode .qa-resp-ko {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border-color: #ef4444 !important;
  }
  body.qa-print-mode .qa-weight-badge {
    background: #e0e7ff !important;
    color: #3730a3 !important;
  }
  body.qa-print-mode .no-print,
  body.qa-print-mode .qa-modal-header-actions {
    display: none !important;
  }
}

.table-container {
  background: var(--surface-2-60);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.1);
  overflow: hidden;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  padding: var(--space-3);
  text-align: left;
  background: var(--surface-1-50);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
}
th.center {
  text-align: center;
}
th.yallo {
  color: #f59e0b;
}
th.lebara {
  color: #ef4444;
}
th.salt {
  color: #8b5cf6;
}
th.sunrise {
  color: #3b82f6;
}
th.total {
  color: #10b981;
}
td {
  padding: var(--space-3);
  border-top: 1px solid rgba(148, 163, 184, 0.07);
  font-size: var(--fs-sm);
  transition: background 0.15s ease;
}
tbody tr {
  transition: background 0.15s ease;
}
tbody tr:hover td {
  background: rgba(59, 130, 246, 0.05);
}
tbody tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.2);
}
tbody tr:nth-child(even):hover td {
  background: rgba(59, 130, 246, 0.07);
}
/* Leading edge indicator par statut */
tbody tr[data-status] td:first-child {
  position: relative;
}
tbody tr[data-status="valide"] td:first-child {
  box-shadow: inset 3px 0 0 #10b981;
}
tbody tr[data-status="valide"]:hover td {
  background: rgba(16, 185, 129, 0.05) !important;
}
tbody tr[data-status="attente"] td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}
tbody tr[data-status="attente"]:hover td {
  background: rgba(245, 158, 11, 0.05) !important;
}
tbody tr[data-status="annule"] td:first-child {
  box-shadow: inset 3px 0 0 #ef4444;
}
tbody tr[data-status="annule"]:hover td {
  background: rgba(239, 68, 68, 0.04) !important;
}
tbody tr[data-status="approuve"] td:first-child {
  box-shadow: inset 3px 0 0 #10b981;
}
tbody tr[data-status="approuve"]:hover td {
  background: rgba(16, 185, 129, 0.05) !important;
}
tbody tr[data-status="refuse"] td:first-child {
  box-shadow: inset 3px 0 0 #ef4444;
}
tbody tr[data-status="refuse"]:hover td {
  background: rgba(239, 68, 68, 0.04) !important;
}
tbody tr[data-status="traite"] td:first-child {
  box-shadow: inset 3px 0 0 #10b981;
}
tbody tr[data-status="traite"]:hover td {
  background: rgba(16, 185, 129, 0.05) !important;
}
tbody tr[data-status="en_attente"] td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}
tbody tr[data-status="en_attente"]:hover td {
  background: rgba(245, 158, 11, 0.05) !important;
}
td.center {
  text-align: center;
}
td.yallo {
  color: #f59e0b;
  font-weight: 600;
}
td.lebara {
  color: #ef4444;
  font-weight: 600;
}
td.salt {
  color: #8b5cf6;
  font-weight: 600;
}
td.sunrise {
  color: #3b82f6;
  font-weight: 600;
}
.total-badge {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(59, 130, 246, 0.2));
  padding: var(--space-1) var(--space-2-5);
  border-radius: var(--radius-md);
  color: #10b981;
  font-weight: 600;
  font-size: var(--fs-sm);
}
.status-badge {
  padding: var(--space-1) var(--space-2-5);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--fs-xs);
  display: inline-block;
  text-transform: uppercase;
}
.status-valide {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-attente {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-annule {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.audit-badge {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--fs-2xs);
  display: inline-block;
}
.audit-non-audite {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-dim);
  border: 1px solid rgba(100, 116, 139, 0.3);
}
.audit-en-cours {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.audit-conforme {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
/* === MODULE AUDIT QUALITE SCORING === */
.audit-score-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--surface-2-90), var(--surface-1-95));
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.audit-score-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  min-width: 90px;
  transition: color 0.3s ease;
}
.audit-score-bar-wrap {
  flex: 1;
}
.audit-score-bar-bg {
  height: 10px;
  background: var(--white-10);
  border-radius: 5px;
  overflow: hidden;
}
.audit-score-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition:
    width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s ease;
}
.badge-conforme-premium {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: var(--space-1) var(--space-3-5);
  border-radius: var(--radius-2xl);
  font-weight: 700;
  font-size: 0.85rem;
}
.badge-conforme {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: var(--space-1) var(--space-3-5);
  border-radius: var(--radius-2xl);
  font-weight: 700;
  font-size: 0.85rem;
}
.badge-a-corriger {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: var(--space-1) var(--space-3-5);
  border-radius: var(--radius-2xl);
  font-weight: 700;
  font-size: 0.85rem;
}
.badge-non-conforme {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: var(--space-1) var(--space-3-5);
  border-radius: var(--radius-2xl);
  font-weight: 700;
  font-size: 0.85rem;
}
.audit-criteria-grid {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-4);
}
.audit-criteria-grid th {
  padding: var(--space-2-5) var(--space-3);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.audit-criteria-grid td {
  padding: var(--space-2-5) var(--space-3);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  vertical-align: top;
}
.audit-criteria-grid tr:hover td {
  background: rgba(99, 102, 241, 0.05);
}
.audit-criteria-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.audit-criteria-pct {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}
.audit-criteria-note {
  min-width: 70px;
}
.audit-criteria-note select {
  width: 100%;
  background: var(--surface-1-80);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  padding: var(--space-1) var(--space-2);
  font-size: 0.9rem;
  cursor: pointer;
}
.audit-criteria-note select:focus {
  outline: none;
  border-color: #6366f1;
}
.audit-criteria-comment {
  padding-top: var(--space-1-5);
}
.audit-criteria-comment input {
  width: 100%;
  background: var(--surface-1-60);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  padding: var(--space-1) var(--space-2);
  font-size: 0.8rem;
}
.audit-criteria-comment input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.5);
  color: var(--text-secondary);
}
.audit-criteria-comment input::placeholder {
  color: var(--text-faint);
}
.audit-contrib {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  transition: color 0.2s;
}
.audit-contrib.good {
  color: #10b981;
}
.audit-contrib.ok {
  color: #f59e0b;
}
.audit-contrib.bad {
  color: #ef4444;
}
.audit-section-gravite,
.audit-section-motif {
  background: var(--surface-1-60);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-default);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  transition: all 0.3s ease;
}
.audit-section-gravite.hidden,
.audit-section-motif.hidden {
  display: none;
}
.audit-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-2-5);
}
.audit-select-full {
  width: 100%;
  background: var(--surface-1-80);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: 0.9rem;
}
.audit-select-full:focus {
  outline: none;
  border-color: #6366f1;
}
.audit-auto-critique-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-xs);
  padding: var(--space-1) var(--space-2-5);
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: var(--space-1-5);
}
.mes-audits-section {
  margin-top: var(--space-6);
}
.mes-audits-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.surveillance-card {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}
.surveillance-card h3 {
  color: #ef4444;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.surveillance-agent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-0);
  border-bottom: 1px solid rgba(239, 68, 68, 0.1);
}
.surveillance-agent-row:last-child {
  border-bottom: none;
}
.badge-surveillance {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: var(--radius-md);
  padding: var(--space-0-5) var(--space-2-5);
  font-size: 0.75rem;
  font-weight: 700;
}
/* === FIN MODULE AUDIT QUALITE === */

/* === MODULE PROPOSITIONS COMMERCIALES === */
.propositions-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3-5);
  margin-bottom: var(--space-7);
}
.prop-stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  text-align: center;
}
.prop-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.prop-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.section-title-prop {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3-5);
}
.propositions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.proposition-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.proposition-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--black-20);
}
.prop-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3-5);
}
.prop-icon {
  font-size: var(--fs-3xl);
}
.prop-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}
.prop-operator {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.prop-price-row {
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
  margin-bottom: var(--space-1);
}
.prop-price {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
}
.prop-discount {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent);
  border-radius: var(--radius-xs);
  padding: var(--space-0-5) var(--space-2);
  font-size: 0.75rem;
  font-weight: 700;
}
.prop-old-price {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-bottom: var(--space-2);
}
.prop-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}
.prop-destinations {
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: rgba(0, 191, 179, 0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 191, 179, 0.15);
}
.prop-dest-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  letter-spacing: 0.3px;
}
.prop-dest-title i { margin-right: 6px; }
.prop-dest-zones {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.prop-dest-zone-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid #ccc;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.prop-dest-zone-btn:hover { transform: translateY(-1px); }
.prop-dest-zone-btn.prop-dest-zone-active {
  background: var(--zone-color, #00BFB3);
  color: #fff !important;
}
.prop-dest-countries {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 2px 2px;
  animation: propDestFade 0.2s ease;
}
.prop-dest-country {
  font-size: 0.74rem;
  padding: 3px 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}
.prop-dest-empty {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px 2px;
}
@keyframes propDestFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.prop-send-btn {
  width: 100%;
  padding: var(--space-2-5);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.prop-send-btn:hover {
  opacity: 0.85;
}
.prop-history-table {
  overflow-x: auto;
}
.prop-history-table table {
  width: 100%;
  border-collapse: collapse;
}
.prop-history-table th {
  text-align: left;
  padding: var(--space-2-5) var(--space-3);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.prop-history-table td {
  padding: var(--space-2-5) var(--space-3);
  font-size: 0.85rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
.prop-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.prop-status-ok {
  color: var(--accent);
  font-weight: 600;
}
.prop-status-fail {
  color: var(--danger);
  font-weight: 600;
}
.prop-empty {
  text-align: center;
  padding: var(--space-10);
  color: var(--text-muted);
  font-size: 0.9rem;
}
/* === FIN MODULE PROPOSITIONS === */
.audit-non-conforme {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.filters {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.filter-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-2-60);
  border-radius: var(--radius-default);
  border: 1px solid rgba(148, 163, 184, 0.1);
}
.filter-item i {
  color: var(--text-dim);
  font-size: var(--fs-sm);
}
.filter-item input,
.filter-item select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: var(--fs-sm);
  outline: none;
}
.filter-item select option {
  background: var(--surface-2);
}
.totals-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2-5);
  margin-bottom: var(--space-5);
}
.total-card {
  background: var(--surface-2-60);
  border-radius: var(--radius-default);
  padding: var(--space-3);
  border: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
}
.total-card .label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: 3px;
}
.total-card .value {
  font-size: 20px;
  font-weight: 700;
}
.total-card.yallo .value {
  color: #f59e0b;
}
.total-card.lebara .value {
  color: #ef4444;
}
.total-card.salt .value {
  color: #8b5cf6;
}
.total-card.sunrise .value {
  color: #3b82f6;
}
.total-card.total .value {
  color: #10b981;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  padding: var(--space-2-5) var(--space-4-5);
  background: linear-gradient(135deg, #2563eb, #059669);
  border: none;
  border-radius: var(--radius-default);
  color: #fff;
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  box-shadow: 0 3px 14px rgba(37, 99, 235, 0.28);
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--white-12), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 22px rgba(37, 99, 235, 0.4);
}
.btn-primary:hover::after {
  opacity: 1;
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22);
}
.pointage-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1-5);
  padding: var(--space-4);
  background: var(--surface-2-60);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.pointage-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
  transform: translateY(-2px);
}
.pointage-btn.active {
  background: linear-gradient(135deg, #3b82f6, #10b981);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.pointage-btn.pause {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-color: transparent;
  color: #fff;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
.btn-secondary {
  padding: var(--space-2-5) var(--space-4-5);
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: var(--fs-base);
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}
.btn-secondary:hover {
  background: var(--surface-2-80);
  border-color: rgba(148, 163, 184, 0.25);
  color: var(--text-muted);
  transform: translateY(-1px);
}
.btn-secondary:active {
  transform: translateY(0);
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--black-70);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  overflow-y: auto;
  padding: var(--space-5);
  pointer-events: none;
}
.modal-overlay.active {
  display: flex;
  pointer-events: auto;
}
.modal {
  background: var(--surface-2);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  width: 100%;
  max-width: 700px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  max-height: 90vh;
  overflow-y: auto;
}
.modal h3 {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--space-4-5);
}
.modal-form .form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
.modal-form .form-group {
  margin-bottom: var(--space-3);
}
.modal-form select {
  width: 100%;
  padding: var(--space-2-5) var(--space-3);
  background: var(--surface-1-60);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--fs-base);
  outline: none;
}
.modal-actions {
  display: flex;
  gap: var(--space-2-5);
  margin-top: var(--space-4-5);
}
.modal-actions button {
  flex: 1;
}
.action-btns {
  display: flex;
  gap: 5px;
  justify-content: center;
}
.admin-only {
  display: none;
}
.admin-view .admin-only {
  display: inline-flex;
}
.btn-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: var(--fs-sm);
  transition: all 0.15s;
}
.btn-icon.edit {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}
.btn-icon.edit:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.45);
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.25);
}
.btn-icon.delete {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
}
.btn-icon.delete:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.45);
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
}
.btn-icon.view {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #10b981;
}
.btn-icon.view:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.45);
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}
.btn-icon.export {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
}
.btn-icon.export:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(139, 92, 246, 0.45);
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.25);
}
/* P1 — Page Transitions Animées */
.page-section {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}
.page-section.active {
  display: block;
  animation: pageEnter 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Operator Circles with Real Logos */
.operator-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.operator-tab {
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
  border: 3px solid transparent;
  background: var(--surface-1-60);
}
.operator-tab:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--black-30);
}
.operator-tab.yallo {
  border-color: rgba(245, 158, 11, 0.3);
}
.operator-tab.yallo:hover,
.operator-tab.yallo.active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}
.operator-tab.lebara {
  border-color: rgba(239, 68, 68, 0.3);
}
.operator-tab.lebara:hover,
.operator-tab.lebara.active {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}
.operator-tab.salt {
  border-color: rgba(139, 92, 246, 0.3);
}
.operator-tab.salt:hover,
.operator-tab.salt.active {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
}
.operator-tab.sunrise {
  border-color: rgba(59, 130, 246, 0.3);
}
.operator-tab.sunrise:hover,
.operator-tab.sunrise.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.operator-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid var(--white-20);
}
.operator-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.operator-logo svg {
  width: 100%;
  height: 100%;
}
.operator-tab.yallo .operator-logo {
  background: #1a1a1a;
  border-color: #00d4aa;
}
.operator-tab.lebara .operator-logo {
  background: #e31e26;
  border-color: #e31e26;
}
.operator-tab.salt .operator-logo {
  background: #1a1a1a;
  border-color: #1a1a1a;
}
.operator-tab.sunrise .operator-logo {
  background: linear-gradient(135deg, #f8a5c2, #74b9ff);
  border-color: #f8a5c2;
}

.operator-tab .op-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: var(--space-1);
}
.operator-tab .op-count {
  font-size: 24px;
  font-weight: 800;
}
.operator-tab.yallo .op-name,
.operator-tab.yallo .op-count {
  color: #f59e0b;
}
.operator-tab.lebara .op-name,
.operator-tab.lebara .op-count {
  color: #ef4444;
}
.operator-tab.salt .op-name,
.operator-tab.salt .op-count {
  color: #8b5cf6;
}
.operator-tab.sunrise .op-name,
.operator-tab.sunrise .op-count {
  color: #3b82f6;
}

.contract-section {
  background: var(--surface-1-40);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}
.contract-section h5 {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.contract-section h5 i {
  color: #3b82f6;
}

/* File Upload */
.file-upload-zone {
  border: 2px dashed rgba(148, 163, 184, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--surface-1-30);
}
.file-upload-zone:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}
.file-upload-zone.has-file {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}
.file-upload-zone i {
  font-size: 32px;
  color: var(--text-dim);
  margin-bottom: var(--space-2-5);
}
.file-upload-zone.has-file i {
  color: #10b981;
}
.file-upload-zone p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.file-upload-zone .file-name {
  color: #10b981;
  font-weight: 600;
  margin-top: var(--space-2);
}
.file-upload-zone input {
  display: none;
}

.contracts-list {
  margin-top: 15px;
}
.contract-item {
  background: var(--surface-1-50);
  border-radius: var(--radius-default);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.contract-item .contract-info {
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
}
.contract-item .contract-op {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #fff;
}
.contract-item .contract-op.yallo {
  background: #f59e0b;
}
.contract-item .contract-op.lebara {
  background: #ef4444;
}
.contract-item .contract-op.salt {
  background: #8b5cf6;
}
.contract-item .contract-op.sunrise {
  background: #3b82f6;
}
.contract-item .contract-details {
  font-size: var(--fs-sm);
}
.contract-item .contract-details .client {
  font-weight: 600;
}
.contract-item .contract-details .offer {
  color: var(--text-dim);
}
.contract-item .contract-actions {
  display: flex;
  gap: 5px;
}

.sale-avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: #fff;
}
.sale-user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.file-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-xs);
  color: #10b981;
  margin-top: var(--space-1);
}
.file-indicator i {
  font-size: var(--fs-sm);
}

/* ========================================
       AUDIT LOG STYLES
       ======================================== */
#auditLogTableBody tr {
  transition: all 0.2s ease;
}

#auditLogTableBody tr:hover {
  background: rgba(59, 130, 246, 0.05);
  transform: translateX(4px);
}

.audit-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-lg);
  margin-right: var(--space-2);
}

.audit-action-icon.creation {
  background: rgba(16, 185, 129, 0.15);
}

.audit-action-icon.modification {
  background: rgba(245, 158, 11, 0.15);
}

.audit-action-icon.suppression {
  background: rgba(239, 68, 68, 0.15);
}

@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }
  .sidebar-logo {
    width: 30px;
  }
  .nav-item span,
  .user-details {
    display: none;
  }
  .main-content {
    margin-left: 60px;
    padding: 15px;
  }
  .operator-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .modal-form .form-row {
    grid-template-columns: 1fr;
  }
  .totals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .table-container {
    overflow-x: auto;
  }
  table {
    min-width: 600px;
  }
}
@media (max-width: 480px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    z-index: 200;
    transition: transform 0.25s ease;
    width: 240px;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar-collapse-btn {
    display: none;
  }
  .main-content {
    margin-left: var(--space-0);
    padding: var(--space-3);
  }
  .stat-card {
    padding: var(--space-3);
  }
}
/* Focus visible clavier — accessibilité WCAG 2.1 AA */
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
*:focus:not(:focus-visible) {
  outline: none;
}
/* Bouton en état loading */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.75;
}
.btn-loading::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid var(--white-30);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin-btn 0.6s linear infinite;
}
@keyframes spin-btn {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}
.triomphal-eagle-logo {
  width: 320px !important;
  height: auto !important;
  max-width: 90% !important;
  display: block !important;
  margin: 0 auto 20px !important;
}

/* ========================================
       LAYOUT CÔTE À CÔTE - KPIs & Top Performers
       ======================================== */

.dashboard-main-grid {
  display: grid;
  grid-template-columns: 450px 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}
@media (max-width: 1200px) {
  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-column {
  background: linear-gradient(135deg, var(--surface-2-70), var(--surface-1-90));
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 8px 24px var(--black-20);
}

.section-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 2px solid rgba(148, 163, 184, 0.1);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.section-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  box-shadow: 0 4px 12px var(--black-30);
  flex-shrink: 0;
}

.section-title h2 {
  font-size: 20px;
  font-weight: 800;
  margin: var(--space-0) var(--space-0) var(--space-1) var(--space-0);
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.section-title p {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  margin: var(--space-0);
  font-weight: 500;
}

.kpi-compact-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.kpi-compact-grid .kpi-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--surface-1-60), var(--surface-2-40));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.kpi-compact-grid .kpi-item:hover {
  transform: translateX(6px);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(16, 185, 129, 0.08));
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 8px 16px var(--black-25);
}

.kpi-compact-grid .kpi-item::before {
  display: none;
}

.kpi-compact-grid .kpi-icon-wrapper {
  width: 52px;
  height: 52px;
  margin: var(--space-0);
  flex-shrink: 0;
}

.kpi-compact-grid .kpi-content {
  flex: 1;
  min-width: 0;
}

.kpi-compact-grid .kpi-label {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin: var(--space-0) var(--space-0) var(--space-1-5) var(--space-0);
  text-align: left;
}

.kpi-compact-grid .kpi-value {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  margin: var(--space-0);
  text-align: left;
}

.kpi-compact-grid .kpi-trend {
  margin: var(--space-2) var(--space-0) var(--space-0) var(--space-0);
  padding: 5px 12px;
  font-size: var(--fs-xs);
  display: inline-flex;
}

.dashboard-column .performer-list {
  max-height: 540px;
  overflow-y: auto;
  padding-right: var(--space-2);
}

.dashboard-column .performer-list::-webkit-scrollbar {
  width: 6px;
}

.dashboard-column .performer-list::-webkit-scrollbar-track {
  background: var(--surface-1-50);
  border-radius: var(--radius-default);
}

.dashboard-column .performer-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6, #10b981);
  border-radius: var(--radius-default);
}

.dashboard-column .performer-item {
  padding: var(--space-3-5) var(--space-4);
}

.dashboard-column .performer-rank {
  width: 48px;
  height: 48px;
}

.dashboard-column .performer-avatar {
  width: 52px;
  height: 52px;
}

.dashboard-column .performer-name {
  font-size: var(--fs-md);
}

.dashboard-column .performer-value {
  font-size: 24px;
}

/* ========================================
   WOLF DIVISION - SYSTÈME D'ÉCOUTE DISCRET
   ======================================== */
.wolf-user-card {
  background: var(--surface-1-80);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  transition: 0.3s;
  position: relative;
}
.wolf-user-card:hover {
  background: var(--surface-2-90);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}
.wolf-user-card.listening {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}
.wolf-user-card.recording {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  animation: pulse-record 2s infinite;
}
@keyframes pulse-record {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.7);
  }
}
.wolf-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: var(--fs-xl);
}
.wolf-status-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: var(--space-1-5) var(--space-3);
  border-radius: var(--radius-2xl);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
}
.wolf-status-online {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.wolf-status-offline {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-dim);
  border: 1px solid rgba(100, 116, 139, 0.4);
}
.wolf-controls {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.wolf-btn {
  flex: 1;
  padding: var(--space-3);
  border: none;
  border-radius: var(--radius-default);
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.wolf-btn-listen {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}
.wolf-btn-listen:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.5);
}
.wolf-btn-listen.active {
  background: linear-gradient(135deg, #10b981, #059669);
}
.wolf-btn-record {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}
.wolf-btn-record:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.5);
}
.wolf-btn-record.active {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  animation: pulse 1s infinite;
}
.wolf-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.wolf-stat-card {
  background: var(--surface-1-60);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.wolf-stat-value {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: var(--space-2);
}
.wolf-stat-label {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  text-transform: uppercase;
}
.wolf-recording-indicator {
  position: fixed;
  top: 20px;
  left: 260px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-base);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.5);
  z-index: 9998;
  display: none;
  animation: pulse 2s infinite;
}

/* Background personnalise - Belhassen */
body.bg-belhassen {
  position: relative;
}
body.bg-belhassen::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("/assets/bg-belhassen.png") center center / cover no-repeat;
  opacity: 0.07;
  z-index: 0;
  pointer-events: none;
}
body.bg-belhassen .main-content,
body.bg-belhassen .page-section {
  position: relative;
  z-index: 1;
}
body.bg-belhassen .sidebar {
  background: rgba(15, 23, 42, 0.93) !important;
  backdrop-filter: blur(20px);
}
body.bg-belhassen .top-bar {
  background: var(--surface-1-90) !important;
  backdrop-filter: blur(20px);
}
body.bg-belhassen .stat-card,
body.bg-belhassen .card,
body.bg-belhassen .table-container {
  background: rgba(30, 41, 59, 0.88) !important;
  backdrop-filter: blur(12px);
}
/* ================================================================
   THEME SYSTEM — Aurora Borealis & Or Impérial
   Theme set via data-theme on <html>. Default = dark navy.
================================================================ */

/* Transitions douces globales */
*,
*::before,
*::after {
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease !important;
}
.wolf-modal-inner,
.modal-overlay,
.slide-in,
[class*="anim"] {
  transition: none !important;
}

/* ============================================================
   AURORA BOREALIS — Blobs CSS animés + glassmorphism
   ============================================================ */

/* Blobs aurora injectés dynamiquement via JS */
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform, opacity;
  pointer-events: none;
}
.aurora-blob-1 {
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle at 40% 40%, #00d4ff 0%, #0070b3 35%, transparent 70%);
  top: -25%;
  left: -15%;
  opacity: 0.55;
  animation: aurora-drift-1 20s ease-in-out infinite;
}
.aurora-blob-2 {
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle at 60% 40%, #7c3aed 0%, #4c1d95 35%, transparent 70%);
  top: 10%;
  right: -15%;
  opacity: 0.45;
  animation: aurora-drift-2 26s ease-in-out infinite;
}
.aurora-blob-3 {
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle at 50% 50%, #10b981 0%, #064e3b 35%, transparent 70%);
  bottom: -15%;
  left: 25%;
  opacity: 0.4;
  animation: aurora-drift-3 30s ease-in-out infinite;
}

@keyframes aurora-drift-1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(12%, 8%) scale(1.15);
  }
  50% {
    transform: translate(5%, 18%) scale(0.92);
  }
  75% {
    transform: translate(-8%, 5%) scale(1.08);
  }
}
@keyframes aurora-drift-2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  30% {
    transform: translate(-18%, -8%) scale(1.2);
  }
  60% {
    transform: translate(8%, 12%) scale(1.05);
  }
  80% {
    transform: translate(-5%, -5%) scale(1.12);
  }
}
@keyframes aurora-drift-3 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  40% {
    transform: translate(-12%, -15%) scale(1.18);
  }
  70% {
    transform: translate(10%, -8%) scale(0.95);
  }
}

/* Pulsation des borders aurora */
@keyframes aurora-border-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(0, 212, 255, 0.25),
      0 8px 32px var(--black-40);
  }
  33% {
    box-shadow:
      0 0 0 1px rgba(124, 58, 237, 0.35),
      0 8px 32px rgba(124, 58, 237, 0.15);
  }
  66% {
    box-shadow:
      0 0 0 1px rgba(16, 185, 129, 0.3),
      0 8px 32px rgba(16, 185, 129, 0.12);
  }
}

/* Corps de l'app aurora */
[data-theme="aurora"] body {
  background: #0d1117 !important;
  color: var(--text-secondary) !important;
}
[data-theme="aurora"] #theme-bg-layer {
  z-index: 0;
}
[data-theme="aurora"] .app-container,
[data-theme="aurora"] .sidebar,
[data-theme="aurora"] .main-content {
  position: relative;
  z-index: 1;
}
[data-theme="aurora"] .sidebar {
  background: rgba(8, 12, 24, 0.78) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  border-right: 1px solid rgba(0, 212, 255, 0.12) !important;
}
[data-theme="aurora"] .sidebar-header {
  border-bottom-color: rgba(0, 212, 255, 0.1) !important;
}
[data-theme="aurora"] .sidebar-footer {
  border-top-color: rgba(0, 212, 255, 0.1) !important;
}
[data-theme="aurora"] .nav-item {
  color: var(--text-muted) !important;
}
[data-theme="aurora"] .nav-item i {
  color: var(--text-dim) !important;
}
[data-theme="aurora"] .nav-item:hover {
  background: rgba(0, 212, 255, 0.08) !important;
  color: #00d4ff !important;
}
[data-theme="aurora"] .nav-item:hover i {
  color: #00d4ff !important;
}
[data-theme="aurora"] .nav-item.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(124, 58, 237, 0.12)) !important;
  color: var(--text-secondary) !important;
  border-left: 2px solid #00d4ff !important;
}
[data-theme="aurora"] .nav-item.active i {
  color: #00d4ff !important;
}

[data-theme="aurora"] .stat-card,
[data-theme="aurora"] .content-card {
  background: rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(20px) saturate(150%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-secondary) !important;
  animation: aurora-border-pulse 8s ease-in-out infinite !important;
}
[data-theme="aurora"] .table-container {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  animation: aurora-border-pulse 10s ease-in-out infinite !important;
}
[data-theme="aurora"] table thead tr {
  background: rgba(0, 212, 255, 0.07) !important;
}
[data-theme="aurora"] table thead th {
  color: #00d4ff !important;
  border-color: rgba(0, 212, 255, 0.15) !important;
}
[data-theme="aurora"] table tbody tr {
  color: #cbd5e1 !important;
}
[data-theme="aurora"] table tbody tr:hover {
  background: rgba(0, 212, 255, 0.06) !important;
}
[data-theme="aurora"] .modal {
  background: rgba(10, 15, 30, 0.92) !important;
  backdrop-filter: blur(30px) !important;
  border: 1px solid rgba(0, 212, 255, 0.2) !important;
  color: var(--text-secondary) !important;
}
[data-theme="aurora"] .form-input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(0, 212, 255, 0.2) !important;
  color: var(--text-secondary) !important;
}
[data-theme="aurora"] .form-input:focus {
  border-color: #00d4ff !important;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15) !important;
}
[data-theme="aurora"] .modal-form select {
  background: rgba(10, 15, 30, 0.8) !important;
  color: var(--text-secondary) !important;
  border-color: rgba(0, 212, 255, 0.2) !important;
}
[data-theme="aurora"] .user-info {
  background: rgba(0, 212, 255, 0.06) !important;
  border: 1px solid rgba(0, 212, 255, 0.1) !important;
}
[data-theme="aurora"] .page-header h1 {
  color: var(--text-secondary) !important;
}
[data-theme="aurora"] .page-header p,
[data-theme="aurora"] .user-details .role {
  color: var(--text-dim) !important;
}
[data-theme="aurora"] .btn-primary {
  background: linear-gradient(135deg, #00b4d8, #7c3aed, #10b981) !important;
  background-size: 200% 200% !important;
  animation: aurora-btn 5s ease infinite !important;
}
@keyframes aurora-btn {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
[data-theme="aurora"] .stat-label {
  color: var(--text-muted) !important;
}
[data-theme="aurora"] .stat-value {
  color: var(--text-secondary) !important;
}
[data-theme="aurora"] .page-header {
  border-bottom-color: rgba(0, 212, 255, 0.15) !important;
}

/* ============================================================
   OR IMPÉRIAL — Canvas étoiles JS + shimmer or
   ============================================================ */

@keyframes gold-shimmer {
  0%,
  100% {
    box-shadow:
      0 0 12px rgba(245, 212, 133, 0.2),
      0 0 0 1px rgba(245, 212, 133, 0.25),
      inset 0 0 20px rgba(245, 212, 133, 0.04);
  }
  50% {
    box-shadow:
      0 0 24px rgba(245, 212, 133, 0.45),
      0 0 0 1px rgba(245, 212, 133, 0.5),
      inset 0 0 30px rgba(245, 212, 133, 0.08);
  }
}
@keyframes gold-border-sweep {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

[data-theme="imperial-gold"] body {
  background: #080808 !important;
  color: #f5d485 !important;
}
[data-theme="imperial-gold"] #theme-bg-layer {
  z-index: 0;
}
[data-theme="imperial-gold"] .app-container,
[data-theme="imperial-gold"] .sidebar,
[data-theme="imperial-gold"] .main-content {
  position: relative;
  z-index: 1;
}
[data-theme="imperial-gold"] .sidebar {
  background: linear-gradient(180deg, #0c0900, #100d04) !important;
  border-right: 1px solid rgba(245, 212, 133, 0.15) !important;
}
[data-theme="imperial-gold"] .sidebar-header {
  border-bottom: 1px solid rgba(245, 212, 133, 0.1) !important;
}
[data-theme="imperial-gold"] .sidebar-footer {
  border-top: 1px solid rgba(245, 212, 133, 0.1) !important;
}
[data-theme="imperial-gold"] .nav-item {
  color: #8a7540 !important;
}
[data-theme="imperial-gold"] .nav-item i {
  color: #6b5a2a !important;
}
[data-theme="imperial-gold"] .nav-item:hover {
  background: rgba(245, 212, 133, 0.07) !important;
  color: #f5d485 !important;
}
[data-theme="imperial-gold"] .nav-item:hover i {
  color: #f5d485 !important;
}
[data-theme="imperial-gold"] .nav-item.active {
  background: linear-gradient(
    135deg,
    rgba(245, 212, 133, 0.12),
    rgba(180, 140, 60, 0.08)
  ) !important;
  color: #f5d485 !important;
  border-left: 2px solid #c9a227 !important;
}
[data-theme="imperial-gold"] .nav-item.active i {
  color: #f5d485 !important;
}

[data-theme="imperial-gold"] .stat-card,
[data-theme="imperial-gold"] .content-card {
  background: #0f0c04 !important;
  border: 1px solid rgba(245, 212, 133, 0.2) !important;
  color: #e8c96d !important;
  animation: gold-shimmer 4s ease-in-out infinite !important;
}
[data-theme="imperial-gold"] .table-container {
  background: #0c0900 !important;
  border: 1px solid rgba(245, 212, 133, 0.18) !important;
  animation: gold-shimmer 6s ease-in-out infinite !important;
}
[data-theme="imperial-gold"] table thead tr {
  background: rgba(245, 212, 133, 0.06) !important;
}
[data-theme="imperial-gold"] table thead th {
  color: #c9a227 !important;
  border-color: rgba(245, 212, 133, 0.15) !important;
}
[data-theme="imperial-gold"] table tbody tr {
  color: #d4b44a !important;
}
[data-theme="imperial-gold"] table tbody tr:hover {
  background: rgba(245, 212, 133, 0.05) !important;
}
[data-theme="imperial-gold"] .modal {
  background: #0c0900 !important;
  border: 1px solid rgba(245, 212, 133, 0.3) !important;
  color: #e8c96d !important;
  animation: gold-shimmer 4s ease-in-out infinite !important;
}
[data-theme="imperial-gold"] .form-input {
  background: rgba(245, 212, 133, 0.05) !important;
  border: 1px solid rgba(245, 212, 133, 0.2) !important;
  color: #f5d485 !important;
}
[data-theme="imperial-gold"] .form-input:focus {
  border-color: #c9a227 !important;
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2) !important;
}
[data-theme="imperial-gold"] .modal-form select {
  background: #0c0900 !important;
  color: #f5d485 !important;
  border-color: rgba(245, 212, 133, 0.2) !important;
}
[data-theme="imperial-gold"] .user-info {
  background: rgba(245, 212, 133, 0.05) !important;
  border: 1px solid rgba(245, 212, 133, 0.12) !important;
}
[data-theme="imperial-gold"] .page-header h1 {
  color: #f5d485 !important;
}
[data-theme="imperial-gold"] .page-header p,
[data-theme="imperial-gold"] .user-details .role {
  color: #6b5a2a !important;
}
[data-theme="imperial-gold"] .btn-primary {
  background: linear-gradient(135deg, #b8860b, #f5d485, #c9a227) !important;
  background-size: 200% 200% !important;
  color: #1a1000 !important;
  animation: gold-border-sweep 4s ease infinite !important;
}
[data-theme="imperial-gold"] .stat-label {
  color: #8a7540 !important;
}
[data-theme="imperial-gold"] .stat-value {
  color: #f5d485 !important;
}
[data-theme="imperial-gold"] .page-header {
  border-bottom: 1px solid rgba(245, 212, 133, 0.12) !important;
}

/* ============================================================
   GHOST PROTOCOL — Canvas Matrix rain + neon green/cyan
   ============================================================ */

@keyframes ghost-border-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(0, 255, 65, 0.25),
      0 8px 32px var(--black-50);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(0, 229, 204, 0.35),
      0 8px 32px rgba(0, 229, 204, 0.12);
  }
}
@keyframes ghost-btn-sweep {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
@keyframes ghost-stat-glow {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
  }
  50% {
    text-shadow:
      0 0 18px rgba(0, 255, 65, 0.8),
      0 0 30px rgba(0, 229, 204, 0.3);
    box-shadow:
      0 0 18px rgba(0, 255, 65, 0.9),
      0 0 30px rgba(0, 229, 204, 0.4);
  }
}

[data-theme="ghost-protocol"] body {
  background: #020c02 !important;
  color: #a8ffb8 !important;
}
[data-theme="ghost-protocol"] #theme-bg-layer {
  z-index: 0;
}
[data-theme="ghost-protocol"] .app-container,
[data-theme="ghost-protocol"] .sidebar,
[data-theme="ghost-protocol"] .main-content {
  position: relative;
  z-index: 1;
}
[data-theme="ghost-protocol"] .sidebar {
  background: rgba(3, 15, 3, 0.85) !important;
  backdrop-filter: blur(20px) saturate(150%) !important;
  border-right: 1px solid rgba(0, 255, 65, 0.1) !important;
}
/* ===== OBJECTIFS PAGE ===== */
.objectifs-hero {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.objectifs-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 60% 40%, rgba(59, 130, 246, 0.06), transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.06), transparent 50%);
  pointer-events: none;
}
.objectifs-progress-bar {
  background: var(--surface-1-80);
  border-radius: var(--radius-pill);
  height: 16px;
  overflow: hidden;
  margin: var(--space-5) var(--space-0) var(--space-2-5);
  border: 1px solid rgba(148, 163, 184, 0.1);
}
.objectifs-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #3b82f6, #10b981);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.objectifs-progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--white-20), transparent);
  animation: objectifs-shimmer 2s infinite;
}
@keyframes objectifs-shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}
.objectifs-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.objectifs-kpi-card {
  background: var(--surface-2-80);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.objectifs-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.25);
}
.objectifs-kpi-card.highlight {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(16, 185, 129, 0.1));
  border-color: rgba(59, 130, 246, 0.3);
}
.objectifs-kpi-card.gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.08));
  border-color: rgba(245, 158, 11, 0.35);
}
.objectifs-kpi-value {
  font-size: var(--fs-display);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: var(--space-1);
}
.objectifs-kpi-label {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.objectifs-prime-nette-value {
  font-size: var(--fs-display-lg);
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.objectifs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-base);
}
.objectifs-table th {
  padding: var(--space-2-5) var(--space-3-5);
  text-align: left;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: var(--fs-xs);
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.objectifs-table td {
  padding: var(--space-3) var(--space-3-5);
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  color: var(--text-secondary);
}
.objectifs-table tr:last-child td {
  border-bottom: none;
}
.objectifs-table tr:hover td {
  background: rgba(59, 130, 246, 0.04);
}
.objectifs-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-2xl);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.objectifs-badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.objectifs-badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.objectifs-motivation {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.objectifs-section-card {
  background: var(--surface-2-70);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}
.objectifs-section-title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
[data-theme="ghost-protocol"] .sidebar-header {
  border-bottom-color: rgba(0, 255, 65, 0.08) !important;
}
[data-theme="ghost-protocol"] .sidebar-footer {
  border-top-color: rgba(0, 255, 65, 0.08) !important;
}
[data-theme="ghost-protocol"] .nav-item {
  color: #4a7a55 !important;
}
[data-theme="ghost-protocol"] .nav-item i {
  color: #2d5c38 !important;
}
[data-theme="ghost-protocol"] .nav-item:hover {
  background: rgba(0, 255, 65, 0.06) !important;
  color: #00ff41 !important;
}
[data-theme="ghost-protocol"] .nav-item:hover i {
  color: #00ff41 !important;
}
[data-theme="ghost-protocol"] .nav-item.active {
  background: linear-gradient(135deg, rgba(0, 255, 65, 0.1), rgba(0, 229, 204, 0.07)) !important;
  color: #a8ffb8 !important;
  border-left: 2px solid #00ff41 !important;
  box-shadow: inset 0 0 12px rgba(0, 255, 65, 0.05) !important;
}
[data-theme="ghost-protocol"] .nav-item.active i {
  color: #00ff41 !important;
}
[data-theme="ghost-protocol"] .stat-card,
[data-theme="ghost-protocol"] .content-card {
  background: rgba(0, 255, 65, 0.025) !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  border: 1px solid rgba(0, 255, 65, 0.15) !important;
  color: #a8ffb8 !important;
  animation: ghost-border-pulse 6s ease-in-out infinite !important;
}
[data-theme="ghost-protocol"] .table-container {
  background: rgba(0, 255, 65, 0.015) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(0, 255, 65, 0.1) !important;
  animation: ghost-border-pulse 8s ease-in-out infinite !important;
}
[data-theme="ghost-protocol"] table thead tr {
  background: rgba(0, 255, 65, 0.07) !important;
}
[data-theme="ghost-protocol"] table thead th {
  color: #00cc33 !important;
  border-color: rgba(0, 255, 65, 0.15) !important;
}
[data-theme="ghost-protocol"] table tbody tr {
  color: #a8ffb8 !important;
}
[data-theme="ghost-protocol"] table tbody tr:hover {
  background: rgba(0, 255, 65, 0.05) !important;
}
[data-theme="ghost-protocol"] .modal {
  background: rgba(2, 12, 2, 0.96) !important;
  backdrop-filter: blur(30px) !important;
  border: 1px solid rgba(0, 229, 204, 0.25) !important;
  color: #a8ffb8 !important;
}
[data-theme="ghost-protocol"] .form-input {
  background: rgba(0, 255, 65, 0.04) !important;
  border: 1px solid rgba(0, 255, 65, 0.2) !important;
  color: #a8ffb8 !important;
}
[data-theme="ghost-protocol"] .form-input:focus {
  border-color: #00ff41 !important;
  box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.15) !important;
}
[data-theme="ghost-protocol"] .modal-form select {
  background: rgba(2, 12, 2, 0.9) !important;
  color: #a8ffb8 !important;
  border-color: rgba(0, 255, 65, 0.2) !important;
}
[data-theme="ghost-protocol"] .user-info {
  background: rgba(0, 255, 65, 0.04) !important;
  border: 1px solid rgba(0, 255, 65, 0.1) !important;
}
[data-theme="ghost-protocol"] .page-header h1 {
  color: #a8ffb8 !important;
}
[data-theme="ghost-protocol"] .page-header p,
[data-theme="ghost-protocol"] .user-details .role {
  color: #4a7a55 !important;
}
[data-theme="ghost-protocol"] .page-header {
  border-bottom-color: rgba(0, 255, 65, 0.12) !important;
}
[data-theme="ghost-protocol"] .btn-primary {
  background: linear-gradient(135deg, #00ff41, #00e5cc, #00ff41) !important;
  background-size: 200% 200% !important;
  color: #020c02 !important;
  font-weight: 700 !important;
  animation: ghost-btn-sweep 4s ease infinite !important;
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.3) !important;
}
[data-theme="ghost-protocol"] .btn-primary:hover {
  box-shadow:
    0 0 24px rgba(0, 255, 65, 0.6),
    0 0 48px rgba(0, 229, 204, 0.2) !important;
}
[data-theme="ghost-protocol"] .stat-label {
  color: #4a7a55 !important;
}
[data-theme="ghost-protocol"] .stat-value {
  color: #00ff41 !important;
  animation: ghost-stat-glow 3s ease-in-out infinite !important;
}

/* ============================================================
   THEME: SAKURA LUXE (Hello Kitty luxury)
   data-theme="hello-kitty"
   Palette: petal pink · rose gold · pearl white · cerise
   ============================================================ */

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes kitty-bg-breathe {
  0%,
  100% {
    background-position: 0% 50%;
  }
  33% {
    background-position: 60% 100%;
  }
  66% {
    background-position: 100% 0%;
  }
}
@keyframes kitty-border-pulse {
  0%,
  100% {
    border-color: rgba(232, 102, 122, 0.2);
    box-shadow:
      0 8px 32px rgba(232, 102, 122, 0.1),
      inset 0 1px 0 var(--white-70);
  }
  50% {
    border-color: rgba(201, 150, 122, 0.38);
    box-shadow:
      0 8px 40px rgba(232, 102, 122, 0.17),
      inset 0 1px 0 var(--white-85);
  }
}
@keyframes kitty-btn-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
    box-shadow:
      0 4px 16px rgba(232, 102, 122, 0.38),
      inset 0 1px 0 var(--white-20);
  }
  50% {
    background-position: 100% 50%;
    box-shadow:
      0 6px 24px rgba(232, 102, 122, 0.55),
      0 0 32px rgba(201, 150, 122, 0.18);
  }
}
@keyframes kitty-nav-glow {
  0%,
  100% {
    box-shadow: inset 0 0 0 rgba(232, 102, 122, 0);
  }
  50% {
    box-shadow: inset 3px 0 18px rgba(232, 102, 122, 0.12);
  }
}
@keyframes kitty-sparkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.3) rotate(180deg);
  }
}
@keyframes kitty-title-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
@keyframes kitty-stat-glow {
  0%,
  100% {
    text-shadow: 0 1px 4px rgba(232, 102, 122, 0.1);
  }
  50% {
    text-shadow:
      0 2px 12px rgba(232, 102, 122, 0.28),
      0 0 20px rgba(201, 150, 122, 0.12);
  }
}

/* ── Body + root ─────────────────────────────────────────────── */
[data-theme="hello-kitty"] body {
  background: linear-gradient(
    135deg,
    #fce4ec 0%,
    #fff0f5 25%,
    #fde8ef 50%,
    #fce4ec 75%,
    #fff5f8 100%
  ) !important;
  background-size: 400% 400% !important;
  animation: kitty-bg-breathe 14s ease-in-out infinite !important;
}
[data-theme="hello-kitty"] #theme-bg-layer {
  opacity: 1;
}

/* ── App shell ──────────────────────────────────────────────── */
[data-theme="hello-kitty"] .app-container,
[data-theme="hello-kitty"] .main-content {
  background: transparent !important;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
[data-theme="hello-kitty"] .sidebar {
  background: linear-gradient(
    180deg,
    rgba(255, 242, 250, 0.9) 0%,
    rgba(255, 234, 244, 0.88) 100%
  ) !important;
  backdrop-filter: blur(28px) saturate(1.7) brightness(1.04) !important;
  border-right: 1px solid rgba(232, 102, 122, 0.22) !important;
  box-shadow:
    4px 0 32px rgba(232, 102, 122, 0.1),
    1px 0 0 rgba(255, 255, 255, 0.55) !important;
}
[data-theme="hello-kitty"] .sidebar-header {
  border-bottom: 1px solid rgba(232, 102, 122, 0.14) !important;
}
[data-theme="hello-kitty"] .sidebar-footer {
  border-top: 1px solid rgba(232, 102, 122, 0.14) !important;
}

/* ── Navigation ──────────────────────────────────────────────── */
[data-theme="hello-kitty"] .nav-item {
  color: #9b6a7a !important;
}
[data-theme="hello-kitty"] .nav-item i {
  color: #c9967a !important;
}
[data-theme="hello-kitty"] .nav-item:hover {
  background: rgba(232, 102, 122, 0.1) !important;
  color: #3d1a26 !important;
  animation: kitty-nav-glow 2s ease-in-out infinite !important;
}
[data-theme="hello-kitty"] .nav-item:hover i {
  color: #e8667a !important;
}
[data-theme="hello-kitty"] .nav-item.active {
  background: linear-gradient(
    90deg,
    rgba(232, 102, 122, 0.2) 0%,
    rgba(201, 150, 122, 0.12) 100%
  ) !important;
  color: #3d1a26 !important;
  border-left: 3px solid #e8667a !important;
  box-shadow: inset 3px 0 18px rgba(232, 102, 122, 0.12) !important;
}
[data-theme="hello-kitty"] .nav-item.active i {
  color: #e8667a !important;
}

/* ── Cards ───────────────────────────────────────────────────── */
[data-theme="hello-kitty"] .stat-card,
[data-theme="hello-kitty"] .content-card {
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.86) 0%,
    rgba(255, 240, 248, 0.78) 100%
  ) !important;
  backdrop-filter: blur(22px) saturate(1.5) !important;
  border: 1px solid rgba(232, 102, 122, 0.2) !important;
  box-shadow:
    0 8px 32px rgba(232, 102, 122, 0.1),
    0 2px 8px rgba(201, 150, 122, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
  animation: kitty-border-pulse 7s ease-in-out infinite !important;
}

/* ── Tables ──────────────────────────────────────────────────── */
[data-theme="hello-kitty"] .table-container {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(232, 102, 122, 0.16) !important;
  animation: kitty-border-pulse 9s ease-in-out infinite !important;
}
[data-theme="hello-kitty"] table thead tr {
  background: linear-gradient(
    90deg,
    rgba(232, 102, 122, 0.1),
    rgba(201, 150, 122, 0.09)
  ) !important;
}
[data-theme="hello-kitty"] table thead th {
  color: #3d1a26 !important;
  border-bottom: 1px solid rgba(232, 102, 122, 0.18) !important;
}
[data-theme="hello-kitty"] table tbody tr {
  color: #5a2d3a !important;
}
[data-theme="hello-kitty"] table tbody tr:hover {
  background: rgba(232, 102, 122, 0.07) !important;
}

/* ── Scrollbar sakura ────────────────────────────────────────── */
[data-theme="hello-kitty"] ::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
[data-theme="hello-kitty"] ::-webkit-scrollbar-track {
  background: rgba(252, 228, 236, 0.45);
  border-radius: var(--radius-xs);
}
[data-theme="hello-kitty"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e8667a, #c9967a);
  border-radius: var(--radius-xs);
}
[data-theme="hello-kitty"] ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d4547a, #b8807a);
}

/* ── Modals ──────────────────────────────────────────────────── */
[data-theme="hello-kitty"] .modal {
  background: rgba(255, 247, 252, 0.96) !important;
  backdrop-filter: blur(28px) !important;
  border: 1px solid rgba(232, 102, 122, 0.22) !important;
  box-shadow:
    0 24px 64px rgba(232, 102, 122, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.6) !important;
}
[data-theme="hello-kitty"] .form-input {
  background: rgba(255, 255, 255, 0.86) !important;
  border: 1px solid rgba(232, 102, 122, 0.25) !important;
  color: #3d1a26 !important;
}
[data-theme="hello-kitty"] .form-input:focus {
  border-color: #e8667a !important;
  box-shadow:
    0 0 0 3px rgba(232, 102, 122, 0.13),
    0 0 14px rgba(232, 102, 122, 0.08) !important;
}
[data-theme="hello-kitty"] .modal-form select {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(232, 102, 122, 0.2) !important;
  color: #3d1a26 !important;
}

/* ── User info ───────────────────────────────────────────────── */
[data-theme="hello-kitty"] .user-info {
  background: rgba(255, 240, 248, 0.72) !important;
  border: 1px solid rgba(232, 102, 122, 0.18) !important;
}

/* ── Typography ──────────────────────────────────────────────── */
[data-theme="hello-kitty"] .page-header h1 {
  background: linear-gradient(90deg, #c93060, #e8667a, #c9967a, #e8667a, #c93060) !important;
  background-size: 300% 100% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  animation: kitty-title-shimmer 6s ease-in-out infinite !important;
}
[data-theme="hello-kitty"] .page-header p,
[data-theme="hello-kitty"] .user-details .role {
  color: #9b6a7a !important;
}
[data-theme="hello-kitty"] .stat-label {
  color: #9b6a7a !important;
}
[data-theme="hello-kitty"] .stat-value {
  color: #3d1a26 !important;
  animation: kitty-stat-glow 4s ease-in-out infinite !important;
}
[data-theme="hello-kitty"] .page-header {
  border-bottom-color: rgba(232, 102, 122, 0.14) !important;
}
[data-theme="hello-kitty"] .stat-icon {
  filter: drop-shadow(0 2px 6px rgba(232, 102, 122, 0.28)) !important;
}

/* ── Button ──────────────────────────────────────────────────── */
[data-theme="hello-kitty"] .btn-primary {
  background: linear-gradient(135deg, #e8667a 0%, #c9967a 50%, #e8667a 100%) !important;
  background-size: 200% 200% !important;
  border: none !important;
  color: #fff !important;
  box-shadow:
    0 4px 16px rgba(232, 102, 122, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  animation: kitty-btn-shimmer 4s ease infinite !important;
}
[data-theme="hello-kitty"] .btn-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 24px rgba(232, 102, 122, 0.55) !important;
}

/* ── Modal Détail Demande RH ───────────────────────────────────── */
.rh-detail-modal {
  max-width: 600px;
  padding: var(--space-0);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, #0f172a, #1e293b);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow:
    0 32px 80px var(--black-60),
    0 0 0 1px var(--white-04);
}
.rh-detail-header {
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.rh-detail-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.rh-detail-type-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.rh-detail-type-icon.avance {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.rh-detail-type-icon.conge {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.rh-detail-type-icon.certificat {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.25);
}
.rh-detail-type-icon.modification {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.rh-detail-type-icon.autre {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.2), rgba(100, 116, 139, 0.05));
  border: 1px solid rgba(100, 116, 139, 0.25);
}
.rh-detail-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 3px;
}
.rh-detail-subtitle {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.rh-detail-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--white-05);
  border: 1px solid var(--white-08);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md);
  transition: all 0.18s;
  flex-shrink: 0;
}
.rh-detail-close:hover {
  background: var(--white-10);
  color: var(--text-secondary);
}
.rh-detail-body {
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3-5);
  max-height: 65vh;
  overflow-y: auto;
}
.rh-detail-body::-webkit-scrollbar {
  width: 4px;
}
.rh-detail-body::-webkit-scrollbar-track {
  background: transparent;
}
.rh-detail-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-xs);
}
.rh-detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.rh-detail-row.three {
  grid-template-columns: 1fr 1fr 1fr;
}
.rh-detail-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.rh-detail-label {
  font-size: var(--fs-2xs);
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.rh-detail-value {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  font-weight: 500;
}
.rh-detail-user-card {
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
  background: var(--white-04);
  border: 1px solid var(--white-07);
  border-radius: var(--radius-default);
  padding: var(--space-2-5) var(--space-3-5);
}
.rh-detail-user-card .name {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-secondary);
}
.rh-detail-user-card .role-tag {
  font-size: var(--fs-2xs);
  color: var(--text-dim);
  margin-top: 1px;
}
.rh-detail-amount {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: #10b981;
  letter-spacing: -0.5px;
  line-height: 1;
}
.rh-detail-amount span {
  font-size: var(--fs-md);
  font-weight: 500;
  color: #34d399;
  margin-left: var(--space-1);
}
.rh-detail-period {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-base);
  color: var(--text-secondary);
}
.rh-detail-period .arrow {
  color: var(--text-dim);
  font-size: var(--fs-2xs);
}
.rh-detail-desc {
  background: var(--surface-1-50);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-default);
  padding: var(--space-3) var(--space-3-5);
  font-size: var(--fs-base);
  color: #cbd5e1;
  line-height: 1.65;
}
.rh-detail-status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  padding: var(--space-1-5) var(--space-3-5);
  border-radius: var(--radius-2xl);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.3px;
}
.rh-detail-status-badge.approuve {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(16, 185, 129, 0.06));
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.rh-detail-status-badge.refuse {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(239, 68, 68, 0.06));
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}
.rh-detail-status-badge.en_attente {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.06));
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  animation: rh-pulse-badge 2.2s ease-in-out infinite;
}
@keyframes rh-pulse-badge {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.25);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }
}
.rh-detail-response {
  border-radius: var(--radius-md);
  padding: var(--space-4);
  position: relative;
  overflow: hidden;
}
.rh-detail-response.approuve {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.rh-detail-response.refuse {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.04));
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.rh-detail-response-label {
  font-size: var(--fs-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-1-5);
}
.rh-detail-response.approuve .rh-detail-response-label {
  color: #34d399;
}
.rh-detail-response.refuse .rh-detail-response-label {
  color: #f87171;
}
.rh-detail-response-text {
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text-secondary);
}
.rh-detail-response-meta {
  display: flex;
  align-items: center;
  gap: var(--space-1-5);
  margin-top: var(--space-2-5);
  padding-top: var(--space-2-5);
  border-top: 1px solid var(--white-06);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}
.rh-detail-response-glow {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.15;
}
.rh-detail-response.approuve .rh-detail-response-glow {
  background: #10b981;
}
.rh-detail-response.refuse .rh-detail-response-glow {
  background: #ef4444;
}
.rh-detail-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2-5);
}

/* ===== RECHERCHE GLOBALE ===== */
#searchOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--black-70);
  z-index: 9999;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  backdrop-filter: blur(4px);
}
#searchOverlay.open {
  display: flex;
}
#searchPalette {
  width: 100%;
  max-width: 620px;
  background: var(--surface-1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 60px var(--black-60);
}
#searchInput {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-secondary);
  font-size: var(--fs-xl);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  box-sizing: border-box;
}
#searchInput::placeholder {
  color: rgba(148, 163, 184, 0.5);
}
#searchResults {
  max-height: 400px;
  overflow-y: auto;
  padding: var(--space-2) var(--space-0);
}
.search-group-label {
  padding: var(--space-2) var(--space-5) var(--space-1);
  font-size: var(--fs-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(148, 163, 184, 0.5);
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2-5) var(--space-5);
  cursor: pointer;
  transition: background 0.15s;
}
.search-result-item:hover,
.search-result-item.selected {
  background: rgba(59, 130, 246, 0.15);
}
.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-base);
  flex-shrink: 0;
}
.search-result-title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-secondary);
}
.search-result-sub {
  font-size: var(--fs-sm);
  color: rgba(148, 163, 184, 0.6);
  margin-top: 1px;
}
#searchEmpty {
  padding: var(--space-8) var(--space-6);
  text-align: center;
  color: rgba(148, 163, 184, 0.4);
  font-size: var(--fs-md);
}
#searchHint {
  padding: var(--space-2-5) var(--space-5);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
  gap: var(--space-4);
  font-size: var(--fs-xs);
  color: rgba(148, 163, 184, 0.4);
}
#searchHint kbd {
  background: rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-xs);
  padding: 1px 5px;
  font-family: monospace;
}

/* ===== NOTIFICATIONS ===== */
#notifBell {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-default);
  background: var(--white-06);
  border: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
#notifBell:hover {
  background: var(--white-12);
}
#notifBell i {
  color: var(--text-muted);
  font-size: var(--fs-md);
}
#notifBadge {
  display: none;
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: var(--fs-3xs);
  font-weight: 700;
  border-radius: var(--radius-default);
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
  line-height: 14px;
}
#notifDropdown {
  display: none;
  position: absolute;
  bottom: 56px;
  left: 0;
  width: 320px;
  background: var(--surface-1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px var(--black-60);
  z-index: 8888;
  overflow: hidden;
}
#notifDropdown.open {
  display: block;
}
.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3-5) var(--space-4) var(--space-2-5);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.notif-header-title {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-secondary);
}
.notif-mark-read {
  font-size: var(--fs-xs);
  color: #3b82f6;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--space-0);
}
.notif-mark-read:hover {
  text-decoration: underline;
}
#notifList {
  max-height: 320px;
  overflow-y: auto;
}
.notif-item {
  display: flex;
  gap: var(--space-2-5);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(148, 163, 184, 0.05);
}
.notif-item:hover {
  background: var(--white-04);
}
.notif-item.unread {
  background: rgba(59, 130, 246, 0.07);
}
.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-base);
  flex-shrink: 0;
}
.notif-body {
  flex: 1;
  min-width: 0;
}
.notif-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
}
.notif-msg {
  font-size: var(--fs-xs);
  color: rgba(148, 163, 184, 0.7);
  margin-top: var(--space-0-5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-time {
  font-size: var(--fs-2xs);
  color: rgba(148, 163, 184, 0.4);
  margin-top: 3px;
}
.notif-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
  margin-top: 5px;
}
#notifEmpty {
  padding: var(--space-6);
  text-align: center;
  color: rgba(148, 163, 184, 0.4);
  font-size: var(--fs-base);
}

/* ========================================
       CALENDRIER PARTAGÉ
       ======================================== */
.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 3px;
}
.cal-grid-header > div {
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: var(--space-2-5) var(--space-0);
  background: var(--surface-1-30);
  border-radius: var(--radius-xs);
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-day {
  min-height: 96px;
  background: var(--surface-1-40);
  border: 1px solid rgba(148, 163, 184, 0.07);
  border-radius: var(--radius-sm);
  padding: var(--space-1-5);
  transition: background 0.15s;
}
.cal-day:hover {
  background: rgba(15, 23, 42, 0.65);
}
.cal-day.today {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.05);
}
.cal-day.other-month {
  opacity: 0.3;
}
.cal-day-num {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: var(--space-1);
  line-height: 1;
}
.cal-day.today .cal-day-num {
  color: #3b82f6;
  font-weight: 800;
  font-size: var(--fs-base);
}
.cal-event-badge {
  font-size: var(--fs-2xs);
  padding: var(--space-0-5) var(--space-1-5);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-0-5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  line-height: 1.4;
}
.cal-event-badge.conge {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}
.cal-event-badge.certificat {
  background: rgba(139, 92, 246, 0.22);
  color: #c4b5fd;
}
.cal-event-badge.modification {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
}
.cal-event-badge.autre {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}
.cal-event-badge.collectif,
.cal-event-badge.formation,
.cal-event-badge.reunion,
.cal-event-badge.autre-evt {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}
@media (max-width: 768px) {
  .cal-day {
    min-height: 60px;
    padding: var(--space-1);
  }
  .cal-event-badge {
    display: none;
  }
  .cal-day-num {
    font-size: var(--fs-xs);
  }
}

/* P6 — Toast Stacking Perspective */
#toast-container .t-toast:nth-last-child(2) {
  transform: translateY(-6px) scale(0.97);
  opacity: 0.85;
}
#toast-container .t-toast:nth-last-child(3) {
  transform: translateY(-12px) scale(0.94);
  opacity: 0.65;
}
#toast-container .t-toast:nth-last-child(n + 4) {
  transform: translateY(-16px) scale(0.91);
  opacity: 0.4;
}

/* P9 — Sidebar Collapse Desktop */
.sidebar {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-collapse-btn {
  position: absolute;
  top: 18px;
  right: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-1-95);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  z-index: 10;
  transition: all 0.2s;
  box-shadow: 0 2px 8px var(--black-40);
}
.sidebar-collapse-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.5);
  transform: scale(1.1);
}
.sidebar.collapsed {
  width: 68px;
}
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-details,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .sidebar-logo {
  transition: opacity 0.15s;
  opacity: 0;
  pointer-events: none;
  width: 0;
  overflow: hidden;
}
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: var(--space-2-5) var(--space-0);
}
.sidebar.collapsed .nav-item i {
  margin: var(--space-0);
}
.sidebar.collapsed .sidebar-header {
  padding: var(--space-4-5) var(--space-2) var(--space-3-5);
}
.sidebar.collapsed .sidebar-nav {
  padding: var(--space-2-5) var(--space-1);
}
.sidebar.collapsed .sidebar-footer {
  padding: var(--space-2-5) var(--space-1) var(--space-3);
}
.sidebar.collapsed .user-info {
  justify-content: center;
  padding: var(--space-2-5) var(--space-1-5);
}
.sidebar.collapsed .btn-logout {
  font-size: 0;
  justify-content: center;
  padding: var(--space-2-5);
}
.sidebar.collapsed .btn-logout i {
  font-size: var(--fs-base);
}
.sidebar.collapsed .btn-deloguer {
  font-size: 0;
  justify-content: center;
  padding: var(--space-2-5);
}
.sidebar.collapsed .btn-deloguer i {
  font-size: var(--fs-base);
}
.sidebar.collapsed + .main-content,
.sidebar.collapsed ~ .main-content {
  margin-left: 68px;
}
.sidebar:not(.collapsed) .nav-item span,
.sidebar:not(.collapsed) .user-details,
.sidebar:not(.collapsed) .nav-section-label {
  transition: opacity 0.25s 0.1s;
}
.sidebar-collapse-btn i {
  transition: transform 0.3s;
}
.sidebar.collapsed .sidebar-collapse-btn i {
  transform: rotate(180deg);
}

/* P2 — Skeleton Loading Screens */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-2-50);
  border-radius: var(--radius-sm);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(51, 65, 85, 0.4) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.skeleton-text {
  height: 14px;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-xs);
}
.skeleton-text.sm {
  width: 60%;
  height: 11px;
}
.skeleton-text.lg {
  width: 90%;
  height: 18px;
}
.skeleton-card {
  height: 100px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.06);
}
.skeleton-circle {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}
.skeleton-row {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}
.skeleton-row .skeleton {
  flex: 1;
}

/* P3 — Micro-Interactions Boutons */
.btn-primary,
.btn-login,
.btn-filter,
.pointage-btn,
.nav-item,
.btn-logout,
.btn-deloguer {
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:active,
.pointage-btn:active {
  transform: scale(0.97) !important;
  transition: transform 0.08s !important;
}
.btn-login:active {
  transform: scale(0.97) !important;
  transition: transform 0.08s !important;
}
.btn-filter:active {
  transform: scale(0.96);
  transition: transform 0.08s;
}
.nav-item:active {
  transform: translateX(1px) scale(0.98);
  transition: transform 0.08s;
}
.stat-card {
  cursor: default;
}
.modal-overlay .btn-primary:active,
.modal .btn-primary:active {
  transform: scale(0.97) !important;
}

/* P4 — Transition Fluide entre Thèmes */
body,
.sidebar,
.main-content,
.stat-card,
.modal,
.nav-item,
.form-input,
.table-container,
.ticket-card,
.exceeded-pause-card,
.page-header,
.page-header h1,
.stat-icon,
.user-info,
.btn-logout,
.btn-deloguer,
.content-card {
  transition:
    background-color 0.5s ease,
    color 0.35s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}
/* Préserver les transitions hover existantes sur les éléments interactifs */
.nav-item {
  transition:
    all 0.18s ease,
    background-color 0.5s ease;
}
.stat-card {
  transition:
    all 0.22s ease,
    background-color 0.5s ease;
}
.form-input {
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s,
    background-color 0.5s ease;
}

/* P7 — Cursor Glow sur Stat Cards */
.stat-card {
  --glow-x: 50%;
  --glow-y: 50%;
}
.stat-card > .stat-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(
    circle 120px at var(--glow-x) var(--glow-y),
    rgba(59, 130, 246, 0.12),
    transparent 70%
  );
}
.stat-card:hover > .stat-glow {
  opacity: 1;
}

/* P10 — Kanban Board */
.kanban-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.kanban-column {
  background: var(--surface-1-40);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: var(--radius-lg);
  min-height: 300px;
  display: flex;
  flex-direction: column;
}
.kanban-header {
  padding: var(--space-3-5) var(--space-4);
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-secondary);
  border-top: 3px solid transparent;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.kanban-count {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: var(--space-0-5) var(--space-2);
  border-radius: var(--radius-default);
  margin-left: auto;
}
.kanban-body {
  padding: var(--space-2-5);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 100px;
  transition: background 0.2s;
}
.kanban-body.kanban-drag-over {
  background: rgba(59, 130, 246, 0.06);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.kanban-card {
  background: var(--white-04);
  border: 1px solid var(--white-08);
  border-radius: var(--radius-default);
  padding: var(--space-3);
  cursor: grab;
  transition: all 0.2s;
  position: relative;
}
.kanban-card:hover {
  background: var(--white-07);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--black-30);
}
.kanban-card:active {
  cursor: grabbing;
}
.kanban-card.kanban-dragging {
  opacity: 0.4;
  transform: rotate(2deg);
}
.kanban-card-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--space-1-5);
}
.kanban-card-desc {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-2xs);
  color: var(--text-dim);
}
.kanban-empty {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-faint);
  font-size: var(--fs-sm);
  font-style: italic;
}
@media (max-width: 768px) {
  .kanban-container {
    grid-template-columns: 1fr 1fr;
  }
  .kanban-column {
    min-height: 200px;
  }
}
@media (max-width: 480px) {
  .kanban-container {
    grid-template-columns: 1fr;
  }
}

/* P14 — Confetti */
@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) translateX(var(--drift, 0px)) rotate(var(--rot, 360deg));
  }
}

/* P15 — Zen Mode */
body.zen-mode .sidebar {
  transform: translateX(-100%) !important;
  pointer-events: none;
}
body.zen-mode .main-content {
  margin-left: 0 !important;
  max-width: 100%;
}
body.zen-mode .nav-notif-badge {
  display: none;
}
body.zen-mode #notifBell {
  opacity: 0.3;
}
body.zen-mode #toast-container {
  display: none;
}
body.zen-mode .page-header p {
  opacity: 0.5;
}

@media print {
  body:not(.qa-print-mode) {
    display: none !important;
  }
}

/* ============================================
       PROPOSITIONS — MODE SELECTION GROUPEE
       ============================================ */
.prop-selection-toggle-wrap {
  margin: var(--space-0) var(--space-0) var(--space-4-5);
  display: flex;
  justify-content: flex-end;
}
.prop-selection-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2-5);
  cursor: pointer;
  padding: var(--space-2) var(--space-3-5);
  background: #f4f6f8;
  border: 1px solid #e3e7eb;
  border-radius: var(--radius-3xl);
  font-size: var(--fs-base);
  color: #0a3835;
  font-weight: 600;
  transition: all 0.18s ease;
  user-select: none;
}
.prop-selection-toggle:hover {
  background: #ebf0f3;
}
.prop-selection-toggle input {
  display: none;
}
.prop-selection-toggle-slider {
  position: relative;
  width: 36px;
  height: 20px;
  background: #ccc;
  border-radius: var(--radius-default);
  transition: background 0.18s;
}
.prop-selection-toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s;
  box-shadow: 0 1px 3px var(--black-20);
}
.prop-selection-toggle input:checked ~ .prop-selection-toggle-slider {
  background: #00bfb3;
}
.prop-selection-toggle input:checked ~ .prop-selection-toggle-slider::after {
  transform: translateX(16px);
}
.prop-selection-toggle-label i {
  margin-right: var(--space-1);
  color: #00bfb3;
}

.prop-card-selectable {
  cursor: pointer;
  position: relative;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.prop-card-selectable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--black-08);
}
.prop-card-selected {
  outline: 3px solid #00bfb3;
  outline-offset: -3px;
  background: #f0fbf9 !important;
}
.prop-card-checkbox {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}
.prop-card-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #00bfb3;
  cursor: pointer;
}

.prop-selection-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: #0a3835;
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-3-5) var(--space-5);
  box-shadow: 0 16px 50px var(--black-35);
  min-width: 480px;
  max-width: calc(100vw - 40px);
  animation: propSelBarIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes propSelBarIn {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.prop-selection-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3-5);
  flex-wrap: wrap;
}
.prop-sel-label {
  font-size: var(--fs-base);
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.prop-sel-hint {
  font-size: var(--fs-xs);
  color: var(--white-60);
  font-weight: 400;
  margin-left: var(--space-1);
}
.prop-sel-chips {
  display: flex;
  gap: var(--space-1-5);
  flex-wrap: wrap;
  flex: 1;
  min-width: 120px;
}
.prop-sel-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  padding: 5px 10px;
  border-radius: var(--radius-xl);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.prop-sel-chip-x {
  cursor: pointer;
  font-size: var(--fs-md);
  line-height: 1;
  opacity: 0.8;
  padding: var(--space-0) var(--space-0-5);
}
.prop-sel-chip-x:hover {
  opacity: 1;
}
.prop-sel-send-btn {
  background: #00bfb3;
  color: #fff;
  border: none;
  padding: var(--space-2-5) var(--space-5);
  border-radius: var(--radius-default);
  font-size: var(--fs-base);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s;
  white-space: nowrap;
}
.prop-sel-send-btn:hover:not(:disabled) {
  background: #00a89d;
}
.prop-sel-send-btn:disabled {
  background: #555;
  cursor: not-allowed;
  opacity: 0.5;
}
.prop-sel-send-btn i {
  margin-right: var(--space-1-5);
}

.prop-badge-lot {
  display: inline-block;
  padding: var(--space-1) var(--space-2-5);
  background: #0a3835;
  color: #00bfb3;
  border-radius: var(--radius-xs);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.prop-badge-lot i {
  margin-right: var(--space-1);
}
.prop-bundle-row:hover {
  background: #f9fbfc;
}
.prop-bundle-chevron {
  font-size: var(--fs-2xs);
  color: #888;
  margin-left: var(--space-1-5);
  transition: transform 0.2s;
}

@media (max-width: 640px) {
  .prop-selection-bar {
    min-width: auto;
    left: 10px;
    right: 10px;
    transform: none;
    bottom: 10px;
    animation: propSelBarInMobile 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes propSelBarInMobile {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .prop-selection-bar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .prop-sel-send-btn {
    width: 100%;
  }
}
/* WCAG 2.3.3 — Respect du choix utilisateur "réduire les animations" */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
