/* =====================================
   HEADER UNIFIÉ - STYLES COMMUNS
   ===================================== */

/* Styles de base pour le header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.nav__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 78px;
    gap: var(--spacing-lg);
    padding: 0 20px;
}

/* Logo */
.nav__logo-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: #1f2a44;
    font-weight: 700;
    font-size: var(--font-size-lg);
}

.nav__logo-image {
    height: 32px;
    width: auto;
    transition: transform 0.2s ease;
}

.nav__logo-link:hover .nav__logo-image {
    transform: translateY(-1px);
}

.nav__logo-text {
    font-family: var(--font-primary);
}

/* Menu principal */
.nav__menu {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.nav__link {
    position: relative;
    font-weight: 600;
    padding: 10px 8px;
    text-decoration: none;
    color: #1f2a44;
    transition: color 0.2s ease;
}

.nav__link::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 6px;
    height: 2px;
    background: linear-gradient(90deg, #4e9cff, #7bc6ff);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
    border-radius: 2px;
}

.nav__link:hover,
.nav__link.active {
    color: #0f172a;
}

.nav__link:hover::after,
.nav__link.active::after {
    transform: scaleX(1);
}

.nav__services-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.nav__services-btn:focus-visible {
    outline: 2px solid #4e9cff;
    outline-offset: 2px;
}

.services-tags-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 320px;
    max-width: 520px;
    z-index: 1001;
}

.service-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f7f9fc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #1f2a44;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    width: 100%;
    min-width: 0;
}

.service-tag:hover {
    background: #edf4ff;
    border-color: rgba(78, 156, 255, 0.4);
    color: #0f172a;
}

.service-tag__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.65;
}

.services-tags-panel[hidden] {
    display: none;
}

@media (max-width: 990px) {
    .nav__services-wrapper {
        position: relative;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .services-tags-panel {
        position: static;
        transform: none;
        width: 100%;
        min-width: unset;
        max-width: unset;
        margin-top: 8px;
        box-shadow: none;
        border: 1px solid rgba(15, 23, 42, 0.08);
        padding: 10px;
    }

    .service-tag {
        flex: 1 1 100%;
    }
}

.nav__actions {
    margin-left: var(--spacing-lg);
}

.btn--primary {
    background: linear-gradient(135deg, #4e9cff, #7bc6ff);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(78, 156, 255, 0.18);
}

.btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(78, 156, 255, 0.24);
}

/* Menu hamburger (mobile) */
.nav__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    z-index: 1001;
}

.nav__hamburger span {
    display: block;
    width: 35px;
    height: 3px;
    background: #1f2a44;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav__hamburger:hover span {
    background: var(--primary-color);
}

/* Responsive */
@media (max-width: 990px) {
    .nav__menu {
        position: fixed;
        top: 78px;
        right: 0;
        width: 90%;
        background: #ffffff;
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 0;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        transform: translateX(100%);
        transition: transform 0.2s ease-out, opacity 0.2s ease, visibility 0.2s ease;
        gap: 0;
        z-index: 1000;
        overflow-y: auto;
        display: none;
        border-left: 1px solid rgba(0,123,255,0.1);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    
    .nav__menu.active {
        display: flex;
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    .nav__menu .nav__link {
        padding: 14px;
        margin: 4px 0;
        text-align: center;
        border-radius: var(--border-radius);
        transition: all 0.3s ease;
        font-size: 1.1rem;
        font-weight: 500;
        color: #1f2a44;
    }
    
    .nav__link::after {
        left: 24px;
        right: 24px;
    }
    
    .nav__dropdown {
        width: 100%;
    }
    
    .nav__dropdown-toggle {
        width: 100%;
        padding: var(--spacing-lg);
        text-align: center;
        background: #f5f7fb;
        color: #1f2a44;
        border-radius: var(--border-radius);
        font-size: 1.1rem;
        font-weight: 500;
        border: none;
        cursor: pointer;
        position: relative;
        touch-action: manipulation;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        min-height: 48px;
    }
    
    .nav__dropdown-toggle::after {
        content: '▼';
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.8rem;
        transition: transform 0.3s ease;
    }
    
    .nav__dropdown-toggle.active::after {
        transform: translateY(-50%) rotate(180deg);
    }
    
    .nav__menu .nav__dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        margin: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: rgba(248, 249, 250, 0.95) !important;
        border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    }
    
    .nav__actions {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: var(--spacing-lg);
    }
    
    .nav__hamburger {
        display: flex;
    }
    
    .nav__hamburger span {
        display: block;
        width: 30px;
        height: 3px;
        background: var(--dark-color);
        margin: 4px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    .nav__hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .nav__hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav__hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

/* Animation du header au scroll */
.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* Espacement pour le contenu fixe */
body {
    padding-top: 90px;
}
