/* =============================================================================
   AUDIO CORAN — Lecteur audio premium pour récitations coraniques
   style.css — Design system + composants
   ========================================================================== */

/* NB : les polices (Amiri, Inter, JetBrains Mono) sont chargées par un <link>
   dans chaque page HTML — jamais via @import (render-blocking + doublon). */

/* -------------------------------------------------------------------------
   1. DESIGN TOKENS — identité propre à Audio Coran
   ---------------------------------------------------------------------- */
/* -------------------------------------------------------------------------
   1. DESIGN TOKENS
   Les tokens (couleurs, typo, rayons, ombres, mouvement) et le theme clair
   sont centralises dans assets/design/design-system.css (source unique).
   Charger ce fichier AVANT style.css. Ne pas redefinir les tokens ici.
   ---------------------------------------------------------------------- */

/* -------------------------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
  overflow-x: hidden;
}
body::before {
  /* ambiance de fond : halo émeraude/or très discret */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% -10%, rgba(31, 169, 122, 0.16), transparent 45%),
    radial-gradient(circle at 90% 110%, rgba(201, 162, 75, 0.12), transparent 45%);
  pointer-events: none;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--deep-black); }

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

.icon { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Support RTL (arabe) ------------------------------------------------- */
[dir="rtl"] .app-shell { direction: rtl; }
[dir="rtl"] .track-list__item { flex-direction: row-reverse; }
[dir="rtl"] .controls-main { flex-direction: row-reverse; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------------------
   3. TOPBAR
   ---------------------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(16px, 4vw, 48px);
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(1px)) {
  .topbar { background: var(--bg); }
}
.topbar__brand { display: flex; align-items: center; gap: 10px; }
.topbar__brand img { height: 34px; width: auto; }

/* Logo commutable selon le thème : texte blanc en sombre, foncé en clair
   (le pictogramme dégradé, lui, reste lisible sur les deux fonds). Piloté par
   data-theme sur <html>, donc suit aussi le bouton clair/sombre manuel. */
.brand-logo {
  display: inline-block; width: 179px; height: 34px; flex-shrink: 0;
  background: url("../assets/icons/logo.svg") no-repeat left center / contain;
}
[data-theme="light"] .brand-logo { background-image: url("../assets/icons/logo-light.svg"); }
.topbar__actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-secondary);
  transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.icon-btn:hover { background: var(--surface-strong); color: var(--text); transform: translateY(-1px); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn[aria-pressed="true"] { color: var(--accent); background: var(--surface-strong); }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px; width: clamp(140px, 24vw, 280px);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.search-box:focus-within { border-color: var(--border-accent); background: var(--surface-strong); }
.search-box input {
  border: none; background: none; outline: none; color: var(--text);
  font-family: var(--font-body); font-size: 14px; width: 100%;
}
.search-box input::placeholder { color: var(--text-tertiary); }
.search-box .icon { width: 17px; height: 17px; color: var(--text-tertiary); }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; } /* on gère notre propre bouton */
.search-box__count {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-tertiary); white-space: nowrap;
}
.search-box__clear {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: none; place-items: center; color: var(--text-tertiary);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.search-box__clear.is-visible { display: grid; }
.search-box__clear:hover { background: var(--surface-strong); color: var(--text); }
.search-box__clear .icon { width: 13px; height: 13px; }

/* Surlignage des résultats de recherche */
.track-list mark {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
  color: inherit; border-radius: 3px; padding: 0 1px;
}

/* La recherche de l'app accueille compteur + bouton effacer : un peu plus large */
.topbar--app .search-box { width: clamp(200px, 32vw, 360px); }

/* -------------------------------------------------------------------------
   4. APP SHELL / LAYOUT
   ---------------------------------------------------------------------- */
.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 48px) 160px;
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------
   5. LECTEUR PRINCIPAL (hero)
   ---------------------------------------------------------------------- */
.player-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 56px);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  /* La carte est étirée à la hauteur de la sidebar par la grille : on répartit
     l'espace verticalement (disque centré dans le mou, contrôles ancrés en
     bas) au lieu de laisser un grand vide sous les contrôles. */
  display: flex;
  flex-direction: column;
  animation: cardIn 0.55s var(--ease-out) both;
}
.player-card::after {
  /* liseré dégradé signature en haut de la carte */
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--emerald-light), var(--gold), transparent);
  opacity: 0.85;
}

