.ams-header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 100;
    width: 100%;
    background: transparent;
    transition:
        background .28s ease,
        box-shadow .28s ease,
        backdrop-filter .28s ease;
}

.ams-header__inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.ams-brand {
    display: inline-flex;
    flex-direction: column;
    flex: 0 0 auto;
    width: fit-content;
}

.ams-brand__name {
    color: #07182d;
    font-size: 26px;
    font-weight: 800;
    line-height: .9;
    letter-spacing: -1px;
}

.ams-brand__name span {
    color: var(--ams-blue);
}

.ams-brand__tagline {
    margin-top: 6px;
    color: #69809e;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 2.1px;
    text-transform: uppercase;
}

.ams-header__nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;
}

/* ==========================================================================
   PC — HEADER ALIGNE SUR AXE HERO
   ========================================================================== */

@media (min-width: 981px) {

    /*
     * Même axe horizontal que le contenu éditorial du hero.
     * Le padding déplace le contenu du header sans déplacer
     * ni élargir le shell lui-même.
     */
    .ams-header__inner {
        box-sizing: border-box;
        padding-left:
            min(
                8.333%,
                96px
            );
        gap: 48px;
    }

    /*
     * Le menu suit maintenant naturellement le logo.
     * Cette règle neutralise uniquement la marge desktop
     * historique du menu sans toucher responsive.css.
     */
    .ams-header__inner > .ams-header__nav {
        margin-left: 0;
    }
}

.ams-header__nav a {
    position: relative;
    color: #0b1c36;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.ams-header__nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    background: var(--ams-blue);
    transition:
        width .2s ease;
}

.ams-header__nav a:hover::after {
    width: 100%;
}

.ams-button--header {
    display: none;
    margin-left: auto;
    white-space: nowrap;
}

.ams-header.has-hero-passed .ams-button--header {
    display: inline-flex;
    animation:
        ams-header-cta-in
        .24s
        ease-out
        both;
}

@keyframes ams-header-cta-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ams-header.has-hero-passed .ams-button--header {
        animation: none;
    }
}

.ams-header__toggle {
    display: none;
    margin-left: auto;
}

.ams-header.is-scrolled {
    position: fixed;
    background:
        rgba(255, 255, 255, .88);
    backdrop-filter: blur(18px);
    box-shadow:
        0 8px 40px
        rgba(5, 26, 52, .08);
}

/* HEADER-9B — LOGIN + AUTOMATION
   ========================================================================== */

