/* =========================================
   HEADER.CSS - Navigation & En-tête
   Version: 1.3
   ========================================= */

header {
    background-color: var(--color-surface);
    box-shadow: var(--box-shadow-subtle);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
}

/* --- LOGO & MARQUE --- */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s;
}

.logo a:hover {
    transform: scale(1.02); /* Petit effet de zoom au survol */
}

.brand-text {
    display: flex;
    flex-direction: column; /* "Famille" au dessus, "2.0" en dessous ou à côté */
    justify-content: center;
    line-height: 1.1;
}

.app-name {
    font-size: 1.4rem;
    font-weight: 800; /* Très gras */
    color: var(--color-text-dark);
    letter-spacing: -0.5px;
}

.app-version {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-left: 2px;
}

/* Sur mobile, on garde l'icône mais on simplifie le texte si besoin */
@media (max-width: 400px) {
    .app-name { font-size: 1.2rem; }
    .app-version { font-size: 0.7rem; }
}

/* LOGO */
.logo a {
    display: flex;
    align-items: center;
    height: 45px;
    text-decoration: none;
}

.logo img {
    height: 100%;
    width: auto;
    max-width: 150px; /* Limite la largeur si le logo est grand */
    object-fit: contain;
}

/* ZONE DROITE (Profil + Burger) */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* AVATAR HEADER */
.header-profile {
    text-decoration: none;
    display: block;
	/* On s'assure que le lien ne prend pas toute la place */
    width: 40px; 
    height: 40px;
}

.header-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primary);
    transition: transform 0.2s;
	display: block;
}

.header-avatar-circle {
    width: 40px;
    height: 40px;
    background-color: var(--color-secondary);
    color: var(--color-text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.header-profile:hover img,
.header-profile:hover .header-avatar-circle {
    transform: scale(1.1);
}

/* NAVIGATION DESKTOP */
.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav ul li {
    margin-left: 20px;
}

.main-nav ul li a {
    text-decoration: none;
    color: var(--color-text-dark);
    font-weight: 600;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-bottom-color 0.3s;
}

.main-nav ul li a:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-secondary);
}

.mobile-only {
    display: none; /* Caché sur desktop */
}

/* BURGER MENU */
.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001; 
}

.burger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 2px;
    position: absolute;
    transition: all 0.3s ease-in-out;
}

.burger-menu .bar:nth-child(1) { top: 0; }
.burger-menu .bar:nth-child(2) { top: 10px; }
.burger-menu .bar:nth-child(3) { top: 20px; }

.burger-menu.open .bar:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.burger-menu.open .bar:nth-child(2) { opacity: 0; }
.burger-menu.open .bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }