/**
 * CandleSafe — Design System CSS v2.0
 * ====================================
 * Fichier de référence absolue pour tous les modules.
 * Import Google Fonts requis dans le <head> HTML :
 * https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap
 */

/* =============================================
   1. CSS VARIABLES — THÈME CLAIR (défaut)
   ============================================= */
:root {
  /* Couleurs principales */
  --primary: #B8860B;
  --primary-hover: #8B6914;
  --primary-light: rgba(184,134,11,0.12);
  --accent: #D4A843;

  /* Fonds */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F0E8;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(255,255,255,0.7);

  /* Texte */
  --text-primary: #1A1A2E;
  --text-secondary: #4A4A5A;
  --text-muted: #8A8A9A;

  /* Bordures */
  --border: #E0D8CC;
  --border-light: #F0ECE4;

  /* Sémantiques */
  --success: #2D6A4F;
  --warning: #E07A2F;
  --danger: #C1292E;
  --info: #1D3557;

  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(26,26,46,0.06);
  --shadow-md: 0 4px 16px rgba(26,26,46,0.08);
  --shadow-lg: 0 8px 32px rgba(26,26,46,0.12);
  --shadow-glow: 0 0 40px rgba(184,134,11,0.15);

  /* Rayons */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transition */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typographie */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* =============================================
   2. CSS VARIABLES — THÈME SOMBRE
   ============================================= */
[data-theme="dark"] {
  --primary: #D4A843;
  --primary-hover: #E0BC5E;
  --primary-light: rgba(212,168,67,0.12);

  --bg-primary: #0A0A12;
  --bg-secondary: #12121E;
  --bg-card: #1A1A2E;
  --bg-glass: rgba(26,26,46,0.8);

  --text-primary: #F5F0E8;
  --text-secondary: #B0B0C0;
  --text-muted: #6A6A7A;

  --border: #2A2A3E;
  --border-light: #1E1E30;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 60px rgba(212,168,67,0.08);
}

/* =============================================
   3. RESET & BASE
   ============================================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--primary-hover);
}

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

/* =============================================
   4. TYPOGRAPHIE
   ============================================= */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
}

h1 {
  font-size: 3.5rem;
  line-height: 1.15;
}

h2 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h3 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.text-lg {
  font-size: 1.0625rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.8125rem;
}

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

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

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.font-display {
  font-family: var(--font-display);
}

/* =============================================
   5. LAYOUT & GRILLE
   ============================================= */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 100px 2rem;
  position: relative;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Sidebar layout (espace utilisateur & admin) */
.layout-sidebar {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 72px);
}

/* =============================================
   6. NAVIGATION
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-flame {
  font-size: 1.3rem;
  filter: drop-shadow(0 0 8px rgba(184,134,11,0.4));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* =============================================
   7. SÉLECTEUR DE LANGUE
   ============================================= */
.lang-selector {
  position: relative;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
}

.lang-current:hover {
  background: var(--primary-light);
}

.lang-current::after {
  display: none !important;
}

.lang-arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 2px;
}

/* Drapeaux SVG */
.flag-icon {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  display: block;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.flag-icon-sm {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

/* Dropdown langue */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1001;
}

.lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-opt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem !important;
  color: var(--text-secondary) !important;
  text-decoration: none;
  transition: all 0.15s;
}

.lang-opt::after {
  display: none !important;
}

.lang-opt:hover {
  background: var(--primary-light);
  color: var(--text-primary) !important;
}

.lang-opt.active {
  color: var(--primary) !important;
  font-weight: 600;
}

/* =============================================
   8. MENU MOBILE
   ============================================= */
.burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: var(--transition);
}

.burger:hover {
  border-color: var(--primary);
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

.burger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 998;
  padding: 1.5rem 2rem;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  display: block;
  padding: 1rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.mobile-menu a:hover {
  color: var(--primary);
}

.mobile-menu .mobile-lang-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1.25rem 0 0.5rem;
  border: none;
}

.mobile-menu .mobile-lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0.5rem 0;
}

.mobile-lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none !important;
}

.mobile-lang-btn:hover,
.mobile-lang-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.mobile-lang-btn span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.mobile-menu .mobile-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  margin-top: auto;
}

.mobile-menu .mobile-actions .btn {
  flex: 1;
  justify-content: center;
}

/* =============================================
   9. BOUTONS
   ============================================= */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 2px 8px rgba(184,134,11,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184,134,11,0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #A01F24);
  color: #fff;
  box-shadow: 0 2px 8px rgba(193,41,46,0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(193,41,46,0.4);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.0625rem;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* =============================================
   10. CARTES
   ============================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  opacity: 1;
}

/* Card featured (pricing) */
.card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.04);
}

