/* Exclu Vision — site public : shell, header, nav mobile, héros, rangées, cartes, fiche, lecteur, profils…
   Mobile d'abord. Couleurs thémables : uniquement les tokens de base.css (noir/blanc neutres en rgba autorisés). */

/* ================================================================ */
/* Variables de mise en page                                         */
/* ================================================================ */

:root {
  --card-w: 27vw;
  --row-gap: 8px;
  --row-pad: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  --grid-cols: 3;
  --hero-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (min-width: 480px) { :root { --card-w: 22.5vw; --grid-cols: 4; } }
@media (min-width: 640px) { :root { --card-w: 18.6vw; --grid-cols: 5; } }
@media (min-width: 900px) { :root { --card-w: 15.4vw; --row-gap: 10px; --grid-cols: 6; } }
@media (min-width: 1024px) { :root { --header-h: 72px; } }
@media (min-width: 1200px) { :root { --card-w: 13vw; --row-gap: 12px; --grid-cols: 7; } }
@media (min-width: 1500px) { :root { --card-w: min(11.6vw, 220px); --grid-cols: 8; } }

/* ================================================================ */
/* Shell                                                             */
/* ================================================================ */

html { background: var(--bg); }
html, body { overflow-x: clip; }
/* `overflow-x: clip` sur <html> empêche le `body.modal-open { overflow: hidden }` de base.css d'atteindre le viewport :
   le verrouillage du défilement sous une modale se fait donc sur <html> (gouttière conservée : pas de saut de mise en page). */
html:has(> body.modal-open) { overflow: hidden; scrollbar-gutter: stable; }
body { padding-bottom: calc(var(--mobile-nav-h) + var(--safe-bottom)); }
@media (min-width: 1024px) { body { padding-bottom: 0; } }
body.route-admin, body.route-bare { padding-bottom: 0; }

#app {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 72vh;
  padding-top: var(--header-h);
  outline: none;
}
body.has-hero #app { padding-top: 0; }
#announcement, #footer { position: relative; z-index: 1; }

.view { animation: ev-view-in 0.45s var(--ease-out) both; }
.view-error { padding-top: 32px; padding-bottom: 48px; }

.skip-link {
  position: fixed; left: 12px; top: -80px; z-index: 2000;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-accent); font-weight: 700;
  transition: top var(--t) var(--ease);
}
.skip-link:focus { top: 12px; }

.link-btn {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 36px; padding: 0 4px;
  color: var(--accent-hot); font-weight: 700; font-size: 13.5px;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Démarrage */
.boot {
  min-height: 70vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px; text-align: center;
}
.boot-logo {
  font-family: var(--font-brand);
  font-size: clamp(36px, 9vw, 68px);
  letter-spacing: 0.05em;
  color: var(--accent-hot);
  text-shadow: var(--glow-text);
  animation: ev-flicker 3.2s infinite;
}
.boot-bar { width: 170px; height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.boot-bar span {
  display: block; width: 40%; height: 100%;
  background: var(--accent-hot); box-shadow: 0 0 12px var(--accent-glow);
  animation: ev-boot 1.1s ease-in-out infinite;
}
.boot-text { color: var(--text-mute); font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.noscript {
  max-width: 520px; margin: 0 auto 40px; padding: 18px 20px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text-dim); text-align: center;
}
.noscript strong { display: block; color: var(--text); margin-bottom: 4px; }

/* ================================================================ */
/* Logo (police de marque + lueur + gouttes de sang en Halloween)    */
/* ================================================================ */

.logo {
  position: relative;
  display: inline-flex; align-items: center;
  font-family: var(--font-brand);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent-hot);
  text-shadow: var(--glow-text);
}
.logo-text { display: inline-block; animation: ev-flicker 9s infinite; }
[data-theme="noel"] .logo { text-transform: none; letter-spacing: 0.02em; color: var(--text); }
[data-theme="noel"] .logo .logo-text { animation: none; }
[data-theme="classique"] .logo { letter-spacing: 0.08em; }
[data-theme="classique"] .logo .logo-text { animation: none; }

[data-theme="halloween"] .logo::before,
[data-theme="halloween"] .logo::after {
  content: "";
  position: absolute;
  top: 80%;
  width: 5px;
  height: 11px;
  background:
    radial-gradient(circle at 50% calc(100% - 2.5px), var(--accent-hot) 2.3px, transparent 2.8px),
    linear-gradient(var(--accent-hot), var(--accent)) center top / 2px calc(100% - 4px) no-repeat;
  filter: drop-shadow(0 0 4px var(--accent-glow));
  transform-origin: 50% 0;
  transform: scaleY(0);
  animation: ev-drip 6s cubic-bezier(0.55, 0, 0.75, 0.2) infinite;
  pointer-events: none;
}
[data-theme="halloween"] .logo::before { left: 13%; }
[data-theme="halloween"] .logo::after { left: 74%; height: 14px; animation-delay: 2.8s; animation-duration: 7.2s; }

.header-logo { font-size: clamp(22px, 6.2vw, 30px); padding: 6px 0; }
.header-logo:hover .logo-text { filter: brightness(1.18); }
[data-theme="noel"] .header-logo { font-size: clamp(22px, 6vw, 30px); }

/* ================================================================ */
/* Annonce                                                           */
/* ================================================================ */

#announcement {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent) 50%, var(--accent-deep));
  color: var(--on-accent);
  box-shadow: 0 0 30px -6px var(--accent-glow);
}
.ann-inner {
  max-width: var(--maxw); margin: 0 auto;
  min-height: 40px; padding: 6px var(--gutter);
  display: flex; align-items: center; gap: 10px;
}
.ann-icon { display: grid; place-items: center; opacity: 0.9; }
.ann-text { flex: 1; text-align: center; font-size: 13.5px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.ann-close { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; transition: background var(--t); }
.ann-close:hover { background: rgba(0, 0, 0, 0.22); }

/* ================================================================ */
/* Header                                                            */
/* ================================================================ */

.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--header-h);
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease), backdrop-filter var(--t);
  will-change: transform;
}
.site-header::before {
  content: "";
  position: absolute; inset: 0 0 -24px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0));
  pointer-events: none;
  transition: opacity var(--t) var(--ease);
}
.site-header.scrolled,
body:not(.has-hero):not(.route-bare) .site-header {
  background: rgba(6, 4, 6, 0.86);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 var(--border), 0 12px 30px -16px rgba(0, 0, 0, 0.9);
}
.site-header.scrolled::before,
body:not(.has-hero) .site-header::before { opacity: 0; }

.header-inner {
  position: relative;
  height: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 12px;
}
.main-nav { display: none; }
@media (min-width: 1024px) {
  .main-nav { display: flex; align-items: center; gap: 2px; margin-left: 28px; }
}
.nav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 4px;
  height: 42px; padding: 0 13px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-weight: 600; font-size: 14.5px;
  transition: color var(--t) var(--ease), background var(--t);
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: "";
  position: absolute; left: 13px; right: 13px; bottom: 3px;
  height: 2px; border-radius: 2px;
  background: var(--accent-hot);
  box-shadow: 0 0 10px var(--accent-glow);
}
.nav-drop .caret, .avatar-btn .caret { transition: transform var(--t) var(--ease); opacity: 0.8; }
.dropdown.open .caret { transform: rotate(180deg); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.header-search { color: var(--text-dim); }
.header-search:hover, .header-search.active { color: var(--text); }
.header-search.active { color: var(--accent-hot); }
.header-login { display: none; margin: 0 6px; }
.header-login.is-visible { display: inline-flex; }
@media (min-width: 768px) { .header-login { display: inline-flex; } }

/* Menus déroulants */
.dropdown { position: relative; }
.dropdown-panel {
  position: absolute; top: calc(100% + 10px); right: 0;
  z-index: 5;
  min-width: 260px;
  background: rgba(21, 13, 17, 0.97);
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), 0 0 60px -20px var(--accent-glow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s var(--ease), transform 0.22s var(--ease-out), visibility 0s linear 0.22s;
}
.dropdown-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.dropdown.open > .dropdown-panel {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.18s var(--ease), transform 0.22s var(--ease-out), visibility 0s;
}

.nav-dropdown .dropdown-panel { left: 0; right: auto; transform-origin: top left; width: min(580px, 70vw); padding: 16px; }
.cat-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cat-panel-title { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.05em; text-transform: uppercase; }
.cat-panel-all { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; color: var(--accent-hot); }
.cat-panel-all:hover { text-decoration: underline; text-underline-offset: 3px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; max-height: 60vh; overflow-y: auto; }
.cat-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 42px; padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim); font-weight: 600; font-size: 14px;
  transition: background var(--t-fast), color var(--t-fast);
}
.cat-link:hover { background: var(--accent-soft); color: var(--text); }
.cat-link.is-empty { opacity: 0.55; }
.cat-link-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-link-count {
  flex-shrink: 0; min-width: 24px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px; font-weight: 800; color: var(--text-mute);
}
.cat-link:hover .cat-link-count { background: var(--accent); color: var(--on-accent); }
.cat-panel-empty { color: var(--text-mute); font-size: 14px; padding: 8px 4px; }

/* Bouton avatar + menu profil */
.avatar-btn {
  display: flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 2px 0 4px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}
.avatar-btn .avatar { border-radius: 9px; transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease); }
.avatar-btn:hover .avatar, .dropdown.open .avatar-btn .avatar {
  box-shadow: 0 0 0 2px var(--accent-hot), 0 0 18px var(--accent-glow);
}
.avatar-btn .caret { display: none; }
@media (min-width: 768px) { .avatar-btn .caret { display: block; } }

.menu-panel { width: 290px; padding: 8px; }
.menu-head {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.menu-head .avatar { border-radius: 12px; }
.menu-head-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.menu-head-text strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-head-text span { font-size: 12.5px; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-admin { flex-shrink: 0; }
.menu-list, .menu-foot { display: flex; flex-direction: column; }
.menu-foot { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 44px; padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim); font-weight: 600; font-size: 14.5px; text-align: left;
  transition: background var(--t-fast), color var(--t-fast);
}
.menu-item .icon { color: var(--text-mute); transition: color var(--t-fast); }
.menu-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.menu-item:hover .icon { color: var(--accent-hot); }
.menu-item.danger:hover { background: rgba(255, 77, 79, 0.12); color: #ff8a8b; }
.menu-item.danger:hover .icon { color: var(--danger); }
.menu-item.accent { color: var(--text); }
.menu-item.accent .icon { color: var(--accent-hot); }

/* ================================================================ */
/* Navigation mobile                                                 */
/* ================================================================ */

#mobile-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding-bottom: var(--safe-bottom);
  background: rgba(6, 4, 6, 0.9);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--border);
  box-shadow: 0 -12px 30px -18px rgba(0, 0, 0, 0.9);
}
@media (min-width: 1024px) { #mobile-nav { display: none; } }
body.route-admin #mobile-nav, body.route-bare #mobile-nav { display: none; }

.mnav-inner {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: var(--mobile-nav-h);
  max-width: 560px; margin: 0 auto;
}
.mnav-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-width: 0;
  color: var(--text-mute);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.01em;
  transition: color var(--t) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.mnav-icon { display: grid; place-items: center; height: 26px; transition: transform var(--t) var(--ease), color var(--t), filter var(--t); }
.mnav-icon .avatar { border-radius: 7px; transition: box-shadow var(--t); }
.mnav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mnav-item:active .mnav-icon { transform: scale(0.88); }
.mnav-item.active { color: var(--text); }
.mnav-item.active .mnav-icon { color: var(--accent-hot); filter: drop-shadow(0 0 8px var(--accent-glow)); }
.mnav-item.active .mnav-icon .avatar { box-shadow: 0 0 0 2px var(--accent-hot); }
.mnav-item.active::before {
  content: "";
  position: absolute; top: -1px; left: 28%; right: 28%;
  height: 2px; border-radius: 0 0 3px 3px;
  background: var(--accent-hot);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ================================================================ */
/* Footer                                                            */
/* ================================================================ */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
}
body.route-admin #footer, body.route-bare #footer { display: none; }
.footer-inner { display: grid; gap: 22px; padding-top: 36px; padding-bottom: 26px; }
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .footer-bottom { grid-column: 1 / -1; }
  .footer-links { justify-content: flex-end; }
}
.footer-logo { font-size: 28px; }
.footer-tag { color: var(--text-mute); font-size: 13.5px; margin-top: 12px; max-width: 48ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.footer-links a {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px;
  color: var(--text-dim); font-weight: 600; font-size: 14px;
  transition: color var(--t-fast);
}
.footer-links a .icon { color: var(--text-mute); transition: color var(--t-fast); }
.footer-links a:hover { color: var(--text); }
.footer-links a:hover .icon { color: var(--accent-hot); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px;
  padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-mute);
}

