/**
 * Hunik AI Header Styles V2
 * Pill flottant desktop (top) + mobile (bottom), charte hunik.group
 */

/* Skip to content (RGAA) — masqué sauf focus clavier */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    background: var(--color-primary, #3854ff);
    color: #ffffff;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 9999;
    font-size: 0.875rem;
    border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* ============================================================
   HEADER — Desktop (pill flottant en haut)
   ============================================================ */
.hunik-header {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1200px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    padding: 14px 32px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

.hunik-header.scrolled {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.96);
}

.hunik-header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    pointer-events: all;
}

/* Logo */
.hunik-header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.hunik-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.hunik-logo__img {
    height: 32px;
    width: auto;
}

.hunik-logo__text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.hunik-logo__brand {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--font-primary, 'Montserrat', sans-serif);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.hunik-logo__text {
    color: var(--color-dark, #333333);
}

.hunik-logo__ai {
    background: linear-gradient(135deg, #3854ff 0%, #9024f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 18px;
    font-weight: 700;
}

.hunik-tagline {
    margin: 0;
    font-family: var(--font-secondary, 'Raleway', sans-serif);
    font-size: 9px;
    font-weight: 600;
    color: var(--color-primary, #3854ff);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Navigation desktop */
.hunik-nav--desktop {
    flex: 1;
    display: none;
}

@media (min-width: 768px) {
    .hunik-nav--desktop {
        display: block;
    }
}

.hunik-nav__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 32px;
    justify-content: center;
}

.hunik-nav__link {
    color: var(--color-text-light, #707070);
    text-decoration: none;
    font-family: var(--font-secondary, 'Raleway', sans-serif);
    font-size: 16px;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
}

.hunik-nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #3854ff 0%, #9024f5 100%);
    transition: width 0.3s ease;
}

.hunik-nav__link:hover {
    color: var(--color-dark, #333333);
}

.hunik-nav__link:hover::after {
    width: 100%;
}

/* CTA Button (desktop) */
.hunik-btn {
    padding: 10px 24px;
    border-radius: 999px;
    font-family: var(--font-secondary, 'Raleway', sans-serif);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.hunik-btn--primary {
    background: linear-gradient(135deg, #3854ff 0%, #9024f5 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(56, 84, 255, 0.2);
}

.hunik-btn--primary:hover {
    box-shadow: 0 6px 20px rgba(56, 84, 255, 0.35);
    transform: translateY(-2px);
}

@media (max-width: 767px) {
    .hunik-header__container > .hunik-btn {
        display: none;
    }
}

/* Hamburger menu (mobile) */
.hunik-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 24px;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .hunik-hamburger {
        display: none;
    }
}

.hunik-hamburger span {
    width: 100%;
    height: 2px;
    background: var(--color-dark, #333333);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hunik-hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hunik-hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hunik-hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================================
   NAVIGATION MOBILE — s'ouvre vers le haut
   ============================================================ */
.hunik-nav--mobile {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 24px;
    animation: slideUp 0.3s ease;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
    pointer-events: all;
}

.hunik-nav--mobile.active {
    display: block;
}

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

.hunik-nav--mobile .hunik-nav__list {
    flex-direction: column;
    gap: 12px;
    justify-content: flex-start;
}

.hunik-nav__cta {
    width: 100%;
    text-align: center;
    margin-top: 16px;
    display: inline-block !important;
}

/* ============================================================
   MOBILE — Header en bas (bottom bar)
   ============================================================ */
@media (max-width: 767px) {
    .hunik-header {
        top: auto;
        bottom: 20px;
        width: calc(100% - 32px);
        max-width: calc(100% - 80px);
        padding: 12px 20px;
        border-radius: 999px;
        /* Liquid glass effect */
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(32px) saturate(180%);
        -webkit-backdrop-filter: blur(32px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.38);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    .hunik-header.scrolled {
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }

    .hunik-header__container {
        gap: 12px;
    }

    .hunik-logo__brand {
        font-size: 18px;
    }

    .hunik-logo__ai {
        font-size: 16px;
    }

    .hunik-hamburger span {
        background: var(--color-dark, #333333);
    }

    /* Skip to content hidden on mobile */
    .skip-to-content {
        display: none;
    }
}

/* Pas de padding body : le hero passe derrière le header */
body {
    padding-top: 0;
}

@media (max-width: 767px) {
    body {
        padding-top: 0;
        padding-bottom: 0;
    }
}
