/**
 * AIDA Nav - Navbar & Sidebar Styles
 * Version: 1.0.0
 * 
 * Uses CSS variables from aida-core when available
 * Includes fallbacks for standalone usage
 */

/* ==========================================================================
   FALLBACK VARIABLES (if aida-core not loaded)
   ========================================================================== */
:root {
    --aida-dark: var(--aida-color-dark, #08080c);
    --aida-dark-card: var(--aida-color-dark-card, rgba(15, 15, 25, 0.95));
    --aida-primary: var(--aida-color-primary, #A855F7);
    --aida-cyan: var(--aida-color-cyan, #00fff5);
    --aida-magenta: var(--aida-color-magenta, #ff00ff);
    --aida-green: var(--aida-color-green, #39FF14);
    --aida-yellow: var(--aida-color-yellow, #ffae00);
    --aida-text: var(--aida-color-text, #F1F5F9);
    --aida-text-muted: var(--aida-color-text-muted, #94A3B8);
    --aida-text-dim: var(--aida-color-text-dim, #64748B);
    --aida-border: var(--aida-color-border, rgba(255, 255, 255, 0.1));
}

/* ==========================================================================
   NAVBAR PRINCIPALE
   ========================================================================== */
.aida-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.aida-navbar.scrolled {
    background: rgba(8, 8, 12, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--aida-border);
    padding: 0.75rem 2rem;
}

/* Logo */
.aida-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    z-index: 1001;
}

.aida-nav-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--aida-yellow), var(--aida-primary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    font-family: var(--aida-font-heading, 'Outfit', sans-serif);
}

.aida-nav-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--aida-text);
    font-family: var(--aida-font-heading, 'Outfit', sans-serif);
}

.aida-nav-logo-text span {
    background: linear-gradient(135deg, var(--aida-yellow), var(--aida-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   MENU HAMBURGER - STYLE NEWSLETTER
   ========================================================================== */
.aida-menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 174, 0, 0.1);
    border: 1px solid rgba(255, 174, 0, 0.4);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px -8px rgba(255, 174, 0, 0.3);
}

.aida-menu-toggle:hover {
    background: rgba(255, 174, 0, 0.15);
    border-color: rgba(255, 174, 0, 0.6);
    box-shadow: 0 0 25px -5px rgba(255, 174, 0, 0.5);
}

.aida-menu-toggle-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aida-menu-toggle-bar {
    width: 20px;
    height: 2px;
    background: var(--aida-yellow);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.aida-menu-toggle-text {
    font-family: var(--aida-font-mono, 'Space Mono', monospace);
    font-size: 0.65rem;
    color: var(--aida-yellow);
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
    transition: all 0.3s ease;
}

/* Animation hamburger → X */
.aida-menu-toggle.active .aida-menu-toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.aida-menu-toggle.active .aida-menu-toggle-bar:nth-child(2) {
    opacity: 0;
}

.aida-menu-toggle.active .aida-menu-toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

.aida-menu-toggle.active .aida-menu-toggle-text {
    opacity: 0;
}

/* ==========================================================================
   OVERLAY
   ========================================================================== */
.aida-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.aida-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   MENU PANEL (slide depuis la droite)
   ========================================================================== */
.aida-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    height: 100dvh;
    background: var(--aida-dark-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--aida-border);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.aida-mobile-menu.active {
    right: 0;
}

.aida-mobile-menu-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--aida-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aida-mobile-menu-title {
    font-family: var(--aida-font-mono, 'Space Mono', monospace);
    font-size: 0.75rem;
    color: var(--aida-yellow);
    letter-spacing: 0.15em;
}

.aida-mobile-menu-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 174, 0, 0.1);
    border: 1px solid rgba(255, 174, 0, 0.4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aida-yellow);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aida-mobile-menu-close:hover {
    background: rgba(255, 174, 0, 0.2);
    border-color: rgba(255, 174, 0, 0.6);
    box-shadow: 0 0 15px -5px rgba(255, 174, 0, 0.5);
}

.aida-mobile-menu-nav {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.aida-mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--aida-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.aida-mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--aida-border);
    transform: translateX(5px);
}

.aida-mobile-nav-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.aida-mobile-nav-icon svg {
    width: 20px;
    height: 20px;
}

/* Icon color variants */
.aida-mobile-nav-icon.services {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: var(--aida-primary);
}

.aida-mobile-nav-icon.dispo {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
}

.aida-mobile-nav-icon.rdv {
    background: rgba(255, 174, 0, 0.15);
    border: 1px solid rgba(255, 174, 0, 0.3);
    color: var(--aida-yellow);
}

.aida-mobile-nav-icon.newsletter {
    background: rgba(255, 174, 0, 0.15);
    border: 1px solid rgba(255, 174, 0, 0.3);
    color: var(--aida-yellow);
}

.aida-mobile-nav-icon.blog {
    background: rgba(0, 255, 245, 0.15);
    border: 1px solid rgba(0, 255, 245, 0.3);
    color: var(--aida-cyan);
}

.aida-mobile-nav-icon.contact {
    background: rgba(255, 0, 255, 0.15);
    border: 1px solid rgba(255, 0, 255, 0.3);
    color: var(--aida-magenta);
}

.aida-mobile-nav-content {
    display: flex;
    flex-direction: column;
}

.aida-mobile-nav-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--aida-text);
}

.aida-mobile-nav-desc {
    font-size: 0.8rem;
    color: var(--aida-text-dim);
    margin-top: 0.15rem;
}

/* Mobile CTA */
.aida-mobile-menu-cta {
    padding: 1.5rem;
    border-top: 1px solid var(--aida-border);
}

.aida-mobile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--aida-yellow), var(--aida-primary));
    border: none;
    border-radius: 12px;
    color: white;
    font-family: var(--aida-font-heading, 'Outfit', sans-serif);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aida-mobile-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(255, 174, 0, 0.5);
    color: white;
}

