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

@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@800&display=swap');

/* -------------------------------------------------------------------------
   1. DESIGN TOKENS — identité propre à Audio Coran
   ---------------------------------------------------------------------- */
:root {
  /* Palette — mode sombre par défaut */
  --emerald:        #0F6D4C;
  --emerald-light:  #1FA97A;
  --gold:           #C9A24B;
  --gold-light:     #E8C97A;
  --offwhite:       #F6F3EA;
  --charcoal:       #14181B;
  --deep-black:     #0A0C0E;

  --bg:             var(--deep-black);
  --bg-elevated:    #101514;
  --surface:        rgba(246, 243, 234, 0.045);
  --surface-strong: rgba(246, 243, 234, 0.08);
  --border:         rgba(246, 243, 234, 0.10);
  --border-accent:  rgba(201, 162, 75, 0.35);
  --text:           var(--offwhite);
  --text-secondary: rgba(246, 243, 234, 0.60);
  --text-tertiary:  rgba(246, 243, 234, 0.38);
  --accent:         var(--gold);
  --accent-2:       var(--emerald-light);
  --shadow-soft:    0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-glow:    0 0 40px rgba(201, 162, 75, 0.18);
  --danger:         #E15252;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 100px;

  --font-display: 'Amiri', Georgia, serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-base: 300ms;
  --dur-slow: 600ms;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg:             var(--offwhite);
  --bg-elevated:    #FFFFFF;
  --surface:        rgba(20, 24, 27, 0.04);
  --surface-strong: rgba(20, 24, 27, 0.07);
  --border:         rgba(20, 24, 27, 0.10);
  --border-accent:  rgba(15, 109, 76, 0.30);
  --text:           var(--charcoal);
  --text-secondary: rgba(20, 24, 27, 0.62);
  --text-tertiary:  rgba(20, 24, 27, 0.40);
  --accent:         var(--emerald);
  --accent-2:       var(--gold);
  --shadow-soft:    0 20px 50px rgba(20, 24, 27, 0.12);
  --shadow-glow:    0 0 40px rgba(15, 109, 76, 0.12);
  color-scheme: light;
}

/* -------------------------------------------------------------------------
   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(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 72%, 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; }
.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); }

/* -------------------------------------------------------------------------
   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);
}
.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;
  margin: 0 auto 32px;
}
.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; }
.disc img { width: 100%; height: 100%; object-fit: cover; }
.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; }
.track-title { font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); font-weight: 700; }
.track-subtitle { color: var(--text-secondary); font-size: 15px; margin-top: 4px; }
.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 22px; }
.time { font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary); width: 42px; }
.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;
}

/* --- 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--play {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, var(--emerald-light), var(--emerald));
  color: var(--offwhite);
  box-shadow: 0 10px 30px rgba(15, 109, 76, 0.4);
}
.ctrl-btn--play:hover { transform: translateY(-2px) scale(1.04); }
.ctrl-btn--play .icon { width: 28px; height: 28px; }

/* 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;
  flex-wrap: wrap;
}
.volume-group { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 140px; max-width: 200px; }
/* 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; }
.speed-btn {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  padding: 7px 12px; border-radius: var(--radius-pill);
  background: var(--surface-strong); border: 1px solid var(--border);
  color: var(--text-secondary);
}
.speed-btn:hover { border-color: var(--border-accent); color: var(--text); }
.actions-group { display: flex; align-items: center; gap: 4px; }

/* -------------------------------------------------------------------------
   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);
}
.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: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  transition: background var(--dur-fast);
  cursor: pointer;
}
.track-list__item:hover { background: var(--surface-strong); }
.track-list__item.is-active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.track-list__cover {
  width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex-shrink: 0;
  background: var(--bg-elevated); position: relative;
}
.track-list__cover img { width: 100%; height: 100%; object-fit: cover; }
.track-list__info { flex: 1; min-width: 0; }
.track-list__title {
  font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-list__item.is-active .track-list__title { color: var(--accent); }
.track-list__reciter { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.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: 10px;
  padding: 48px 20px; text-align: center; color: var(--text-tertiary);
}
.empty-state .icon { width: 32px; height: 32px; opacity: 0.5; }
.empty-state p { font-size: 13.5px; }

/* -------------------------------------------------------------------------
   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: 14px; 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; }
  .search-box { display: none; }
  .controls-main { gap: 8px; }
  .ctrl-btn--play { width: 60px; height: 60px; }
  .mini-player { left: 12px; right: 12px; bottom: 12px; }
  .mini-player__info { max-width: none; flex: 1; }
  .sidebar { position: static; max-height: none; }
}

/* =========================================================================
   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 { height: 30px; width: auto; 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__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;
}
.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 { grid-template-columns: 1fr; }
  .lp-hero__visual { order: -1; 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; } }
