/* ========================================
   STYLES DE NAVIGATION - TLB Transport
   ======================================== */

/* Barre de navigation principale */
.top-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Sections de la barre de navigation */
.header-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.header-center {
    flex: 2;
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* Titre de la page */
.header-center h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

/* Bouton de retour */
.back-link {
    background: #3498db;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.back-link:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    color: white;
    text-decoration: none;
}

.back-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.back-link:active {
    transform: translateY(0);
}

/* Bouton du menu burger */
.burger-menu-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.burger-menu-btn:hover {
    background: #5a6268;
}

/* Menu déroulant burger */
.burger-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
}

.burger-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Items du menu burger */
.burger-menu-item {
    display: block;
    padding: 10px 15px;
    color: #495057;
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.burger-menu-item:last-child {
    border-bottom: none;
}

.burger-menu-item:hover {
    background: #f8f9fa;
    color: #495057;
}

.burger-menu-separator {
    height: 1px;
    background: #dee2e6;
    margin: 6px 0;
}


.burger-menu-logout {
    color: #dc3545 !important;
}

.burger-menu-logout:hover {
    background: #fff5f5 !important;
    color: #c82333 !important;
}

/* Navigation des pilotes */
.driver-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
}

.driver-info {
    position: relative; /* pour ancrer le dropdown */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 200px; /* largeur fixe pour la plupart des noms */
    min-width: 260px;
    max-width: 380px;
}

.driver-info span:first-child {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 600;
}

/* Nom du chauffeur tronqué proprement si trop long */
#driverName {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.driver-info span:last-child {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.nav-link {
    color: #3498db;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-link:hover {
    background: #ecf0f1;
    color: #2980b9;
}

.nav-btn {
    background: #3498db;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.nav-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

#currentMonth {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 600;
    min-width: 120px;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .top-header {
        padding: 10px 15px;
    }
    
    .header-center h1 {
        font-size: 1.2rem;
    }
    
    .back-link {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .burger-menu-btn {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .burger-menu {
        min-width: 160px;
    }
    
    .driver-info span:first-child {
        font-size: 0.9rem;
    }
    .driver-info {
        width: 260px;
        min-width: 220px;
        max-width: 300px;
    }
    
    .driver-info span:last-child {
        font-size: 0.7rem;
    }
    
    .nav-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 8px 12px;
    }
    
    .header-center h1 {
        font-size: 1rem;
    }
    
    .back-link {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .driver-info span:first-child {
        font-size: 0.8rem;
    }
    .driver-info {
        width: 220px;
        min-width: 200px;
        max-width: 240px;
    }
    
    .driver-info span:last-child {
        font-size: 0.6rem;
    }
    
    #currentMonth {
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .nav-btn {
        width: 25px;
        height: 25px;
        font-size: 0.7rem;
    }
}
