/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    overflow-y: scroll; /* Scrollbar toujours visible pour éviter le décalage */
}

/* Page de connexion */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 60px 80px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    width: 90%;
    max-width: 600px;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 40px;
    color: #667eea;
    font-size: 36px;
    font-weight: 700;
}

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

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

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

/* Styles spécifiques pour la page de login */
.login-box .form-group {
    margin-bottom: 30px;
}

.login-box .form-group label {
    display: block;
    margin-bottom: 10px;
    color: #666;
    font-weight: 600;
    font-size: 18px;
}

.login-box .form-group input, 
.login-box .form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 18px;
    transition: border-color 0.3s ease;
}

.login-box .form-group input:focus, 
.login-box .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    background-color: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
}

.btn:hover {
    background-color: #5a67d8;
    transform: translateY(-1px);
}

.btn:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

/* Ripple effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background-color: #5a67d8;
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
}

/* Bouton de connexion plus grand */
.login-box .btn-full {
    padding: 18px 30px;
    font-size: 20px;
    font-weight: 600;
    margin-top: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.login-box .btn-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Logo animation et netteté */
.login-box img {
    transition: transform 0.3s ease;
    /* Garantir la netteté du SVG */
    shape-rendering: geometricPrecision;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
    /* Empêcher le flou lors du scaling */
    image-rendering: optimizeQuality;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Anti-aliasing pour les bords nets */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-box img:hover {
    transform: scale(1.05) translateZ(0);
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-danger {
    background-color: #dc3545;
}

/* Application principale */
.app-container {
    min-height: 100vh;
}

.header {
    /* Fond noir uni moderne */
    background: #000000;

    /* Effet glassmorphism */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);

    /* Coins arrondis modernes */
    border-radius: 16px;
    margin: 8px;  /* Pour détacher du bord */


    color: white;
    padding: 8px 20px;

    /* Ombre moderne plus douce */
    box-shadow:
        0 8px 32px rgba(0,0,0,0.15),
        0 2px 8px rgba(0,0,0,0.1);

    /* Transition douce pour les interactions */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header:hover {
    /* Légère élévation au survol */
    box-shadow:
        0 12px 40px rgba(0,0,0,0.2),
        0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

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

.header h1 {
    font-size: clamp(12px, 1.4vw, 16px);
    font-weight: 500;  /* Plus léger, plus moderne */
    letter-spacing: 0.5px;  /* Espacement subtil */
    margin: 0;
    line-height: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.8vw, 12px);
    font-size: clamp(11px, 0.9vw, 13px);
}


.main-content {
    max-width: min(95%, 2000px);
    margin: clamp(16px, 2vw, 32px) auto;
    padding: 0 clamp(16px, 2vw, 40px);
}

/* Statistiques */

/* Contrôles */
.controls {
    background: white;
    padding: clamp(20px, 2.5vw, 35px);
    border-radius: 10px;
    margin-bottom: clamp(20px, 2vw, 30px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.controls-flex {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
}

/* Empêcher le débordement des boutons */
.controls .btn {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
}

.week-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 1.5vw, 20px);
    width: auto; /* Largeur automatique */
    margin: 0 auto; /* Centrer le conteneur */
    flex-wrap: wrap; /* Permettre le wrap sur petits écrans */
}

#currentWeek, #currentWeekEmployee {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: clamp(14px, 1.5vw, 18px);
    color: #1e293b;
    width: clamp(300px, 40vw, 500px); /* Largeur responsive */
    flex: 0 0 auto; /* Adapter à la largeur */
    text-align: center; /* Centre le texte */
    padding: clamp(8px, 1vw, 12px) clamp(16px, 2vw, 24px); /* Espacement interne */
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    /* Header responsive - plus compact */
    .header {
        padding: 6px 10px !important;  /* Valeur fixe au lieu de clamp */
        height: auto !important;
        min-height: unset !important;
    }

    .header-content {
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .header h1 {
        font-size: 12px !important;  /* Plus petit pour mobile */
        line-height: 1.2 !important;  /* Uniformiser entre Safari et Chrome */
        margin: 0 !important;
        flex-shrink: 1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        font-weight: 500 !important;  /* Forcer le même poids */
        letter-spacing: 0 !important;  /* Supprimer l'espacement */
    }

    .user-info {
        flex-shrink: 0 !important;
        gap: 5px !important;
        flex-wrap: nowrap !important;
    }

    /* Réduction du bouton déconnexion sur mobile */
    .user-info .btn {
        padding: 6px 10px !important;  /* Plus petit padding */
        font-size: 12px !important;  /* Police réduite */
        white-space: nowrap !important;
        line-height: 1.2 !important;  /* Line-height fixe */
        height: auto !important;
    }

    /* Optimisation espacement vue employé mobile */
    .employee-week-header {
        margin-bottom: 10px;
    }

    .employee-week-header h2 {
        margin: 8px 0 3px 0;
        font-size: 24px;
    }

    /* Masquer les boutons desktop sur mobile */
    .desktop-only-btn {
        display: none !important;
    }
    
    /* Afficher le menu dropdown sur mobile */
    .actions-dropdown-container {
        display: block !important;
    }
    
    /* Pas de styles spéciaux pour mobile - laisser les styles par défaut fonctionner */
    
    .header h1 {
        font-size: 14px;
        margin: 0;
        line-height: 1.2;
    }
    
    .header img {
        height: 22px !important;
        width: 22px !important;
    }
    
    .user-info {
        font-size: 11px;
        gap: 5px;
    }
    
    /* Afficher le nom utilisateur sur mobile avec un format compact */
    #userDisplay {
        display: block !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
    }
    
    /* Bouton déconnexion optimisé pour mobile */
    .user-info .btn {
        font-size: 10px;
        padding: 3px 6px;
        min-height: 24px;
        white-space: nowrap;
    }
    
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    #currentWeek, #currentWeekEmployee {
        font-size: 14px;
        width: auto;
        padding: 6px 12px;
        letter-spacing: -0.01em;
    }
    
    /* Planning responsive - avec scroll horizontal */
    .planning-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
    
    .planning-table {
        font-size: 11px;
        min-width: 600px; /* Largeur minimale pour contenu lisible */
        width: auto;
        table-layout: auto;
    }
    
    .planning-table th {
        font-size: 10px;
        padding: 8px 4px !important;
        min-width: 60px;
        white-space: nowrap;
    }
    
    .planning-table th:first-child {
        position: sticky;
        left: 0;
        background: #f8f9fa;
        z-index: 2;
        min-width: 100px;
    }
    
    .planning-table td {
        height: 50px !important;
        padding: 4px !important;
        min-width: 60px;
    }
    
    .day-cell {
        min-width: 80px !important;
        white-space: nowrap;
    }
    
    /* Adaptation mobile sans réduction du contenu */
    .shift-display {
        padding: 4px 6px !important;
        margin: 2px auto !important;
        width: auto !important;
        max-width: calc(100% - 4px) !important;
    }
    
    .employee-info {
        font-size: 11px !important;
        padding: 6px !important;
        min-width: 100px !important;
        position: sticky;
        left: 0;
        background: #f8f9fa;
        z-index: 1;
    }
    
    .employee-name {
        font-size: 10px;
    }
    
    .hours-progress {
        display: none; /* Masquer la barre de progression sur mobile */
    }
    
    /* Login box responsive */
    .login-box {
        padding: 30px 20px;
        max-width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        margin: 5vh auto;
    }
    
    .login-box h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .login-box img {
        height: 80px !important;
        width: 80px !important;
        margin-bottom: 15px !important;
    }
    
    .login-box .form-group {
        margin-bottom: 15px;
    }
    
    .login-box .form-group label {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .login-box .form-group input,
    .login-box .form-group select {
        padding: 12px;
        font-size: 16px;
    }
    
    .login-box .btn-full {
        padding: 14px;
        font-size: 16px;
        margin-top: 10px;
    }
    
    .login-box .form-group input, 
    .login-box .form-group select {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .login-box .btn-full {
        padding: 16px 24px;
        font-size: 18px;
    }
    
    .login-box img {
        height: 130px !important;
        width: 130px !important;
    }
}

.week-selector button {
    background: #f0f0f0;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.week-selector button:hover {
    background: #e0e0e0;
}

.btn-calendar {
    flex: 0 0 auto; /* Taille fixe basée sur le contenu */
    background: #ff9800;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 18px;
    transition: all 0.3s;
}

.btn-calendar:hover {
    background: #f57c00;
    transform: scale(1.1);
}

/* Couverture journalière */
.daily-coverage {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Affichage couverture unifiée B1/B2 - style grille existante */
.unified-coverage-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.unified-day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-left: 40px; /* Alignement avec les barres */
}

.unified-day-headers h4 {
    font-size: 12px;
    margin: 0;
    color: #666;
    text-align: center;
    font-weight: normal;
}

.unified-store-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.unified-store-row .store-label {
    font-weight: bold;
    min-width: 25px;
    color: #333;
    font-size: 14px;
}

.unified-store-bars {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    flex: 1;
}

.day-coverage-unified {
    text-align: center;
    min-width: 0;
}

.day-coverage-unified .coverage-bar {
    height: 20px;
    background: #f5f5f5;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    border: 1px solid #e0e0e0;
}

.daily-coverage h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.coverage-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.day-coverage {
    text-align: center;
    min-width: 0; /* Important pour que le contenu ne déborde pas */
}

.day-coverage h4 {
    font-size: 14px;
    margin-bottom: 5px;
    color: #666;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.coverage-bar {
    height: 20px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    margin-bottom: 5px;
}

.coverage-segment {
    position: absolute;
    height: 100%;
    top: 0;
}

.coverage-segment.covered {
    background: linear-gradient(to right, #4caf50, #8bc34a);
}

.coverage-segment.gap {
    background: repeating-linear-gradient(
        45deg,
        #ff5252,
        #ff5252 3px,
        transparent 3px,
        transparent 6px
    );
}

.coverage-info {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.coverage-info div {
    margin: 2px 0;
}

/* Planning */
.planning-container {
    background: white;
    border-radius: 10px;
    overflow-x: auto;
    overflow-y: hidden !important; /* Empêcher le scroll vertical - forcer avec !important */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    scroll-behavior: smooth;
    position: relative;
    max-height: none !important;
    height: auto !important;
}

.planning-table {
    width: 100%;
    border-collapse: collapse;
    min-width: max(100%, 800px);
    table-layout: fixed;
}

/* Override pour mobile - tableau avec scroll */
@media (max-width: 768px) {
    .planning-table {
        min-width: 700px; /* Largeur minimale pour lisibilité */
        table-layout: auto;
    }
    
    /* Ombre pour indiquer le scroll */
    .planning-container {
        box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.3);
    }
}

/* Mode portrait mobile - sans réduction */
@media (max-width: 414px) {
    /* Titre plus petit sur iPhone pour éviter débordement */
    .header h1 {
        font-size: 11px !important;
    }

    .planning-table td {
        padding: 3px !important;
    }

    .day-cell {
        min-width: 65px !important;
    }

    /* Ajustements spécifiques iPhone pour le header - Uniformisé */
    .header {
        padding: 5px 8px !important;  /* Uniforme pour iOS et Android */
        margin: 4px !important;
        height: auto !important;
    }

    .header-content {
        gap: 6px !important;
        height: auto !important;
        align-items: center !important;
    }

    /* Titre uniformisé pour petits écrans */
    .header h1 {
        font-size: 11px !important;
        line-height: 1.2 !important;  /* Important pour Safari */
        letter-spacing: 0 !important;
        font-weight: 500 !important;
    }

    /* Logo taille fixe */
    .header img {
        height: 18px !important;
        width: 18px !important;
    }

    /* Réduction maximale du bouton sur iPhone */
    .user-info .btn {
        padding: 5px 8px !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
        height: auto !important;
    }

    /* Texte utilisateur plus petit */
    .user-info span {
        font-size: 11px !important;
        max-width: 70px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        line-height: 1.2 !important;
    }
}

/* Réduction hauteur cellules uniquement sur desktop (1000px+) */
@media (min-width: 1000px) {
    .planning-table td.day-cell,
    .planning-table td.employee-info {
        height: 55px !important;  /* Réduit de 70px à 55px */
        min-height: 55px !important;
    }

    /* Ajustements pour que le contenu reste lisible */
    .shift-display {
        line-height: 1.2 !important;
    }

    .employee-info {
        padding: 6px !important;
    }

    .hours-breakdown {
        margin-top: 2px !important;
    }
}

/* Résolutions moyennes comme 1024x768 - réduction pour éviter coupure texte */
@media (min-width: 1000px) and (max-width: 1200px) {
    .planning-table th {
        font-size: 12px !important;
        padding: 10px 4px !important;
    }
}

.planning-table th {
    background-color: #f8f9fa;
    padding: clamp(12px, 2vw, 24px) clamp(8px, 1.5vw, 20px);
    text-align: center;
    font-weight: 600;
    font-size: clamp(13px, 1.5vw, 18px);
    border: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.planning-table td {
    padding: clamp(8px, 1.5vw, 25px);
    border: 1px solid #e9ecef;
    text-align: center;
    height: clamp(60px, 5vw + 10px, 90px);
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
}

.planning-table td {
    position: relative;
    transition: all 0.2s ease;
}

.planning-table td:not(:first-child):hover {
    background-color: #e8eaf6;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1;
}

.employee-info {
    background-color: #f8f9fa;
    font-weight: 500;
    text-align: left;
    padding: clamp(8px, 1.5vw, 20px) clamp(12px, 2vw, 28px);
    position: sticky;
    left: 0;
    z-index: 5;
    min-width: clamp(80px, 15vw, 180px);
    font-size: clamp(13px, 1.5vw, 18px);
}


.employee-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.hours-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.progress-bar {
    width: 120px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Nouveau code couleur des barres de progression */
.progress-under {
    background: #2196F3; /* Bleu - en dessous du contrat */
}

.progress-perfect {
    background: #4CAF50; /* Vert - objectif atteint */
}

.progress-over {
    background: #f44336; /* Rouge - heures supplémentaires */
}

/* Anciennes classes conservées pour compatibilité */
.progress-ok {
    background: #4caf50;
}

.progress-warning {
    background: #ff9800;
}

.progress-danger {
    background: #f44336;
}

.hours-text {
    color: #666;
    min-width: 70px;
    text-align: right;
}

.day-cell {
    width: calc((100% - 200px) / 7);
    min-width: 90px;
    max-width: 150px;
    background: white;
    transition: background-color 0.2s;
    overflow: hidden;
    position: relative;
}

.day-cell:hover {
    background-color: #f0f0f0;
}

.shift-display {
    font-weight: 600;
    color: #333;
    border-radius: 4px;
    font-size: 12px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    margin: 3px;
    width: calc(100% - 6px);
    box-sizing: border-box;
    text-align: center;
    line-height: 1.2;
}

.shift-display:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Couleur par défaut pour les shifts de travail */
.shift-display:not(.repos):not(.conge) {
    /* background-color: #ffcc80; */
}

/* Couleurs différenciées par type de shift - DÉSACTIVÉES */
.shift-display.shift-morning {
    /* background-color: #e8f5e9 !important; */
    /* border: 1px solid #4caf50; */
}

.shift-display.shift-afternoon {
    /* background-color: #e3f2fd !important; */
    /* border: 1px solid #2196f3; */
}

.shift-display.shift-fullday {
    /* background-color: #fff3e0 !important; */
    /* border: 1px solid #ff9800; */
}

.shift-display.shift-morning .shift-hours {
    /* color: #1b5e20; */
}

.shift-display.shift-afternoon .shift-hours {
    /* color: #0d47a1; */
}

.shift-display.shift-fullday .shift-hours {
    /* color: #e65100; */
}

/* Supprimé - définition consolidée plus haut */

.shift-hours {
    font-weight: 600;
    font-size: inherit;
    white-space: nowrap;
    display: block;
    text-align: center;
    letter-spacing: -0.3px;
}

.shift-indicators {
    font-size: 18px;
    line-height: 1;
    margin: 2px 0;
}

.break-info {
    font-size: clamp(10px, 1vw, 12px);
    color: #2e7d32;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 2px;
}

.break-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 2px;
}

.break-1h {
    background-color: #4caf50;
}

.break-20min {
    background-color: #ff9800;
}

.repos {
    background-color: #ffeb3b;
    color: #333;
}

.conge {
    background-color: #fff8e1;
    color: #f57c00;
    border: 1px solid #ffcc80;
}

.ferie-non-travaille {
    background: linear-gradient(135deg, #FFE0B2, #FFCC80);
    color: #E65100;
    border: 2px solid #FF9800;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 5px;
}

.absence {
    background-color: #e1bee7;
    color: #6a1b9a;
    border: 1px solid #ce93d8;
}

.arret-maladie {
    background-color: #ffcdd2;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.recuperation {
    background-color: #E3F2FD;
    color: #1565C0;
    border: 2px dashed #1976D2;
    font-weight: bold;
}

/* Optimisations addManagerModal */
#addManagerModal {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px;
}

/* Force le centrage quand la modale est visible */
#addManagerModal[style*="display: flex"],
#addManagerModal[style*="display: block"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Assure que la modale se ferme correctement */
#addManagerModal[style*="display: none"] {
    display: none !important;
}

/* Container optimisé avec marges et design moderne */
#addManagerModal .modal-content {
    max-width: 800px !important;
    max-height: 85vh !important;
    width: calc(100vw - 80px) !important;
    margin: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* Body scrollable pour addManagerModal */
#addManagerModal .modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#addManagerModal .modal-header {
    padding: 15px 20px !important;
}

#addManagerModal .modal-header h2 {
    font-size: 18px !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}

#addManagerModal .modal-header .close-modal {
    width: 32px !important;
    height: 32px !important;
    font-size: 20px !important;
    line-height: 1 !important;
}

#addManagerModal .modal-body {
    padding: 15px !important;
}

#addManagerModal .modal-body > div {
    padding: 12px 15px !important;
    margin-bottom: 15px !important;
}

#addManagerModal .modal-body h3 {
    font-size: 16px !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
}

#addManagerModal .form-group {
    margin-bottom: 15px !important;
}

#addManagerModal .form-actions {
    margin-top: 15px !important;
    padding-top: 15px !important;
}

@media (max-width: 768px) {
    #addManagerModal .modal-content {
        max-width: 95vw !important;
        margin: 10px !important;
    }

    #addManagerModal .form-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }

    #addManagerModal .modal-body {
        padding: 12px !important;
    }

    #addManagerModal .modal-body > div {
        padding: 10px 12px !important;
        margin-bottom: 12px !important;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 9999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Centrage spécifique pour holidayManagementModal sur desktop */
