* { box-sizing: border-box; }

/* Vignettes façon Netflix : la largeur d'une carte se calcule pour qu'un
   nombre cible de vignettes tienne à l'écran selon la largeur, PLUS une
   amorce (--card-peek) de la vignette suivante toujours visible sur les
   bandes défilantes (.row__scroller) pour inciter au scroll horizontal.
   Mêmes variables réutilisées par .search-grid (Ma liste, recherche...)
   pour garder des vignettes de taille identique, même si ces pages
   restent des grilles qui s'enroulent (pas de défilement/amorce). */
:root {
    --card-side-pad: 60px;
    --card-gap: 12px;
    --card-peek: 0.12;
    --card-count: 5;
    --card-width: calc((100vw - 2 * var(--card-side-pad) - var(--card-count) * var(--card-gap)) / (var(--card-count) + var(--card-peek)));
    /* Hauteur de l'affiche (.card__poster, ratio 16:9) — utilisée pour caler
       la hauteur des flèches précédent/suivant des bandes défilantes. */
    --card-poster-height: calc(var(--card-width) * 9 / 16);
}

@media (min-width: 1600px) {
    :root {
        --card-count: 6;
    }
}

@media (max-width: 1023px) {
    :root {
        --card-count: 4;
    }
}

@media (max-width: 768px) {
    :root {
        --card-side-pad: 24px;
        --card-gap: 8px;
        --card-count: 3;
        /* Ratio 3:4 sur mobile (voir .card__poster) */
        --card-poster-height: calc(var(--card-width) * 4 / 3);
    }
}

