/* Garde-fous template par-dessus le thème « Salle de projection » (redesign.css).
   Règle de partage : le port gère la matière (couleurs, blur, ombres) ;
   le template garde la géométrie (tailles, positions, visibilité).
   Ce fichier se charge APRÈS redesign.css et ne contient que des corrections
   où le port contredirait une mesure du template. */
/* Pills façon template : 44px min (filters recherche, saisons, tri, guide). */
.pill { min-height: 44px; }
/* Up Next façon template : boutons Lire/Annuler 44px. */
#upnext-play, #upnext-cancel { min-height: 44px; }
/* Recherche façon template : input transparent, la barre (.gl/.tb-search) fait le fond. */
.tb-search #search, .tb-search .search { background: none; box-shadow: none; }
/* Header fantôme (layout.css : « #topbar = phantom container (no background) ») :
   le port le repeignait en dalle de verre pleine largeur ; le template ne garde
   que la barre .gl + les pastilles posées sur le fond dégradé. */
#topbar { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* Guide : `.g-now` = pastille horaire (refonte.css) — le thème la redessine en
   ligne 2px translucide (redesign.css .g-now) ; on restaure la pastille et on
   la décolle du header sticky (elle passait dessous). */
.g-now { background: #ff6b5e; width: auto; top: -14px; }

/* ===== Audit pixel run-2 : écarts mesurés sur les frames du template ===== */
/* Typo template : Hanken Grotesk (texte), Bricolage Grotesque (titres). */
body, .auth-card { font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif; }
h1, h2, h3, .title, .guide-title, .brand-logo, .epg-prog-title, .auth-card h1.brand-logo { font-family: 'Bricolage Grotesque', 'Hanken Grotesk', sans-serif; }
/* Titre de carte : Hanken 14/600, blanc cassé, sans tracking (template). */
.pc-title { font-family: 'Hanken Grotesk', system-ui, sans-serif; color: #f2f0ec; letter-spacing: normal; }
/* Note des cartes : DM Mono 12.5 violet. */
.pc-rate { font-family: 'DM Mono', monospace; font-size: 12.5px; color: #cbbcff; }
/* Titres : tracking + couleur template. */
h1 { letter-spacing: -.03em; color: #f2f0ec; }
.guide-head h1, .guide-head .guide-title, #content .cat-head h1, .cat-head h1 { color: #f2f0ec; letter-spacing: -.03em; }
/* Rangée de catégories du guide : le template n'a pas de fondu sur les bords
   (le port estompait la 1re/dernière pastille) et pas de double espace avant la
   rangée (le row-gap de la tête suffit → pastilles à y87, position template). */
#guide-pills { -webkit-mask-image: none; mask-image: none; margin-top: 0; }
/* Desktop : la tête se pose à y14 comme le template (l'overlay ajoutait 12.8px). */
@media (min-width: 641px) { #guide { padding-top: 0; } }
@media (max-width: 640px) {
  /* Titre à l'aplomb du sous-titre et des pastilles (un spacer flex le décalait de 29px). */
  .guide-title { order: 0; }
  /* Sous-titre collé au titre (5px template ; row-gap + marge donnaient 21px). */
  #guide-sub { margin-top: -14px; }
}
/* Grille guide : pleine largeur comme le template (le corps, item flex avec
   « margin: 0 auto », se réduisait à son max-content → grille x80 au lieu de x40,
   80px plus étroite que la tête). Marges auto retirées → la boîte remplit 1440 et
   les 40px de padding donnent la grille x40..1400 du template. */
@media (min-width: 641px) { #guide .guide-body { margin-left: 0; margin-right: 0; } }
/* Ruler des heures : le template ne le colle pas (sticky = barre flottante au scroll,
   les rangées passaient derrière sans fond). */
.g-head { position: static; }
/* Titres des blocs programme : base.css centre le contenu des <button> ; template = à gauche. */
.g-prog { display: block; }
#content h2.sg { color: #f2f0ec; }
.detail-head h1 { letter-spacing: -.035em; color: #f2f0ec; }
/* « Voir tout » : titre 36/40 template (lh exacte). */
@media (min-width: 769px) { .cat-head h1 { line-height: 40px; } }
/* Rangée de genres : pastille visible 36px template (bouton 44px transparent autour),
   position template : pastille à y110 (barre 78 + 32). */
@media (min-width: 769px) { .genre-pill { min-height: 36px; } .genre-row { padding: 32px 0 32px; } }
/* Numéros Top 10 : fw 500 + tracking (11px sur mobile). */
.top10-num { font-weight: 500; letter-spacing: .04em; }
/* Touche Ctrl K : sans fond (le bord suffit). */
.tb-search kbd { background: none; }
/* Badge « EN LECTURE » : corail, fond .74, padding template. */
.live-playing { font-size: 11.5px; color: #ffa097; background: rgba(12,11,14,.74); padding: 4px 12px; }
/* Titre vedette du direct : teinte template (refonte met #fff). */
#content .live-hero-title { color: #f2f0ec; }
/* Libellés d'actes (FAVORI / TRAILER / VLC) en capitales. */
.act-cap { text-transform: uppercase; }
/* Favoris : titre + « Réorganiser » façon template. */
#content .fav-head h2, .fav-head h2, .fav-head .sg { font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -1.08px; }
.btn.ghost.fav-reorder { font-size: 14px; color: #d8d4de; background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.14); }
/* « Avec » (casting) : gris template. */
.cast-by { color: #8a8794; }
/* Tri « Voir tout » : groupe segmenté matière template (.gr). */
.cat-sort { background: #0f0d13; box-shadow: inset 3px 3px 8px rgba(0,0,0,.8), inset -2px -2px 6px rgba(255,255,255,.04), 0 1px 0 rgba(255,255,255,.07); }
/* Pilules du lecteur : 14/600 h48, ±10 en DM Mono 12.5. */
.pc-qbtn, .pc-btn.pc-vlc { font-size: 14px; font-weight: 600; min-height: 48px; padding: 0 18px; }
.pc-skip { font-family: 'DM Mono', monospace; font-size: 12.5px; font-weight: 400; }
/* Tuile « Ajouter depuis l'accueil » : ratio, teintes et libellé template. */
.pc-add { aspect-ratio: 2 / 3; min-height: 0; align-self: start; border-color: rgba(167,139,250,.35); color: #cbbcff; }
.pc-add > .ib { width: 48px; height: 48px; }
.pc-add > .ib svg { width: 22px; height: 22px; }
.pc-add > span:last-child { font-size: 13.5px; line-height: 18px; max-width: 120px; }
/* Fiche détail : bloc note du template (badge 44 + « NOTE · N VOTES »). */
.detail-rating { display: flex; align-items: center; gap: 16px; margin: 2px 0 18px; }
.detail-rating .ib.mono { flex: 0 0 44px; width: 44px; height: 44px; font-size: 13px; font-weight: 500; letter-spacing: normal; color: #cbbcff; }
.detail-rating .mono { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #b0abba; }
/* Palette Ctrl+K : rangées 15/600 façon template. */
.cmdk-item { font-size: 15px; font-weight: 600; color: #d8d4de; }
.cmdk-item.active { color: #fff; }
/* Mobile : tailles template. */
@media (max-width: 768px) {
  .guide-head h1 { font-size: 30px; line-height: 34px; }
  #content h2.live-title, h2.live-title, .live-title { font-size: 20px; line-height: 26px; }
  .fav-head h2, .fav-head .sg, #content .fav-head h2 { font-size: 30px; line-height: 34px; letter-spacing: -.03em; }
  .top10-num { font-size: 11px; font-weight: 400; letter-spacing: 0; }
  .live-card .live-num { width: auto; height: auto; padding: 1px 6px; border-radius: 6px; background: rgba(12,11,14,.7); background-image: none; box-shadow: none; color: #f2f0ec; font-size: 11.5px; }
  /* Fiche mobile : dispositions/tailles du template « Fiche détail · mobile » :
     affiche centrée 160×240, carte marges 16 / rayon 24 / padding 21,
     badge 40 + puces qualité sur la même ligne (pas de ligne NOTE),
     titre 32/33, méta 14, CTA 60 large, synopsis 15, « Avec » 13.5. */
  #detail .detail-body { padding: 16px 16px 48px; }
  #detail .detail-head { margin-top: 44px; }
  #detail .detail-poster { margin: 8px auto 0; }
  #detail .detail-poster .poster, #detail .detail-poster img { width: 160px; height: 240px; border-radius: 16px; }
  #detail .detail-info { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px;
    padding: 21px; border-radius: 24px; }
  #detail .detail-rating { order: 1; margin: 0; }
  #detail .detail-rating .ib.mono { flex: 0 0 40px; width: 40px; height: 40px; font-size: 12.5px; font-weight: 400; }
  #detail .detail-rating .mono:not(.ib) { display: none; }
  #detail .detail-chips { order: 2; margin: 0; }
  #detail .detail-info > :not(.detail-rating):not(.detail-chips) { flex: 0 0 100%; }
  #detail .detail-info h1 { order: 3; margin: 14px 0 0; font-size: 32px; line-height: 33px; }
  #detail .detail-meta { order: 4; margin-top: 8px; font-size: 14px; }
  #detail .detail-actions { order: 5; margin-top: 18px; gap: 16px 36px; }
  #detail .cta { min-height: 60px; }
  #detail .cta .cta-tx { font-size: 16.5px; }
  #detail .detail-actions .act .btn.vlc, #detail .detail-actions .act .btn.fav, #detail .detail-actions .act .btn.trailer-btn { width: 52px; height: 52px; }
  #detail .plot { order: 6; margin: 18px 0 0; font-size: 15px; }
  #detail .cast { order: 7; font-size: 13.5px; }
}

/* ═══ Audit planches (2026-10-16) : écarts mesurés vs template new.html ═══════ */

/* 1. Vague de titre : .row-head h2::after (redesign.css) posait une barre 40×3
   qui masquait la vague 40×10 du template. */
.row-head h2::after, .row > h2::after {
  width: 40px; height: 10px; flex: 0 0 40px; margin-top: 0; border-radius: 0; opacity: .9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cdefs%3E%3ClinearGradient id='g'%3E%3Cstop offset='0' stop-color='%23a78bfa'/%3E%3Cstop offset='1' stop-color='%23a78bfa' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M1 5 Q7 2 13 5 T25 5 T39 5' fill='none' stroke='url(%23g)' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center/contain;
}

/* 2. Bandeau de pastilles (.ft-chips) : rangée unique (template : pastille 68×44). */
.ft-chips { display: flex; align-items: center; gap: 8px; }

/* 3. Grille « Voir tout » : 6 colonnes de 192px, gap 24, x40 (template : 1272px en x40). */
@media (min-width: 1200px) {
  .cat-grid { padding-left: 2.5rem; grid-template-columns: repeat(6, minmax(0, 192px)); justify-content: start; gap: 24px; }
  /* 4. Favoris : 6 colonnes (template : 207×310, gap 24). */
  .fav-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
  /* 5. Cartes de rangée : 176px (planche : pi 176×264, gap 20) ; le Top 10 garde 164 (.pc-top10). */
  .pc-cat { width: 176px; }
  .row-scroll > .card.pc-cat { flex: 0 0 176px; }
}

/* 6. Mobile : pastilles (Accueil/Favoris) sur une ligne scrollable ; cartes 112px
   (template) et gap 12 ; numéro Top 10 30×30. */
@media (max-width: 768px) {
  .ft-chips, .fav-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ft-chips::-webkit-scrollbar, .fav-pills::-webkit-scrollbar { display: none; }
  .ft-chips .pill, .fav-pills > * { flex: 0 0 auto; }
  .pc-cat { width: 112px; }
  .row-scroll > .card.pc-cat { flex-basis: 112px; }
  .rail { gap: 12px; }
  .pc-top10 { width: 112px; }
  .top10-num { width: 30px; height: 30px; }
}

/* ═══ Audit planches, 2e passe : points 11-22 ══════════════════════════════ */

/* 12. Lecteur desktop : deux conteneurs (rangée 1 mobile) mis à plat en une
   seule ligne — ordre template (Pause, −10, +10, Volume, …qualité…, ⛶). */
.pc-rows { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; row-gap: .5rem; }
.pc-rows > .pc-row { display: contents; }
@media (min-width: 769px) {
  /* Ordres desktop seulement : en mobile les rangs sont physiques (les ordres
     de refonte.css par rangée font foi). */
  .pc-rows #pc-play { order: 1; }
  .pc-rows #pc-backward { order: 2; }
  .pc-rows #pc-forward { order: 3; }
  .pc-rows .pc-spacer { order: 5; }
  .pc-rows #pc-volume { order: 4; }
  .pc-rows .pc-quality:has(#player-audio) { order: 6; }
  .pc-rows .pc-quality:has(#player-subs) { order: 7; }
  .pc-rows .pc-quality:has(#player-quality) { order: 8; }
  .pc-rows .pc-quality:has(#player-speed) { order: 9; }
  .pc-rows .pc-quality:has(#player-pip) { order: 10; }
  .pc-rows #player-vlc { order: 11; }
  .pc-rows #player-fs { order: 12; }
}

/* 11. Fiche mobile : backdrop poster plein cadre + feuille à y328 (template). */
.detail-bg { display: none; }

@media (max-width: 768px) {
  /* 12. Lecteur mobile : rangée 1 répartie x20→370 (−10 52 / Pause 64 / +10 52 /
     ⛶ 52), rangée 2 centrée gap 8 (chips 48). */
  .pc-rows { flex-direction: column; align-items: stretch; gap: 14px; }
  .pc-rows > .pc-row { display: flex; flex-wrap: nowrap; align-items: center; }
  .pc-rows .pc-quality { display: flex; align-items: center; }
  .player-controls .pc-row-play { justify-content: space-between; padding: 0 8px; }
  .player-controls .pc-row-live { justify-content: center; gap: 8px; }
  .pc-rows .pc-btn { width: 52px; height: 52px; flex: 0 0 52px; }
  .pc-rows #pc-play { width: 64px; height: 64px; flex: 0 0 64px; }
  .pc-rows .pc-btn.pc-qbtn, .pc-rows .pc-btn.pc-vlc {
    width: auto; height: 48px; flex: 0 0 auto; min-height: 48px; padding: 0 18px; border-radius: 9999px;
  }
  .pc-rows .pc-btn.pc-skip { border-radius: 9999px; }
  .pc-row-live #pc-mute { width: 44px; height: 44px; flex: 0 0 44px; }
  .player-controls .pc-row::after { display: none; }
  .player-controls { padding-bottom: 28px; }

  /* Point 11 : la carte info remonte à y328 (poster 160×240 @y68, gap 20). */
  #detail { padding-top: 0; }
  #detail .detail-body { position: relative; z-index: 1; }
  #detail .detail-poster { flex: 0 0 240px; margin: 10px auto 0; }
  #detail .detail-head { gap: 20px; }
  .detail-bg { display: block; position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
  .detail-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: brightness(.5) saturate(.9); }
  .detail-bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(rgba(12,11,14,.35), rgba(12,11,14,.6) 40%, #0c0b0e 78%),
      radial-gradient(70% 80% at 25% 0%, rgba(74,36,127,.45), transparent 70%);
  }
}

/* 20. Guide : scrollbar masquée (template) + pan souris (JS app.min.js). */
#guide .guide-body { scrollbar-width: none; -ms-overflow-style: none; cursor: grab; }
#guide .guide-body::-webkit-scrollbar { display: none; }
#guide .guide-body.grabbing { cursor: grabbing; }

/* 19. Mosaïque connexion : plus visible (template : mur d'affiches coloré). */
.auth-wall { opacity: .5; }
.auth-wall i:nth-child(8n+1) { --g1: #55307f; --g2: #221238; }
.auth-wall i:nth-child(8n+2) { --g1: #2b6a85; --g2: #12232e; }
.auth-wall i:nth-child(8n+3) { --g1: #8a3359; --g2: #33141f; }
.auth-wall i:nth-child(8n+4) { --g1: #3f8a56; --g2: #14271a; }
.auth-wall i:nth-child(8n+5) { --g1: #8a6c2b; --g2: #2e2412; }
.auth-wall i:nth-child(8n+6) { --g1: #4549b3; --g2: #191934; }
.auth-wall i:nth-child(8n+7) { --g1: #a03ba6; --g2: #331433; }
.auth-wall i:nth-child(8n+8) { --g1: #2b8a7b; --g2: #132723; }
.auth-vignette { background: radial-gradient(70% 90% at 50% 50%, rgba(12,11,14,.22), rgba(12,11,14,.82) 78%); }

/* 13. Live : champ « Chercher une chaîne ou un programme… » (desktop). */
.live-search { flex: 0 0 287px; width: 287px; min-height: 44px; margin-left: auto; padding: 0 16px;
  border-radius: 9999px; border: 1px solid var(--glass-border); background: rgba(255,255,255,.04); color: #f2f0ec; font-size: 14px; }
.live-search::placeholder { color: #8a8794; }
.live-search:focus { outline: none; border-color: rgba(167,139,250,.55); }

/* 15. Palette : pied de raccourcis (template). */
.cmdk-foot { display: flex; gap: 18px; padding: 12px 20px 14px; border-top: 1px solid rgba(255,255,255,.08);
  font-family: 'DM Mono', monospace; font-size: 11.5px; color: #8a8794; }
.cmdk-foot kbd { padding: 1px 5px; margin-right: 3px; border-radius: 5px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); font: inherit; }

/* 16. Fiche programme : contenu des planches « Guide · fiche programme » (mobile + desktop) —
   ligne chaîne AVANT le titre, pastille EN DIRECT à barres, CTA 60px, actions 52px, « Ensuite ». */
#epg-prog .guide-head { position: static; margin: 0; padding: 18px 0 0; background: none; border: 0; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; justify-content: flex-end; }
#epg-prog .guide-head .guide-title { display: none; }
#epg-prog .guide-head > .close { width: 44px; height: 44px; }
@media (max-width: 768px) {
  #epg-prog .guide-head { position: relative; justify-content: center; padding-top: 10px; }
  #epg-prog .guide-head::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.28); }
  #epg-prog .guide-head > .close { position: absolute; left: auto; right: 0; top: 0; }
}
#epg-prog .epg-prog-panel { border-radius: 28px; }
@media (max-width: 768px) { #epg-prog .epg-prog-panel { border-radius: 28px 28px 0 0; } }
#epg-prog .epg-prog-ch { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
#epg-prog .epg-prog-ch img { width: 46px; height: 46px; padding: 6px; object-fit: contain; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
#epg-prog .epg-prog-ch .epg-prog-num { width: 46px; height: 46px; font-size: 13px; letter-spacing: .04em; }
#epg-prog .epg-prog-ch-t { flex: 1; min-width: 0; }
#epg-prog .epg-prog-ch-n { font-weight: 600; font-size: 15px; }
#epg-prog .epg-prog-ch-s { font-size: 11.5px; line-height: 14px; letter-spacing: .06em; text-transform: uppercase; color: #aea9b8; }
#epg-prog .epg-prog-ch .epg-prog-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 9999px;
  font-size: 11px; letter-spacing: .06em; color: #ff8a7e; background: rgba(255,107,94,.14); border: 1px solid rgba(255,107,94,.4); }
#epg-prog .epg-prog-ch .epg-prog-soon { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #93c5fd; }
#epg-prog .sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
#epg-prog .sig i { display: block; width: 3px; border-radius: 1px; background: currentColor; }
#epg-prog .sig i:nth-child(1) { height: 4px; }
#epg-prog .sig i:nth-child(2) { height: 7px; }
#epg-prog .sig i:nth-child(3) { height: 10px; }
#epg-prog .epg-prog-title { font-size: 26px; line-height: 1.08; letter-spacing: -.03em; margin: 0; }
@media (min-width: 769px) { #epg-prog .epg-prog-title { font-size: 30px; } }
#epg-prog .epg-prog-meta { margin: 8px 0 0; font-size: 13px; letter-spacing: .02em; color: #d8d4de; }
#epg-prog .epg-prog-bar { margin-top: 14px; border-radius: 4px; }
#epg-prog .epg-prog-elapsed { margin-top: 8px; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: #b0abba; }
#epg-prog .epg-prog-desc { margin: 16px 0 0; font-size: 15px; line-height: 24px; color: #e2dee8; }
#epg-prog .epg-prog-cta { margin-top: 22px; width: 100%; height: 60px; padding: 0 22px 0 6px; border-radius: 9999px;
  display: flex; align-items: center; justify-content: flex-start; gap: 14px; text-align: left; }
#epg-prog .epg-prog-cta .well { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.2); }
#epg-prog .epg-prog-cta .t { display: flex; flex-direction: column; gap: 2px; }
#epg-prog .epg-prog-cta .t .b { font-weight: 700; font-size: 16.5px; line-height: 20px; }
#epg-prog .epg-prog-cta .t span:last-child { font-size: 11px; line-height: 12px; letter-spacing: .06em; text-transform: uppercase; color: rgba(20,16,31,.84); }
#epg-prog .epg-prog-actions { display: flex; justify-content: center; gap: 36px; margin-top: 16px; }
#epg-prog .epg-act { display: flex; flex-direction: column; align-items: center; gap: 6px; }
#epg-prog .epg-act .btn { width: 52px; height: 52px; min-width: 0; min-height: 0; flex: 0 0 52px;
  padding: 0; border-radius: 50%; display: grid; place-items: center; }
#epg-prog .epg-act .btn svg { width: 21px; height: 21px; }
#epg-prog .epg-act .btn.rec-btn svg circle:last-child { fill: #ff6b5e; }
#epg-prog .epg-act-label { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: #b3aebf; }
#epg-prog .epg-prog-next { margin-top: 22px; }
#epg-prog .epg-prog-next .lbl { font-size: 11.5px; line-height: 14px; letter-spacing: .06em; text-transform: uppercase; color: #aea9b8; margin-bottom: 4px; }
#epg-prog .epg-next-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.07); }
#epg-prog .epg-next-row .h { flex: 0 0 48px; font-size: 13px; color: #cbbcff; }
#epg-prog .epg-next-row .t { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; }
#epg-prog .epg-next-row .d { font-size: 12px; color: #b0abba; }