/* ================================================================ */
/* Effets d'ambiance                                                 */
/* ================================================================ */

#fx {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}
#fx-overlay { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.fx-canvas { position: absolute; inset: 0; }

.fx-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 0% 100%, var(--accent-soft), transparent 70%),
    radial-gradient(50% 40% at 100% 100%, var(--ember-soft), transparent 72%),
    radial-gradient(70% 40% at 50% 0%, rgba(0, 0, 0, 0.4), transparent 80%);
}
[data-theme="noel"] .fx-glow {
  background:
    radial-gradient(70% 45% at 50% 0%, rgba(170, 210, 255, 0.07), transparent 75%),
    radial-gradient(55% 40% at 0% 100%, var(--accent-soft), transparent 70%),
    radial-gradient(50% 40% at 100% 100%, var(--ember-soft), transparent 72%);
}

.fx-fog { position: absolute; left: 0; right: 0; bottom: 0; height: 75vh; opacity: 0.85; }
.fx-fog-layer {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 200%;
  background-size: 50% 100%;
  background-repeat: repeat-x;
  animation: fx-drift 110s linear infinite;
  will-change: transform;
}
.fx-fog-layer.l1 {
  background-image:
    radial-gradient(ellipse 26% 34% at 18% 88%, rgba(205, 185, 190, 0.085), transparent 70%),
    radial-gradient(ellipse 22% 28% at 52% 94%, rgba(205, 185, 190, 0.07), transparent 70%),
    radial-gradient(ellipse 24% 30% at 82% 86%, rgba(205, 185, 190, 0.08), transparent 70%);
}
.fx-fog-layer.l2 {
  animation-duration: 160s;
  animation-direction: reverse;
  background-image:
    radial-gradient(ellipse 30% 26% at 30% 74%, rgba(160, 110, 120, 0.07), transparent 70%),
    radial-gradient(ellipse 28% 24% at 72% 70%, rgba(160, 110, 120, 0.06), transparent 70%);
}
.fx-fog-layer.l3 {
  animation-duration: 75s;
  background-image:
    radial-gradient(ellipse 18% 18% at 10% 98%, rgba(230, 210, 215, 0.07), transparent 70%),
    radial-gradient(ellipse 20% 16% at 44% 99%, rgba(230, 210, 215, 0.06), transparent 70%),
    radial-gradient(ellipse 16% 18% at 76% 97%, rgba(230, 210, 215, 0.07), transparent 70%);
}

.fx-bats, .fx-bat-flock { position: absolute; inset: 0; }
.fx-bat-flock.rtl { transform: scaleX(-1); }
.fx-bat {
  position: absolute; left: 0; top: 0;
  width: 64px; height: 32px;
  opacity: 0;
  color: #1a0609;
  animation: fx-bat-fly var(--dur, 10s) linear var(--delay, 0s) forwards;
  will-change: transform, opacity;
}
.fx-bat svg { width: 100%; height: 100%; fill: currentColor; overflow: visible; filter: drop-shadow(0 0 5px var(--accent-glow)); }
.fx-bat .w { transform-box: fill-box; animation: fx-flap var(--flap, 0.2s) ease-in-out infinite alternate; }
.fx-bat .wl { transform-origin: 100% 55%; }
.fx-bat .wr { transform-origin: 0% 55%; }

.fx-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 125% 95% at 50% 45%, transparent 60%, rgba(0, 0, 0, 0.5) 100%);
}
[data-theme="halloween"] .fx-vignette {
  background: radial-gradient(ellipse 130% 100% at 50% 42%, transparent 58%, rgba(70, 0, 0, 0.26) 84%, rgba(25, 0, 0, 0.6) 100%);
}
.fx-grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.055;
  animation: fx-grain 1.4s steps(6) infinite;
}
@media (pointer: coarse) { .fx-grain { animation: none; opacity: 0.04; } }

/* ================================================================ */
/* Avatars                                                           */
/* ================================================================ */

.avatar {
  position: relative;
  display: inline-grid; place-items: center; flex-shrink: 0;
  overflow: hidden;
  border-radius: 24%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); vertical-align: middle;
}
.avatar svg, .avatar img { display: block; width: 100%; height: 100%; }
.avatar-art svg { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }

/* Portraits photo (/img/avatars/<id>.png) : disque plein cadre à coins transparents.
   --av-zoom agrandit le disque pour qu'il couvre toute la forme de l'avatar : 1.26 couvre un carré arrondi
   jusqu'à ~22 % de rayon (√2·(0.5 − r) + r ≤ 0.5·zoom·0.985) ; les avatars ronds n'ont besoin que de 1.04. */
.avatar-photo {
  --av-zoom: 1.26;
  isolation: isolate;
  background: radial-gradient(circle at 50% 38%, var(--surface-3), var(--bg-elev) 78%);
}
.avatar-photo > img {
  position: absolute;
  left: calc(50% - var(--av-zoom) * 50%); top: calc(50% - var(--av-zoom) * 50%);
  width: calc(var(--av-zoom) * 100%); height: calc(var(--av-zoom) * 100%);
  max-width: none;
  object-fit: cover;
  -webkit-user-drag: none; user-select: none;
}
.avatar-photo::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 -10px 18px -14px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.comment > .avatar-photo, .composer > .avatar-photo, .identity > .avatar-photo, .identity-row > .avatar-photo { --av-zoom: 1.04; }

/* ================================================================ */
/* Typo de page / en-têtes                                           */
/* ================================================================ */

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-hot);
}
.eyebrow-profile { color: var(--text-dim); letter-spacing: 0.08em; }
.eyebrow-profile .avatar { border-radius: 6px; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head-text { min-width: 0; }
.page-title {
  margin-top: 6px;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 0.95; letter-spacing: 0.03em; text-transform: uppercase;
  overflow-wrap: anywhere;
}
.page-sub { color: var(--text-dim); margin-top: 8px; font-size: 15px; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.browse, .search-page, .mylist, .account, .legal, .playlist-page {
  padding-top: clamp(18px, 3.2vw, 40px);
  padding-bottom: 48px;
}

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1;
}
.section-title > .icon { color: var(--accent-hot); filter: drop-shadow(0 0 8px var(--accent-glow)); }

/* Méta (année · qualité · catégories) */
.meta-line {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 13.5px; font-weight: 600; color: var(--text-dim);
}
/* Séparateur + élément suivant groupés : un retour à la ligne ne laisse jamais un « • » orphelin en fin de ligne. */
.meta-seg { display: inline-flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.meta-dot { color: var(--accent-hot); font-size: 9px; opacity: 0.85; }
.meta-year { color: var(--text); font-variant-numeric: tabular-nums; }
.meta-cats { display: inline-flex; flex-wrap: wrap; }
.meta-cat + .meta-cat::before { content: ",\00a0"; color: var(--text-mute); }
a.meta-cat:hover { color: var(--accent-hot); }
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-item .icon { color: var(--text-mute); }
.meta-duration { font-variant-numeric: tabular-nums; }

/* Note sur 10 (★ 5,9) : couleur selon le palier — sémantique (bon / moyen / faible / mauvais), identique dans tous
   les thèmes. --rating-low (orange) n'a pas d'équivalent dans base.css. */
:root { --rating-low: #ff8a3d; }
:is(.meta-rating, .card-rating)[data-tier] { --tier: var(--warning); }
:is(.meta-rating, .card-rating)[data-tier="high"] { --tier: var(--success); }
:is(.meta-rating, .card-rating)[data-tier="low"] { --tier: var(--rating-low); }
:is(.meta-rating, .card-rating)[data-tier="bad"] { --tier: var(--danger); }
.rating-star { fill: currentColor; }
.meta-rating {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--tier);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.meta-rating .rating-star { filter: drop-shadow(0 0 6px var(--tier)); }
.meta-rating .rating-max { margin-left: -3px; color: var(--text-mute); font-size: 0.86em; font-weight: 600; }
/* Pays : seul élément de la ligne méta qui peut passer à la ligne (liste potentiellement longue). */
.meta-seg:has(.meta-countries) { white-space: normal; }
.meta-countries { min-width: 0; white-space: normal; }
.meta-countries-txt { min-width: 0; overflow-wrap: anywhere; }
.meta-more { color: var(--text-mute); }

/* ================================================================ */
/* Affiches & cartes                                                 */
/* ================================================================ */

.poster {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 110%, var(--accent-soft), transparent 60%),
    linear-gradient(160deg, var(--surface-3), var(--surface) 55%, var(--bg-elev));
}
.poster img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease-out);
}
.poster.is-loaded img { opacity: 1; }
.poster-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 10px;
  text-align: center;
  color: var(--accent-hot);
}
.poster-fallback .icon { opacity: 0.7; filter: drop-shadow(0 0 8px var(--accent-glow)); }
.poster-fallback-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.7vw, 22px);
  line-height: 1.02; letter-spacing: 0.04em; text-transform: uppercase;
  /* Place pour les accents des capitales (« FIÈVRE », « ÉTÉ ») que overflow: hidden couperait sinon. */
  padding-top: 0.16em;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
.poster.is-loaded .poster-fallback { visibility: hidden; }

.card {
  position: relative;
  flex: 0 0 auto;
  width: var(--card-w);
  scroll-snap-align: start;
}
.card-link {
  display: block;
  border-radius: var(--radius-sm);
  outline-offset: 3px;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
.card-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border), 0 8px 20px -10px rgba(0, 0, 0, 0.9);
  transform: translateZ(0);
  transition: transform 0.38s var(--ease-out), box-shadow 0.38s var(--ease-out);
}
.card-quality { position: absolute; top: 6px; left: 6px; z-index: 2; height: 19px; padding: 0 5px; font-size: 9.5px; }
/* Note ★ : même gabarit que le badge qualité, coin opposé. Avec un bouton « Retirer » (coin haut droit), elle descend
   en bas à gauche et s'efface au survol (le dégradé du survol occupe le bas de l'affiche). */