.player-card__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 22px;
}
.player-card__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 25%, transparent);
}

/* --- Disque rotatif + anneau de progression circulaire (élément signature) */
.disc-wrap {
  position: relative;
  width: clamp(200px, 30vw, 300px);
  aspect-ratio: 1;
  /* margins auto verticales : le disque « flotte » au centre de l'espace
     disponible quand la carte est plus haute que son contenu. */
  margin: auto;
  padding-bottom: 0;
  flex-shrink: 0;
}
.player-card__meta { margin-top: 30px; }
.disc-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.disc-ring circle { fill: none; stroke-width: 3.5; }
.disc-ring .track { stroke: var(--border); }
.disc-ring .progress {
  stroke: url(#ringGradient);
  stroke-linecap: round;
  transition: stroke-dashoffset 120ms linear;
}
.disc {
  position: absolute; inset: 16px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--bg) 40%, transparent), var(--shadow-glow);
  animation: spin 16s linear infinite;
  animation-play-state: paused;
}
.disc.is-spinning { animation-play-state: running; }
/* Toutes les covers : carrées, recadrées sans déformation, jamais étirées */
.disc img, .mini-player__cover img {
  width: 100%; height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
}
.disc::before {
  content: ""; position: absolute; inset: 42% ; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
@keyframes spin { to { transform: rotate(360deg); } }

.player-card__meta { text-align: center; margin-bottom: 8px; }
/* Titre bilingue sur une ligne : « Al-Fatiha • الفاتحة ».
   Centrage VERTICAL (pas baseline) : la ligne de base de l'Amiri arabe est
   plus basse que celle du latin, l'alignement optique se fait au centre.
   flex-wrap : si la largeur manque (mobile, longs noms), l'arabe passe
   proprement dessous, toujours centré — la hiérarchie est préservée. */
.track-titlerow {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; column-gap: 14px; row-gap: 0;
  margin: 0;
}
.track-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
/* Nom arabe : même niveau hiérarchique, légèrement mis en valeur par l'or */
.track-arabic {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.1vw, 31px);
  font-weight: 400;
  color: var(--accent);
  line-height: 1.4; /* les hampes arabes ont besoin d'air */
}
/* Séparateur décoratif, volontairement discret */
.track-sep {
  font-size: 0.55em;
  color: var(--text-tertiary);
  align-self: center;
}
.track-subtitle { color: var(--text-secondary); font-size: 15px; margin-top: 6px; }
.track-reciter {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 6px 16px;
  background: var(--surface-strong); border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill); font-size: 13px; color: var(--accent);
}

/* --- Visualiseur / waveform ------------------------------------------ */
.waveform {
  display: flex; align-items: flex-end; justify-content: center; gap: 3px;
  height: 44px; margin: 24px 0 8px;
}
.waveform span {
  width: 3px; min-height: 4px; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  opacity: 0.55;
  transition: height 120ms ease, opacity var(--dur-fast);
}
.waveform.is-playing span { animation: wave 1.1s ease-in-out infinite; opacity: 0.95; }
.waveform span:nth-child(2n) { animation-delay: -0.9s; }
.waveform span:nth-child(3n) { animation-delay: -0.4s; }
.waveform span:nth-child(5n) { animation-delay: -1.3s; }
@keyframes wave { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }

