/* =========================================================
   PROGRAMME EXCELLENCE — HEADER V2
   Coltec Core Framework
========================================================= */

/* =========================================================
   01. VARIABLES
========================================================= */

:root {
    --pe-header-navy: #061b46;
    --pe-header-navy-deep: #03132f;
    --pe-header-blue: #0a3474;
    --pe-header-gold: #e4b52e;
    --pe-header-gold-light: #ffd86b;
    --pe-header-white: #ffffff;
    --pe-header-text: #10213f;
    --pe-header-muted: #6d778b;
    --pe-header-border: rgba(6, 27, 70, 0.09);

    --pe-header-height: 82px;
    --pe-notice-height: 30px;
    --pe-header-container: 1500px;

    --pe-header-radius: 12px;
    --pe-header-transition: 260ms ease;
}

/* =========================================================
   02. RESET LOCAL
========================================================= */

.pe-header,
.pe-header *,
.pe-global-notice,
.pe-global-notice * {
    box-sizing: border-box;
}

body.pe-menu-open {
    overflow: hidden;
}

.pe-header a,
.pe-global-notice a {
    text-decoration: none;
}

/* =========================================================
   03. ACCESSIBILITÉ
========================================================= */

.pe-skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100000;
    padding: 12px 18px;
    border-radius: 8px;
    background: var(--pe-header-navy);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform var(--pe-header-transition);
}

.pe-skip-link:focus {
    transform: translateY(0);
}

.pe-header a:focus-visible,
.pe-header button:focus-visible {
    outline: 3px solid rgba(228, 181, 46, 0.55);
    outline-offset: 4px;
}

/* =========================================================
   04. HEADER PRINCIPAL
========================================================= */

.pe-header {
    position: relative;
    z-index: 9999;
    width: 100%;
    background: rgba(255, 255, 255, 0.99);
    border-bottom: 1px solid var(--pe-header-border);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 8px 30px rgba(5, 26, 66, 0.045);
    transition:
        background var(--pe-header-transition),
        box-shadow var(--pe-header-transition);
}

.pe-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(228, 181, 46, 0.30),
        transparent
    );
    pointer-events: none;
}

.pe-header.is-scrolled {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 14px 40px rgba(3, 19, 47, 0.13),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.pe-header-glow {
    position: absolute;
    top: 0;
    left: 50%;
    width: min(520px, 52vw);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(228, 181, 46, 0.75),
        transparent
    );
    pointer-events: none;
}

.pe-header-inner {
    width: min(
        var(--pe-header-container),
        calc(100% - 64px)
    );
    min-height: var(--pe-header-height);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
}

/* =========================================================
   05. LOGO
========================================================= */

.pe-header-brand {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-width: 0;
}

.pe-header-logo {
    display: block;
    width: 200px;
    max-width: 100%;
    max-height: 50px;
    height: auto;
    object-fit: contain;
    object-position: left center;
    transition:
        transform var(--pe-header-transition),
        filter var(--pe-header-transition);
}

.pe-header-brand:hover .pe-header-logo {
    transform: translateY(-1px);
    filter: drop-shadow(0 8px 16px rgba(6, 27, 70, 0.11));
}

/* =========================================================
   06. NAVIGATION DESKTOP
========================================================= */

.pe-desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 1.7vw, 30px);
    min-width: 0;
}

.pe-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--pe-header-text);
    font-size: 15px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.005em;
    white-space: nowrap;
    transition:
        color var(--pe-header-transition),
        transform var(--pe-header-transition);
}

.pe-nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 0;
    height: 2.5px;
    border-radius: 999px;
    transform: translateX(-50%);
    background: linear-gradient(
        90deg,
        var(--pe-header-gold),
        var(--pe-header-gold-light)
    );
    box-shadow: 0 0 12px rgba(228, 181, 46, 0.45);
    transition: width var(--pe-header-transition);
}

.pe-nav-link:hover,
.pe-nav-link:focus-visible,
.pe-nav-link.is-current {
    color: var(--pe-header-navy);
}

.pe-nav-link:hover {
    transform: translateY(-1px);
}

.pe-nav-link:hover::after,
.pe-nav-link:focus-visible::after,
.pe-nav-link.is-current::after {
    width: 100%;
}

/* =========================================================
   07. ACTIONS DESKTOP
========================================================= */

.pe-header-actions {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-left: 22px;
}

.pe-header-actions::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 26px;
    transform: translateY(-50%);
    background: var(--pe-header-border);
}

