@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

h2, .titre-planning {
    margin-top: 5px !important;
    margin-bottom: 5px !important;
}

.planning-container {
    margin: 0 auto 10px auto;   
    width: 85%;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow-y: auto;
    overflow-x: auto;
    max-height: 80vh;  
    position: relative;
    border: 1px solid #ddd;
    -webkit-overflow-scrolling: touch;
}

.user-menu-container {
    padding: 10px;
    background: #fdfdfd;
    border-bottom: 1px solid #eee; 
    display: flex; 
    justify-content: flex-end;
    align-items: center; 
    gap: 15px;
}

.planning-table {
    width: 100%;
    border-collapse: separate; 
    border-spacing: 0;
    table-layout: fixed;
    font-size: 0.80rem;
}

.planning-table thead th {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 10px 4px;
    font-weight: 500;
    text-align: center;
    border-bottom: 2px solid #1a252f;
    position: sticky;
    top: 0;        
    z-index: 20;   
}

.planning-table th:first-child, 
.planning-table td:first-child {
    width: 180px;  
    position: sticky;
    top: 0;
    left: 0;       
    z-index: 21;   
}

.planning-table th:first-child {
    z-index: 30;   
    background-color: #2c3e50;
    left: 0;
} 

.planning-table td {
    border-bottom: 1px solid #ebedef;
    border-right: 1px solid #ebedef;
    padding: 6px;
    height: 60px;
    vertical-align: middle;
}

.agent-name {
    background-color: #f8f9fa !important;
    color: #2c3e50;
    font-weight: 400;
    border-right: 2px solid #dee2e6 !important;
}

.mission-block {
    padding: 5px;
    border-radius: 4px;
    color: #484646;
    min-height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 4px;
    line-height: 1.2;
    width: 100%;
    white-space: normal;      
    word-break: break-word;   
    min-width: 120px;         
}

.mission-location {
    font-size: 0.5rem;
    font-weight: 200;
    text-transform: uppercase;
}

.mission-time {
    font-size: 0.65rem;
    margin-top: 2px;
    padding-top: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    width: 85%;
}

.dropdown { 
    position: relative; 
    display: inline-block; 
}

.dropdown-btn {
    background: #fff;
    color: #333;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 4px;
    border: 1px solid #eee;
}