#holidayManagementModal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Force le centrage quand la modale est visible */
#holidayManagementModal[style*="display: flex"],
#holidayManagementModal[style*="display: block"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Centrage et espacement pour managerManagementModal sur desktop */
#managerManagementModal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* Force le centrage quand la modale est visible */
#managerManagementModal[style*="display: flex"],
#managerManagementModal[style*="display: block"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Container optimisé avec marges */
#managerManagementModal .modal-content {
    max-width: 1000px !important;
    max-height: 85vh !important;
    width: calc(100vw - 80px) !important;
    margin: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
}

/* Espacement pour le header des actions */
#managerManagementModal .employee-management-header {
    padding: 20px !important;
    gap: 20px !important;
    align-items: center !important;
}

/* Masquer l'emoji parasol dans la modale managerManagementModal */
#managerManagementModal .employee-table th:nth-child(4):after {
    content: "" !important;
}

.modal.show {
    display: block;
    animation: modalFadeIn 0.3s ease;
}

.modal.show .modal-content {
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.closing {
    animation: modalFadeOut 0.3s ease;
}

.modal.closing .modal-content {
    animation: modalSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh; /* Limite la hauteur à 90% de la hauteur de l'écran */
    overflow-y: auto; /* Active le scroll vertical si nécessaire */
    border-radius: 10px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    /* Fix pour les bugs de rendu sur mobile */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Fix supplémentaire pour iOS */
    -webkit-overflow-scrolling: touch;
    will-change: transform;
}


/* Style spécifique pour la modale des jours fériés - Optimisée */
#holidayManagementModal .modal-content {
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
    width: calc(100vw - 40px) !important;
    max-width: 900px !important; /* Largeur normale pour contenir tout le tableau */
    height: auto !important;
    max-height: 70vh !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    overflow: hidden !important;
    margin: auto !important;
}

/* ==== MODALE DÉTAIL PÉRIODES CONGÉS - HARMONISATION ==== */
/* Backdrop avec centrage comme les autres modales */
#leavePeriodModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 10px;
}

/* Force le centrage quand la modale est visible */
#leavePeriodModal[style*="display: flex"],
#leavePeriodModal[style*="display: block"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Container harmonisé avec les autres modales */
#leavePeriodModal .modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    width: calc(100vw - 40px);
    max-width: 900px; /* Optimisé pour les congés */
    max-height: 85vh; /* Hauteur adaptative */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    margin: 0; /* Supprime le margin auto du CSS global */
    padding: 0; /* Structure moderne sans padding global */
}

/* Header de la modale - réduit et optimisé */
#leavePeriodModal .modal-header {
    flex-shrink: 0;
    padding: 15px 20px; /* Réduit de 25px à 15px vertical, 20px horizontal */
    border-bottom: 2px solid #f0f0f0;
}

/* Optimisation du titre du header */
#leavePeriodModal .modal-header h2 {
    font-size: 18px !important; /* Réduit la taille du titre */
    margin-bottom: 0 !important;
    line-height: 1.3 !important; /* Hauteur de ligne compacte */
}

/* Bouton fermer optimisé et plus visible */
#leavePeriodModal .close-modal {
    width: 40px !important; /* Augmenté de 32px à 40px */
    height: 40px !important; /* Augmenté de 32px à 40px */
    font-size: 26px !important; /* Augmenté de 20px à 26px pour meilleure visibilité */
    line-height: 1 !important;
    border-radius: 8px !important; /* Arrondis modernes */
    display: flex !important; /* Centrage parfait */
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important; /* Animation douce */
}

/* Effet hover pour le bouton fermer de leavePeriodModal */
#leavePeriodModal .close-modal:hover {
    background: rgba(255, 255, 255, 0.2) !important; /* Fond semi-transparent au hover */
    transform: scale(1.1) !important; /* Légère augmentation au hover */
}

/* Ajustement du contenu - tout sauf header et actions */

#leavePeriodModal .modal-actions {
    flex-shrink: 0;
    padding: 20px 25px;
    border-top: 1px solid #f0f0f0;
}

/* Zone de contenu principal scrollable */
#leavePeriodModal .modal-content > div:not(.modal-header):not(.modal-actions) {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

/* Optimisation du header employé - minimal et propre - Force les styles inline */
#leavePeriodModal div[id="employeeNameHeader"] {
    padding: 8px 12px !important; /* Légèrement plus pour la police plus grande */
    font-size: 16px !important; /* Taille augmentée pour importance */
    margin-bottom: 10px !important; /* Espacement minimal */
    line-height: 1.3 !important; /* Hauteur de ligne compacte */
    font-weight: 600 !important; /* Plus gras pour importance */
    flex: none !important; /* Désactive le comportement flex */
    height: auto !important; /* Hauteur automatique selon le contenu */
    max-height: 35px !important; /* Limite ajustée pour la plus grande police */
}

/* Optimisation du bloc résumé global - hauteur minimale - DESKTOP SEULEMENT */
@media (min-width: 769px) {
    #leavePeriodModal div[style*="background: #E3F2FD"] {
        flex: none !important; /* Désactive le comportement flex */
        height: auto !important; /* Hauteur automatique selon le contenu */
        max-height: 75px !important; /* Limite ajustée pour polices plus grandes */
        min-height: auto !important; /* Pas de hauteur minimale forcée */
    }
}

/* Optimisation du bloc d'informations - hauteur adaptée au contenu */
#leavePeriodModal div[style*="margin-top: 30px"][style*="background: #F5F5F5"] {
    flex: none !important; /* Désactive le comportement flex */
    height: auto !important; /* Hauteur automatique selon le contenu */
    max-height: 200px !important; /* Limite adaptée pour le contenu dépliant */
    min-height: auto !important; /* Pas de hauteur minimale forcée */
}

/* Animation de la flèche pour le système dépliant */
#leavePeriodModal details[open] summary span {
    transform: rotate(90deg) !important;
}

/* Style amélioré pour le summary */
#leavePeriodModal summary:hover {
    color: #1976D2 !important;
    background: rgba(25, 118, 210, 0.05) !important;
    padding: 8px !important;
    border-radius: 4px !important;
    margin: -8px !important;
}

/* ==== MODALE AJUSTEMENT CONGÉS - HARMONISATION ==== */
/* Centrage identique à leavePeriodModal */
#leaveAdjustmentModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 10px;
}

/* Force le centrage quand la modale est visible */
#leaveAdjustmentModal[style*="display: flex"],
#leaveAdjustmentModal[style*="display: block"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Container optimisé avec design moderne */
#leaveAdjustmentModal .modal-content {
    max-width: 750px !important; /* Légèrement plus large que l'original 700px */
    max-height: 85vh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px !important; /* Arrondis modernes harmonisés */
    box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important; /* Ombre douce moderne */
    border: none !important; /* Supprime les bordures rectangulaires */
}

/* Header compact avec arrondis modernes */
#leaveAdjustmentModal .modal-header {
    flex-shrink: 0;
    padding: 15px 20px !important; /* Réduit de 25px à 15px vertical */
    border-radius: 16px 16px 0 0 !important; /* Arrondis uniquement en haut pour suivre la modale */
}

/* Titre optimisé */
#leaveAdjustmentModal .modal-header h2 {
    font-size: 18px !important; /* Réduit pour harmonie */
    margin-bottom: 0 !important;
    line-height: 1.3 !important;
}

/* Bouton fermer optimisé et plus visible */
#leaveAdjustmentModal .close-modal {
    width: 40px !important; /* Augmenté de 32px à 40px */
    height: 40px !important; /* Augmenté de 32px à 40px */
    font-size: 26px !important; /* Augmenté de 20px à 26px pour meilleure visibilité */
    line-height: 1 !important;
    border-radius: 8px !important; /* Arrondis modernes */
    display: flex !important; /* Centrage parfait */
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important; /* Animation douce */
}

/* Effet hover pour le bouton fermer */
#leaveAdjustmentModal .close-modal:hover {
    background: rgba(255, 255, 255, 0.2) !important; /* Fond semi-transparent au hover */
    transform: scale(1.1) !important; /* Légère augmentation au hover */
}

/* Body optimisé avec scroll */
#leaveAdjustmentModal .modal-body {
    padding: 20px !important; /* Réduit de 25px à 20px */
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Bloc "Situation actuelle" optimisé avec design moderne */
#leaveAdjustmentModal #currentLeaveInfo {
    flex: none !important;
    height: auto !important;
    max-height: 150px !important; /* Adapté au contenu */
    min-height: auto !important;
    padding: 12px 15px !important; /* Réduit de 15px */
    margin-bottom: 15px !important; /* Réduit de 20px à 15px */
    border-radius: 12px !important; /* Arrondis modernes pour les blocs internes */
}

/* Titre du bloc situation */
#leaveAdjustmentModal #currentLeaveInfo h4 {
    font-size: 16px !important; /* Harmonisé */
    margin: 0 0 8px 0 !important; /* Réduit l'espacement */
    line-height: 1.3 !important;
}

/* Données importantes - plus visibles */
#leaveAdjustmentModal #currentLeaveDetails div[style*="font-size: 24px"] {
    font-size: 28px !important; /* Augmenté pour importance */
    font-weight: 700 !important; /* Plus gras */
}

/* Labels des données */
#leaveAdjustmentModal #currentLeaveDetails div[style*="font-size: 14px"] {
    font-size: 13px !important; /* Cohérent avec autres modales */
}

/* Formulaire - sections plus compactes */
#leaveAdjustmentModal .row {
    margin-bottom: 15px !important; /* Réduit de 20px à 15px */
    gap: 15px !important; /* Réduit de 20px à 15px */
}

/* Colonnes du formulaire */
#leaveAdjustmentModal .col h5 {
    font-size: 16px !important; /* Harmonisé */
    margin-bottom: 12px !important; /* Réduit de 15px à 12px */
}

/* Bloc aperçu optimisé avec design moderne */
#leaveAdjustmentModal #adjustmentPreview {
    flex: none !important;
    height: auto !important;
    max-height: 120px !important; /* Limite la hauteur */
    min-height: auto !important;
    padding: 12px 15px !important; /* Réduit de 15px */
    margin-bottom: 15px !important; /* Réduit de 20px à 15px */
    border-radius: 12px !important; /* Arrondis modernes cohérents */
}

/* Titre du bloc aperçu */
#leaveAdjustmentModal #adjustmentPreview h5 {
    font-size: 16px !important; /* Harmonisé */
    margin-bottom: 8px !important; /* Réduit de 10px à 8px */
}

/* Boutons d'actions compacts avec design moderne */
#leaveAdjustmentModal .modal-actions {
    padding-top: 15px !important; /* Réduit de 20px à 15px */
    gap: 8px !important; /* Réduit de 10px à 8px */
}

/* Boutons avec arrondis modernes */
#leaveAdjustmentModal .modal-actions button {
    border-radius: 8px !important; /* Arrondis modernes pour les boutons */
    padding: 12px 24px !important; /* Padding harmonisé */
    font-weight: 500 !important; /* Police légèrement plus grasse */
    transition: all 0.2s ease !important; /* Animation douce */
}

/* Bouton principal avec effet hover moderne */
#leaveAdjustmentModal .modal-actions button[type="submit"] {
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3) !important; /* Ombre colorée */
}

#leaveAdjustmentModal .modal-actions button[type="submit"]:hover {
    transform: translateY(-1px) !important; /* Effet de lift au hover */
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4) !important; /* Ombre renforcée */
}

/* Cartes de données avec arrondis modernes */
#leaveAdjustmentModal #currentLeaveDetails div[style*="background: white"] {
    border-radius: 10px !important; /* Arrondis pour les cartes de données */
    border: 1px solid #f0f0f0 !important; /* Bordure douce */
    transition: all 0.2s ease !important; /* Animation */
}

#leaveAdjustmentModal #currentLeaveDetails div[style*="background: white"]:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important; /* Effet hover subtil */
    transform: translateY(-1px) !important; /* Micro lift */
}

/* Optimisation pour écrans ≥ 1000px - tout doit rentrer */
@media (min-width: 1000px) {
    #holidayManagementModal .modal-content {
        max-width: 900px !important;
    }

    #holidayManagementModal table,
    #holidayManagementModal #holidaysList table {
        width: 100% !important;
        min-width: auto !important;
    }
}

/* Header moderne - Desktop optimisé */
#holidayManagementModal .modal-header {
    background: #fefefe;
    color: #333;
    padding: 15px 20px !important; /* Réduit de 25px → 15px 20px pour harmonie */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 2px solid #f0f0f0;
}

#holidayManagementModal .modal-header h2 {
    margin: 0;
    font-size: 18px !important; /* Réduit de 24px → 18px pour harmonie */
    font-weight: 600;
    line-height: 1.3 !important; /* Ajout pour compacité */
}

/* Bouton fermer - Modernisé et harmonisé */
#holidayManagementModal .close-modal {
    background: none;
    border: none;
    color: #999;
    width: 40px !important; /* Augmenté de 32px → 40px pour harmonie */
    height: 40px !important; /* Augmenté de 32px → 40px pour harmonie */
    border-radius: 8px !important; /* Moderne: 8px au lieu de 50% (rond) */
    font-size: 26px !important; /* Réduit de 28px → 26px pour harmonie */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1 !important;
    transition: all 0.2s ease !important; /* Animation fluide */
}

#holidayManagementModal .close-modal:hover {
    background: rgba(255, 255, 255, 0.2) !important; /* Fond semi-transparent harmonisé */
    color: #666;
    transform: scale(1.1) !important; /* Effet moderne au hover */
}

/* Body avec arrière-plan moderne - Corrections flex */
#holidayManagementModal .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    padding: 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 0;
}

/* CORRECTIONS FLEX - Empêcher l'expansion automatique des blocs */
#holidayManagementModal .year-selector-modern {
    flex: none !important;
    height: auto !important;
    min-height: auto !important;
    max-height: 80px !important; /* Limite la hauteur du sélecteur */
}

#holidayManagementModal .table-container {
    flex: none !important;
    height: auto !important;
    min-height: auto !important;
    max-height: 400px !important; /* Limite la hauteur du tableau */
}

#holidayManagementModal #holidaysList {
    flex: none !important;
    height: auto !important;
    min-height: auto !important;
    max-height: 350px !important; /* Contenu du tableau */
}

/* Section contrôles année - Desktop optimisé */
#holidayManagementModal .year-controls {
    background: white;
    padding: 12px 15px !important; /* Réduit de 15px 20px → 12px 15px pour compacité */
    border-radius: 12px;
    margin-bottom: 15px !important; /* Réduit de 20px → 15px */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Harmonisation du sélecteur année dans holidayManagementModal */
#holidayManagementModal .year-selector-modern {
    margin-bottom: 15px !important; /* Réduit de 20px → 15px */
    padding: 12px 0 !important; /* Réduit de 15px → 12px */
}

#holidayManagementModal .year-display {
    font-size: 20px !important; /* Réduit de 24px → 20px pour harmonie */
    font-weight: 600 !important;
    padding: 6px 20px !important; /* Réduit de 8px 24px → 6px 20px */
}

/* Tableau optimisé - FORCER LE STYLE */
#holidayManagementModal table,
#holidayManagementModal #holidaysList table {
    width: 800px !important; /* Force une largeur qui dépasse */
    min-width: 800px !important;
    border-collapse: collapse !important;
    background: white !important;
    border-radius: 12px !important;
    overflow: visible !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    table-layout: auto !important;
}

@media (max-width: 768px) {
    #holidayManagementModal table,
    #holidayManagementModal #holidaysList table {
        width: 320px !important;
        min-width: 320px !important;
    }
}

#holidayManagementModal thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

#holidayManagementModal th {
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
    color: #2d3748;
    border: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

#holidayManagementModal td {
    padding: 12px;
    border-bottom: 1px solid #f1f3f5;
    font-size: 14px;
    vertical-align: middle;
}

#holidayManagementModal tbody tr:hover {
    background-color: #f8f9fa;
}

/* Largeurs optimisées des colonnes - très compactes */
#holidayManagementModal th:nth-child(1),
#holidayManagementModal td:nth-child(1) { width: 30px; } /* Checkbox */
#holidayManagementModal th:nth-child(2),
#holidayManagementModal td:nth-child(2) { width: 120px; } /* Nom */
#holidayManagementModal th:nth-child(3),
#holidayManagementModal td:nth-child(3) { width: 80px; } /* Date */
#holidayManagementModal th:nth-child(4),
#holidayManagementModal td:nth-child(4) { width: 50px; } /* Type */
#holidayManagementModal th:nth-child(5),
#holidayManagementModal td:nth-child(5) { width: 60px; } /* Travaillé */

/* Boutons modernes */
#holidayManagementModal .btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin: 2px;
}

#holidayManagementModal .btn:hover {
    background: #5558e3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#holidayManagementModal .btn-success {
    background: #38a169;
}

#holidayManagementModal .btn-success:hover {
    background: #2f855a;
}

