/* ============================================================
   YNOV AUTH — Design System
   YAKO AFRICA Assurances Vie
   Couleurs: #1D603D (Vert) · #E09518 (Orange) · #0B482F (Vert foncé)
   ============================================================ */

:root {
  /* Couleurs principales YAKO AFRICA */
  --brand-primary: #1D603D;
  --brand-primary-dark: #0B482F;
  --brand-primary-light: #2E7D53;
  --brand-accent: #E09518;
  --brand-accent-dark: #C47D0F;
  --brand-accent-light: #F0B343;

  /* Couleurs fonctionnelles */
  --brand-success: #1D603D;
  --brand-warning: #E09518;
  --brand-danger: #DC3545;
  --brand-info: #17A2B8;

  /* Neutres */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Arrière-plans */
  --bg-primary: #FFFFFF;
  --bg-secondary: var(--gray-50);
  --bg-tertiary: var(--gray-100);
  --bg-sidebar: #0B482F;

  /* Textes */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-400);
  --text-white: #FFFFFF;

  /* Bordures */
  --border-color: var(--gray-200);
  --border-focus: var(--brand-accent);

  /* Ombres */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Rayons */
  --radius-xs: 0.25rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Typographie */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sora', 'Inter', sans-serif;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-secondary);
  min-height: 100vh;
}

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 {
  font-size: 1.875rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.125rem;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.875rem;
}

/* ============================================================
   LAYOUT AUTHENTIFICATION
   ============================================================ */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

/* Panneau de marque (côté gauche) */
.auth-brand-panel {
  flex: 1;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.1;
  pointer-events: none;
}

.auth-brand-panel .brand-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

.auth-brand-panel .brand-logo span {
  color: var(--brand-accent);
}

.auth-brand-panel .brand-tagline {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.auth-brand-panel .brand-tagline em {
  color: var(--brand-accent);
  font-style: normal;
}

.auth-brand-panel .brand-description {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
  max-width: 400px;
}

.auth-brand-panel .brand-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-brand-panel .brand-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

.auth-brand-panel .brand-feature .dot {
  width: 8px;
  height: 8px;
  background: var(--brand-accent);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* Panneau du formulaire (côté droit) */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-primary);
}

.auth-card {
  max-width: 440px;
  width: 100%;
  background: white;
  border-radius: var(--radius-2xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.5s ease;
}

.auth-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-card-header .mobile-logo {
  display: none;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 1.5rem;
}

.auth-card-header .mobile-logo span {
  color: var(--brand-accent);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Responsive authentification */
@media (max-width: 1024px) {
  .auth-brand-panel {
    padding: 2rem;
  }

  .auth-brand-panel .brand-tagline {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .auth-brand-panel {
    display: none;
  }

  .auth-card-header .mobile-logo {
    display: block;
  }

  .auth-card {
    padding: 1.5rem;
  }
}

/* ============================================================
   FORMULAIRES
   ============================================================ */

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-label .required {
  color: var(--brand-danger);
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(224, 149, 24, 0.1);
}

.form-control.is-invalid {
  border-color: var(--brand-danger);
}

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-control.is-valid {
  border-color: var(--brand-success);
}

.invalid-feedback {
  display: none;
  font-size: 0.75rem;
  color: var(--brand-danger);
  margin-top: 0.375rem;
}

.form-control.is-invalid~.invalid-feedback {
  display: block;
}

/* Input avec icône */
.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper .form-control {
  padding-left: 2.25rem;
}

.input-icon-wrapper .input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.input-icon-wrapper .toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-icon-wrapper .toggle-password:hover {
  color: var(--text-primary);
}

/* Force du mot de passe */
.password-strength {
  margin-top: 0.5rem;
}

.password-strength-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.375rem;
}

.password-strength-fill {
  height: 100%;
  width: 0;
  transition: width var(--transition-base);
}

.password-strength-label {
  font-size: 0.688rem;
  color: var(--text-muted);
}

/* Select */
.form-select {
  display: block;
  width: 100%;
  padding: 0.625rem 2rem 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.25rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  appearance: none;
}

.form-select:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(224, 149, 24, 0.1);
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--brand-accent);
  cursor: pointer;
}

