/* =========================================================
   THÈME — bleu nuit, lueurs, panneaux vitrés
   ========================================================= */
:root {
  --bleu: #2a6bff;
  --bleu-clair: #7fa8ff;
  --bg: #030712;
  --nuit: #061231;
  --panneau: rgba(8, 20, 50, .72);
  --panneau-2: rgba(14, 30, 70, .85);
  --ligne: rgba(98, 140, 255, .22);
  --ligne-forte: rgba(130, 170, 255, .45);
  --texte: #eef3ff;
  --gris: #8ea2cc;
  --or: #f5b316;
  --vert: #1f8a5a;
  --r: 14px;
  --font: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Exo 2", "Arial Black", Impact, sans-serif;
  --gouttiere: clamp(16px, 3vw, 32px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Échelle globale : l'accueil et le mode défilement sont affichés à 90 %
   (le mode page par page reste à 100 %). Change 0.9 ici pour ajuster. */
body.page-accueil, body.page-lecteur.mode-defilement { zoom: 0.9; }
html { scroll-behavior: auto; }
body {
  margin: 0; min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(42,107,255,.18), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, rgba(42,107,255,.10), transparent 60%),
    var(--bg);
  color: var(--texte); font-family: var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
button, select { font: inherit; color: inherit; }
code { background: var(--panneau-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.ico { flex-shrink: 0; }
.ico.plein path { fill: currentColor; }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gouttiere);
  background: rgba(3,7,18,.75); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ligne);
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 24px; letter-spacing: 1px; text-transform: uppercase; }
.logo-mark { width: 26px; height: 22px; background: linear-gradient(135deg, var(--bleu-clair), var(--bleu)); clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%); filter: drop-shadow(0 0 8px var(--bleu)); }
.topnav { display: flex; gap: 6px; }
.topnav a { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--gris); }
.topnav a:hover { color: var(--texte); background: rgba(255,255,255,.06); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 12px;
  font-weight: 600; font-size: 17px; cursor: pointer; white-space: nowrap;
  border: 1.5px solid var(--ligne-forte);
  background: linear-gradient(180deg, rgba(20,36,78,.9), rgba(8,18,44,.9));
  transition: transform .15s, box-shadow .2s, filter .2s, border-color .2s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.97); }