body {
    margin: 0;
    background: #141414;
    color: #f5f5f5;
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* --- Fiche film (également réutilisée par le bandeau d'accueil,
   app/Views/home/index.php, pour un fonctionnement de bande-annonce
   strictement identique — voir .film-hero__video ci-dessous) --- */
.film-hero {
    position: relative;
    height: 75vh;
    height: 75dvh; /* évite le décalage de hauteur dû à la barre d'adresse iOS Safari */
    min-height: 380px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.film-hero__video {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.film-hero__video--trailer {
    opacity: 0;
    transition: opacity 1s ease;
}

.film-hero__video--trailer.is-visible {
    opacity: 1;
}

/* Bouton mute du trailer : même style que les boutons de notation
   (.rating-btn) — gris/blanc par défaut (son coupé), bleu quand activé.
   bottom:40px aligne le bouton (40px de haut) avec la ligne de notation
   (également 40px), elle aussi calée sur le padding-bottom (40px) de
   .film-hero__overlay (fiche film, où la notation est le dernier élément
   de l'overlay). Repasse à 16px sur mobile (voir media query) : plus assez
   de place à côté d'un bloc d'actions qui passe sur 2 lignes, le bouton
   redescend alors sous le contenu.
   Fade in/out : opacité pilotée par la classe .is-visible du conteneur
   vidéo parent (même bascule que le fondu de la vidéo elle-même).
   right:60px reprend le padding droit du menu (.site-nav) pour un bord
   aligné sur desktop — repasse à 16px sur mobile (voir media query),
   comme .site-nav qui réduit aussi son padding. */
.film-hero__mute-btn {
    position: absolute;
    bottom: 40px;
    right: 60px;
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 1s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.film-hero__video--trailer.is-visible .film-hero__mute-btn,
.preview-modal__video.is-visible .film-hero__mute-btn {
    opacity: 1;
}

/* Bandeau d'accueil : pas de barre de notation (cf. .film-hero__ratings-
   spacer, dernier élément de l'overlay à sa place) — réaligne sur la ligne
   d'actions ("Plus d'infos"/"Ma liste") qui la précède : padding-bottom
   (40px) + hauteur du spacer (54px) = 94px. */
.film-hero__mute-btn--actions-only {
    bottom: 94px;
}

/* Modale d'aperçu : .film-hero__overlay ci-dessus ne s'y applique pas
   (padding différent, 20px) — réaligne sur .preview-modal__actions,
   dernier élément de l'overlay ici (pas de spacer). Panneau flottant plus
   étroit que l'écran : garde right:16px (le rapprochement du bord ne
   concerne que les bandeaux plein écran de la home/fiche film). */
.preview-modal__video .film-hero__mute-btn {
    bottom: 20px;
    right: 16px;
}

.film-hero__mute-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.film-hero__mute-btn svg {
    width: 20px;
    height: 20px;
}

.film-hero__mute-btn:not(.is-muted) {
    background: rgba(0, 144, 172, 0.25);
    color: #0090AC;
    border-color: #0090AC;
}

.film-hero__mute-icon--unmuted {
    display: none;
}

.film-hero__mute-btn:not(.is-muted) .film-hero__mute-icon--muted {
    display: none;
}

.film-hero__mute-btn:not(.is-muted) .film-hero__mute-icon--unmuted {
    display: inline;
}

.video-overlay__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #f5f5f5;
    border-radius: 50%;
    animation: video-overlay-spin 0.8s linear infinite;
}

@keyframes video-overlay-spin {
    to { transform: rotate(360deg); }
}

/* --- Superposition plein écran (lecture du film complet) --- */
.video-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 1000;
}

.video-overlay[hidden] {
    display: none;
}

.video-overlay__player {
    position: absolute;
    inset: 0;
}

.video-overlay__player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-overlay__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #f5f5f5;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

/* --- Aperçu au survol/tap d'une carte (mini fiche en modale) ---
   Desktop : le panneau est positionné dynamiquement en JS (au-dessus de la
   carte d'origine, recalé si ça déborderait l'écran) — .preview-modal ne sert
   plus qu'au fond assombri. Mobile (tap) : positionPanel() n'est jamais
   appelé, le panneau reste en plein écran via le media query ci-dessous. */
.preview-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    /* Le fond (assombrissement) ne doit jamais intercepter la souris : sinon,
       dès que la modale s'ouvre au-dessus/à côté de la carte, ce calque
       transparent mais plein écran passe devant elle et casse la détection
       de survol (la carte "disparaît" pour le hit-test → fermeture immédiate
       par erreur). Seul le panneau réactive les événements pointeur. */
    pointer-events: none;
}

.preview-modal[hidden] {
    display: none;
}

.preview-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.preview-modal__panel {
    position: fixed;
    pointer-events: auto;
    width: 640px;
    max-width: calc(100vw - 32px);
    max-height: 85vh;
    overflow-y: auto;
    background: #181818;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease, top 0.15s ease, left 0.15s ease;
}

.preview-modal.is-open .preview-modal__backdrop,
.preview-modal.is-open .preview-modal__panel {
    opacity: 1;
}

.preview-modal.is-open .preview-modal__panel {
    transform: scale(1);
}

.preview-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(20, 20, 20, 0.7);
    color: #f5f5f5;
    font-size: 1rem;
    cursor: pointer;
}

.preview-modal__hero {
    position: relative;
    height: 300px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.preview-modal__video {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1s ease;
}

.preview-modal__video.is-visible {
    opacity: 1;
}

.preview-modal__video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.preview-modal__hero-scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(24,24,24,1) 0%, rgba(24,24,24,0.85) 20%, rgba(24,24,24,0.35) 45%, rgba(24,24,24,0) 75%);
}

.preview-modal__hero-overlay {
    position: relative;
    width: 100%;
    padding: 20px;
}

.preview-modal__title {
    margin: 0 0 6px;
    font-size: 1.4rem;
}

.preview-modal__meta {
    margin: 0 0 12px;
    color: #b3b3b3;
    font-size: 0.9rem;
}

.preview-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Réserve la place du bouton mute (40px + marge) quand une bande-annonce
   est présente : les boutons passent à la ligne avant de le chevaucher,
   plutôt que de s'étendre par-dessus. */
.preview-modal__actions--reserve-mute {
    padding-right: 60px;
}

.preview-modal__body {
    padding: 10px 20px 20px;
}

.preview-modal__synopsis {
    color: #d2d2d2;
}

.preview-modal__loading {
    padding: 60px 20px;
    text-align: center;
    color: #b3b3b3;
}