/* Responsive - écrans < 1000px */
@media (max-width: 999px) {
    #holidayManagementModal .modal-content {
        width: calc(100vw - 20px);
        max-width: none;
        height: calc(100vh - 20px);
        max-height: 95vh;
    }

    #holidayManagementModal .modal-header {
        padding: 15px 20px;
    }

    #holidayManagementModal .modal-header h2 {
        font-size: 20px;
    }

    #holidayManagementModal .modal-body {
        padding: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    #holidayManagementModal .modal-content {
        width: 100vw;
        height: 100vh;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }


    #holidayManagementModal .modal-header {
        padding: 12px 16px;
    }

    #holidayManagementModal .modal-header h2 {
        font-size: 18px;
    }

    #holidayManagementModal .modal-body {
        padding: 0;
        overflow-y: auto;
        overflow-x: visible;
        position: relative;
    }

    /* Scroll horizontal pour voir toutes les colonnes sur mobile */
    #holidayManagementModal .table-container {
        overflow-x: auto !important;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        position: relative;
        padding: 10px;
        max-width: 100%;
        width: 100%;
    }

    #holidayManagementModal #holidaysList,
    #holidayManagementModal #holidaysList > div {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Indicateur de scroll */
    #holidayManagementModal .scroll-indicator {
        display: block;
        position: fixed;
        right: 10px;
        bottom: 50%;
        transform: translateY(50%);
        background: rgba(99, 102, 241, 0.2);
        color: #6366f1;
        padding: 6px 10px;
        border-radius: 16px;
        font-size: 12px;
        font-weight: 400;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        z-index: 100;
        pointer-events: none;
        opacity: 0.7;
        content: 'Glisser';
    }

    #holidayManagementModal .scroll-indicator::before {
        content: '← ';
        margin-right: 4px;
    }

    #holidayManagementModal .scroll-indicator::after {
        content: ' →';
        margin-left: 4px;
        animation: scrollHint 1.5s ease-in-out infinite;
    }

    @keyframes scrollHint {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(3px); }
    }

    /* Masquer l'indicateur après le premier scroll */
    #holidayManagementModal .table-container.scrolled .scroll-indicator {
        display: none;
    }

    /* Table responsive - largeur réduite pour mobile */
    #holidayManagementModal table {
        min-width: 450px !important;
        width: 450px !important;
    }

    #holidayManagementModal th,
    #holidayManagementModal td {
        padding: 6px 4px !important;
        font-size: 11px !important;
    }

    /* Ajuster les largeurs pour mobile - TRÈS COMPACTES */
    #holidayManagementModal table th:nth-child(1)[style],
    #holidayManagementModal table td:nth-child(1) {
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        padding: 4px 2px !important;
    } /* Checkbox */

    #holidayManagementModal table th:nth-child(2)[style],
    #holidayManagementModal table td:nth-child(2) {
        width: 90px !important;
        min-width: 90px !important;
        max-width: 90px !important;
        font-size: 10px !important;
    } /* Nom */

    #holidayManagementModal table th:nth-child(3)[style],
    #holidayManagementModal table td:nth-child(3) {
        width: 110px !important;
        min-width: 110px !important;
        max-width: 110px !important;
    } /* Date - réduite */

    #holidayManagementModal table th:nth-child(4)[style],
    #holidayManagementModal table td:nth-child(4) {
        width: 45px !important;
        min-width: 45px !important;
        max-width: 45px !important;
    } /* Type */

    /* Réduire encore plus les éléments de la colonne Date */
    #holidayManagementModal td:nth-child(3) {
        font-size: 10px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Badges Type plus petits */
    #holidayManagementModal td:nth-child(4) span {
        padding: 2px 4px !important;
        font-size: 9px !important;
    }

    /* Indicateur vert plus petit */
    #holidayManagementModal td:nth-child(2) span[style*="width: 10px"] {
        width: 6px !important;
        height: 6px !important;
    }

    /* Forcer la réduction du contenu de la colonne Date */
    #holidayManagementModal td:nth-child(3) div {
        flex-direction: column !important;
        gap: 2px !important;
        align-items: flex-start !important;
    }

    #holidayManagementModal td:nth-child(3) input[type="date"] {
        width: 100px !important;
        font-size: 11px !important;
        padding: 3px 4px !important;
    }

    #holidayManagementModal td:nth-child(3) span {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }
}


/* ====== OPTIMISATIONS MODALE CONFIGURATION SOLIDARITÉ - DESKTOP ====== */
/* Application des 8 points d'optimisation de holidayManagementModal */

/* 1. CENTRAGE DE LA MODALE (comme holidayManagementModal) */
/* Correction du bug : ne pas forcer display: flex quand la modale est fermée */
#solidarityConfigModal {
    align-items: center !important;
    justify-content: center !important;
}

/* Appliquer flex uniquement quand la modale est visible */
#solidarityConfigModal[style*="display: block"],
#solidarityConfigModal[style*="display: flex"],
#solidarityConfigModal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* S'assurer que display: none fonctionne */
#solidarityConfigModal[style*="display: none"] {
    display: none !important;
}

/* 2. CONTENEUR MODAL OPTIMISÉ */
#solidarityConfigModal .modal-content {
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
    width: calc(100vw - 40px) !important;
    max-width: 650px !important;
    height: auto !important;
    max-height: 75vh !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    margin: 0 !important;
    flex: none !important;
    overflow: hidden !important;
}

/* 3. HEADER OPTIMISÉ (réduction 25px → 15px) */
#solidarityConfigModal .modal-header {
    padding: 15px 20px !important;
    border-bottom: 1px solid #eee !important;
    background: #f8f9fa !important;
    border-radius: 16px 16px 0 0 !important;
    flex: none !important;
    min-height: auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

#solidarityConfigModal .modal-header h2 {
    font-size: 18px !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    font-weight: 600 !important;
    color: #333 !important;
}

#solidarityConfigModal .close-modal {
    width: 32px !important;
    height: 32px !important;
    font-size: 20px !important;
    line-height: 1 !important;
    background: none !important;
    border: none !important;
    color: #666 !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s ease !important;
}

#solidarityConfigModal .close-modal:hover {
    background: #f0f0f0 !important;
}

/* 4. BLOC EMPLOYÉ OPTIMISÉ - Correction hauteur pour afficher tout le contenu */
#solidarityConfigModal #solidarityEmployeeInfo {
    background: #f5f5f5 !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    /* Suppression des contraintes de hauteur problématiques */
    height: auto !important;
    min-height: auto !important;
    flex: none !important;
    /* Suppression du flex qui forçait une seule ligne */
    display: block !important;
    overflow: visible !important;
}

/* Styles pour le titre dans le bloc employé */
#solidarityConfigModal #solidarityEmployeeInfo h3 {
    margin: 0 0 8px 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333 !important;
    line-height: 1.3 !important;
}

/* Styles pour le paragraphe d'info contrat */
#solidarityConfigModal #solidarityEmployeeInfo p {
    margin: 0 0 8px 0 !important;
    color: #666 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Styles pour le bloc de statut interne */
#solidarityConfigModal #solidarityEmployeeInfo > div {
    margin-top: 8px !important;
    padding: 8px 10px !important;
    background: #e3f2fd !important;
    border-radius: 4px !important;
    border-left: 4px solid #2196f3 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #1976D2 !important;
}

#solidarityConfigModal #solidarityEmployeeInfo > div strong {
    font-weight: 600 !important;
    color: #1565C0 !important;
}

/* 5. BODY PRINCIPAL OPTIMISÉ */
#solidarityConfigModal .modal-body {
    padding: 20px !important;
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
}

#solidarityConfigModal .form-group {
    margin-bottom: 15px !important;
}

#solidarityConfigModal .form-group label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 8px !important;
    display: block !important;
}

#solidarityConfigModal select {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: white !important;
    cursor: pointer !important;
}

/* 6. SECTIONS SPÉCIFIQUES OPTIMISÉES */
#solidarityConfigModal #ferieSelectionGroup,
#solidarityConfigModal #congeDeductionInfo {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    border-radius: 8px !important;
    flex: none !important;
}

#solidarityConfigModal #congeDeductionInfo {
    background: #E3F2FD !important;
    padding: 12px !important;
}

#solidarityConfigModal #congeDeductionInfo p {
    margin: 0 !important;
    color: #1976D2 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Section note jour férié */
#solidarityConfigModal #ferieSelectionGroup > div[style*="background: #FFF3E0"] {
    background: #FFF3E0 !important;
    padding: 8px 12px !important;
    margin-top: 8px !important;
    border-radius: 5px !important;
}

#solidarityConfigModal #ferieSelectionGroup p {
    margin: 0 !important;
    color: #E65100 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Section heures dues */
#solidarityConfigModal .modal-body > div[style*="margin-top: 20px"] {
    margin-top: 16px !important;
    padding: 12px !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
    flex: none !important;
}

#solidarityConfigModal .modal-body h4 {
    margin: 0 0 8px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

#solidarityConfigModal #solidarityHoursInfo {
    font-size: 13px !important;
    color: #666 !important;
    line-height: 1.4 !important;
}

/* 7. FOOTER ACTIONS OPTIMISÉ */
#solidarityConfigModal .modal-actions {
    padding: 15px 20px !important;
    border-top: 1px solid #eee !important;
    background: #f8f9fa !important;
    border-radius: 0 0 16px 16px !important;
    flex: none !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
}

#solidarityConfigModal .btn {
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

#solidarityConfigModal .btn:not(.btn-secondary) {
    background: #4CAF50 !important;
    color: white !important;
}

#solidarityConfigModal .btn:not(.btn-secondary):hover {
    background: #45a049 !important;
    transform: translateY(-1px) !important;
}

#solidarityConfigModal .btn-secondary {
    background: #f5f5f5 !important;
    color: #666 !important;
}

#solidarityConfigModal .btn-secondary:hover {
    background: #e8e8e8 !important;
}

/* 8. RESPONSIVE - DESKTOP OPTIMISÉ (≥1000px) */
@media (min-width: 1000px) {
    #solidarityConfigModal .modal-content {
        max-width: 600px !important;
        width: 600px !important;
    }
}

/* RESPONSIVE - TABLET (768px-999px) */
@media (min-width: 768px) and (max-width: 999px) {
    #solidarityConfigModal .modal-content {
        width: calc(100vw - 40px) !important;
        max-width: 650px !important;
        max-height: 80vh !important;
    }
}

/* RESPONSIVE - MOBILE (<768px) - STYLE CARD MODERNE */
@media (max-width: 768px) {
    #solidarityConfigModal {
        padding: 10px !important;
        align-items: flex-start !important;
        padding-top: 20px !important;
    }

    #solidarityConfigModal .modal-content {
        width: calc(100vw - 20px) !important;
        max-width: none !important;
        height: auto !important;
        max-height: calc(100vh - 40px) !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    }

    #solidarityConfigModal .modal-header {
        padding: 12px 20px !important;
        border-radius: 12px 12px 0 0 !important;
    }

    #solidarityConfigModal .modal-header h2 {
        font-size: 1.3rem !important;
        font-weight: 600 !important;
    }

    #solidarityConfigModal .close-modal {
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
        border-radius: 50% !important;
        background: rgba(0, 0, 0, 0.1) !important;
        color: #666 !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
        min-height: 48px !important;
        min-width: 48px !important;
    }

    #solidarityConfigModal .close-modal:hover,
    #solidarityConfigModal .close-modal:active {
        background: rgba(0, 0, 0, 0.15) !important;
        color: #333 !important;
        transform: scale(1.05) !important;
        border-color: rgba(0, 0, 0, 0.2) !important;
    }

    #solidarityConfigModal .modal-body {
        padding: 16px 20px !important;
        padding-bottom: 8px !important;
        flex: 1 !important;
        overflow-y: auto !important;
    }

    #solidarityConfigModal .form-group {
        margin-bottom: 14px !important;
    }

    #solidarityConfigModal .form-group label {
        font-size: 15px !important;
        margin-bottom: 4px !important;
        font-weight: 600 !important;
    }

    #solidarityConfigModal select {
        padding: 12px 16px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        width: 100% !important;
    }

    #solidarityConfigModal .modal-actions {
        padding: 8px 20px !important;
        flex-direction: column-reverse !important;
        gap: 8px !important;
        background: #f8f9fa !important;
        border-top: 1px solid #e9ecef !important;
        border-radius: 0 0 12px 12px !important;
    }

    #solidarityConfigModal .btn {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        min-height: 48px !important;
    }

    /* Optimisations contenu spécifique */
    #solidarityConfigModal #solidarityEmployeeInfo {
        padding: 10px 12px !important;
        margin-bottom: 12px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        height: auto !important;
        display: block !important;
        overflow: visible !important;
    }

    #solidarityConfigModal #solidarityEmployeeInfo h3 {
        font-size: 15px !important;
        margin: 0 0 6px 0 !important;
    }

    #solidarityConfigModal #solidarityEmployeeInfo p {
        margin: 0 0 6px 0 !important;
        font-size: 13px !important;
    }

    #solidarityConfigModal #solidarityEmployeeInfo > div {
        font-size: 12px !important;
        padding: 6px 8px !important;
        margin-top: 6px !important;
    }

    /* Sections info compactes */
    #solidarityConfigModal #congeDeductionInfo {
        padding: 8px 12px !important;
        margin-top: 8px !important;
        margin-bottom: 8px !important;
    }

    #solidarityConfigModal #congeDeductionInfo p {
        font-size: 13px !important;
        line-height: 1.3 !important;
    }

    #solidarityConfigModal #ferieSelectionGroup > div {
        padding: 8px 12px !important;
        margin-top: 6px !important;
    }

    #solidarityConfigModal #ferieSelectionGroup p {
        font-size: 13px !important;
        line-height: 1.3 !important;
    }

    /* Section heures dues compacte */
    #solidarityConfigModal .modal-body > div[style*="margin-top: 20px"] {
        margin-top: 12px !important;
        padding: 10px 12px !important;
    }

    #solidarityConfigModal .modal-body h4 {
        font-size: 14px !important;
        margin: 0 0 6px 0 !important;
    }

    #solidarityConfigModal #solidarityHoursInfo {
        font-size: 13px !important;
        line-height: 1.3 !important;
    }
}
/* ====== FIN OPTIMISATIONS SOLIDARITÉ ====== */

/* ====== OPTIMISATIONS LEAVEPÉRIODBMODAL MOBILE ====== */
/* Première implémentation mobile pour cette modale */

/* RESPONSIVE - MOBILE (<768px) - STYLE CARD MODERNE */
@media (max-width: 768px) {
    #leavePeriodModal {
        padding: 10px !important;
        align-items: flex-start !important;
        padding-top: 20px !important;
    }

    #leavePeriodModal .modal-content {
        width: calc(100vw - 20px) !important;
        max-width: none !important;
        height: auto !important;
        max-height: calc(100vh - 40px) !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    }

    #leavePeriodModal .modal-header {
        padding: 12px 20px !important;
        border-radius: 12px 12px 0 0 !important;
    }

    #leavePeriodModal .modal-header h2 {
        font-size: 1.3rem !important;
        font-weight: 600 !important;
    }

    #leavePeriodModal .close-modal {
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
        border-radius: 50% !important;
        background: rgba(0, 0, 0, 0.1) !important;
        color: #666 !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
        min-height: 48px !important;
        min-width: 48px !important;
    }

    #leavePeriodModal .close-modal:hover,
    #leavePeriodModal .close-modal:active {
        background: rgba(0, 0, 0, 0.15) !important;
        color: #333 !important;
        transform: scale(1.05) !important;
        border-color: rgba(0, 0, 0, 0.2) !important;
    }

    /* Body principal avec scroll optimisé */
    #leavePeriodModal .modal-content > div:not(.modal-header):not(.modal-actions) {
        padding: 16px 20px !important;
        padding-bottom: 8px !important;
        overflow-y: auto !important;
    }

    /* Bloc employé compact */
    #leavePeriodModal #employeeNameHeader {
        padding: 8px 12px !important;
        font-size: 15px !important;
        margin-bottom: 8px !important;
        border-radius: 8px !important;
    }

    /* TRANSFORMATION RÉSUMÉ STATISTIQUES : VERTICAL CARDS (actuel) */
    /* Container principal du résumé - OVERRIDE STYLES INLINE - SPÉCIFICITÉ MAXIMALE */
    #leavePeriodModal#leavePeriodModal div[style*="background: #E3F2FD"][style*="display: flex"][style*="justify-content: space-around"] {
        flex-direction: column !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        text-align: left !important;
        padding: 12px !important;
        align-items: stretch !important;
        display: flex !important;
        flex: 1 !important;
        height: auto !important;
        max-height: none !important;
        min-height: auto !important;
    }

    /* ALTERNATIVE : 3 COLONNES HORIZONTAL COMPACT (remplacer le code ci-dessus par celui-ci si préféré) */
    /*
    #leavePeriodModal div[style*="background: #E3F2FD"] {
        flex-direction: row !important;
        gap: 8px !important;
        text-align: center !important;
        padding: 12px 8px !important;
        align-items: stretch !important;
    }

    #leavePeriodModal div[style*="background: #E3F2FD"] > div {
        flex: 1 !important;
        padding: 10px 6px !important;
        border-radius: 6px !important;
        background: white !important;
        border: 1px solid #e0e0e0 !important;
        min-height: 65px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    #leavePeriodModal div[style*="background: #E3F2FD"] > div:first-child {
        border-top: 3px solid #1976D2 !important;
        background: #f8fffe !important;
    }

    #leavePeriodModal div[style*="background: #E3F2FD"] > div:nth-child(2) {
        border-top: 3px solid #FF9800 !important;
    }

    #leavePeriodModal div[style*="background: #E3F2FD"] > div:nth-child(3) {
        border-top: 3px solid #4CAF50 !important;
    }

    #leavePeriodModal #totalBalance { font-size: 18px !important; }
    #leavePeriodModal #n1Balance, #nBalance { font-size: 16px !important; }

    #leavePeriodModal div[style*="font-size: 24px"] + div,
    #leavePeriodModal div[style*="font-size: 20px"] + div {
        font-size: 12px !important;
        margin-top: 4px !important;
        line-height: 1.2 !important;
    }
    */

    /* Cards individuelles pour chaque statistique - ciblage précis */
    #leavePeriodModal#leavePeriodModal div[style*="background: #E3F2FD"][style*="display: flex"] > div {
        border: 1px solid #e0e0e0 !important;
        border-radius: 8px !important;
        padding: 16px 14px !important;
        border-left: 4px solid #1976D2 !important;
        text-align: left !important;
        background: white !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
        min-height: 70px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    /* Première card (Solde total) - MISE EN AVANT SPÉCIALE */
    #leavePeriodModal#leavePeriodModal div[style*="background: #E3F2FD"][style*="display: flex"] > div:first-child {
        border-left-color: #1976D2 !important;
        background: linear-gradient(135deg, #f8fffe 0%, #e3f2fd 100%) !important;
        border: 2px solid #1976D2 !important;
        min-height: 85px !important;
        box-shadow: 0 4px 8px rgba(25, 118, 210, 0.15) !important;
    }

    /* Deuxième card (Période N-1) - couleur orange */
    #leavePeriodModal#leavePeriodModal div[style*="background: #E3F2FD"][style*="display: flex"] > div:nth-child(2) {
        border-left-color: #FF9800 !important;
    }

    /* Troisième card (Période N) - couleur verte */
    #leavePeriodModal#leavePeriodModal div[style*="background: #E3F2FD"][style*="display: flex"] > div:nth-child(3) {
        border-left-color: #4CAF50 !important;
    }

    /* Ciblage précis des nombres de jours */
    #leavePeriodModal #totalBalance {
        font-size: 22px !important;
        font-weight: bold !important;
    }

    #leavePeriodModal #n1Balance,
    #leavePeriodModal #nBalance {
        font-size: 20px !important;
        font-weight: 600 !important;
    }

    /* Ciblage précis des labels sous les chiffres */
    #leavePeriodModal div[style*="font-size: 24px"] + div,
    #leavePeriodModal div[style*="font-size: 20px"] + div {
        font-size: 14px !important;
        margin-top: 6px !important;
        font-weight: 500 !important;
    }

    /* Suppression des bordures gauches d'origine sur mobile */
    #leavePeriodModal div[style*="border-left: 2px solid #1976D2"][style*="padding-left: 20px"] {
        border-left: none !important;
        padding-left: 0 !important;
    }

    /* Container des chiffres - harmonisation */
    #leavePeriodModal div[style*="font-size: 24px"],
    #leavePeriodModal div[style*="font-size: 20px"] {
        display: flex !important;
        align-items: baseline !important;
        gap: 4px !important;
    }

    /* Section détails périodes */
    #leavePeriodModal #periodsDetail {
        gap: 12px !important;
    }

    /* Section légende optimisée pour mobile */
    #leavePeriodModal details {
        margin: 12px 0 !important;
    }

    #leavePeriodModal details summary {
        padding: 12px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        border-radius: 8px !important;
        background: rgba(0, 0, 0, 0.02) !important;
    }

    #leavePeriodModal details summary span {
        font-size: 14px !important;
        margin-right: 8px !important;
    }

    #leavePeriodModal details ul {
        font-size: 14px !important;
        line-height: 1.4 !important;
        padding: 12px 16px !important;
        margin: 8px 0 0 0 !important;
    }

    #leavePeriodModal details li {
        margin-bottom: 8px !important;
    }

    /* Animation flèche plus visible */
    #leavePeriodModal details[open] summary span {
        transform: rotate(90deg) !important;
        color: #1976D2 !important;
        transition: transform 0.2s ease !important;
    }

    /* Actions en colonne */
    #leavePeriodModal .modal-actions {
        padding: 8px 20px !important;
        flex-direction: column-reverse !important;
        gap: 8px !important;
        background: #f8f9fa !important;
        border-top: 1px solid #e9ecef !important;
        border-radius: 0 0 12px 12px !important;
    }

    #leavePeriodModal .btn {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        min-height: 48px !important;
    }

    /* Hover adapté mobile (dispositifs avec hover) */
    @media (hover: hover) {
        #leavePeriodModal details summary:hover {
            background: rgba(25, 118, 210, 0.1) !important;
        }
    }
}
/* ====== FIN OPTIMISATIONS LEAVEPÉRIODMODAL MOBILE ====== */