/* --- Barre de progression linéaire (accessible, sous le waveform) ---- */
.progress-row { display: flex; align-items: center; gap: 12px; margin: 8px 0 24px; }
/* min-width (et non width fixe) : les longues sourates affichent H:MM:SS */
.time {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary);
  min-width: 42px; font-variant-numeric: tabular-nums;
}
.time--end { text-align: right; }
.seek {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 5px; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent-2) var(--pct, 0%), var(--border) var(--pct, 0%));
  cursor: pointer;
}
.seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform var(--dur-fast);
}
.seek:hover::-webkit-slider-thumb { transform: scale(1.15); }
.seek::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--bg);
  background: var(--accent); cursor: pointer;
}
/* Cibles tactiles élargies sur écrans tactiles (WCAG 2.2 — target size) */
@media (pointer: coarse) {
  .seek { height: 6px; }
  .seek::-webkit-slider-thumb { width: 20px; height: 20px; }
  .seek::-moz-range-thumb { width: 20px; height: 20px; }
  .ctrl-btn--sm { width: 44px; height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .track-list__fav { width: 36px; height: 36px; }
}

/* --- Contrôles principaux --------------------------------------------- */
.controls-main {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-bottom: 22px;
}
.ctrl-btn {
  display: grid; place-items: center; border-radius: 50%;
  color: var(--text-secondary);
  transition: transform var(--dur-fast) var(--ease-out), color var(--dur-fast), background var(--dur-fast);
  position: relative;
}
.ctrl-btn:hover { color: var(--text); transform: translateY(-2px); }
.ctrl-btn:active { transform: scale(0.92); }
.ctrl-btn--sm { width: 40px; height: 40px; }
.ctrl-btn--sm.is-active { color: var(--accent); }
.ctrl-btn--xs { width: 36px; height: 36px; }
.ctrl-btn--xs .icon { width: 19px; height: 19px; }
/* Toggles (aléatoire / répétition) : état actif marqué par un point sous l'icône */
.ctrl-btn--xs.is-active { color: var(--accent); }
.ctrl-btn--xs.is-active::before {
  content: ""; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.ctrl-btn--play {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--emerald-light), var(--emerald));
  color: var(--offwhite);
  box-shadow: 0 10px 30px rgba(15, 109, 76, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.ctrl-btn--play:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 38px rgba(15, 109, 76, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.ctrl-btn--play .icon { width: 30px; height: 30px; }

/* effet ripple au clic (léger, désactivé si reduced-motion) */
.ripple { position: relative; overflow: hidden; }
.ripple::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 50%, transparent) 0%, transparent 70%);
  opacity: 0; transform: scale(0.6);
  transition: opacity var(--dur-base), transform var(--dur-base);
}
.ripple.is-rippling::after { opacity: 1; transform: scale(1.4); transition: opacity var(--dur-slow), transform var(--dur-slow); }

/* --- Rangée secondaire : volume / vitesse / actions -------------------- */
.controls-secondary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border); /* séparateur : réglages vs transport */
}
.volume-group { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 130px; max-width: 220px; }
/* iOS ignore audio.volume : le slider n'aurait aucun effet réel, on le
   masque et on garde le bouton muet (qui fonctionne, lui, sur iOS). */
body.is-ios .volume-group .seek { display: none; }
body.is-ios .volume-group { flex: 0 0 auto; max-width: none; }
.volume-group .seek { height: 4px; }
.actions-group { display: flex; align-items: center; gap: 6px; }

/* Bouton vitesse (pill textuel) ---------------------------------------- */
.pill-btn {
  min-width: 52px; height: 34px; padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast);
  font-variant-numeric: tabular-nums;
}
.pill-btn:hover { border-color: var(--border-accent); color: var(--text); background: var(--surface-strong); }
.pill-btn.is-active { color: var(--accent); border-color: var(--border-accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* Minuteur de sommeil : menu contextuel --------------------------------- */
.timer-wrap { position: relative; }
.icon-btn.is-active { color: var(--accent); }
.popover-menu {
  position: absolute; bottom: calc(100% + 10px); right: 0; z-index: 80;
  min-width: 180px; padding: 6px;
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  display: none; flex-direction: column; gap: 2px;
}
@supports not (backdrop-filter: blur(1px)) { .popover-menu { background: var(--bg-elevated); } }
.popover-menu.is-open { display: flex; animation: menuIn var(--dur-fast) var(--ease-out); }
.popover-menu button {
  width: 100%; text-align: left; padding: 10px 14px;
  border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text-secondary);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.popover-menu button:hover, .popover-menu button:focus-visible { background: var(--surface-strong); color: var(--text); }
@keyframes menuIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* -------------------------------------------------------------------------
   6. SIDEBAR : PLAYLIST / FAVORIS / HISTORIQUE
   ---------------------------------------------------------------------- */
.sidebar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; height: fit-content;
  max-height: calc(100svh - 140px); position: sticky; top: 96px;
  box-shadow: var(--shadow-soft);
  animation: cardIn 0.55s var(--ease-out) 0.08s both; /* entrée décalée, subtile */
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.library-selects {
  padding: 14px 14px 12px; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
}
.lib-field { display: flex; flex-direction: column; gap: 7px; }
.lib-field__label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary);
}
.lib-field__control { position: relative; display: flex; align-items: center; }
.lib-field select {
  appearance: none; -webkit-appearance: none; width: 100%;
  padding: 10px 38px 10px 14px; border-radius: var(--radius-sm);
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: border-color var(--dur-fast), background var(--dur-fast);
}
.lib-field select:hover { border-color: var(--border-accent); }
.lib-field select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.lib-field__chevron {
  position: absolute; right: 12px; width: 16px; height: 16px; pointer-events: none;
  color: var(--text-tertiary); fill: none; stroke: currentColor; stroke-width: 2;
}
.lib-field select option { background: var(--surface); color: var(--text); }
.lib-field select option:disabled { color: var(--text-tertiary); }

