/* CSS SPECTACULAIRE AMÉLIORÉ - THÈME BLEU FONCÉ */
/* RESET ET VARIABLES */
:root {
    --primary-gradient: linear-gradient(135deg, #1565C0 0%, #0D47A1 50%, #1976D2 100%);
    --navbar-height: 80px;
    --navbar-height-scrolled: 70px;
    --primary-blue: #1565C0;
    --dark-blue: #0D47A1;
    --accent-blue: #1976D2;
}

/* FIX POUR LE CONTENU SOUS LE HEADER */
body {
    padding-top: var(--navbar-height);
}

/* ANIMATIONS GLOBALES */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse-glow {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 20px rgba(21, 101, 192, 0.5);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(21, 101, 192, 0.8);
    }
}

@keyframes particle-float {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(-200px, -100vh) rotate(720deg);
        opacity: 0;
    }
}

/* NAVBAR PRINCIPALE */
.spectacular-navbar {
    background: rgba(10, 10, 10, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: var(--navbar-height);
    z-index: 1050;
}

.spectacular-navbar.scrolled {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    padding: 0.8rem 0;
    height: var(--navbar-height-scrolled);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* Particules dans le header */
.header-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.header-particles::before,
.header-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(21, 101, 192, 0.6);
    border-radius: 50%;
    animation: particle-float 15s infinite linear;
}

.header-particles::after {
    animation-delay: 7s;
    left: 80%;
}

/* LOGO AMÉLIORÉ */
.logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(21, 101, 192, 0.4) 0%, transparent 70%);
    filter: blur(20px);
    animation: pulse-glow 3s ease infinite;
}

.logo-img {
    height: 45px;
    width: auto;
    position: relative;
    z-index: 2;
    filter: brightness(1.2) drop-shadow(0 0 15px rgba(21, 101, 192, 0.5));
    transition: all 0.4s ease;
}

.spectacular-brand:hover .logo-img {
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.4) drop-shadow(0 0 25px rgba(21, 101, 192, 0.8));
}

/* NAVIGATION CENTRALE */
.spectacular-nav {
    gap: 2.5rem;
}

.spectacular-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 16px;
    position: relative;
    padding: 0.8rem 1.2rem !important;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.link-text {
    position: relative;
    z-index: 2;
}

.spectacular-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--primary-gradient);
    transition: transform 0.3s ease;
}

.spectacular-link:hover::before {
    transform: translateX(-50%) scaleX(1);
}

/* BOUTON CRÉER MAGIQUE */
.magic-item {
    position: relative;
}

.create-special {
    background: var(--primary-gradient);
    background-size: 200% 200%;
    color: white !important;
    padding: 0.8rem 2rem !important;
    border-radius: 50px;
    font-weight: 700;
    animation: gradientShift 3s ease infinite;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.magic-hover {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.create-special:hover .magic-hover {
    opacity: 1;
}

.create-special:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(21, 101, 192, 0.5);
}

.create-icon {
    display: inline-block;
    margin-right: 8px;
    animation: float 3s ease infinite;
}

/* BOUTONS D'AUTHENTIFICATION SPECTACULAIRES */
.auth-item {
    margin-left: 1rem;
}

.signin-btn-spectacular {
    position: relative;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    font-size: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    display: inline-block;
    transition: all 0.4s ease;
    overflow: hidden;
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(21, 101, 192, 0.5);
    border-radius: 50%;
    transition: all 0.5s ease;
}

.signin-btn-spectacular:hover .btn-glow {
    width: 150px;
    height: 150px;
}

.signin-btn-spectacular:hover {
    color: white !important;
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(21, 101, 192, 0.3);
}

.signup-btn-spectacular {
    position: relative;
    background: white;
    color: var(--primary-blue) !important;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none !important;
    display: inline-block;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
}

.btn-inner {
    position: relative;
    display: block;
}

.btn-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.btn-particles span {
    position: absolute;
    display: block;
    width: 4px;
    height: 4px;
    background: var(--primary-blue);
    border-radius: 50%;
    opacity: 0;
}

.signup-btn-spectacular:hover .btn-particles span {
    animation: particle-explosion 0.6s ease forwards;
}

.signup-btn-spectacular:hover .btn-particles span:nth-child(1) {
    animation-delay: 0s;
    --x: -40px;
    --y: -40px;
}

.signup-btn-spectacular:hover .btn-particles span:nth-child(2) {
    animation-delay: 0.1s;
    --x: 40px;
    --y: -40px;
}

.signup-btn-spectacular:hover .btn-particles span:nth-child(3) {
    animation-delay: 0.2s;
    --x: 0;
    --y: 40px;
}

@keyframes particle-explosion {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y));
        opacity: 0;
    }
}

.signup-btn-spectacular:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(21, 101, 192, 0.4);
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
}

/* ICÔNES D'ACTION */
.action-nav {
    gap: 1rem;
}

.action-icon {
    margin: 0;
}

.icon-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
}

.icon-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.icon-btn svg {
    transition: transform 0.3s ease;
}