/* ====== OPTIMISATIONS LEAVEADJUSTMENTMODAL MOBILE ====== */
/* Première implémentation mobile pour cette modale formulaire complexe */

/* RESPONSIVE - MOBILE (<768px) - STYLE CARD MODERNE */
@media (max-width: 768px) {
    #leaveAdjustmentModal {
        padding: 10px !important;
        align-items: flex-start !important;
        padding-top: 20px !important;
    }

    #leaveAdjustmentModal .modal-content {
        width: calc(100vw - 20px) !important;
        max-width: none !important;
        height: auto !important;
        max-height: calc(100vh - 40px) !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    }

    #leaveAdjustmentModal .modal-header {
        padding: 12px 20px !important;
        border-radius: 12px 12px 0 0 !important;
    }

    #leaveAdjustmentModal .modal-header h2 {
        font-size: 1.3rem !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        overflow: hidden !important;
    }

    /* TITRE MULTI-LIGNE COMPACT */
    #leaveAdjustmentModal .modal-title small {
        display: block !important;
        font-size: 12px !important;
        margin-top: 2px !important;
        font-weight: 400 !important;
        opacity: 0.9 !important;
    }

    #leaveAdjustmentModal .close-modal {
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
        border-radius: 50% !important;
        background: rgba(156, 39, 176, 0.2) !important;
        color: white !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
        min-height: 48px !important;
        min-width: 48px !important;
    }

    #leaveAdjustmentModal .close-modal:hover,
    #leaveAdjustmentModal .close-modal:active {
        background: rgba(156, 39, 176, 0.3) !important;
        transform: scale(1.05) !important;
    }

    #leaveAdjustmentModal .modal-body {
        padding: 16px 20px !important;
        padding-bottom: 8px !important;
        flex: 1 !important;
        overflow-y: auto !important;
    }

    /* TRANSFORMATION LAYOUT COLONNES → STACK VERTICAL - OVERRIDE STYLES INLINE */
    #leaveAdjustmentModal#leaveAdjustmentModal .row[style*="display: flex"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        margin-bottom: 12px !important;
    }

    #leaveAdjustmentModal#leaveAdjustmentModal .col[style*="flex: 1"] {
        width: 100% !important;
        margin-bottom: 0 !important;
        flex: none !important;
    }

    /* CORRECTION GRIDS → STACK VERTICAL FORCÉ */
    #leaveAdjustmentModal div[style*="display: grid"],
    #leaveAdjustmentModal div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        grid-template-columns: none !important;
    }

    /* CARDS DONNÉES FULL-WIDTH OVERRIDE */
    #leaveAdjustmentModal div[style*="grid-template-columns"] > div,
    #leaveAdjustmentModal div[style*="display: grid"] > div {
        width: 100% !important;
        min-width: auto !important;
        flex: none !important;
        margin-bottom: 6px !important;
    }

    /* BLOCS INFO COMPACTS - OVERRIDE STYLES INLINE */
    #leaveAdjustmentModal #currentLeaveInfo[style*="padding: 15px"] {
        padding: 10px !important;
        margin-bottom: 12px !important;
        border-radius: 8px !important;
    }

    #leaveAdjustmentModal #adjustmentPreview[style*="padding: 15px"] {
        padding: 10px !important;
        margin-bottom: 12px !important;
        border-radius: 8px !important;
    }

    /* ESPACEMENTS STANDARDS DOCUMENTATION MOBILE - OVERRIDE INLINE STYLES */
    #leaveAdjustmentModal div[style*="padding: 15px"] {
        padding: 12px 16px !important;
    }

    #leaveAdjustmentModal div[style*="gap: 15px"] {
        gap: 12px !important;
    }

    #leaveAdjustmentModal div[style*="gap: 20px"] {
        gap: 12px !important;
    }

    #leaveAdjustmentModal div[style*="margin-bottom: 20px"] {
        margin-bottom: 18px !important;
    }

    #leaveAdjustmentModal div[style*="margin-bottom: 15px"] {
        margin-bottom: 18px !important;
    }

    /* OVERRIDE STYLES INLINE AVEC STANDARDS DOCUMENTATION */
    #leaveAdjustmentModal#leaveAdjustmentModal .form-group[style*="margin-bottom"] {
        margin-bottom: 18px !important;
    }

    #leaveAdjustmentModal#leaveAdjustmentModal .col[style*="flex"] {
        margin-bottom: 18px !important;
        padding: 0 !important;
    }

    /* RESTAURATION PADDING STANDARD MODAL-BODY */
    #leaveAdjustmentModal .modal-body {
        padding: 20px !important;
        padding-bottom: 12px !important;
    }

    /* SECTIONS AVEC ESPACEMENT STANDARD */
    #leaveAdjustmentModal div[style*="background-color: #f8f9fa"] {
        padding: 12px 16px !important;
        margin: 16px 0 !important;
        border-radius: 8px !important;
    }

    /* TITRES AVEC ESPACEMENTS STANDARDS */
    #leaveAdjustmentModal h4[style*="color"],
    #leaveAdjustmentModal h5[style*="color"] {
        font-size: 1.1rem !important;
        margin: 0 0 12px 0 !important;
        padding: 0 !important;
        line-height: 1.3 !important;
        color: inherit !important;
    }

    /* FORM GROUPS STANDARDS DOCUMENTATION */
    #leaveAdjustmentModal .form-group {
        margin-bottom: 18px !important;
    }

    #leaveAdjustmentModal .form-group label {
        font-size: 15px !important;
        margin-bottom: 6px !important;
        font-weight: 600 !important;
        display: block !important;
    }

    /* SMALL TEXT AVEC ESPACEMENT */
    #leaveAdjustmentModal .form-text,
    #leaveAdjustmentModal small {
        margin-top: 6px !important;
        margin-bottom: 8px !important;
        display: block !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
    }

    /* HEADERS AVEC STANDARDS DOCUMENTATION - OVERRIDE INLINE STYLES */
    #leaveAdjustmentModal h4[style*="margin"],
    #leaveAdjustmentModal h5[style*="margin"] {
        font-size: 1.1rem !important;
        margin: 0 0 12px 0 !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
    }

    #leaveAdjustmentModal h4,
    #leaveAdjustmentModal h5 {
        font-size: 1.1rem !important;
        margin-bottom: 12px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
    }

    /* OVERRIDE SPÉCIFIQUE POUR LES ÉLÉMENTS QUI SE CHEVAUCHENT */
    #leaveAdjustmentModal .col {
        padding: 8px !important;
        margin-bottom: 18px !important;
        flex: none !important;
        width: 100% !important;
    }

    /* ESPACEMENT SPÉCIFIQUE POUR LES SMALL ELEMENTS */
    #leaveAdjustmentModal .form-group small.form-text {
        margin-top: 8px !important;
        margin-bottom: 12px !important;
        padding-top: 4px !important;
        clear: both !important;
        display: block !important;
    }

    /* SÉLECTEURS PRÉCIS BASÉS SUR HTML RÉEL GÉNÉRÉ */

    /* GRID CARDS → FLEX COLUMN FORCÉ */
    #leaveAdjustmentModal div[style*="grid-template-columns: repeat(auto-fit, minmax(180px, 1fr))"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        grid-template-columns: none !important;
    }

    /* ROW FLEX → STACK VERTICAL */
    #leaveAdjustmentModal .row[style*="display: flex; gap: 20px"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        margin-bottom: 20px !important;
    }

    /* H5 TITRES AVEC COULEUR - MATCH EXACT */
    #leaveAdjustmentModal h5[style*="color: #4caf50; margin-bottom: 15px"] {
        margin-bottom: 20px !important;
        font-size: 1.1rem !important;
        display: block !important;
    }

    #leaveAdjustmentModal h5[style*="color: #f44336; margin-bottom: 15px"] {
        margin-bottom: 20px !important;
        font-size: 1.1rem !important;
        display: block !important;
    }

    /* SECTIONS BACKGROUND - MATCH EXACT */
    #leaveAdjustmentModal div[style*="background: #f8f9fa; padding: 15px"] {
        padding: 12px 16px !important;
        margin-bottom: 20px !important;
    }

    #leaveAdjustmentModal div[style*="background: #e8f5e9; padding: 15px"] {
        padding: 12px 16px !important;
        margin-bottom: 20px !important;
    }

    /* FORM GROUPS AVEC STYLES INLINE - MATCH EXACT */
    #leaveAdjustmentModal .form-group[style*="margin-bottom: 15px"] {
        margin-bottom: 18px !important;
    }

    /* COLONNES COL - FORCE FULL WIDTH */
    #leaveAdjustmentModal .col[style*="flex: 1"] {
        flex: none !important;
        width: 100% !important;
        margin-bottom: 16px !important;
    }

    /* SMALL TEXT SPACING */
    #leaveAdjustmentModal small.form-text.text-muted {
        margin-top: 8px !important;
        margin-bottom: 16px !important;
        display: block !important;
        clear: both !important;
    }

    /* CARDS DONNÉES - FORCE POSITIONNEMENT CORRECT */
    #leaveAdjustmentModal div[style*="text-align: center; padding: 10px; background: white"] {
        position: relative !important;
        z-index: 1 !important;
        margin-bottom: 12px !important;
        display: block !important;
        width: 100% !important;
        clear: both !important;
    }

    /* SECTION ACTUELLE - FORCE SPACING APRÈS */
    #leaveAdjustmentModal #currentLeaveInfo {
        margin-bottom: 30px !important;
        position: relative !important;
        z-index: 1 !important;
        clear: both !important;
    }

    /* FORMULAIRE - FORCE POSITION APRÈS LES CARDS */
    #leaveAdjustmentModal form {
        position: relative !important;
        z-index: 2 !important;
        margin-top: 30px !important;
        clear: both !important;
        display: block !important;
    }

    /* GRID CONTAINER - FORCE CLEAR ET SPACING */
    #leaveAdjustmentModal div[style*="grid-template-columns"] {
        margin-bottom: 20px !important;
        clear: both !important;
        overflow: visible !important;
    }

    /* ÉLIMINATION COMPLÈTE DES CONFLITS DE POSITIONNEMENT */

    /* RESET POSITION POUR ÉVITER CONTEXTES D'EMPILEMENT */
    #leaveAdjustmentModal .form-group,
    #leaveAdjustmentModal label,
    #leaveAdjustmentModal input,
    #leaveAdjustmentModal small {
        position: static !important;
        z-index: auto !important;
        float: none !important;
        transform: none !important;
    }

    /* STRUCTURE VERTICALE PURE - SANS POSITION */
    #leaveAdjustmentModal .form-group {
        display: block !important;
        margin-bottom: 20px !important;
        clear: both !important;
        overflow: visible !important;
        background: transparent !important;
    }

    #leaveAdjustmentModal label {
        display: block !important;
        margin-bottom: 8px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        line-height: 1.4 !important;
    }

    #leaveAdjustmentModal input {
        display: block !important;
        width: 100% !important;
        margin-bottom: 8px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
    }

    #leaveAdjustmentModal small {
        display: block !important;
        margin-top: 4px !important;
        margin-bottom: 12px !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
    }

    /* RESET COMPLET USER AGENT STYLESHEET POUR ÉVITER CONFLITS */
    #leaveAdjustmentModal h1,
    #leaveAdjustmentModal h2,
    #leaveAdjustmentModal h3,
    #leaveAdjustmentModal h4,
    #leaveAdjustmentModal h5,
    #leaveAdjustmentModal h6 {
        margin-block-start: 0 !important;
        margin-block-end: 0 !important;
        margin-inline-start: 0 !important;
        margin-inline-end: 0 !important;
        margin: 0 !important;
    }

    /* FORCE CLEAR ENTRE SECTIONS POUR ÉVITER CHEVAUCHEMENT */
    #leaveAdjustmentModal div[style*="background"] + div,
    #leaveAdjustmentModal div[style*="background"] + .row {
        margin-top: 24px !important;
        clear: both !important;
        display: block !important;
    }

    /* INPUTS MOBILE-FRIENDLY */
    #leaveAdjustmentModal input,
    #leaveAdjustmentModal textarea,
    #leaveAdjustmentModal select {
        padding: 12px 16px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        width: 100% !important;
        border: 1px solid #ddd !important;
    }

    #leaveAdjustmentModal input:focus,
    #leaveAdjustmentModal textarea:focus,
    #leaveAdjustmentModal select:focus {
        border-color: #9c27b0 !important;
        box-shadow: 0 0 0 2px rgba(156, 39, 176, 0.1) !important;
        outline: none !important;
    }

    /* LABELS OPTIMISÉS */
    #leaveAdjustmentModal label {
        font-size: 15px !important;
        font-weight: 600 !important;
        margin-bottom: 6px !important;
        display: block !important;
    }

    /* CARDS DE DONNÉES MOBILES */
    #leaveAdjustmentModal #currentLeaveDetails div[style*="background: white"] {
        padding: 12px !important;
        margin-bottom: 8px !important;
        border-radius: 8px !important;
        border: 1px solid #f0f0f0 !important;
    }

    /* ACTIONS EMPILÉES */
    #leaveAdjustmentModal .modal-actions {
        padding: 8px 20px !important;
        flex-direction: column-reverse !important;
        gap: 8px !important;
        background: #f8f9fa !important;
        border-top: 1px solid #e9ecef !important;
        border-radius: 0 0 12px 12px !important;
    }

    #leaveAdjustmentModal .btn,
    #leaveAdjustmentModal button {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        min-height: 48px !important;
        border: none !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    /* Bouton principal (submit) */
    #leaveAdjustmentModal button[type="submit"] {
        background: #9c27b0 !important;
        color: white !important;
    }

    #leaveAdjustmentModal button[type="submit"]:hover {
        background: #8e24aa !important;
        transform: translateY(-1px) !important;
    }

    /* Bouton secondaire */
    #leaveAdjustmentModal .btn-secondary,
    #leaveAdjustmentModal button:not([type="submit"]) {
        background: #f5f5f5 !important;
        color: #666 !important;
        border: 1px solid #e0e0e0 !important;
    }

    /* FORM GROUPS OPTIMISÉS */
    #leaveAdjustmentModal .form-group {
        margin-bottom: 16px !important;
    }

    /* TEXTAREA SPÉCIFIQUE */
    #leaveAdjustmentModal textarea {
        min-height: 80px !important;
        resize: vertical !important;
    }

    /* COMPTEURS DE CARACTÈRES */
    #leaveAdjustmentModal .char-counter {
        font-size: 13px !important;
        color: #666 !important;
        text-align: right !important;
        margin-top: 4px !important;
    }

    /* MESSAGES DE VALIDATION */
    #leaveAdjustmentModal .validation-message {
        font-size: 13px !important;
        margin-top: 4px !important;
        padding: 4px 8px !important;
        border-radius: 4px !important;
    }

    #leaveAdjustmentModal .validation-error {
        background: #ffebee !important;
        color: #c62828 !important;
        border-left: 3px solid #f44336 !important;
    }

    #leaveAdjustmentModal .validation-success {
        background: #e8f5e8 !important;
        color: #2e7d32 !important;
        border-left: 3px solid #4caf50 !important;
    }
}
/* ====== FIN OPTIMISATIONS LEAVEADJUSTMENTMODAL MOBILE ====== */

/* ====== CSS MODAL MOBILE DÉDIÉE - LEAVEADJUSTMENTMODALMOBILE ====== */

/* DESKTOP : Masquer modal mobile */
@media (min-width: 1000px) {
    #leaveAdjustmentModalMobile {
        display: none !important;
    }
}