.ams-header__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.ams-header__login {
    position: relative;
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: #0b1c36;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}

.ams-header__login::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 7px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--ams-blue, #0878ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}

.ams-header__login:hover::after {
    transform: scaleX(1);
}

/*
 * Le CTA du header est désormais une action produit globale.
 * Il reste visible avec le lien de connexion.
 */

.ams-header__actions .ams-button--header {
    display: inline-flex;
    margin-left: 0;
    white-space: nowrap;
}

.ams-header.has-hero-passed
.ams-header__actions
.ams-button--header {
    display: inline-flex;
    animation: none;
}


/* HEADER-9C — LOGIN VISIBILITY
   ========================================================================== */

/*
 * Sur la Home le groupe d'actions se trouve devant
 * la photographie du Hero.
 */

.ams-header--home:not(.is-scrolled) .ams-header__login {
    color: #ffffff;
    text-shadow:
        0 1px 14px rgba(0, 0, 0, .52);
}

.ams-header--home:not(.is-scrolled)
.ams-header__login::after {
    background: #ffffff;
}

/*
 * Dès que le header devient blanc au scroll,
 * le lien reprend son traitement sombre normal.
 */

.ams-header--home.is-scrolled .ams-header__login {
    color: #0b1c36;
    text-shadow: none;
}

.ams-header__login-mobile {
    display: none;
}


/* HEADER CTA SIGNATURE — AUTOMATION
   ========================================================================== */

/*
 * CTA produit principal AMS Focus.
 *
 * Objectifs :
 * - distinction immédiate du reste de la navigation ;
 * - rendu premium, technologique et identifiable ;
 * - mouvement discret, jamais agressif ;
 * - conservation de la lisibilité sur tous les fonds.
 */

.ams-header__actions .ams-button--header {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    min-height: 54px;
    padding: 0 13px 0 24px;
    gap: 16px;

    border:
        1px solid
        rgba(255, 255, 255, .30);

    border-radius: 14px;

    color: #ffffff;

    background:
        linear-gradient(
            115deg,
            #075ee8 0%,
            #0878ff 46%,
            #009dff 100%
        );

    box-shadow:
        0 12px 32px
        rgba(0, 112, 255, .28),
        0 4px 12px
        rgba(0, 78, 190, .16),
        inset 0 1px 0
        rgba(255, 255, 255, .30);

    font-weight: 750;
    letter-spacing: -.01em;

    transition:
        transform .24s ease,
        box-shadow .24s ease,
        filter .24s ease;
}

/*
 * Halo externe très léger.
 */

.ams-header__actions .ams-button--header::after {
    content: "";
    position: absolute;
    z-index: -2;

    inset: -12px;

    border-radius: 22px;

    background:
        radial-gradient(
            circle,
            rgba(0, 145, 255, .28) 0%,
            rgba(0, 123, 255, .12) 45%,
            rgba(0, 123, 255, 0) 72%
        );

    opacity: .8;

    pointer-events: none;
}

/*
 * Reflet lumineux périodique.
 */

.ams-header__actions .ams-button--header::before {
    content: "";
    position: absolute;
    z-index: 0;

    top: -70%;
    left: -45%;

    width: 34%;
    height: 240%;

    opacity: 0;

    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,0),
            rgba(255,255,255,.42),
            rgba(255,255,255,0)
        );

    transform:
        rotate(18deg)
        translateX(-220%);

    animation:
        ams-automation-cta-shine
        5.8s
        ease-in-out
        1.8s
        infinite;

    pointer-events: none;
}

.ams-header__actions
.ams-button--header > span {
    position: relative;
    z-index: 1;
}

/*
 * Flèche traitée comme une mini-action.
 */

.ams-header__actions
.ams-button--header > span:last-child {
    width: 32px;
    height: 32px;

    display: inline-grid;
    flex: 0 0 32px;

    place-items: center;

    border:
        1px solid
        rgba(255,255,255,.26);

    border-radius: 9px;

    background:
        rgba(255,255,255,.13);

    box-shadow:
        inset 0 1px 0
        rgba(255,255,255,.18);

    font-size: 15px;

    transition:
        transform .24s ease,
        background .24s ease;
}

.ams-header__actions
.ams-button--header:hover {
    transform: translateY(-3px);

    filter: saturate(1.08);

    box-shadow:
        0 18px 42px
        rgba(0, 112, 255, .36),
        0 7px 18px
        rgba(0, 76, 185, .20),
        inset 0 1px 0
        rgba(255,255,255,.38);
}

.ams-header__actions
.ams-button--header:hover
> span:last-child {
    transform: translateX(3px);

    background:
        rgba(255,255,255,.22);
}

.ams-header__actions
.ams-button--header:focus-visible {
    outline:
        3px solid
        rgba(0, 120, 255, .26);

    outline-offset: 4px;
}

@keyframes ams-automation-cta-shine {

    0%,
    68% {
        opacity: 0;

        transform:
            rotate(18deg)
            translateX(-220%);
    }

    74% {
        opacity: .75;
    }

    87% {
        opacity: .15;

        transform:
            rotate(18deg)
            translateX(520%);
    }

    100% {
        opacity: 0;

        transform:
            rotate(18deg)
            translateX(520%);
    }
}

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

    .ams-header__actions
    .ams-button--header::before {
        animation: none;
    }

    .ams-header__actions
    .ams-button--header,
    .ams-header__actions
    .ams-button--header
    > span:last-child {
        transition: none;
    }
}

