/* ==========================================================================
   AKUMA-SHOP TV — tv.akuma-shop.fr
   Thème commun avec akuma-shop.fr, dex.akuma-shop.fr et inventaire.akuma-shop.fr
   (palette Ectoplasma · Cinzel + Outfit · Bootstrap Icons)
   ========================================================================== */

:root {
  --bg-deep:      #080612;
  --bg-card:      #0f0a1e;
  --bg-surface:   #140f24;
  --bg-elevated:  #1c1430;
  --bg-hover:     #241b3a;

  --accent:        #9b5de5;
  --accent-light:  #c084fc;
  --accent-dim:    rgba(155, 93, 229, 0.15);
  --accent-border: rgba(155, 93, 229, 0.35);
  --accent-glow:   rgba(155, 93, 229, 0.2);
  --mauve:         #d4aaff;
  --success:       #40c080;
  --live:          #ff4d6d;
  --live-dim:      rgba(255, 77, 109, 0.14);
  --live-border:   rgba(255, 77, 109, 0.45);
  --warning:       #ffc46b;

  --text-primary: #f0ecff;
  --text-muted:   #8878b0;
  --text-dim:     #4a3d6a;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-glow: 0 0 30px rgba(155, 93, 229, 0.18);
  --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-h: 64px;
  --container: 1280px;
  --container-live: calc(var(--container) - 2.5rem); /* aligné sur le contenu des sections */
  --chat-w: 340px;
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-x: clip;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(155, 93, 229, 0.1), transparent),
    radial-gradient(ellipse 40% 30% at 90% 80%, rgba(100, 50, 180, 0.06), transparent),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239b5de5' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent-light); text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
iframe { display: block; width: 100%; height: 100%; border: 0; }

:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.accent-text { color: var(--accent-light); }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  min-height: var(--nav-h);
  display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem 1rem;
  padding-top: calc(0.6rem + env(safe-area-inset-top, 0px));
  background: rgba(8, 6, 18, 0.88);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--accent-border);
}
.navbar-brand {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.15rem; letter-spacing: 0.06em;
  color: var(--accent-light); transition: color var(--transition);
}
.navbar-brand:hover { color: #fff; }
.navbar-logo { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.navbar-sep { width: 1px; height: 28px; background: var(--accent-border); flex-shrink: 0; }
.tv-badge {
  padding: 0.1rem 0.45rem; border-radius: 6px;
  background: linear-gradient(135deg, #9b5de5, #7b3fbf); color: #fff;
  font-family: 'Outfit', sans-serif; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em;
  box-shadow: 0 0 12px rgba(155, 93, 229, 0.4);
}

.nav-links { display: flex; align-items: center; gap: 1.8rem; }
.nav-link-item {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: 0.85rem; white-space: nowrap;
  transition: color var(--transition);
}
.nav-link-item:hover { color: var(--accent-light); }
.nav-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 8px var(--live);
  animation: pulse 1.6s ease-in-out infinite;
}
.nav-live-dot[hidden] { display: none; }

.nav-end { flex: 1 1 0; display: flex; justify-content: flex-end; }
.btn-nav {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 0.4rem 1rem; border-radius: 999px;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  color: var(--accent-light); font-weight: 500; font-size: 0.82rem;
  transition: var(--transition);
}
.btn-nav:hover { background: rgba(155, 93, 229, 0.28); color: #fff; box-shadow: 0 0 16px var(--accent-glow); }

@media (max-width: 899.98px) {
  .nav-links { gap: 1.1rem; }
  .nav-link-item .bi { display: none; }
}
@media (max-width: 767.98px) {
  .navbar { --nav-h: 56px; padding: 0.5rem 0.8rem; padding-top: calc(0.5rem + env(safe-area-inset-top, 0px)); }
  .nav-links { display: none; }
  .navbar-brand { font-size: 1rem; gap: 7px; }
  .navbar-logo { width: 36px; height: 36px; }
  .navbar-sep { height: 22px; }
  .btn-nav { width: 38px; height: 38px; padding: 0; justify-content: center; font-size: 1.05rem; }
  .btn-nav span { display: none; }
}

/* ===== BOUTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0.7rem 1.4rem; border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit; font-weight: 500; font-size: 0.9rem; white-space: nowrap;
  transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, #9b5de5, #7b3fbf); color: #fff;
  box-shadow: 0 4px 20px rgba(155, 93, 229, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(155, 93, 229, 0.5); color: #fff; }
.btn-secondary { background: rgba(155, 93, 229, 0.08); border-color: rgba(155, 93, 229, 0.25); color: var(--accent-light); }
.btn-secondary:hover { background: rgba(155, 93, 229, 0.15); }

.link-button {
  background: none; border: 0; padding: 0;
  color: var(--text-muted); font-size: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.link-button:hover { color: var(--accent-light); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0.2rem 0.65rem; border-radius: 999px;
  background: var(--bg-card); border: 1px solid rgba(155, 93, 229, 0.15);
  color: var(--text-muted); font-size: 0.76rem; white-space: nowrap;
}
.chip .bi { color: var(--accent-light); }
.chip[hidden] { display: none; }

/* ===== LIVE ===== */
main > section { position: relative; z-index: 1; }
.live-section { padding: 1.8rem 1.25rem 1rem; }
.hero-glow {
  position: absolute; top: -20%; left: 50%; z-index: 0;
  width: min(1100px, 100%); aspect-ratio: 1; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(155, 93, 229, 0.18) 0%, transparent 65%);
  pointer-events: none;
}
.live-container { position: relative; z-index: 1; max-width: var(--container-live); margin: 0 auto; }

.live-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.live-title { font-family: 'Cinzel', serif; font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 700; line-height: 1.2; }
.live-tagline { max-width: 460px; color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 0.7rem; padding: 0.3rem 0.85rem; border-radius: 999px;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  color: var(--mauve); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  transition: var(--transition);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-light); box-shadow: 0 0 10px var(--accent-light);
  animation: pulse 2s ease-in-out infinite;
}
.status-pill.is-live { background: var(--live-dim); border-color: var(--live-border); color: #ff9db0; }
.status-pill.is-live .status-dot { background: var(--live); box-shadow: 0 0 10px var(--live); animation-duration: 1.2s; }
.status-pill.is-offline .status-dot { background: var(--text-muted); box-shadow: none; animation: none; }

.live-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--chat-w); gap: 1rem;
  align-items: start;
}
.live-main { min-width: 0; display: flex; flex-direction: column; gap: 0.9rem; }