/* MOBILE/TABLET : ≤ 999px - Afficher modal mobile, masquer desktop */
@media (max-width: 999px) {
    #leaveAdjustmentModal {
        display: none !important;
    }

    /* MODAL MOBILE - CARD MODERNE SELON DOCUMENTATION */
    #leaveAdjustmentModalMobile {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: flex-start;
        justify-content: center;
        z-index: 1001;
        padding: 10px;
        padding-top: 20px;
    }

    #leaveAdjustmentModalMobile .modal-content {
        width: calc(100vw - 20px);
        max-width: none;
        height: auto;
        max-height: calc(100vh - 40px);
        margin: 0 auto;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        background: white;
        display: flex;
        flex-direction: column;
    }

    /* HEADER */
    #leaveAdjustmentModalMobile .modal-header {
        padding: 16px 20px;
        background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
        color: white;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
        border-radius: 12px 12px 0 0;
    }

    #leaveAdjustmentModalMobile .modal-header h2 {
        font-size: 1.3rem;
        font-weight: 600;
        margin: 0;
        line-height: 1.2;
    }

    #leaveAdjustmentModalMobile .close-modal {
        width: 40px;
        height: 40px;
        font-size: 20px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    #leaveAdjustmentModalMobile .close-modal:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.05);
    }

    /* BODY */
    #leaveAdjustmentModalMobile .modal-body {
        padding: 20px;
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* SECTION SITUATION ACTUELLE */
    #leaveAdjustmentModalMobile .current-info {
        background: #f8f9fa;
        padding: 16px;
        border-radius: 8px;
        margin-bottom: 20px;
    }

    #leaveAdjustmentModalMobile .current-info h4 {
        margin: 0 0 12px 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: #333;
    }

    /* CARDS DE DONNÉES MOBILE - STACK VERTICAL */
    #leaveAdjustmentModalMobile .data-cards-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    #leaveAdjustmentModalMobile .data-card {
        background: white;
        padding: 12px;
        border-radius: 8px;
        border: 1px solid #e0e0e0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #leaveAdjustmentModalMobile .data-card .value {
        font-size: 1.4rem;
        font-weight: bold;
        color: #4caf50;
    }

    #leaveAdjustmentModalMobile .data-card:nth-child(2) .value {
        color: #f44336;
    }

    #leaveAdjustmentModalMobile .data-card .label {
        font-size: 14px;
        color: #666;
    }

    /* SECTIONS FORMULAIRE */
    #leaveAdjustmentModalMobile .form-section {
        margin-bottom: 24px;
        padding: 16px;
        background: #f8f9fa;
        border-radius: 8px;
    }

    #leaveAdjustmentModalMobile .form-section h5 {
        margin: 0 0 16px 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: #333;
    }

    /* FORM GROUPS */
    #leaveAdjustmentModalMobile .form-group {
        margin-bottom: 18px;
    }

    #leaveAdjustmentModalMobile .form-group label {
        display: block;
        margin-bottom: 6px;
        font-size: 15px;
        font-weight: 600;
        color: #333;
    }

    #leaveAdjustmentModalMobile .form-group input {
        width: 100%;
        padding: 14px 16px;
        font-size: 16px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        background: white;
        transition: all 0.2s ease;
        box-sizing: border-box;
    }

    #leaveAdjustmentModalMobile .form-group input:focus {
        outline: none;
        border-color: #9c27b0;
        box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.1);
    }

    #leaveAdjustmentModalMobile .form-group small {
        display: block;
        margin-top: 6px;
        font-size: 13px;
        color: #666;
        line-height: 1.4;
    }

    /* ACTIONS */
    #leaveAdjustmentModalMobile .modal-actions {
        padding: 16px 20px;
        background: #f8f9fa;
        border-top: 1px solid #e9ecef;
        border-radius: 0 0 12px 12px;
        display: flex;
        flex-direction: column-reverse;
        gap: 12px;
    }

    #leaveAdjustmentModalMobile .modal-actions button {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 8px;
        font-weight: 600;
        min-height: 48px;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    #leaveAdjustmentModalMobile .modal-actions button[type="submit"] {
        background: #9c27b0;
        color: white;
    }

    #leaveAdjustmentModalMobile .modal-actions button[type="submit"]:hover {
        background: #8e24aa;
        transform: translateY(-1px);
    }

    #leaveAdjustmentModalMobile .modal-actions button[type="button"] {
        background: #f5f5f5;
        color: #666;
        border: 1px solid #e0e0e0;
    }

    #leaveAdjustmentModalMobile .modal-actions button[type="button"]:hover {
        background: #e8e8e8;
    }
}

/* ====== FIN CSS MODAL MOBILE DÉDIÉE ====== */

/* ====== OPTIMISATIONS EMPLOYEE MANAGEMENT MODAL ====== */

/* 1. MODAL CENTERING - Centrage conditionnel pour éviter conflits JS */
#employeeManagementModal:not([style*="display: none"]) {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Bug prevention - Force none quand explicitement caché */
#employeeManagementModal[style*="display: none"] {
    display: none !important;
}

/* 2. HEADER REDUCTION - Réduction padding header */
#employeeManagementModal .employee-management-header {
    padding: 15px !important;
    margin-bottom: 15px !important;
}

/* 3. BLOCK OPTIMIZATION - Optimisation structure générale */
#employeeManagementModal .modal-content {
    max-width: 1400px !important;
    width: 95% !important;
    max-height: calc(100vh - 60px) !important;
    height: auto !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 16px !important;
}

#employeeManagementModal .employee-management-content {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 15px 15px 15px !important;
}

/* 4. FONT HIERARCHY - Hiérarchie typographique */
#employeeManagementModal .employee-management-header h2 {
    font-size: 1.6rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    margin: 0 !important;
}

#employeeManagementModal .section-title {
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    color: #34495e !important;
    margin-bottom: 10px !important;
}

#employeeManagementModal .employee-info {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
}

/* 5. FLEX PROBLEM CORRECTIONS - Actions et boutons */
#employeeManagementModal .employee-actions {
    flex: none !important;
    display: flex !important;
    gap: 8px !important;
    margin-top: 10px !important;
}

#employeeManagementModal .modal-actions {
    flex: none !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    padding: 15px !important;
    border-top: 1px solid #e9ecef !important;
    margin-top: auto !important;
}

/* 6. SPACING OPTIMIZATION - Espacement uniforme */
#employeeManagementModal .view-toggle {
    margin-bottom: 15px !important;
    padding: 8px 0 !important;
}

#employeeManagementModal .view-toggle button {
    padding: 8px 16px !important;
    margin-right: 8px !important;
    font-size: 0.9rem !important;
}

/* Table view optimizations */
#employeeManagementModal #tableView {
    overflow: auto !important;
    flex: 1 1 auto !important;
}

#employeeManagementModal #tableView table {
    margin-bottom: 0 !important;
}

#employeeManagementModal #tableView th {
    padding: 8px 12px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
}

#employeeManagementModal #tableView td {
    padding: 10px 12px !important;
    font-size: 0.9rem !important;
    vertical-align: middle !important;
}

/* Cards view optimizations */
#employeeManagementModal #cardsView {
    overflow: auto !important;
    flex: 1 1 auto !important;
    padding: 5px !important;
}

#employeeManagementModal .employee-card {
    margin-bottom: 12px !important;
    padding: 15px !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    background: #ffffff !important;
}

#employeeManagementModal .employee-card-header {
    margin-bottom: 10px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #f1f3f4 !important;
}

#employeeManagementModal .employee-card-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

/* 7. UNIFORM RESPONSIVE - Adaptation écrans */
@media (max-width: 1200px) {
    #employeeManagementModal .modal-content {
        max-width: 95% !important;
        margin: 20px !important;
    }

    #employeeManagementModal .employee-management-header {
        padding: 12px !important;
    }

    #employeeManagementModal .employee-management-content {
        padding: 0 12px 12px 12px !important;
    }
}

@media (max-width: 768px) {
    #employeeManagementModal .modal-content {
        max-width: 98% !important;
        margin: 10px !important;
        max-height: calc(100vh - 20px) !important;
    }

    #employeeManagementModal .employee-management-header {
        padding: 10px !important;
    }

    #employeeManagementModal .employee-management-header h2 {
        font-size: 1.4rem !important;
    }

    #employeeManagementModal .employee-management-content {
        padding: 0 10px 10px 10px !important;
    }

    /* Table responsive */
    #employeeManagementModal #tableView {
        overflow-x: auto !important;
    }

    #employeeManagementModal #tableView table {
        min-width: 600px !important;
    }

    #employeeManagementModal #tableView th,
    #employeeManagementModal #tableView td {
        padding: 6px 8px !important;
        font-size: 0.85rem !important;
    }

    /* Cards mobile optimization */
    #employeeManagementModal .employee-card {
        padding: 12px !important;
        margin-bottom: 10px !important;
    }

    #employeeManagementModal .employee-actions {
        flex-direction: column !important;
        gap: 6px !important;
    }

    #employeeManagementModal .modal-actions {
        padding: 10px !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    #employeeManagementModal .modal-content {
        margin: 5px !important;
        max-height: calc(100vh - 10px) !important;
    }

    #employeeManagementModal .employee-management-header h2 {
        font-size: 1.3rem !important;
    }

    #employeeManagementModal .view-toggle button {
        padding: 6px 12px !important;
        font-size: 0.85rem !important;
    }
}

/* 8. AVOID FORCED DISPLAY FLEX - Protection contre bugs fermeture */
#employeeManagementModal.modal-closing {
    display: none !important;
}

/* ====== EMPLOYEEPOOL MODAL ARRONDIS ====== */
#employeePoolModal .modal-content {
    border-radius: 16px !important;
}

/* ====== DATEPICKER MODAL FIX FLASH ====== */
#datePickerModal.closing {
    animation: none !important;
    opacity: 0 !important;
    transition: opacity 0.15s ease !important;
}

#employeeManagementModal[data-closing="true"] {
    display: none !important;
}

/* States visuels améliorés */
#employeeManagementModal .employee-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transform: translateY(-1px) !important;
    transition: all 0.2s ease !important;
}

#employeeManagementModal .view-toggle button.active {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

#employeeManagementModal .view-toggle button:not(.active) {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
}

#employeeManagementModal .view-toggle button:hover:not(.active) {
    background-color: #e9ecef !important;
    border-color: #adb5bd !important;
}

/* Optimisation boutons d'action */
#employeeManagementModal .employee-actions button {
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

#employeeManagementModal .btn-remove {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

#employeeManagementModal .btn-remove:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

#employeeManagementModal .btn-view {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

#employeeManagementModal .btn-view:hover {
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
}

/* ====== FIN OPTIMISATIONS EMPLOYEE MANAGEMENT ====== */

/* ====== OPTIMISATIONS EMPLOYEE FORM MODAL TAILLE ====== */

/* Fix priorité - Override des styles généraux pour employeeFormModal */
#employeeFormModal .modal-content {
    max-width: 550px !important;
    width: 95% !important;
    max-height: 85vh !important;
    margin: 30px auto !important;
    padding: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
}

#employeeFormModal .modal-header {
    padding: 20px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 12px 12px 0 0 !important;
    color: white !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

#employeeFormModal .modal-header h2 {
    margin: 0 !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    color: white !important;
}

#employeeFormModal .close-modal {
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    color: white !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    font-size: 20px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    font-weight: bold !important;
}

#employeeFormModal .close-modal:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: scale(1.05) !important;
}

#employeeFormModal .modal-body {
    padding: 24px !important;
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#employeeFormModal .form-group {
    margin-bottom: 16px !important;
}

#employeeFormModal .form-group input,
#employeeFormModal .form-group select {
    padding: 12px 14px !important;
    font-size: 15px !important;
    border-radius: 6px !important;
}

#employeeFormModal .modal-actions {
    padding: 18px 24px !important;
}

#employeeFormModal .btn {
    padding: 10px 20px !important;
    font-size: 15px !important;
    border-radius: 6px !important;
    min-width: 100px !important;
}

/* Responsive override - Style Card moderne mobile */
@media (max-width: 768px) {
    #employeeFormModal {
        padding: 10px !important;
        align-items: flex-start !important;
        padding-top: 20px !important;
    }

    #employeeFormModal .modal-content {
        width: calc(100vw - 20px) !important;
        max-width: none !important;
        height: auto !important;
        max-height: calc(100vh - 40px) !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    }

    #employeeFormModal .modal-header {
        padding: 12px 20px !important;
    }

    #employeeFormModal .modal-header h2 {
        font-size: 1.3rem !important;
    }

    #employeeFormModal .close-modal {
        width: 32px !important;
        height: 32px !important;
        font-size: 18px !important;
    }

    #employeeFormModal .modal-body {
        padding: 16px 20px !important;
        padding-bottom: 6px !important;
        flex: 1 !important;
        overflow-y: auto !important;
    }

    #employeeFormModal .form-group {
        margin-bottom: 16px !important;
    }

    /* Réduction espace section magasins - dernier form-group */
    #employeeFormModal .form-group:has(#empStores) {
        margin-bottom: 0 !important;
    }

    #employeeFormModal .form-group label {
        font-size: 15px !important;
        margin-bottom: 4px !important;
    }

    #employeeFormModal .form-group input,
    #employeeFormModal .form-group select {
        padding: 12px 16px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
    }

    #employeeFormModal .modal-actions {
        padding: 4px 20px !important;
        padding-top: 2px !important;
        flex-direction: column-reverse !important;
        gap: 6px !important;
        background: #f8f9fa !important;
        border-top: 1px solid #e9ecef !important;
    }

    #employeeFormModal .btn {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
    }

    /* Optimisation section magasins pour mobile - Override styles inline */
    #employeeFormModal #empStores {
        max-height: 180px !important;
        border-radius: 8px !important;
        margin-bottom: 0 !important;
        padding-bottom: 4px !important;
    }

    #employeeFormModal #empStores label {
        padding: 6px 12px !important;
        font-size: 15px !important;
        margin: 0 !important;
        margin-bottom: 2px !important;
    }

    #employeeFormModal #empStores label:last-child {
        margin-bottom: 0 !important;
        padding-bottom: 6px !important;
    }

    #empStores input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
    }
}

/* ====== FIN OPTIMISATIONS EMPLOYEE FORM MODAL ====== */


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

.close-modal {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

.time-inputs {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.time-input-group {
    flex: 1;
}

.time-input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.time-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.preset-btn {
    padding: 10px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.preset-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.preset-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.hours-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

.break-notice {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #1565c0;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Vue employé */
.employee-view {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.employee-week-header {
    text-align: center;
    margin-bottom: 15px;
}

.employee-week-header h2 {
    margin: 10px 0 5px 0;
    font-size: 28px;
    color: #333;
}

.employee-week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.day-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.day-card h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.day-card .shift-time {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.day-card .break-time {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.day-card .hours {
    font-size: 14px;
    color: #888;
}

.day-card.repos {
    background: #fff3cd;
}

.week-summary {
    background: #667eea;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.week-summary h3 {
    margin-bottom: 10px;
}

.week-summary .total-hours {
    font-size: 36px;
    font-weight: bold;
}

/* ========== SÉLECTEUR MAGASIN EMPLOYÉ ========== */
.store-selector-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
}

.store-selector-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.store-selector-header h3 {
    margin: 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.store-select {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #495057;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    cursor: pointer;
}

.store-select:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.store-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.store-planning-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #dee2e6;
    min-height: 400px;
}

.store-planning-content {
    width: 100%;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .store-selector-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .store-select {
        width: 100%;
        min-width: unset;
    }

    .store-selector-container {
        padding: 15px;
        margin: 15px 0;
    }

    .store-planning-container {
        padding: 15px;
        margin-top: 15px;
    }
}

/* ========== PLANNING MAGASIN EMPLOYÉ - CALENDRIER ========== */
.store-planning-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

.store-planning-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 20px;
    font-weight: 600;
}

.store-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.store-calendar .calendar-header {
    display: contents;
}

.store-calendar .day-name {
    background-color: #667eea;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.store-calendar .calendar-day {
    background-color: white;
    min-height: 120px;
    padding: 8px;
    display: flex;
    flex-direction: column;
}

.store-calendar .calendar-day.empty {
    background-color: #f8f9fa;
    min-height: 60px;
}

.store-calendar .calendar-day.weekend {
    background-color: #f8f9fa;
}

.store-calendar .day-number {
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    margin-bottom: 8px;
    text-align: center;
}

.store-calendar .day-shifts {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.store-calendar .no-shift {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 10px;
}

.store-calendar .shift-item {
    background-color: #e9ecef;
    border-radius: 4px;
    padding: 6px;
    font-size: 12px;
    border-left: 3px solid #667eea;
}

.store-calendar .employee-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 2px;
}

.store-calendar .shift-time {
    color: #667eea;
    font-weight: 500;
    margin-bottom: 2px;
}

.store-calendar .store-badge {
    background-color: #667eea;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    margin-top: 2px;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .store-calendar .calendar-day {
        min-height: 80px;
        padding: 4px;
    }

    .store-calendar .shift-item {
        padding: 4px;
        font-size: 11px;
    }

    .store-calendar .day-name {
        padding: 8px 4px;
        font-size: 12px;
    }

    .store-planning-header h3 {
        font-size: 18px;
    }
}

/* ========== BOUTONS DE RÉCUPÉRATION ========== */
.recovery-quick-btn {
    padding: 8px 16px;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 50px;
    text-align: center;
}

.recovery-quick-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.recovery-quick-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Animations pour les notifications */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Loading Skeletons */
.skeleton {
    background: #eee;
    background-image: linear-gradient(
        90deg,
        #eee 0px,
        #f5f5f5 40px,
        #eee 80px
    );
    background-size: 200px 100%;
    background-repeat: no-repeat;
    animation: skeleton-loading 1.2s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    width: 80%;
}

.skeleton-button {
    height: 40px;
    width: 100px;
    border-radius: 5px;
}

.skeleton-row {
    height: 60px;
    margin-bottom: 10px;
    border-radius: 8px;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Boutons desktop only */
.desktop-only-btn {
    display: inline-block;
}

/* Le bouton de gestion des managers doit rester caché par défaut */
#managerManagementBtn {
    display: none !important;
}



/* SUPPRIMÉ - sera déplacé à la fin du fichier pour avoir la priorité */

/* Responsive pour petits écrans */
@media (max-width: 480px) {
    /* Header ultra compact aux très petits écrans */
    .header {
        padding: 2px 5px !important;
    }
    
    /* Planning ultra compact pour très petits écrans */
    .planning-table th {
        font-size: 9px !important;
        padding: 3px 1px !important;
    }
    
    /* Garder les jours visibles mais plus petits sur mobile */
    .planning-table th:not(:first-child) {
        font-size: 9px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .planning-table td {
        padding: 1px !important;
        height: 40px !important;
    }
    
    .shift-display {
        font-size: 8px !important;
        padding: 1px 2px !important;
        border-radius: 2px;
    }
    
    /* Afficher uniquement l'heure sans les minutes si identiques */
    .shift-hours {
        font-size: 8px !important;
        letter-spacing: -0.5px;
    }
    
    .employee-info {
        font-size: 9px !important;
        min-width: 50px !important;
        width: 50px !important;
        padding: 2px !important;
    }
    
    .header-content {
        flex-wrap: nowrap !important;
        gap: 5px !important;
        align-items: center !important;
    }

    /* Commenté car conflit avec media query 414px pour iPhone
    .header h1 {
        font-size: 14px !important;
        flex: 1 !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    } */
    /* Garder uniquement les propriétés non conflictuelles */
    .header h1 {
        flex: 1 !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .user-info {
        flex-shrink: 0 !important;
        gap: 3px !important;
        flex-wrap: nowrap !important;
    }
    
    .user-info span {
        font-size: 12px;
    }
    
    
    .user-info .btn {
        font-size: 12px;
        padding: 6px 12px;
        min-height: 32px;
    }
    
    /* Couverture journalière */
    .daily-coverage h3 {
        font-size: 14px;
        text-align: center;
    }
    
    /* Vue unifiée responsive */
    .unified-coverage-grid {
        font-size: 13px;
    }
    
    .unified-day-headers h4 {
        font-size: 11px;
    }
    
    .unified-store-bars {
        gap: 6px;
    }
    
    .unified-day-headers {
        gap: 6px;
    }
    
    .coverage-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .day-coverage h4 {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 3px;
    }
    
    .coverage-bar {
        height: 15px;
        margin-bottom: 3px;
    }
    
    .coverage-info {
        font-size: 10px;
        line-height: 1.2;
    }
    
    .coverage-info div {
        margin: 1px 0;
    }
    
    /* Stats en une colonne */
    
}

    
    /* Fix pour les champs de date dans les modales */
#congePeriodSection {
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative;
    padding: 8px !important;
    margin: 0 !important;
}

/* S'assurer que tous les éléments enfants respectent le box-sizing */
#congePeriodSection * {
    box-sizing: border-box;
}

/* Grille responsive pour les dates de congés */
#congePeriodSection > div[style*="grid"] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 !important;
}

#congePeriodSection > div[style*="grid"] > div {
    flex: 1 1 calc(50% - 5px) !important;
    min-width: 0 !important; /* Permettre de rétrécir si nécessaire */
    max-width: calc(50% - 5px) !important;
}

/* Sur petits écrans, passer en colonne unique */
@media (max-width: 480px) {
    #congePeriodSection > div[style*="grid"] {
        grid-template-columns: 1fr !important;
    }
}

/* Form groups dans la section congés */
#congePeriodSection .form-group {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

#congePeriodSection input[type="date"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box !important;
    padding: 8px 12px !important; /* Padding normal */
    font-size: 14px !important; /* Police normale */
    border: 1px solid #ddd;
    margin: 0 !important;
}