.card.featured:hover {
  transform: scale(1.04) translateY(-4px);
}

/* =============================================
   11. BADGES
   ============================================= */
.section-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  margin-bottom: 1rem;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.ok {
  background: rgba(45,106,79,0.1);
  color: var(--success);
}

.status-badge.pending {
  background: rgba(224,122,47,0.1);
  color: var(--warning);
}

.status-badge.error {
  background: rgba(193,41,46,0.1);
  color: var(--danger);
}

.h-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(193,41,46,0.1);
  color: var(--danger);
  margin: 1px;
}

.h-badge.env {
  background: rgba(45,106,79,0.1);
  color: var(--success);
}

/* =============================================
   12. FORMULAIRES
   ============================================= */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(193,41,46,0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238A8A9A' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--danger);
  margin-top: 0.25rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

/* =============================================
   13. TABLEAUX
   ============================================= */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
}

.table tr:hover {
  background: var(--primary-light);
}

.table .mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* =============================================
   14. TOGGLE THÈME
   ============================================= */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--primary);
  transform: rotate(15deg);
}

/* =============================================
   15. ALERTES
   ============================================= */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid;
}

.alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.alert-info {
  background: rgba(29,53,87,0.08);
  border-color: rgba(29,53,87,0.2);
  color: var(--info);
}

.alert-success {
  background: rgba(45,106,79,0.08);
  border-color: rgba(45,106,79,0.2);
  color: var(--success);
}

.alert-warning {
  background: rgba(224,122,47,0.08);
  border-color: rgba(224,122,47,0.2);
  color: var(--warning);
}

.alert-danger {
  background: rgba(193,41,46,0.08);
  border-color: rgba(193,41,46,0.2);
  color: var(--danger);
}

/* =============================================
   16. MODALES
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 520px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.3s ease;
}

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

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--danger);
  color: #fff;
}

.modal-body {
  margin-bottom: 1.5rem;
}

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

/* =============================================
   17. SIDEBAR (Espace utilisateur & Admin)
   ============================================= */
.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
}

.sidebar-logo {
  padding: 0 1.25rem 1.25rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.sidebar-nav-item:hover {
  background: var(--primary-light);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-light);
  border-left-color: var(--primary);
}

.sidebar-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 1.25rem 1.25rem 0.5rem;
}

/* =============================================
   18. STEPPER / WORKFLOW
   ============================================= */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 3rem;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stepper-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  border: 2px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-primary);
  transition: var(--transition);
}

.stepper-step.active .stepper-num {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(184,134,11,0.3);
}

.stepper-step.done .stepper-num {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.stepper-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.stepper-step.active .stepper-label {
  color: var(--primary);
  font-weight: 600;
}

.stepper-step.done .stepper-label {
  color: var(--success);
}

.stepper-line {
  width: 60px;
  height: 2px;
  background: var(--border);
  margin: 0 0.75rem;
}

.stepper-line.done {
  background: var(--success);
}

/* =============================================
   19. STAT CARDS (Dashboard)
   ============================================= */
.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.stat-value.gold  { color: var(--primary); }
.stat-value.green { color: var(--success); }
.stat-value.blue  { color: var(--info); }

.stat-change {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
}

/* =============================================
   20. ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.anim {
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}

.anim-d1 { animation-delay: 0.1s; }
.anim-d2 { animation-delay: 0.2s; }
.anim-d3 { animation-delay: 0.3s; }
.anim-d4 { animation-delay: 0.4s; }
.anim-d5 { animation-delay: 0.5s; }

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

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-0 { padding: 0; }
.p-2 { padding: 1rem; }
.p-4 { padding: 2rem; }

.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* =============================================
   22. RESPONSIVE
   ============================================= */
@media (max-width: 1023px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

@media (max-width: 767px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }

  .section { padding: 60px 1.25rem; }
  .section-header { margin-bottom: 2.5rem; }

  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .nav-links { display: none; }
  .burger { display: flex; }
  .nav-actions .btn { display: none; }

  .container { padding: 0 1.25rem; }
  .nav-inner { padding: 0 1.25rem; }

  .stepper { flex-wrap: wrap; gap: 0.5rem; }
  .stepper-line { width: 30px; }
  .stepper-label { display: none; }
}

/* =============================================
   23. PRINT
   ============================================= */
@media print {
  .nav,
  .sidebar,
  .burger,
  .mobile-menu,
  .theme-toggle,
  .btn {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .section {
    padding: 2rem 0;
    break-inside: avoid;
  }
}