body.preview-modal-open,
body.nav-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .preview-modal__panel {
        top: 0 !important;
        left: 0 !important;
        width: 100%;
        max-width: none;
        max-height: 100vh;
        height: 100%;
        border-radius: 0;
    }

    .preview-modal__hero {
        border-radius: 0;
    }

    .preview-modal__video .film-hero__mute-btn {
        bottom: 16px;
    }

    .preview-modal__actions--reserve-mute {
        padding-right: 0;
    }
}

.film-hero__video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border: none;
    /* largeur/hauteur/centrage recalculés en JS (coverFit) pour un rendu
       type background-size:cover, quel que soit le ratio du conteneur ;
       les valeurs ci-dessus servent de repli si JS est indisponible */
}

.film-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(20,20,20,0.7) 0%, rgba(20,20,20,0) 25%),
        linear-gradient(90deg, rgba(20,20,20,0.25) 0%, rgba(20,20,20,0) 50%),
        linear-gradient(0deg, rgba(20,20,20,1) 0%, rgba(20,20,20,0.85) 20%, rgba(20,20,20,0.4) 45%, rgba(20,20,20,0) 75%);
}

.film-hero__overlay {
    position: relative;
    width: 100%;
    padding: 40px 60px;
    z-index: 2;
}

/* Pastille "Nouveauté"/"Nouvelle saison"/"Événement" au-dessus du titre
   (fiche film + modale d'aperçu) — réutilise .card__badge (mêmes classes
   que sur les miniatures) mais en flux normal plutôt qu'en position
   absolue, puisqu'ici rien ne se superpose à une affiche. */
.film-hero__badge,
.preview-modal__badge {
    margin: 0 0 8px;
}

.film-hero__badge .card__badge,
.preview-modal__badge .card__badge {
    position: static;
}

.film-hero__title {
    font-size: 2.5rem;
    margin: 0 0 8px;
}

.film-hero__meta {
    color: #b3b3b3;
    margin: 0 0 20px;
}

.age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 7px;
    margin: 0 2px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.15);
    color: #f5f5f5;
    font-size: 0.8rem;
    font-weight: 600;
    vertical-align: middle;
}

/* Uniquement utilisé par le bandeau d'accueil (app/Views/home/index.php) :
   la fiche film complète affiche déjà le synopsis plus bas dans la page. */
.film-hero__synopsis {
    max-width: 560px;
    color: #d2d2d2;
    margin: 0 0 20px;
}

.film-hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 10px;
    gap: 12px;
}

.film-hero__actions form {
    margin: 0;
}

/* Réserve la place du bouton mute (40px + marge) quand une bande-annonce
   est présente : les boutons passent à la ligne avant de le chevaucher,
   plutôt que de s'étendre par-dessus. */
.film-hero__actions--reserve-mute {
    padding-right: 70px;
}

.film-hero__ratings {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

/* Bloc invisible de même hauteur que .film-hero__ratings (14px + 40px),
   affiché à la place de la barre de notation sur le bandeau d'accueil qui
   n'affiche pas de notation, pour garder le titre à la même hauteur que
   sur la fiche film complète. */
.film-hero__ratings-spacer {
    height: 54px;
}

/* Bloc "événement en direct" harmonisé (bandeau d'accueil, fiche film,
   modale d'aperçu) : pastille bleue + nom de l'événement + date, placé
   juste sous les boutons lecture/liste (ou sous les avis si affichés). */
.live-event-block {
    margin-top: 16px;
    max-width: 480px;
}

.live-event-block__badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    background: #0090AC;
    color: #f5f5f5;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.live-event-block__title {
    margin: 8px 0 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.live-event-block__date {
    margin: 4px 0 12px;
    color: #d2d2d2;
}

.rating-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rating-btn svg {
    width: 20px;
    height: 20px;
}

.rating-btn--down svg {
    transform: scaleY(-1);
}

.rating-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.rating-btn.is-active {
    background: rgba(0, 144, 172, 0.25);
    border-color: #0090AC;
    color: #0090AC;
}

.film-detail {
    padding: 32px 60px 60px;
}

.film-detail__synopsis {
    max-width: 720px;
    margin-bottom: 32px;
}

.film-detail__synopsis p {
    color: #d2d2d2;
    line-height: 1.6;
}

.film-detail__director {
    color: #999;
    font-size: 0.9rem;
}

.film-detail__hashtags {
    margin-top: 12px;
}

.hashtag {
    display: inline-block;
    color: #b3b3b3;
    font-size: 0.85rem;
    margin-right: 10px;
    text-decoration: none;
}

.film-detail__director a {
    color: inherit;
    text-decoration: none;
}

.film-detail__seasons {
    max-width: 720px;
    margin-bottom: 32px;
}

.film-detail__upsell {
    margin-bottom: 24px;
}

.film-detail__vod-purchase {
    max-width: 720px;
    margin-bottom: 32px;
    padding: 20px;
    background: #1f1f1f;
    border-radius: 8px;
}

.film-detail__vod-purchase h2 {
    margin: 0 0 12px;
}

.vod-purchase__options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.vod-purchase__form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.vod-purchase__form select {
    margin-top: 4px;
}

.episode-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}