/* Style des champs de formulaire dans les modales */
.modal-content .form-control,
.modal-content input[type="date"],
.modal-content input[type="text"],
.modal-content select {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

        justify-content: flex-end;
        flex: 1;
    }

    /* Affichage intelligent du nom utilisateur sur mobile - géré par JavaScript */
    #userDisplay {
        display: block !important;
        font-size: 12px;
        line-height: 1.2;
    }

    /* Styles pour les éléments de nom utilisateur responsive */
    .user-name {
        font-weight: 600;
        color: white;
    }

    .user-role.mobile {
        font-size: 10px;
        opacity: 0.8;
        margin-left: 2px;
    }

    .multi-store-badge.mobile {
        font-size: 10px;
        background: rgba(255, 255, 255, 0.2);
        padding: 1px 4px;
        border-radius: 8px;
        margin-left: 3px;
    }
    
    
    /* Modals plein écran sur mobile */
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100vh;
        max-width: 100% !important;
        max-height: 100vh !important;
        border-radius: 0;
        overflow: hidden; /* Pas de scroll sur le container principal */
        display: flex;
        flex-direction: column;
    }
    
    /* Header fixe sur mobile */
    .modal-content .modal-header {
        flex-shrink: 0; /* Ne se réduit jamais */
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        border-bottom: 1px solid #e0e0e0;
        padding: 15px 20px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    /* Zone de contenu scrollable sur mobile */
    .modal-content .modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 20px;
    }
    
    /* Actions fixes en bas sur mobile */
    .modal-content .modal-actions {
        flex-shrink: 0; /* Ne se réduit jamais */
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid #e0e0e0;
        padding: 15px 20px;
        box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    }
    
    /* Ajustements pour les sections du modal gestion employés */
    .modal-content .employee-management-header {
        flex-shrink: 0;
        background: white;
        padding: 15px 20px;
        border-bottom: 1px solid #e0e0e0;
        position: sticky;
        top: 70px; /* Après le modal-header */
        z-index: 9;
    }
    
    /* Container spécifique pour le formulaire employé sur mobile */
    #employeeFormContainer {
        /* Force le rendu GPU pour éviter les bugs d'affichage */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    /* Fix pour les éléments de formulaire sur mobile */
    .modal-content .form-group {
        /* Évite les problèmes de rendu lors du scroll */
        position: relative;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Fix spécifique pour le formulaire employé - DÉSACTIVÉ car géré par nouvelles optimisations */
    /* #employeeFormModal .modal-content {
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch !important;
        height: 100vh;
        max-height: 100vh;
    } */
    
    #employeeFormContainer {
        /* Assure que tout le contenu est visible */
        padding-bottom: 80px;
        min-height: 100%;
    }
    
    /* Employee info dans planning plus compact */
    .employee-info {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    /* Shift display plus compact */
    .shift-display {
        padding: 3px 6px;
        font-size: 11px;
    }
    
    .shift-hours {
        font-size: 11px;
    }

    /* Coverage grid - force 7 colonnes à partir de 1000px */
    .coverage-grid {
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 8px !important;
    }

    /* Planning Mensuel Modal - Desktop ≥1000px */
    .monthly-planning-modal {
        background-color: #fefefe !important;
        margin: 8% auto !important;
        padding: 25px !important;
        border-radius: 16px !important;
        width: 90% !important;
        max-width: 480px !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
    }

/* Planning Mensuel Modal - Mobile <1000px */
@media (max-width: 999px) {
    .monthly-planning-modal {
        background-color: #fefefe !important;
        margin: 10px auto !important;
        padding: 20px !important;
        border-radius: 12px !important;
        width: calc(100vw - 20px) !important;
        max-width: none !important;
        max-height: 92vh !important;
        overflow-y: auto !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important;
    }
}

    /* Break info plus petit */
    .break-info {
        font-size: 10px;
    }
    
    /* Boutons de contrôle responsive */
    .controls .btn {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .controls-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .progress-bar {
        width: 80px;
    }

    .coverage-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .day-coverage {
        min-width: 0;
    }
    
    .day-coverage h4 {
        font-size: 13px;
        line-height: 1.2;
        min-height: 2.4em;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0 5px;
    }
    
    /* Espacement entre éléments cliquables */
    .modal-actions {
        gap: 12px;
    }
    
    .modal-actions .btn {
        flex: 1;
    }
    
    /* Checkboxes et labels plus grands */
    input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }
    
    label {
        padding: 8px 0;
        display: flex;
        align-items: center;
    }
    
    /* Preset buttons plus grands */
    .preset-btn {
        min-height: 44px;
        font-size: 14px;
    }
    
    /* Date picker adapté au mobile */
    .calendar-navigation {
        flex-wrap: wrap;
    }
    
    .month-year-selector {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .month-year-selector select {
        font-size: 14px;
        padding: 6px 8px;
    }
    
    .calendar-day {
        font-size: 12px;
    }
    
    .week-number {
        font-size: 9px;
    }
    
    .quick-dates .btn {
        min-height: 44px;
    }
    
    /* Stats cards responsive */
}

/* Validation des formulaires */
.form-group {
    position: relative;
}

.form-group.has-error input,
.form-group.has-error select {
    border-color: #f44336;
}

.form-group.has-success input,
.form-group.has-success select {
    border-color: #4caf50;
}

.validation-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.validation-message {
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group.has-error .validation-message {
    color: #f44336;
    display: block;
}

.form-group.has-success .validation-icon {
    color: #4caf50;
}

.form-group.has-error .validation-icon {
    color: #f44336;
}

/* Styles pour la liste déroulante des absences */
#absenceType {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

#absenceType option[value="conge"] {
    background-color: #ffecb3;
    color: #f57c00;
}

#absenceType option[value="absence"] {
    background-color: #e1bee7;
    color: #6a1b9a;
}

#absenceType option[value="arret_maladie"] {
    background-color: #ffcdd2;
    color: #c62828;
}

/* Validation pour les time-input-group dans les modals */
.time-input-group {
    position: relative;
}

.time-input-group.has-error select {
    border-color: #f44336;
}

.time-input-group.has-success select {
    border-color: #4caf50;
}

.time-input-group .validation-message {
    font-size: 12px;
    margin-top: 5px;
    color: #f44336;
}

/* Employee Management Styles */
.employee-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

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

.employee-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.employee-table tr:hover {
    background-color: #f9f9f9;
}

.employee-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.employee-table button {
    padding: 6px 12px;
    margin: 0 2px;
    font-size: 14px;
}

.modal-body {
    padding: 20px;
}

#addEmployeeForm input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

#addEmployeeForm label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

/* Small buttons */
.btn-small {
    padding: 5px 10px;
    font-size: 13px;
}

/* Danger button variant */
.btn-danger {
    background-color: #dc3545;
    color: white;
}

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

/* Secondary button variant */
.btn-secondary {
    background-color: #6c757d;
    color: white;
}

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

/* Primary button variant */
.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5a67d8;
    transform: translateY(-1px);
}

/* Updated Employee Management Styles */
.employee-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.employee-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.employee-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.employee-table tr:hover {
    background: #f8f9fa;
}

/* Contract type badges */
.badge-cdi {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-cdd {
    background: #fff3cd;
    color: #f57c00;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Action buttons */
.btn-edit {
    background: #4caf50;
    padding: 6px 12px;
    font-size: 13px;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
}

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

.btn-delete {
    background: #f44336;
    padding: 6px 12px;
    font-size: 13px;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

.btn-delete:hover {
    background: #da190b;
}

/* Solde colors */
.solde-positive {
    color: #4caf50;
    font-weight: 600;
}

.solde-negative {
    color: #f44336;
    font-weight: 600;
}

.solde-zero {
    color: #666;
    font-weight: 600;
}

/* Modal improvements */
#employeeFormModal .form-group {
    margin-bottom: 15px;
}

#employeeFormModal label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

#employeeFormModal input,
#employeeFormModal select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#employeeFormModal input:focus,
#employeeFormModal select:focus {
    outline: none;
    border-color: #667eea;
}

/* Fix pour cacher complètement les modals au chargement */
#loginPage ~ .modal,
.modal[style*="display: none"] {
    display: none \!important;
    visibility: hidden \!important;
}

/* Cacher tout contenu modal qui pourrait fuiter */
.modal .modal-content,
.modal table,
.modal button {
    display: none;
}

/* Afficher uniquement quand la modal est visible */
.modal[style*="display: block"] .modal-content,
.modal[style*="display: block"] table,
.modal[style*="display: block"] button {
    display: block;
}

.modal[style*="display: block"] table {
    display: table;
}

/* Modal Planning Mensuel - Styles modernes */
#monthlyPlanningModal .close-modal:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #333 !important;
}

#monthlyPlanningModal button[onclick*="changeMonthSelection"]:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
    transform: scale(1.05);
}

#monthlyPlanningModal button[onclick*="selectCurrentMonth"]:hover {
    background: #cce5ff !important;
    border-color: #99ccff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
}

#monthlyPlanningModal button[onclick*="selectPreviousMonth"]:hover,
#monthlyPlanningModal button[onclick*="selectNextMonth"]:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#monthlyPlanningModal button[onclick*="generateMonthlyPlanning"]:hover {
    background: #45a049 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

#monthlyPlanningModal button[onclick*="closeMonthlyPlanningModal"]:hover {
    background: #5a6268 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Drag & Drop Styles */
.day-cell[draggable="true"] {
    cursor: move;
}

.day-cell[draggable="true"]:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.day-cell.dragging {
    opacity: 0.5;
    cursor: grabbing !important;
}

.day-cell.drop-target {
    background-color: #e3f2fd !important;
    border: 2px dashed #2196f3 !important;
    box-shadow: inset 0 0 10px rgba(33, 150, 243, 0.3);
}

/* Animation de feedback pour le drag */
@keyframes dragPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.day-cell.drop-target {
    animation: dragPulse 1s ease-in-out infinite;
}

/* Indicateur visuel sur les shifts draggables */
.shift-display[draggable="true"]::before {
    content: "⋮⋮";
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #999;
    opacity: 0;
    transition: opacity 0.2s;
}

.day-cell[draggable="true"]:hover .shift-display::before {
    opacity: 1;
}

/* Context Menu Styles */
.context-menu {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 8px 0;
    z-index: 10000;
    display: none;
    min-width: 200px;
}

/* Style adapté quand le menu s'ouvre vers le haut */
.context-menu.menu-up {
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.context-menu-item {
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: #f5f5f5;
}

.context-menu-item span {
    font-size: 16px;
}

.context-menu-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 4px 0;
}

/* Focus styles pour les cellules */
.day-cell:focus {
    outline: 2px solid #667eea;
    outline-offset: -2px;
}

/* Indicateur visuel pour copy/paste */
.day-cell.copied {
    position: relative;
}

.day-cell.copied::after {
    content: "📋";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 12px;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Date Picker Styles */
.date-picker-content {
    padding: 10px;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
}

.month-year-selector {
    display: flex;
    gap: 12px;
    flex: 1;
    justify-content: center;
    max-width: 400px;
}

.month-year-selector select {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    background: white;
    color: #1e293b;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-width: 120px;
    flex: 1;
}

.month-year-selector select:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.month-year-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Style pour le premier select (mois) */
.month-year-selector select:first-child {
    flex: 1.5;
}

.btn-nav {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.btn-nav:hover {
    background: #5a67d8;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.calendar-header {
    font-weight: bold;
    text-align: center;
    padding: 10px 5px;
    background: #f5f5f5;
    font-size: 12px;
    color: #666;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #e0e0e0;
    background: white;
    transition: all 0.2s;
    font-size: 14px;
    position: relative;
    min-height: 45px;
    height: 45px;
    text-align: center;
}

.calendar-day:hover {
    background: #f5f5f5;
}

.calendar-day.other-month {
    color: #ccc;
}

.calendar-day.today {
    background: #e3f2fd;
    font-weight: bold;
    color: #2196f3;
}

.calendar-day.selected-week {
    background: #667eea;
    color: white;
}

.calendar-day.week-start {
    border-left: 3px solid #ff9800;
}

.calendar-day.week-end {
    border-right: 3px solid #ff9800;
}

.week-number {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    color: #999;
    background: rgba(255,255,255,0.9);
    padding: 1px 3px;
    border-radius: 3px;
}

.selected-week {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.quick-dates {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.quick-dates h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-align: center;
}

.quick-dates .btn {
    margin-bottom: 8px;
    padding: 10px 16px;
    font-size: 14px;
}

/* Styles pour les chevrons modernes */
.nav-button {
    flex: 0 0 44px; /* Taille fixe : ne grandit pas, ne rétrécit pas */
    width: 44px;
    height: 44px;
    border: none;
    background: #ffffff;
    color: #667eea;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

.nav-button:hover::before {
    opacity: 1;
}

.nav-button:hover .nav-chevron {
    color: white;
    transform: scale(1.15);
}

.nav-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.nav-button:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    box-shadow: none;
    border-color: #e5e7eb;
    opacity: 0.5;
}

.nav-button:disabled .nav-chevron {
    color: #9ca3af !important;
}

.nav-chevron {
    width: 24px;
    height: 24px;
    color: #667eea;
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
    display: block;
}

svg.nav-chevron {
    width: 24px;
    height: 24px;
}

/* Import Google Font Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Style amélioré pour user-info */
.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
}

.user-role {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 400;
}

/* Styles desktop pour les éléments utilisateur */
.user-role.desktop {
    font-size: 13px;
    color: #e0e0e0;
    margin-left: 4px;
}

.multi-store-badge.desktop {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Espacement pour les stats */

/* Shift modal - Même style que date picker */
#shiftModal .modal-content {
    width: calc(100vw - 40px);
    max-width: 900px;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    background: white;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

/* Force la largeur pour écrans desktop 1000px+ */
@media (min-width: 1000px) {
    #shiftModal .modal-content {
        max-width: 800px;
        width: 800px;
    }
}

/* Override des CSS variables problématiques pour #shiftModal */
#shiftModal {
    --modal-padding-mobile: 8px !important;
    --modal-padding-tablet: 12px !important;
    --modal-padding-desktop: 16px !important;
    --safe-area-mobile: 8px !important;
    --safe-area-tablet: 12px !important;
    --safe-area-desktop: 16px !important;
}

/* Force les paddings compacts sur tous les éléments de #shiftModal qui utilisent ces variables */
#shiftModal .modal-body {
    padding: 6px 12px !important;
}

#shiftModal .modal-header {
    padding: 8px 16px !important;
    flex-shrink: 0 !important;
}

#shiftModal .modal-footer {
    padding: 8px 16px !important;
    z-index: 10 !important;
    background: white !important;
    flex-shrink: 0 !important;
}

/* Réduction drastique des espaces pour tous les éléments dans la modale shift */
#shiftModal .form-group {
    margin-bottom: 4px !important;
}

#shiftModal .modal-section {
    margin-bottom: 6px !important;
}

#shiftModal h4 {
    margin-bottom: 4px !important;
    margin-top: 2px !important;
    line-height: 1.2 !important;
    font-size: 16px !important;
}

#shiftModal .btn {
    margin: 1px !important;
    padding: 6px 10px !important;
    line-height: 1.2 !important;
}

#shiftModal input, #shiftModal select, #shiftModal textarea {
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
}

/* Optimisation gap des flexbox */
#shiftModal .compact-flex {
    gap: 4px !important;
}

/* Optimisation spécifique des conteneurs de sections */
#shiftModal .time-inputs {
    margin-bottom: 4px !important;
    margin-top: 4px !important;
}

#shiftModal .break-notice-container {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}

#shiftModal .compact-section {
    margin-bottom: 4px !important;
    margin-top: 4px !important;
}

