/* ========================================
   style_nav.css — Navbar latérale portable
   ======================================== */

/* --- Bouton toggle (hamburger) --- */
.toggle-btn {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 1100;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: none; /* caché par défaut (paysage) */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.2s ease, left 0.3s ease;
}

.toggle-btn:hover {
    background-color: #3498db;
}

/* --- Navbar latérale --- */
.navbar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 55%;
    width: 72px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    box-sizing: border-box;
    border-radius: 0 36px 36px 0;
    background-color: #f0f2f5;
    transition: left 0.3s ease;
    z-index: 1000;
}

/* Paysage : état rétracté */
.navbar.collapsed {
    left: -72px;
}

/* Groupe d'icônes centrales */
.nav-center {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

/* Icônes individuelles */
.nav-item {
    width: 46px;
    height: 46px;
    background-color: #fff;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #444;
    font-size: 18px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav-item:hover {
    background-color: #3498db;
    color: #fff;
    transform: scale(1.08);
}

/* --- Portrait (mobile) --- */
@media (orientation: portrait) {
    /* Bouton hamburger visible */
    .toggle-btn {
        display: flex;
    }

    /* Navbar cachée par défaut sur mobile */
    .navbar {
        left: -72px;
        top: 0;
        transform: none;
        height: 100%;
        border-radius: 0 24px 24px 0;
        justify-content: center;
        gap: 24px;
        padding: 80px 0 24px;
    }

    /* Ouverte via .active */
    .navbar.active {
        left: 0;
    }
}