/* Fichier : style.css */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.container {
    width: auto;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
    color: #1a237e; /* Bleu foncé */
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
    margin-top: 20px;
}

/* Fichier : style.css */

/* ... (conserve le code existant) ... */

/* --- Navigation Bar --- */
.nav-bar {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.btn2 {
  display: inline-flex; /* Utilisation de flexbox pour l'alignement */
    align-items: center; /* Centrage vertical */
    justify-content: center; /* Centrage horizontal */
    padding: 10px 15px;
    /*height: 40px; /* Hauteur fixe pour une uniformité visuelle */
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    background-color: green; /* vert standard */
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn {
    display: inline-flex; /* Utilisation de flexbox pour l'alignement */
    align-items: center; /* Centrage vertical */
    justify-content: center; /* Centrage horizontal */
    padding: 10px 15px;
    /*height: 40px; /* Hauteur fixe pour une uniformité visuelle */
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    background-color: #3f51b5; /* Bleu standard */
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #303f9f;
}

.btn-secondary {
    background-color: #9e9e9e; /* Gris */
}

.btn-secondary:hover {
    background-color: #757575;
}

.btn-primary {
    background-color: #4caf50; /* Vert */
}

.btn-primary:hover {
    background-color: #388e3c;
}

.btn-danger {
    background-color: #f44336; /* Rouge */
}

.btn-danger:hover {
    background-color: #d32f2f;
}

/* ... (conserve le reste du code existant) ... */

/* --- Options Container (Date, Filter) --- */
.options-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
    gap:5px;
}

.date-controls {
    display: flex;
    align-items: center;
    gap: 10px;
	background-color:#336699;
	color:white;
	border-radius:10px;
}

.current-date {
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    min-width: 150px;
    text-align: center;
}

.filter-services {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Mass Update Form --- */
#action-container {
    display: none;
    background-color: #e8eaf6;
    border: 1px solid #c5cae9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

#mass-update-form {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* --- Table Styles --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    /* 🛠️ AJOUTS pour le défilement vertical et l'effet 'sticky' */
    max-height: calc(100vh - 200px); /* Hauteur max pour que la barre de scroll Y apparaisse. Ajustez 200px si besoin. */
    overflow-y: auto; /* Active le défilement vertical si le contenu dépasse la hauteur max. */
}

.planning-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    white-space: nowrap;
}

.planning-table th, .planning-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    position: relative;
    font-size: 0.9em;
    height: 40px;
    box-sizing: border-box;
    /* 🛠️ AJOUT pour les cellules de données */
    z-index: 1; /* S'assure que les cellules normales sont au-dessus, mais sous les colonnes et en-têtes fixes. */
}

/* 🛠️ CIBLE : En-têtes de jour/date (pour le scroll vertical) */
.planning-table thead th {
    background-color: #1a237e;
    color: #fff;
    font-weight: bold;
    position: sticky; /* L'élément magique */
    top: 0; /* Colle l'en-tête en haut de la zone de défilement */
    z-index: 10; /* Doit être moins que les en-têtes de colonnes fixes (employé/total) */
}

.planning-table thead tr:first-child th {
    height: 60px; /* Espace pour les en-têtes de jour */
}

.planning-table tbody tr:hover {
    background-color: #f0f0f0;
}