/* FORCE OVERRIDE ULTRA-SPÉCIFIQUE pour contrer le JavaScript */
#shiftModal div[style*="gap: 15px"] {
    gap: 4px !important;
}

#shiftModal div[style*="margin-bottom: 10px"] {
    margin-bottom: 2px !important;
}

#shiftModal div[style*="padding: 10px"] {
    padding: 4px !important;
}

#shiftModal div[style*="font-size: 28px"] {
    font-size: 18px !important;
    line-height: 1.2 !important;
}

#shiftModal div[style*="font-size: 24px"] {
    font-size: 16px !important;
}

#shiftModal div[style*="font-size: 18px"] {
    font-size: 14px !important;
}

#shiftModal div[style*="margin-top: 10px"] {
    margin-top: 2px !important;
}

/* Force tous les éléments texte à être compacts */
#shiftModal #calculationBreakdown div {
    margin-bottom: 2px !important;
    padding: 2px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
}

#shiftModal #totalCongesDays {
    font-size: 16px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    padding: 2px !important;
}

/* APPROCHE NUCLEAR - OVERRIDE TOTAL DE TOUTE LA MODALE */

/* Force TOUS les éléments à avoir une hauteur minimale */
#shiftModal *,
#shiftModal *::before,
#shiftModal *::after {
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
}

/* Override modéré des containers - équilibré */
#shiftModal .form-group {
    min-height: 0 !important;
    height: auto !important;
    margin-top: 8px !important;
    margin-bottom: 8px !important;
}

/* Sections spécifiques avec padding raisonnable */
#shiftModal .compact-section,
#shiftModal .modal-section {
    min-height: 0 !important;
    height: auto !important;
    margin: 8px 0 !important;
    padding: 10px !important;
}

/* Force les sections cachées à vraiment ne prendre AUCUNE place */
#shiftModal [style*="display: none"],
#shiftModal .hidden,
#shiftModal [hidden] {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Override TOTAL des styles inline volumineux */
#shiftModal [style*="margin-bottom: 10px"] {
    margin-bottom: 2px !important;
}

#shiftModal [style*="margin-top: 10px"] {
    margin-top: 2px !important;
}

#shiftModal [style*="padding: 10px"] {
    padding: 4px !important;
}

#shiftModal [style*="gap: 15px"] {
    gap: 4px !important;
}

#shiftModal [style*="font-size: 28px"] {
    font-size: 16px !important;
    line-height: 1.1 !important;
}

#shiftModal [style*="font-size: 24px"] {
    font-size: 14px !important;
}

#shiftModal [style*="font-size: 18px"] {
    font-size: 14px !important;
}

/* Modal-body avec scroll interne pour hauteur limitée */
#shiftModal .modal-body {
    min-height: 0 !important;
    flex: 1 1 auto !important;
    padding: 10px 16px 20px 16px !important;
    margin: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: calc(700px - 140px) !important; /* 700px - header(60px) - footer(80px) */
}

/* Scrollbar stylisée pour modal-body */
#shiftModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#shiftModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#shiftModal .modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#shiftModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Éléments spécifiques problématiques */
#shiftModal .break-notice-container {
    min-height: 0 !important;
    height: auto !important;
    margin: 4px 0 !important;
    padding: 0 !important;
}

#shiftModal .hours-warning {
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* BOUTONS IMPORTANTS - Taille normale pour store selector et footer */
#shiftModal .store-selector-btn {
    padding: 12px 16px !important;
    margin: 4px !important;
    min-height: 60px !important;
    font-size: 14px !important;
}

#shiftModal .store-selector-btn .compact-text {
    font-size: 15px !important;
    font-weight: 600 !important;
    margin-bottom: 4px !important;
}

#shiftModal .store-selector-btn div[style*="font-size: 10px"] {
    font-size: 12px !important;
}

/* Boutons footer - GRANDE taille pour meilleure ergonomie */
#shiftModal .modal-footer .btn {
    padding: 14px 28px !important;
    font-size: 17px !important;
    margin: 0 6px !important;
    min-height: 48px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    text-transform: none !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Centrage spécifique pour mobile */
@media (max-width: 768px) {
    #shiftModal .modal-footer .btn {
        padding: 12px 20px !important;
        font-size: 15px !important;
        text-align: center !important;
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Force les labels et inputs */
#shiftModal label {
    font-size: 14px !important;
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
}

/* Selects plus gros et plus visibles */
#shiftModal select, #shiftModal input {
    padding: 8px 10px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
    height: auto !important;
    min-height: 36px !important;
}

/* Spécifiquement pour les time-inputs */
#shiftModal .time-inputs {
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
}

#shiftModal .time-inputs .form-group {
    margin-bottom: 12px !important;
}

#shiftModal .time-inputs label {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

#shiftModal .time-inputs select {
    min-height: 42px !important;
    font-size: 15px !important;
    padding: 10px !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
}

/* Hauteur FIXE pour écrans 765px - avec scroll interne */
#shiftModal .modal-content {
    max-height: 700px !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Pour très petits écrans, réduire encore */
@media (max-height: 765px) {
    #shiftModal .modal-content {
        max-height: calc(100vh - 65px) !important;
    }
}

/* ====== CLASSES COMPACTES POUR REMPLACER LES STYLES INLINE ====== */

/* Flexbox containers compacts */
.compact-flex {
    display: flex !important;
}

.compact-flex-center {
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
}

.compact-flex-wrap {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.compact-flex-inputs {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Boutons compacts */
.compact-btn-primary {
    padding: 6px 12px !important;
    background: #4CAF50 !important;
    color: white !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 13px !important;
}

.compact-btn-secondary {
    padding: 6px 12px !important;
    background: #2196F3 !important;
    color: white !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 13px !important;
}

.compact-btn-tertiary {
    padding: 6px 12px !important;
    background: #9E9E9E !important;
    color: white !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 13px !important;
}

/* Container d'information compact */
.compact-info-box {
    margin-top: 12px !important;
    padding: 12px !important;
    background: #FFF3E0 !important;
    border-radius: 6px !important;
    border: 1px solid #FFE0B2 !important;
}

/* Labels et spans compacts */
.compact-label {
    display: block !important;
    font-weight: bold !important;
    margin-bottom: 6px !important;
    color: #333 !important;
}

.compact-span {
    font-size: 16px !important;
    margin-left: 8px !important;
}

.compact-span-small {
    font-size: 14px !important;
    color: #555 !important;
}

/* Inputs et selects compacts */
.compact-input-number {
    width: 80px !important;
    padding: 8px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    text-align: center !important;
    border: 2px solid #1976D2 !important;
    border-radius: 8px !important;
    color: #1565C0 !important;
}

.compact-input-ferie {
    width: 80px !important;
    padding: 6px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    border: 2px solid #FF9800 !important;
    border-radius: 5px !important;
}

/* Zone de texte compacte */
.compact-textarea {
    width: 100% !important;
    min-height: 60px !important;
    padding: 8px !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    resize: vertical !important;
}

/* Containers cachés */
.compact-hidden {
    display: none !important;
}

#shiftModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#shiftModal .modal-header h2 {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    letter-spacing: -0.5px;
}

#shiftModal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 6px 12px !important;
    padding-top: 6px !important;
    padding-bottom: 12px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* Style moderne pour les form groups */
#shiftModal .form-group {
    margin-bottom: 16px;
}

/* Reset margin pour les form groups dans time-inputs */
#shiftModal .time-inputs .form-group {
    margin-bottom: 0;
}

#shiftModal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 17px;
    color: #1a202c;
    letter-spacing: -0.2px;
}

#shiftModal .form-control,
#shiftModal input[type="time"],
#shiftModal input[type="date"],
#shiftModal input[type="number"],
#shiftModal select {
    width: 100%;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 500;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f7fafc;
    transition: all 0.2s ease;
    font-family: inherit;
}

#shiftModal .form-control:focus,
#shiftModal input[type="time"]:focus,
#shiftModal input[type="date"]:focus,
#shiftModal input[type="number"]:focus,
#shiftModal select:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Boutons de type de shift modernes */
#shiftModal .shift-type-buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

#shiftModal .shift-type-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 16px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

#shiftModal .shift-type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

#shiftModal .shift-type-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#shiftModal .shift-type-btn .icon {
    font-size: 24px;
    line-height: 1;
}

#shiftModal .shift-type-btn .text {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

#shiftModal .shift-type-btn.active .text {
    color: white;
}

/* Style spécial pour le bouton férié non travaillé */
#shiftModal .shift-type-btn[data-type="ferie_non_travaille"] {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE8D5 100%);
    border: 2px solid #FF9800;
}

#shiftModal .shift-type-btn[data-type="ferie_non_travaille"]:hover {
    background: linear-gradient(135deg, #FFE0B2 0%, #FFCC80 100%);
    border-color: #F57C00;
}

#shiftModal .shift-type-btn[data-type="ferie_non_travaille"].active {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    border-color: transparent;
    color: white;
}

/* Boutons preset d'horaires */
#shiftModal .preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

#shiftModal .preset-btn {
    padding: 10px 16px;
    background: #f0f4f8;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    position: relative;
}

#shiftModal .preset-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

#shiftModal .preset-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#shiftModal .preset-btn.active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #48bb78;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}


/* Section absence type */
#shiftModal #absenceTypeSection {
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

/* Container pour le message de pause SANS hauteur fixe */
#shiftModal .break-notice-container {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Message de pause stylisé - SEULEMENT quand visible */
#shiftModal .break-notice {
    background: #f0f9ff;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    padding: 8px 12px !important;
    font-size: 14px !important;
    font-weight: 500;
    color: #0369a1;
    line-height: 1.4;
    text-align: center;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: absolute;
    width: calc(100% - 48px);
    max-width: 100%;
}

#shiftModal .break-notice.visible {
    opacity: 1;
    transform: scale(1);
}

#shiftModal #absenceTypeSection select {
    margin-top: 12px;
}

/* Section congés payés */
#shiftModal #congePeriodSection {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    padding: 6px !important;
    background: #fef3c7;
    border-radius: 8px;
    border: 2px solid #fbbf24;
    font-size: 16px;
}

#shiftModal #congePeriodSection h3,
#shiftModal #congePeriodSection h4 {
    font-size: 16px !important;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 4px !important;
    margin-top: 2px !important;
    line-height: 1.2 !important;
}

#shiftModal #congePeriodSection p,
#shiftModal #congePeriodSection ul {
    font-size: 14px !important;
    line-height: 1.3 !important;
    color: #78350f;
    margin: 4px 0 !important;
}

#shiftModal #congePeriodSection li {
    font-size: 14px !important;
    line-height: 1.3 !important;
    margin: 2px 0 !important;
}

#shiftModal #congePeriodSection .info-box {
    background: #fef9c3;
    border: 1px solid #facc15;
    border-radius: 6px;
    padding: 6px !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
}

/* Section récupération dimanche */
#shiftModal #recoverySection {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    padding: 6px !important;
    background: #E3F2FD;
    border-radius: 8px;
    border: 2px solid #1976D2;
    font-size: 16px;
}

#shiftModal #recoverySection h3 {
    font-size: 16px !important;
    font-weight: 600;
    color: #1565C0;
    margin-bottom: 4px !important;
    margin-top: 2px !important;
    line-height: 1.2 !important;
}

#shiftModal #recoverySection .recovery-info {
    font-size: 14px !important;
    line-height: 1.3 !important;
    color: #0D47A1;
    margin-bottom: 6px !important;
}

#shiftModal #recoverySection label {
    font-size: 14px !important;
    font-weight: 600;
    color: #1565C0;
    margin-bottom: 2px !important;
}

#shiftModal #recoverySection .recovery-buttons {
    margin-top: 6px !important;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

#shiftModal #recoverySection p {
    font-size: 14px !important;
    line-height: 1.3 !important;
    margin: 2px 0 !important;
}

/* Override inline styles pour recovery section */
#shiftModal #recoveryBalance {
    font-size: 18px !important;
    margin-bottom: 4px !important;
    line-height: 1.2 !important;
}

#shiftModal #recoverySection div[style*="padding: 20px"] {
    padding: 6px !important;
}

#shiftModal #recoverySection div[style*="margin-bottom: 20px"] {
    margin-bottom: 4px !important;
}

#shiftModal #recoverySection div[style*="margin-top: 10px"] {
    margin-top: 4px !important;
}

/* Les overrides inline ne sont plus nécessaires avec les classes compact */

/* ==============================================
   SHIFT MODAL - COMPACT CLASSES (Override JavaScript inline styles)
   ============================================== */

/* Classes pour modal shift compacte */
.compact-store-container {
    background: #f5f5f5;
    padding: 8px !important;
    border-radius: 8px;
    margin-bottom: 8px !important;
    border: 1px solid #e0e0e0;
}

.compact-store-btn {
    padding: 6px 10px !important;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
}

.compact-section {
    padding: 6px !important;
    border-radius: 6px;
    margin-top: 6px !important;
    line-height: 1.2 !important;
}

.compact-section-margin {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}

.compact-padding {
    padding: 4px !important;
}

.compact-margin {
    margin-bottom: 4px !important;
}

/* Boutons de type de shift plus compacts */
.shift-type-button {
    padding: 6px 10px !important;
    margin: 2px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    min-height: 32px !important;
}

/* Boutons de preset plus compacts */
.preset-button {
    padding: 4px 8px !important;
    margin: 2px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    min-height: 28px !important;
}

/* Inputs plus compacts */
.compact-input {
    padding: 4px 6px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    height: 28px !important;
}

/* Textarea plus compact */
.compact-textarea {
    padding: 4px 6px !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    min-height: 60px !important;
}

.compact-text {
    font-size: 14px !important;
    line-height: 1.4 !important;
}

.compact-text-small {
    font-size: 13px !important;
    line-height: 1.4 !important;
}

.compact-title-small {
    margin: 0 0 8px 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.compact-title {
    font-size: 16px !important;
    margin-bottom: 8px !important;
}

/* Grille de dates pour congés */
#shiftModal .conge-dates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

/* Footer fixe en bas de la modale, toujours visible */
#shiftModal .modal-footer {
    position: relative !important;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 16px !important;
    flex-shrink: 0 !important;
    background: white;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04);
}

/* Boutons modernes */
#shiftModal .btn {
    padding: 12px 24px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: -0.2px;
}

#shiftModal .btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

#shiftModal .btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

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

#shiftModal .btn-danger:hover {
    background: #e53e3e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3);
}

#shiftModal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#shiftModal .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Date picker modal - Responsive design */
#datePickerModal .modal-content {
    width: min(85%, 700px);
    max-width: 700px;
    margin: 3% auto;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    background: white;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

#datePickerModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#datePickerModal .modal-header h2 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

#datePickerModal .modal-header .close-modal {
    color: white;
    font-size: 24px;
    opacity: 0.9;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#datePickerModal .modal-header .close-modal:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

#datePickerModal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Optimisations pour écrans moyens et larges */
@media (min-width: 1200px) {
    /* Masquer les boutons desktop */
    .desktop-only-btn, .desktop-only {
        display: none !important;
    }

    .planning-container {
        max-width: min(100%, 1400px);
        margin: 0 auto;
        overflow-y: hidden !important; /* Forcer pas de scroll vertical sur desktop */
        max-height: none !important;
        height: auto !important;
    }
    
    /* S'assurer que la table ne dépasse pas */
    .planning-table {
        margin-bottom: 0 !important;
    }
    
    /* Empêcher le scrollbar sur la section */
    .section:has(.planning-container) {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }
}

/* Media queries pour grands écrans - approche fluide */
@media (min-width: 1600px) {
    .main-content {
        max-width: min(95%, 1400px);
    }
    
    /* Ajustements subtils pour le confort */
    .planning-table {
        font-size: 15px;
    }
    
    .planning-table th {
        padding: 16px 14px;
    }
    
    .planning-table td {
        height: clamp(65px, 5vw, 85px);
    }
}

@media (min-width: 2200px) {
    /* Écrans très larges - ajustements subtils */
    .main-content {
        max-width: min(90%, 1600px);
    }
    
    .planning-table {
        font-size: clamp(14px, 1vw, 16px);
    }
}

/* Safari specific styles */
@supports (-webkit-appearance: none) and (stroke-color: transparent) {
    /* Date picker spécifique pour Safari */
    #datePickerModal .modal-content {
        max-width: 650px !important;
        max-height: 80vh !important;
    }
    
    #datePickerModal .calendar-day {
        height: 42px !important;
        min-height: 42px !important;
    }
    /* Réduire les tailles pour Safari */
    .btn {
        padding: 10px 20px !important;
        font-size: 16px !important;
    }
    
    .header {
        padding: 15px 25px !important;
    }
    
    .header h1 {
        font-size: 28px !important;
    }
    
    .planning-table th {
        font-size: 14px !important;
        padding: 12px 8px !important;
    }
    
    .planning-table td {
        height: 70px !important;
        padding: 8px !important;
    }
    
    .day-cell {
        min-width: 100px !important;
    }
    
    .shift-display {
        font-size: 13px !important;
        padding: 5px 10px !important;
    }
    
    .employee-info {
        font-size: 14px !important;
        min-width: 160px !important;
        padding: 10px 15px !important;
    }
}


/* MacBook Air specific (1440x900) */
@media (min-width: 1200px) and (max-width: 1500px) {
    /* Masquer les boutons desktop */
    .desktop-only-btn, .desktop-only {
        display: none !important;
    }

    .main-content {
        max-width: 95%;
    }
    
    .header h1 {
        font-size: 32px;
    }
    
    .btn {
        font-size: 18px;
        padding: 14px 28px;
    }
    
    .planning-table th {
        font-size: 16px;
        padding: 15px 10px;
    }
    
    .planning-table td {
        height: 80px;
    }
    
    .day-cell {
        min-width: 120px;
    }
    
    .employee-info {
        font-size: 16px;
        min-width: 200px;
    }
}

/* Desktop optimizations */
@media (min-width: 1200px) {
    /* Masquer les boutons desktop */
    .desktop-only-btn, .desktop-only {
        display: none !important;
    }

    #shiftModal .modal-content {
        width: 65%;
        max-width: 700px;
    }
    
    #datePickerModal .modal-content {
        width: 65%;
        max-width: 750px;
    }
    
    #datePickerModal .calendar-grid {
        gap: 4px;
        padding: 12px;
    }
    
    #datePickerModal .calendar-day {
        min-height: 50px;
        height: 50px;
        font-size: 15px;
    }
    
    #datePickerModal .month-year-selector {
        gap: 12px;
    }
    
    #datePickerModal .month-year-selector select {
        padding: 10px 16px;
        font-size: 15px;
        min-width: 130px;
    }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1199px) {
    #shiftModal .modal-content {
        width: 85%;
        margin: 3% auto;
    }
    
    #datePickerModal .modal-content {
        width: 85%;
        margin: 3% auto;
    }
}