.episode-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #2a2a2a;
}

.episode-list__info p {
    color: #b3b3b3;
    font-size: 0.9rem;
    margin: 6px 0 0;
}

.episode-list__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

.btn {
    border: none;
    border-radius: 4px;
    padding: 10px 24px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn--primary {
    background: #f5f5f5;
    color: #141414;
    font-weight: 600;
}

.btn--secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #f5f5f5;
    font-weight: 600;
    text-decoration: none;
}

.icon-lock,
.icon-check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.icon-lock {
    fill: #0090AC;
}

/* --- Bandeau et panneau de consentement cookies --- */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background: #1a1a1a;
    border-top: 1px solid #333;
    padding: 20px 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-banner__text {
    color: #d2d2d2;
    margin: 0;
    max-width: 640px;
    font-size: 0.9rem;
}

.cookie-banner__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-panel {
    position: fixed;
    inset: 0;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.cookie-panel__content {
    position: relative;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
}

.cookie-panel__content h2 {
    margin-top: 0;
    color: #f5f5f5;
}

.cookie-panel__option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d2d2d2;
    margin-bottom: 12px;
}

.cookie-panel__content .btn {
    margin-top: 8px;
}

/* --- Pages corporate (mentions légales, confidentialité, CGV) --- */
.corporate-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 100px 60px 60px;
}

.corporate-page__content {
    color: #d2d2d2;
    line-height: 1.6;
}

.corporate-page__content h1,
.corporate-page__content h2,
.corporate-page__content h3 {
    color: #f5f5f5;
    margin-top: 1.4em;
}

.corporate-page__content a {
    color: #0090AC;
}

/* --- Footer --- */
.site-footer {
    padding: 32px 60px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: center;
    color: #b3b3b3;
    font-size: 0.85rem;
}

.site-footer a {
    color: #b3b3b3;
    text-decoration: none;
}

.site-footer a:hover {
    color: #f5f5f5;
}

.site-footer button.link-button {
    color: #b3b3b3;
    font-size: 0.85rem;
    text-decoration: none;
}

.site-footer button.link-button:hover {
    color: #f5f5f5;
}

.landing-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(ellipse at center, #2a2a2a 0%, #141414 70%);
}

.landing-hero__overlay {
    max-width: 640px;
    padding: 0 36px;
}

.landing-hero__title {
    font-size: 2.75rem;
    margin: 0 0 16px;
}

.landing-hero__subtitle {
    color: #d2d2d2;
    font-size: 1.1rem;
    margin: 0 0 32px;
}

.landing-hero__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.catalog {
    padding: 24px 60px 60px;
}

.row {
    margin-bottom: 32px;
}

.row__title {
    font-size: 1.2rem;
    margin: 0 0 12px;
}

