/* CITYONAIR · page d'accueil (carrousel multi-écrans + webradio)
   S'appuie sur tokens.css et site.css. Toutes les classes propres à l'accueil commencent par « hp- ». */

.home {
  --hp-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --hp-panel: var(--surface-solid);
  --hp-tile: #16213a;
  --hp-frame: #2a3450;
  --hp-gold-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --hp-stage-h: clamp(250px, 60vw, 540px);
}

/* Intro ---------------------------------------------------------------- */
.hp-intro .wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: 56px 0 8px; }
.hp-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0; font: 600 12px/1.4 var(--hp-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hp-live { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 20%, transparent);
  animation: hp-live 2s ease-in-out infinite, hp-bounce 1.4s cubic-bezier(.3, 0, .3, 1) infinite; }
@keyframes hp-live { 50% { box-shadow: 0 0 0 7px transparent; } }
@keyframes hp-bounce { 0%, 55%, 100% { transform: translateY(0); } 20% { transform: translateY(-7px); } 38% { transform: translateY(0); } 46% { transform: translateY(-2px); } }
.hp-intro h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 5.2vw, 58px); line-height: 1.05; letter-spacing: -.02em; max-width: 980px; text-wrap: balance; }
.hp-intro h1 em { font-style: normal; color: var(--accent); }
.hp-lede { margin: 0; max-width: 680px; font-size: clamp(16px, 1.6vw, 19px); color: var(--text-2); }
.hp-cta { min-height: 48px; padding-inline: 24px; text-transform: uppercase; letter-spacing: .05em; font-size: 14px; }
.hp-cta svg { width: 11px; height: 13px; fill: currentColor; }
.hp-intro .hp-cta { margin-top: 8px; }