.player-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--accent-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
}
.player-frame > * { position: absolute; inset: 0; }
.player-loading { display: flex; align-items: center; justify-content: center; }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--accent-dim); border-top-color: var(--accent-light);
  animation: spin 0.9s linear infinite;
}

/* Le tchat prend la hauteur du lecteur (+ bandeau d'infos) */
.chat-frame {
  align-self: stretch; min-height: 420px; overflow: hidden;
  background: var(--bg-card);
  border: 1px solid rgba(155, 93, 229, 0.2); border-radius: var(--radius-lg);
}
.chat-frame > iframe { min-height: 420px; }

.stream-info {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid rgba(155, 93, 229, 0.12); border-radius: var(--radius-md);
}
.stream-info[hidden] { display: none; }
.stream-avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--live); object-fit: cover; }
.stream-text { min-width: 0; }
.stream-title { font-weight: 600; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.stream-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }

@media (max-width: 1023.98px) {
  .live-layout { grid-template-columns: 1fr; }
  .chat-frame { height: 480px; min-height: 0; }
  .chat-frame > iframe { min-height: 0; }
}
@media (max-width: 767.98px) {
  .live-section { padding: 1.2rem 0.75rem 0.5rem; }
  .live-head { margin-bottom: 0.9rem; }
  .live-tagline { font-size: 0.86rem; }
  .player-frame { border-radius: var(--radius-md); }
  .chat-frame { height: 420px; border-radius: var(--radius-md); }
}

