/* ============================================================
   style.css — Styles custom · Scanaddiction
   ============================================================ */

/* Import police */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');

/* Variables */
:root {
  --bg-base    : #080810;
  --bg-surface : #0f0f1a;
  --bg-card    : #161625;
  --bg-card-h  : #1c1c30;
  --border     : #1e1e35;
  --border-l   : #2a2a45;
  --accent     : #7c3aed;
  --accent-l   : #a78bfa;
  --text        : #f1f5f9;
  --text-muted  : #94a3b8;
  --text-dim    : #475569;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-l); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Sélection */
::selection { background: var(--accent); color: white; }

/* ── Cartes œuvres ──────────────────────────────────────── */
.card-oeuvre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card-oeuvre:hover {
  transform: translateY(-4px);
  border-color: var(--border-l);
  box-shadow: 0 12px 40px rgba(124,58,237,0.15);
}
.card-oeuvre img {
  width: 100%;
  aspect-ratio: 5/7;
  object-fit: cover;
  display: block;
}

/* ── Grille catalogue ────────────────────────────────────── */
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .catalogue-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
@media (min-width: 1024px) {
  .catalogue-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

/* ── Lecteur chapitre ────────────────────────────────────── */
#reader-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #000;
}
.reader-page {
  display: block;
  width: 100%;
  max-width: var(--reader-width, 800px);
  height: auto;
  user-select: none;
}
.reader-page img {
  width: 100%;
  height: auto;
  display: block;
}
#reader-toolbar {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: rgba(8,8,16,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
#reader-progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  z-index: 100;
  transition: width 0.1s;
  pointer-events: none;
}

/* ── Commentaires ────────────────────────────────────────── */
.comment-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  transition: border-color 0.2s;
}
.comment-card:hover { border-color: var(--border-l); }

/* ── Formulaire ──────────────────────────────────────────── */
.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-l);
  color: var(--text);
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
}
.form-input::placeholder { color: var(--text-dim); }

/* ── Badges ──────────────────────────────────────────────── */
.badge-genre {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(124,58,237,0.15);
  color: var(--accent-l);
  border: 1px solid rgba(124,58,237,0.25);
}

/* ── Étoiles interactives ────────────────────────────────── */
.star-interactive { cursor: pointer; font-size: 1.5rem; transition: transform 0.1s; }
.star-interactive:hover { transform: scale(1.2); }

/* ── Skeleton loading ────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-h) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Hero gradient ───────────────────────────────────────── */
.hero-gradient {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,58,237,0.18) 0%, transparent 70%);
}

/* ── Transitions page ────────────────────────────────────── */
.page-enter {
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Suggestions statuts ─────────────────────────────────── */
.statut-en_attente { color: #94a3b8; background: rgba(100,116,139,0.1); border-color: rgba(100,116,139,0.2); }
.statut-retenue    { color: #4ade80; background: rgba(74,222,128,0.1); border-color: rgba(74,222,128,0.2); }
.statut-refusee    { color: #f87171; background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.2); }

/* ── No-results ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }

/* Transition couleur douce pour tous les liens */
a { transition: color 0.15s; }