.card-rating {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  display: inline-flex; align-items: center; gap: 3px;
  height: 19px; padding: 0 5px 0 4px;
  border-radius: var(--radius-xs);
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 10px; font-weight: 800; line-height: 1; letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
  transition: opacity var(--t) var(--ease);
}
.card-rating .rating-star { color: var(--tier); }
.card.has-remove .card-rating { top: auto; right: auto; bottom: 6px; left: 6px; }
/* Cartes étroites (≈ 97 px à 360 px) : badge de note plus serré pour ne jamais toucher « 1080P ». */
@media (max-width: 479px) {
  .card-rating { gap: 2px; padding: 0 4px 0 3px; font-size: 9.5px; letter-spacing: 0; }
  .card-rating .rating-star { width: 9px; height: 9px; }
}
@media (hover: hover) and (pointer: fine) {
  .card.has-remove .card-link:hover .card-rating,
  .card.has-remove .card-link:focus-visible .card-rating { opacity: 0; }
}
.card-hover {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: 2px; padding: 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0) 72%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.card-play {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-bottom: 6px;
  border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 0 22px var(--accent-glow);
  transform: scale(0.6);
  transition: transform 0.4s var(--ease-out);
}
.card-play .icon { margin-left: 2px; }
.card-hover-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  font-size: 13px; font-weight: 700; line-height: 1.2;
}
.card-hover-meta { font-size: 11.5px; color: var(--text-dim); }

@media (hover: hover) and (pointer: fine) {
  .card-link:hover .card-poster,
  .card-link:focus-visible .card-poster {
    transform: translateY(-6px) scale(1.045);
    box-shadow: 0 0 0 1px var(--accent), 0 20px 40px -16px var(--accent-glow), 0 0 34px -10px var(--accent-glow);
  }
  .card-link:hover .card-hover, .card-link:focus-visible .card-hover { opacity: 1; }
  .card-link:hover .card-play, .card-link:focus-visible .card-play { transform: scale(1); }
  .card-link:hover .poster img { transform: scale(1.07); }
  .card-link:hover .card-caption-title { color: var(--accent-hot); }
}
.card-link:active .card-poster { transform: scale(0.97); }
.card-link:focus-visible { outline: 2px solid var(--accent-hot); }

.card-caption { display: flex; flex-direction: column; gap: 1px; padding: 8px 2px 0; min-width: 0; }
.card-caption-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color var(--t-fast);
}
.card-caption-sub { font-size: 11.5px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Grilles (cartes étroites, 3 colonnes à 360 px) : titre sur 2 lignes au lieu d'une ellipse après ~12 caractères. */
.poster-grid .card-caption-title {
  white-space: normal; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  line-height: 1.25;
}
/* Petits écrans (3–4 colonnes) : la plupart des titres tiennent sur 2 lignes → on les réserve pour aligner les sous-titres. */
@media (max-width: 639px) { .poster-grid .card-caption-title { min-height: 2.5em; } }

.card-remove {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background var(--t-fast), transform var(--t-fast);
}
.card-remove::before { content: ""; position: absolute; inset: -6px; }
.card-remove:hover { background: var(--accent); border-color: transparent; transform: scale(1.08); }

.card-enter { animation: ev-card-in 0.5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 22ms); }
.card-skel .card-poster { box-shadow: none; }
.card-skel .card-caption .skel-line { height: 10px; margin-top: 5px; }
.leaving { animation: ev-leave 0.24s var(--ease) forwards; pointer-events: none; }

/* Top 10 (gros chiffres détourés à la Netflix) */
.card-top { width: calc(var(--card-w) * 1.58); }
.card-top .card-link { display: flex; align-items: flex-end; }
.card-top .card-poster { flex: 1 1 auto; min-width: 0; z-index: 1; }
.card-rank {
  position: relative; z-index: 0;
  flex: 0 0 auto;
  width: calc(var(--card-w) * 0.66);
  margin-right: calc(var(--card-w) * -0.08);
  font-family: var(--font-display);
  font-size: calc(var(--card-w) * 1.42);
  line-height: 0.74;
  letter-spacing: -0.04em;
  text-align: right;
  color: var(--bg);
  -webkit-text-stroke: 2px var(--text-dim);
  paint-order: stroke fill;
  text-shadow: 0 0 34px var(--accent-soft);
  user-select: none;
  transform: translateY(2%);
  transition: -webkit-text-stroke-color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}
.card-top:nth-child(10) { width: calc(var(--card-w) * 1.98); }
.card-top:nth-child(10) .card-rank { width: calc(var(--card-w) * 1.06); letter-spacing: -0.08em; }
.card-top .card-link:hover .card-rank,
.card-top .card-link:focus-visible .card-rank {
  -webkit-text-stroke-color: var(--accent-hot);
  text-shadow: 0 0 30px var(--accent-glow);
}
@media (min-width: 900px) { .card-rank { -webkit-text-stroke-width: 3px; } }

/* ================================================================ */
/* Rangées                                                           */
/* ================================================================ */

.home-rows {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  gap: clamp(8px, 1.8vw, 22px);
  margin-top: -52px;
  padding-bottom: 12px;
}
@media (min-width: 768px) { .home-rows { margin-top: -120px; } }

.row { position: relative; }
.row-head {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 14px;
}
.row-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(21px, 2.3vw, 30px);
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.1;
}
.row-title-link { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; }
.row-title-link:hover > span:first-child { color: var(--text); text-shadow: 0 0 20px var(--accent-glow); }
.row-more {
  display: inline-flex; align-items: center; gap: 1px;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.02em; text-transform: none;
  color: var(--accent-hot);
  opacity: 0; transform: translateX(-8px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.row-title-link:hover .row-more, .row-title-link:focus-visible .row-more { opacity: 1; transform: none; }
@media (hover: none) { .row-more { opacity: 1; transform: none; } }
.row-sub { font-size: 13px; color: var(--text-mute); }

.row-body { position: relative; }
.row-scroller {
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--row-pad);
  padding: 12px var(--row-pad) 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.row-scroller::-webkit-scrollbar { display: none; }
.row-track { display: flex; gap: var(--row-gap); width: max-content; }
.row .card.has-caption .card-caption { padding-top: 7px; }

.row-arrow {
  position: absolute; top: 12px; bottom: 20px;
  z-index: 3;
  display: none; align-items: center; justify-content: center;
  width: max(48px, var(--row-pad));
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t) var(--ease);
}
.row-prev { left: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0)); }
.row-next { right: 0; background: linear-gradient(270deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0)); }
.row-arrow .icon { transition: transform var(--t) var(--ease-out); filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8)); }
.row-arrow:hover .icon { transform: scale(1.3); color: var(--accent-hot); filter: drop-shadow(0 0 12px var(--accent-glow)); }
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .row-arrow { display: flex; }
  .row:hover.can-prev .row-prev, .row:hover.can-next .row-next { opacity: 1; pointer-events: auto; }
}

.row-skel .skel-title { width: 190px; height: 24px; border-radius: 6px; }

/* ================================================================ */
/* Grilles                                                           */
/* ================================================================ */

.poster-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  gap: 18px 10px;
}
@media (min-width: 640px) { .poster-grid { gap: 22px 14px; } }
.poster-grid .card { width: auto; }

/* ================================================================ */
/* Squelettes                                                        */
/* ================================================================ */

.skel-line { height: 12px; width: 80%; border-radius: 6px; }
.skel-line.short { width: 48%; }
.skel-eyebrow { width: 110px; height: 14px; border-radius: 6px; }
.skel-hero-title { width: min(440px, 82%); height: clamp(42px, 6vw, 76px); border-radius: 10px; }
.skel-actions { display: flex; gap: 10px; margin-top: 6px; }
.skel-btn { width: 132px; height: 50px; border-radius: var(--radius); }
.loading-block { display: flex; justify-content: center; padding: 40px 0; }
.spinner-sm { width: 24px; height: 24px; margin: 8px auto; border-width: 2px; }

/* ================================================================ */
/* Héros (accueil)                                                   */
/* ================================================================ */

.hero {
  position: relative;
  height: clamp(500px, 84svh, 700px);
  overflow: hidden;
  isolation: isolate;
  outline: none;
}
@media (min-width: 768px) { .hero { height: clamp(560px, 88vh, 920px); } }

.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  z-index: 1;
  opacity: 0; visibility: hidden;
  transition: opacity 0.01s linear 1.05s, visibility 0s linear 1.06s;
}
.hero-slide.active {
  z-index: 2;
  opacity: 1; visibility: visible;
  transition: opacity 1.05s var(--hero-ease), visibility 0s;
}

.hero-bg {
  position: absolute; inset: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 50%, rgba(0, 0, 0, 0.55) 74%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 50%, rgba(0, 0, 0, 0.55) 74%, transparent 100%);
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 22%;
  transform: scale(1.1);
  transition: transform 10s linear;
}
.hero-slide.active .hero-bg img { transform: scale(1.01); }
.hero-bg.is-poster img, .hero-bg .bg-tall { object-position: center 18%; }
.hero-bg.has-both .bg-wide { display: none; }
@media (min-width: 768px) {
  .hero-bg.has-both .bg-wide { display: block; }
  .hero-bg.has-both .bg-tall { display: none; }
}
/* Mobile : l'affiche 2:3 occupe toute la hauteur du héros, son propre titre (tiers bas) tombe sous .hero-content →
   fondu bas très marqué pour que le texte du site ne se superpose pas au lettrage de l'affiche. */
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 24%),
    linear-gradient(to top, var(--bg) 0%, rgba(0, 0, 0, 0.94) 36%, rgba(0, 0, 0, 0.66) 54%, rgba(0, 0, 0, 0) 74%),
    radial-gradient(120% 90% at 50% 40%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.55) 100%),
    var(--hero-tint);
}
@media (max-width: 767px) {
  .hero-bg.is-poster img, .hero-bg .bg-tall { object-position: center 12%; }
}
@media (min-width: 768px) {
  .hero-bg.is-poster img { filter: blur(28px) saturate(1.4) brightness(0.5); transform: scale(1.25); }
  .hero-slide.active .hero-bg.is-poster img { transform: scale(1.15); }
  .hero-shade {
    background:
      linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 22%),
      linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.62) 28%, rgba(0, 0, 0, 0.12) 58%, rgba(0, 0, 0, 0) 75%),
      radial-gradient(130% 100% at 60% 35%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.6) 100%),
      var(--hero-tint);
  }
}

.hero-mist {
  position: absolute; left: -15%; right: -15%; bottom: 0;
  height: 48%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 34% 55% at 18% 100%, rgba(210, 190, 195, 0.11), transparent 70%),
    radial-gradient(ellipse 30% 46% at 52% 100%, rgba(160, 100, 110, 0.10), transparent 70%),
    radial-gradient(ellipse 32% 52% at 84% 100%, rgba(210, 190, 195, 0.09), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 45%, #000 60%, transparent 100%);
  animation: ev-mist 16s ease-in-out infinite alternate;
}
html:not([data-fx="halloween"]) .hero-mist { display: none; }

