/* ════════════════════════════════════════════════════════════════════════
   NAVBAR PUBLIC CENTRALISÉ — CVGator Premium Navigation System

   Unique source of truth pour toutes les pages publiques.
   Aucune duplication. Aucune variante locale.
   ════════════════════════════════════════════════════════════════════════ */

/* ── VARIABLES GLOBALES NAVBAR ── */
:root {
    /* Brand colors */
    --brand:        #00A78E;
    --brand-dark:   #009880;
    --brand-teal:   #00A78E;
    --text-main:    #293651;
    --text-muted:   #646F87;

    /* Fonts */
    --font:         'Open Sans', -apple-system, sans-serif;
    --font-heading: 'Montserrat', -apple-system, sans-serif;

    /* Navbar dimensions */
    --nav-height: 48px;
    --nav-font-size: 15px;
    --nav-font-weight: 600;
    --nav-gap: 22px;
    --nav-item-padding-y: 8px;
    --nav-btn-padding-x: 16px;
    --nav-btn-padding-y: 8px;
    --nav-btn-radius: 12px;

    /* Additional navbar colors */
    --nav-border-color: #f1f5f9;
    --nav-bg-color: rgba(255,255,255,0.97);
    --nav-shadow-color: rgba(0,0,0,.08);
    --nav-backdrop-blur: 12px;
}

/* ── NAVBAR CONTAINER ── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--nav-bg-color);
    backdrop-filter: blur(var(--nav-backdrop-blur));
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    border-bottom: 1px solid var(--nav-border-color);
    transition: box-shadow 0.3s ease;
}

.site-nav.scrolled {
    box-shadow: 0px 10px 30px 0px var(--nav-shadow-color);
}

/* ── NAVBAR LOGO ── */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    gap: 8px;
}

.nav-logo img {
    height: 32px;
    width: auto;
    display: block;
}

/* Badge V.B3 styling (inline in navbar) */
.nav-logo span {
    font-size: 11px;
    font-weight: 700;
    color: #7C3AED;
    background: rgba(124, 58, 237, 0.10);
    border: 1px solid rgba(124, 58, 237, 0.30);
    border-radius: 20px;
    padding: 2px 9px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ── NAVBAR ITEMS (LINKS) ── */
.nav-items {
    display: flex;
    align-items: center;
    gap: var(--nav-gap);
    flex-wrap: nowrap;
}

.nav-items a {
    font-size: var(--nav-font-size);
    font-weight: var(--nav-font-weight);
    color: var(--text-main);
    text-decoration: none;
    position: relative;
    padding: var(--nav-item-padding-y) 0;
    transition: color 0.2s ease;
    white-space: nowrap;
}

/* Active/hover underline effect */
.nav-items a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--brand);
    border-radius: 50px;
    opacity: 0;
    transition: width 0.3s ease-out, opacity 0.3s ease-out;
}

.nav-items a:hover::after,
.nav-items a.active::after {
    width: 60%;
    opacity: 1;
}

.nav-items a:hover {
    color: var(--brand);
}

/* ── NAVBAR BUTTONS ── */

/* Primary CTA button (Créer mon CV) */
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--nav-btn-padding-y) var(--nav-btn-padding-x);
    background: var(--brand);
    color: #fff;
    border-radius: var(--nav-btn-radius);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-cta:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 167, 142, 0.3);
}

/* Sign in button */
.nav-signin {
    display: inline-flex;
    align-items: center;
    padding: var(--nav-btn-padding-y) var(--nav-btn-padding-x);
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid #e2e8f0;
    border-radius: var(--nav-btn-radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-signin:hover {
    border-color: var(--brand);
    color: var(--brand);
}

/* Identify button (S'identifier) */
.nav-identify-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--nav-btn-padding-y) var(--nav-btn-padding-x);
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--nav-btn-radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    height: var(--nav-height);
}

.nav-identify-btn:hover {
    border-color: var(--brand);
    color: var(--brand);
    box-shadow: 0 2px 10px rgba(0, 167, 142, 0.12);
}

.nav-identify-btn:hover .fa-circle-user {
    color: var(--brand);
}

.nav-identify-btn .fa-circle-user {
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.2s ease;
}

.nav-identify-btn .fa-chevron-down {
    font-size: 10px;
}

/* ── LANGUAGE SELECTOR ── */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    flex-shrink: 0;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: #f8fafc;
    color: var(--text-muted);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    height: var(--nav-height);
}

.lang-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--text-main);
}

.lang-btn.active,
.ssm-lang-btn.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

/* ── DROPDOWNS ── */
#nav-auth-dropdown a:hover {
    background: #f8fafc !important;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font);
    transition: background 0.15s ease, color 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
}

.nav-dropdown-item:hover {
    background: #f8fafc;
}

.nav-dropdown-item:last-child {
    border-bottom: none;
}

.nav-dropdown-item i {
    color: var(--brand);
    width: 13px;
    text-align: center;
    flex-shrink: 0;
    font-size: 12px;
}

.nav-dropdown-item--cta {
    font-weight: 700;
    color: var(--brand);
}

.nav-dropdown-item--cta:hover {
    background: #f8fafc;
    color: var(--brand-dark);
}

/* ── MOBILE HAMBURGER MENU ── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.nav-hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.nav-hamburger[aria-expanded="true"] .nav-hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.nav-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 85vw);
    background: var(--color-surface, #ffffff);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    padding: 80px 24px 24px;
    overflow-y: auto;
    flex-direction: column;
    gap: 8px;
}

.nav-mobile-menu.open {
    display: flex;
}

.nav-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
}

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

/* ── RESPONSIVE DESIGN ── */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .nav-items {
        display: none;
    }
    .nav-signin {
        display: none;
    }
    #nav-guest {
        gap: 6px;
    }
    .nav-hamburger {
        display: flex;
    }
}

/* Laptop (1024px and below) */
@media (max-width: 1024px) {
    .nav-items {
        gap: 18px;
    }
    .nav-items a {
        font-size: 14px;
    }
    .lang-btn {
        padding: 5px 9px;
        font-size: 10px;
    }
}

/* Mobile (400px and below) */
@media (max-width: 400px) {
    .site-nav {
        padding: 0 12px;
    }
    #nav-auth-zone {
        gap: 6px;
    }
    .nav-identify-btn {
        font-size: 0 !important;
        gap: 0 !important;
        padding: 6px 8px !important;
    }
    .nav-identify-btn i {
        font-size: 14px !important;
    }
    .nav-items a {
        font-size: 13px !important;
    }
    .lang-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* ════════════════════════════════════════════════════════════════════════ */