.sidebar__tabs { display: flex; border-bottom: 1px solid var(--border); }.sidebar__tab {
  flex: 1; padding: 16px 8px; font-size: 13px; font-weight: 600;
  color: var(--text-tertiary); text-align: center; position: relative;
  transition: color var(--dur-fast);
}
.sidebar__tab.is-active { color: var(--accent); }
.sidebar__tab.is-active::after {
  content: ""; position: absolute; left: 20%; right: 20%; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--emerald-light), var(--gold));
}
.sidebar__body { overflow-y: auto; padding: 8px; flex: 1; }
.sidebar__body::-webkit-scrollbar { width: 6px; }
.sidebar__body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.track-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.track-list__item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.track-list__item:hover { background: var(--surface-strong); transform: translateX(2px); }
.track-list__item:active { transform: scale(0.985); }
.track-list__item.is-active { background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* Cellule de gauche : numéro par défaut → icône lecture au survol → égaliseur
   animé quand la piste joue réellement (pattern Spotify / Apple Music). */
.track-list__index {
  position: relative; width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 10px; background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.track-list__num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  color: var(--text-tertiary); font-variant-numeric: tabular-nums;
  transition: opacity var(--dur-fast), color var(--dur-fast);
}
.track-list__playicon {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; fill: var(--accent);
  opacity: 0; transform: translate(-50%, -50%) scale(0.8);
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}
.track-list__item:hover .track-list__index { border-color: var(--border-accent); }
.track-list__item:hover .track-list__num { opacity: 0; }
.track-list__item:hover .track-list__playicon { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.track-list__item.is-active .track-list__index {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: var(--border-accent);
}
.track-list__item.is-active .track-list__num { color: var(--accent); }
/* Sur la piste active on cache le n° au profit de l'icône (ou de l'égaliseur). */
.track-list__item.is-active .track-list__num { opacity: 0; }
.track-list__item.is-active .track-list__playicon { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Égaliseur : visible uniquement quand la piste active JOUE réellement. */
.track-list__eq {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: none; align-items: flex-end; gap: 2px; height: 15px;
}
.track-list__eq i {
  width: 3px; height: 100%; border-radius: 2px;
  background: linear-gradient(180deg, var(--emerald-light), var(--gold));
  transform-origin: bottom; animation: eqBar 0.9s ease-in-out infinite;
}
.track-list__eq i:nth-child(2) { animation-delay: 0.25s; }
.track-list__eq i:nth-child(3) { animation-delay: 0.5s; }
.track-list__eq i:nth-child(4) { animation-delay: 0.15s; }
@keyframes eqBar { 0%,100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
.track-list__item.is-playing .track-list__playicon { opacity: 0; }
.track-list__item.is-playing .track-list__num { opacity: 0; }
.track-list__item.is-playing .track-list__eq { display: flex; }
@media (prefers-reduced-motion: reduce) {
  .track-list__eq i { animation: none; transform: scaleY(0.7); }
}

.track-list__info { flex: 1; min-width: 0; }
/* Titre bilingue inline : « Al-Fatiha • الفاتحة » perçu comme UN seul titre.
   Centrage vertical (baselines latin/arabe différentes), le phonétique
   tronque en ellipse si la place manque, l'arabe reste toujours entier. */
.track-list__titlerow {
  display: flex; align-items: center; gap: 7px;
  min-width: 0;
}
.track-list__title {
  font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; flex-shrink: 1;
}
.track-list__sep {
  flex-shrink: 0;
  font-size: 9px; line-height: 1;
  color: var(--text-tertiary);
}
.track-list__ar {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 16px; line-height: 1.3;
  color: var(--accent);
  white-space: nowrap;
}
.track-list__item.is-active .track-list__ar { color: var(--accent); }
.track-list__item.is-active .track-list__title { color: var(--accent); }
.track-list__sub { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-list__time {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 12px;
  color: var(--text-tertiary); font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.track-list__item.is-active .track-list__time { color: var(--accent); }
.track-list__fav {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text-tertiary); flex-shrink: 0;
}
.track-list__fav:hover { color: var(--danger); }
.track-list__fav.is-fav { color: var(--danger); }
.track-list__fav .icon { width: 16px; height: 16px; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 56px 24px; text-align: center; color: var(--text-tertiary);
}
.empty-state .icon {
  width: 40px; height: 40px; opacity: 0.9; padding: 9px; box-sizing: content-box;
  border-radius: 50%;
  background: var(--surface-strong); color: var(--text-tertiary);
  margin-bottom: 4px;
}
.empty-state p { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.empty-state p.empty-state__hint {
  font-size: 12.5px; font-weight: 400; color: var(--text-tertiary);
  max-width: 30ch; line-height: 1.5;
}

/* -------------------------------------------------------------------------
   7. MINI-PLAYER FLOTTANT
   ---------------------------------------------------------------------- */
.mini-player {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 10px;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  transform: translateY(140%);
  transition: transform var(--dur-base) var(--ease-out);
}
@supports not (backdrop-filter: blur(1px)) { .mini-player { background: var(--bg-elevated); } }
.mini-player.is-visible { transform: translateY(0); }
.mini-player__cover { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.mini-player__cover img { width: 100%; height: 100%; object-fit: cover; animation: spin 16s linear infinite; animation-play-state: paused; }
.mini-player__cover.is-spinning img { animation-play-state: running; }
.mini-player__info { min-width: 0; max-width: 130px; }
.mini-player__title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-player__reciter { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-player__controls { display: flex; align-items: center; gap: 2px; }

/* -------------------------------------------------------------------------
   8. BANNIÈRE RÉSEAU / ÉTATS
   ---------------------------------------------------------------------- */
.status-banner {
  position: fixed; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -140%);
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-pill);
  background: var(--bg-elevated); border: 1px solid var(--border-accent);
  font-size: 13px; box-shadow: var(--shadow-soft); z-index: 100;
  transition: transform var(--dur-base) var(--ease-out);
}
.status-banner.is-visible { transform: translate(-50%, 0); }
.status-banner .icon { width: 16px; height: 16px; color: var(--accent); }

.loader {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: rotate 0.8s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------------------
   9. EMBED MODAL (utilisé par embed.js)
   ---------------------------------------------------------------------- */
.mp3-embed-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6, 8, 10, 0.72);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn var(--dur-base) var(--ease-out);
}
.mp3-embed-modal {
  width: min(420px, 100%); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-soft); background: var(--bg);
  border: 1px solid var(--border-accent);
  position: relative;
}
.mp3-embed-modal iframe { display: block; width: 100%; height: 560px; border: none; }
.mp3-embed-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(10, 12, 14, 0.55); color: #fff; display: grid; place-items: center;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* -------------------------------------------------------------------------
   10. MODE MINIMAL (player.html en iframe / embed)
   ---------------------------------------------------------------------- */
body.is-embed .topbar,
body.is-embed .sidebar { display: none; }
body.is-embed .app-shell { grid-template-columns: 1fr; padding: 18px; }
body.is-embed .player-card { padding: 22px; }
body.is-embed .disc-wrap { width: 170px; }

/* -------------------------------------------------------------------------
   11. RESPONSIVE
   ---------------------------------------------------------------------- */
@media (max-width: 640px) {
  .topbar__brand span.site-tagline { display: none; }
  /* La recherche reste ACCESSIBLE sur mobile : elle passe sur sa propre
     ligne, pleine largeur, sous le logo (au lieu d'être masquée). */
  .topbar--app { flex-wrap: wrap; row-gap: 10px; padding-top: 14px; padding-bottom: 14px; }
  .topbar--app .search-box { order: 3; width: 100%; }
  .controls-main { gap: 6px; }
  .ctrl-btn--play { width: 60px; height: 60px; }
  .mini-player { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .mini-player__info { max-width: none; flex: 1; }
  .sidebar { position: static; max-height: none; }

  /* Zone de contrôles secondaires repensée pour le mobile : le volume occupe
     sa propre ligne pleine largeur, les actions sont réparties sur une ligne
     dédiée (le séparateur haut vient déjà de .controls-secondary). */
  .controls-secondary { flex-direction: column; align-items: stretch; gap: 14px; }
  .volume-group { max-width: none; width: 100%; }
  .actions-group { width: 100%; justify-content: space-around; }
  /* iOS : le slider de volume est masqué ; on garde tout sur une seule ligne
     (mute + actions) pour éviter une ligne « volume » presque vide. */
  body.is-ios .controls-secondary { flex-direction: row; align-items: center; justify-content: space-between; }
  body.is-ios .volume-group { width: auto; flex: 0 0 auto; }
  body.is-ios .actions-group { width: auto; border-top: none; padding-top: 0; }
}

/* Très petits écrans (320–400 px) */
@media (max-width: 400px) {
  .player-card { padding: 22px 16px 26px; }
  .ctrl-btn--sm { width: 40px; height: 40px; }
  .ctrl-btn--play { width: 60px; height: 60px; }
  .controls-main { gap: 4px; }
  .actions-group { gap: 4px; }
  /* Liste : le nom arabe et la durée se resserrent sans jamais déborder */
  .track-list__item { gap: 10px; }
  .track-list__titlerow { gap: 6px; }
  .track-list__ar { font-size: 14.5px; }
  .track-list__time { font-size: 11px; }
  .track-list__index { width: 36px; height: 36px; }
}

/* =========================================================================
   12. FOOTER MODERNE (partagé landing + app)
   ====================================================================== */
.site-footer {
  position: relative;
  margin-top: 72px;
  padding: 56px clamp(20px, 5vw, 64px) 140px;
  background:
    radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--emerald) 8%, transparent), transparent 60%),
    var(--bg);
  border-top: 1px solid var(--border);
}
/* Liseré dégradé signature en tête de footer */
.site-footer::before {
  content: "";
  position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--emerald-light), var(--gold), transparent);
  opacity: 0.55;
}
.site-footer__inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; gap: 40px;
  grid-template-columns: 1.4fr 1fr 1fr;
}
.site-footer__brand-logo { width: 158px; height: 30px; margin-bottom: 14px; }
.site-footer__tagline {
  color: var(--text-secondary); font-size: 14px; line-height: 1.6; max-width: 34ch;
}
.site-footer__col h4 {
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary);
  margin: 0 0 16px;
}
.site-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.site-footer__links a {
  color: var(--text-secondary); text-decoration: none; font-size: 14.5px;
  display: inline-flex; align-items: center; gap: 9px;
  transition: color var(--dur-fast), transform var(--dur-fast);
}
.site-footer__links a:hover { color: var(--text); transform: translateX(3px); }
.site-footer__links .icon { width: 17px; height: 17px; color: var(--text-tertiary); }
.site-footer__links a:hover .icon { color: var(--accent); }
.footer-version {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-tertiary);
  padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
}
.footer-version .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 22%, transparent); }
.site-footer__version { margin-top: 18px; }

