/* --- BASE DU HEADER (COMMUN) --- */
.main-header {
    background-color: var(--primary-brown);
    color: var(--white);
    height: 60px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%; /* Prend toute la largeur */
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    width: 100%;
    max-width: 1200px; /* On centre le contenu sur PC pour ne pas qu'il soit trop écarté */
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between; /* Logo à gauche, Actions à droite */
    align-items: center;
}

/* --- ÉLÉMENTS INTERNES --- */
.header-logo {
    display: flex !important; /* Force l'affichage */
    align-items: center;
    gap: 10px;
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.4rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.header-left {
    display: flex;
    align-items: center;
}

.user-info {
    text-align: right;
    line-height: 1.2;
}

.user-role { font-size: 0.7rem; color: var(--accent-gold); text-transform: uppercase; font-weight: bold; display: block; }
.user-name { font-size: 0.9rem; font-weight: 500; }

.logout-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.logout-btn:hover { background: var(--error-red); border-color: var(--error-red); }

/* Style pour le sélecteur d'environnement au centre */
.env-switcher {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 12px;
    border-radius: 30px;
    gap: 10px;
}

.switch-link {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 20px;
    transition: background 0.2s;
}

.switch-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.switch-link .emoji {
    font-size: 1.2rem;
}

.header-divider-mini {
    width: 1px;
    height: 15px;
    background: rgba(255, 255, 255, 0.3);
}

/* Ajustement pour mobile : on réduit l'espace */
@media (max-width: 991px) {
    .env-switcher {
        gap: 5px;
        padding: 4px 8px;
    }
}

/* --- AJUSTEMENTS RESPONSIVE --- */
@media (max-width: 991px) {
    .header-container {
        display: flex;
        justify-content: space-between; /* Répartit Logo / Switcher / Profil */
    }

    .pc-only { display: none !important; }

    .logout-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}

/* À ajouter dans header.css */
.header-logo.crumbs-pure {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-weight: 500;
    letter-spacing: -0.5px;
    font-size: 1.5rem;
    color: var(--white);
}

.miette-dot {
    color: var(--accent-gold);
    font-size: 1.8rem;
    line-height: 0;
    vertical-align: middle;
}

/* Effet subtil au survol */
.header-logo.crumbs-pure:hover {
    letter-spacing: 1px;
    transition: all 0.3s ease;
}