@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #16130f;
  --bg-soft: #1f1a14;
  --paper: #faf6ee;
  --ink: #241e16;
  --ink-soft: #6b5f4d;
  --gold: #c9a24b;
  --gold-deep: #a67f2e;
  --blue: #2f6fb0;
  --blue-deep: #1f5386;
  --line: #e7ded0;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

h1, h2, h3, .brand { font-family: 'Fraunces', serif; color: var(--ink); margin: 0; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
  background: var(--paper); position: sticky; top: 0; z-index: 10;
}
.brand { font-size: 19px; font-weight: 600; }
.brand span { color: var(--gold-deep); }
nav a { margin-left: 26px; font-size: 14.5px; font-weight: 500; color: var(--ink-soft); }
nav a:hover { color: var(--gold-deep); }

.btn { display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: 14.5px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--gold); }

/* HERO — chaleur de bougie */
.hero {
  position: relative;
  padding: 110px 24px 90px;
  text-align: center;
  color: #f4ede0;
  background:
    radial-gradient(circle at 22% 30%, rgba(230,180,90,0.35), transparent 45%),
    radial-gradient(circle at 78% 55%, rgba(230,180,90,0.18), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  overflow: hidden;
}
.hero::before {
  content: "🕯️"; position: absolute; left: 8%; top: 18%; font-size: 54px; opacity: 0.5; filter: blur(0.3px);
}
.hero::after {
  content: "📖"; position: absolute; right: 10%; bottom: 14%; font-size: 60px; opacity: 0.35;
}
.hero h1 { font-size: 46px; font-weight: 600; max-width: 760px; margin: 0 auto 18px; color: #fbf3e3; }
.hero p { max-width: 600px; margin: 0 auto 34px; color: #d8cbb0; font-size: 17px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* SECTIONS */
section.section { padding: 70px 0; }
section.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--blue-deep); background: #e8f1fa;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
section.section h2 { font-size: 30px; margin-bottom: 14px; }
section.section p.lead { color: var(--ink-soft); max-width: 640px; margin-bottom: 34px; font-size: 16px; }

/* QUI SOMMES-NOUS */
.about { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.about .portrait {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--blue), var(--blue-deep));
  aspect-ratio: 1/1.05; display: flex; align-items: flex-end; color: #fff; padding: 18px;
  font-weight: 600;
}
.about .bio p { color: var(--ink-soft); margin: 0 0 16px; }
@media (max-width: 720px) { .about { grid-template-columns: 1fr; } }

/* LIVRES */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.book-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.book-card .cover {
  aspect-ratio: 3/4; background: linear-gradient(160deg, var(--gold), var(--gold-deep));
  display: flex; align-items: center; justify-content: center; font-size: 34px; color: rgba(255,255,255,0.85);
}
.book-card .body { padding: 18px 20px 22px; }
.book-card h3 { font-size: 17px; margin-bottom: 4px; }
.book-card .meta { font-size: 12.5px; color: var(--gold-deep); font-weight: 600; margin-bottom: 10px; }
.book-card p { color: var(--ink-soft); font-size: 14px; margin: 0 0 16px; }
.book-card .actions { display: flex; gap: 10px; }
.book-card .actions .btn { padding: 8px 16px; font-size: 13px; }

/* FEATURE CARDS */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card .icon { font-size: 24px; margin-bottom: 12px; display: block; }
.card h3 { font-size: 16.5px; margin-bottom: 6px; }
.card p { color: var(--ink-soft); font-size: 14px; margin: 0; }

/* ADMIN */
.admin-box { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: stretch; }
.admin-box ul { list-style: none; margin: 0; padding: 0; }
.admin-box li { padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.admin-box li:last-child { border-bottom: none; }
.admin-example { background: var(--blue); color: #fff; border-radius: var(--radius); padding: 26px; font-size: 14.5px; }
.admin-example strong { display: block; margin-bottom: 6px; }
.admin-example .row { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.2); }
@media (max-width: 720px) { .admin-box { grid-template-columns: 1fr; } }

/* ROADMAP */
.roadmap { position: relative; padding-left: 34px; }
.roadmap::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.roadmap .step { position: relative; padding-bottom: 30px; }
.roadmap .step:last-child { padding-bottom: 0; }
.roadmap .step::before {
  content: attr(data-n); position: absolute; left: -34px; top: 0; width: 24px; height: 24px;
  border-radius: 50%; background: var(--gold); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.roadmap .step.done::before { background: var(--blue); }
.roadmap h4 { font-size: 16px; margin: 0 0 4px; }
.roadmap p { margin: 0; color: var(--ink-soft); font-size: 14px; }

/* CTA FINALE */
.cta-final {
  text-align: center; border-radius: 20px; padding: 60px 30px;
  background: linear-gradient(160deg, var(--bg), var(--bg-soft));
  color: #f4ede0; margin: 0 24px 80px;
}
.cta-final h2 { color: #fbf3e3; font-size: 30px; margin-bottom: 14px; }
.cta-final p.lead { color: #d8cbb0; margin: 0 auto 28px; }
.cta-final .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.cta-final .note {
  display: inline-block; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px; padding: 14px 20px; font-size: 14px; color: #ecdfc4; max-width: 560px;
}

footer { border-top: 1px solid var(--line); padding: 40px 24px; text-align: center; color: var(--ink-soft); font-size: 14px; }

/* Citation du jour — affiche */
.quote-poster {
  position: relative; max-width: 640px; margin: 0 auto; border-radius: 20px; overflow: hidden;
  padding: 56px 40px 40px; text-align: center; color: #f4ede0;
  background:
    radial-gradient(circle at 20% 20%, rgba(230,180,90,0.30), transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(230,180,90,0.16), transparent 55%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-soft) 100%);
  border: 1px solid rgba(201,162,75,0.35);
}
.quote-poster .quote-mark { font-family: 'Fraunces', serif; font-size: 64px; color: var(--gold); line-height: 1; margin-bottom: 6px; opacity: 0.85; }
.quote-poster .quote-text { font-family: 'Fraunces', serif; font-size: 24px; line-height: 1.5; color: #fbf3e3; margin-bottom: 30px; }
.quote-poster .author-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.quote-poster .author-row img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.quote-poster .author-name { font-size: 13.5px; font-weight: 600; color: #ecdfc4; }
.quote-poster .author-role { font-size: 11.5px; color: #c9b896; }

@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  nav { display: none; }
}


/* =====================================================================
   HABILLAGE « PUBLICATIONS EN LIGNE »
   Même organisation que ministrybooks.org, avec les couleurs du ministère.
   Tout ce qui précède est inchangé ; ce bloc ne fait que changer l'apparence
   (aucun texte, bouton, lien ou fonction du site n'est modifié).
   ===================================================================== */

:root {
  --lsm-linen: #efe6d2;
  --lsm-linen-edge: #e2d6b8;
  --lsm-offwhite: #fbf9f4;
  --lsm-tex:
    radial-gradient(rgba(110, 80, 30, 0.09) 1px, transparent 1.3px),
    repeating-linear-gradient(0deg, rgba(110, 80, 30, 0.04) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(110, 80, 30, 0.04) 0 1px, transparent 1px 4px);
}

/* ---------- 1. En-tête : titre centré, puis rangée de compte, puis barre de menu ---------- */
header { display: contents; }

header .brand {
  display: flex !important; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center;
  padding: 22px 16px 8px; background: #fff;
  font-size: clamp(17px, 4.4vw, 32px); font-weight: 500; letter-spacing: 0.05em;
  text-transform: uppercase; line-height: 1.25; color: var(--ink);
}
header .brand a { color: inherit; }
header .brand img {
  display: block; width: 62px !important; height: 62px !important;
  border: 2px solid var(--gold); margin: 0 0 4px;
}
header .brand::after {
  content: "Bibliothèque numérique";
  font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 500;
  font-size: 0.72em; letter-spacing: 0.01em; text-transform: none; color: var(--gold-deep);
}

/* Rangée « accueil / Créer un compte / Se connecter » (ajoutée par /js/lsm-layout.js) */
.lsm-account {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 12px; padding: 10px 14px 20px; background: #fff;
}
.lsm-account .lsm-home {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; color: var(--blue);
}
.lsm-account .lsm-home svg { width: 34px; height: 34px; display: block; }
.lsm-account .btn { padding: 11px 20px; font-size: 16px; border-radius: 8px; }

/* Barre de menu sombre : icône au-dessus du nom, toujours visible en haut */
nav {
  display: flex; justify-content: center; flex-wrap: wrap;
  background: #16130f; border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 30;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}
nav a {
  margin: 0; min-width: 100px; padding: 11px 16px 9px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center; font-size: 14.5px; font-weight: 600; line-height: 1.15; color: #f6eedb;
  border-bottom: 3px solid transparent; margin-bottom: -3px;
}
nav a::before { content: "📄"; font-size: 24px; line-height: 1; filter: brightness(0) invert(1); }
nav a[href="/"]::before { content: "🏠"; }
nav a[href="/a-propos.html"]::before { content: "ℹ️"; }
nav a[href="/catalogue.html"]::before { content: "📚"; }
nav a[href="/espace-etude.html"]::before { content: "🎓"; }
nav a[href="/assistant.html"]::before { content: "💬"; }
nav a[href="/bible.html"]::before { content: "📖"; }
nav a[href="/actualites.html"]::before { content: "📰"; }
nav a[href="/audio.html"]::before { content: "🎧"; }
nav a[href="/admin.html"]::before { content: "⚙️"; }
nav a[href="/login.html"]::before { content: "👤"; }
nav a:hover { color: #e8c978; }
nav a.on { color: #e8c978; border-bottom-color: var(--gold); }
@media (max-width: 820px) { header nav { display: none; } }

/* ---------- 2. Boutons : rectangles arrondis, gros et lisibles ---------- */
.btn { border-radius: 10px; padding: 13px 26px; font-size: 16px; }
.btn-ghost { background: #fff; border: 2px solid var(--blue); color: var(--blue-deep); }
.btn-ghost:hover { background: #eef5fb; border-color: var(--blue-deep); }

/* ---------- 3. Bannière d'accueil : fond lin clair, gros titre, deux boutons larges ---------- */
.hero, section.section.alt {
  background-color: var(--lsm-linen);
  background-image: var(--lsm-tex);
  background-size: 7px 7px, auto, auto;
}
.hero {
  padding: 30px 20px 48px; color: var(--ink);
  border-bottom: 1px solid var(--lsm-linen-edge);
}
.hero::before, .hero::after { content: none; }

/* Cadre du diaporama d'affiches (rempli par /js/lsm-layout.js) — place réservée pour éviter tout saut */
.hero:has(.actions)::before {
  content: ""; display: block; position: relative; left: auto; top: auto;
  font-size: 0; opacity: 1; filter: none;
  width: min(100%, 640px); aspect-ratio: 16 / 10; margin: 0 auto 26px;
  border-radius: 10px; background: #0b1d3a;
}
.hero:has(.lsm-carousel)::before { display: none; }

.hero h1 {
  font-size: clamp(30px, 7.4vw, 52px); font-weight: 500; letter-spacing: 0.03em;
  text-transform: uppercase; line-height: 1.15; color: var(--ink); max-width: 820px; margin: 0 auto 14px;
}
.hero p {
  font-family: 'Fraunces', Georgia, serif; font-style: italic;
  font-size: clamp(18px, 4.6vw, 24px); line-height: 1.5; color: var(--gold-deep);
  max-width: 680px; margin: 0 auto 26px;
}
.hero .actions { flex-direction: column; align-items: center; gap: 14px; }
.hero .actions .btn { width: min(100%, 400px); padding: 15px 22px; font-size: 19px; text-align: center; }
.hero .actions .btn-ghost {
  background: #fff !important; color: var(--blue-deep) !important; border: 2px solid var(--blue) !important;
}
.hero #install-btn {
  width: min(100%, 400px); padding: 14px 22px; font-size: 17px;
  background: transparent !important; color: var(--blue-deep) !important; border: 2px solid var(--gold-deep) !important;
}
.hero #ios-install-hint { color: var(--ink-soft) !important; }

/* ---------- 4. Sections : fond clair, titres dorés centrés ---------- */
section.section { padding: 54px 0; background: var(--lsm-offwhite); }
section.section.alt { border-color: var(--lsm-linen-edge); }
section.section .container { text-align: center; }
section.section h2 {
  font-size: clamp(28px, 6.4vw, 38px); font-weight: 500; color: var(--gold-deep);
  text-align: center; margin-bottom: 12px;
}
section.section p.lead { margin-left: auto; margin-right: auto; text-align: center; color: var(--ink); font-size: 18px; }
.tag { background: none; padding: 0; color: var(--gold-deep); letter-spacing: 0.16em; font-size: 12.5px; }

/* « Qui sommes-nous » : portrait + texte (centré sur téléphone) */
.about .bio { text-align: left; }
@media (max-width: 820px) {
  .about .bio { text-align: center; }
  .about .bio > div[style*="flex"] { justify-content: center; }
  .about .portrait { max-width: 280px; margin: 0 auto; width: 100%; }
}

/* ---------- 5. Caractéristiques : grandes pastilles rondes, titre doré, texte centré ---------- */
.about:not(:has(.portrait)) { grid-template-columns: 1fr; gap: 26px; text-align: center; }
.about:not(:has(.portrait)) .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 14px; max-width: 900px; margin: 6px auto 0;
}
@media (min-width: 900px) {
  .about:not(:has(.portrait)) .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card:has(> .icon) {
  position: relative; background: transparent; border: 0; border-radius: 0; padding: 4px 4px 8px; text-align: center;
}
.card:has(> .icon)::before {
  content: ""; display: block; width: 112px; height: 112px; margin: 0 auto -112px;
  border-radius: 50%; background: var(--blue); box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}
.card > .icon {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 112px; height: 112px; margin: 0 auto 16px; font-size: 46px; line-height: 1;
  filter: brightness(0) invert(1);               /* pictogramme blanc dans la pastille */
}
.card:has(> .icon) h3 { font-size: clamp(20px, 5.4vw, 26px); font-weight: 500; color: var(--gold-deep); margin-bottom: 8px; }
.card:has(> .icon) p { font-size: 17px; color: var(--ink); line-height: 1.55; }
.card.try-card .try-link { color: var(--blue-deep); }
.card.try-card:hover, .card.try-card:focus-visible { box-shadow: none; border-color: transparent; }

/* ---------- 6. Liste « fonctionnalités » (administration) : cadre doré arrondi, lignes centrées ---------- */
.admin-box ul {
  background: #fff; border: 2px solid var(--gold-deep); border-radius: 20px; padding: 6px 18px; text-align: center;
}
.admin-box li { padding: 15px 6px; font-size: 17px; }
.admin-example { background: var(--gold-deep); border-radius: 20px; text-align: center; }

/* ---------- 7. Feuille de route : pastilles bleues ---------- */
.roadmap { text-align: left; max-width: 640px; margin: 0 auto; }

/* ---------- 8. Pied de page sombre ---------- */
footer {
  background: #16130f; color: #e9dcc0; border-top: 0; padding: 34px 22px 42px;
  text-align: center; font-size: 15px;
}
footer a { color: #f6eedb; font-weight: 600; }
footer a:hover { color: #e8c978; }
.lsm-top {
  display: flex; align-items: center; justify-content: center; height: 50px;
  background: var(--gold-deep); color: #fff; text-decoration: none; border-top: 3px solid var(--gold);
}
.lsm-top svg { width: 28px; height: 28px; display: block; }
.lsm-top:hover { background: var(--gold); }

/* ---------- 9. Catalogue : même cadre doré pour la liste gratuite ---------- */
html body .free-list { border: 2px solid var(--gold-deep); border-radius: 20px; overflow: hidden; }
html body .section-title { color: var(--gold-deep); font-weight: 500; text-align: center; font-size: 26px; }
html body .letter.active { background: var(--blue); border-color: var(--blue); color: #fff; }
html body .filter-row input { border-radius: 10px; }


/* ---------- 10. Accueil : diaporama d'affiches, titre court, texte épuré ---------- */
.lsm-carousel {
  position: relative; width: min(100%, 640px); aspect-ratio: 16 / 10; margin: 0 auto 26px;
  border-radius: 10px; overflow: hidden; background: #0b1d3a;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28); touch-action: pan-y;
}
.lsm-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s ease; }
.lsm-slide.on { opacity: 1; }
.lsm-slide { overflow: hidden; background: #0b1d3a; }
/* fond flou de la même image : aucune barre vide, que l'image soit en largeur ou en hauteur */
.lsm-slide::before {
  content: ""; position: absolute; inset: -24px; background: var(--bg) center / cover no-repeat;
  filter: blur(20px) brightness(0.75); transform: scale(1.05);
}
.lsm-slide img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.lsm-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 52px; border: 0; background: rgba(0, 0, 0, 0.32); color: #fff;
  font-size: 30px; line-height: 1; cursor: pointer; padding: 0;
}
.lsm-arrow:hover { background: rgba(0, 0, 0, 0.55); }
.lsm-prev { left: 0; border-radius: 0 8px 8px 0; }
.lsm-next { right: 0; border-radius: 8px 0 0 8px; }
.lsm-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin: -12px 0 22px; }
.lsm-dots button {
  width: 13px; height: 13px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--gold-deep); background: transparent;
}
.lsm-dots button.on { background: var(--gold-deep); }

.hero:has(.actions) .lsm-sub {
  font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 500;
  font-size: clamp(24px, 6.4vw, 34px); color: var(--gold-deep); margin: 0 auto 14px;
}
.hero:has(.actions) h1 { font-size: clamp(34px, 9vw, 58px); margin-bottom: 6px; }
.hero:has(.actions) p {
  font-family: 'Inter', sans-serif; font-style: normal; font-weight: 500;
  font-size: clamp(17px, 4.4vw, 20px); color: var(--ink); max-width: 520px;
}
/* le texte d'origine ne s'affiche pas une seconde avant d'être remplacé */
.hero:has(.actions) h1, .hero:has(.actions) p { opacity: 0; animation: lsmShow 0s 1.6s forwards; }
html.lsm-ready .hero:has(.actions) h1, html.lsm-ready .hero:has(.actions) p { opacity: 1; animation: none; }
@keyframes lsmShow { to { opacity: 1; } }

/* Accueil épuré : on retire ce qui n'intéresse pas le visiteur (présentation de l'administration,
   feuille de route interne, rappel final qui répète les boutons du haut, phrase qui répète les cadres) */
body:has(#quote-poster) section.section:has(.admin-box),
body:has(#quote-poster) section.section:has(.roadmap),
body:has(#quote-poster) .cta-final,
body:has(#quote-poster) .about:not(:has(.portrait)) p.lead { display: none; }

/* ---------- 11. Citation du jour : rectangle compact, texte raccourci ---------- */
.quote-poster {
  max-width: 760px; border-radius: 12px; padding: 22px 24px 18px; text-align: left;
  border: 1px solid rgba(201, 162, 75, 0.45); border-left: 6px solid var(--gold);
}
.quote-poster .quote-mark { font-size: 56px; height: 30px; line-height: 0.95; margin: 0 0 6px; text-align: left; }
html body .quote-poster .quote-text,
html body .quote-poster .quote-text.q-medium,
html body .quote-poster .quote-text.q-long {
  font-size: clamp(17px, 4.4vw, 21px); line-height: 1.5; margin-bottom: 14px; text-align: left;
}
.quote-poster .author-row { justify-content: flex-start; gap: 10px; }
.quote-poster .author-row img { width: 40px; height: 40px; }
.quote-poster .author-name { font-size: 14px; }
.quote-poster .author-role { font-size: 12px; }
.quote-poster .quote-share { justify-content: flex-start !important; margin-top: 14px !important; gap: 8px !important; }
.quote-poster .quote-share .btn { padding: 6px 12px !important; font-size: 12.5px !important; min-height: 0 !important; border-radius: 8px; }

/* ---------- 12. Catalogue, Actualités, Espace d'étude, Livres audio : bandeau bleu animé ---------- */
body:has(#books-grid) > section.hero,
body:has(.nw-wrap) > section.hero,
section.hero.lsm-banner {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  min-height: 170px; padding: 46px 20px !important; border: 0; text-align: center;
  background-color: #1f5386;
  background-image:
    radial-gradient(ellipse at 50% 130%, rgba(255, 255, 255, 0.18), transparent 62%),
    linear-gradient(160deg, #173f69 0%, #1f5386 45%, #2f6fb0 100%);
  background-size: auto;
  color: #fff;
}
/* deux lueurs douces qui dérivent lentement derrière le titre */
body:has(#books-grid) > section.hero::before,
body:has(.nw-wrap) > section.hero,
section.hero.lsm-banner::before,
body:has(#books-grid) > section.hero::after,
body:has(.nw-wrap) > section.hero,
section.hero.lsm-banner::after {
  content: ""; display: block; position: absolute; border-radius: 50%; pointer-events: none;
  width: 280px; height: 280px; filter: blur(34px); opacity: 1; font-size: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%);
}
body:has(#books-grid) > section.hero::before,
body:has(.nw-wrap) > section.hero,
section.hero.lsm-banner::before { left: -70px; top: -110px; animation: lsmDriftA 11s ease-in-out infinite alternate; }
body:has(#books-grid) > section.hero::after,
body:has(.nw-wrap) > section.hero,
section.hero.lsm-banner::after  { right: -80px; bottom: -130px; background: radial-gradient(circle, rgba(201, 162, 75, 0.30), transparent 70%); animation: lsmDriftB 13s ease-in-out infinite alternate; }

body:has(#books-grid) > section.hero p,
body:has(.nw-wrap) > section.hero p { display: none; }

body:has(#books-grid) > section.hero h1,
body:has(.nw-wrap) > section.hero,
section.hero.lsm-banner h1 {
  position: relative; z-index: 1; margin: 0; max-width: 100%;
  color: #fff !important; font-size: clamp(28px, 7.6vw, 50px) !important; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em; line-height: 1.2;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.25);
  animation: lsmEmerge 1.6s cubic-bezier(0.18, 0.7, 0.2, 1) both, lsmFloat 5.5s ease-in-out 1.6s infinite;
}
@keyframes lsmEmerge {
  0%   { opacity: 0; transform: scale(0.6); filter: blur(14px); letter-spacing: 0.5em; }
  60%  { opacity: 1; filter: blur(2px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); letter-spacing: 0.14em; }
}
@keyframes lsmFloat {
  0%, 100% { transform: translateY(0); text-shadow: 0 4px 22px rgba(0, 0, 0, 0.25); }
  50%      { transform: translateY(-7px); text-shadow: 0 12px 28px rgba(0, 0, 0, 0.32); }
}
@keyframes lsmDriftA { to { transform: translate(90px, 60px); } }
@keyframes lsmDriftB { to { transform: translate(-80px, -50px); } }
@media (prefers-reduced-motion: reduce) {
  body:has(#books-grid) > section.hero h1, body:has(.nw-wrap) > section.hero,
section.hero.lsm-banner h1,
  body:has(#books-grid) > section.hero::before, body:has(.nw-wrap) > section.hero,
section.hero.lsm-banner::before,
  body:has(#books-grid) > section.hero::after,  body:has(.nw-wrap) > section.hero,
section.hero.lsm-banner::after { animation: none; }
}

/* Espace d'étude et Livres audio : le texte d'accompagnement reste, et bouge de la même façon */
section.hero.lsm-banner { flex-direction: column; min-height: 200px; }
section.hero.lsm-banner h1 { margin: 0 0 12px !important; }
section.hero.lsm-banner p {
  display: block !important; position: relative; z-index: 1;
  margin: 0 auto !important; max-width: 560px;
  font-family: 'Inter', sans-serif; font-style: normal; font-weight: 400;
  font-size: clamp(15px, 4vw, 18px); line-height: 1.55; color: #e3eefa !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
  animation: lsmEmergeP 1.6s 0.3s cubic-bezier(0.18, 0.7, 0.2, 1) both, lsmFloat 5.5s ease-in-out 1.9s infinite;
}
@keyframes lsmEmergeP {
  0%   { opacity: 0; transform: scale(0.7); filter: blur(10px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) { section.hero.lsm-banner p { animation: none; } }
/* le bandeau s'efface quand on ouvre un livre ou une piste */
body:has(#view-list.hidden) section.hero.lsm-banner { display: none; }

/* ---------- 13. Assistant IA : discussions classées par date, dans un panneau soigné ---------- */
body:has(.chat-layout) .chat-layout {
  grid-template-columns: 310px 1fr; max-width: 1080px; margin: 18px auto;
  height: calc(100dvh - 330px); min-height: 520px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
body:has(.chat-layout) .sidebar {
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  background: #fbf8f1; border-right: 1px solid var(--line);
}
body:has(.chat-layout) .sidebar > #new-convo-btn,
body:has(.chat-layout) .sidebar > #convo-list { display: none !important; }

.lsm-conv { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.lsm-conv-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 4px; }
.lsm-conv-title { font-family: 'Fraunces', Georgia, serif; font-size: 21px; font-weight: 500; color: var(--gold-deep); }
.lsm-conv-close { display: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #efe8d8; color: var(--ink); font-size: 18px; cursor: pointer; }
.lsm-conv-new {
  margin: 10px 14px; padding: 13px 14px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--blue); color: #fff; font: 600 15.5px 'Inter', sans-serif;
}
.lsm-conv-new:hover { background: var(--blue-deep); }
.lsm-conv-search {
  margin: 0 14px 6px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 15px; background: #fff; width: auto;
}
.lsm-conv-list { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 18px; overscroll-behavior: contain; }
.lsm-grp { font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); padding: 16px 10px 6px; }
.lsm-c-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 6px 10px 12px; margin-bottom: 3px;
  border-radius: 12px; border-left: 3px solid transparent; cursor: pointer;
}
.lsm-c-item:hover { background: #f1ebdd; }
.lsm-c-item.active { background: #e8f1fa; border-left-color: var(--blue); }
.lsm-c-main { flex: 1; min-width: 0; }
.lsm-c-title { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lsm-c-time { font-size: 12.5px; color: var(--ink-soft); margin-top: 1px; }
.lsm-c-del { flex: none; border: 0; background: transparent; color: var(--ink-soft); opacity: 0.5; font-size: 15px; padding: 8px; border-radius: 8px; cursor: pointer; }
.lsm-c-del:hover { opacity: 1; background: #fdeaea; color: #a33; }
.lsm-conv-empty { padding: 26px 14px; text-align: center; color: var(--ink-soft); font-size: 14.5px; }
.lsm-chat-top { display: none; }
.lsm-overlay { position: fixed; inset: 0; z-index: 75; background: rgba(0, 0, 0, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
html.lsm-drawer .lsm-overlay { opacity: 1; pointer-events: auto; }