/* Mobile optimizations */
@media (max-width: 767px) {
    
    #shiftModal .modal-header {
        border-radius: 0;
        padding: 8px 12px !important;
    }
    
    #shiftModal .modal-header h2 {
        font-size: 20px;
    }
    
    #shiftModal .modal-body {
        padding: 8px 12px !important;
        padding-bottom: 12px !important;
    }

    #shiftModal .modal-footer {
        padding: 6px 12px !important;
    }
    
    #shiftModal .btn {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    #shiftModal .conge-dates-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    #shiftModal .shift-type-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    #shiftModal .shift-type-btn {
        flex-direction: row;
        gap: 10px;
        padding: 12px 14px;
    }
    
    #shiftModal .shift-type-btn .icon {
        font-size: 20px;
    }
    
    #shiftModal .shift-type-btn .text {
        font-size: 14px;
    }
    
    
    #datePickerModal .modal-header {
        border-radius: 0;
        padding: 16px 20px;
    }
    
    #datePickerModal .modal-header h2 {
        font-size: 18px;
    }
    
    #datePickerModal .modal-body {
        padding: 16px;
    }
    
    /* Adapter la section accès rapide sur mobile */
    #datePickerModal .quick-dates {
        margin-top: 20px;
        padding: 16px;
        background: #f8f9fa;
        border-radius: 8px;
    }
    
    #datePickerModal .quick-dates h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    #datePickerModal .quick-dates .btn {
        width: 100%;
        padding: 12px;
        margin-bottom: 8px;
        font-size: 14px;
    }
    
    /* Navigation compacte */
    #datePickerModal .calendar-navigation {
        gap: 5px;
        margin-bottom: 16px;
        padding: 12px;
    }
    
    #datePickerModal .btn-nav {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    #datePickerModal .month-year-selector {
        flex-wrap: wrap;
        gap: 8px;
        max-width: 100%;
    }
    
    #datePickerModal .month-year-selector select {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 0;
        flex: 1 1 45%;
    }
    
    /* Grille optimisée */
    #datePickerModal .calendar-grid {
        gap: 2px;
        padding: 8px;
        background: #f8f9fa;
        border-radius: 8px;
    }
    
    #datePickerModal .calendar-header {
        font-size: 11px;
        padding: 8px 2px;
    }
    
    #datePickerModal .calendar-day {
        font-size: 13px;
        min-height: 45px;
        padding: 4px;
    }
    
    #datePickerModal .week-number {
        font-size: 9px;
        padding: 1px 3px;
    }
    
    #datePickerModal .selected-week {
        font-size: 14px;
        padding: 12px;
    }
}

/* Styles pour la vue mensuelle employé */
.calendar-month-container .calendar-day {
    position: relative;
    min-height: 100px;
    padding: 8px;
    border: 1px solid #e0e0e0;
    background: white;
    overflow: visible;
}

.calendar-month-container .day-header {
    position: absolute;
    top: 4px;
    left: 4px;
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.calendar-month-container .day-content {
    padding-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    text-align: center;
}

.calendar-month-container .shift-time {
    font-size: 14px;
    margin: 2px 0;
    display: block;
}

.calendar-month-container .store-info {
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
}

.calendar-month-container .day-shift-type {
    font-size: 14px;
    font-weight: 500;
}

.calendar-month-container .day-shift-break {
    font-size: 11px;
    color: #666;
    margin: 2px 0;
}



/* SUPPRIMÉ - media query qui écrasait les règles desktop principales
/*
@media (min-width: 1000px) and (max-width: 1199px) {
    /* Masquer les boutons desktop */
    .desktop-only-btn, .desktop-only {
        display: none !important;
    }

    /* Afficher le menu Actions */
    .actions-menu-modern-container {
        display: inline-block !important;
    }

    /* Afficher le wrapper desktop */
    .desktop-dupli-actions-wrapper {
        display: flex !important;
    }

    /* Copie exacte du style 769px-1024px */

    /* Header ajusté */
    .header h1 {
        font-size: 20px \!important;
    }

    .user-info {
        gap: 15px \!important;
    }

    /* Couverture sur 4 colonnes */
    .coverage-grid {
        grid-template-columns: repeat(4, 1fr) \!important;
    }

    /* Planning plus compact */
    .planning-table {
        font-size: 13px \!important;
    }

    .shift-display {
        font-size: 12px \!important;
        padding: 4px 8px \!important;
    }

    /* Réorganisation des boutons en 2 lignes */
    .controls-flex {
        flex-wrap: wrap \!important;
        gap: 10px \!important;
    }
    
    /* Override les styles desktop pour les boutons */
    .btn {
        font-size: 14px \!important;
        padding: 10px 16px \!important;
    }
    
    /* Première ligne: store + week selector + duplicate + planning */
    .form-group,
    .week-selector,
    .btn-duplicate {
        order: 1 \!important;
    }
    
    /* Deuxième ligne: tous les autres boutons */
    .btn-employee-mgmt,
    .btn-employee-pool,
    .btn-holidays,
    .btn-recovery,
    .btn-overtime {
        order: 2 \!important;
    }
    
    /* Ajuster la taille des boutons sur la deuxième ligne */
    /*.desktop-only-btn {
        display: inline-block \!important;
        font-size: 13px \!important;
        padding: 8px 14px \!important;
    }*/
    
    /* Cacher le dropdown */
    .actions-dropdown-container {
        display: none \!important;
    }
}
*/


/* === BOUTON DUPLIQUER EN PLEINE LARGEUR === */
/* Styles par défaut du bouton dupliquer pour tous les écrans */
.controls-flex .btn-duplicate,
.controls .controls-flex .btn-duplicate,
.controls .btn-duplicate {
    font-weight: 600 !important;   /* Gras pour visibilité */
    font-size: 17px !important;    /* Taille de police augmentée */
    border-radius: 8px !important; /* Coins arrondis modernes */
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

/* Effets hover pour le bouton dupliquer (desktop seulement) */
@media (hover: hover) {
    .controls-flex .btn-duplicate:hover,
    .controls .controls-flex .btn-duplicate:hover,
    .controls .btn-duplicate:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12) !important;
    }

    .controls-flex .btn-duplicate:active,
    .controls .controls-flex .btn-duplicate:active,
    .controls .btn-duplicate:active {
        transform: translateY(0) !important;
    }
}

/* === SURCHARGES POUR TOUTES LES MEDIA QUERIES === */

/* Mobile (≤ 480px) */



/* SUPPRIMÉ - Écrans moyens (1000px - 1199px) - Cas 1023×768px */
/*
@media (min-width: 1000px) and (max-width: 1199px) {
    .store-week-calendar-fixed {
        gap: 18px !important;
    }

    .store-week-calendar-fixed .form-group {
        min-width: 180px !important;
    }

    /* Masquer les boutons desktop */
    .desktop-only-btn, .desktop-only {
        display: none !important;
    }

    /* Afficher le menu Actions */
    .actions-menu-modern-container {
        display: inline-block !important;
    }

    /* Afficher le wrapper desktop */
    .desktop-dupli-actions-wrapper {
        display: flex !important;
    }

    /* SUPPRIMÉ - ancienne règle remplacée par le nouveau système simplifié
    .controls-flex .btn-duplicate {
        width: 100% !important;
        order: 0 !important;
        margin: 0 0 15px 0 !important;
        padding: 12px 25px !important;
        font-size: 18px !important;
        font-weight: 600 !important;
    } */
}

/* Desktop large (≥ 1200px) */
@media (min-width: 1200px) {
    /* Masquer les boutons desktop */
    .desktop-only-btn, .desktop-only {
        display: none !important;
    }

    .store-week-calendar-fixed {
        gap: 25px !important;
    }

    .store-week-calendar-fixed .form-group {
        min-width: 200px !important;
    }

    /* SUPPRIMÉ - ancienne règle remplacée par le nouveau système simplifié
    .controls-flex .btn-duplicate {
        width: 100% !important;
        order: 0 !important;
        margin: 0 0 20px 0 !important;
        padding: 15px 30px !important;
        font-size: 18px !important;
        font-weight: 600 !important;
    } */
}
*/

/* ============================
   Menu Actions Moderne (>1023px)
   ============================ */

/* Container du menu Actions */
.actions-menu-modern-container {
    position: relative;
    display: none;
    /* Important pour permettre au dropdown de sortir du conteneur parent */
    overflow: visible !important;
}

/* Bouton principal Actions */
.btn-actions-modern {
    background: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
    position: relative;
}

.btn-actions-modern:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #4c51bf 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.btn-actions-modern:active {
    transform: translateY(0);
}

.btn-actions-modern .actions-icon {
    font-size: 18px;
}

.btn-actions-modern .actions-chevron {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.btn-actions-modern.active .actions-chevron {
    transform: rotate(180deg);
}

/* Dropdown moderne */
.actions-dropdown-modern {
    position: fixed;  /* Utiliser fixed pour éviter les problèmes d'overflow */
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 90vw; /* Limite pour mobile */
    max-height: 70vh;
    overflow-y: auto;
    z-index: 9999;  /* Z-index très élevé */
    opacity: 0;
    transform: translateY(0);
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.actions-dropdown-modern.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Scrollbar personnalisée */
.actions-dropdown-modern::-webkit-scrollbar {
    width: 6px;
}

.actions-dropdown-modern::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.actions-dropdown-modern::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 6px;
}

.actions-dropdown-modern::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Groupes d'actions */
.actions-group {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.actions-group:last-child {
    border-bottom: none;
}

.actions-group-title {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px 4px;
    user-select: none;
}

/* Boutons dans le dropdown */
.actions-dropdown-modern button {
    width: 100%;
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #2d3748;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    text-align: left;
    position: relative;
}

.actions-dropdown-modern button:hover {
    background: #f7fafc;
    color: #667eea;
}

.actions-dropdown-modern button:active {
    background: #edf2f7;
}

.actions-dropdown-modern button .action-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Effet de ripple au clic */
.actions-dropdown-modern button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.actions-dropdown-modern button:active::after {
    width: 100%;
    height: 100%;
}

/* ========================================
   NOUVEAU SYSTÈME RESPONSIVE UNIFIÉ
   ======================================== */

/* MODE MOBILE < 1000px */
@media (max-width: 999px) {
    /* Masquer tous les boutons desktop */
    .desktop-only-btn,
    .desktop-only {
        display: none !important;
    }

    /* Masquer le wrapper desktop */
    .desktop-dupli-actions-wrapper {
        display: none !important;
    }

    /* Layout flex en colonnes */
    .controls-flex {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    /* LIGNE 1 : Magasin seul */
    .store-week-calendar-fixed {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        order: 1;
    }

    .store-week-calendar-fixed .form-group {
        width: 100%;
        margin: 0;
        order: 1;
    }

    .store-week-calendar-fixed .form-group select {
        width: 100%;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
        background: white;
    }

    /* LIGNE 2 : Semaine avec chevrons et calendrier complet */
    .store-week-calendar-fixed .week-selector {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: nowrap;
        order: 2;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 10px 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    .week-selector .nav-button {
        flex-shrink: 0;
        min-width: 40px;
        height: 40px;
        padding: 8px;
        border: 2px solid #e5e7eb;
        background: transparent;
        color: #667eea;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .week-selector .nav-button:hover {
        background: #f8f9ff;
        border-color: #667eea;
        transform: translateY(-1px);
    }

    .week-selector .nav-button .nav-chevron {
        width: 20px;
        height: 20px;
        color: #667eea;
        display: block;
    }

    .week-selector #currentWeek {
        flex: 1;
        text-align: center;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    .week-selector .btn-calendar {
        flex-shrink: 0;
        min-width: 40px;
        height: 40px;
        padding: 8px;
        border: 2px solid #e5e7eb;
        background: transparent;
        color: #667eea;
        border-radius: 8px;
        cursor: pointer;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .week-selector .btn-calendar:hover {
        background: #f8f9ff;
        border-color: #667eea;
        transform: translateY(-1px);
    }

    /* LIGNE 3 : Dupliquer seul */
    .btn-duplicate {
        order: 2;
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        background-color: #4CAF50 !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        cursor: pointer;
        margin: 0 !important;
        display: block !important;
        float: none !important;
    }

    /* LIGNE 4 : Actions seul */
    .actions-menu-modern-container {
        display: block !important;
        order: 3;
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
    }

    .btn-actions-modern {
        width: 100% !important;
        padding: 12px 8px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        background: #667eea !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        cursor: pointer;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
    }

    /* LIGNE 3 : Bouton Dupliquer pleine largeur */
    .mobile-duplicate-full-width {
        width: 100%;
        order: 3;
        margin: 5px 0;
    }

    .mobile-duplicate-full-width .btn.mobile-full-width {
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        text-align: center !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }

    /* LIGNE 4 : Actions dropdown pleine largeur */
    .mobile-actions-full-width {
        width: 100%;
        order: 4;
        margin: 5px 0 0 0;
    }

    .mobile-actions-container .btn.mobile-actions-btn {
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        background: #667eea !important;
        color: white !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }

    .mobile-actions-container .btn.mobile-actions-btn:hover {
        background: #5a67d8 !important;
        transform: translateY(-1px) !important;
    }

    /* Afficher les éléments mobiles */
    .mobile-duplicate-full-width,
    .mobile-actions-full-width {
        display: block !important;
    }

    /* Cacher les éléments desktop en mobile */
    .desktop-dupli-actions-wrapper {
        display: none !important;
    }

    /* Permettre au dropdown de sortir du conteneur */
    .controls {
        overflow: visible !important;
    }
}

/* STYLES PAR DÉFAUT */
.controls-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

/* Afficher par défaut le menu Actions moderne */
.actions-menu-modern-container {
    display: inline-block !important;
}

/* Masquer par défaut tous les boutons desktop individuels */
.desktop-only-btn,
.desktop-only {
    display: none;
}

/* Classes pour afficher/masquer selon desktop/mobile */
.mobile-only {
    display: inline;
}

@media (min-width: 1000px) {
    .desktop-only {
        display: inline !important;
    }
    .mobile-only {
        display: none !important;
    }
}

/* À partir de 1000px, forcer le masquage des boutons desktop individuels */
@media (min-width: 1000px) {
    .desktop-only-btn,
    .desktop-only,
    .btn-planning,
    .btn-my-planning,
    .controls-flex > button[onclick*="openEmployeeManagement"]:not(.actions-dropdown-modern button),
    .controls-flex > button[onclick*="openEmployeePool"]:not(.actions-dropdown-modern button),
    .controls-flex > button[onclick*="openHolidayManagement"]:not(.actions-dropdown-modern button),
    .controls-flex > button[onclick*="openRecoveryBalances"]:not(.actions-dropdown-modern button),
    .controls-flex > button[onclick*="openOvertimeAdmin"]:not(.actions-dropdown-modern button),
    .controls-flex > button[onclick*="openManagerManagement"]:not(.actions-dropdown-modern button) {
        display: none !important;
        visibility: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        opacity: 0 !important;
    }
}

/* Styles par défaut pour les éléments principaux */
.store-week-calendar-fixed {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

/* CACHER LES ÉLÉMENTS MOBILES UNIQUEMENT EN DESKTOP */
@media (min-width: 1000px) {
    .mobile-duplicate-full-width,
    .mobile-actions-full-width {
        display: none !important;
    }
}

.week-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* MODE DESKTOP ≥ 1000px */
@media (min-width: 1000px) {
    /* Layout desktop horizontal */
    .controls-flex {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    /* Réduire l'espace quand les boutons desktop sont masqués */
    .controls {
        margin-bottom: 10px;
    }

    /* LIGNE 1 : Magasin + Semaine (inchangé) */
    .store-week-calendar-fixed {
        display: flex;
        flex-direction: row;
        gap: 20px;
        align-items: center;
        order: 1;
    }

    /* LIGNE 2 : Container pour Dupliquer + Actions */
    .desktop-dupli-actions-wrapper {
        display: flex !important;
        flex-direction: row !important;
        gap: 15px !important;
        align-items: center !important;
        order: 2 !important;
        width: 100% !important;
    }

    /* LIGNE 2 : Dupliquer (70%) + Actions (30%) */
    .btn-duplicate {
        flex: 0 0 70% !important;
        margin: 0 !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        background-color: #4CAF50 !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
    }

    .actions-menu-modern-container {
        display: inline-block !important;
        flex: 0 0 30% !important;
        margin: 0 !important;
    }

    .btn-actions-modern {
        width: 100% !important;
        padding: 12px 8px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        background: #667eea !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
    }

    /* Clearfix pour les floats */
    .controls-flex::after {
        content: "";
        display: table;
        clear: both;
    }

    /* Garder tous les boutons desktop masqués */
    .desktop-only-btn,
    .desktop-only {
        display: none !important;
    }
}

/* Animation d'entrée du dropdown */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de sortie */
@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ========================================
   ACTIVATION EMAIL RESEND FUNCTIONALITY
   ======================================== */

/* Container pour le header email avec bouton action */
.email-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

/* Bouton de renvoi d'email d'activation */
.btn-resend-activation {
    background: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.15);
}

.btn-resend-activation:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #4c51bf 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.25);
}

.btn-resend-activation:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.15);
}

.btn-resend-activation:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-resend-activation:disabled:hover {
    background: #a0aec0;
    transform: none;
    box-shadow: none;
}

/* Statut d'activation */
.activation-status {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
}

.status-pending {
    color: #e67e22;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-activated {
    color: #27ae60;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .email-header-with-action {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .btn-resend-activation {
        align-self: flex-end;
        font-size: 11px;
        padding: 5px 8px;
    }
}

/* ========== TOGGLE COUVERTURE JOURNALIÈRE ========== */
.coverage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.coverage-header h3 {
    margin: 0;
}

.coverage-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
}

.coverage-toggle:hover {
    background-color: #f0f0f0;
    color: #333;
}

.coverage-toggle svg {
    transition: transform 0.2s ease;
}

.coverage-toggle.collapsed svg {
    transform: rotate(-90deg);
}

.coverage-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.coverage-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: -15px;
}

/* Affichage du bouton sur tous les appareils */

/* Cache busting: 1758318685 */