/* Langues */

.pe-language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    min-height: 40px;
    border: 1px solid var(--pe-header-border);
    border-radius: 11px;
    background: #f7f9fc;
}

.pe-language {
    display: grid;
    place-items: center;
    width: 34px;
    height: 30px;
    border-radius: 8px;
    color: var(--pe-header-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    transition:
        background var(--pe-header-transition),
        color var(--pe-header-transition),
        box-shadow var(--pe-header-transition);
}

.pe-language:hover {
    color: var(--pe-header-navy);
}

.pe-language-active {
    background: var(--pe-header-navy);
    color: #fff;
    box-shadow: 0 7px 16px rgba(6, 27, 70, 0.18);
}

.pe-language-active:hover {
    color: #fff;
}

.pe-language-divider {
    display: none;
}

/* CTA */

.pe-header-cta {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid rgba(228, 181, 46, 0.22);
    border-radius: 11px;
    background: linear-gradient(
        135deg,
        #071e4c 0%,
        #0b3577 55%,
        #061b46 100%
    );
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow:
        0 12px 24px rgba(6, 27, 70, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transition:
        transform var(--pe-header-transition),
        box-shadow var(--pe-header-transition);
}

.pe-header-cta::before {
    content: "";
    position: absolute;
    top: -120%;
    left: -70%;
    width: 48%;
    height: 340%;
    transform: rotate(24deg);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.28),
        transparent
    );
    transition: left 650ms ease;
}

.pe-header-cta:hover::before {
    left: 135%;
}

.pe-header-cta:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow:
        0 17px 32px rgba(6, 27, 70, 0.24),
        0 0 0 1px rgba(228, 181, 46, 0.30);
}

.pe-header-cta svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex: 0 0 auto;
}

/* =========================================================
   08. BOUTON MOBILE
========================================================= */

.pe-mobile-toggle {
    display: none;
    position: relative;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--pe-header-border);
    border-radius: 13px;
    background: linear-gradient(145deg, #ffffff, #f3f6fb);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(6, 27, 70, 0.08);
}

.pe-mobile-toggle span {
    position: absolute;
    left: 50%;
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: var(--pe-header-navy);
    transform: translateX(-50%);
    transition:
        top 280ms ease,
        transform 280ms ease,
        opacity 180ms ease;
}

.pe-mobile-toggle span:nth-child(1) {
    top: 15px;
}

.pe-mobile-toggle span:nth-child(2) {
    top: 22px;
}

.pe-mobile-toggle span:nth-child(3) {
    top: 29px;
}

.pe-mobile-toggle.is-active span:nth-child(1) {
    top: 22px;
    transform: translateX(-50%) rotate(45deg);
}

.pe-mobile-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.pe-mobile-toggle.is-active span:nth-child(3) {
    top: 22px;
    transform: translateX(-50%) rotate(-45deg);
}

/* =========================================================
   09. PANNEAU MOBILE
========================================================= */

.pe-mobile-panel {
    display: none;
}

.pe-mobile-panel-inner {
    width: min(100% - 34px, 560px);
    min-height: 100%;
    margin: 0 auto;
    padding:
        28px
        0
        calc(28px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
}

.pe-mobile-nav {
    display: flex;
    flex-direction: column;
}

.pe-mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: clamp(17px, 5vw, 21px);
    font-weight: 650;
    letter-spacing: -0.02em;
    transition:
        color 220ms ease,
        padding 220ms ease;
}

.pe-mobile-nav a span:last-child {
    color: var(--pe-header-gold);
    font-size: 21px;
    transition: transform 220ms ease;
}

.pe-mobile-nav a:hover {
    color: var(--pe-header-gold-light);
    padding-left: 6px;
}

.pe-mobile-nav a:hover span:last-child {
    transform: translateX(4px);
}

.pe-mobile-footer {
    margin-top: auto;
    padding-top: 34px;
}

.pe-mobile-languages {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.pe-mobile-languages a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 17px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    font-weight: 700;
}

.pe-mobile-languages a.is-active {
    border-color: rgba(228, 181, 46, 0.5);
    background: rgba(228, 181, 46, 0.12);
    color: var(--pe-header-gold-light);
}

.pe-mobile-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 13px;
    background: linear-gradient(
        135deg,
        var(--pe-header-gold),
        var(--pe-header-gold-light)
    );
    color: var(--pe-header-navy-deep);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.22);
}

