
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');
:root {
  /* NOUVELLE PALETTE DE COULEURS (Orange Vif & Bleu Profond) */
  --color-primary: #E65100; /* Orange 700 */
  --color-secondary: #01579B; /* Bleu Profond 800 */
  --color-bg-light: #f8fafc; /* Slate 50 */
  --color-bg-dark: #212121;
}
.body {
  font-family: 'Inter', sans-serif;
  overflow: hidden; /* Empêche le défilement causé par l'animation de fond */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.gradient-bg {
  /* Dégradé de fond animé utilisant les nouvelles couleurs */
  background: linear-gradient(-45deg, var(--color-primary), #ff8f00, var(--color-secondary), #4fc3f7);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Style pour les champs de formulaire en focus */
.input-focus-style:focus {
  /* Utilisation de la couleur secondaire (Bleu Profond) pour la bordure */
  border-color: var(--color-secondary);
  /* Utilisation de la couleur primaire (Orange Vif) pour l'anneau de focus */
  box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.4);
}

/* Animation du bouton de connexion */
.btn-loading {
  transition: all 0.3s ease;
  width: 4rem;
  /* Utilisation de la couleur secondaire (Bleu Profond) lors du chargement */
  background-color: var(--color-secondary) !important; 
  cursor: wait;
}
.spinner {
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-left-color: #fff;
  border-radius: 50%;
  width: 1.25rem;
  height: 1.25rem;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}




/* Custom scrollbar for aesthetics */
.custom-scrollbar::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #cbd5e1; /* Gray 300 */
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8; /* Gray 400 */
}
/* Style pour les cartes (cohésion avec le login) */
.card-container {
    background-color: white;
    border-radius: 1rem; /* rounded-xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-xl */
}
/* Style pour les lignes du tableau */
.personnel-row {
    transition: all 0.2s ease;
}
.personnel-row:hover {
    background-color: #f1f5f9; /* slate-100 */
}





/* Style pour les cartes (cohésion avec le login) */
.card-container {
    background-color: white;
    border-radius: 1rem; /* rounded-xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-xl */
}
.active-tab {
    color: var(--color-secondary);
    border-bottom: 3px solid var(--color-primary);
}

/* Styles de base pour la transition */
.tab-content {
    display: none;
    /* Prépare l'élément pour la transition de fondu (opacity) */
    transition: opacity 300ms ease-in-out;
    opacity: 0;
}
.tab-content.active {
    display: block;
    /* L'opacité est gérée par JS pour la transition */
}





/* Style des champs de formulaire */
.form-input {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 0.5rem; /* rounded-lg */
    border: 1px solid #d1d5db; /* gray-300 */
    transition: border-color 150ms, box-shadow 150ms;
}
.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.3); /* Ring autour du champ focus */
    outline: none;
}



/* Style pour la modale */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 50;
}
.modal-content {
    background-color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}



/* Style pour les barres de graphique simulées */
.chart-bar-container {
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}
.chart-bar-item {
    width: 15%;
    margin: 0 2%;
    position: relative;
    text-align: center;
}
.chart-bar {
    background-color: var(--color-primary);
    transition: height 0.5s ease-out;
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.bar-label {
    position: absolute;
    top: -20px;
    font-size: 0.75rem; /* text-xs */
    font-weight: 600; /* font-semibold */
    color: #4b5563; /* gray-600 */
}





/* Style pour l'onglet ACTIF (renommé en js-tab-button) */
.js-tab-button.active {
    border-color: var(--color-primary);
    color: var(--color-secondary);
    font-weight: 600;
}



#flash-container {
    position: fixed;
    top: calc(var(--navbar-height) + 1rem); /* 1rem sous la navbar */
    right: 1rem;
    z-index: 1000; /* Augmenté pour garantir qu'il soit au-dessus de tous les autres éléments (modales, menus, etc.) */
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Espace entre les messages si plusieurs sont actifs */
    max-width: 300px;
    pointer-events: none; /* Permet de cliquer à travers le conteneur vide */
}

/* Style de base pour un message */
.flash-message {
    pointer-events: auto; /* Rétablit l'interactivité sur le message lui-même */
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Ombre plus prononcée pour visibilité */
    /* Animation par défaut: Masqué et décalé vers la droite */
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    display: flex; /* Utilisation de flex pour aligner l'icône et le texte */
    align-items: center;
    gap: 0.75rem;
}

/* Classe pour rendre le message visible */
.flash-message.show {
    opacity: 1;
    transform: translateX(0);
}

/* Styles spécifiques aux types de messages */

/* Succès (Vert) */
.flash-message.success {
    background-color: #d1fae5; /* Green 100 */
    color: #065f46; /* Green 800 */
    border-left: 5px solid #10b981; /* Green 500 */
}
.flash-message.success .flash-title {
    color: #065f46;
}

/* Erreur (Rouge) */
.flash-message.error {
    background-color: #fee2e2; /* Red 100 */
    color: #991b1b; /* Red 800 */
    border-left: 5px solid #ef4444; /* Red 500 */
}
.flash-message.error .flash-title {
    color: #991b1b;
}

/* Avertissement (Jaune/Ambre) */
.flash-message.warning {
    background-color: #fffbeb; /* Yellow 100 */
    color: #92400e; /* Yellow 800 */
    border-left: 5px solid var(--color-primary); /* Utilisation de la couleur primaire pour l'alerte */
}
.flash-message.warning .flash-title {
    color: #92400e;
}

.flash-title {
    font-weight: bold;
    font-size: 0.875rem; /* text-sm */
}
.flash-text {
    font-size: 0.75rem; /* text-xs */
}