/* Style spécifique aux colonnes et cellules */
.employee-header, .employee-name-cell {
    width: 150px;
    min-width: 150px;
    text-align: left;
    background-color: #f8f8f8;
    position: sticky;
    left: 0;
    /* 🛠️ CORRECTION Z-INDEX : Assure qu'il est au-dessus des jours (z-index: 10) et des autres cellules. */
    z-index: 12; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 🛠️ CORRECTION Z-INDEX : Assure qu'il est au-dessus des jours (z-index: 10) et des autres cellules de planning. */
.planning-table .employee-name-cell {
    z-index: 11; 
    background-color: #fff; /* On s'assure que le fond cache bien les jours/cellules qui défilent. */
}

.employee-name-cell a {
    text-decoration: none;
    color: #3f51b5;
    font-weight: bold;
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-header, .selectable-cell {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
}

.weekend-col {
    background-color: #bbdefb;
}

.weekend-cell {
    background-color: #e3f2fd;
}

/* Colonnes Totaux Mensuels */
.planning-table .total-header {
    position: sticky; 
    right: 0; 
    /* 🛠️ CORRECTION Z-INDEX : Assure qu'il est au-dessus des jours (z-index: 10). */
    z-index: 12; 
    background-color: #f0f0f0;
    border-left: 1px solid #ccc;
    width: 70px;
    color: #263238;
}

.planning-table .total-cell {
    position: sticky;
    right: 0;
    /* 🛠️ CORRECTION Z-INDEX : Assure qu'il est au-dessus des jours (z-index: 10). */
    z-index: 11;
    border-left: 1px solid #ccc; 
    width: 70px;
    background-color: #f9f9f9; 
}


/* Cellules sélectionnables */
.selectable-cell {
    cursor: pointer;
}

.selectable-cell:hover {
    background-color: #c8e6c9; /* Vert pâle */
}

.selectable-cell.selected {
    outline: 2px solid #2196f3; /* Bordure bleue */
    transform: scale(1.05);
    z-index: 10;
}

.holiday-cell {
    background-color: #ffcdd2; /* Rouge pâle */
    color: #b71c1c;
    position: relative;
    cursor: help;
}

.holiday-label {
    font-size: 0.7em;
    font-weight: bold;
    position: absolute;
    bottom: 2px;
    right: 2px;
}

.collapsible-header {
    cursor: pointer;
    background-color: #f1f1f1;
    padding: 10px 15px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    margin-top: 20px;
}

.collapsible-header:hover {
    background-color: #e0e0e0;
}

.content {
    display: none;
    padding: 15px;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.content table {
    width: 100%;
    border-collapse: collapse;
}

.content th, .content td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

.content th {
    background-color: #e0e0e0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Styles pour les listes de consultation */
.services-list, .employes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.employes-list li {
    background-color: #f1f1f1;
    padding: 8px 12px;
    border-radius: 5px;
}

/* Nouveau style pour le menu de sélection rapide */
.single-cell-menu {
    position: absolute;
    z-index: 100;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    min-width: 100px;
}

.single-cell-menu .menu-header {
    background-color: #1a237e;
    color: #fff;
    padding: 8px;
    font-weight: bold;
    border-radius: 5px 5px 0 0;
}

.single-cell-menu .horaire-options {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 120px; /* La modification demandée */
    overflow-y: scroll; /* La modification demandée */
}

.single-cell-menu .horaire-options li {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #eee;
    color: #000;
}

.single-cell-menu .horaire-options li:hover {
    opacity: 0.8;
}

.single-cell-menu .horaire-options li:last-child {
    border-bottom: none;
}


/* Fichier : style.css */

/* ... (conserve le code existant) ... */

/* Style de l'en-tête de l'application */
.app-header {
    background-color: #ffffff; /* Fond blanc */
    border-bottom: 1px solid #e0e0e0; /* Ligne de séparation subtile */
    padding: 10px 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: sticky; /* L'en-tête reste en haut */
    top: 0;
    z-index: 999; /* S'assure qu'il est au-dessus du contenu */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Ombre légère pour un effet de profondeur */
    height: 40px; /* Hauteur de l'en-tête */
    box-sizing: border-box;
}

.header-logo-container {
    height: 40%;
    margin-right: 15px; /* Espace entre le logo et le texte */
}

.app-logo {
    height: 100%;
}

.header-text-container {
    display: flex;
    flex-direction: column;
}

.header-text-container h1 {
    font-size: 1.2em;
    margin: 0;
    padding: 0;
    color: #1a237e;
    border: none;
}

.header-text-container p {
    font-size: 0.8em;
    margin: 0;
    color: #666;
}

/* Style pour la barre de navigation principale */
.main-nav {
    display: flex;
    gap: 10px;
    margin-left: auto; /* Aligne la navigation à droite */
}

/* Style de base des boutons de navigation */
.main-nav .btn {
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    color: #fff;
    background-color: #4a55a2; /* Couleur principale des boutons */
    transition: background-color 0.3s ease;
}

.main-nav .btn:hover {
    background-color: #3b4279;
}

/* Style spécifique pour les boutons de paramétrage */
.btn-parametres {
    background-color: #b05c5c; /* Une couleur différente pour les boutons d'administration */
}

.btn-parametres:hover {
    background-color: #964a4a;
}
/* --- Styles pour la page de connexion --- */
.login-body {
    background-color: #e3f2fd; /* Bleu clair */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

.login-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
}

.login-container h1 {
    font-size: 2em;
    color: #1a237e;
    margin-bottom: 30px;
    border-bottom: none;
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #455a64;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #4CAF50;
    outline: none;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 8px;
    background-color: #4CAF50;
    color: #fff;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #45a049;
}

.error-message {
    color: #f44336;
    background-color: #ffebee;
    border: 1px solid #ef9a9a;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}
/* --- Styles pour le Header et la navigation principale --- */

/* Conteneur principal de l'en-tête */
.main-header {
    background-color: #ffffff;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto;
}

.header-logo-container {
    height: 40px;
}

.app-logo {
    height: 100%;
    width: auto;
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    font-weight: bold;
    color: #1a237e;
    font-size: 1em;
}

.session-timer {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    color: #555;
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 5px;
}

#countdown {
    font-weight: bold;
    color: #d32f2f; /* Rouge pour le décompte */
}

.header-nav .btn {
    padding: 8px 15px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn-danger {
    background-color: #d32f2f;
    color: white;
}

.btn-danger:hover {
    background-color: #b71c1c;
}
/* --- Nouveaux styles pour le header --- */

.header-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-icon {
    padding: 8px; /* Ajuste le padding pour un bouton carré */
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-icon svg {
    fill: currentColor; /* Permet à l'icône de prendre la couleur du texte */
}

.refresh-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.refresh-btn:hover {
    background-color: #45a049;
}
/* --- Styles pour les messages d'état --- */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
}

.message.success {
    background-color: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.message.error {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

/*menu mobile */

/* --- Masquer le menu et le bouton par défaut --- */
.mobilemenu-nav {
    display: none; /* Cache toute la navigation sur PC */
}

/* --- Styles pour les appareils mobiles (media query) --- */
@media (max-width: 768px) {
    /* Afficher la navigation sur mobile */
    .mobilemenu-nav {
        display: block;
    }

    /* Styles pour le bouton de menu (hamburger) */
    .mobilemenu-toggle {
        display: block;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
    }

    .mobilemenu-icon-bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #333;
        margin: 5px 0;
        transition: transform 0.3s ease;
    }
 .loghorora {
	 position:fixed;
	 left:10px;
	 top:10px;
 }
   
}

/* --- Styles pour les formulaires de sélection (AJOUTÉ) --- */
.select-form {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.form-group-inline {
    display: flex;
    align-items: center;
    gap: 15px; /* Espace entre le select et le bouton */
    width: 100%;
    max-width: 500px;
}

.form-group-inline select {
    flex-grow: 1; /* Le select prend tout l'espace disponible */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group-inline select:focus {
    border-color: #3f51b5; /* Une jolie couleur au focus */
    outline: none;
    box-shadow: 0 0 5px rgba(63, 81, 181, 0.5);
}

/* Styles pour le bouton de visualisation (MODIFIÉ) */
.btn.btn-primary {
    background-color: #4CAF50; /* Vert vif, comme la vie ! */
}

.btn.btn-primary:hover {
    background-color: #45a049; /* Vert un peu plus foncé au survol */
}

/* Mieux vaut supprimer ces anciens styles devenus inutiles (AJOUTÉ) */
.services-list, .employes-list {
    display: none; /* On cache les anciennes listes ! */
}

}

/* NOUVEAU : Styles pour la colonne Totaux Hebdomadaires */
.planning-table .total-week-header {
    width: 80px;
    min-width: 80px;
    background-color: #3f51b5; /* Bleu un peu plus clair pour distinguer */
    color: white;
    font-size: 0.8em;
    font-weight: bold;
    /* Figer l'en-tête en haut avec les autres, mais sans le coller horizontalement */
    position: sticky;
    top: 0;
    z-index: 10; /* Même z-index que les en-têtes de jour */
    border-left: 2px solid #3f51b5; /* Ligne de séparation claire */
    transition: width 0.3s ease, padding 0.3s ease;
}

.planning-table .total-week-cell {
    width: 80px;
    min-width: 80px;
    background-color: #e8eaf6; /* Fond très clair */
    color: #333;
    font-size: 0.9em;
    font-weight: bold;
    border-left: 2px solid #3f51b5; /* Ligne de séparation claire */
    transition: width 0.3s ease, padding 0.3s ease;
}

/* 👻 CLASSE DE MASQUAGE CSS (Par défaut, la colonne est cachée par cette classe) */
.hidden-week-col {
    /* Masquage efficace : réduit la largeur à zéro pour ne pas prendre de place */
    width: 0 !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    /* Cache le contenu sans le supprimer du DOM */
    overflow: hidden;
    white-space: nowrap;
    border: none !important;
}

/* Style du bouton d'activation */
.btn-toggle-week {
    background-color: #f57f17; /* Orange vif pour attirer l'attention sur cette fonction */
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-toggle-week:hover {
    background-color: #ef6c00;
}