/* =====================
   MENU OVERLAY GENERAL
   ===================== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    min-height: 100vh;
    z-index: 9999;
    display: flex;
    flex-direction: row;
    /* par défaut pour gauche/droite */
    justify-content: stretch;
    align-items: stretch;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.85);
    transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.98);
}

.menu-overlay.gauche-droite {
    flex-direction: row;
}

/* =====================
   MENU MOITIÉS (HALVES)
   ===================== */
.menu-half {
    flex: 1 1 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 32px 0 rgba(72, 46, 35, 0.15), 0 1.5px 6px 0 rgba(72, 46, 35, 0.10);
    transition: none;
    opacity: 0;
    pointer-events: none;
}

/* Gauche/Droite */
.menu-half-left {
    transform: translateX(-100%);
}

.menu-half-right {
    transform: translateX(100%);
}

.menu-overlay.open .menu-half {
    opacity: 1;
    pointer-events: auto;
}

.menu-overlay.open .menu-half-left {
    animation: menuSlideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.05s both;
    transition-delay: 0.05s;
}

.menu-overlay.open .menu-half-right {
    animation: menuSlideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.18s both;
    transition-delay: 0.18s;
}

.menu-overlay:not(.open) .menu-half-left,
.menu-overlay:not(.open) .menu-half-right {
    animation: none !important;
}

@keyframes menuSlideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes menuSlideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =====================
   BOUTONS MENU
   ===================== */

/* Positionnement du bouton hamburger (menu d'ouverture) */
.menu-hamburger {
    position: fixed;
    top: 50px;
    right: 50px;
    height: 100px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0;
}

.hamburger-bar {
    display: block;
    width: 36px;
    height: 2px;
    background: #472e23;
    border-radius: 2px;
    transition: 
        transform 0.4s cubic-bezier(0.4,0,0.2,1),
        background 0.3s,
        opacity 0.3s;
    margin: 6px 0; /* Ajoute de l'espace entre les barres */
}

/* Animation au survol */
.menu-hamburger:hover .bar1 {
    transform: translateY(-3px) scaleX(1.2);
}
.menu-hamburger:hover .bar2 {
    transform: scaleX(0.9);
}
.menu-hamburger:hover .bar3 {
    transform: translateY(3px) scaleX(1.2);
}

/* Transformation en croix quand le menu est ouvert */
.menu-overlay.open ~ .menu-hamburger .bar1,
.menu-hamburger.is-active .bar1 {
    transform: translateY(8px) rotate(45deg); /* Ajuste la valeur selon le margin */
}
.menu-overlay.open ~ .menu-hamburger .bar2,
.menu-hamburger.is-active .bar2 {
    opacity: 0;
}
.menu-overlay.open ~ .menu-hamburger .bar3,
.menu-hamburger.is-active .bar3 {
    transform: translateY(-8px) rotate(-45deg); /* Idem */
}

/* Positionnement du bouton close (fermeture du menu) */
.menu-close {
    position: absolute;
    top: 50px;
    right: 50px;
    z-index: 10001;
}

.menu-hamburger .wp-block-button__link,
.menu-close .wp-block-button__link {
    background: none;
    border: none;
    cursor: pointer;
    box-shadow: none;
    padding: 0.5em 1em;
    transition: color 0.2s;
}

.menu-hamburger .wp-block-button__link.is-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
}

/* =====================
   NAVIGATION
   ===================== */
.menu-nav {
    display: flex;
    flex-wrap: wrap;
}

.menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-nav a {
    color: #eeab00;
    text-decoration: none;
    transition: letter-spacing 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.3s,
        box-shadow 0.3s,
        transform 0.3s;
}

.menu-overlay.open .menu-nav a:hover {
    letter-spacing: 0.15em;
    color: #472e23;
    transform: translateY(-2px) scale(1.04);
}

/* =====================
   AUTRES UTILITAIRES
   ===================== */
.txt-pied {
    display: inline-block;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.cache-block {
    display: none !important;
}

.circle {
    position: sticky;
    top: 400px;
}

.img-iconique {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gp-zimage {
    position: relative;
    overflow: hidden;
    width: 80%;
    height: 100%;
}

/* SUPPRESSION DE L'ANIMATION DE FERMETURE */

/* On garde uniquement l'animation d'apparition */
.menu-half-left,
.menu-half-right {
  opacity: 0;
  pointer-events: none;
}

.menu-overlay.open .menu-half-left {
  animation: menuSlideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.05s both;
  opacity: 1;
  pointer-events: auto;
}
.menu-overlay.open .menu-half-right {
  animation: menuSlideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.18s both;
  opacity: 1;
  pointer-events: auto;
}

@keyframes menuSlideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes menuSlideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}