/* ============================================
   DZCADEMIA GLOBAL REDESIGN
   Palette, Typographie, Espacement & Composants
   ============================================ */

:root {
  /* ---- PALETTE DE COULEURS PREMIUM ---- */
  --color-primary: #0f172a;           /* Bleu Nuit Profond (confiance, autorité) */
  --color-primary-light: #1e293b;     /* Bleu Nuit Clair (surfaces secondaires) */
  --color-primary-lighter: #334155;   /* Gris-Bleu (texte secondaire) */
  
  --color-accent: #dc2626;            /* Rouge Vif (CTA, alertes) */
  --color-accent-light: #fecaca;      /* Rose Clair (backgrounds d'accent) */
  --color-accent-dark: #991b1b;       /* Rouge Foncé (hover states) */
  
  --color-secondary: #0ea5e9;         /* Bleu Ciel (informations, liens) */
  --color-secondary-light: #bae6fd;   /* Bleu Ciel Clair (backgrounds) */
  
  --color-success: #10b981;           /* Vert Émeraude (succès) */
  --color-warning: #f59e0b;           /* Ambre (avertissements) */
  --color-error: #ef4444;             /* Rouge Clair (erreurs) */
  
  --color-neutral-50: #f9fafb;        /* Blanc Cassé */
  --color-neutral-100: #f3f4f6;       /* Gris Très Clair */
  --color-neutral-200: #e5e7eb;       /* Gris Clair */
  --color-neutral-300: #d1d5db;       /* Gris Moyen-Clair */
  --color-neutral-400: #9ca3af;       /* Gris Moyen */
  --color-neutral-500: #6b7280;       /* Gris Moyen-Foncé */
  --color-neutral-600: #4b5563;       /* Gris Foncé */
  --color-neutral-700: #374151;       /* Gris Très Foncé */
  --color-neutral-800: #1f2937;       /* Gris Quasi-Noir */
  --color-neutral-900: #111827;       /* Noir */
  
  /* ---- TYPOGRAPHIE ---- */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-serif: 'Cormorant Garamond', 'EB Garamond', serif;
  
  --font-size-xs: 0.75rem;            /* 12px */
  --font-size-sm: 0.875rem;           /* 14px */
  --font-size-base: 1rem;             /* 16px */
  --font-size-lg: 1.125rem;           /* 18px */
  --font-size-xl: 1.25rem;            /* 20px */
  --font-size-2xl: 1.5rem;            /* 24px */
  --font-size-3xl: 1.875rem;          /* 30px */
  --font-size-4xl: 2.25rem;           /* 36px */
  --font-size-5xl: 3rem;              /* 48px */
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  --line-height-loose: 2;
  
  /* ---- ESPACEMENT (8px grid) ---- */
  --spacing-0: 0;
  --spacing-1: 0.25rem;               /* 4px */
  --spacing-2: 0.5rem;                /* 8px */
  --spacing-3: 0.75rem;               /* 12px */
  --spacing-4: 1rem;                  /* 16px */
  --spacing-5: 1.25rem;               /* 20px */
  --spacing-6: 1.5rem;                /* 24px */
  --spacing-7: 1.75rem;               /* 28px */
  --spacing-8: 2rem;                  /* 32px */
  --spacing-10: 2.5rem;               /* 40px */
  --spacing-12: 3rem;                 /* 48px */
  --spacing-14: 3.5rem;               /* 56px */
  --spacing-16: 4rem;                 /* 64px */
  --spacing-20: 5rem;                 /* 80px */
  --spacing-24: 6rem;                 /* 96px */
  
  /* ---- ARRONDIS (border-radius) ---- */
  --radius-sm: 0.375rem;              /* 6px */
  --radius-md: 0.5rem;                /* 8px */
  --radius-lg: 0.75rem;               /* 12px */
  --radius-xl: 1rem;                  /* 16px */
  --radius-2xl: 1.5rem;               /* 24px */
  --radius-3xl: 2rem;                 /* 32px */
  --radius-full: 9999px;
  
  /* ---- OMBRES ---- */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.1), 0 1px 2px 0 rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  
  /* ---- 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 STYLES
   ============================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-neutral-50);
  color: var(--color-primary);
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

main {
  min-height: 60vh;
}

/* ============================================
   CONTENEURS & GRILLES
   ============================================ */

.container {
  width: min(1320px, calc(100% - var(--spacing-6)));
  margin: 0 auto;
}

.container-wide {
  width: min(1440px, calc(100% - var(--spacing-6)));
  margin: 0 auto;
}