/* --- Hors ligne --- */
.offline, .consent {
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem; text-align: center;
  background:
    radial-gradient(ellipse 60% 70% at 50% 45%, rgba(155, 93, 229, 0.2), transparent 70%),
    linear-gradient(180deg, var(--bg-elevated), var(--bg-card));
  background-size: cover; background-position: center;
}
/* Image de fond (miniature du live / bannière hors ligne) assombrie */
.offline.has-poster, .consent.has-poster { isolation: isolate; }
.offline.has-poster::before, .consent.has-poster::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8, 6, 18, 0.72), rgba(8, 6, 18, 0.9));
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.offline-inner, .consent-inner {
  max-width: 520px;
  display: flex; flex-direction: column; align-items: center;
}
.offline-sprite {
  width: 81px; height: 69px; margin-bottom: 0.6rem; image-rendering: pixelated;
  animation: hover 3s ease-in-out infinite;
  filter: drop-shadow(0 6px 14px rgba(155, 93, 229, 0.45));
}
.offline-kicker { color: var(--text-muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.offline-title { margin: 0.2rem 0 0.7rem; font-family: 'Cinzel', serif; font-size: clamp(1.15rem, 3vw, 1.7rem); line-height: 1.25; }
.offline-next { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }
.offline-next strong { color: var(--text-primary); font-weight: 500; }
.offline-countdown {
  margin-top: 0.5rem; padding: 0.25rem 0.8rem; border-radius: 999px;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  color: var(--mauve); font-size: 0.8rem; font-weight: 500;
}
.offline-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-top: 1.2rem; }

@media (max-width: 599.98px) {
  /* En 16:9 sur petit écran, le panneau hors ligne manque de place : il passe en hauteur libre */
  #player:has(.offline) { aspect-ratio: auto; }
  #player .offline { position: relative; inset: auto; padding: 1.6rem 1rem; }
  .offline-sprite { width: 60px; height: auto; }
  .offline-actions .btn { min-height: 40px; padding: 0.55rem 1.1rem; font-size: 0.85rem; }
}

/* --- Accord pour les lecteurs Twitch --- */
.consent-icon {
  width: 52px; height: 52px; margin-bottom: 0.7rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px; background: rgba(155, 93, 229, 0.16); color: var(--accent-light); font-size: 1.5rem;
}
.consent-title { font-family: 'Cinzel', serif; font-size: clamp(1.05rem, 2.6vw, 1.45rem); font-weight: 700; }
.consent-text { max-width: 420px; margin: 0.4rem 0 1rem; color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }
.consent-note { margin-top: 0.8rem; color: var(--text-dim); font-size: 0.72rem; }
.consent-note a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.chat-frame > .consent { height: 100%; }
.consent-compact .consent-title { font-size: 1.05rem; }
.consent-compact .consent-text { font-size: 0.82rem; }

@media (max-width: 599.98px) {
  .player-frame > .consent { padding: 0.8rem; }
  .player-frame .consent-icon { display: none; }
  .player-frame .consent-text { margin: 0.25rem 0 0.7rem; font-size: 0.78rem; }
  .player-frame .consent-note { display: none; }
}

/* ===== SECTIONS ===== */
.section { padding: 3.2rem 0 0.5rem; }
.section-head { margin-bottom: 1.4rem; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-title { margin-bottom: 0.3rem; font-family: 'Cinzel', serif; font-size: 1.7rem; line-height: 1.3; text-wrap: balance; }
.section-subtitle { color: var(--text-muted); font-size: 0.9rem; }
@media (max-width: 767.98px) {
  .section { padding-top: 2.4rem; }
  .section-title { font-size: 1.4rem; }
}

/* Onglets (filtres) */
.tabs {
  display: inline-flex; gap: 0.25rem; padding: 0.25rem;
  background: var(--bg-card); border: 1px solid rgba(155, 93, 229, 0.15); border-radius: 999px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.tab {
  padding: 0.4rem 0.95rem; border-radius: 999px; border: 0; background: none;
  color: var(--text-muted); font-size: 0.82rem; white-space: nowrap;
  transition: var(--transition);
}
.tab:hover { color: var(--accent-light); }
.tab[aria-pressed="true"] { background: var(--accent-dim); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--accent-border); }

/* Squelettes de chargement */
.skeleton { display: block; border-radius: var(--radius-md); background: var(--bg-elevated); animation: pulse 1.4s ease-in-out infinite; }

/* ===== PLANNING ===== */
.schedule { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.8rem; }
.schedule-skeleton { height: 96px; }
.slot {
  display: flex; gap: 1rem; align-items: stretch;
  padding: 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid rgba(155, 93, 229, 0.12); border-radius: var(--radius-md);
  transition: var(--transition);
}
.slot:hover { border-color: var(--accent-border); }
.slot-date {
  width: 64px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.4rem 0; border-radius: 10px;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  line-height: 1.1;
}
.slot-weekday, .slot-month { color: var(--mauve); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }
.slot-day { font-family: 'Cinzel', serif; font-size: 1.55rem; font-weight: 700; }
.slot-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; }
.slot-time { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; color: var(--accent-light); font-size: 0.82rem; font-weight: 500; }
.slot-title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.slot-badge {
  padding: 0.05rem 0.5rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); color: var(--text-muted);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.slot-badge.is-live { background: var(--live-dim); color: #ff9db0; }
.slot-badge.is-soon { background: rgba(255, 196, 107, 0.12); color: var(--warning); text-transform: none; letter-spacing: 0; }
.slot.is-now { border-color: var(--live-border); box-shadow: 0 0 24px rgba(255, 77, 109, 0.12); }
.slot.is-now .slot-date { background: var(--live-dim); border-color: var(--live-border); }
.slot-body .chip { max-width: 100%; white-space: normal; }
.slot.is-canceled { opacity: 0.55; }
.slot.is-canceled .slot-title { text-decoration: line-through; }

/* ===== GRILLES VIDÉOS / CLIPS ===== */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.media-skeleton { aspect-ratio: 16 / 12; }
.grid-more { display: flex; margin: 1.3rem auto 0; }
.grid-more[hidden] { display: none; }

.media-card {
  display: flex; flex-direction: column; text-align: left;
  padding: 0; overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid rgba(155, 93, 229, 0.12); border-radius: var(--radius-md);
  transition: var(--transition);
}
.media-card:hover, .media-card:focus-visible { border-color: var(--accent-border); transform: translateY(-4px); box-shadow: 0 8px 30px rgba(155, 93, 229, 0.14); }

.media-thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 30% 30%, rgba(155, 93, 229, 0.28), transparent 70%),
    linear-gradient(135deg, var(--bg-hover), var(--bg-card));
}
.media-thumb img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.media-card:hover .media-thumb img { transform: scale(1.05); }
.media-placeholder {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: var(--accent-border); font-size: 2.2rem;
}
.media-play {
  position: absolute; top: 50%; left: 50%; z-index: 2;
  width: 52px; height: 52px; transform: translate(-50%, -50%) scale(0.8);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(155, 93, 229, 0.9); color: #fff; font-size: 1.5rem;
  box-shadow: 0 0 24px rgba(155, 93, 229, 0.6);
  opacity: 0; transition: var(--transition);
}
.media-card:hover .media-play, .media-card:focus-visible .media-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.media-duration, .media-type {
  position: absolute; z-index: 2;
  padding: 0.1rem 0.45rem; border-radius: 6px;
  background: rgba(8, 6, 18, 0.82); color: #fff;
  font-size: 0.72rem; font-weight: 500; font-variant-numeric: tabular-nums;
}
.media-duration { right: 8px; bottom: 8px; }
.media-type { left: 8px; top: 8px; color: var(--mauve); border: 1px solid var(--accent-border); }
.media-type.type-highlight { color: var(--warning); border-color: rgba(255, 196, 107, 0.4); }
.media-type.type-upload { color: var(--success); border-color: rgba(64, 192, 128, 0.4); }