.dropdown:hover .dropdown-content { 
    display: block; 
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.modal-compte {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; 
    top: 0; 
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
}

.login-container {
    max-width: 400px;
    margin: 100px auto; 
    padding: 20px;
    background: white; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

input {
    width: 90%; 
    padding: 10px;
    margin: 10px 0; 
    border: 1px solid #ddd;
    border-radius: 4px; 
}

.btn-blue { 
    background: #4c7abf;
    color: white; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 4px; 
    cursor: pointer;
    width: 95%;
}

.whatshap {
    background-color: #128C7E;
    color: white !important; 
    font-weight: bold; 
    border-radius: 5px;
    margin: 10px; 
    padding: 12px; 
    display: block; 
    text-align: center; 
    text-decoration: none;
}

.back {
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media print {
    .planning-table tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .planning-table thead {
        display: table-header-group !important;
    }
    #table-pdf {
        width: 100% !important;
        table-layout: auto !important; 
    }
}

.main-footer {
    color: #2c3e50;
    text-align: center;
    font-size: 0.8rem;
    margin-top: 20px;
    height: 30px;
    margin-top: auto;
}

.stats-dashboard {
    display: flex;
    gap: 20px; 
    margin-bottom: 15px; 
    flex-wrap: wrap; 
    justify-content: center;
    align-items: stretch;
    width: 100%;
}

.stat-card {
    background: #fff;
    Padding:12px 18px;
    border-radius: 10px;
    padding: 15px;
    justify-content:flex-start;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    border-top: 4px solid #343a40;
    cursor: pointer; 
    transition: all 0.3s ease;
    user-select: none; 
    
}

.stat-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
    background-color: #f9f9f9;
}

.stat-card:active {
    transform: translateY(-2px); 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-card:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.messages-container {
    padding: 10px 20px; 
    text-align: center;
}

.alert-message {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid transparent;
}

.alert-message.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-message.error, .alert-message.danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

@media (max-width: 576px) {
    .mission-block {
        font-size: 0.65rem !important;
        padding: 4px !important;
        white-space: normal !important;
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
        min-width: 115px !important; 
    }
    .planning-table th:not(:first-child), 
    .planning-table td:not(:first-child) {
        width: 125px !important;     
        min-width: 125px !important;
    }
    .planning-table {
        table-layout: auto !important; 
    }
    .planning-table th:first-child, 
    .planning-table td:first-child {
        width: 120px !important;
        min-width: 120px !important;
    }
}

.signal {
    display: none; 
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    z-index: 10000; 
    justify-content: center;
    align-items: center;
}

.nomcomplet, .absence, .detail {
    display: block; 
    font-weight: bold; 
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.exemple {
    width: 100%; 
    padding: 8px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-sizing: border-box; 
}

.bouton {
    display: flex; 
    justify-content: flex-end; 
    gap: 10px;
}

.annul {
    padding: 8px 16px; 
    background: #95a5a6;
    color: white; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: bold;
}

.envoie {
    padding: 8px 16px; 
    background: #e67e22; 
    color: white; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: bold;
}

/* --- Boutons et Actions (Menu Utilisateur) --- */
.btn-alert-submission {
    background: #e67e22; 
    color: #fff; 
    border-radius: 5px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 8px 15px; 
    height: 40px; 
    font-weight: 700; 
    font-size: 0.85rem; 
    border: none; 
    cursor: pointer;
}

.btn-download-pdf {
    background: #fff; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 8px 15px; 
    height: 40px;
}

.icon-pdf {
    color: #a73f3f; 
    font-size: 1.1rem;
}

.text-download {
    font-weight: 700; 
    font-size: 0.85rem; 
    color: #333;
}

.welcome-text {
    font-size: 1rem;
}

.logout-link {
    color: #a73f3f; 
    font-weight: bold; 
    padding: 10px; 
    display: block;
}

/* --- Tableau et Cellules Dynamiques --- */
.table-header-day {
    text-align: center;
}

.day-name {
    text-transform: capitalize;
}

.table-cell-mission {
    vertical-align: top; 
    min-width: 130px;
}

.dynamic-mission-block {
    background-color: var(--bg-mission); 
    margin-bottom: 4px; 
    padding: 5px; 
    border-radius: 3px; 
    border-left: 4px solid rgba(0,0,0,0.1);
}

.mission-title {
    font-weight: bold; 
    display: block; 
    font-size: 0.85em;
}

.chef-tag {
    display: inline-block; 
    font-size: 0.68rem; 
    background-color: #ffffff; 
    color: #434343; 
    font-weight: bold; 
    margin: 3px 0; 
    padding: 1px 5px; 
    border-radius: 10px; 
    text-transform: uppercase; 
    letter-spacing: 0.3px; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.icon-star {
    font-size: 0.6rem; 
    margin-right: 2px;
}

.mission-hours {
    font-size: 0.8em; 
    display: block;
}

.empty-cell-text {
    color: #eee; 
    text-align: center;
}


.icon-verified {
    color: #28a745;
}

.dynamic-section-card {
    
    border-top: 4px solid var(--color-border) !important;
    border-bottom: 4px solid var(--color-border) !important;
    

    /*border-bottom: none !important;*/
}

.dynamic-icon {
    
    color: var(--color-icon) !important;
    
    
    font-size: 1.3rem;
    width: 30px;
    text-align: center;
    display: inline-block;
}
.section-badge-title {
    font-size: 0.75rem; 
    font-weight: bold;
}


.navigation-header-container {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 20px; 
    margin-bottom: 15px;
}

.btn-nav-disabled {
    opacity: 0.3; 
    cursor: not-allowed;
}

.popover-content {
    background: #fff; 
    padding: 25px; 
    border-radius: 6px; 
    width: 420px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
    position: relative; 
    font-family: sans-serif;
}

.btn-close-cross {
    position: absolute; 
    top: 12px; 
    right: 15px; 
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    cursor: pointer; 
    color: #aaa;
}

.popover-title {
    margin-top: 0; 
    margin-bottom: 20px; 
    color: #333; 
    font-size: 1.2rem; 
    border-bottom: 2px solid #e67e22; 
    padding-bottom: 8px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group-large {
    margin-bottom: 20px;
}

.form-input {
    width: 100%; 
    padding: 8px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-sizing: border-box;
}