:root {
    --topbar-phyz-red: #E90B0B;
    --topbar-phyz-white: #ffffff;
}

.topbar-phyz,
.topbar-phyz * {
    box-sizing: border-box;
}

.topbar-phyz {
    width: 100%;
    background: var(--topbar-phyz-red);
    color: var(--topbar-phyz-white);
    position: relative;
    z-index: 99998;
    font-family: inherit;
}

.topbar-phyz__inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 37px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 40px;
    padding: 12px 0;
}

.topbar-phyz__message-window {
    min-width: 0;
    overflow: hidden;
}

.topbar-phyz__message-track {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    width: max-content;
    max-width: 100%;

    white-space: nowrap;

    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;

    will-change: transform;
}

.topbar-phyz__message-main {
    display: inline;
}

.topbar-phyz__promo {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 18px;

    padding: 8px;

    border-radius: 999px;

    background: #ffffff;
    color: var(--topbar-phyz-red);

    font-size: 12px;
    line-height: 1;
    font-weight: 700;
}

.topbar-phyz__cta {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 110px;
    min-height: 22px;

    padding: 12px 24px;

    border-radius: 4px;

    background: #ffffff;
    color: #202424 !important;

    text-decoration: none !important;

    font-size: 12px;
    line-height: 1;
    font-weight: 500;

    transition:
        transform 0.18s ease,
        opacity 0.18s ease;
}

.topbar-phyz__cta:hover,
.topbar-phyz__cta:focus-visible {
    color: #1f1f1f !important;
    opacity: 0.94;
    transform: translateY(-1px);
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 767px) {

    .topbar-phyz {
        overflow: hidden;
    }

    .topbar-phyz__inner {
        width: 100%;
        min-height: 128px;

        flex-direction: column;
        justify-content: center;
        align-items: center;

        gap: 25px;

        padding: 17px 0 15px;

        overflow: hidden;
    }

    /*
     * Fenêtre du message.
     * Tout ce qui dépasse est masqué.
     */
    .topbar-phyz__message-window {
        width: 100%;
        min-width: 100%;
        max-width: 100%;

        overflow: hidden;

        position: relative;
    }

    /*
     * Message complet :
     * texte + bulle promo + texte suivant.
     */
    .topbar-phyz__message-track {
        display: flex;
        align-items: center;
        justify-content: flex-start;

        width: max-content;
        max-width: none;

        flex-wrap: nowrap;

        gap: 7px;

        padding: 0 23px;

        white-space: nowrap;

        font-size: 23px;
        line-height: 1.22;
        font-weight: 700;

        /*
         * Important :
         * le message traverse entièrement
         * de droite vers gauche.
         */
        animation: topbarPhyzMobileMarquee 16s linear infinite;

        will-change: transform;
    }

    .topbar-phyz__message-main {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .topbar-phyz__promo {
        flex: 0 0 auto;

        min-height: 25px;

        padding: 8px;

        border-radius: 999px;

        font-size: 14px;
        line-height: 1;
    }

    .topbar-phyz__cta {
        flex: 0 0 auto;

        min-width: 225px;
        min-height: 44px;

        padding: 11px 24px;

        border-radius: 5px;

        font-size: 16px;
    }

    /*
     * Départ :
     * le message entier est à droite de l'écran.
     *
     * Arrivée :
     * le message entier a disparu à gauche.
     *
     * Puis la boucle recommence directement
     * depuis la droite.
     */
    @keyframes topbarPhyzMobileMarquee {

        0% {
            transform: translate3d(100vw, 0, 0);
        }

        100% {
            transform: translate3d(-100%, 0, 0);
        }
    }
}

/* =========================
   ACCESSIBILITÉ
   ========================= */

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

    .topbar-phyz__message-track {
        animation: none !important;
        transform: none !important;
    }

    .topbar-phyz__message-window {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .topbar-phyz__message-window::-webkit-scrollbar {
        display: none;
    }
}