/* ===== GLOBAL MODERN STYLES 2025 ===== */

/* Variables CSS pour la cohérence */
:root {
  /* Couleurs principales */
  --primary-blue: #2563eb;
  --primary-blue-dark: #1d4ed8;
  --secondary-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-orange: #f59e0b;
  
  /* Gradients modernes */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-hero: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #f59e0b 100%);
  --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --gradient-page: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  
  /* Couleurs neutres */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  
  /* Ombres modernes */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Espacements */
  --container-max: 1280px;
  --section-padding: 3rem 0;
  --border-radius: 1rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  max-width: 100%;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--gradient-page);
  min-height: 100vh;
}

/* ===== LAYOUT MODERNE ===== */
.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--gradient-page);
  position: relative;
  overflow-x: hidden;
}

.page-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 25% 25%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.main-content {
  flex: 1;
  padding-top: 2rem;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100vw;
}

.container-modern {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* ===== CARTES MODERNES ===== */
.card-modern {
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.card-modern:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2xl);
}

/* ===== BOUTONS MODERNES ===== */
.btn-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-align: center;
  justify-content: center;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2xl);
  color: var(--white);
  text-decoration: none;
}

.btn-secondary {
  background: var(--white);
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background: var(--primary-blue);
  color: var(--white);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--primary-blue);
  border: 2px solid rgba(37, 99, 235, 0.3);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--primary-blue);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ===== FORMULAIRES MODERNES ===== */
.form-modern {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.95rem;
}

.form-input, .form-select, .form-textarea {
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.75rem;
  font-size: 0.95rem;
  transition: var(--transition);
  background: var(--white);
  color: var(--gray-700);
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

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

/* ===== TITRES MODERNES ===== */
.page-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1rem;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1.5rem;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--gray-600);
  text-align: center;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== TABLES MODERNES ===== */
.table-modern {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.table-modern th {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-modern td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}

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

.table-modern tr:last-child td {
  border-bottom: none;
}

/* ===== BADGES MODERNES ===== */
.badge-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(34, 197, 94, 0.1);
  color: #059669;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-blue);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

/* ===== ALERTES MODERNES ===== */
.alert-modern {
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  border-left: 4px solid;
  backdrop-filter: blur(10px);
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
  color: #059669;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #dc2626;
}

.alert-info {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--primary-blue);
  color: var(--primary-blue-dark);
}

/* ===== GRILLES MODERNES ===== */
.grid-modern {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== FOOTER MODERNE ===== */
.footer-modern {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 3rem 0 1rem;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

.footer-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.footer-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-section p, .footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  line-height: 1.6;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--white);
  transform: translateX(5px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  :root {
    --section-padding: 2rem 0;
  }

  .container-modern {
    padding: 0 1rem;
  }

  .main-content {
    padding-top: 1rem;
  }

  .card-modern {
    padding: 1.5rem;
  }

  .btn-modern {
    width: 100%;
    justify-content: center;
  }

  .grid-modern {
    gap: 1rem;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .table-modern {
    font-size: 0.9rem;
  }

  .table-modern th, .table-modern td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .container-modern {
    padding: 0 0.75rem;
  }

  .card-modern {
    padding: 1rem;
  }

  .btn-modern {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .page-title {
    font-size: 1.5rem;
  }
}

/* Images et médias responsifs */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Conteneurs spécifiques */
.page-container, .main-content, .container-modern {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}