/* === EFFETS DE FOND DYNAMIQUES === */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(6, 182, 212, 0.2) 50%, transparent 100%);
    filter: blur(40px);
    animation: float 20s infinite linear;
}

.floating-orb:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    background: radial-gradient(circle, var(--orb-color-1) 0%, var(--orb-color-2) 50%, transparent 100%);
}

.floating-orb:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
    background: radial-gradient(circle, var(--orb-color-3) 0%, var(--orb-color-4) 50%, transparent 100%);
}

.floating-orb:nth-child(3) {
    width: 250px;
    height: 250px;
    bottom: 20%;
    left: 20%;
    animation-delay: -10s;
    background: radial-gradient(circle, var(--orb-color-5) 0%, var(--orb-color-6) 50%, transparent 100%);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(100px, -50px) rotate(90deg);
    }
    50% {
        transform: translate(50px, 100px) rotate(180deg);
    }
    75% {
        transform: translate(-50px, 50px) rotate(270deg);
    }
}

/* === NAVIGATION ULTRA-MODERNE 2024 ===
   - Nav fixe avec glassmorphism, ombre au scroll, CTA distinctif
*/
.nav-ultra-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: visible;
}

.nav-ultra-modern.scrolled {
    background: var(--nav-bg);
    box-shadow: 0 8px 32px var(--shadow-color);
    border-bottom: 1px solid var(--border-color);
}

.nav-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* === BRAND SECTION === */
.nav-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.brand-link:hover {
    transform: scale(1.05);
}

.brand-logo {
    margin-right: 12px;
}

.logo-img {
    width: 92px;
    height: 92px;
    border-radius: 18px;
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.45);
    position: relative;
    top: 8px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* === NAVIGATION MENU === */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 8px 12px;
    border-radius: 12px;
}

.nav-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.nav-text {
    font-size: 0.75rem;
    font-weight: 600;
}

.nav-indicator {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--border-color);
    transform: translateY(-2px);
}

.nav-link:hover .nav-icon {
    transform: scale(1.2);
}

.nav-link:hover .nav-indicator {
    width: 80%;
}

.nav-link.nav-cta {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 28px;
    font-weight: 700;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px var(--shadow-color);
}

.nav-link.nav-cta:hover {
    transform: translateY(-3px);
    background: var(--accent-primary);
    border-color: var(--accent-secondary);
    box-shadow: 0 10px 26px var(--shadow-color);
}

.nav-link.nav-cta .nav-indicator {
    display: none;
}

/* === MOBILE MENU TOGGLE === */
.nav-mobile-toggle {
    display: none;
}

.mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: var(--orb-color-1);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* === MOBILE OVERLAY === */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    isolation: isolate;
    display: block;
    background: var(--bg-primary);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Fallback: si le body a menu-open, afficher l'overlay */
body.menu-open .mobile-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    z-index: 1;
    color: var(--text-primary);
    background: var(--bg-primary);
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
}

/* BACKDROP SÉPARÉ */
.mobile-backdrop {
    display: none; /* plus nécessaire avec le fond direct sur l'overlay */
}

/* S'assurer que le contenu du panneau passe au-dessus du voile interne */
.mobile-menu, .mobile-header, .mobile-content, .mobile-nav, .mobile-nav * {
    position: relative;
    z-index: 1;
}

/* renfort visuel sombre quand le menu est ouvert */
/* suppression des pseudo-éléments: géré par .mobile-backdrop */

/* cacher le curseur custom quand le menu mobile est ouvert */
body.menu-open .custom-cursor,
body.menu-open .custom-cursor-follower { 
    display: none !important; 
}

.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    z-index: 1;
}

.mobile-brand {
    display: flex;
    align-items: center;
}

.mobile-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    margin-right: 12px;
}

.mobile-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-close:hover {
    background: var(--orb-color-1);
}

.close-icon {
    position: relative;
    width: 20px;
    height: 20px;
}

.close-icon span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.close-icon span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-icon span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-content {
    flex: 1;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    z-index: 1;
    overflow-y: auto;
}

/* Etat ouvert: fade/slide du panneau et interactions actives */
.mobile-overlay.active .mobile-menu,
body.menu-open .mobile-overlay .mobile-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.mobile-nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--text-primary);
    z-index: 1;
}

.mobile-link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.25s ease;
    background: var(--card-bg);
}

.mobile-icon {
    font-size: 1.3rem;
    margin-right: 12px;
}

.mobile-text {
    font-size: 1rem;
}

.mobile-link:hover {
    color: var(--text-primary);
    background: var(--accent-primary);
    transform: translateX(8px);
}

.mobile-link.mobile-cta {
    background: var(--accent-primary);
    border: 1px solid var(--accent-secondary);
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 1rem;
}

/* === EFFETS DE FOND DYNAMIQUES ALTERNATIFS === */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--orb-color-1) 0%, var(--orb-color-2) 70%, transparent 100%);
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
}

.orb-3 {
    width: 180px;
    height: 180px;
    bottom: 20%;
    left: 20%;
    animation-delay: -10s;
}

/* === RESPONSIVE DESIGN - NAVIGATION === */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-link {
        padding: 6px 8px;
    }
    
    .nav-text {
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-mobile-toggle {
        display: block;
    }
    
    .nav-wrapper {
        padding: 0 1rem;
    }
    
    .brand-name {
        font-size: 1rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .nav-wrapper {
        height: 70px;
    }
    
    .logo-img { 
        width: 56px; 
        height: 56px; 
        top: 6px; 
    }
    
    .brand-name { 
        font-size: 1.05rem; 
    }
    
    .brand-subtitle { 
        font-size: 0.7rem; 
    }
}