@charset "utf-8";

/* =============================== */
/* VARIABLE GLOBALE POUR LA HAUTEUR DU MENU */
/* =============================== */
:root {
    --menu-height: 60px;
}

/* =============================== */
/* HEADER MOBILE */
/* =============================== */
#header-mobile-v2 {
    background: transparent;
    backdrop-filter: none;
    width: 100%;
    height: var(--menu-height);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 199000; /* au-dessus des vignettes */
    border-bottom: 0;
    transition: background 0.35s ease, backdrop-filter 0.35s ease;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    padding: 0 40px;
    box-sizing: border-box;
}

/* Fond légèrement opaque (voile clair + flou) pour que les vignettes
   qui passent dessous au défilement ne gênent pas la lecture du logo
   et du burger.
   Le voile est posé sur un calque séparé (::before) et NON sur
   #header-mobile-v2 lui-même : un backdrop-filter sur le header
   enfermerait le panneau du menu (#menu-mobile-v2, position fixed,
   qui est à l'intérieur du header) dans la bande du header, au lieu
   de l'ouvrir en plein écran. */
#header-mobile-v2::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(247, 247, 247, 0.80);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: -1;
    pointer-events: none;
    transition: background 0.35s ease;
}

#header-mobile-v2:hover::before {
    background: rgba(247, 247, 247, 0.92);
}

/* Page d'accueil (thème "home") : le header reste transparent au-dessus
   des visuels plein écran, et s'assombrit légèrement au survol. */
#header-mobile-v2.theme-home::before {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

#header-mobile-v2.theme-home:hover::before {
    background: rgba(0, 0, 0, 0.25);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

/* =============================== */
/* LOGO MOBILE */
/* =============================== */
#logo-mobile-v2 a {
    color: rgba(0,0,0, 0.85);
    text-decoration: none;
    font-weight: 300;
    font-size: 20px;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* =============================== */
/* BURGER */
/* =============================== */
#burger-mobile-v2 {
    margin-left: auto;
    width: 32px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 199010; /* au-dessus du header ET du menu mobile */
}

#burger-mobile-v2 span {
    display: block;
    height: 3px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 2px;
    transition: transform 0.35s ease;
}

#burger-mobile-v2.active span {
    background: rgba(255, 255, 255, 0.85);
}

#burger-mobile-v2.active span:nth-child(1) { transform: translateX(6px); }
#burger-mobile-v2.active span:nth-child(2) { transform: translateX(-6px); }
#burger-mobile-v2.active span:nth-child(3) { transform: translateX(6px); }

/* =============================== */
/* PANNEAU MOBILE */
/* =============================== */
#menu-mobile-v2 {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    padding-top: 60px !important;
    transition: right 0.3s ease;
    z-index: 199005; /* au-dessus des vignettes, sous le burger */
}

#menu-mobile-v2.open {
    right: 0;
}

/* =============================== */
/* MENU INTERNE */
/* =============================== */
.m-nav-mobile ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.m-nav-mobile li {
    margin: 16px 0;
}

/* =============================== */
/* TITRES PRINCIPAUX */
/* =============================== */
.m-nav-mobile > ul > li > a,
.mobile-submenu-toggle {
    color: rgba(245, 238, 218, 0.85);
    text-decoration: none;
    font-size: 22px !important;
    font-weight: 200;
    padding: 8px 20px !important;
	line-height: 1.3 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    
}
.mobile-submenu-toggle::after {
  content: "›";
  font-size: 26px ;
  color: rgba(245, 238, 218, 0.75);
  transition: transform 0.35s ease;
}

.mobile-submenu-toggle.open::after {
  transform: rotate(90deg);
}

/* =============================== */
/* SOUS-MENUS */
/* =============================== */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    padding-left: 20px;
    transition:
        max-height 0.35s ease,
        opacity 0.35s ease,
        transform 0.35s ease;
    z-index: 199006; /* dans le flux du menu mobile */
}

.mobile-submenu.open {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
}

.mobile-submenu li a {
    padding: 6px 24px;
    font-size: 22px !important;
    font-weight: 200;
    color: rgba(245, 238, 218, 0.75);
    text-decoration: none;
    display: block;
}

/* =============================== */
/* VOILE (FERMETURE AUTOMATIQUE) */
/* =============================== */
#menu-mobile-veil {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: transparent;
    z-index: 198900; /* sous le menu mobile, au-dessus du contenu */
    display: none;
}

#menu-mobile-veil.active {
    display: block;
}

/* =============================== */
/* CACHER LE MOBILE EN DESKTOP */
/* =============================== */
@media (min-width: 1200px) {
    #header-mobile-v2 { display:none !important; }
    #menu-mobile-v2 { display:none !important; }
    #menu-mobile-veil { display:none !important; }
}