.media-body { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.8rem 0.9rem 0.95rem; }
.media-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  font-weight: 600; font-size: 0.92rem; line-height: 1.35; color: var(--text-primary);
}
.media-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.4rem; color: var(--text-muted); font-size: 0.76rem; }
.media-meta > span + span::before { content: "·"; margin-right: 0.4rem; color: var(--text-dim); }

@media (max-width: 599.98px) {
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .media-body { padding: 0.6rem 0.65rem 0.75rem; }
  .media-title { font-size: 0.82rem; }
  .media-meta { font-size: 0.7rem; }
  .media-meta > span:nth-child(3) { display: none; }
  .media-type { font-size: 0.64rem; }
}

/* États vides / erreur */
.empty-state {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem;
  min-height: 180px; padding: 2rem 1.2rem; text-align: center;
  border: 1px dashed rgba(155, 93, 229, 0.25); border-radius: var(--radius-md);
  color: var(--text-muted); font-size: 0.9rem; line-height: 1.6;
}
.empty-state > .bi { font-size: 2rem; color: var(--accent-light); }
.empty-state p { max-width: 420px; }

/* ===== COMMUNAUTÉ ===== */
.community-card {
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
  padding: 1.6rem 1.8rem;
  background:
    radial-gradient(ellipse 50% 120% at 0% 50%, rgba(155, 93, 229, 0.2), transparent 70%),
    var(--bg-elevated);
  border: 1px solid var(--accent-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
}
.community-sprite { width: 81px; height: 69px; flex-shrink: 0; image-rendering: pixelated; animation: hover 3s ease-in-out infinite; }
.community-body { flex: 1 1 300px; min-width: 0; }
.community-title { margin-bottom: 0.3rem; font-family: 'Cinzel', serif; font-size: 1.35rem; }
.community-body p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }
.community-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }
@media (max-width: 599.98px) {
  .community-card { flex-direction: column; text-align: center; padding: 1.4rem 1.1rem; }
  .community-body { flex-basis: auto; }
  .community-cta { flex-direction: column; width: 100%; }
}