/* ==========================================================================
   SIDEBAR FLOTTANTE - ACCÈS RAPIDE
   ========================================================================== */
.aida-sidebar-quick {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.aida-sidebar-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.aida-sidebar-btn {
    width: 50px;
    height: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: none;
    border-radius: 12px 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.aida-sidebar-btn svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

/* Style RDV - Jaune */
.aida-sidebar-btn.rdv {
    background: rgba(255, 174, 0, 0.15);
    border: 1px solid rgba(255, 174, 0, 0.3);
    border-right: none;
    color: var(--aida-yellow);
    box-shadow: -3px 0 15px -5px rgba(255, 174, 0, 0.3);
}

.aida-sidebar-btn.rdv svg {
    stroke: var(--aida-yellow);
}

.aida-sidebar-btn.rdv:hover {
    width: 54px;
    background: rgba(255, 174, 0, 0.25);
    border-color: rgba(255, 174, 0, 0.5);
    box-shadow: -5px 0 25px -5px rgba(255, 174, 0, 0.5);
}

/* Style Contact - Magenta */
.aida-sidebar-btn.contact {
    background: rgba(255, 0, 255, 0.15);
    border: 1px solid rgba(255, 0, 255, 0.3);
    border-right: none;
    color: var(--aida-magenta);
    box-shadow: -3px 0 15px -5px rgba(255, 0, 255, 0.3);
}

.aida-sidebar-btn.contact svg {
    stroke: var(--aida-magenta);
}

.aida-sidebar-btn.contact:hover {
    width: 54px;
    background: rgba(255, 0, 255, 0.25);
    border-color: rgba(255, 0, 255, 0.5);
    box-shadow: -5px 0 25px -5px rgba(255, 0, 255, 0.5);
}

/* Style WhatsApp - Vert */
.aida-sidebar-btn.whatsapp {
    background: rgba(37, 211, 102, 0.15);
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-right: none;
    color: #25D366;
    box-shadow: -3px 0 15px -5px rgba(37, 211, 102, 0.3);
}

.aida-sidebar-btn.whatsapp svg {
    fill: #25D366;
}

.aida-sidebar-btn.whatsapp:hover {
    width: 54px;
    background: rgba(37, 211, 102, 0.25);
    border-color: rgba(37, 211, 102, 0.5);
    box-shadow: -5px 0 25px -5px rgba(37, 211, 102, 0.5);
}

/* Style Retour haut - Violet */
.aida-sidebar-btn.top {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-right: none;
    color: var(--aida-primary);
    box-shadow: -3px 0 15px -5px rgba(168, 85, 247, 0.3);
}

.aida-sidebar-btn.top svg {
    stroke: var(--aida-primary);
}

.aida-sidebar-btn.top:hover {
    width: 54px;
    background: rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: -5px 0 25px -5px rgba(168, 85, 247, 0.5);
}

/* Label tooltip */
.aida-sidebar-label {
    position: absolute;
    right: 58px;
    background: var(--aida-dark-card);
    border: 1px solid var(--aida-border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--aida-text);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: var(--aida-font-heading, 'Outfit', sans-serif);
}

.aida-sidebar-label::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--aida-border);
}

.aida-sidebar-item:hover .aida-sidebar-label {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* ==========================================================================
   BODY PADDING (prevent content under navbar)
   ========================================================================== */
body.aida-has-navbar {
    padding-top: 72px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 480px) {
    .aida-navbar {
        padding: 0.75rem 1rem;
    }

    .aida-nav-logo-text {
        font-size: 1.1rem;
    }

    .aida-nav-logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .aida-mobile-menu {
        width: 100%;
        max-width: 100%;
    }

    /* Sidebar plus petite sur mobile */
    .aida-sidebar-quick {
        gap: 0.35rem;
    }

    .aida-sidebar-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .aida-sidebar-btn:hover {
        width: 48px;
    }

    .aida-sidebar-label {
        display: none;
    }
    
    body.aida-has-navbar {
        padding-top: 60px;
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */
.aida-menu-toggle:focus,
.aida-mobile-menu-close:focus,
.aida-sidebar-btn:focus {
    outline: 2px solid var(--aida-yellow);
    outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .aida-navbar,
    .aida-menu-toggle,
    .aida-mobile-menu,
    .aida-menu-overlay,
    .aida-sidebar-btn,
    .aida-sidebar-label,
    .aida-mobile-nav-link,
    .aida-mobile-cta-btn {
        transition: none;
    }
}