/* =========================================================
   10. BANDEAU INTERNATIONAL
========================================================= */

.pe-global-notice {
    position: relative;
    z-index: 80;
    overflow: hidden;
    width: 100%;
    min-height: var(--pe-notice-height);
    display: flex;
    align-items: center;
    background: linear-gradient(
        90deg,
        #03132f 0%,
        #08285d 50%,
        #03132f 100%
    );
    border-bottom: 1px solid rgba(228, 181, 46, 0.17);
}

.pe-global-notice::after {
    content: "";
    position: absolute;
    top: 0;
    left: -25%;
    width: 24%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.06),
        transparent
    );
    animation: peNoticeSweep 7s linear infinite;
}

.pe-global-notice-inner {
    position: relative;
    z-index: 2;
    width: min(
        var(--pe-header-container),
        calc(100% - 64px)
    );
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.pe-global-icon {
    display: inline-flex;
    color: var(--pe-header-gold);
}

.pe-global-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.pe-global-text {
    color: rgba(255, 255, 255, 0.92);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.085em;
    text-transform: uppercase;
}

.pe-global-line {
    width: 40px;
    height: 1px;
    margin-left: 3px;
    background: linear-gradient(
        90deg,
        var(--pe-header-gold),
        transparent
    );
}

@keyframes peNoticeSweep {
    from {
        left: -25%;
    }

    to {
        left: 120%;
    }
}

/* =========================================================
   11. ÉCRANS INTERMÉDIAIRES
========================================================= */

@media (max-width: 1320px) {

    .pe-header-inner {
        width: min(100% - 40px, 1240px);
        grid-template-columns: 190px minmax(0, 1fr) auto;
        gap: 20px;
    }

    .pe-header-logo {
        width: 175px;
        max-height: 44px;
    }

    .pe-desktop-nav {
        gap: 16px;
    }

    .pe-nav-link {
        font-size: 14px;
    }

    .pe-header-cta {
        width: 46px;
        padding: 0;
    }

    .pe-header-cta span {
        display: none;
    }
}

/* =========================================================
   12. TABLETTE ET MOBILE
========================================================= */

@media (max-width: 980px) {

    :root {
        --pe-header-height: 70px;
        --pe-notice-height: 28px;
    }

    .pe-header.is-scrolled {
        position: sticky;
    }

    .pe-header-inner {
        width: calc(100% - 28px);
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 14px;
        min-height: var(--pe-header-height);
    }

    .pe-header-logo {
        width: clamp(160px, 42vw, 210px);
        max-height: 44px;
    }

    .pe-desktop-nav,
    .pe-header-actions {
        display: none;
    }

    .pe-mobile-toggle {
        display: block;
    }

    .pe-mobile-panel {
        position: fixed;
        top: var(--pe-header-height);
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateY(-10px);
        background:
            radial-gradient(
                circle at top right,
                rgba(31, 82, 154, 0.5),
                transparent 38%
            ),
            linear-gradient(
                155deg,
                #03132f 0%,
                #071f50 58%,
                #0a3474 100%
            );
        transition:
            opacity 280ms ease,
            visibility 280ms ease,
            transform 280ms ease;
    }

    .pe-mobile-panel.is-open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .pe-global-notice-inner {
        width: calc(100% - 28px);
        gap: 7px;
    }

    .pe-global-text {
        font-size: 9px;
        letter-spacing: 0.065em;
        text-align: center;
    }

    .pe-global-line {
        display: none;
    }
}

/* =========================================================
   13. PETITS TÉLÉPHONES
========================================================= */

@media (max-width: 430px) {

    .pe-header-inner {
        width: calc(100% - 22px);
    }

    .pe-header-logo {
        width: min(170px, 48vw);
        max-height: 38px;
    }

    .pe-mobile-toggle {
        width: 43px;
        height: 43px;
        border-radius: 12px;
    }

    .pe-mobile-toggle span:nth-child(1) {
        top: 13px;
    }

    .pe-mobile-toggle span:nth-child(2) {
        top: 20px;
    }

    .pe-mobile-toggle span:nth-child(3) {
        top: 27px;
    }

    .pe-mobile-toggle.is-active span:nth-child(1),
    .pe-mobile-toggle.is-active span:nth-child(3) {
        top: 20px;
    }

    .pe-global-text {
        font-size: 8.5px;
    }
}

/* =========================================================
   14. ANIMATIONS RÉDUITES
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .pe-header *,
    .pe-global-notice *,
    .pe-global-notice::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