.icon-btn:hover svg {
    transform: scale(1.15);
}

/* RECHERCHE AMÉLIORÉE */
.search-container {
    position: relative;
}

.search-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 15px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    min-width: 350px;
}

.search-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.search-input-spectacular {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 15px 25px;
    color: white;
    width: 100%;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-input-spectacular:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 30px rgba(21, 101, 192, 0.3);
}

.search-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-close:hover {
    color: white;
    transform: rotate(90deg);
}

/* NOTIFICATIONS AMÉLIORÉES */
.notification-wrapper {
    position: relative;
}

.pulse-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-blue);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 50px;
    min-width: 20px;
    text-align: center;
    animation: pulse-glow 2s ease infinite;
}

/* USER DROPDOWN AMÉLIORÉ */
.user-dropdown-wrapper {
    position: relative;
}

.user-trigger-spectacular {
    display: flex !important;
    align-items: center;
    padding: 0.5rem 1rem !important;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-trigger-spectacular:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(21, 101, 192, 0.5);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name-spectacular {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-avatar-wrapper {
    position: relative;
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, rgba(21, 101, 192, 0.4) 0%, transparent 70%);
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-trigger-spectacular:hover .avatar-glow {
    opacity: 1;
}

.user-avatar-spectacular {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(21, 101, 192, 0.5);
    transition: all 0.3s ease;
    object-fit: cover;
    position: relative;
}

.user-trigger-spectacular:hover .user-avatar-spectacular {
    border-color: var(--primary-blue);
    transform: scale(1.1);
}

/* DROPDOWN MENU ULTRA MODERNE */
.spectacular-dropdown {
    background: rgba(15, 15, 15, 0.98) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    padding: 0 !important;
    margin-top: 15px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    min-width: 280px;
    overflow: hidden;
}

.dropdown-header {
    background: rgba(21, 101, 192, 0.1);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary-blue);
}

.header-name {
    font-weight: 700;
    color: white;
    font-size: 16px;
}

.header-email {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.spectacular-dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 15px 25px !important;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    gap: 15px;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.spectacular-dropdown-item::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(21, 101, 192, 0.2), transparent);
    transition: left 0.5s ease;
}

.spectacular-dropdown-item:hover::before {
    left: 100%;
}

.spectacular-dropdown-item:hover {
    background: rgba(21, 101, 192, 0.1) !important;
    color: white !important;
    padding-left: 30px !important;
}

.dropdown-icon {
    font-size: 20px;
    width: 30px;
    text-align: center;
}

.logout-item:hover {
    background: rgba(13, 71, 161, 0.2) !important;
}

/* HAMBURGER MENU AMÉLIORÉ */
.spectacular-toggler {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
}

.toggler-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.toggler-bar {
    display: block;
    width: 28px;
    height: 3px;
    background: white;
    margin: 4px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.spectacular-toggler[aria-expanded="true"] .toggler-bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.spectacular-toggler[aria-expanded="true"] .toggler-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.spectacular-toggler[aria-expanded="true"] .toggler-bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* MENU MOBILE AMÉLIORÉ */
@media (max-width: 767px) {
    body {
        padding-top: calc(var(--navbar-height) - 10px);
    }
    
    .navbar-collapse {
        position: absolute !important;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        padding: 2rem 1rem !important;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-top: none;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
        max-height: calc(100vh - var(--navbar-height));
        overflow-y: auto;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
    }
    
    .navbar-collapse.collapsing {
        transition: none;
        height: auto !important;
    }
    
    .navbar-collapse.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1040;
        display: none;
    }
    
    .mobile-overlay.show {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    .spectacular-nav {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .spectacular-link {
        width: 100%;
        text-align: center;
        padding: 1rem !important;
        font-size: 18px;
    }
    
    .create-special {
        display: block;
        text-align: center;
    }
    
    .action-nav {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .auth-item {
        margin: 0;
        width: 100%;
    }
    
    .signin-btn-spectacular,
    .signup-btn-spectacular {
        display: block;
        text-align: center;
        width: 100%;
    }
    
    .search-popup {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        width: 90%;
        max-width: 400px;
    }
    
    .search-popup.active {
        transform: translate(-50%, -50%) scale(1);
    }
    
    /* Décaler le logo sur mobile */
    .spectacular-brand {
        margin-left: 15px;
    }
    
    /* Fix pour le menu hamburger coupé */
    .spectacular-toggler {
        margin-right: 15px;
    }
}

/* DARK/LIGHT MODE */
.navbar-light .spectacular-link,
.navbar-light .icon-btn,
.navbar-light .user-name-spectacular {
    color: rgba(0, 0, 0, 0.8) !important;
}

.navbar-light.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

.navbar-light .toggler-bar {
    background: #333;
}

.navbar-light .signin-btn-spectacular {
    color: #333 !important;
    border-color: rgba(0, 0, 0, 0.3);
}

.navbar-light .signup-btn-spectacular {
    background: var(--primary-blue);
    color: white !important;
}

/* Fix pour Bootstrap 5 si nécessaire */
.dropdown-toggle::after {
    display: none;
}