/* Enveloppe injectée en JS (public/assets/js/app.js) autour de chaque
   .row__scroller : sert uniquement de repère de position aux flèches
   (position: relative), ne participe pas elle-même au débordement — c'est
   .row__scroller (le véritable conteneur de scroll) qui doit déborder
   jusqu'au bord réel de l'écran, sinon le contenu défilé reste coupé à la
   largeur de .catalog/.film-detail. */
.row__scroller-wrap {
    position: relative;
}

/* Marge négative annulant le padding du conteneur parent, ré-appliqué en
   padding interne pour garder le même alignement au repos, tout en
   laissant le conteneur de scroll déborder jusqu'au bord réel de l'écran. */
.row__scroller {
    display: flex;
    gap: var(--card-gap);
    overflow-x: auto;
    padding-bottom: 8px;
    margin-left: calc(-1 * var(--card-side-pad));
    margin-right: calc(-1 * var(--card-side-pad));
    padding-left: var(--card-side-pad);
    padding-right: var(--card-side-pad);
    /* Masque la barre de défilement native (Netflix n'en affiche pas :
       le survol/tap suffit à défiler, les flèches couvrent le reste). */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.row__scroller::-webkit-scrollbar {
    display: none;
}

/* Flèches précédent/suivant : desktop uniquement (souris/trackpad), voir
   app.js — superposées exactement sur l'amorce de vignette déjà visible
   (même hauteur que l'affiche, même largeur que --card-peek). */
.row__nav {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .row__nav {
        position: absolute;
        top: 0;
        z-index: 4;
        display: flex;
        align-items: center;
        justify-content: center;
        height: var(--card-poster-height);
        /* S'étend au-delà de l'amorce de vignette jusqu'au bord réel de
           l'écran (--card-side-pad de plus que la seule largeur de l'amorce). */
        width: calc(var(--card-width) * var(--card-peek) + var(--card-side-pad));
        border: none;
        background: rgba(20, 20, 20, 0.5);
        color: #fff;
        cursor: pointer;
        opacity: 1;
        transition: background 0.15s ease, opacity 0.2s ease;
    }

    .row__nav:hover {
        background: rgba(20, 20, 20, 0.8);
    }

    .row__nav svg {
        width: 20px;
        height: 20px;
    }

    /* Fondu plutôt que display:none (non animable) — voir app.js, qui
       bascule cette classe au lieu de l'attribut hidden. */
    .row__nav--hidden {
        opacity: 0;
        pointer-events: none;
    }

    /* .row__scroller-wrap ne déborde pas lui-même (voir plus haut) : son bord
       gauche/droit coïncide avec le début de la zone de contenu, pas le bord
       réel de l'écran — on repousse donc les flèches de --card-side-pad
       supplémentaires vers l'extérieur pour qu'elles atteignent ce bord. */
    .row__nav--prev {
        left: calc(-1 * var(--card-side-pad));
    }

    .row__nav--next {
        right: calc(-1 * var(--card-side-pad));
    }
}

.card {
    position: relative;
    flex: 0 0 auto;
    width: var(--card-width);
    text-decoration: none;
    color: inherit;
    display: block;
}

.card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    padding: 3px 8px;
    border-radius: 3px;
    background: #0090AC;
    color: #f5f5f5;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.card__badge--season {
    background: linear-gradient(135deg, #0090AC, rgba(0, 144, 172, 0.5));
}

/* Prime sur les autres pastilles (Nouveauté, Nouvelle saison) — voir
   App\Models\Film::badgeInfo(). */
.card__badge--live {
    background: #0090AC;
}

.card__poster {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    display: block;
    background: #2a2a2a;
}

.card__poster-wrap {
    position: relative;
}

.card__progress {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.card__progress span {
    display: block;
    height: 100%;
    background: #0090AC;
}

.card__title {
    font-size: 0.85rem;
    margin: 6px 0 0;
    color: #d2d2d2;
    font-weight: normal;
}

.watchlist-item .card__title {
    margin-bottom: 0;
}

.empty {
    color: #888;
    text-align: center;
    padding: 60px 0;
}

/* --- Recherche --- */
.search-page {
    padding: 100px 60px 60px;
}

.search-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.search-form__field-with-suggestions {
    position: relative;
    flex: 1 1 260px;
}

.search-form input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    background: #2a2a2a;
    border: 1px solid #3d3d3d;
    border-radius: 4px;
    color: #f5f5f5;
    font-size: 1rem;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    background: #2a2a2a;
    border: 1px solid #3d3d3d;
    border-radius: 4px;
    overflow: hidden;
}

.search-suggestions__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: #f5f5f5;
    text-decoration: none;
}