/* ===== FENÊTRE DE LECTURE ===== */
.modal {
  width: min(1100px, calc(100% - 1.5rem)); max-height: calc(100dvh - 1.5rem);
  margin: auto; padding: 0; border: 0; background: none; color: inherit;
  overflow: visible;
}
.modal::backdrop { background: rgba(4, 3, 10, 0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal[open] { animation: modal-in 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.modal-box {
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--accent-border); border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.modal-title { font-size: 1.05rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.modal-close {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--accent-dim); border: 1px solid var(--accent-border);
  color: var(--accent-light); transition: var(--transition);
}
.modal-close:hover { background: var(--accent); color: #fff; }
.modal .player-frame { border-radius: var(--radius-md); }
.modal-meta { margin-top: 0.7rem; color: var(--text-muted); font-size: 0.82rem; }
@media (max-width: 599.98px) {
  .modal { width: 100%; max-width: none; }
  .modal-box { padding: 0.7rem; border-radius: var(--radius-md); }
}

/* Bandeau du mode démo */
.demo-banner {
  position: fixed; left: 50%; bottom: 1rem; z-index: 2000; transform: translateX(-50%);
  padding: 0.4rem 1rem; border-radius: 999px;
  background: rgba(255, 196, 107, 0.14); border: 1px solid rgba(255, 196, 107, 0.45);
  color: var(--warning); font-size: 0.78rem; font-weight: 500;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 4.5rem; padding: 2.5rem 1.5rem 1.5rem;
  background: var(--bg-surface);
  border-top: 1px solid rgba(155, 93, 229, 0.15);
}
.footer-inner {
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  text-align: center;
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.1rem; letter-spacing: 0.05em; color: var(--accent-light);
}
.footer-logo { width: 36px; height: 36px; object-fit: contain; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.footer-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0.35rem 0.8rem; border-radius: 999px;
  border: 1px solid rgba(155, 93, 229, 0.12);
  color: var(--text-muted); font-size: 0.8rem;
  transition: var(--transition);
}
.footer-link:hover { color: var(--accent-light); border-color: var(--accent-border); background: var(--accent-dim); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.2rem; font-size: 0.78rem; }
.footer-legal a { color: var(--text-muted); transition: color var(--transition); }
.footer-legal a:hover { color: var(--accent-light); }
.footer-legal [hidden] { display: none; }
.footer-copy {
  width: 100%; padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-dim); font-size: 0.7rem; line-height: 1.7;
}
.footer-copy span { display: block; margin-top: 0.3rem; font-size: 0.65rem; }

/* ===== ANIMATIONS ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
@keyframes hover {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
