/* Main stylesheet for APP_WEB_Stage */
/* Fichier de style commun à toutes les pages */

:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --dark-color: #1C2541;
  --light-color: #ecf0f1;
  --danger-color: #e74c3c;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --font-primary: 'Playfair Display', serif;
  --font-secondary: 'Georgia', serif;
}

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

/* Styles généraux pour toutes les pages */
body {
  font-family: var(--font-primary);
  color: var(--dark-color);
  line-height: 1.6;
  background-color: #f5f7fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background-color: transparent;
  color: var(--dark-color);
  padding: 1rem 0;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-control {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.btn {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 0.5rem 1rem;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  margin-right: 0.5rem;
}

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

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

.btn-danger {
  background: var(--danger-color);
}

/* Alerts */
.alert {
  padding: 0.75rem;
  margin: 1rem 0;
  border-radius: 5px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Login Form */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
}

.login-box {
  background-color: white;
  padding: 30px 24px;
  border-radius: 16px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.login-box h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--dark-color);
  letter-spacing: 0.5px;
}

.login-box input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  box-sizing: border-box;
}

.login-box button {
  width: 100%;
  background-color: var(--primary-color);
  color: white;
  padding: 12px 0;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
}

.login-box button:hover {
  background-color: #2980b9;
}

.forgot-link, .return-link {
  display: block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--primary-color);
  text-decoration: underline;
}

.subtitle {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--dark-color);
  font-weight: 500;
}

.form-instructions {
  font-size: 14px;
  margin-bottom: 20px;
  color: #666;
  line-height: 1.5;
}

/* Media queries pour la responsivité mobile */
@media (max-width: 480px) {
  .login-container {
    padding: 15px;
    height: auto;
    min-height: 100vh;
  }
  
  .login-box {
    padding: 25px 20px;
    max-width: 100%;
    border-radius: 12px;
  }
  
  .login-box h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .login-box h2.subtitle {
    font-size: 16px;
    margin-bottom: 15px;
  }
  
  .login-box input {
    padding: 12px 14px; /* Plus grand pour mobile pour faciliter la saisie */
    margin-bottom: 14px;
    font-size: 16px; /* Agrandir la police pour mobile */
    border-radius: 8px;
    -webkit-appearance: none; /* Supprimer les styles par défaut iOS */
    appearance: none;
  }
  
  .login-box button {
    padding: 15px 0; /* Bouton plus grand pour faciliter le tap */
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 5px;
    border-radius: 8px;
    -webkit-appearance: none; /* Supprimer les styles par défaut iOS */
    appearance: none;
    -webkit-tap-highlight-color: transparent; /* Supprimer le highlight de tap */
  }
  
  .form-instructions {
    font-size: 14px;
    margin-bottom: 15px;
    padding: 0 5px;
  }
  
  .alert {
    padding: 10px;
    margin: 10px 0;
    font-size: 14px;
    border-radius: 8px;
  }
  
  .forgot-link, .return-link {
    margin-top: 18px;
    font-size: 14px;
    padding: 8px;
    display: inline-block;
  }
  
  /* Fix pour le zoom automatique sur iOS */
  input[type="text"],
  input[type="email"],
  input[type="password"] {
    font-size: 16px;  /* Pour éviter le zoom automatique sur iOS */
  }
  
  /* Améliorer le tap sur les boutons et liens */
  button, .btn, a {
    touch-action: manipulation;
  }
}