.hero-art { display: none; }
@media (min-width: 768px) {
  .hero-art {
    display: block;
    position: absolute; z-index: 1;
    right: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
    top: 46%;
    width: clamp(190px, 21vw, 330px);
    aspect-ratio: 2 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    transform: translateY(-50%) perspective(1000px) rotateY(-12deg) rotateZ(1.5deg);
    box-shadow: 0 0 0 1px var(--border-strong), 0 40px 80px -30px #000, 0 0 80px -12px var(--accent-glow);
    transition: opacity 0.3s var(--ease);
  }
  .hero-slide.active .hero-art { animation: ev-art-in 1.1s var(--ease-out) both, ev-art-float 7s ease-in-out 1.1s infinite; }
}
.hero-slide:not(.active) .hero-art { opacity: 0; }

.hero-content {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex; justify-content: center;
  padding-bottom: 112px;
  text-align: center;
  transition: opacity 0.3s var(--ease);
}
.hero-slide:not(.active) .hero-content { opacity: 0; }
.hero-text { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 640px; }
.hero-slide.active .hero-text > * { animation: ev-rise 0.8s var(--ease-out) both; }
.hero-slide.active .hero-text > *:nth-child(2) { animation-delay: 0.07s; }
.hero-slide.active .hero-text > *:nth-child(3) { animation-delay: 0.14s; }
.hero-slide.active .hero-text > *:nth-child(4) { animation-delay: 0.21s; }
.hero-slide.active .hero-text > *:nth-child(5) { animation-delay: 0.28s; }

.hero-eyebrow { text-shadow: 0 0 14px var(--accent-glow); }
.hero-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(42px, 12.5vw, 66px);
  line-height: 0.9; letter-spacing: 0.03em; text-transform: uppercase;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.75), 0 0 60px var(--accent-soft);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.hero .meta-line { justify-content: center; color: rgba(255, 255, 255, 0.86); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
.hero-synopsis {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  max-width: 560px;
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}
@media (max-width: 479px) { .hero-synopsis { display: none; } }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 6px; }
.hero-actions .btn-outline { background: rgba(0, 0, 0, 0.35); }
.hero-info { flex-shrink: 0; }
@media (max-width: 479px) {
  .hero-actions .btn-lg { min-height: 48px; padding: 0 14px; font-size: 15px; }
  .hero-play, .hero-list { flex: 1 1 0; min-width: 0; }
  .hero-actions .hero-info { width: 48px; min-width: 48px; padding: 0; }
}
@media (min-width: 768px) {
  .hero-content { justify-content: flex-start; text-align: left; padding-bottom: clamp(170px, 22vh, 240px); }
  .hero-text { align-items: flex-start; max-width: min(640px, 50vw); }
  .hero-title { font-size: clamp(56px, 7.4vw, 124px); }
  .hero .meta-line { justify-content: flex-start; }
  .hero-actions { justify-content: flex-start; width: auto; }
}

.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 58px;
  z-index: 4;
  display: flex; justify-content: center;
  pointer-events: none;
}
.hero-dots-inner { display: flex; gap: 4px; pointer-events: auto; }
.hero-dot { position: relative; display: flex; align-items: center; width: 20px; height: 44px; transition: width 0.35s var(--ease-out); }
.hero-dot::before { content: ""; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.28); transition: background var(--t); }
.hero-dot:hover::before { background: rgba(255, 255, 255, 0.5); }
.hero-dot.active { width: 46px; }
.hero-dot-fill {
  position: absolute; left: 0; top: 50%;
  width: 0; height: 4px; margin-top: -2px;
  border-radius: 4px;
  background: var(--accent-hot);
  box-shadow: 0 0 10px var(--accent-glow);
}
.hero-dot.active .hero-dot-fill { animation: ev-progress 8s linear forwards; }
.hero.paused .hero-dot.active .hero-dot-fill { animation-play-state: paused; }
.hero.no-auto .hero-dot.active .hero-dot-fill { animation: none; width: 100%; }
@media (min-width: 768px) {
  .hero-dots { justify-content: flex-end; bottom: clamp(128px, 17vh, 190px); }
}

.hero-skel { display: flex; }
.hero-skel .hero-content { flex-direction: column; align-items: center; gap: 14px; }
@media (min-width: 768px) { .hero-skel .hero-content { align-items: flex-start; } }

/* Catalogue vide */
.home-empty {
  position: relative;
  min-height: min(90svh, 780px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  padding: calc(var(--header-h) + 40px) var(--gutter) 60px;
  text-align: center;
  overflow: hidden;
}
.home-empty-glow {
  position: absolute; left: 50%; top: 45%;
  width: min(720px, 130vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 62%);
  animation: ev-pulse-glow 6s ease-in-out infinite;
  pointer-events: none;
}
.home-empty-art {
  position: relative;
  display: grid; place-items: center;
  width: 132px; height: 132px; border-radius: 50%;
  color: var(--accent-hot);
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  filter: drop-shadow(0 0 22px var(--accent-glow));
  animation: ev-float 4.5s ease-in-out infinite;
}
.home-empty-title {
  position: relative;
  font-family: var(--font-brand); font-weight: 400;
  font-size: clamp(38px, 8vw, 84px);
  line-height: 1; letter-spacing: 0.03em;
  color: var(--text);
  text-shadow: 0 0 40px var(--accent-glow);
}
.home-empty-text { position: relative; max-width: 46ch; color: var(--text-dim); font-size: 15.5px; }
.home-empty .btn, .home-empty .eyebrow { position: relative; }
.home-empty .btn { margin-top: 10px; }

/* ================================================================ */
/* Fiche contenu                                                     */
/* ================================================================ */

.title-hero {
  position: relative;
  isolation: isolate;
  padding-top: calc(var(--header-h) + clamp(16px, 5vh, 72px));
  padding-bottom: clamp(20px, 3vw, 40px);
}
.title-bg {
  position: absolute; left: 0; right: 0; top: 0;
  z-index: -1;
  height: min(100%, 900px);
  min-height: 520px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 42%, rgba(0, 0, 0, 0.45) 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 42%, rgba(0, 0, 0, 0.45) 72%, transparent 100%);
}
.title-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; animation: ev-bg-in 1.4s var(--ease-out) both; }
.title-bg.is-poster img { filter: blur(30px) saturate(1.45) brightness(0.42); transform: scale(1.3); animation: none; }
.title-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.1) 30%, rgba(0, 0, 0, 0.55) 100%),
    var(--hero-tint);
}
@media (min-width: 768px) {
  .title-shade {
    background:
      linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 26%),
      linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.15) 75%),
      var(--hero-tint);
  }
}

.title-head {
  display: grid; grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 22px;
  text-align: center;
}
.title-poster {
  position: relative;
  width: min(54vw, 240px);
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border-strong), 0 30px 60px -24px #000, 0 0 70px -14px var(--accent-glow);
  animation: ev-poster-in 0.9s var(--ease-out) both;
}
.title-info {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  min-width: 0; width: 100%; max-width: 860px;
}
.title-info > * { animation: ev-rise 0.7s var(--ease-out) both; }
.title-info > *:nth-child(2) { animation-delay: 0.05s; }
.title-info > *:nth-child(3) { animation-delay: 0.1s; }
.title-info > *:nth-child(4) { animation-delay: 0.15s; }
.title-info > *:nth-child(5) { animation-delay: 0.2s; }
.title-info > *:nth-child(n + 6) { animation-delay: 0.25s; }
.title-name {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(40px, 9vw, 100px);
  line-height: 0.9; letter-spacing: 0.03em; text-transform: uppercase;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7), 0 0 70px var(--accent-soft);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.title-meta { justify-content: center; }
