header {
    background-color: #F5E9D7;
    padding: 20px min(40px, 5vw);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-wrap: nowrap; /* Empêche le saut de ligne */
    overflow: hidden; /* Évite les débordements */
    border-bottom: 2px solid #E8C8A5; /* Bordure subtile pour encadrer l'image */
}

.logo-container {
    width: min(80px, 10vw);
    height: min(80px, 10vw);
    background-color: #E8C8A5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Roboto', sans-serif;
    font-size: min(14px, 2vw);
    color: #333;
    flex-shrink: 0; /* Empêche le logo de rétrécir */
}

.site-title {
    font-family: 'Dancing Script', cursive;
    font-size: min(54px, 7vw);
    color: #5B3A29;
    text-align: center;
    flex-grow: 1;
    flex-shrink: 1; /* Permet au titre de rétrécir si besoin */
    white-space: nowrap; /* Empêche le titre de passer à la ligne */
    overflow: hidden;
    text-overflow: ellipsis; /* Ajoute des points si le texte est trop long */
}

nav {
    display: flex;
    gap: min(20px, 3vw);
    flex-shrink: 0; /* Empêche la nav de rétrécir trop */
}

nav a {
    font-family: 'Roboto', sans-serif;
    font-size: min(22px, 3.5vw);
    color: #5B3A29;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap; /* Empêche les liens de passer à la ligne */
}

nav a:hover {
    color: #E8C8A5;
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: min(10px, 2vw); /* Ajoute un peu de padding pour un meilleur clic */
}

.hamburger span {
    display: block;
    background-color: #5B3A29;
    height: 3px;
    width: 25px;
    margin: 5px;
    border-radius: min(2px, 0.3vw); /* Arrondir légèrement les bords pour un look plus doux */
    transition: all 0.3s ease;
}

/* Responsive pour mobile (max-width: 768px) */
@media (max-width: 926px) {
    header {
        padding: 15px min(20px, 5vw);
        min-height: 80px;
    }

    .logo-container {
        display: none;
    }

    .site-title {
        font-size: 36px;
    }

    nav {
        position: fixed;
        background-color: rgba(245, 233, 215, 0.5);
        backdrop-filter: blur(5px);
        width: 100%;
        height: 100vh;
        top: 80px;
        left: -100%;
        flex-direction: column;
        gap: 0;
        transition: left 0.3s ease;
    }

    nav.active {
        left: 0;
    }

    nav a {
        font-size: 18px;
        padding: 20px;
        border-bottom: 1px solid #5B3A29;
        width: 100%;
        text-align: center;
    }

    nav .active {
        background-color: rgba(91, 58, 41, 0.5);
        color: #F9EDE3;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 5px); /* Ajustement précis pour une croix nette */
        width: 25px; /* Assure une longueur constante */
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -5px); /* Ajustement pour symétrie */
        width: 25px;
    }

    .hamburger.active {
        transform: rotate(180deg); /* Ajoute une rotation fluide pour l'ensemble */
    }
}

/* Pour les écrans très étroits, ajuster encore */
@media (max-width: 1200px) and (min-width: 926px) {
    .site-title {
        font-size: min(40px, 5vw);
    }

    nav a {
        font-size: min(18px, 2.5vw);
    }
}