@media (max-width: 768px) {
  .container,
  .container-wide {
    width: min(100%, calc(100% - var(--spacing-4)));
  }
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, var(--font-size-5xl));
}

h2 {
  font-size: clamp(1.5rem, 4vw, var(--font-size-4xl));
}

h3 {
  font-size: clamp(1.25rem, 3vw, var(--font-size-3xl));
}

h4 {
  font-size: var(--font-size-2xl);
}

h5 {
  font-size: var(--font-size-xl);
}

h6 {
  font-size: var(--font-size-lg);
}

p {
  margin: 0;
  line-height: var(--line-height-relaxed);
}

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

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

.text-sm {
  font-size: var(--font-size-sm);
}

.text-xs {
  font-size: var(--font-size-xs);
}

.text-lg {
  font-size: var(--font-size-lg);
}

/* ============================================
   BOUTONS REDESIGNÉS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--spacing-2) var(--spacing-4);
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  gap: var(--spacing-2);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* Variante Primaire */
.btn-primary {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.25);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.35);
}

/* Variante Secondaire */
.btn-secondary {
  background: white;
  color: var(--color-primary);
  border: 1px solid var(--color-neutral-200);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--color-neutral-50);
  border-color: var(--color-neutral-300);
}

/* Variante Tertiaire (Ghost) */
.btn-tertiary {
  background: transparent;
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary-light);
}

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

/* Variante Désactivée */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Tailles */
.btn-sm {
  min-height: 36px;
  padding: var(--spacing-1) var(--spacing-3);
  font-size: var(--font-size-sm);
}

.btn-lg {
  min-height: 52px;
  padding: var(--spacing-3) var(--spacing-6);
  font-size: var(--font-size-lg);
}

/* ============================================
   CARTES REDESIGNÉES
   ============================================ */

.card {
  padding: var(--spacing-6);
  border-radius: var(--radius-2xl);
  background: white;
  border: 1px solid var(--color-neutral-200);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

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

.card-compact {
  padding: var(--spacing-4);
  border-radius: var(--radius-xl);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-4);
  margin-bottom: var(--spacing-4);
}

.card-title {
  margin: 0;
  color: var(--color-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}

.card-subtitle {
  margin: var(--spacing-2) 0 0;
  color: var(--color-neutral-500);
  font-size: var(--font-size-sm);
}

.card-body {
  display: grid;
  gap: var(--spacing-3);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-4);
  margin-top: var(--spacing-4);
  padding-top: var(--spacing-4);
  border-top: 1px solid var(--color-neutral-100);
}

/* ============================================
   BADGES & TAGS
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  min-height: 28px;
  padding: var(--spacing-1) var(--spacing-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-primary {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}

.badge-secondary {
  background: var(--color-secondary-light);
  color: var(--color-secondary);
}

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

.badge-success {
  background: #d1fae5;
  color: var(--color-success);
}

/* ============================================
   SECTIONS & ESPACEMENTS
   ============================================ */

.section {
  padding: var(--spacing-16) var(--spacing-4);
}

.section-title {
  margin-bottom: var(--spacing-8);
  color: var(--color-primary);
  font-size: clamp(1.5rem, 4vw, var(--font-size-4xl));
  font-weight: var(--font-weight-bold);
  text-align: center;
}

.section-subtitle {
  margin-bottom: var(--spacing-12);
  color: var(--color-neutral-500);
  font-size: var(--font-size-lg);
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .section {
    padding: var(--spacing-12) var(--spacing-4);
  }
  
  .section-title {
    margin-bottom: var(--spacing-6);
  }
  
  .section-subtitle {
    margin-bottom: var(--spacing-8);
  }
}

/* ============================================
   GRILLES RESPONSIVES
   ============================================ */

.grid {
  display: grid;
  gap: var(--spacing-6);
}

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

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

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

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   UTILITAIRES DE VISIBILITÉ
   ============================================ */

.dt-hide {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-hide {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .desktop-hide {
    display: none !important;
  }
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

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

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--transition-base);
}

.slide-in-up {
  animation: slideInUp var(--transition-slow);
}

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

input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: var(--spacing-3) var(--spacing-4);
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-lg);
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  transition: all var(--transition-base);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

@media (max-width: 1440px) {
  .container-wide {
    width: min(1280px, calc(100% - var(--spacing-6)));
  }
}

@media (max-width: 1024px) {
  .container {
    width: min(960px, calc(100% - var(--spacing-6)));
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-16: 3rem;
    --spacing-12: 2rem;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-16: 2rem;
    --spacing-12: 1.5rem;
  }
  
  h1 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
  }
  
  h2 {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
  }
}
