/* foyer — composants (maquette « Système de design — composants & états »), échelle TV 960 × 540. */

/* Boutons : principal (craie), secondaire (contour), danger (braise). Au focus : plein Lumen. */
.btn { height: 38px; padding: 0 14px; border-radius: var(--r-galet-m); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; border: 1.5px solid var(--trait-2); color: var(--craie); }
.btn--primary { background: var(--craie); color: var(--nuit); border-color: transparent; }
.btn--danger { border-color: var(--braise); color: var(--braise); }
.btn--icon { width: 40px; padding: 0; justify-content: center; border-radius: 50%; background: rgba(34, 38, 49, .9); border-color: transparent; }
.btn[disabled], .btn.is-off { opacity: .4; pointer-events: none; }
html[data-input="key"] .btn.is-focus, html[data-input="key"] .btn:focus-visible { background: var(--lumen); color: var(--nuit); border-color: transparent; }

/* Pastilles : une forme en plus de la couleur. */
.chip { height: 22px; padding: 0 9px; border-radius: var(--r-galet-xs); font-size: 11px; font-weight: 700; letter-spacing: .08em; display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; white-space: nowrap; }
.chip--live { background: var(--braise); color: var(--nuit); }
.chip--running { border: 1.5px solid var(--braise); color: var(--braise); }
.chip--scheduled { border: 1.5px dashed var(--brume); color: var(--craie); }
.chip--ready { background: var(--lilas); color: var(--nuit); }
.chip--partial { background: var(--ambre); color: var(--nuit); }
.chip--vovf { background: var(--ardoise-2); color: var(--craie); }
.chip--vu { background: var(--ardoise-2); color: var(--brume); }
.chip--pub { background: var(--ambre); color: var(--nuit); }
.chip--soon { border: 1.5px solid var(--brume); color: var(--craie); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot--full { background: currentColor; }
.dot--ring { border: 2px solid currentColor; }
.dot--dash { border: 2px dashed currentColor; }
.dot--half { background: linear-gradient(90deg, currentColor 50%, transparent 50%); border: 1.5px solid currentColor; }

/* Filtres */
.filters { display: flex; gap: 8px; }
.filter { height: 32px; padding: 0 14px; border-radius: var(--r-galet-m); border: 1.5px solid var(--trait-2); font-size: 14px; font-weight: 700; color: var(--brume); display: inline-flex; align-items: center; }
.filter[aria-pressed="true"] { background: var(--craie); color: var(--nuit); border-color: transparent; }
html[data-input="key"] .filter.is-focus { background: var(--lumen); color: var(--nuit); border-color: transparent; }

/* Carte média : affiche 16:9 + titre + sous-titre ; étiquette en haut à gauche, barre de reprise en bas. */
.media { width: var(--card-w, 176px); flex: none; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.media-art { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-galet); position: relative; }
.media-art { transition: transform var(--t-eclair) var(--courbe), box-shadow var(--t-eclair); }
/* Le halo entoure l'affiche seulement, pas le texte dessous. */
html[data-input="key"] .media.is-focus, html[data-input="key"] .media:focus-visible { outline: none; box-shadow: none; transform: none; }
html[data-input="key"] .media.is-focus .media-art, html[data-input="key"] .media:focus-visible .media-art { outline: 3px solid var(--lumen); outline-offset: 3px; box-shadow: 0 0 0 10px rgba(216, 255, 62, .16), var(--ombre); transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) { html[data-input="key"] .media.is-focus .media-art { transform: none; } }
html[data-motion="reduced"][data-input="key"] .media.is-focus .media-art { transform: none; }
.media-tag { position: absolute; left: 8px; top: 8px; height: 21px; padding: 0 8px; border-radius: var(--r-galet-xs); font-family: var(--f-titre); font-size: 10.5px; font-weight: 600; display: flex; align-items: center; z-index: 1; background: var(--nuit); color: var(--craie); }
.media-tag--lilas { background: var(--lilas); color: var(--nuit); }
.media-tag--ambre { background: var(--ambre); color: var(--nuit); }
.media-tag--craie { background: var(--craie); color: var(--nuit); }
.media-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(15, 17, 21, .65); z-index: 1; }
.media-bar > i { display: block; height: 100%; background: var(--braise); }
.media-bar--lilas > i { background: var(--lilas); }
.media-title { font-size: 14px; margin-top: 4px; display: block; }
.media-sub { font-size: 12px; color: var(--brume); display: block; }

/* Toast, bandeau hors-ligne */
#toasts { position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%); z-index: 60; pointer-events: none; }
.toast { background: var(--craie); color: var(--nuit); border-radius: 14px 4px 14px 4px; padding: 12px 18px; font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: var(--ombre); max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }
#banner { position: fixed; left: 0; right: 0; top: 0; z-index: 70; }
.offline { background: var(--ambre); color: var(--nuit); font-size: 13px; font-weight: 700; padding: 6px var(--safe-x); display: flex; align-items: center; gap: 8px; }

/* Feuilles modales */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.sheet--side { justify-content: flex-end; align-items: stretch; padding: var(--safe-y) var(--safe-x); }
.scrim { position: absolute; inset: 0; background: rgba(15, 17, 21, .6); }
.panel { position: relative; background: var(--ardoise-2); border-radius: var(--r-feuille); padding: 18px; box-shadow: var(--ombre); display: flex; flex-direction: column; gap: 6px; }
.panel--side { width: 300px; }
.panel-title { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.panel-hint { margin-top: auto; font-size: 12px; color: var(--brume); }
.menu-item { height: 44px; border-radius: var(--r-galet-m); padding: 0 14px; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.menu-item--danger { color: var(--braise); }
html[data-input="key"] .menu-item.is-focus { background: var(--lumen); color: var(--nuit); }
.panel--confirm { width: 420px; max-width: 90vw; padding: 24px; gap: 12px; }
.confirm-title { font-size: 18px; font-weight: 600; line-height: 1.3; }
.confirm-text { color: var(--brume); font-size: 14px; }
.confirm-actions { display: flex; gap: 10px; margin-top: 8px; }

/* États : vide, erreur, hors-ligne, lent */
.state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 28px 24px; color: var(--brume); }
.state-title { font-size: 18px; font-weight: 600; color: var(--craie); }
.state-text { max-width: 420px; font-size: 14px; }
.state .btn { margin-top: 8px; }
.state--error .state-ic, .state--offline .state-ic { color: var(--ambre); }
.state-slow { text-align: center; color: var(--brume); font-size: 14px; margin-top: 8px; }
