/* ---------------------------------------------------
   HEADER PRINCIPAL — COMPATIBLE iPHONE SAFE AREAS
--------------------------------------------------- */
header {
    background: rgba(115, 48, 65, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* iPhone fix */

    position: fixed;
    top: env(safe-area-inset-top, 0); /* iPhone notch */
    left: 0;
    width: 100%;

    padding: calc(10px + env(safe-area-inset-top, 0)) 24px 10px 24px;
    /* ↑ ajoute automatiquement un padding sous l’encoche */

    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom: 2px solid var(--beige);
    z-index: 1000;
}

/* ---------------------------------------------------
   ALIGNEMENT DU CONTENU
--------------------------------------------------- */
.header-left {
    display: flex;
    align-items: center;
    gap: 22px;
}

header h1 {
    margin: 0;
    font-family: "Abril Fatface", serif;
    font-size: 1.6rem;
    color: var(--beige);
    line-height: 1;
    display: flex;
    align-items: center;
}

/* ---------------------------------------------------
   ICONES SOCIALES
--------------------------------------------------- */
.social-icons {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 28px;
}

.social-icons a svg {
    width: 26px;
    height: 26px;
    fill: var(--beige);
    transition: 0.3s ease;
}

.social-icons a:hover svg {
    fill: var(--ocre);
}

/* ---------------------------------------------------
   MENU BURGER — TOUCH FRIENDLY
--------------------------------------------------- */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    cursor: pointer;

    height: 32px; /* plus grand pour iPhone */
    width: 40px;  /* zone tactile élargie */
    padding: 4px; /* évite les ratés au toucher */
}

.bar {
    width: 32px;
    height: 4px;
    background-color: var(--beige);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.hamburger:hover .bar {
    background-color: var(--ocre);
    transform: scaleX(1.1);
}

/* ---------------------------------------------------
   MENU DÉROULANT — FONDU + GLISSEMENT + RIDEAU
   COMPATIBLE iPHONE
--------------------------------------------------- */
nav {
    position: fixed;
    top: calc(60px + env(safe-area-inset-top, 0)); 
    /* ↑ menu toujours sous le header, même avec encoche */

    left: 0;
    width: 100%;

    background: rgba(250, 242, 233, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px); /* iPhone fix */

    border-top: 2px solid var(--marron);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);

    overflow: hidden;

    max-height: 0;
    opacity: 0;
    transform: translateY(-14px);
    pointer-events: none;

    transition:
        max-height 0.55s ease,
        opacity 0.45s ease,
        transform 0.45s ease;

    z-index: 9999;
}

nav.active {
    max-height: 100vh; /* iPhone friendly */
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ---------------------------------------------------
   LIENS DU MENU — ANIMATION EN CASCADE
--------------------------------------------------- */
nav a {
    display: block;
    padding: 16px 22px; /* plus grand pour iPhone */
    text-decoration: none;
    color: var(--bordeaux);
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);

    opacity: 0;
    transform: translateY(-6px);
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}

nav.active a {
    opacity: 1;
    transform: translateY(0);
}

/* Effet cascade */
nav.active a:nth-child(1) { transition-delay: 0.05s; }
nav.active a:nth-child(2) { transition-delay: 0.10s; }
nav.active a:nth-child(3) { transition-delay: 0.15s; }
nav.active a:nth-child(4) { transition-delay: 0.20s; }
nav.active a:nth-child(5) { transition-delay: 0.25s; }
nav.active a:nth-child(6) { transition-delay: 0.30s; }
nav.active a:nth-child(7) { transition-delay: 0.35s; }
nav.active a:nth-child(8) { transition-delay: 0.40s; }

nav a:hover {
    background: var(--marron);
    color: white;
}

/* ---------------------------------------------------
   RESPONSIVE iPHONE
--------------------------------------------------- */
@media (max-width: 600px) {
    header {
        padding: calc(10px + env(safe-area-inset-top, 0)) 18px 10px 18px;
    }

    header h1 {
        font-size: 1.3rem;
    }

    nav.active {
        max-height: calc(100vh - env(safe-area-inset-top, 0));
        overflow-y: auto;
    }
}