/* ================================================================
   nav.css — Navigation Ovision
   #1a3963 bleu | #c9a87c or | #c42020 rouge CTA | #3aaa8c teal
   ================================================================ */

:root {
    --nav-height:       80px;
    --nav-height-mob:   64px;
    --nav-bg:           #ffffff;
    --nav-blue:         #1a3963;
    --nav-gold:         #c9a87c;
    --nav-red:          #c42020;
    --nav-red-dark:     #a81a1a;
    --nav-teal:         #3aaa8c;
    --nav-link-color:   #1a3963;
    --nav-shadow:       0 2px 12px rgba(26,57,99,.08);
    --nav-transition:   .22s ease;
}

/* ----------------------------------------------------------------
   Décalage body
   ---------------------------------------------------------------- */
body { padding-top: var(--nav-height); }

@media (max-width: 991px) {
    body { padding-top: var(--nav-height-mob); }
}

/* ================================================================
   HEADER
   ================================================================ */
.nav-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--nav-bg);
    box-shadow: var(--nav-shadow);
    z-index: 1000;
}

.nav-inner {
    display: flex;
    align-items: center;
    height: var(--nav-height);
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 72px);
    gap: 32px;
}


.nav-header.scrolled {
    box-shadow: 0 4px 24px rgba(26,57,99,.14);
}

/* ----------------------------------------------------------------
   Logo
   ---------------------------------------------------------------- */
.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}
.nav-logo-img {
    height: 44px;
    width: auto;
    display: block;
}

/* ----------------------------------------------------------------
   Liens desktop
   ---------------------------------------------------------------- */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
}

.nav-link {
    position: relative;
    display: inline-block;
    padding: 10px 14px;
    color: var(--nav-link-color);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color var(--nav-transition);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 14px; right: 14px;
    height: 2px;
    background: var(--nav-teal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--nav-transition);
}
.nav-link:hover        { color: var(--nav-teal); }
.nav-link:hover::after { transform: scaleX(1); }

/* Actif uniquement après scroll (classe ajoutée par JS) */
.nav-link.active        { color: var(--nav-teal); }
.nav-link.active::after { transform: scaleX(1); }

/* ----------------------------------------------------------------
   Actions droite (CTA + téléphone)
   ---------------------------------------------------------------- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Hauteur commune aux deux boutons actions */
:root { --nav-btn-height: 44px; }

/* CTA rouge */
.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: var(--nav-btn-height);
    padding: 0 18px;
    background: var(--nav-red);
    color: #fff;
    text-decoration: none;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.3;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background var(--nav-transition), transform var(--nav-transition);
    white-space: nowrap;
}
.nav-cta:hover {
    background: var(--nav-red-dark);
    transform: translateY(-1px);
}

/* Bouton téléphone or */
.nav-phone-btn {
    display: inline-flex;
    height: var(--nav-btn-height);
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    background: var(--nav-gold);
    color: #fff;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    border-radius: 4px;
    white-space: nowrap;
    transition: background var(--nav-transition);
}
.nav-phone-btn svg {
    width: 16px;
    height: 16px;
    fill: #fff;
    flex-shrink: 0;
}
.nav-phone-btn:hover { background: #b8966a; }

/* ----------------------------------------------------------------
   Burger (mobile)
   ---------------------------------------------------------------- */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    margin-left: auto;
    -webkit-tap-highlight-color: transparent;
}
.burger-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--nav-blue);
    border-radius: 2px;
    transition: transform var(--nav-transition), opacity var(--nav-transition);
}
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(2) {
    opacity: 0; transform: scaleX(0);
}
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ================================================================
   OVERLAY MOBILE
   ================================================================ */
.nav-overlay {
    position: fixed;
    top: calc(var(--nav-height-mob) + 3px); /* hauteur header + border teal */
    left: 0; right: 0; bottom: 0;
    background: #fff;
    z-index: 990;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity var(--nav-transition), transform var(--nav-transition);
}
.nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-overlay-links {
    display: flex;
    flex-direction: column;
    padding: 16px 24px 0;
    flex: 1;
}

.nav-overlay-link {
    display: block;
    padding: 16px 0;
    color: var(--nav-blue);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-bottom: 1px solid #eef0f3;
    transition: color var(--nav-transition), padding-left var(--nav-transition);
}
.nav-overlay-link:hover { color: var(--nav-teal); padding-left: 6px; }

.nav-overlay-footer {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-overlay-cta {
    display: block;
    text-align: center;
    padding: 14px;
    font-size: .9rem;
    border-radius: 6px;
}

.nav-overlay-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--nav-gold);
    color: #fff;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 700;
    border-radius: 6px;
    transition: background var(--nav-transition);
}
.nav-overlay-phone svg {
    width: 18px; height: 18px;
    fill: #fff; flex-shrink: 0;
}
.nav-overlay-phone:hover { background: #b8966a; }

/* Backdrop */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26,57,99,.3);
    z-index: 980;
    opacity: 0;
    transition: opacity var(--nav-transition);
}
.nav-backdrop.visible { display: block; opacity: 1; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (min-width: 992px) {
    .nav-burger  { display: none !important; }
    .nav-overlay { display: none !important; }
    .nav-backdrop{ display: none !important; }
}

@media (max-width: 991px) {
    .nav-inner   { height: var(--nav-height-mob); padding: 0 20px; gap: 16px; }
    .nav-logo-img{ height: 34px; }
    .nav-links   { display: none; }
    .nav-actions { display: none; }
    .nav-burger  { display: flex; }
}