.title-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.title-cats .chip { background: rgba(0, 0, 0, 0.35); }
.title-original { margin-top: -6px; color: var(--text-dim); font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.title-original-label { color: var(--text-mute); font-weight: 700; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.title-original-name { font-style: italic; }
.title-synopsis-wrap { display: flex; flex-direction: column; align-items: inherit; gap: 2px; max-width: 70ch; }
.title-synopsis { color: var(--text-dim); font-size: 15.5px; line-height: 1.7; white-space: pre-line; }
.title-synopsis.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
.title-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; margin-top: 6px; }
.title-actions .btn-outline { background: rgba(0, 0, 0, 0.35); }
.title-trailer-ext { margin-left: -2px; color: var(--text-mute); }
.lbl-short { display: none; }
/* Mobile : « Regarder » pleine largeur, puis les actions secondaires en tuiles (icône au-dessus du libellé, comme
   Netflix) — trois tuiles tiennent à 360 px, avec ou sans bande-annonce. */
@media (max-width: 599px) {
  .title-actions { gap: 8px; }
  .title-watch { flex: 1 0 100%; }
  .title-actions .title-trailer, .title-playlist, .title-share {
    flex: 1 1 0; min-width: 0;
    flex-direction: column; gap: 4px;
    min-height: 62px; padding: 8px 4px;
    border-radius: var(--radius);
    font-size: 12.5px; line-height: 1.2;
    text-align: center;
  }
  /* « Bande-annonce » est le libellé le plus long : sa tuile prend un peu plus de place que les deux autres. */
  .title-actions .title-trailer { flex-grow: 1.3; }
  .title-actions .title-trailer > span, .title-playlist > span, .title-share > span {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  }
  .title-actions .title-trailer .icon, .title-playlist .icon, .title-share .icon { width: 20px; height: 20px; }
  .title-actions .title-trailer-ext { display: none; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
}
/* Mobile : titre, méta, chips et actions centrés, mais un long synopsis se lit mieux aligné à gauche. */
@media (max-width: 767px) {
  .title-synopsis-wrap { align-items: stretch; text-align: left; }
  .title-more { align-self: flex-start; }
}
@media (min-width: 768px) {
  .title-head {
    grid-template-columns: clamp(220px, 24vw, 320px) minmax(0, 1fr);
    justify-items: start; align-items: start;
    gap: clamp(24px, 4vw, 60px);
    text-align: left;
  }
  .title-poster { width: 100%; position: sticky; top: calc(var(--header-h) + 16px); }
  .title-info { align-items: flex-start; }
  .title-meta, .title-cats, .title-actions { justify-content: flex-start; }
}
/* Colonne d'infos plus étroite (tablette / petit portable) : libellés courts pour garder les 3 actions sur une ligne. */
@media (min-width: 768px) and (max-width: 1099px) {
  .title-actions .btn-lg { padding: 0 20px; }
  .title-actions .lbl-long { display: none; }
  .title-actions .lbl-short { display: inline; }
}
/* Quatre actions (bande-annonce) : libellé court un peu plus longtemps pour rester sur une ligne. */
@media (min-width: 1100px) and (max-width: 1279px) {
  .title-actions.has-trailer .lbl-long { display: none; }
  .title-actions.has-trailer .lbl-short { display: inline; }
}

/* Générique : Réalisation / Scénario / Avec / Mots-clés (grille libellé + valeur alignée sur la ligne de base). */
.title-credits {
  display: grid; grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 10px 18px;
  width: 100%; max-width: 70ch;
  margin: 4px 0 0; padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: left;
  font-size: 14.5px;
}
.credit-row { display: contents; }
.title-credits dt {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-mute);
  white-space: nowrap;
}
.title-credits dd { margin: 0; min-width: 0; color: var(--text-dim); line-height: 1.55; overflow-wrap: anywhere; }
.credit-link {
  color: var(--text); font-weight: 600;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
.credit-link:hover, .credit-link:focus-visible { color: var(--accent-hot); text-decoration-color: currentColor; }
.cast-list, .kw-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cast-chip {
  display: inline-flex; align-items: center;
  max-width: 100%; min-height: 28px; padding: 3px 11px;
  border-radius: 14px; /* pilule sur une ligne, rectangle arrondi si un nom très long passe sur deux */
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px; font-weight: 600; line-height: 1.3;
  overflow-wrap: anywhere;
}
.cast-chip.cast-extra:not([hidden]) { animation: ev-fade 0.3s var(--ease) both; }
.cast-toggle-wrap { display: inline-flex; }
.cast-toggle {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 28px; padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px dashed var(--border-strong);
  color: var(--accent-hot);
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.cast-toggle:hover { background: var(--accent-soft); border-color: var(--accent); }
.cast-toggle::before { content: ""; position: absolute; inset: -8px -4px; }
.kw {
  display: inline-flex; align-items: center;
  max-width: 100%; min-height: 22px; padding: 1px 9px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 12px; font-weight: 600; line-height: 1.4;
  overflow-wrap: anywhere;
}
/* Petit mobile : libellé au-dessus de la valeur (toute la largeur pour les puces d'acteurs). */
@media (max-width: 479px) {
  .title-credits { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .credit-row + .credit-row dt { margin-top: 10px; }
}

/* Modale bande-annonce (YouTube sans cookies) : 16:9, aussi large que possible sans dépasser la hauteur. */
.trailer-modal { max-width: min(1040px, calc((88dvh - 124px) * 16 / 9 + 40px)); }
.trailer-modal .modal-body { padding: 4px 20px 18px; }
.trailer-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px var(--border-strong), 0 24px 60px -24px var(--accent-glow);
}
.trailer-frame iframe { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; }
.trailer-loading { position: absolute; inset: 0; display: grid; place-items: center; }
.trailer-loading .spinner { margin: 0; }
.trailer-frame.is-loaded .trailer-loading { display: none; }
.trailer-caption { margin-top: 10px; color: var(--text-dim); font-size: 13.5px; overflow-wrap: anywhere; }
.trailer-caption strong { color: var(--text); }
@media (max-width: 600px) {
  /* Une vidéo se regarde centrée, pas en feuille collée au bas de l'écran. */
  .trailer-backdrop { align-items: center; padding: 12px; }
  .trailer-modal { border-radius: var(--radius-lg); padding-bottom: 0; transform: translateY(16px) scale(0.98); }
  .trailer-modal .modal-head { padding: 12px 10px 4px 16px; }
  .trailer-modal .modal-title { font-size: 24px; }
  .trailer-modal .modal-body { padding: 4px 12px 14px; }
}
.title-draft {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 13px; font-weight: 600; color: var(--text-dim);
}
@media (min-width: 768px) { .title-draft { justify-content: flex-start; } }

.title-body { display: flex; flex-direction: column; gap: clamp(32px, 5vw, 56px); padding-top: 8px; padding-bottom: 12px; }
.title-similar { margin-top: clamp(20px, 4vw, 40px); }

/* Lecteur */
.player-section { scroll-margin-top: 96px; }
.player {
  position: relative;
  width: 100%; max-width: 1200px; margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px var(--border-strong), 0 0 0 6px var(--accent-soft), 0 40px 90px -40px var(--accent-glow), 0 30px 60px -30px #000;
  container-type: inline-size;
}
@media (max-width: 479px) { .player { border-radius: var(--radius); } }
.player.bump { animation: ev-bump 0.7s var(--ease-out); }
.player iframe { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; }
.player-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  font-size: 13px; color: var(--text-mute);
}
.player-loading .spinner { margin: 0 0 8px; }
.player.is-loaded .player-loading { display: none; }
.player-error {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 16px;
  text-align: center; color: var(--text-dim); font-size: 14px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
}
.player-error .icon { color: var(--accent-hot); }
.player-error strong { color: var(--text); font-size: 16px; }
.player-error p { max-width: 44ch; }
.player-bar {
  max-width: 1200px; margin: 12px auto 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 8px 12px;
}
.player-note { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-mute); }

/* Portail publicitaire */
.gate {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  overflow: hidden;
  text-align: center;
}
.gate-bg { position: absolute; inset: -8%; background: radial-gradient(circle at 50% 40%, var(--accent-deep), var(--bg) 75%); }
.gate-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(22px) saturate(1.35) brightness(0.42); transform: scale(1.1); }
.gate::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 78%), var(--hero-tint);
  pointer-events: none;
}
.gate-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 10px 14px;
}
.gate-kicker {
  font-family: var(--font-display);
  font-size: clamp(14px, 2.6cqi, 24px);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim);
}
.gate-btn {
  position: relative;
  display: grid; place-items: center;
  width: clamp(56px, 12cqi, 116px); aspect-ratio: 1;
  margin: 4px 0;
  border-radius: 50%;
  color: var(--on-accent);
  background: radial-gradient(circle at 35% 30%, var(--accent-hot), var(--accent) 55%, var(--accent-deep));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 12px 40px -6px var(--accent-glow), 0 0 60px -6px var(--accent-glow);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.gate-btn .icon { position: relative; z-index: 1; width: 42%; height: 42%; margin-left: 7%; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)); }
.gate-btn:hover { transform: scale(1.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 14px 50px -6px var(--accent-glow), 0 0 90px -4px var(--accent-glow); }
.gate-btn:active { transform: scale(0.94); }
.gate-btn:focus-visible { outline: 3px solid var(--text); outline-offset: 5px; border-radius: 50%; }
.gate-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent-hot);
  animation: ev-ring 2.2s var(--ease-out) infinite;
  pointer-events: none;
}
.gate-ring.r2 { animation-delay: 1.1s; }
.gate-label { font-weight: 800; font-size: clamp(14px, 2.4cqi, 20px); letter-spacing: 0.01em; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); }
.gate-progress { display: flex; align-items: center; gap: 10px; }
.gate-step {
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-strong);
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.gate-dots { display: flex; gap: 6px; }
.gate-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); transition: background var(--t), box-shadow var(--t); }
.gate-dot.done { background: var(--accent-hot); box-shadow: 0 0 10px var(--accent-glow); }
.gate-dot.current { background: transparent; box-shadow: inset 0 0 0 2px var(--accent-hot); animation: ev-blink 1.3s ease-in-out infinite; }
.gate-msg {
  max-width: 46ch;
  font-size: clamp(11.5px, 2cqi, 14.5px);
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  text-wrap: balance;
}
@container (max-width: 440px) {
  .gate-kicker { display: none; }
  .gate-inner { gap: 4px; padding: 8px 12px; }
  .gate-btn { margin: 2px 0; }
}

/* Commentaires */
/* Même colonne que le lecteur (1200 px) : lecteur et commentaires partagent le même bord gauche. */
.comments { width: 100%; max-width: 1200px; margin: 0 auto; scroll-margin-top: 96px; }
.comments-count {
  display: inline-grid; place-items: center;
  min-width: 28px; height: 24px; padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent-hot);
  font-family: var(--font-body); font-size: 13px; font-weight: 800; letter-spacing: 0;
}
.composer {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-elev));
  border: 1px solid var(--border);
  transition: border-color var(--t), box-shadow var(--t);
}
.composer:focus-within { border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer > .avatar { border-radius: 50%; }
.composer-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.composer-as { font-size: 13px; color: var(--text-mute); }
.composer-as strong { color: var(--text-dim); }
.composer-guest { display: flex; flex-direction: column; gap: 4px; }
.composer-name { max-width: 300px; min-height: 42px; padding-top: 8px; padding-bottom: 8px; }
.composer-input { min-height: 56px; resize: none; background: var(--bg); overflow-y: auto; }
.composer-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.composer-counter { font-size: 12px; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.composer-counter.warn { color: var(--warning); }
.composer-hint { font-size: 12px; color: var(--text-mute); }
@media (hover: none) { .composer-hint { display: none; } }
.composer-send { margin-left: auto; }
.composer-locked { align-items: center; flex-wrap: wrap; }
.composer-lock-icon {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-hot);
  box-shadow: 0 0 24px -6px var(--accent-glow);
}
.composer-lock-text { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.composer-lock-text span { font-size: 13.5px; color: var(--text-dim); }
@media (max-width: 479px) {
  .composer { padding: 12px; }
  .composer > .avatar { display: none; } /* effectif : avatarEl() ne pose plus de display en ligne */
  .composer-locked .btn { width: 100%; }
}

.comment-list { display: flex; flex-direction: column; gap: 2px; }
.comment {
  position: relative;
  display: flex; gap: 12px;
  padding: 12px 46px 12px 12px;
  border-radius: var(--radius);
  transition: background var(--t);
}
.comment:hover { background: rgba(255, 255, 255, 0.025); }
.comment > .avatar { border-radius: 50%; }
.comment.is-admin { background: linear-gradient(90deg, var(--accent-soft), rgba(0, 0, 0, 0) 65%); box-shadow: inset 2px 0 0 var(--accent); }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.comment-author { font-size: 14px; overflow-wrap: anywhere; }
.comment-time { font-size: 12px; color: var(--text-mute); }
.comment-body { max-width: 80ch; margin-top: 4px; font-size: 14.5px; color: var(--text-dim); white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-del { position: absolute; top: 8px; right: 6px; color: var(--text-mute); opacity: 0; transition: opacity var(--t), color var(--t); }
.comment-del:hover { color: var(--danger); }
.comment:hover .comment-del, .comment-del:focus-visible { opacity: 1; }
@media (hover: none) { .comment-del { opacity: 0.75; } }
.comment.entering { animation: ev-rise 0.5s var(--ease-out) both; }
.comment-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 30px 12px;
  text-align: center;
  color: var(--text-mute); font-size: 14px;
}
.comment-empty .icon { color: var(--accent-hot); margin-bottom: 4px; filter: drop-shadow(0 0 10px var(--accent-glow)); }
.comment-empty strong { color: var(--text-dim); }
.comment-loading { padding: 10px; }
.comments-more { display: flex; margin: 16px auto 0; }

/* ================================================================ */
/* Catalogue                                                         */
/* ================================================================ */

.sort-field { display: flex; align-items: center; gap: 10px; }
.sort-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-mute); white-space: nowrap; }
.sort-select { width: auto; min-width: 190px; }
@media (max-width: 599px) {
  .browse-head { align-items: stretch; }
  .sort-field { width: 100%; }
  .sort-select { flex: 1; min-width: 0; }
}
.chips-scroller {
  margin: 0 calc(var(--gutter) * -1) 22px;
  padding: 4px var(--gutter) 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}
.chips-scroller::-webkit-scrollbar { display: none; }
.chips-track { display: flex; gap: 8px; width: max-content; }
.chips-track .chip, .chips-wrap .chip { min-height: 40px; }
.chip-count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 18px; padding: 0 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  font-size: 10.5px; font-weight: 800;
}
.chip.active .chip-count, .chip[aria-pressed="true"] .chip-count { background: rgba(0, 0, 0, 0.22); }
.browse-results { min-height: 40vh; transition: opacity var(--t) var(--ease); }
.browse-results.is-loading { opacity: 0.4; pointer-events: none; }
.load-more-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 30px; }
.load-progress { font-size: 13px; color: var(--text-mute); }
.load-more.is-busy .icon { animation: ev-bob 0.7s ease-in-out infinite alternate; }