/* Scène : un seul écran au centre ---------------------------------------- */
.hp-demo .wrap { display: flex; flex-direction: column; align-items: center; padding-top: 40px; }
.hp-stage { width: 100%; height: var(--hp-stage-h); display: flex; align-items: center; justify-content: center; }
.hp-device { display: flex; flex-direction: column; align-items: center; transition: opacity .22s ease, transform .22s ease; }
.hp-device.is-swapping { opacity: 0; transform: scale(.97); }
.hp-bezel { width: 100%; background: #0b0f19; border: 2px solid var(--hp-frame); box-shadow: 0 0 0 1px var(--accent), 0 30px 90px -24px color-mix(in srgb, var(--accent) 40%, transparent); }
.hp-screen { position: relative; width: 100%; overflow: hidden; background: #000; container-type: size; display: grid; --u: 1cqmin; }
.hp-foot { background: var(--hp-frame); }

.hp-device[data-kind="tv"] { width: min(100%, calc(var(--hp-stage-h) * 1.62)); }
.hp-device[data-kind="tv"] .hp-bezel { padding: 6px; border-radius: 10px; }
.hp-device[data-kind="tv"] .hp-screen { aspect-ratio: 16 / 9; border-radius: 3px; }
.hp-device[data-kind="tv"] .hp-foot { width: 24%; height: 16px; clip-path: polygon(36% 0, 64% 0, 100% 100%, 0 100%); }

.hp-device[data-kind="laptop"] { width: min(100%, calc(var(--hp-stage-h) * 1.3)); }
.hp-device[data-kind="laptop"] .hp-bezel { padding: 8px 8px 10px; border-radius: 14px 14px 0 0; border-bottom: 0; }
.hp-device[data-kind="laptop"] .hp-screen { aspect-ratio: 16 / 10; border-radius: 3px; }
.hp-device[data-kind="laptop"] .hp-foot { width: 112%; max-width: 100vw; height: 13px; border-radius: 0 0 14px 14px; }

.hp-device[data-kind="tablet"] { width: min(100%, calc(var(--hp-stage-h) * 1.1)); }
.hp-device[data-kind="tablet"] .hp-bezel { padding: 10px; border-radius: 18px; background: #1a2133; }
.hp-device[data-kind="tablet"] .hp-screen { aspect-ratio: 4 / 3; border-radius: 7px; }
.hp-device[data-kind="tablet"] .hp-foot { display: none; }

.hp-device[data-kind="phone"] { width: calc(var(--hp-stage-h) * .42); }
.hp-device[data-kind="phone"] .hp-bezel { position: relative; padding: 6px; border-radius: 26px; background: #1a2133; }
.hp-device[data-kind="phone"] .hp-bezel::before { content: ""; position: absolute; z-index: 3; top: 13px; left: 50%; width: 26%; height: 7px; transform: translateX(-50%); border-radius: 7px; background: #05070d; }
.hp-device[data-kind="phone"] .hp-screen { aspect-ratio: 9 / 19.5; border-radius: 20px; --u: 1.55cqmin; }
.hp-device[data-kind="phone"] .hp-foot { display: none; }

/* Contenu de l'écran : réplique de l'écran CITYONAIR (v2.5.4) — tailles relatives à l'écran (--u = 1 % du petit côté)
   Compacte : tuiles en rangée, en bas de l'image · Équilibrée : 2/3 image, 1/3 tuiles · Étendue : 50 / 50 ; barre du son en bas */
.hp-screen { grid-template-rows: minmax(0, 1fr); --m: calc(var(--u) * 2.4); }   /* v2.5.6 : plus de barre du son en bas */
.hp-main { position: relative; display: grid; grid-template-columns: 1fr; min-height: 0; min-width: 0; }
.hp-media { position: relative; overflow: hidden; min-width: 0; min-height: 0; }
.hp-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease, filter .45s ease; }
.hp-layer.is-front { opacity: 1; }
.hp-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hp-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(6, 10, 18, .55), transparent 40%), linear-gradient(to bottom, rgba(6, 10, 18, .35), transparent 22%); }

/* logo de l'écran : picto rond jaune + CITYONAIR, en haut à gauche, aligné sur la barre du son */
.hp-logo { position: absolute; z-index: 3; left: var(--m); top: var(--m); display: flex; align-items: center; gap: calc(var(--u) * 1);
  font-size: calc(var(--u) * 3.2); color: #fff; filter: drop-shadow(0 calc(var(--u) * .4) calc(var(--u) * 1.4) rgba(0, 0, 0, .55)); }
.hp-logo svg { width: 1.5em; height: 1.5em; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hp-logo .brandmark { font-size: 1em; letter-spacing: .08em; line-height: 1; }

/* v2.8 · démo = format de l'écran : ville, lieu, pays sur l'image (en bas à gauche), #moment #saison en haut à droite ;
   tuiles : titre jaune + 4 emplacements de ligne ; --cu = 1 % de la largeur d'une colonne (tuiles larges = 2 colonnes),
   limité par la hauteur disponible. Équilibrée / Étendue : 2 colonnes · Compacte (TV) : une rangée de 4 + 2 tuiles larges. */
.hp-mood { position: absolute; z-index: 3; right: var(--m); top: var(--m); display: flex; gap: calc(var(--u) * .8); }
.hp-mood i { font-style: normal; font-weight: 700; font-size: calc(var(--u) * 1.6); color: #fff; padding: calc(var(--u) * .35) calc(var(--u) * 1.1); border-radius: 99px;
  background: rgba(0, 0, 0, .35); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.hp-cap { position: absolute; z-index: 3; left: var(--m); right: 30%; bottom: var(--m); display: flex; flex-direction: column; align-items: flex-start; color: #fff;
  text-shadow: 0 calc(var(--u) * .3) calc(var(--u) * 1.4) rgba(0, 0, 0, .65); transition: bottom .3s ease; }
.hp-cap > * { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-cap b { font: 800 calc(var(--u) * 5)/1.05 var(--font-display); }
.hp-cap span { font: 600 calc(var(--u) * 3.2)/1.2 var(--font-display); color: #f4f6fa; }
.hp-cap em { margin-top: calc(var(--u) * .7); font-style: normal; font-weight: 800; font-size: calc(var(--u) * 1.5); letter-spacing: .24em; text-transform: uppercase; color: var(--accent);
  padding: calc(var(--u) * .3) calc(var(--u) * 1); border-radius: 99px; background: rgba(0, 0, 0, .38); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.hp-screen[data-layout="compacte"] .hp-cap { bottom: calc(var(--m) * 2 + var(--cu-c) * 74); }

.hp-panel { --g: calc(var(--u) * 1.2); --cw: 200; --gw: 1; --ch: 332; --gh: 4; --hav: 100cqb;
  display: grid; align-content: stretch; padding: var(--m); background: #0b1120; min-width: 0; min-height: 0; overflow: hidden; container-type: size; }
/* v2.8.1 : mêmes grilles que l'écran — Éphéméride et Météo locale carrées, les autres tuiles s'étirent */
.hp-grid { --cu: min(calc((100cqi - var(--gw) * var(--g)) / var(--cw)), calc((var(--hav) - var(--gh) * var(--g)) / var(--ch))); --sq: calc(var(--cu) * 74);
  display: grid; gap: var(--g); height: 100%;
  grid-template-columns: var(--sq) minmax(0, 1fr) var(--sq);
  grid-template-rows: repeat(4, minmax(var(--sq), 1fr)) minmax(calc(var(--cu) * 36), .5fr);
  grid-template-areas: "clock clock eph" "wl fc fc" "today today today" "snd snd snd" "ctl ctl ctl"; }
.hp-tile { min-width: 0; overflow: hidden; background: rgba(17, 24, 42, .85); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: calc(var(--cu) * 7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.a-clock { grid-area: clock; } .a-eph { grid-area: eph; } .a-wl { grid-area: wl; } .a-fc { grid-area: fc; } .a-today { grid-area: today; } .a-snd { grid-area: snd; } .a-ctl { grid-area: ctl; }
.a-eph .h, .a-wl .h { letter-spacing: .07em; font-size: calc(var(--cu) * 5.9); }
.hp-tile.snd .in { grid-template-columns: minmax(0, 1fr) auto; column-gap: calc(var(--cu) * 5); }
.hp-tile.snd .in > :not(.hp-ctl-logo) { grid-column: 1; }
.hp-tile.snd .hp-ctl-logo { grid-column: 2; grid-row: 1 / -1; align-self: center; }
.hp-tile .in { --slot: calc(var(--cu) * 12.5); display: grid; grid-template-rows: auto repeat(4, var(--slot)); align-items: center; align-content: center;
  padding: calc(var(--cu) * 7) calc(var(--cu) * 8) calc(var(--cu) * 6); color: #a6b0c6; height: 100%; box-sizing: border-box; }
.hp-tile .in > * { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-tile .h { margin-bottom: calc(var(--cu) * 2); align-self: start; font-size: calc(var(--cu) * 6.2); line-height: 1.3; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hp-tile .l1 { grid-row: 2; } .hp-tile .l2 { grid-row: 3; } .hp-tile .l3 { grid-row: 4; } .hp-tile .l4 { grid-row: 5; }
.hp-tile.t4 .l1 { font: 700 calc(var(--cu) * 10.5)/1.15 var(--font-display); color: #fff; }
.hp-tile.t4 .l2 { font-weight: 700; font-size: calc(var(--cu) * 8); color: #e7ebf3; }
.hp-tile.t4 .l3 { font-size: calc(var(--cu) * 7); color: #a6b0c6; }
.hp-tile.t3 .l1 { grid-row: 2 / span 2; font: 700 calc(var(--cu) * 19)/1 var(--font-display); color: #fff; font-variant-numeric: tabular-nums; }
.hp-tile.t3 .l2 { grid-row: 4; font-size: calc(var(--cu) * 6.3); }
.hp-tile.t3 .l3 { grid-row: 5; }
.hp-tile.eq .in { grid-template-rows: auto calc(var(--slot) * 1.5) calc(var(--slot) * 1.5) var(--slot); }
.hp-tile.eq .l1, .hp-tile.eq .l2 { grid-row: auto; font: 700 calc(var(--cu) * 11)/1 var(--font-display); color: #fff; font-variant-numeric: tabular-nums; }
.hp-tile.eq .l3 { grid-row: 4; }
.hp-tile.today .l1 { grid-row: 2; font: 600 calc(var(--cu) * 7.4)/1.2 var(--font); }
.hp-tile.today .l2 { grid-row: 3 / span 2; font: 700 calc(var(--cu) * 11.5)/1.1 var(--font-display); color: #fff; }
.hp-tile.today .l3 { grid-row: 5; }
.hp-tile .hp-ico { width: 1em; height: 1em; margin-right: .3em; vertical-align: -.12em; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hp-tile.t3 .l1 .hp-ico { width: .75em; height: .75em; vertical-align: 0; }
.hp-d7 { grid-row: 2 / span 3; align-self: stretch; display: grid !important; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.hp-d7 > span { display: grid; justify-items: center; align-content: center; gap: calc(var(--cu) * .6); min-width: 0; }
.hp-d7 small { font-size: calc(var(--cu) * 5.2); font-weight: 700; color: #7d879c; }
.hp-d7 svg { width: calc(var(--cu) * 8.6); height: calc(var(--cu) * 8.6); fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hp-d7 b { font: 700 calc(var(--cu) * 6)/1 var(--font-display); color: #fff; letter-spacing: -.03em; }
.hp-d7 em { font-style: normal; font-size: calc(var(--cu) * 4.8); line-height: 1; color: #7d879c; }
.hp-tags { display: flex; gap: calc(var(--cu) * 2.4); overflow: hidden; }
.hp-tags i { flex: none; font-style: normal; font-size: calc(var(--cu) * 6); line-height: 1.35; color: #fff; padding: calc(var(--cu) * .4) calc(var(--cu) * 3); border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.hp-tags i.b { font-weight: 700; }
.hp-tile.snd { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, rgba(17, 24, 42, .9)), rgba(17, 24, 42, .85)); }
/* lecteur (absent sur TV / Chromecast) : logo · << ▶ >> · volume */
.hp-tile.ctl .in { display: flex; align-items: center; gap: calc(var(--cu) * 6); padding: calc(var(--cu) * 5) calc(var(--cu) * 8); }
.hp-tile.ctl .in > * { overflow: visible; }
.hp-ctl-logo { flex: none; display: grid; place-items: center; height: calc(var(--cu) * 54); aspect-ratio: 1; border-radius: calc(var(--cu) * 9); background: rgba(255, 255, 255, .06); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.hp-ctl-logo svg { width: 72%; height: 72%; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hp-ctl { flex: none; display: flex; align-items: center; gap: calc(var(--cu) * 3); }
.hp-ctl i { flex: none; display: grid; place-items: center; width: calc(var(--cu) * 17); height: calc(var(--cu) * 17); border-radius: 50%; color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.hp-ctl i svg { width: 52%; height: 52%; fill: currentColor; }
.hp-ctl i.play { width: calc(var(--cu) * 22); height: calc(var(--cu) * 22); background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
/* v2.8 : lecture en cours (titre + « en direct ») au centre, volume compact à droite */
.hp-now { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--cu) * 2); }
.hp-now b { font: 500 calc(var(--cu) * 5.2)/1.2 var(--font); color: #7d879c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-live { display: flex; align-items: center; gap: calc(var(--cu) * 2.5); font-size: calc(var(--cu) * 4.6); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #a6b0c6; }
.hp-live u { width: calc(var(--cu) * 2.6); height: calc(var(--cu) * 2.6); border-radius: 50%; background: #ff4d4d; }
.hp-vol { flex: none; display: flex; align-items: center; gap: calc(var(--cu) * 2); color: #a6b0c6; }
.hp-vol svg { width: calc(var(--cu) * 10); height: calc(var(--cu) * 10); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hp-vol b { width: calc(var(--cu) * 34); height: calc(var(--cu) * 2); border-radius: 99px; background: rgba(255, 255, 255, .25); position: relative; }
.hp-vol b em { position: absolute; left: 0; top: 0; bottom: 0; width: 70%; border-radius: 99px; background: var(--accent); }

/* Compacte (TV · Chromecast) : une rangée sur l'image (4 tuiles + 2 tuiles larges), sans lecteur */
.hp-screen[data-layout="compacte"] { --cu-c: min(calc((100cqi - 2 * var(--m) - 5 * var(--u) * 1.2) / 728), calc(100cqb * .4 / 74)); }
.hp-screen[data-layout="compacte"] .hp-panel { position: absolute; z-index: 2; left: var(--m); right: var(--m); bottom: var(--m); padding: 0; background: none;
  container-type: inline-size; --cw: 728; --gw: 5; --ch: 74; --gh: 0; --hav: 40cqb; }
.hp-screen[data-layout="compacte"] .hp-grid { height: auto; grid-template-columns: calc(var(--cu) * 100) var(--sq) var(--sq) repeat(3, minmax(0, 1fr));
  grid-template-rows: var(--sq); grid-template-areas: "clock eph wl fc today snd"; }
.hp-screen[data-layout="compacte"] .hp-tile.today .l2 { font-size: calc(var(--cu) * 9.5); }
.hp-screen[data-layout="compacte"] .hp-cap b { font-size: calc(var(--u) * 4); }
.hp-screen[data-layout="compacte"] .hp-cap span { font-size: calc(var(--u) * 2.6); }
.hp-screen[data-layout="compacte"] .hp-cap em { font-size: calc(var(--u) * 1.3); }
.hp-device[data-kind="tv"] .hp-tile.ctl { display: none; }
/* Équilibrée : 2/3 image, 1/3 tuiles · Étendue : 50 / 50 — 2 colonnes */
.hp-screen[data-layout="equilibree"] .hp-main { grid-template-columns: 2fr 1fr; }
.hp-screen[data-layout="etendue"] .hp-main { grid-template-columns: 1fr 1fr; }
/* écran vertical (smartphone) : image en haut, tuiles en dessous (2 colonnes) */
.hp-device[data-kind="phone"] .hp-screen { --m: calc(var(--u) * 3); }
.hp-device[data-kind="phone"] .hp-screen[data-layout="equilibree"] .hp-main { grid-template-columns: 1fr; grid-template-rows: 34fr 66fr; }
.hp-device[data-kind="phone"] .hp-screen[data-layout="etendue"] .hp-main { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
.hp-device[data-kind="phone"] .hp-logo { font-size: calc(var(--u) * 4); top: calc(var(--u) * 6); }
.hp-device[data-kind="phone"] .hp-mood { top: calc(var(--u) * 6); }
.hp-device[data-kind="phone"] .hp-mood i { font-size: calc(var(--u) * 2.4); }
.hp-device[data-kind="phone"] .hp-cap b { font-size: calc(var(--u) * 7); }
.hp-device[data-kind="phone"] .hp-cap span { font-size: calc(var(--u) * 4.4); }
.hp-device[data-kind="phone"] .hp-cap em { font-size: calc(var(--u) * 2.2); }

/* Lecteur webradio ------------------------------------------------------ */
.hp-player {
  width: min(100%, 860px); margin-top: 12px;
  display: flex; align-items: center; gap: 18px; padding: 12px 20px 12px 12px;
  background: var(--hp-panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.hp-player-btn { flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--accent); color: var(--accent-ink); }
.hp-player-btn svg { width: 16px; height: 16px; fill: currentColor; }
.hp-player-btn .i-play { display: none; }
.is-paused .hp-player-btn .i-play { display: block; }
.is-paused .hp-player-btn .i-pause { display: none; }
.hp-player-text { display: flex; flex-direction: column; gap: 2px; flex: none; min-width: 0; }
.hp-player-label { font: 600 11px/1.3 var(--hp-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hp-player-name { font: 700 18px/1.25 var(--font-display); }
.hp-wave { flex: 1; min-width: 0; height: 36px; display: flex; align-items: center; gap: 4px; overflow: hidden; }
.hp-wave i { flex: 0 0 4px; height: 100%; border-radius: 2px; background: var(--accent); transform: scaleY(.3); animation: hp-wave 1.1s ease-in-out infinite; }
@keyframes hp-wave { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(1); } }
.hp-sound { flex: none; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.hp-sound svg { width: 22px; height: 22px; color: var(--accent); stroke-width: 2; }
.is-paused .hp-wave i, .is-paused .hp-eq i { animation-play-state: paused; }

/* Appareils, légende, vitesse ------------------------------------------- */
.hp-devices-label { margin: 28px 0 0; font: 600 11px/1.4 var(--hp-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.hp-devices { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hp-devices button {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 16px; cursor: pointer; text-align: left;
  background: var(--hp-panel); color: var(--text-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .25s, background-color .25s, color .25s;
}
.hp-devices svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; }
.hp-devices button span { display: flex; flex-direction: column; font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.25; }
.hp-devices button small { font-size: 12px; font-weight: 400; color: var(--text-2); }
.hp-devices button[aria-pressed="true"] { border-color: var(--accent); background: var(--hp-gold-soft); color: var(--accent); }
.hp-devices button[aria-pressed="true"] small { color: var(--accent); }

.hp-legend { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.hp-chip { display: flex; flex-direction: column; gap: 1px; min-width: 140px; padding: 9px 16px; background: var(--hp-panel); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .3s, background-color .3s; }
.hp-chip small { font: 600 10.5px/1.4 var(--hp-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.hp-chip b { font: 700 17px/1.3 var(--font-display); }
.hp-chip em { font-style: normal; font-size: 12px; color: var(--text-2); }
.hp-chip.is-on { border-color: var(--accent); background: var(--hp-gold-soft); }
.hp-chip.is-on small, .hp-chip.is-on em { color: var(--accent); }
.hp-chip-wide { min-width: 200px; }
.hp-sep { color: #3a4666; font-size: 20px; }

/* Vitesse : juste sous l'écran, même largeur que le lecteur */
.hp-speed {
  width: min(100%, 860px); margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 12px 20px; background: var(--hp-panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.hp-speed-label { font: 600 11px/1.3 var(--hp-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hp-speed-ctrl { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.hp-speed-ctrl input { flex: 1; min-width: 0; height: 28px; accent-color: var(--accent); cursor: pointer; }
.hp-speed-ctrl output { flex: none; min-width: 52px; padding: 4px 10px; text-align: center; border-radius: 99px;
  font: 700 14px/1.2 var(--font-display); font-variant-numeric: tabular-nums; color: var(--accent); background: var(--hp-gold-soft); }

/* Trois étapes ---------------------------------------------------------- */
.hp-steps { margin-top: 72px; }
.hp-steps-card { display: flex; flex-direction: column; gap: 14px; padding: 44px 48px; background: var(--hp-panel); border: 1px solid var(--line); border-radius: 16px; }
.hp-steps-card h2 { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); line-height: 1.1; }
.hp-steps-list { list-style: none; margin: 18px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.hp-steps-list li { display: flex; flex-direction: column; gap: 12px; }
.hp-step-head { display: flex; align-items: center; gap: 14px; }
.hp-step-num { font: 800 44px/1 var(--font-display); color: var(--accent); }
.hp-step-head svg { width: 28px; height: 28px; fill: none; stroke: var(--text-2); stroke-width: 1.6; stroke-linecap: round; }
.hp-steps-list h3 { margin: 0; font-size: 21px; line-height: 1.25; }
.hp-steps-list p { margin: 0; font-size: 15px; color: var(--text-2); }
.hp-steps-card .hp-cta { align-self: flex-start; }

/* Compteur -------------------------------------------------------------- */
.hp-count { margin: 44px 0 0; padding: 24px 0 48px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 20px; }
.hp-count div { display: flex; flex-direction: column-reverse; gap: 4px; }
.hp-count dt { font-size: 13px; color: var(--text-2); }
.hp-count dd { margin: 0; font: 800 32px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.hp-count .is-total dd { color: var(--accent); }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .hp-count { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hp-sep { display: none; }
}
@media (max-width: 760px) {
  .hp-intro .wrap { align-items: flex-start; text-align: left; padding-top: 32px; }
  .hp-intro .hp-cta { width: 100%; }
  .hp-player { padding: 10px 14px 10px 10px; gap: 12px; }
  .hp-speed { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 14px; }
  .hp-speed-ctrl { max-width: none; }
  .hp-player-name { font-size: 16px; }
  .hp-wave, .hp-sound span { display: none; }
  .hp-sound { margin-left: auto; }
  .hp-devices button { padding: 8px 12px; }
  .hp-devices button span { display: none; }
  .hp-devices svg { width: 22px; height: 22px; }
  .hp-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .hp-chip { min-width: 0; }
  .hp-chip-wide { grid-column: 1 / -1; }
  .hp-steps { margin-top: 48px; }
  .hp-steps-card { padding: 28px 22px; }
  .hp-steps-list { grid-template-columns: 1fr; gap: 26px; }
  .hp-steps-list li { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; row-gap: 4px; }
  .hp-step-head { grid-row: span 2; align-items: flex-start; }
  .hp-step-head svg { display: none; }
  .hp-step-num { font-size: 34px; }
  .hp-steps-list h3 { font-size: 18px; }
  .hp-steps-card .hp-cta { align-self: stretch; }
  .hp-count { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-count .is-total { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .home *, .home *::before, .home *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* --- v2.0 ------------------------------------------------------------- */
/* Galerie vide (bibliothèque en préparation) ou en chargement */
.hp-empty { position: absolute; inset: 0; z-index: 1; margin: 0; display: grid; place-items: center; padding: 8%; text-align: center;
  font: 600 calc(var(--u) * 4)/1.3 var(--font-display); color: #c3cbdc; background: radial-gradient(circle at 50% 40%, #16213a, #070b16 70%); }
.hp-empty[hidden] { display: none; }

/* Gélules sous les 4 écrans : ce que l'on voit à l'instant */
.hp-devices { margin-top: 26px; }
.hp-pills { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hp-pills li { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 14px; border-radius: 99px;
  background: var(--hp-panel); border: 1px solid var(--line); font-size: 14px; transition: border-color .3s, background-color .3s; }
.hp-pills li small { font: 600 10.5px/1 var(--hp-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.hp-pills li b { font-weight: 700; }
.hp-pills li.is-on { border-color: var(--accent); background: var(--hp-gold-soft); }
.hp-pills li.is-on small { color: var(--accent); }

/* Chiffres : 2 lignes de 4 variables + carré « combinaisons possibles » à droite (chiffre en or) */
.hp-count { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(200px, 240px); row-gap: 26px; column-gap: 20px; align-items: center; }
.hp-count dt small { display: block; color: var(--text-3); font-size: 12px; }
.hp-count .is-total {
  grid-column: 5; grid-row: 1 / span 2; align-self: stretch; aspect-ratio: 1; justify-content: center; align-items: center; text-align: center;
  padding: 18px; border: 1px solid var(--accent); border-radius: 16px; background: var(--hp-gold-soft);
}
.hp-count .is-total dt { color: var(--text); font-weight: 600; font-size: 14px; }
.hp-count .is-total dd { font-size: clamp(28px, 3vw, 40px); color: var(--accent); }
@media (max-width: 1024px) {
  .hp-count { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hp-count .is-total { grid-column: 1 / -1; grid-row: auto; aspect-ratio: auto; }
}
@media (max-width: 760px) {
  .hp-pills li { font-size: 13px; padding: 6px 12px; }
  .hp-count { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