.site-footer__bottom {
  max-width: 1160px; margin: 44px auto 0; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.site-footer__copyright { font-size: 12.5px; line-height: 1.6; color: var(--text-tertiary); }
.kito-credit { color: var(--text-secondary); font-weight: 700; text-decoration: none; transition: color var(--dur-fast); }
.kito-credit:hover { color: var(--text); }
.kito-credit__digital {
  background: linear-gradient(90deg, #7C5CFF, #2EE5FF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (max-width: 780px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .site-footer { padding-bottom: 150px; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; text-align: center; }
}

/* =========================================================================
   13. LANDING PAGE (préfixe .lp-)
   ====================================================================== */
.lp-container { max-width: 1160px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

/* Pill / badge de section */
.lp-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--emerald) 14%, transparent);
  border: 1px solid var(--border-accent);
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-2);
}
.lp-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }

.lp-section { padding: clamp(64px, 9vw, 120px) 0; }
.lp-section__head { text-align: center; max-width: 640px; margin: 0 auto clamp(40px, 6vw, 64px); }
.lp-section__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 5vw, 44px); line-height: 1.12; margin: 18px 0 14px;
  letter-spacing: -0.01em;
}
/* Filet dégradé signature sous les titres de section centrés */
.lp-section__head .lp-section__title::after {
  content: ""; display: block;
  width: 56px; height: 3px; margin: 18px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--emerald-light), var(--gold));
  opacity: 0.85;
}
.lp-section__subtitle { color: var(--text-secondary); font-size: clamp(15px, 2vw, 18px); line-height: 1.6; }

