/* Navigation moderne avec effet glassmorphism */

/* Cacher le toggle et le label par défaut */
label,
#toggle {
    display: none;
}

/* Styles pour mobile (max-width: 900px) */

/* nav {
        position: fixed;
        top: 80px;
        right: 15px;
        z-index: 1000;
    } */


nav .main_pages {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 10px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 200px;
    overflow: hidden;
}

nav .main_pages a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

nav .main_pages a:hover {
    background: linear-gradient(90deg, rgba(92, 187, 246, 0.15) 0%, transparent 100%);
    border-left-color: var(--my-color);
    padding-left: 25px;
}

nav .main_pages a.active {
    background: linear-gradient(90deg, rgba(92, 187, 246, 0.25) 0%, transparent 100%);
    border-left-color: var(--my-color);
    color: var(--my-color);
    font-weight: 600;
}

nav label {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background: rgba(92, 187, 246, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    font-size: 22px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(92, 187, 246, 0.4);
    transition: all 0.3s ease;
}

nav label:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(92, 187, 246, 0.6);
}

#toggle:checked+.main_pages {
    display: flex;
    animation: slideDown 0.3s ease-out;
}




/* Styles pour desktop (min-width: 900px) */


nav::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    width: 208px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(92, 187, 246, 0.3), rgba(255, 215, 0, 0.2));
    z-index: -1;
    opacity: 0.5;
}


/* Styles communs pour les listes */
nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

nav li {
    margin: 3px 0;
    padding: 0;
}

/* Styles des liens */
nav a {
    display: block;
    padding: 6px 6px;
    color: #333;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Effet de vague au survol */
nav a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(92, 187, 246, 0.15), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    border-radius: 50%;
}

nav a:hover::before {
    width: 200px;
    height: 200px;
}

nav a:hover {
    background: rgba(92, 187, 246, 0.1);
    color: var(--my-color);
    transform: translateX(3px);
}

/* État actif */
nav a.active {
    background: linear-gradient(135deg, var(--my-color), #4a9fd8);
    color: white;
    box-shadow: 0 4px 15px rgba(92, 187, 246, 0.4);
    font-weight: 600;
}

nav a.active:hover {
    background: linear-gradient(135deg, #4a9fd8, var(--my-color));
    transform: translateX(3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(92, 187, 246, 0.5);
}

/* État désactivé */
nav a.isDisabled {
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
    text-decoration: line-through;
    font-weight: 400;
    pointer-events: none;
}

/* Séparateur optionnel entre les éléments */
nav li:not(:last-child) a {
    margin-bottom: 2px;
}

/* Animation d'apparition pour le menu desktop */

.nav-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    /*padding: 30px 20px;*/
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--header-height);
}

.nav-header h2 {
    color: var(--text-white);
    font-size: 1.25rem;
    font-weight: 600;
    margin-left: 10px;
    margin-right: 10px;
}

nav {
    animation: fadeInLeft 0.8s ease-out;
}



nav li {
    animation: fadeInUp 0.5s ease-out backwards;
}

nav li:nth-child(1) {
    animation-delay: 0.1s;
}

nav li:nth-child(2) {
    animation-delay: 0.2s;
}

nav li:nth-child(3) {
    animation-delay: 0.3s;
}

nav li:nth-child(4) {
    animation-delay: 0.4s;
}

nav li:nth-child(5) {
    animation-delay: 0.5s;
}



.nav-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}



.nav-menu {
    flex: 1;
    padding: 16px 0;
    /*overflow-y: auto;*/
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    /*padding: 14px 20px;*/
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link-hidden {
    display: none;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(92, 187, 246, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.nav-icon {
    font-size: 1.25rem;
    width: 28px;
    text-align: center;
}

.nav-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-overlay.show {
    opacity: 1;
    visibility: visible;
}


.menu-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 3px;
    background-color: var(--text-white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
