/* Accueil : état du live, dernières vidéos YouTube, rediffs, liens vers le reste du site */
.hm-main { width: min(1400px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 60px; display: grid; gap: 22px; position: relative; z-index: 1; }
.hm-main > * { min-width: 0; }
body.cinema .hm-main { z-index: auto; }   /* mode cinéma : le lecteur passe par-dessus le bandeau du haut */

/* --- bandeau du live */
.hm-live-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(14px); }
.hm-live-bar .row { margin-left: auto; gap: 8px; }
.hm-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--muted); }
.hm-live-bar.on { border-color: rgba(255,77,109,.45); background: linear-gradient(90deg, rgba(255,77,109,.16), var(--surface) 45%); }
.hm-live-bar.on .hm-dot { background: #ff4d6d; box-shadow: 0 0 0 0 rgba(255,77,109,.6); animation: hm-pulse 1.6s infinite; }
@keyframes hm-pulse { 70% { box-shadow: 0 0 0 10px rgba(255,77,109,0); } }
.hm-lb-txt { display: grid; gap: 1px; min-width: 0; flex: 1 1 260px; }
.hm-lb-txt b { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hm-live-bar.on .hm-lb-txt b { color: #ff6b85; }
.hm-lb-txt span { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-lb-txt small { font-size: 12.5px; color: var(--muted); }
.hm-watch { background: #9146ff; border-color: #9146ff; color: #fff; }

/* --- sections */
.hm-sec { padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(14px); display: grid; gap: 16px; }
.hm-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.hm-head h2 { margin: 0; font: 700 clamp(22px, 2.6vw, 28px)/1.1 var(--pixel); }
.hm-head p { margin: 3px 0 0; font-size: 13px; }
.hm-sec > * { min-width: 0; }   /* un carrousel ne doit jamais élargir la section */
.hm-chan { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 240px; }
.hm-chan > div { min-width: 0; }
.hm-chan img { width: 48px; height: 48px; border-radius: 50%; flex: none; border: 2px solid var(--line-2); }
.hm-sub { background: #ff0033; border-color: #ff0033; color: #fff; }
.hm-sub:hover { filter: brightness(1.1); }
.hm-empty { padding: 20px; text-align: center; border: 1px dashed var(--line-2); border-radius: 14px; margin: 0; }

/* --- vidéo à la une + les 3 suivantes */
.hm-feature { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 14px; }
.hm-big { all: unset; box-sizing: border-box; position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; cursor: pointer; background: #000; box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); }
.hm-big img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.hm-big:hover img { transform: scale(1.03); }
.hm-big-txt { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 4px; padding: 60px 22px 18px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.85)); }
.hm-big-txt em { font-style: normal; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #ff6b85; }
.hm-big-txt b { font-size: clamp(17px, 2vw, 24px); line-height: 1.2; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.hm-big-txt small { font-size: 13px; color: rgba(255,255,255,.75); }
.hm-side { display: grid; gap: 10px; align-content: start; }
.hm-row { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px; border-radius: 13px; cursor: pointer; border: 1px solid transparent; }
.hm-row:hover { background: rgba(255,255,255,.05); border-color: var(--line); }
.hm-row-txt { display: grid; gap: 4px; min-width: 0; }
.hm-row-txt b { font-size: 14px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.hm-row-txt small, .hm-card small { font-size: 12px; color: var(--muted); }
.hm-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.hm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.hm-play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 15px; color: #fff; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .2s, transform .2s; }
.hm-play.big { width: 72px; height: 72px; font-size: 26px; opacity: .9; background: rgba(255,0,51,.9); }
.hm-row:hover .hm-play, .hm-card:hover .hm-play { opacity: 1; background: #ff0033; }
.hm-row:hover .hm-thumb img, .hm-card:hover .hm-thumb img { transform: scale(1.05); }

/* --- carrousels */
.hm-rail-wrap { position: relative; }
.hm-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 14px) / 4); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px; }
.hm-rail::-webkit-scrollbar { display: none; }
.hm-card { all: unset; box-sizing: border-box; display: grid; gap: 7px; align-content: start; scroll-snap-align: start; cursor: pointer; padding: 6px; border-radius: 14px; border: 1px solid transparent; min-width: 0; }
.hm-card:hover { background: rgba(255,255,255,.05); border-color: var(--line); }
.hm-card b { font-size: 13.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hm-arrow { all: unset; box-sizing: border-box; position: absolute; top: calc((100% - 50px) / 2 * .55); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff; z-index: 2;
  background: rgba(20,17,28,.92); border: 1px solid var(--line-2); box-shadow: 0 8px 22px rgba(0,0,0,.5); transition: background .15s, transform .15s, opacity .15s; }
.hm-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hm-arrow:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.hm-arrow:disabled { opacity: 0; pointer-events: none; }
.hm-arrow.prev { left: -14px; }
.hm-arrow.next { right: -14px; }

/* --- squelettes pendant le chargement */
.hm-skel { border-radius: 12px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: hm-skel 1.3s infinite; min-height: 90px; }
.hm-skel.big { aspect-ratio: 16 / 9; }
.hm-skel.card { aspect-ratio: 16 / 11; }
@keyframes hm-skel { to { background-position: -200% 0; } }

/* --- le reste du site */
.hm-explore { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.hm-tile { --c: var(--accent); display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; text-decoration: none; color: inherit;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, transparent), rgba(255,255,255,.02)); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); transition: transform .15s, border-color .15s; }
.hm-tile:hover { transform: translateY(-2px); border-color: var(--c); }
.hm-tile-ico { width: 46px; height: 46px; border-radius: 13px; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 25%, rgba(0,0,0,.3)); color: var(--c); }
.hm-tile-ico svg { width: 22px; height: 22px; }
.hm-tile-txt { display: grid; gap: 3px; min-width: 0; flex: 1; }
.hm-tile-txt b { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.hm-tile-txt b em { font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 99px; background: rgba(255,255,255,.12); color: var(--muted); }
.hm-tile-txt small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.hm-tile-go { font-size: 26px; color: var(--muted); }
.hm-tile.soon { opacity: .7; cursor: default; }
.hm-tile.soon:hover { transform: none; }

/* --- lecteur YouTube */
.hm-dlg { width: min(1100px, calc(100% - 24px)); padding: 0; border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface-2); color: var(--text); overflow: hidden; }
.hm-dlg::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(3px); }
.hm-dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; }
.hm-dlg-head b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hm-dlg-player { aspect-ratio: 16 / 9; background: #000; }
.hm-dlg-player iframe { display: block; width: 100%; height: 100%; border: 0; }

@media (max-width: 1100px) {
  .hm-feature { grid-template-columns: 1fr; }
  .hm-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-row { grid-template-columns: 1fr; }
  .hm-rail { grid-auto-columns: calc((100% - 2 * 14px) / 3); }
}
@media (max-width: 700px) {
  .hm-main { width: calc(100% - 20px); gap: 14px; padding-top: 12px; }
  .hm-sec { padding: 14px; border-radius: 18px; }
  .hm-side { grid-template-columns: 1fr; }
  .hm-row { grid-template-columns: 132px minmax(0, 1fr); }
  .hm-rail { grid-auto-columns: 72%; }
  .hm-arrow { display: none; }
  .hm-live-bar .row { margin-left: 0; }
}
