/**
 * Header V4 - Top Bar + Navbar
 * Structure en 2 niveaux pour meilleure UX
 * 
 * @package Kidzup
 * @version 4.0
 */

/* ============================
   TOP BAR
   ============================ */
.top-bar {
    font-size: 13px;
    background: #f8f9fa !important;
    z-index: 1050;
    position: relative;
}

.top-bar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    border: none;
    background: transparent;
    cursor: pointer;
}

.top-bar-icon:hover {
    background: #fff;
    color: #0cc0df;
}

.top-bar-icon .icon-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #0cc0df;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.top-bar-icon .icon-badge.bg-danger {
    background: #dc3545 !important;
}

/* Buttons - Lighter Style */
.top-bar-right .btn-sm {
    padding: 0.25rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 6px;
    line-height: 1.5;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.top-bar-right .btn-outline-primary {
    border-color: #0cc0df;
    color: #0cc0df;
}

.top-bar-right .btn-outline-primary:hover {
    background: #0cc0df;
    border-color: #0cc0df;
    color: #fff;
}

.top-bar-right .btn-primary {
    background: #0cc0df;
    border-color: #0cc0df;
    color: #fff;
}

.top-bar-right .btn-primary:hover {
    background: #0891b2;
    border-color: #0891b2;
}

/* ============================
   NAVBAR PRINCIPALE
   ============================ */
.site-header {
    background: #fff;
    z-index: 1040;
}

.site-header.sticky-top {
    top: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.navbar-brand .logo {
    max-height: 45px;
    width: auto;
}

.nav-link {
    color: #2c3e50 !important;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 15px;
}

.nav-link:hover {
    background: #f8f9fa;
    color: #0cc0df !important;
}

.nav-link i {
    opacity: 0.7;
}

.nav-link:hover i {
    opacity: 1;
}

/* ============================
   AVATARS
   ============================ */
.user-avatar-sm,
.user-avatar-md {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #0cc0df;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.user-avatar-md {
    width: 48px;
    height: 48px;
    font-size: 20px;
}

/* ============================
   DROPDOWN MON COMPTE
   ============================ */
.dropdown-menu {
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    animation: fadeInDown 0.2s;
    z-index: 1060 !important;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 1rem;
    border-radius: 12px 12px 0 0;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #0cc0df 0%, #0891b2 100%);
}

.dropdown-item {
    padding: 0.65rem 1.25rem;
    font-size: 14px;
    color: #2c3e50;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #0cc0df;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.dropdown-item:hover i {
    opacity: 1;
}

/* Sous-menu */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    margin-left: 0.125rem;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-divider {
    margin: 0.5rem 0;
    opacity: 0.15;
}

/* ============================
   CTA BUTTON
   ============================ */
.btn-gradient-primary {
    background: linear-gradient(135deg, #0cc0df 0%, #0891b2 100%);
    border: none;
    color: #fff;
    padding: 0.625rem 1.5rem;
    border-radius: 25px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(12, 192, 223, 0.3);
    transition: all 0.3s;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(12, 192, 223, 0.4);
    color: #fff;
}

/* ============================
   MODAL AJOUTER UN LIEU
   ============================ */
.add-place-card {
    display: block;
    text-align: center;
    padding: 1.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
    background: #fff;
}

.add-place-card:hover {
    border-color: #0cc0df;
    background: #f8fdff;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(12, 192, 223, 0.15);
}

.add-place-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 24px;
    color: #fff;
}

.add-place-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.add-place-desc {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 0;
}

.add-place-card:hover .add-place-title {
    color: #0cc0df;
}

/* ============================
   MEGA MENU (existant conservé)
   ============================ */
.mega-menu-container {
    width: 100%;
    left: 0 !important;
    right: 0;
    border: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 0;
    margin-top: 0;
}

.mega-menu-wrapper {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 2rem;
}

.mega-column {
    padding: 1rem;
}

.mega-column-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.mega-column-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.mega-column-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.mega-column-body {
    max-height: 400px;
    overflow-y: auto;
}

.mega-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 13px;
    transition: all 0.2s;
}

.mega-list-item:hover {
    background: #f8f9fa;
    color: #0cc0df;
    padding-left: 0.75rem;
}

.mega-list-item i {
    font-size: 10px;
    opacity: 0.5;
}

.mega-list-badge {
    margin-left: auto;
    background: #e9ecef;
    color: #6c757d;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
}

.mega-column-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.mega-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.mega-view-all:hover {
    gap: 0.75rem;
}

.mega-menu-footer {
    background: #f8f9fa;
    padding: 1.5rem;
    text-align: center;
    border-radius: 0 0 12px 12px;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 991px) {
    .top-bar {
        display: none;
    }
    
    .mega-menu-wrapper {
        grid-template-columns: 1fr;
    }
    
    .navbar-collapse {
        background: #fff;
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }
    
    .btn-gradient-primary {
        width: 100%;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand .logo {
        max-height: 35px;
    }
    
    .add-place-card {
        padding: 1rem 0.5rem;
    }
    
    .add-place-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