.form-check-label {
  font-size: 0.813rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Grid pour formulaires */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   BOUTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Bouton primaire (Vert YAKO) */
.btn-primary {
  color: white;
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

/* Bouton accent (Orange YAKO) */
.btn-accent {
  color: white;
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}

.btn-accent:hover:not(:disabled) {
  background: var(--brand-accent-dark);
  border-color: var(--brand-accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Bouton secondaire */
.btn-secondary {
  color: var(--text-secondary);
  background: white;
  border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--gray-50);
  border-color: var(--gray-300);
}

/* Bouton danger */
.btn-danger {
  color: white;
  background: var(--brand-danger);
  border-color: var(--brand-danger);
}

.btn-danger:hover:not(:disabled) {
  background: #c82333;
  border-color: #bd2130;
}

/* Bouton outline */
.btn-outline {
  color: var(--brand-primary);
  background: transparent;
  border-color: var(--brand-primary);
}

.btn-outline:hover:not(:disabled) {
  color: white;
  background: var(--brand-primary);
}

/* Tailles de boutons */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Loading state */
.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   ALERTES
   ============================================================ */

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.813rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(29, 96, 61, 0.1);
  border-left: 3px solid var(--brand-success);
  color: var(--brand-primary-dark);
}

.alert-danger {
  background: rgba(220, 53, 69, 0.1);
  border-left: 3px solid var(--brand-danger);
  color: #c82333;
}

.alert-warning {
  background: rgba(224, 149, 24, 0.1);
  border-left: 3px solid var(--brand-warning);
  color: #b46f0f;
}

.alert-info {
  background: rgba(23, 162, 184, 0.1);
  border-left: 3px solid var(--brand-info);
  color: #0c6b7c;
}

.alert-icon {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

/* ============================================================
   OTP INPUT
   ============================================================ */

.otp-container {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.otp-input {
  width: 3rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--font-display);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: white;
  transition: var(--transition-base);
}

.otp-input:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(224, 149, 24, 0.1);
}

.otp-input.filled {
  border-color: var(--brand-primary);
  background: rgba(29, 96, 61, 0.05);
}

@media (max-width: 480px) {
  .otp-input {
    width: 2.5rem;
    height: 3rem;
    font-size: 1rem;
  }

  .otp-container {
    gap: 0.5rem;
  }
}

/* ============================================================
   DASHBOARD
   ============================================================ */

/* Topbar */
.topbar {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
}

.topbar-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-primary);
  text-decoration: none;
}

.topbar-logo span {
  color: var(--brand-accent);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: var(--transition-base);
}

.topbar-nav a:hover,
.topbar-nav a.active {
  color: var(--brand-primary);
  border-bottom: 2px solid var(--brand-accent);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  transition: var(--transition-base);
}

.topbar-user:hover {
  background: var(--gray-50);
}

.topbar-user .avatar {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
}

.topbar-user .user-info {
  text-align: right;
}

.topbar-user .user-name {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-primary);
}

.topbar-user .user-role {
  font-size: 0.688rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .topbar-nav {
    display: none;
  }
}

/* Sidebar */
.sidebar {
  width: 16rem;
  background: var(--bg-sidebar);
  color: white;
  position: fixed;
  left: 0;
  top: 4rem;
  bottom: 0;
  overflow-y: auto;
  transition: var(--transition-base);
}

.sidebar-nav {
  padding: 1.5rem 1rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  margin-bottom: 0.25rem;
}

.sidebar-nav-item:hover,
.sidebar-nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-nav-item .icon {
  width: 1.25rem;
  height: 1.25rem;
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }
}

/* Contenu principal */
.main-content {
  margin-left: 16rem;
  padding: 1.5rem;
  min-height: calc(100vh - 4rem);
}

@media (max-width: 1024px) {
  .main-content {
    margin-left: 0;
  }
}

/* Cartes */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.card-body {
  padding: 1.25rem;
}

/* Statistiques */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  transition: var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--brand-primary);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

.stat-card .stat-icon {
  float: right;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--brand-accent);
}

/* Tableaux */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.688rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--gray-50);
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 0.75rem 1rem;
  font-size: 0.813rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.table tbody tr:hover {
  background: var(--gray-50);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.688rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.badge-success {
  background: rgba(29, 96, 61, 0.1);
  color: var(--brand-primary-dark);
}

.badge-warning {
  background: rgba(224, 149, 24, 0.1);
  color: #b46f0f;
}

.badge-danger {
  background: rgba(220, 53, 69, 0.1);
  color: #c82333;
}

.badge-info {
  background: rgba(23, 162, 184, 0.1);
  color: #0c6b7c;
}

.badge-secondary {
  background: var(--gray-100);
  color: var(--gray-600);
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  gap: 0;
}

.tab-btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-base);
}

.tab-btn:hover {
  color: var(--brand-primary);
}

.tab-btn.active {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-accent);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Session warning */
.session-warning {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--brand-primary-dark);
  color: white;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 320px;
  z-index: 1000;
  display: none;
}

.session-warning.visible {
  display: block;
  animation: slideInUp 0.3s ease;
}

.session-warning-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.session-warning-message {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.75rem;
}

.session-warning-timer {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-accent);
  margin-bottom: 0.75rem;
}

.session-warning-actions {
  display: flex;
  gap: 0.5rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 1rem;
}

.modal {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeInUp 0.3s ease;
}

.modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.4s ease;
}

/* ============================================================
   UTILITAIRES
   ============================================================ */

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--brand-primary);
}

.text-accent {
  color: var(--brand-accent);
}

.text-muted {
  color: var(--text-muted);
}

.text-white {
  color: white;
}

.bg-primary {
  background: var(--brand-primary);
}

.bg-accent {
  background: var(--brand-accent);
}

.bg-light {
  background: var(--gray-50);
}

.bg-white {
  background: white;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-5 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-5 {
  margin-bottom: 1.5rem;
}

.p-1 {
  padding: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-5 {
  padding: 1.5rem;
}

.d-flex {
  display: flex;
}

.d-block {
  display: block;
}

.d-none {
  display: none;
}

.flex-column {
  flex-direction: column;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.cursor-pointer {
  cursor: pointer;
}