/* Boutons CTA */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), background var(--dur-fast), border-color var(--dur-fast);
  will-change: transform;
}
.lp-btn .icon { width: 19px; height: 19px; }
.lp-btn--primary {
  background: linear-gradient(135deg, var(--emerald-light), var(--emerald));
  color: var(--offwhite); box-shadow: 0 12px 34px rgba(15, 109, 76, 0.42);
}
.lp-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(15, 109, 76, 0.5); }
.lp-btn--ghost {
  background: var(--surface); border-color: var(--border);
  color: var(--text);
}
.lp-btn--ghost:hover { border-color: var(--border-accent); background: var(--surface-strong); transform: translateY(-2px); }
.lp-btn:active { transform: scale(0.97); }

/* --- HERO ------------------------------------------------------------ */
.lp-hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 96px);
}
.lp-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 20% 0%, color-mix(in srgb, var(--emerald) 22%, transparent), transparent 70%),
    radial-gradient(50% 45% at 90% 20%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 70%);
}
.lp-hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: clamp(32px, 5vw, 72px);
}
.lp-hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 6.2vw, 62px); line-height: 1.05; letter-spacing: -0.02em;
  margin: 22px 0 20px;
}
.lp-hero__title .grad {
  background: linear-gradient(120deg, var(--emerald-light), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-hero__lead { color: var(--text-secondary); font-size: clamp(16px, 2.1vw, 19px); line-height: 1.6; max-width: 46ch; margin-bottom: 32px; }
.lp-hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.lp-hero__meta { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.lp-hero__stat strong { display: block; font-family: var(--font-display); font-size: 26px; color: var(--text); }
.lp-hero__stat span { font-size: 12.5px; color: var(--text-tertiary); }

/* Mockup de lecteur (aperçu, pur CSS/SVG — pas d'image externe) */
.lp-mockup {
  position: relative; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-soft); padding: 30px; overflow: hidden;
  animation: floatUp 0.9s var(--ease-out) both;
}
.lp-mockup::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--emerald-light), var(--gold), transparent);
}
.lp-mockup__disc {
  width: 168px; height: 168px; margin: 4px auto 22px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--emerald), var(--gold), var(--emerald));
  display: grid; place-items: center; position: relative;
  animation: spin 22s linear infinite;
}
.lp-mockup__disc::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--bg-elevated); }
.lp-mockup__disc::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.lp-mockup__title { text-align: center; font-family: var(--font-display); font-size: 22px; }
.lp-mockup__reciter {
  display: block; text-align: center; margin: 10px auto 20px; width: fit-content;
  padding: 5px 14px; border-radius: var(--radius-pill); font-size: 12px; color: var(--accent);
  background: var(--surface-strong); border: 1px solid var(--border-accent);
}
.lp-mockup__bar { height: 5px; border-radius: var(--radius-pill); background: var(--border); overflow: hidden; margin-bottom: 22px; }
.lp-mockup__bar > i { display: block; height: 100%; width: 42%; border-radius: inherit; background: linear-gradient(90deg, var(--emerald-light), var(--gold)); }
.lp-mockup__controls { display: flex; align-items: center; justify-content: center; gap: 18px; }
.lp-mockup__ctrl { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-strong); color: var(--text-secondary); }
.lp-mockup__ctrl--play { width: 62px; height: 62px; background: linear-gradient(135deg, var(--emerald-light), var(--emerald)); color: var(--offwhite); box-shadow: 0 10px 26px rgba(15,109,76,0.4); }
.lp-mockup__ctrl .icon { width: 20px; height: 20px; }
.lp-mockup__ctrl--play .icon { width: 26px; height: 26px; }
@keyframes floatUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* --- GRILLE DE FONCTIONNALITÉS -------------------------------------- */
.lp-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.lp-feature {
  position: relative; padding: 26px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base), background var(--dur-base);
}
.lp-feature:hover { transform: translateY(-4px); border-color: var(--border-accent); background: var(--surface-strong); }
.lp-feature__icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px;
  background: color-mix(in srgb, var(--emerald) 16%, transparent); color: var(--accent-2);
}
.lp-feature__icon .icon { width: 23px; height: 23px; }
.lp-feature h3 { font-family: var(--font-body); font-size: 16px; font-weight: 700; margin-bottom: 7px; }
.lp-feature p { color: var(--text-secondary); font-size: 13.5px; line-height: 1.55; }