/* Dashboard */
.dashboard {
  padding: 20px 0;
  max-width: 800px;
  margin: 40px auto;
  width: 80%;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.dashboard-actions,
.dashboard-stats {
  margin-bottom: 30px;
  background-color: white;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-actions:hover,
.dashboard-stats:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}

.dashboard-actions h2,
.dashboard-stats h2 {
  margin-bottom: 15px;
  font-size: 1.5rem;
  color: var(--dark-color);
}

.btn-group {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

footer {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 20px;
  padding: 15px 0;
  color: #666;
  width: 80%;
  max-width: 800px;
}

/* Table Styles */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e1e1e1;
}

.table th {
  background-color: var(--primary-color);
  color: white;
}

/* Responsive Design - Général */
@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 0 10px;
  }
  
  body {
    font-size: 15px;
  }
  
  .btn {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 10px;
    text-align: center;
  }
  
  .alert {
    font-size: 14px;
  }
  
  /* Ajustements pour la table sur mobile */
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .table th, 
  .table td {
    padding: 8px;
  }
}

.table tr:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* Error Page */
.error-page {
  text-align: center;
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.error-page h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--danger-color);
}

.error-page p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Responsive pour la page d'erreur 404 */
@media (max-width: 480px) {
  .error-page {
    padding: 30px 15px;
  }
  
  .error-page h1 {
    font-size: 2rem;
  }
  
  .error-page p {
    font-size: 1rem;
  }
  
  .error-page .btn {
    width: 100%;
    max-width: 200px;
    padding: 12px 0;
    text-align: center;
    font-size: 1rem;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .dashboard-header h1 {
    margin-bottom: 10px;
  }
  
  .dashboard-header div {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  .dashboard-header span {
    margin-bottom: 10px;
  }
  
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-group .btn {
    width: 100%;
    text-align: center;
    margin-right: 0;
  }
  
  .dashboard-actions,
  .dashboard-stats {
    padding: 15px;
  }
  
  .btn {
    margin-bottom: 0.5rem;
  }
}

/* Styles pour la section Établissements */
.etablissements-selector {
  margin-bottom: 30px;
  background-color: white;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.etablissements-selector:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}

.etablissement-list h4 {
  margin-top: 20px;
  margin-bottom: 15px;
  color: #1c2640;
  font-size: 16px;
}

.etablissement-list ul {
  list-style: none;
  padding: 0;
}

.etablissement-list li {
  margin-bottom: 10px;
}

.etablissement-link {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s;
  padding: 6px 10px;
  border-radius: 8px;
  background-color: rgba(52, 152, 219, 0.1);
  display: inline-block;
}

.etablissement-link:hover {
  color: #2980b9;
  text-decoration: none;
  background-color: rgba(52, 152, 219, 0.2);
}

.current-etablissement {
  margin-bottom: 15px;
  padding: 15px;
  border-radius: 10px;
  background-color: #f4f7fc;
}

.current-etablissement h3 {
  margin: 0 0 10px;
  color: #1c2640;
}

.etablissement-details {
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 14px;
  color: #555;
}

.etablissement-details .ville {
  font-weight: 600;
}

/* Style amélioré pour les tableaux */
.table {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  overflow: hidden;
}

/* Style pour le bouton statistiques */
.btn-statistiques {
  background-color: var(--primary-color);
  color: white;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  margin-top: 15px;
}

/* Changement de la couleur des icônes en blanc */
.btn-statistiques i {
  color: white !important; /* Force la couleur blanche */
}

/* Assurer que l'icône de graphique est blanche dans les boutons statistiques */
.btn-statistiques .icon-chart:before {
  color: white !important;
}

.btn-statistiques:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.etablissement-actions {
  margin-top: 10px;
  text-align: center;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Pour forcer un saut de ligne */
.break {
  flex-basis: 100%;
  height: 0;
}

.icon-chart::before {
  content: "📊";
  margin-left: 5px;
  font-size: 16px;
}

.rouge {
	background:#CE0000 !important;
}

 .btn-retour {
     background-color: var(--primary-color);
     color: white;
     padding: 8px 16px;
     border-radius: 12px;
     font-size: 14px;
     text-decoration: none;
     transition: background-color 0.3s ease;
     display: inline-flex;
     align-items: center;
 }
 
 .btn-retour:hover {
     background-color: #2980b9;
     text-decoration: none;
 }
 
 .btn-retour i {
     margin-right: 6px;
 }