/* ============================================================
   MENU HAMBURGER — Style 2 (Morphing → X)
   Positionné dans .menu-bar, visible UNIQUEMENT mobile ≤ 768px
   Fichier : templates/EDU/css/hamburger-menu.css
   ============================================================ */
	
@media (max-width: 500px) {
	
.logo-bar {
  width: 100%;
  background: #333;
  color: white;
  padding: 15px;
  text-align: center;
  transition: all 0.3s;
}

.logo-bar.fixed {
  position: fixed;
  top: 0px;
  left: 0;
  z-index: 1000;
}

.logo-bar.normal {
  position: relative;
}
}

/* ── BOUTON — caché par défaut (desktop) ── */
.hamburger-btn {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-right: 8px;
}
.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Les 3 barres */
.hamburger-btn span {
    display: block;
    width: 44px;
    height: 4px;
    background: #fffcfc;
    border-radius: 2px;
    transform-origin: center center;
    transition: transform 0.35s cubic-bezier(.77,0,.18,1),
                opacity   0.25s ease,
                width     0.3s ease;
}

/* ── ANIMATION MORPHING → X au clic ── */
.hamburger-btn.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-btn.is-open span:nth-child(2) {
    opacity: 0;
    width: 0;
}
.hamburger-btn.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ── PANEL MOBILE ── */
.mobile-nav-panel {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #ffffff;
   /* border-top: 3px solid #cc0000;*/
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9998;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s cubic-bezier(.77,0,.18,1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}
.mobile-nav-panel.is-open {
    display: flex;
    max-height: 600px;
}

/* Sticky : top défini dynamiquement par JS */
.mobile-nav-panel.panel-fixed {
    position: fixed !important;
	    top: 70px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
}

/* ── LIENS DU PANEL ── */
.mobile-nav-panel a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 22px;
    font-size: 15px;
    font-weight: 500;
    color: #222222;
    text-decoration: none;
    border-bottom: 1px solid #f2f2f2;
    transition: background 0.18s, color 0.18s, padding-left 0.2s;
}
.mobile-nav-panel a:last-child { border-bottom: none; }
.mobile-nav-panel a:hover {
    background: #fff5f5;
    color: #cc0000;
    padding-left: 28px;
}
.mobile-nav-panel a.active {
    background: #a7a7a766;
    color: var(--jabs);
    border-left: 4px solid var(--jabs);
    padding-left: 18px;
}

/* Icône à gauche */
.mobile-nav-panel a .nav-icon {
    font-size: 18px;
    width: 26px;
    text-align: center;
    flex-shrink: 0;
}

/* Label */
.mobile-nav-panel a .nav-label {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
}

/* Flèche droite */
.mobile-nav-panel a::after {
    content: '>';
    font-size: 22px;
    color: var(--jabs);
    opacity: 1;
    transition: opacity 0.2s, transform 0.2s;
    font-weight: 600;
}
.mobile-nav-panel a:hover::after {
    opacity: 1;
    transform: translateX(4px);
}

/* Fallback module Joomla */
.mobile-nav-panel--module ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav-panel--module ul li a {
    display: flex;
    align-items: center;
    padding: 15px 22px;
    font-size: 15px;
    color: #222;
    text-decoration: none;
    border-bottom: 1px solid #f2f2f2;
    transition: background 0.18s;
}
.mobile-nav-panel--module ul li a:hover,
.mobile-nav-panel--module ul li.current a {
    background: #fff5f5;
    color: #cc0000;
}

/* ── MOBILE ≤ 768px ── */
@media (max-width: 500px) {

    /* Afficher le bouton hamburger */
    .hamburger-btn { display: flex !important; }

    /* menu-bar : barre principale */
    .menu-bar {
       /* display: block !important;
        position: relative !important;
        top: 0px !important;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 9999;
        background: #fff;
        border-bottom: 2px solid #cc0000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.10);*/
    }

    /* Sticky déclenché par JS 
    .menu-bar.is-sticky {
        position: fixed !important;
        top: 0px !important;
    }*/

    /* Container de la menu-bar :
       hamburger à gauche + liens qui prennent le reste */
    .menu-bar .container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        padding: 4px 8px;
        overflow: hidden;
        width: 100%;
        box-sizing: border-box;
    }

    /* Hamburger dans la menu-bar : compact */
    .menu-bar .hamburger-btn {
        display: flex !important;
        flex-shrink: 0;
        padding: 5px 6px !important;
        gap: 5px !important;
        margin-right: 6px;
    }
    .menu-bar .hamburger-btn span {
        width: 20px !important;
        height: 2px !important;
    }

    /* Navigation : prend la place restante */
    .menu-bar .main-navigation {
        flex: 1 1 0;
        min-width: 0;
        overflow: hidden;
        display: none; !important;
        align-items: center;
    }

    /* Liens compacts sur mobile */
    .menu-bar .main-navigation a,
    .menu-bar .main-navigation li > a {
        font-size: 11px !important;
        padding: 6px 5px !important;
        white-space: nowrap;
    }

    /* Liste en ligne */
    .menu-bar .main-navigation ul,
    .menu-bar nav > ul {
        display: flex !important;
        flex-wrap: nowrap !important;
        list-style: none;
        margin: 0;
        padding: 0;
        overflow: hidden;
        width: 100%;
    }

    /* Masquer sous-menus sur mobile */
    .menu-bar .main-navigation ul ul { display: none !important; }

    /* Icônes sociales visibles sur mobile */
    .logo-bar .social-icons { display: flex !important; align-items: center; gap: 8px; }

    /* Color switcher */
    #color-switcher-container {
        display: flex !important;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 5px 0;
        /*background: #f5f5f5;
        border-bottom: 1px solid #e0e0e0;*/
    }

    /* Header en colonne */
    .header { position: relative; display: flex; flex-direction: column; }

    /* Logo-bar */
    .logo-bar .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 14px;
    }
    .logo-bar-right { display: flex; align-items: center; gap: 8px; }
}

/* ── DESKTOP ≥ 769px : tout caché ── */
@media (min-width: 500px) {
    .hamburger-btn    { display: none !important; }
    .mobile-nav-panel { display: none !important; }
    .logo-bar-right   { display: flex; align-items: center; gap: 10px; }

}
