/* =========================================
   1. BASE & TYPOGRAPHIE
   ========================================= */
body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased; /* Rendu plus net sur Mac/iOS */
  -moz-osx-font-smoothing: grayscale;
}

/* Empêche le défilement horizontal indésirable sur mobile */
html, body {
  overflow-x: hidden; 
}

/* =========================================
   2. UTILITAIRES (Couleurs & Ombres)
   ========================================= */
.gradient-bg {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.card-shadow {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-shadow-lg {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* =========================================
   3. NAVIGATION (Desktop)
   ========================================= */
.nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 6px;
}

.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

/* =========================================
   4. HERO SECTION (Titre Responsive)
   ========================================= */
.hero-title {
  font-weight: 800;
  color: white;
  line-height: 1.2;
  /* Mobile d'abord : taille plus petite */
  font-size: 2.25rem; 
}

.hero-subtitle {
  color: #dbeafe;
  margin-top: 1rem;
  max-width: 600px;
  font-size: 1.125rem;
}

/* Media Query : Écrans larges (PC) */
@media (min-width: 768px) {
  .hero-title {
    font-size: 3.5rem; /* Plus grand sur PC */
  }
}

/* =========================================
   5. BOUTONS (Interactifs & Tactiles)
   ========================================= */
.btn-primary, .btn-secondary, .btn-login {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

/* Bouton Blanc */
.btn-primary {
  background: white;
  color: #1e3a8a;
  padding: 14px 32px;
  border-radius: 8px;
  border: 2px solid white;
}

.btn-primary:hover {
  background: #f8fafc;
  transform: translateY(-2px); /* Petit effet de levier */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Bouton Bleu / Transparent */
.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 14px 32px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
}

/* Bouton de Connexion */
.btn-login {
  width: 100%;
  background: #2563eb;
  color: white;
  padding: 14px; /* Zone de clic plus large pour le doigt */
  border-radius: 8px;
  border: none;
}

.btn-login:hover {
  background: #1d4ed8;
}

.btn-login:active {
  transform: scale(0.98); /* Effet d'enfoncement */
}

/* =========================================
   6. FORMULAIRES (Optimisation Mobile)
   ========================================= */
.input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background-color: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background-color: white;
}

/* 📱 CRUCIAL POUR IPHONE : 
   Empêche le zoom automatique quand on clique sur un input 
   si la police est inférieure à 16px. */
@media screen and (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* =========================================
   7. DASHBOARD & TABLEAUX
   ========================================= */

/* Animation fluide du menu latéral sur mobile */
.sidebar-transition {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tableaux scrollables proprement */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Scroll fluide sur iOS */
  border-radius: 0.75rem;
}

/* Scrollbar personnalisée fine (pour Windows) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9; 
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1; 
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8; 
}