/* --- APERÇU (split) -------------------------------------------------- */
.lp-preview__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.lp-checklist { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.lp-checklist li { display: flex; align-items: flex-start; gap: 13px; font-size: 15px; color: var(--text-secondary); }
.lp-checklist .tick {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px;
  background: color-mix(in srgb, var(--emerald) 20%, transparent); color: var(--accent-2);
}
.lp-checklist .tick .icon { width: 14px; height: 14px; }
.lp-checklist strong { color: var(--text); font-weight: 600; }

/* --- POURQUOI (cartes) ---------------------------------------------- */
.lp-why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-why__card {
  padding: 30px 26px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border); text-align: left;
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base);
}
.lp-why__card:hover { transform: translateY(-4px); border-color: var(--border-accent); }
.lp-why__num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); margin-bottom: 12px; }
.lp-why__card h3 { font-family: var(--font-body); font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.lp-why__card p { color: var(--text-secondary); font-size: 14px; line-height: 1.55; }

/* --- FAQ (details/summary) ------------------------------------------ */
.lp-faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.lp-faq details {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); overflow: hidden;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.lp-faq details[open] { border-color: var(--border-accent); background: var(--surface-strong); }
.lp-faq summary {
  list-style: none; cursor: pointer; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 600; font-size: 15.5px;
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary .chevron { flex-shrink: 0; width: 20px; height: 20px; color: var(--text-tertiary); transition: transform var(--dur-base) var(--ease-out); }
.lp-faq details[open] summary .chevron { transform: rotate(180deg); color: var(--accent); }
.lp-faq__answer { padding: 0 24px 22px; color: var(--text-secondary); font-size: 14.5px; line-height: 1.65; }
/* Barre dégradée à gauche quand ouvert (signature) */
.lp-faq details[open]::before {
  content: ""; display: block; height: 2px;
  background: linear-gradient(90deg, var(--emerald-light), var(--gold), transparent);
}

/* --- BANDEAU CTA final ---------------------------------------------- */
.lp-cta-band { text-align: center; }
.lp-cta-card {
  position: relative; overflow: hidden;
  max-width: 900px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) 28px;
  border-radius: var(--radius-lg); border: 1px solid var(--border-accent);
  background:
    radial-gradient(80% 120% at 50% 0%, color-mix(in srgb, var(--emerald) 20%, transparent), transparent 65%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}
.lp-cta-card h2 { font-family: var(--font-display); font-size: clamp(26px, 4.5vw, 40px); margin-bottom: 14px; }
.lp-cta-card p { color: var(--text-secondary); font-size: 16px; margin-bottom: 30px; }

/* --- Topbar variante landing (liens de navigation) ------------------ */
.topbar__nav { display: flex; align-items: center; gap: 26px; }
.topbar__nav a { color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; transition: color var(--dur-fast); }
.topbar__nav a:hover { color: var(--text); }
.topbar__cta {
  padding: 9px 18px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 600; text-decoration: none;
  background: linear-gradient(135deg, var(--emerald-light), var(--emerald)); color: var(--offwhite);
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.topbar__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15,109,76,0.4); }

/* --- Reveal au scroll (progressif, désactivé si reduced-motion) ------ */
.lp-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.lp-reveal.is-in { opacity: 1; transform: none; }

/* --- Responsive landing --------------------------------------------- */
@media (max-width: 900px) {
  .lp-hero__grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .lp-hero__content {
    order: 1;
  }

  .lp-hero__visual {
    order: 2;
    max-width: 420px;
    margin: 0 auto;
  }

  .lp-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .lp-why {
    grid-template-columns: 1fr;
  }

  .lp-preview__grid {
    grid-template-columns: 1fr;
  }

  .topbar__nav {
    display: none;
  }
}

@media (max-width: 480px) {
  .lp-features {
    grid-template-columns: 1fr;
  }

  .lp-hero__cta {
    flex-direction: column;
  }

  .lp-hero__cta .lp-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-mockup,
  .lp-mockup__disc {
    animation: none;
  }

  .lp-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Loader circulaire sur le disque (état de chargement) ------------ */
.disc-loader {
  position: absolute; inset: 0; margin: auto;
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(246, 243, 234, 0.18); border-top-color: var(--accent);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast);
}
.disc-loader.is-visible { opacity: 1; animation: rotate 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .disc-loader.is-visible { animation: none; } }