/* ================================================================ */
/* Recherche                                                         */
/* ================================================================ */

.search-box { position: relative; display: flex; align-items: center; margin: 6px 0 14px; }
.search-icon { position: absolute; left: 18px; color: var(--text-mute); pointer-events: none; transition: color var(--t); }
.search-input {
  width: 100%; height: 60px;
  padding: 0 54px 0 54px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 18px; font-weight: 500;
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.search-input::placeholder { color: var(--text-mute); }
.search-input::-webkit-search-cancel-button, .search-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 24px 50px -24px var(--accent-glow);
}
.search-box:focus-within .search-icon { color: var(--accent-hot); }
@media (min-width: 768px) {
  .search-input { height: 74px; font-size: 22px; padding-left: 62px; }
  .search-icon { left: 22px; }
}
.search-clear {
  position: absolute; right: 8px;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--text-dim);
  transition: background var(--t-fast), color var(--t-fast);
}
.search-clear:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.search-status { min-height: 22px; margin-bottom: 14px; font-size: 14px; color: var(--text-dim); }
.search-body { transition: opacity var(--t); }
.search-body.is-loading { opacity: 0.55; }
.search-section { margin-bottom: 32px; }
.search-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.search-section-head .search-section-title { margin-bottom: 8px; }
.search-section-title {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
}
.search-section-title .icon { color: var(--accent-hot); }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-recent { padding: 0; gap: 0; overflow: hidden; }
.chip-recent-term { min-height: 40px; padding: 0 6px 0 14px; color: inherit; font-weight: 600; }
.chip-recent-x { display: grid; place-items: center; width: 36px; min-height: 40px; color: var(--text-mute); transition: color var(--t-fast), background var(--t-fast); }
.chip-recent-x:hover { color: var(--text); background: var(--accent-soft); }

/* ================================================================ */
/* Profils — « Qui regarde ? »                                       */
/* ================================================================ */

.profiles-screen {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  padding: 20px var(--gutter) 48px;
}
.profiles-screen::before {
  content: "";
  position: absolute; left: 50%; top: 42%;
  width: min(900px, 140vw); aspect-ratio: 1.6;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 62%);
  pointer-events: none;
}
.profiles-inner {
  position: relative;
  width: 100%; max-width: 1000px;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  text-align: center;
}
.profiles-title {
  font-family: var(--font-brand); font-weight: 400;
  font-size: clamp(42px, 9vw, 96px);
  line-height: 1; letter-spacing: 0.03em;
  color: var(--text);
  text-shadow: 0 0 34px var(--accent-glow), 0 4px 24px rgba(0, 0, 0, 0.7);
  animation: ev-rise 0.7s var(--ease-out) both;
}
.profiles-sub { color: var(--text-dim); font-size: clamp(14px, 1.6vw, 18px); animation: ev-rise 0.7s var(--ease-out) 0.08s both; }
.profile-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(14px, 3.4vw, 36px);
  margin: clamp(22px, 5vh, 48px) 0 clamp(18px, 4vh, 36px);
}
.profile-grid > li { animation: ev-rise 0.6s var(--ease-out) both; animation-delay: calc(0.12s + var(--i, 0) * 70ms); }
.profile-tile {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  width: clamp(94px, 26vw, 156px);
  border-radius: var(--radius);
  outline-offset: 6px;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.profile-avatar {
  position: relative;
  display: grid; place-items: center;
  width: 100%; aspect-ratio: 1;
  border-radius: 22%;
  color: var(--text-mute);
  box-shadow: 0 18px 40px -18px #000;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), color var(--t), border-color var(--t);
}
.profile-avatar > .avatar { width: 100%; height: 100%; border-radius: 22%; transition: filter var(--t); }
.profile-name {
  max-width: 100%;
  font-size: clamp(13.5px, 1.5vw, 16px); font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color var(--t);
}
.profile-tile:hover .profile-avatar, .profile-tile:focus-visible .profile-avatar {
  transform: translateY(-4px) scale(1.07);
  box-shadow: 0 0 0 3px var(--text), 0 0 46px -4px var(--accent-glow), 0 24px 50px -20px #000;
}
.profile-tile:hover .profile-name, .profile-tile:focus-visible .profile-name { color: var(--text); }
.profile-tile:focus-visible { outline: none; }
.profile-tile.is-current .profile-avatar { box-shadow: 0 0 0 2px var(--accent), 0 0 30px -6px var(--accent-glow), 0 18px 40px -18px #000; }
.profile-add .profile-name { white-space: normal; line-height: 1.3; }
.profile-add .profile-avatar { border: 2px dashed var(--border-strong); background: rgba(255, 255, 255, 0.02); box-shadow: none; }
.profile-add:hover .profile-avatar, .profile-add:focus-visible .profile-avatar { color: var(--text); border-color: var(--accent-hot); background: var(--accent-soft); }
.profile-edit {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: 22%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.is-managing .profile-edit { opacity: 1; }
.is-managing .profile-avatar > .avatar { filter: saturate(0.55) brightness(0.85); }
.is-managing .profile-tile:hover .profile-edit .icon { transform: scale(1.15); }
.profile-edit .icon { transition: transform var(--t) var(--ease-out); }
.profile-tile.is-chosen .profile-avatar {
  transform: scale(1.16);
  box-shadow: 0 0 0 3px var(--accent-hot), 0 0 90px var(--accent-glow);
}
.profiles-screen.is-leaving .profile-tile:not(.is-chosen) { opacity: 0; transform: scale(0.9); }
.profiles-screen.is-leaving .profiles-title,
.profiles-screen.is-leaving .profiles-sub,
.profiles-screen.is-leaving .profiles-actions,
.profiles-screen.is-leaving .guest-notice { opacity: 0; transition: opacity 0.3s var(--ease); }
.profiles-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; animation: ev-rise 0.7s var(--ease-out) 0.3s both; }
.profiles-manage { text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; }
.profiles-account {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 8px; margin-top: 18px;
  font-size: 13.5px; color: var(--text-mute);
}
.profiles-account strong { color: var(--text-dim); }
.guest-notice {
  width: 100%; max-width: 640px;
  margin-top: clamp(22px, 4vh, 40px);
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  text-align: left;
  border-color: var(--border-strong);
  animation: ev-rise 0.7s var(--ease-out) 0.4s both;
}
.guest-notice-head { display: flex; align-items: flex-start; gap: 12px; }
.guest-notice-icon {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-hot);
}
.guest-notice strong { display: block; font-size: 14.5px; }
.guest-notice p { margin-top: 3px; font-size: 13.5px; color: var(--text-dim); }

/* Éditeur de profil — la modale garde la hauteur du viewport : seule la grille d'avatars défile. */
.modal-profile { max-width: 620px; }
.modal-profile .modal-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-bottom: 16px; }
.pe-form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 16px; }
.pe-top { display: flex; align-items: center; gap: 16px; }
.pe-preview { flex: none; width: 84px; aspect-ratio: 1; }
.pe-preview > .avatar {
  width: 100%; height: 100%;
  border-radius: 24%;
  box-shadow: 0 0 0 3px var(--surface-3), 0 0 40px -6px var(--accent-glow);
  animation: ev-pop 0.35s var(--ease-out);
}
.pe-name-field { flex: 1 1 auto; min-width: 0; }
.pe-counter { flex-shrink: 0; margin-left: auto; }
.pe-avatars { flex: 1 1 auto; min-height: 0; gap: 8px; }
.pe-avatars-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.pe-avatar-current {
  min-width: 0;
  font-size: 12.5px; font-weight: 600; color: var(--text-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.avatar-picker { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.ap-chipbar { position: relative; flex: none; }
.ap-chip-nav {
  position: absolute; top: 50%; z-index: 2;
  display: none; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  transform: translateY(-50%);
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: 0 6px 16px -6px #000;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.ap-chip-nav:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ap-chip-prev { left: -8px; }
.ap-chip-next { right: -8px; }
@media (hover: hover) and (pointer: fine) {
  .ap-chipbar:not(.at-start) .ap-chip-prev, .ap-chipbar:not(.at-end) .ap-chip-next { display: grid; }
}
.ap-chips {
  position: relative;
  display: flex; gap: 8px;
  margin: 0 -4px; padding: 2px 4px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none;
  --fade-l: 28px; --fade-r: 36px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
}
.ap-chipbar.at-start .ap-chips { --fade-l: 0px; }
.ap-chipbar.at-end .ap-chips { --fade-r: 0px; }
@media (hover: hover) and (pointer: fine) { .ap-chips { --fade-l: 44px; --fade-r: 56px; } }
.ap-chips::-webkit-scrollbar { display: none; }
.ap-chip { flex: none; min-height: 38px; }
.ap-chip:focus-visible { outline-offset: -2px; }
@media (pointer: coarse) { .ap-chip { min-height: 44px; } }

.ap-scroll {
  position: relative; /* référence des offsetTop utilisés par le JS */
  flex: 1 1 auto; min-height: 210px;
  overflow-y: auto; overscroll-behavior: contain;
  scroll-padding-top: 46px; scroll-padding-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: inset 0 10px 24px -18px rgba(0, 0, 0, 0.9);
}
.ap-group + .ap-group { margin-top: 2px; }
.ap-group-head {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 8px;
  font-family: var(--font-display); font-weight: 400;
  font-size: 19px; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1;
  color: var(--text);
  background: rgba(13, 8, 11, 0.86);
  background: color-mix(in srgb, var(--bg-elev) 86%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.ap-group-count {
  font-family: var(--font-body); font-size: 11px; font-weight: 800; letter-spacing: 0;
  color: var(--text-mute);
  padding: 2px 7px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
}
.ap-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 14px 12px;
  padding: 6px 14px 16px;
}

.avatar-choice {
  position: relative;
  aspect-ratio: 1;
  border-radius: 24%;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease);
}
.avatar-choice .avatar { width: 100%; height: 100%; border-radius: 24%; transition: filter var(--t) var(--ease); }
@media (hover: hover) {
  .avatar-choice:hover { transform: translateY(-2px) scale(1.06); z-index: 1; }
}
.avatar-choice:active { transform: scale(0.95); }
.avatar-choice.selected { box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 5px var(--accent-hot), 0 0 26px -2px var(--accent-glow); z-index: 1; }
/* Focus clavier distinct de la sélection : anneau clair par-dessus l'anneau accent. */
.avatar-choice:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 24%; z-index: 2; }
.avatar-choice-check {
  position: absolute; right: -7px; top: -7px; z-index: 2;
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 0 0 2px var(--bg-elev), 0 4px 10px -2px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: scale(0.4);
  transition: opacity var(--t-fast), transform var(--t) var(--ease-out);
}
.avatar-choice.selected .avatar-choice-check { opacity: 1; transform: none; }
.pe-delete { margin-right: auto; }
@media (max-width: 600px) {
  .modal-profile .modal-head { padding: 14px 14px 2px 18px; }
  .modal-profile .modal-body { padding: 8px 16px 12px; }
  .modal-profile .modal-foot { padding: 12px 16px 14px; }
}
@media (max-width: 479px) {
  .modal-profile .modal-foot { display: grid; grid-template-columns: 1fr 1fr; }
  .modal-profile .modal-foot .btn-primary { grid-column: 1 / -1; order: -1; }
  .modal-profile .modal-foot > .btn-ghost:first-child { grid-column: 1 / -1; }
  .modal-profile .pe-delete { margin-right: 0; }
  .pe-top { gap: 14px; }
  .pe-preview { width: 68px; }
  .pe-form { gap: 14px; }
  .ap-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 12px 10px; padding: 4px 10px 14px; }
  .ap-group-head { padding: 10px 10px 6px; font-size: 17px; }
}

/* ================================================================ */
/* Ma liste / playlists / historique                                 */
/* ================================================================ */

.tabs {
  position: relative;
  display: flex; gap: 4px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 50px; padding: 0 16px;
  color: var(--text-mute);
  font-weight: 700; font-size: 15px;
  white-space: nowrap;
  transition: color var(--t);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active .icon { color: var(--accent-hot); }
.tab.active::after {
  content: "";
  position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 3px; border-radius: 3px 3px 0 0;
  background: var(--accent-hot);
  box-shadow: 0 0 14px var(--accent-glow);
}
.tab-panel { outline: none; animation: ev-fade 0.35s var(--ease) both; }

.pl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
@media (min-width: 600px) { .pl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; } }
@media (min-width: 900px) { .pl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1300px) { .pl-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.pl-card { position: relative; display: flex; flex-direction: column; gap: 9px; text-align: left; color: inherit; }
.pl-cover {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  box-shadow: 0 0 0 1px var(--border), var(--shadow-sm);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.pl-card:hover .pl-cover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--accent), 0 18px 36px -16px var(--accent-glow); }
.pl-card.is-default .pl-cover { box-shadow: 0 0 0 1px var(--border-strong), 0 0 30px -12px var(--accent-glow); }
.pl-mosaic {
  position: absolute; inset: 0;
  display: grid; gap: 2px;
  grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
}
.pl-mosaic.n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.pl-mosaic.n2 { grid-template-rows: 1fr; }
.pl-mosaic.n3 .pl-cell:first-child { grid-row: span 2; }
.pl-cell { position: relative; overflow: hidden; background: var(--surface-2); }
.pl-cell img { width: 100%; height: 100%; object-fit: cover; }
.pl-mosaic-empty {
  grid-column: 1 / -1; grid-row: 1 / -1;
  display: grid; place-items: center;
  color: var(--text-mute);
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
}
.pl-badge { position: absolute; left: 8px; bottom: 8px; }
.pl-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pl-name { font-weight: 700; font-size: 15px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.pl-name:hover { color: var(--accent-hot); }
.pl-count { font-size: 12.5px; color: var(--text-mute); }
.pl-actions {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 4px;
  opacity: 0;
  transition: opacity var(--t);
}
.pl-card:hover .pl-actions, .pl-card:focus-within .pl-actions { opacity: 1; }
@media (hover: none) { .pl-actions { opacity: 1; } }
.pl-actions .btn { background: rgba(0, 0, 0, 0.66); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pl-actions .btn:hover { background: rgba(0, 0, 0, 0.85); }
.pl-actions .btn.danger:hover { background: var(--accent); }
.pl-new { cursor: pointer; }
.pl-new .pl-new-cover {
  display: grid; place-items: center;
  border: 2px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
}
.pl-new-icon {
  display: grid; place-items: center;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-hot);
  transition: background var(--t), color var(--t), box-shadow var(--t), transform 0.4s var(--ease-out);
}
.pl-new:hover .pl-new-icon, .pl-new:focus-visible .pl-new-icon { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 30px var(--accent-glow); transform: rotate(90deg); }
.pl-new:hover .pl-new-cover { border-color: var(--accent); transform: translateY(-4px); }
.pl-skel .pl-cover { box-shadow: none; }

.hist-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hist-count { color: var(--text-dim); font-size: 14px; }
.hist-group { margin-bottom: 24px; }
.hist-group-title { margin-bottom: 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-mute); }
.hist-group-list, .hist-list { display: flex; flex-direction: column; gap: 8px; }
.hist-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(90deg, var(--surface), rgba(0, 0, 0, 0));
  transition: border-color var(--t), background var(--t);
}
.hist-item:hover { border-color: var(--border-strong); background: linear-gradient(90deg, var(--surface-2), rgba(0, 0, 0, 0)); }
.hist-thumb {
  flex: 0 0 auto;
  width: 60px; aspect-ratio: 2 / 3;
  border-radius: var(--radius-xs);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 600px) { .hist-thumb { width: 74px; } }
.hist-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hist-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  font-weight: 700; font-size: 15px; line-height: 1.3;
  overflow-wrap: anywhere;
  transition: color var(--t-fast);
}
.hist-title:hover { color: var(--accent-hot); }
.hist-info .meta-line { font-size: 12.5px; }
.hist-when { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-mute); }
.hist-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
@media (max-width: 479px) {
  .hist-item { gap: 10px; padding: 8px; }
  .hist-thumb { width: 52px; }
  .hist-replay span { display: none; }
  .hist-replay { width: 40px; padding: 0; }
  /* Actions empilées : ~50 px de plus pour le titre et la date. */
  .hist-actions { flex-direction: column; gap: 0; }
  .hist-when { white-space: nowrap; }
  .hist-info .meta-line { display: none; }
}
.hist-skel { border-color: transparent; }

