/* Press strip — "Vu & entendu dans les médias".
   Component for core/redesign/components/media_bar.html. Its own file rather
   than a block of home-redesign.css: it is a reusable band, and the /a-propos
   CMS page shows it too (there, styled by the CMS sheet). */

.media-bar {
    padding: 24px 20px;
    background: var(--white);
}

/* One row on a wide screen: label, then the outlets, then the way out. No box —
   the grey card read as a widget dropped on the page, and a press strip is a line
   of the page, not a panel on it. */
.media-bar-card {
    max-width: 1000px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.media-bar-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    /* Not the lighter grey the mockup uses: at this size and against the band's
       own tint it fell under 4.5:1. */
    color: #5a6068;
    /* Wrapped rather than set on one line, which took a third of the row from the
       logos — but not so narrow that it breaks into four stacked words. */
    max-width: 13em;
    line-height: 1.35;
    flex-shrink: 0;
}

/* The window the outlets scroll through. Masked at both edges so a logo fades in
   and out instead of being chopped by the boundary. */
.media-bar-marquee {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

/* Three copies of the list ride this track. It translates by a third of its own
   width — one copy — which lands copy two exactly where copy one started, so the
   loop has no seam. `max-content` so the track measures its contents rather than
   the window; see the template for why three copies and not two.
   
   transform, and nothing else. The homepage carried animations on
   background-position and box-shadow until this ticket; neither can be
   composited, so both repainted their element on every frame and cost 300 ms of
   LCP. A translate runs on the compositor, off the main thread. */
.media-bar-track {
    display: flex;
    width: max-content;
    animation: media-bar-scroll 22s linear infinite;
}

@keyframes media-bar-scroll {
    to {
        transform: translateX(-33.3333%);
    }
}

/* A hand resting on the strip stops it, so a reader can look at a logo. */
.media-bar-marquee:hover .media-bar-track {
    animation-play-state: paused;
}

/* Someone who asked their system for calm gets the strip standing still. Nothing
   is lost: every outlet is in the first copy, and it fits without scrolling on any
   width the row is used at. */
@media (prefers-reduced-motion: reduce) {
    .media-bar-track {
        animation: none;
    }
}

.media-bar-outlets {
    display: flex;
    align-items: center;
    /* The gap after the last item too, or the two copies butt together at the
       seam and the rhythm skips once per loop. */
    gap: 44px;
    margin: 0;
    padding: 0 22px 0 0;
    list-style: none;
    flex: 0 0 auto;
}

/* Outlets with no logo asset (Amixem, Hamelin) are set as words, weighted to sit
   at the same visual level as the logos beside them. */
.media-bar-outlets li {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.media-bar-outlets img {
    display: block;
    /* Height, never width: the four assets have wildly different aspect ratios
       (Brut is 89x32, France Bleu is square), and a common width would make the
       square one three times taller than the wordmarks. */
    height: 26px;
    width: auto;
}

.home-redesign .media-bar-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--orange-deep);
    transition: color 0.2s ease;
}

/* The color is repeated: redesign.css ships a global
   `a:hover { color: #ec7330 !important }` that outranks a plain class rule. */
.home-redesign .media-bar-link:hover {
    color: var(--orange-darker) !important;
}

.media-bar-link svg {
    width: 1em;
    height: 1em;
}

/* Below a full-width card the row cannot hold: measured, the five outlets, the
   label and the link need 960px of card — about 1000px of viewport — before the
   outlets start wrapping into a second line inside the row. Under that, the
   stacked column reads better than a half-broken row. */
@media (max-width: 1023px) {
    .media-bar-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .media-bar-label {
        max-width: none;
    }

    .media-bar-marquee {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .media-bar {
        padding: 16px 20px;
    }

    .media-bar-card {
        padding: 16px 18px;
        gap: 12px;
    }

    .media-bar-outlets {
        gap: 12px 20px;
    }

    .media-bar-outlets li {
        font-size: 0.95rem;
    }

    .media-bar-outlets img {
        height: 22px;
    }
}