.search-suggestions__item:hover,
.search-suggestions__item:focus {
    background: #3d3d3d;
}

.search-suggestions__item img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.search-suggestions__item small {
    color: #b3b3b3;
}

.search-form select {
    padding: 10px 14px;
    background: #2a2a2a;
    border: 1px solid #3d3d3d;
    border-radius: 4px;
    color: #f5f5f5;
    font-size: 1rem;
}

.search-form input[type="text"]:focus,
.search-form select:focus {
    outline: none;
}

.search-form .btn--primary {
    background: #0090AC;
    color: #fff;
}

.search-count {
    color: #b3b3b3;
    margin-bottom: 16px;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 0;
    border-bottom: 1px solid #2a2a2a;
}

.history-item a {
    color: #f5f5f5;
    font-weight: 600;
    text-decoration: none;
}

.history-item a:hover {
    text-decoration: underline;
}

.history-item__meta {
    color: #b3b3b3;
    font-size: 0.9rem;
}

.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    color: #b3b3b3;
}

.history-pagination a {
    color: #0090AC;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--card-width));
    gap: var(--card-gap);
}

.watchlist-item {
    position: relative;
}

.watchlist-item__remove-form {
    /* Décale le rond de 25% de son diamètre (26px) hors du coin de la
       vignette, vers le haut et la droite. */
    position: absolute;
    top: -6.5px;
    right: -6.5px;
    z-index: 2;
    margin: 0;
}

.watchlist-item__remove-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0090AC;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease;
}

.watchlist-item__remove-btn:hover {
    background: #00758a;
}

.watchlist-item__remove-btn .icon-close path {
    stroke: #fff;
}

.watchlist-item__remove-btn .icon-close {
    width: 14px;
    height: 14px;
}

/* --- Navigation site --- */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 60px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.site-nav__brand {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    color: #f5f5f5;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
}

.site-nav__brand img {
    height: 56px;
    width: auto;
    display: block;
}

.site-nav__links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-nav__links a {
    color: #f5f5f5;
    text-decoration: none;
}

.site-nav__user {
    color: #b3b3b3;
}

/* Bouton burger : masqué sur desktop, affiché uniquement sous 768px (voir
   media query) ; 3 barres animées en croix à l'ouverture. */
.site-nav__burger {
    display: none;
    position: relative;
    z-index: 3;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.site-nav__burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav__burger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-nav__burger.is-open span:nth-child(2) {
    opacity: 0;
}

.site-nav__burger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Auth pages --- */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.auth-page__logo img {
    height: 56px;
    width: auto;
    display: block;
}

.auth-card {
    background: #1f1f1f;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 380px;
}

.auth-card h1 {
    margin-top: 0;
    font-size: 1.4rem;
}

.profile-picker {
    max-width: 560px;
    text-align: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.profile-picker--leaving {
    opacity: 0;
    transform: scale(0.96);
}

.profile-picker__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin: 24px 0;
}

.profile-picker__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profile-picker__avatar {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: none;
    background: #0090AC center/cover no-repeat;
    color: #f5f5f5;
    font-size: 1.8rem;
    font-weight: 600;
    cursor: pointer;
}

.profile-picker__avatar:hover {
    outline: 3px solid #f5f5f5;
}

.profile-picker__avatar--kids {
    background: linear-gradient(135deg, #e8a33d, #e85d3d);
}

.profile-picker__name {
    color: #d2d2d2;
    font-size: 0.9rem;
}

.profile-picker__add {
    color: #b3b3b3;
    text-align: center;
}

.profile-picker__add summary {
    cursor: pointer;
    text-align: center;
    color: #d2d2d2;
    margin-bottom: 16px;
    list-style: none;
}

.profile-picker__add summary::-webkit-details-marker {
    display: none;
}

.profile-picker__add-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 320px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    text-align: left;
}

.profile-picker__add-form label {
    width: 100%;
}

.profile-picker__add-form input[type="text"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 10px;
    background: #2a2a2a;
    border: 1px solid #3d3d3d;
    border-radius: 4px;
    color: #f5f5f5;
    font-size: 1rem;
}

.profile-picker__checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.profile-picker__checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
    background: #f5f5f5;
    border: 1px solid #5a5a5a;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}

.profile-picker__checkbox input[type="checkbox"]:checked {
    border-color: #0090AC;
}

.profile-picker__checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #0090AC;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.profile-picker__checkbox input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 144, 172, 0.35);
}