/* États verrouillés (invités) */
.locked { display: flex; justify-content: center; padding-top: clamp(24px, 6vh, 72px); padding-bottom: 48px; }
.locked-card {
  position: relative;
  width: 100%; max-width: 580px;
  padding: clamp(24px, 5vw, 44px);
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  text-align: center;
  overflow: hidden;
  border-color: var(--border-strong);
}
.locked-card > * { position: relative; }
.locked-glow, .locked-card > .locked-glow {
  position: absolute; left: -20%; right: -20%; top: -40%;
  height: 80%;
  background: radial-gradient(ellipse at 50% 60%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.locked-art {
  display: grid; place-items: center;
  width: 92px; height: 92px; border-radius: 28px;
  color: var(--accent-hot);
  background: linear-gradient(145deg, var(--surface-3), var(--surface));
  box-shadow: 0 0 0 1px var(--border-strong), 0 0 50px -8px var(--accent-glow);
  animation: ev-float 4.5s ease-in-out infinite;
}
.locked-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(32px, 5.4vw, 46px);
  line-height: 1; letter-spacing: 0.03em; text-transform: uppercase;
}
.locked-text { max-width: 42ch; color: var(--text-dim); }
.locked-card .login-buttons { max-width: 400px; margin-top: 4px; }

/* Playlist */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px;
  font-size: 13.5px; font-weight: 700;
  color: var(--text-mute);
  transition: color var(--t-fast);
}
.back-link:hover { color: var(--text); }
.playlist-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: clamp(16px, 3vw, 34px); margin: 8px 0 30px; }
.playlist-cover {
  position: relative;
  flex-shrink: 0;
  width: clamp(130px, 30vw, 230px); aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  box-shadow: 0 0 0 1px var(--border-strong), 0 24px 60px -24px var(--accent-glow);
}
.playlist-head-text { flex: 1 1 260px; min-width: 0; }
.playlist-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ================================================================ */
/* Compte                                                            */
/* ================================================================ */

