/*  
STYLES CSS - Header

Ce fichier définit les styles du header (icone maison et avatar) 
*/

/* Conteneur global (icône maison + avatar) */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 58px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto auto;
    align-items: center;
    gap: 14px; /* Espace entre la maison et l'avatar */
    padding: 8px 18px;
    background: linear-gradient(180deg, rgba(245, 252, 253, 0.96), rgba(245, 252, 253, 0.78));
    border-bottom: 1px solid rgba(16, 45, 105, 0.08);
    box-shadow: 0 10px 26px rgba(16, 45, 105, 0.08);
    backdrop-filter: blur(12px);
    z-index: 1000; /* S'assure qu'il reste au-dessus */
}

.header-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.header-title {
    color: #154d6b;
    font-size: clamp(1.1rem, 1.7vw, 1.55rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

/* Icône maison */
.home-icon {
    font-size: 22px;
    color: #102D69;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.home-icon:hover {
    color: #0A1E45;
}

.header-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(16, 45, 105, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(16, 45, 105, 0.08);
    backdrop-filter: blur(10px);
}

.header-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: #102D69;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.header-nav-link:hover {
    background: rgba(16, 45, 105, 0.08);
    color: #0A1E45;
    text-decoration: none;
    transform: translateY(-1px);
}

.header-nav-link-disabled,
.header-nav-link-disabled:hover {
    cursor: not-allowed;
    color: rgba(16, 45, 105, 0.45);
    background: transparent;
    transform: none;
}

/* Conteneur de l'avatar */
.avatar-container {
    position: relative; /* Changer de fixed à relative */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Style de l'avatar */
.avatar {
    width: 40px;
    height: 40px;
    background: #102D69; /* Gris */
    color: white;
    font-weight: bold;
    font-size: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

.avatar:hover {
    background: #0A1E45; /* Gris foncé */
}

/* Menu déroulant */
.dropdown-content {
    position: absolute;
    top: 45px; /* Ajusté pour éviter le chevauchement */
    right: 0;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    min-width: 140px;
    border: 1px solid #ddd;
}

/* Items du menu */
.menu-item {
    padding: 8px 12px;
    text-decoration: none;
    color: black;
    font-size: 14px;
    display: block;
    text-align: left;
    transition: background 0.2s ease-in-out, color 0.2s ease-in-out, padding 0.2s ease-in-out;
}

.menu-item:hover {
    background: #f1f1f1;
    color: black;
    padding-left: 16px; /* Effet fluide */
}

@media (max-width: 760px) {
    .header-container {
        left: 0;
        right: 0;
        height: 60px;
        padding: 8px 10px;
        grid-template-columns: minmax(110px, 1fr) auto auto;
        gap: 8px;
    }

    .header-title {
        font-size: 1rem;
    }

    .home-icon {
        display: none;
    }

    .header-nav {
        max-width: calc(100vw - 100px);
        overflow-x: auto;
    }

    .header-nav-link {
        padding: 0 10px;
        font-size: 0.76rem;
    }
}