.profile-picker__submit {
    width: fit-content;
    background: #0090AC;
    color: #fff;
    font-weight: 600;
}

.profile-manage {
    max-width: 420px;
    text-align: center;
}

.profile-manage__form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.profile-manage__form label {
    width: 100%;
}

.profile-manage__avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.profile-manage__avatar-preview {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    background: #0090AC center/cover no-repeat;
    color: #f5f5f5;
    font-size: 2.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-manage__avatar-btn {
    color: #0090AC;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
}

.profile-manage__cropper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.profile-manage__cropper[hidden] {
    display: none;
}

.profile-manage__cropper canvas {
    border-radius: 8px;
    cursor: grab;
    touch-action: none;
}

.profile-manage__zoom {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    color: #d2d2d2;
    font-size: 0.9rem;
}

.profile-manage__zoom input[type="range"] {
    flex: 1;
}

.profile-manage__delete {
    margin-top: 20px;
}

.profile-manage__switch {
    margin-top: 16px;
}

.profile-manage__switch a {
    color: #b3b3b3;
    font-size: 0.9rem;
}

.auth-switch {
    color: #b3b3b3;
    font-size: 0.9rem;
}

.auth-switch a {
    color: #f5f5f5;
}

/* --- Formulaires --- */
form label {
    display: block;
    margin-bottom: 14px;
    font-size: 0.9rem;
    color: #d2d2d2;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form input[type="url"],
form input[type="date"],
form input[type="datetime-local"],
form input[type="tel"],
form input[type="search"],
form textarea,
form select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    background: #2a2a2a;
    border: 1px solid #3d3d3d;
    border-radius: 4px;
    color: #f5f5f5;
    font-size: 1rem;
}

form label.checkbox,
form label.radio {
    display: flex;
    align-items: center;
    gap: 8px;
}

form label.checkbox input,
form label.radio input {
    width: auto;
    margin-top: 0;
}

.form-errors {
    background: #3a1f1f;
    color: #ff9b9b;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 0 0 16px;
}

.form-success {
    background: #1f3a24;
    color: #9bffab;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 0 0 16px;
}

.form-success {
    background: #1f3a24;
    color: #9bff9b;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 0 0 16px;
}

.link-button {
    background: none;
    border: none;
    color: #ff9b9b;
    cursor: pointer;
    padding: 0;
    font-size: 0.85rem;
    text-decoration: underline;
}

/* --- Tarifs & abonnement --- */
.pricing-page {
    padding: 100px 60px 60px;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-page__title {
    text-align: center;
    font-size: 2rem;
    margin: 0 0 8px;
}

.subscription-page .link-button,
.subscription-page .admin-table a {
    color: #0090AC;
    text-decoration: none;
}

.pricing-page__subtitle {
    text-align: center;
    color: #b3b3b3;
    margin: 0 0 40px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.pricing-card {
    position: relative;
    background: #1f1f1f;
    border-radius: 8px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}

.pricing-card--featured {
    border: 2px solid #0090AC;
}

.pricing-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #0090AC;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
}

.pricing-card__name {
    margin: 0 0 8px;
    font-size: 1.3rem;
}

.pricing-card__price {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 12px;
}

.pricing-card__price span {
    font-size: 1rem;
    font-weight: normal;
    color: #b3b3b3;
}

.pricing-card__description {
    color: #d2d2d2;
    margin: 0 0 12px;
}

.pricing-card__trial {
    color: #9bff9b;
    font-size: 0.9rem;
    margin: 0 0 16px;
}

.pricing-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    flex: 1;
}

.pricing-card__features li {
    color: #d2d2d2;
    padding: 6px 0;
    border-bottom: 1px solid #2a2a2a;
    font-size: 0.9rem;
}

.pricing-card__cta {
    width: 100%;
    text-align: center;
}

.pricing-card form {
    margin: 0;
}

.subscription-summary {
    background: #1f1f1f;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
}

.subscription-summary p {
    margin: 0 0 10px;
}

.subscription-summary form {
    margin-top: 8px;
}

.checkout-page {
    padding: 100px 60px 60px;
    max-width: 700px;
    margin: 0 auto;
}

#checkout-container {
    min-height: 500px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .site-nav {
        padding: 20px 21px;
    }

    .admin-nav {
        padding: 12px 24px;
        flex-wrap: wrap;
        row-gap: 8px;
    }

    .site-nav__brand img {
        height: 44px;
    }

    /* Menu burger : les liens passent en panneau plein écran, masqué par
       défaut, affiché via .is-open (voir app.js). Le logo (z-index plus haut,
       cf. règle desktop) reste visible par-dessus. */
    .site-nav__burger {
        display: flex;
    }

    .site-nav__links {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 2;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 28px;
        background: #141414;
        font-size: 1.4rem;
    }

    .site-nav__links.is-open {
        display: flex;
    }

    .site-nav__user {
        display: none;
    }

    .film-hero {
        height: 60vh;
        height: 60dvh; /* inchangé sur mobile : seul le desktop passe à 75% */
        min-height: 460px;
    }

    .film-hero__mute-btn {
        bottom: 16px;
        right: 16px;
    }

    .film-hero__actions--reserve-mute {
        /* Le mute repasse sous le contenu (cf. règle ci-dessus) : plus
           besoin de réserver de la place à sa droite. */
        padding-right: 0;
    }

    .film-hero__scrim {
        background:
            linear-gradient(180deg, rgba(20,20,20,0.7) 0%, rgba(20,20,20,0) 25%),
            linear-gradient(90deg, rgba(20,20,20,0.25) 0%, rgba(20,20,20,0) 75%),
            linear-gradient(0deg, rgba(20,20,20,1) 0%, rgba(20,20,20,0.85) 20%, rgba(20,20,20,0.4) 45%, rgba(20,20,20,0) 75%);
    }

    .film-hero__overlay {
        padding: 20px;
    }

    .film-hero__title {
        font-size: 1.6rem;
    }

    .film-hero__synopsis {
        max-width: 100%;
    }

    .landing-hero__title {
        font-size: 1.9rem;
    }

    .landing-hero__subtitle {
        font-size: 1rem;
    }

    .landing-hero__actions {
        flex-direction: column;
        gap: 10px;
    }

    .catalog,
    .film-detail {
        padding: 16px 24px 40px;
    }

    .search-page {
        padding: 90px 24px 40px;
    }

    .pricing-page {
        padding: 90px 24px 40px;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form input[type="text"] {
        /* flex-direction devient column ci-dessus : le flex-basis de 260px
           (pensé pour une largeur en desktop) serait sinon interprété comme
           une hauteur, gonflant le champ à 260px de haut sur mobile. */
        flex: 1 1 auto;
        padding: 7px 14px;
    }

    .search-form button[type="submit"] {
        align-self: flex-start;
        width: fit-content;
    }

    .card__poster {
        aspect-ratio: 3 / 4;
    }

    .admin-content {
        padding: 20px 24px;
        max-width: 100%;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .stats-grid {
        flex-wrap: wrap;
    }

    .auth-card {
        padding: 28px 20px;
    }
}

@media (max-width: 480px) {
    .film-hero__title {
        font-size: 1.3rem;
    }

    .site-nav {
        padding: 16px 18px;
    }

    .site-nav__brand img {
        height: 36px;
    }
}