.account-grid { display: grid; gap: 16px; max-width: 780px; }
@media (min-width: 1100px) {
  .account-grid { max-width: 1180px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .account-grid > .identity, .account-grid > .account-legal { grid-column: 1 / -1; }
  .account-grid > .account-profile { grid-row: span 3; }
}
.account-card { position: relative; padding: 20px; overflow: hidden; }
.account-card > * { position: relative; }
.identity { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; border-color: var(--border-strong); }
.identity > .avatar, .identity-row > .avatar { border-radius: 50%; box-shadow: 0 0 0 3px var(--surface-3), 0 0 34px -4px var(--accent-glow); }
.identity-glow, .account-card > .identity-glow {
  position: absolute; right: -15%; top: -60%;
  width: 70%; height: 220%;
  background: radial-gradient(circle, var(--accent-soft), transparent 62%);
  pointer-events: none;
}
.identity-name { font-size: 21px; font-weight: 800; overflow-wrap: anywhere; }
.identity-email { margin-top: 2px; font-size: 13.5px; color: var(--text-mute); overflow-wrap: anywhere; }
.identity-badges { margin-top: 10px; }
.identity-logout { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 600px) {
  .identity { grid-template-columns: auto minmax(0, 1fr) auto; }
  .identity-logout { grid-column: auto; }
}
.identity.is-guest { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
.identity-row { display: flex; align-items: center; gap: 16px; }
.account-lead { color: var(--text-dim); }
.provider-badge.provider-discord { background: #5865f2; border-color: transparent; color: #fff; }
.provider-badge.provider-google { background: #fff; border-color: transparent; color: #1f1f1f; }
.provider-badge.provider-dev { background: var(--ember-soft); border-color: transparent; color: var(--ember); }
.account-card-title {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
}
.account-card-title .icon { color: var(--accent-hot); }
.account-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.account-row > .avatar { border-radius: 22%; }
.account-row-title { display: block; font-size: 15.5px; }
.account-row-sub { display: block; font-size: 13px; color: var(--text-mute); }
.account-row > .btn { flex-shrink: 0; }
@media (max-width: 479px) {
  .account-row > .btn { width: 44px; min-width: 44px; padding: 0; }
  .account-row > .btn span { display: none; }
}
.account-link {
  display: flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 0 2px;
  border-top: 1px solid var(--border);
  color: var(--text-dim); font-weight: 600; font-size: 14.5px;
  transition: color var(--t-fast);
}
.account-link .icon { color: var(--text-mute); transition: color var(--t-fast), transform var(--t) var(--ease-out); }
.account-link:hover { color: var(--text); }
.account-link:hover .icon { color: var(--accent-hot); }
.account-link:hover .account-link-caret { transform: translateX(3px); }
.account-link-caret { margin-left: auto; }
.pref-row { display: flex; align-items: center; gap: 16px; }
.pref-row .toggle { flex-shrink: 0; }
.admin-card { display: flex; align-items: center; gap: 14px; color: inherit; transition: border-color var(--t), box-shadow var(--t), transform var(--t) var(--ease-out); }
.admin-card:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.admin-card-icon {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(145deg, var(--accent-hot), var(--accent-deep));
  color: var(--on-accent);
  box-shadow: 0 0 30px -6px var(--accent-glow);
}
.account-claim { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; padding: 2px 4px; font-size: 13.5px; color: var(--text-mute); }
.account-claim .icon { color: var(--ember); }
.account-claim a { color: var(--accent-hot); font-weight: 700; }
.account-claim a:hover { text-decoration: underline; text-underline-offset: 3px; }
.account-legal { padding: 4px; font-size: 13px; }
.account-legal a { color: var(--text-mute); text-decoration: underline; text-underline-offset: 3px; }
.account-legal a:hover { color: var(--text); }

/* ================================================================ */
/* Connexion                                                         */
/* ================================================================ */

.login-buttons { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.login-buttons.is-row { flex-direction: row; flex-wrap: wrap; }
.login-buttons.is-row .login-btn { flex: 1 1 210px; }
.login-btn {
  position: relative;
  flex-wrap: wrap;
  row-gap: 3px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}
.login-btn.btn-lg { padding-top: 6px; padding-bottom: 6px; }
.login-btn .soon-tag {
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.28);
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.btn-google .soon-tag { background: rgba(0, 0, 0, 0.08); }
.login-btn.is-soon { filter: grayscale(0.4); }
.login-dev { border-style: dashed; }

.modal-login .modal-head { position: absolute; top: 0; right: 0; z-index: 3; padding: 10px; }
.modal-login .modal-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.modal-login .modal-body { padding-top: 22px; }
.login-modal { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.login-hero { position: relative; display: flex; justify-content: center; width: 100%; }
.login-hero::before {
  content: "";
  position: absolute; left: 50%; top: -60px;
  width: 340px; height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 40%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.login-sigil {
  position: relative;
  display: grid; place-items: center;
  width: 66px; height: 66px; border-radius: 50%;
  color: var(--accent-hot);
  background: radial-gradient(circle, var(--accent-soft), transparent 72%);
  box-shadow: 0 0 0 1px var(--border-strong), 0 0 40px -6px var(--accent-glow);
  animation: ev-float 4s ease-in-out infinite;
}
.login-brand { font-size: 24px; }
.login-title { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; }
.login-lead { max-width: 36ch; color: var(--text-dim); font-size: 14.5px; }
.login-note {
  display: flex; align-items: flex-start; gap: 8px;
  width: 100%; padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--ember-soft);
  color: var(--text-dim); font-size: 13px; text-align: left;
}
.login-note .icon { color: var(--ember); margin-top: 1px; }
.perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 4px; text-align: left; }
@media (max-width: 419px) {
  .perks { gap: 6px; }
  /* Icône au-dessus du titre : le texte récupère toute la largeur de la tuile (« Commentaires » débordait). */
  .perk { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; }
  .perk-text span { display: none; }
  .perk-text strong { font-size: 12.5px; line-height: 1.25; }
  .perk-icon { width: 28px; height: 28px; border-radius: 8px; }
}
.perk {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}
.perk-icon {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-hot);
}
.perk-text { display: flex; flex-direction: column; min-width: 0; }
.perk-text strong { font-size: 13px; }
.perk-text span { font-size: 12px; color: var(--text-mute); line-height: 1.4; }
.login-legal { font-size: 12px; color: var(--text-mute); }
.login-legal a { text-decoration: underline; text-underline-offset: 2px; }
.login-legal a:hover { color: var(--text); }

/* ================================================================ */
/* Popover + sélecteur de playlist                                   */
/* ================================================================ */

.popover {
  position: fixed; top: 0; left: 0;
  z-index: 900;
  width: 320px; max-width: calc(100vw - 24px);
  background: rgba(30, 19, 24, 0.97);
  background: color-mix(in srgb, var(--surface-2) 97%, transparent);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), 0 0 60px -20px var(--accent-glow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.16s var(--ease), transform 0.2s var(--ease-out);
}
.popover.show { opacity: 1; transform: none; }
.popover-inner { padding: 14px; }
.popover-title { margin-bottom: 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.pl-pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow-y: auto; margin: 0 -6px 12px; padding: 0 6px; }
.pl-pick-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 46px; padding: 0 10px;
  border-radius: var(--radius-sm);
  text-align: left;
  transition: background var(--t-fast);
}
.pl-pick-item:hover { background: rgba(255, 255, 255, 0.06); }
.pl-check {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 7px;
  border: 1.5px solid var(--border-strong);
  color: transparent;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t);
}
.pl-pick-item.on .pl-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 12px var(--accent-glow); }
.pl-pick-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-pick-name .icon { color: var(--accent-hot); }
.pl-pick-count { font-size: 12px; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.pl-pick-new { display: flex; gap: 8px; }
.pl-pick-new .input { min-height: 44px; }
.pl-pick-empty, .pl-pick-loading { padding: 14px 10px; text-align: center; font-size: 13.5px; color: var(--text-mute); }
.modal.sheet .modal-body { padding-bottom: 22px; }

/* ================================================================ */
/* Mentions légales                                                  */
/* ================================================================ */

.legal-layout { display: grid; gap: 18px; }
@media (min-width: 1024px) {
  .legal-layout { grid-template-columns: 250px minmax(0, 1fr); align-items: start; gap: 28px; }
  .legal-toc { position: sticky; top: calc(var(--header-h) + 20px); }
}
.legal-toc { padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); }
.legal-toc-title { margin-bottom: 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); }
.legal-toc ol { display: flex; flex-wrap: wrap; gap: 6px; }
.legal-toc-link {
  min-height: 38px; padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  color: var(--text-dim); font-size: 13px; font-weight: 600;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.legal-toc-link:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
@media (min-width: 1024px) {
  .legal-toc ol { flex-direction: column; gap: 2px; }
  .legal-toc-link { width: 100%; text-align: left; border-color: transparent; border-radius: var(--radius-xs); }
}
.legal-body { display: flex; flex-direction: column; gap: 30px; padding: clamp(18px, 3vw, 38px); }
.legal-section { scroll-margin-top: 96px; }
.legal-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 19px; font-weight: 800; }
.legal-h-icon {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-hot);
}
.legal-section p, .legal-list li { color: var(--text-dim); font-size: 14.5px; line-height: 1.75; }
.legal-section p + p { margin-top: 10px; }
.legal-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.legal-list li { position: relative; padding-left: 20px; }
.legal-list li::before {
  content: "";
  position: absolute; left: 3px; top: 0.72em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-hot);
  box-shadow: 0 0 8px var(--accent-glow);
}
.legal-list strong { color: var(--text); }
.legal-address {
  margin-top: 12px; padding: 12px 16px;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255, 255, 255, 0.02);
  font-style: normal; font-size: 14px; line-height: 1.6;
  color: var(--text-dim);
}
.legal-mail { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-hot); font-weight: 700; overflow-wrap: anywhere; }
.legal-mail:hover { text-decoration: underline; text-underline-offset: 3px; }
.legal-updated { padding-top: 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-mute); }

/* ================================================================ */
/* 404                                                               */
/* ================================================================ */

.notfound {
  position: relative;
  min-height: calc(100svh - var(--header-h) - 140px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  padding: 40px var(--gutter) 60px;
  text-align: center;
  overflow: hidden;
}
.notfound > * { position: relative; }
.notfound-glow, .notfound > .notfound-glow {
  position: absolute; left: 50%; top: 42%;
  width: min(560px, 130vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 64%);
  animation: ev-pulse-glow 5s ease-in-out infinite;
  pointer-events: none;
}
.notfound-code {
  font-family: var(--font-brand); font-weight: 400;
  font-size: clamp(110px, 30vw, 250px);
  line-height: 0.85;
  color: var(--accent-hot);
  text-shadow: var(--glow-text);
  animation: ev-flicker 4s infinite;
}
.notfound-code::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  z-index: -1;
  color: var(--accent);
  opacity: 0.45;
  filter: blur(2px);
  animation: ev-glitch 3.2s steps(2) infinite;
}
.notfound-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(30px, 5vw, 50px);
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1;
}
.notfound-text { max-width: 46ch; color: var(--text-dim); }
.notfound-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
@media (max-width: 479px) { .notfound-actions .btn { width: 100%; } }

/* ================================================================ */
/* Écrans tactiles : zones ≥ 44 px                                   */
/* ================================================================ */

@media (pointer: coarse) {
  .pl-actions .btn-icon.btn-sm,
  .hist-actions .btn-icon.btn-sm,
  .comment-del.btn-icon { width: 44px; min-width: 44px; min-height: 44px; }
  .hist-actions .btn-sm, .chip-sm { min-height: 40px; }
  .hist-head .btn-sm, .row-title-link { min-height: 44px; }
  .card-remove { width: 38px; height: 38px; }
}

/* ================================================================ */
/* Animations                                                        */
/* ================================================================ */

@keyframes ev-view-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes ev-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes ev-fade { from { opacity: 0; } }
@keyframes ev-leave { to { opacity: 0; transform: scale(0.94); } }
@keyframes ev-pop { from { transform: scale(0.85); } }
@keyframes ev-card-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@keyframes ev-poster-in { from { opacity: 0; transform: translateY(18px) scale(0.96); } }
@keyframes ev-bg-in { from { opacity: 0; transform: scale(1.06); } }
@keyframes ev-art-in { from { opacity: 0; transform: translateY(-44%) perspective(1000px) rotateY(-24deg) rotateZ(4deg) scale(0.92); } }
@keyframes ev-art-float {
  0%, 100% { transform: translateY(-50%) perspective(1000px) rotateY(-12deg) rotateZ(1.5deg); }
  50% { transform: translateY(-53%) perspective(1000px) rotateY(-9deg) rotateZ(0.5deg); }
}
@keyframes ev-progress { from { width: 0; } to { width: 100%; } }
@keyframes ev-mist { from { transform: translateX(-4%); } to { transform: translateX(4%); } }
@keyframes ev-ring { from { transform: scale(1); opacity: 0.85; } to { transform: scale(1.75); opacity: 0; } }
@keyframes ev-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes ev-bob { from { transform: translateY(-2px); } to { transform: translateY(3px); } }
@keyframes ev-bump {
  0% { transform: scale(1); }
  30% { transform: scale(1.012); box-shadow: 0 0 0 1px var(--accent), 0 0 0 10px var(--accent-soft), 0 0 90px -10px var(--accent-glow); }
  100% { transform: scale(1); }
}
@keyframes ev-pulse-glow { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
@keyframes ev-boot { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
@keyframes ev-flicker {
  0%, 89%, 100% { opacity: 1; }
  90% { opacity: 0.55; }
  91% { opacity: 1; }
  93% { opacity: 0.3; }
  94% { opacity: 1; }
  97% { opacity: 0.75; }
}
@keyframes ev-drip {
  0% { transform: scaleY(0); opacity: 0; }
  6% { opacity: 1; }
  55% { transform: scaleY(1); opacity: 1; }
  72% { transform: scaleY(1.2); opacity: 1; }
  86% { transform: translateY(16px) scaleY(0.5); opacity: 0; }
  100% { transform: scaleY(0); opacity: 0; }
}
@keyframes ev-glitch {
  0%, 100% { transform: translate(4px, 3px); }
  25% { transform: translate(-5px, 1px); }
  50% { transform: translate(3px, -3px); }
  75% { transform: translate(-2px, 4px); }
}
@keyframes fx-drift { to { transform: translateX(-50%); } }
@keyframes fx-flap { from { transform: scaleY(1); } to { transform: scaleY(-0.35); } }
@keyframes fx-bat-fly {
  0% { opacity: 0; transform: translate(-12vw, var(--y0)) scale(var(--s)); }
  7% { opacity: 0.95; }
  50% { transform: translate(50vw, var(--y1)) scale(var(--s)) rotate(-5deg); }
  93% { opacity: 0.95; }
  100% { opacity: 0; transform: translate(112vw, var(--y2)) scale(var(--s)); }
}
@keyframes fx-grain {
  0% { transform: translate(0, 0); }
  17% { transform: translate(-5%, 3%); }
  33% { transform: translate(3%, -6%); }
  50% { transform: translate(-7%, -2%); }
  67% { transform: translate(6%, 5%); }
  83% { transform: translate(-2%, 7%); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg img, .hero-slide.active .hero-bg img { transform: none; transition: none; }
  .fx-grain, .fx-fog-layer, .hero-mist { animation: none !important; }
}