.btn-bleu {
  border-color: #6f9bff;
  background: linear-gradient(180deg, #3b7bff, #1a46c4);
  box-shadow: 0 0 0 1px rgba(42,107,255,.3), 0 8px 30px -6px rgba(42,107,255,.7), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-or {
  border-color: var(--or);
  background: linear-gradient(180deg, #4a3208, #2a1c03);
  box-shadow: 0 0 18px -2px rgba(245,179,22,.55), inset 0 0 12px rgba(245,179,22,.15);
}
.btn-or .ico { color: var(--or); }
.btn-or.actif .ico path { fill: var(--or); }
.btn-vert { border-color: #2a9a68; background: linear-gradient(180deg, #0e3d2b, #072519); }
.btn-vert .ico { color: #b8f0d4; }
.btn-vert.actif { box-shadow: 0 0 18px -2px rgba(31,138,90,.7); border-color: #3fd08f; }
.btn-sombre.actif { border-color: #6f9bff; box-shadow: 0 0 18px -4px rgba(42,107,255,.8); }
.btn-sombre.actif .ico { transform: rotate(45deg); }
.btn .ico { transition: transform .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--ligne); }
.hero-fond { position: absolute; inset: 0; z-index: -3; background: linear-gradient(100deg, #030a1f 0%, #06163f 45%, #0a2266 100%); }
.hero-art { position: absolute; inset: 0 0 0 35%; z-index: -2; background-size: cover; background-position: center 25%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 35%); mask-image: linear-gradient(90deg, transparent 0%, #000 35%); }
.hero-art-gen { inset: 0 0 0 25%; }
.hero-art-gen .eclats { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(3,7,18,.85), transparent 35%); pointer-events: none; }
.deco { position: absolute; pointer-events: none; }
.deco.puzzle { filter: drop-shadow(0 0 14px rgba(42,107,255,.8)); z-index: 0; }

.hero-inner {
  position: relative; z-index: 1; max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: clamp(20px, 4vw, 48px);
  padding: 28px var(--gouttiere) 28px;
}
.hero-inner.complet { padding-top: 48px; padding-bottom: 48px; align-items: flex-end; }
.hero-cover {
  width: clamp(130px, 17vw, 270px); aspect-ratio: 2/3; object-fit: cover; flex-shrink: 0;
  border-radius: 16px; border: 2px solid rgba(170,195,255,.55);
  box-shadow: 0 0 0 1px rgba(42,107,255,.4), 0 0 40px -8px rgba(42,107,255,.7), 0 30px 60px -20px #000;
}
.hero-texte { min-width: 0; max-width: 760px; }
.badge-type {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: 10px;
  background: rgba(3,10,30,.7); border: 1.5px solid var(--ligne-forte);
  font-weight: 700; font-size: 15px; letter-spacing: 1px; text-transform: uppercase;
}
.hero-titre {
  margin: 14px 0 0; font-family: var(--display); font-style: italic; font-weight: 900;
  font-size: clamp(40px, 6.6vw, 96px); line-height: .95; letter-spacing: -1px; text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 30%, #c9d6f5 60%, #8ea8e6); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(10,30,90,.9)) drop-shadow(0 0 24px rgba(42,107,255,.45));
}
.hero-logo { max-width: min(560px, 100%); max-height: 150px; margin-top: 12px; filter: drop-shadow(0 0 24px rgba(42,107,255,.5)); }
.hero-sous { margin: 6px 0 0; font-style: italic; font-weight: 500; font-size: clamp(16px, 1.6vw, 22px); letter-spacing: .5px; text-transform: uppercase; color: #dfe7ff; }
.note {
  display: inline-flex; align-items: baseline; gap: 10px; margin-top: 16px; padding: 8px 18px; border-radius: 12px;
  border: 1.5px solid var(--or); background: rgba(40,26,2,.75); box-shadow: 0 0 20px -4px rgba(245,179,22,.6);
}
.note .ico { color: var(--or); align-self: center; }
.note b { font-size: 26px; font-weight: 700; }
.note span { color: #e8d9b0; font-size: 16px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 18px 0 10px; color: var(--gris); font-size: 14px; }
.hero-meta span + span::before { content: "•"; margin-right: 14px; opacity: .6; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tags span { padding: 5px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(42,107,255,.14); border: 1px solid var(--ligne); }
.hero-synopsis { margin: 14px 0 0; color: #c4d0ee; line-height: 1.65; font-size: 15px; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }

/* ---------- Panneaux ---------- */
.conteneur { max-width: 1400px; margin: 0 auto; padding: 0 var(--gouttiere); }
.panneau {
  position: relative; border-radius: 18px; background: var(--panneau);
  border: 1.5px solid var(--ligne); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 20px 50px -30px #000;
}

/* ---------- Accueil ---------- */
.section { margin-top: 32px; }
.section-tete { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.section-tete h2 { margin: 0; display: flex; align-items: center; gap: 12px; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 26px; text-transform: uppercase; }
.section-tete h2 .compte { font-family: var(--font); font-style: normal; font-size: 14px; font-weight: 600; color: var(--gris); padding: 3px 10px; border-radius: 8px; background: rgba(42,107,255,.15); }
.outils { display: flex; gap: 8px; flex-wrap: wrap; }
.champ {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 12px;
  background: rgba(3,10,30,.7); border: 1.5px solid var(--ligne); color: var(--gris);
}
.champ:focus-within { border-color: var(--bleu); }
.champ input { background: none; border: 0; outline: 0; color: var(--texte); font: inherit; font-size: 14px; width: 150px; }
.btn-carre { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; cursor: pointer; background: rgba(3,10,30,.7); border: 1.5px solid var(--ligne); }
.btn-carre:hover { border-color: var(--ligne-forte); }

.reprendre { display: flex; align-items: center; gap: 20px; padding: 18px 22px; overflow: hidden; max-width: 640px; }
.reprendre-vignette { width: 64px; height: 86px; border-radius: 10px; object-fit: cover; object-position: top; border: 1px solid var(--ligne-forte); flex-shrink: 0; }
.reprendre-info { flex: 1; min-width: 0; display: grid; gap: 6px; }
.reprendre-info small { color: var(--gris); font-weight: 600; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.reprendre-info strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre { height: 5px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; }
.barre div { height: 100%; background: linear-gradient(90deg, var(--bleu), var(--bleu-clair)); box-shadow: 0 0 10px var(--bleu); }
.rond-play { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: linear-gradient(180deg, #3b7bff, #1a46c4); box-shadow: 0 0 24px -4px var(--bleu); }

.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.carte {
  position: relative; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden;
  background: var(--panneau); border: 1.5px solid var(--ligne);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.carte:hover { transform: translateY(-4px); border-color: #6f9bff; box-shadow: 0 0 30px -8px rgba(42,107,255,.7); }
.carte-image { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--nuit); }
.carte-image img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
.carte:hover .carte-image img { transform: scale(1.05); }
.carte-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3,10,30,.9), transparent 45%); }
.carte.lu .carte-image img { opacity: .4; filter: grayscale(.4); }
.carte-num { position: absolute; left: 12px; bottom: 10px; z-index: 1; font-family: var(--display); font-style: italic; font-weight: 900; font-size: 30px; line-height: 1; text-shadow: 0 0 14px rgba(42,107,255,.9); }
.carte-num small { display: block; font-family: var(--font); font-style: normal; font-weight: 600; font-size: 11px; letter-spacing: 2px; color: var(--bleu-clair); text-transform: uppercase; text-shadow: none; }
.pastille { position: absolute; top: 10px; z-index: 1; padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.pastille.nouveau { left: 10px; background: var(--bleu); box-shadow: 0 0 14px var(--bleu); }
.pastille.lu { right: 10px; background: rgba(15,60,40,.9); border: 1px solid #2a9a68; color: #b8f0d4; }
.carte-prog { position: absolute; inset: auto 0 0 0; height: 4px; z-index: 2; background: rgba(0,0,0,.5); }
.carte-prog div { height: 100%; background: var(--bleu); box-shadow: 0 0 8px var(--bleu); }
.carte-corps { display: grid; gap: 3px; padding: 12px 14px 14px; }
.carte-titre { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-meta { color: var(--gris); font-size: 12px; }
.vide { color: var(--gris); text-align: center; padding: 50px 20px; line-height: 1.7; }

.footer { margin-top: 70px; border-top: 1px solid var(--ligne); background: rgba(3,7,18,.6); }
.footer-inner { max-width: 1400px; margin: 0 auto; padding: 28px var(--gouttiere); display: flex; align-items: center; gap: 24px; flex-wrap: wrap; color: var(--gris); font-size: 14px; }
.footer-inner p { margin: 0; flex: 1; }
.footer-liens { display: flex; gap: 16px; }
.footer-liens a:hover { color: var(--texte); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; z-index: 100; transform: translate(-50%, 20px);
  padding: 12px 22px; border-radius: 12px; background: var(--panneau-2); border: 1.5px solid var(--ligne-forte);
  font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  box-shadow: 0 0 30px -8px rgba(42,107,255,.7);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
  .hero-inner, .hero-inner.complet { flex-direction: column; align-items: flex-start; padding-top: 24px; }
  .hero-cover { width: 130px; }
  .hero-art, .hero-art-gen { inset: 0; opacity: .45; -webkit-mask-image: none; mask-image: none; }
  .btn { height: 46px; padding: 0 16px; font-size: 15px; }
  .hero-actions { gap: 10px; }
  .grille { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .champ input { width: 100px; }
  .topnav a.cache-mobile { display: none; }
}
