/* =====================================================================
   Annuaire Littéraire — design beige + mauve, éditorial.
   Polices système (CSP-safe, aucune dépendance externe).
   ===================================================================== */
:root {
  /* Beige (neutres chauds) */
  --beige-50:  #fbf8f1;
  --beige-100: #f6f1e7;
  --beige-200: #ece3d2;
  --beige-300: #ddcfb6;
  --beige-400: #c4b290;
  --beige-500: #a3906c;
  --paper:     #fdfbf5;

  /* Mauve (marque) */
  --mauve-100: #efe9f5;
  --mauve-200: #ddd0ec;
  --mauve-300: #c3aedd;
  --mauve-400: #a081c6;
  --mauve-500: #7d5aa8;
  --mauve-600: #654a8b;  /* primaire */
  --mauve-700: #4f3a6e;
  --mauve-800: #3a2b50;

  /* Encre */
  --ink-900: #241d2b;
  --ink-700: #423a4a;
  --ink-500: #6b6275;
  --ink-300: #9a91a3;

  /* Sémantique */
  --bg: var(--beige-100);
  --surface: var(--paper);
  --surface-2: var(--beige-50);
  --border: var(--beige-300);
  --border-soft: var(--beige-200);
  --fg: var(--ink-900);
  --fg-2: var(--ink-700);
  --fg-3: var(--ink-500);
  --brand: var(--mauve-600);
  --brand-hover: var(--mauve-700);
  --brand-soft: var(--mauve-100);
  --accent: var(--mauve-500);
  --danger: #b3402f;
  --success: #2f7d4f;

  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --r-2: 6px; --r-3: 9px; --r-4: 12px; --r-5: 16px; --r-6: 22px; --r-full: 999px;
  --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;
  --shadow-sm: 0 1px 2px rgba(58,43,80,.06), 0 2px 6px rgba(58,43,80,.05);
  --shadow-md: 0 4px 10px rgba(58,43,80,.08), 0 12px 30px rgba(58,43,80,.10);
  --shadow-lg: 0 10px 28px rgba(58,43,80,.14), 0 30px 60px rgba(58,43,80,.12);
  --ease: cubic-bezier(.22,1,.36,1);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  margin: 0;
  position: relative;
  overflow-x: clip;
  font-family: var(--font-sans);
  color: var(--fg);
  background-color: var(--bg);
  /* Texture papier très discrète (grain en gradients, pas d'image externe) */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(125,90,168,.05), transparent 38%),
    radial-gradient(circle at 85% 8%, rgba(196,178,144,.10), transparent 40%),
    repeating-linear-gradient(0deg, rgba(58,43,80,.012) 0 1px, transparent 1px 4px);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; color: var(--fg); margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-6); }
.skipLink { position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff; padding: 8px 14px; z-index: 999; }
.skipLink:focus { left: 0; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--font-sans); font-weight: 600; font-size: .95rem;
  padding: 11px 20px; border-radius: var(--r-full); border: 1.5px solid transparent;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 15px; font-size: .85rem; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-hover); color: #fff; box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--border); }
.btn-ghost:hover { background: var(--brand-soft); border-color: var(--mauve-300); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.siteHeader {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253,251,245,.86); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.hdr { display: flex; align-items: center; gap: var(--sp-4); padding: 14px var(--sp-6); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--fg); letter-spacing: -.01em; white-space: nowrap; flex: none; }
.brand em { font-style: normal; color: var(--brand); }
.brandMark { color: var(--mauve-400); font-size: 1.1em; transform: translateY(-1px); }
.hdrNav { display: flex; gap: 2px; margin-right: auto; }
.hdrNav a { color: var(--fg-2); font-weight: 500; font-size: .95rem; padding: 8px 11px; border-radius: var(--r-full); transition: .15s; white-space: nowrap; }
.hdrNav a:hover { background: var(--beige-200); color: var(--fg); }
.hdrNav a.is-active { color: var(--brand); background: var(--brand-soft); }
.navCta { display: none; }
.hdrSearch { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--r-full); padding: 8px 14px; color: var(--fg-3); flex: 0 1 230px; min-width: 150px; transition: .2s; }
.hdrSearch:focus-within { border-color: var(--mauve-300); box-shadow: 0 0 0 4px var(--brand-soft); }
.hdrSearch input { border: none; background: transparent; outline: none; font-size: .92rem; color: var(--fg); width: 100%; }
.hdrRight { display: flex; align-items: center; gap: 10px; flex: none; }
.hdrCta { white-space: nowrap; }
.langPick { position: relative; }
.langBtn { background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--r-full); padding: 8px 12px; font-weight: 600; font-size: .8rem; cursor: pointer; color: var(--fg-2); }
.langPop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3); box-shadow: var(--shadow-md); padding: 6px; display: none; min-width: 140px; }
.langPick.is-open .langPop { display: block; }
.langPop a { display: block; padding: 8px 12px; border-radius: var(--r-2); color: var(--fg-2); }
.langPop a:hover, .langPop a.is-active { background: var(--brand-soft); color: var(--brand); }

/* Sélecteur d'UNIVERS (section) — chip discret, séparé du wordmark. */
.sectionPick { position: relative; padding-left: var(--sp-5); border-left: 1px solid var(--border); }
.sectionBtn { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 1px solid var(--border); border-radius: var(--r-full); padding: 6px 11px; font-weight: 600; font-size: .8rem; cursor: pointer; color: var(--fg-2); transition: .15s; white-space: nowrap; }
.sectionBtn:hover { background: var(--beige-200); color: var(--fg); }
.sectionBtnIcon { font-size: .95rem; line-height: 1; }
.sectionBtnLabel { font-weight: 600; }
.sectionBtnCaret { font-size: .95rem; line-height: 1; color: var(--fg-3, var(--fg-2)); }
.sectionPop { position: absolute; left: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3); box-shadow: var(--shadow-md); padding: 8px; display: none; min-width: 240px; z-index: 50; }
.sectionPick.is-open .sectionPop { display: block; }
.sectionPop a { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: var(--r-2); color: var(--fg); border-left: 3px solid transparent; line-height: 1.25; }
.sectionPop a + a { margin-top: 2px; }
.sectionPop a:hover, .sectionPop a.is-active { background: var(--brand-soft); border-left-color: var(--secAccent, var(--brand)); }
.sectionPopIcon { font-size: 1.2rem; line-height: 1; flex: none; }
/* Sélecteur d'univers DANS le menu mobile (le widget du header est masqué <760px). */
.navSections { display: none; }
.hdrNavSearch { display: none; }
.hdrNavSearch input { width: 100%; padding: 11px 16px; border: 1.5px solid var(--border); border-radius: var(--r-full); background: var(--surface-2); font-size: .95rem; color: var(--fg); outline: none; }
.hdrNavSearch input:focus { border-color: var(--mauve-300); box-shadow: 0 0 0 4px var(--brand-soft); }
.navToggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.navToggle span { width: 22px; height: 2px; background: var(--fg); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: var(--sp-16) 0 var(--sp-12); overflow: hidden; }
.heroInner { position: relative; max-width: 760px; }
.heroKicker { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--brand); font-weight: 700; margin-bottom: var(--sp-4); }
.hero h1 { margin-bottom: var(--sp-4); }
.hero h1 .ink { color: var(--brand); font-style: italic; }
.heroLead { font-size: 1.2rem; color: var(--fg-2); max-width: 580px; margin-bottom: var(--sp-6); }
.heroSearch { display: flex; gap: 10px; max-width: 560px; }
.heroSearch input { flex: 1; padding: 15px 22px; border-radius: var(--r-full); border: 1.5px solid var(--border); background: var(--surface); font-size: 1rem; outline: none; }
.heroSearch input:focus { border-color: var(--mauve-300); box-shadow: 0 0 0 4px var(--brand-soft); }

/* ---------- Sections ---------- */
/* padding-block (et non le raccourci `padding … 0`) pour ne pas écraser le
   padding horizontal de .container quand un élément porte .section ET .container. */
.section { padding-block: var(--sp-12); }
.sectionHead { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-8); }
.sectionHead h2 { margin: 0; }
.sectionHead .moreLink { font-weight: 600; font-size: .95rem; white-space: nowrap; }
.sectionLabel { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.ornRule { border: none; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: var(--sp-12) 0; position: relative; }
.ornRule::after { content: "❦"; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: var(--bg); padding: 0 14px; color: var(--mauve-300); }

/* ---------- Hub tiles ---------- */
.hubGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4); }
.hubTile { display: flex; flex-direction: column; gap: 6px; padding: var(--sp-6); background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-5); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; position: relative; overflow: hidden; }
.hubTile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.hubTileIcon { font-size: 1.8rem; color: var(--tile-accent); font-family: var(--font-display); }
.hubTileTitle { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--fg); }
.hubTileTag { font-size: .9rem; color: var(--fg-3); }

/* ---------- Generator cards ---------- */
.genGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-4); }
.genGrid--home { grid-template-columns: repeat(4, 1fr); }
.genCard { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-5); background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-5); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.genCard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--mauve-300); }
.genCardIcon { flex: none; width: 50px; height: 50px; display: grid; place-items: center; font-size: 1.6rem; line-height: 1; border-radius: var(--r-4); background: var(--brand-soft); color: var(--accent); font-family: var(--font-display); }
.genCardBody { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.genCardTitle { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--fg); line-height: 1.2; }
.genCardCta { font-size: .85rem; font-weight: 600; color: var(--accent); opacity: .85; }
@media (max-width: 920px) { .genGrid--home { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .genGrid, .genGrid--home { grid-template-columns: 1fr; } }

/* En-tête de page (index générateurs + générateur solo). */
.pageHead { margin-bottom: var(--sp-8); }
.pageHeadLead { max-width: 680px; font-size: 1.1rem; color: var(--fg-2); margin: var(--sp-3) 0 0; }
.genCatTitle { margin: var(--sp-10) 0 var(--sp-5); }
.emptyState { color: var(--fg-3); }

/* Page générateur solo : la scène des 10 propositions. */
.genStage { margin: var(--sp-6) 0; padding: var(--sp-6) var(--sp-8) var(--sp-8); background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-6); box-shadow: var(--shadow-sm); }
.genStageHead { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; padding-bottom: var(--sp-5); border-bottom: 1px solid var(--border-soft); margin-bottom: var(--sp-4); }
.genStageTitle { margin: 0; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); font-family: inherit; font-weight: 700; }
.genResults { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 var(--sp-8); }
.genResult { font-family: var(--font-display); font-size: 1.5rem; color: var(--mauve-700); padding: var(--sp-3) 0; border-bottom: 1px dashed var(--border); counter-increment: gen; display: flex; align-items: baseline; gap: var(--sp-3); }
.genResult::before { content: counter(gen); font-size: .8rem; font-family: var(--font-sans); color: var(--mauve-300); font-weight: 700; min-width: 1.4em; }
.genResults { counter-reset: gen; }
.genResult--empty { color: var(--fg-3); font-family: inherit; font-size: 1rem; grid-column: 1 / -1; }
.genResult--empty::before { content: ""; min-width: 0; }
/* Clic-pour-copier : la sélection manuelle traversait les deux colonnes et
   embarquait le compteur ::before. On copie au clic à la place. */
.genResult { position: relative; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: color .15s var(--ease); }
.genResult::before { user-select: none; }
.genResult--empty { cursor: default; }
.genResult .genResultName { flex: 1 1 auto; min-width: 0; }
@media (hover: hover) { .genResult:not(.genResult--empty):hover { color: var(--brand); } }
.genResult.is-copied { color: var(--brand); }
.genCopyFlag { position: absolute; right: 0; top: 50%; font-family: var(--font-sans); font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: #fff; background: var(--brand); padding: 2px 9px; border-radius: var(--r-full); box-shadow: var(--shadow-sm); pointer-events: none; white-space: nowrap; opacity: 0; transform: translateY(calc(-50% + 2px)); transition: opacity .15s var(--ease), transform .15s var(--ease); }
.genResult.is-copied .genCopyFlag { opacity: 1; transform: translateY(-50%); }
@media (max-width: 620px) { .genResults { grid-template-columns: 1fr; } .genResult { font-size: 1.3rem; } }

/* Accueil : on resserre l'écart entre les sections. */
body[data-route="home"] .section { padding-block: var(--sp-8); }
body[data-route="home"] .ornRule { margin: var(--sp-6) 0; }

/* ---------- Card grid ---------- */
.cardGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-5); }
.cardGridAd { grid-column: 1 / -1; }
.card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-5); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card--premium { border-color: var(--mauve-300); box-shadow: 0 0 0 1px var(--mauve-200), var(--shadow-sm); }
.cardShot { position: relative; display: block; aspect-ratio: 16/10; background: var(--beige-200); overflow: hidden; }
.cardShot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .cardShot img { transform: scale(1.05); }
.cardShotPlaceholder { display: flex; align-items: center; justify-content: center; height: 100%; font-family: var(--font-display); font-size: 3rem; color: var(--mauve-300); }
.cardBadge { position: absolute; top: 10px; left: 10px; background: var(--mauve-600); color: #fff; font-size: .7rem; font-weight: 700; padding: 4px 9px; border-radius: var(--r-full); }
.cardBody { padding: var(--sp-4); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cardTitle { font-size: 1.15rem; margin: 0; }
.cardTitle a { color: var(--fg); }
.cardTitle a:hover { color: var(--brand); }
.cardDomain { font-size: .8rem; color: var(--fg-3); font-family: var(--font-mono); }
.cardDesc { font-size: .9rem; color: var(--fg-2); margin: 0; flex: 1; }
.cardTags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: .72rem; background: var(--beige-200); color: var(--fg-2); padding: 3px 9px; border-radius: var(--r-full); text-decoration: none; transition: background .15s var(--ease), color .15s; }
a.tag:hover { background: var(--brand-soft); color: var(--brand); }
.tagChecks { display: flex; flex-wrap: wrap; gap: 8px; }
.tagCheck { display: inline-flex; align-items: center; font-size: .9rem; line-height: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-full); padding: 9px 16px; cursor: pointer; user-select: none; transition: background .15s var(--ease), border-color .15s, color .15s; }
.tagCheck[hidden] { display: none; }
.tagCheck input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.tagCheck:hover { border-color: var(--mauve-400); }
.tagCheck:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.cropWrap { margin-top: 10px; }
.cropCanvas { display: block; max-width: 220px; width: 100%; height: auto; border-radius: var(--r-3); border: 1px solid var(--border); cursor: grab; touch-action: none; background: var(--beige-200); }
.cropCanvas:active { cursor: grabbing; }
.cropZoom { display: block; width: 220px; max-width: 100%; margin: 10px 0 4px; accent-color: var(--brand); }
.cropHint { font-size: .82rem; margin: 0; }
.blogFilter { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--sp-6) 0 0; }
.blogFilter a { padding: 7px 16px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--border); color: var(--fg-2); font-weight: 600; font-size: .9rem; transition: .15s; }
.blogFilter a:hover { border-color: var(--mauve-300); color: var(--brand); }
.blogFilter a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.cardCta { margin-top: 4px; align-self: flex-start; }

/* ---------- List header (catégorie) ---------- */
.listHead { display: flex; align-items: baseline; gap: 12px; margin: var(--sp-8) 0 var(--sp-5); flex-wrap: wrap; }
.listHead h2 { margin: 0; }
.listCount { color: var(--brand); font-family: var(--font-display); font-size: 1.4rem; }
.listUpdated { font-size: .82rem; color: var(--fg-3); }
.listSort { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.listSort label { font-size: .82rem; color: var(--fg-3); }
.listSort select { appearance: none; -webkit-appearance: none; -moz-appearance: none; padding: 6px 34px 6px 14px; border: 1px solid var(--border); border-radius: var(--r-full); background-color: var(--surface); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23736b7a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; color: var(--fg); font: inherit; font-size: .85rem; cursor: pointer; }

/* ---------- Ads ---------- */
.adBanner, .cardGridAd { margin: var(--sp-6) 0; }
.adSlot { display: flex; align-items: center; justify-content: center; min-height: 90px; background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--r-4); padding: 10px; overflow: hidden; }
.adSlot--house, .adSlot--affiliate { border-style: solid; }
.adSlot a { display: block; line-height: 0; }
.adSlot img { border-radius: var(--r-3); max-width: 100%; height: auto; display: block; }

/* ---------- Prose / SEO text ---------- */
.prose { max-width: 760px; font-size: 1.05rem; color: var(--fg-2); }
.prose h2, .prose h3 { color: var(--fg); margin-top: 1.4em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.bannerBox { background: var(--surface); border: 1px solid var(--border-soft); border-left: 4px solid var(--brand); border-radius: var(--r-4); padding: var(--sp-6); box-shadow: var(--shadow-sm); }

/* ---------- Novels ---------- */
.novelGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--sp-6); }
.novelCard { display: flex; flex-direction: column; gap: 10px; }
.novelCover { aspect-ratio: 2/3; border-radius: var(--r-3); overflow: hidden; background: var(--mauve-100); box-shadow: var(--shadow-md); display: block; transition: transform .25s var(--ease); }
.novelCard:hover .novelCover { transform: translateY(-5px) rotate(-1deg); }
.novelCover img { width: 100%; height: 100%; object-fit: cover; }
.novelCoverFallback { display: flex; align-items: center; justify-content: center; height: 100%; font-family: var(--font-display); font-size: 3rem; color: var(--mauve-400); }
.novelMeta h3 { font-size: 1.05rem; margin: 0; }
.novelAuthor { color: var(--fg-3); font-size: .88rem; }
.novelDate { font-size: .82rem; color: var(--brand); font-weight: 600; }

/* ---------- Forms ---------- */
.formCard { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-5); padding: var(--sp-8); box-shadow: var(--shadow-sm); max-width: 640px; }
.field { margin-bottom: var(--sp-5); }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--fg); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 15px; border: 1.5px solid var(--border); border-radius: var(--r-3);
  background: var(--surface-2); font-size: .95rem; font-family: inherit; color: var(--fg); outline: none; transition: .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--mauve-300); box-shadow: 0 0 0 4px var(--brand-soft); background: var(--surface); }
.field .hint { font-size: .8rem; color: var(--fg-3); margin-top: 5px; }
.field--honey { position: absolute; left: -9999px; }
/* Case à cocher en ligne (ex. acceptation du règlement). */
.field--check { margin-bottom: var(--sp-5); }
/* Sélecteur préfixé par .field--check : sinon `.field label { display:block }`
   (plus spécifique que `.checkLine`) écrase le flex et le texte retombe sous la
   case au lieu d'être centré dessus. */
.field--check .checkLine { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: .92rem; line-height: 1.4; color: var(--fg-2); cursor: pointer; margin: 0; }
.field--check .checkLine input[type="checkbox"] { width: 18px; height: 18px; padding: 0; margin: 0; flex: none; border: 0; border-radius: 0; background: none; accent-color: var(--brand); cursor: pointer; }
.field--check .checkLine a { color: var(--brand); font-weight: 600; }
/* Encadré informatif (rappel, aide, renvoi vers une autre page). */
.callout { border: 1px solid var(--border); border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: var(--r-3); padding: 16px 20px; margin-bottom: var(--sp-5); font-size: .92rem; line-height: 1.55; color: var(--fg-2); }
.callout a { color: var(--brand); font-weight: 600; }
.callout--info { border-left-color: var(--mauve-400, var(--brand)); max-width: 640px; }
/* Aligné sur la largeur du texte de la page (.prose) pour ne pas déborder à droite. */
.callout--promo { background: var(--brand-soft); border-color: var(--mauve-300, var(--brand)); border-left-width: 3px; max-width: 760px; margin: var(--sp-6) 0; padding: 18px 22px; }
.callout strong { color: var(--fg); margin-right: 4px; }
.flash { padding: 14px 18px; border-radius: var(--r-3); margin-bottom: var(--sp-5); font-weight: 500; max-width: 640px; }
.flash--ok { background: #e8f5ed; color: var(--success); border: 1px solid #bfe3cd; }
.flash--err { background: #fbeae7; color: var(--danger); border: 1px solid #f0cabf; }

/* ---------- Comments ---------- */
.comments { max-width: 760px; margin-top: var(--sp-8); }
.comment { padding: var(--sp-5); background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-4); margin-bottom: var(--sp-4); }
.comment--reply { margin-left: var(--sp-8); border-left: 3px solid var(--mauve-200); }
.commentHead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.commentAvatar { width: 36px; height: 36px; border-radius: var(--r-full); background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display); }
.commentName { font-weight: 600; }
.commentDate { font-size: .8rem; color: var(--fg-3); }
.commentBody { color: var(--fg-2); }
.commentActions { display: flex; gap: 14px; margin-top: 8px; font-size: .85rem; }
.commentActions button { background: none; border: none; color: var(--fg-3); cursor: pointer; font-size: .85rem; padding: 0; }
.commentActions button:hover { color: var(--brand); }

/* ---------- Footer ---------- */
.siteFooter { margin-top: var(--sp-16); background: var(--mauve-800); color: var(--beige-200); padding: var(--sp-12) 0 var(--sp-6); }
.footGrid { display: flex; flex-wrap: wrap; gap: var(--sp-8); align-items: start; }
.footBrand { flex: 2 1 320px; }
.footCol { flex: 1 1 150px; }
.footBrand .brand { color: #fff; margin-bottom: 10px; }
.footBrand em { color: var(--mauve-300); }
.footBrand p { color: var(--mauve-200); opacity: .85; max-width: 420px; line-height: 1.6; }
.footCol h2 { color: #fff; font-family: var(--font-sans); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 12px; }
.footCol a { display: block; color: var(--mauve-200); padding: 5px 0; }
.footCol a:hover { color: #fff; }
.footBar { display: flex; justify-content: space-between; align-items: center; margin-top: var(--sp-10); padding-top: var(--sp-6); border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: var(--mauve-300); }
.footOrn { letter-spacing: 6px; color: var(--mauve-400); }

/* ---------- Reveal animation (anti-flicker) ----------
   Visible par défaut (sûr sans JS / SEO). L'état caché n'est posé QUE si JS est
   actif, via la classe `reveal-on` ajoutée dans <head> AVANT le 1er paint —
   donc pas de flash « visible→caché→révélé ». GSAP anime ensuite vers visible. */
.reveal { opacity: 1; transform: none; }
.reveal-on .reveal { opacity: 0; transform: translateY(22px); }
@media (prefers-reduced-motion: reduce) { .reveal-on .reveal { opacity: 1; transform: none; } }

/* Hero : pré-état posé AVANT le paint (évite le flash visible→caché→révélé que
   provoquait gsap.from sur des éléments non cachés). Le <h1> (élément LCP
   probable) garde son opacité — on ne le cache JAMAIS, on ne fait qu'un léger
   glissé — pour ne pas dégrader le LCP/SEO. Les autres font un fondu+glissé. */
.reveal-on .hero .heroKicker,
.reveal-on .hero .heroLead,
.reveal-on .hero .heroSearch { opacity: 0; transform: translateY(16px); }
.reveal-on .hero h1 { transform: translateY(18px); }
@media (prefers-reduced-motion: reduce) {
  .reveal-on .hero .heroKicker, .reveal-on .hero h1,
  .reveal-on .hero .heroLead, .reveal-on .hero .heroSearch { opacity: 1; transform: none; }
}

/* ---------- Cards taxonomie (catégorie / tag) : image de fond, pas d'icône ni de barre ---------- */
.taxoGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); margin: var(--sp-6) 0 var(--sp-8); }
.taxoCard { position: relative; display: flex; align-items: flex-end; min-height: 150px; border-radius: var(--r-5); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--mauve-100); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s; }
.taxoCard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.taxoCardImg { position: absolute; inset: 0; background-size: cover; background-position: center; background-color: var(--mauve-200); transition: transform .4s var(--ease); }
.taxoCard:hover .taxoCardImg { transform: scale(1.06); }
.taxoCardOverlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(36,29,43,0) 35%, rgba(36,29,43,.78) 100%); }
.taxoCardBody { position: relative; padding: var(--sp-4); width: 100%; }
.taxoCardTitle { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: #fff; line-height: 1.1; }
.taxoCardSub { display: block; font-size: .82rem; color: rgba(255,255,255,.85); margin-top: 3px; }
@media (max-width: 900px) { .taxoGrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .taxoGrid { grid-template-columns: 1fr; } }

/* Rang horizontal de tags (optionnel). */
.taxoRow { display: flex; gap: var(--sp-4); overflow-x: auto; padding: 4px 4px var(--sp-4); margin: var(--sp-5) 0 var(--sp-8); scroll-snap-type: x proximity; scrollbar-width: thin; }
.taxoRow .taxoCard { flex: 0 0 248px; scroll-snap-align: start; }
@media (max-width: 520px) { .taxoRow .taxoCard { flex-basis: 80%; } }

/* Hub SEO : tags groupés par dimension (« Par territoire », « Par genre »…). */
.tagDimension { margin: var(--sp-10) 0; }
.tagDimension h2 { margin-bottom: var(--sp-3); }
.dimensionIntro { max-width: 72ch; margin: 0 0 var(--sp-2); color: var(--muted); }
.dimensionIntro + .taxoGrid { margin-top: var(--sp-4); }
.tagList { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tagList a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-full); color: var(--fg); font-weight: 600; font-size: .95rem; box-shadow: var(--shadow-sm); transition: transform .15s var(--ease), background .15s, border-color .15s; }
.tagList a:hover { background: var(--brand-soft); border-color: var(--mauve-300); color: var(--brand); transform: translateY(-2px); }
.tagCount { background: var(--brand-soft); color: var(--brand); border-radius: var(--r-full); font-size: .78rem; padding: 1px 8px; font-weight: 700; }

/* Grosse feuille ❦ en haut à droite, sur TOUTES les pages (derrière le contenu). */
.pageOrnament { position: absolute; right: -12px; top: 88px; font-family: var(--font-display); font-size: 14rem; line-height: 1; color: var(--mauve-200); opacity: .5; pointer-events: none; z-index: -1; user-select: none; }
@media (max-width: 760px) { .pageOrnament { display: none; } }

/* ---------- Detail page (site) ---------- */
.detailHero { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--sp-8); align-items: start; margin: var(--sp-8) 0; }
.detailHero--cover { grid-template-columns: 300px 1fr; }
.bookFacts { list-style: none; padding: 0; margin: var(--sp-4) 0 0; display: grid; gap: 7px; color: var(--fg-2); }
.bookFacts i { color: var(--mauve-400); width: 1.1em; text-align: center; }
.bookGenres { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-4); }

/* Couverture de la fiche + overlay « Épingler sur Pinterest ». */
.novelCover--detail { position: relative; box-shadow: var(--shadow-md); }
.pinOverlay { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 14px; border-radius: inherit; text-decoration: none; opacity: 0; transition: opacity .2s var(--ease); background: linear-gradient(to top, rgba(40,28,60,.6), transparent 55%); }
.novelCover--detail:hover .pinOverlay, .pinOverlay:focus-visible, .pinOverlay:focus-within { opacity: 1; }
.pinOverlayBtn { display: inline-flex; align-items: center; gap: 7px; background: #e60023; color: #fff; font-weight: 600; font-size: .9rem; padding: 9px 16px; border-radius: var(--r-full); box-shadow: var(--shadow-md); }
@media (hover: none) { .pinOverlay { opacity: 1; background: linear-gradient(to top, rgba(40,28,60,.5), transparent 62%); } }

/* Badge de statut sur les couvertures. */
.novelCover { position: relative; }
.novelBadge { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: var(--r-full); color: #fff; box-shadow: var(--shadow-sm); }
.novelBadge--soon { background: var(--mauve-500); }
.novelBadge--week { background: #c8893b; }
.novelBadge--out { background: #717684; }

/* Barre filtre (genres) + tri des listes de livres. */
.booksBar { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-6); }
.genreChips { display: flex; flex-wrap: wrap; gap: 8px; }
.genreChip { display: inline-block; padding: 6px 13px; border-radius: var(--r-full); border: 1.5px solid var(--border); background: var(--surface); color: var(--fg-2); font-size: .88rem; font-weight: 600; transition: .15s; }
.genreChip:hover { border-color: var(--mauve-300); color: var(--brand); background: var(--brand-soft); }
.genreChip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.booksSort { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--fg-3); white-space: nowrap; }
.booksSort select { appearance: none; -webkit-appearance: none; -moz-appearance: none; padding: 8px 34px 8px 14px; border-radius: var(--r-full); border: 1.5px solid var(--border); background-color: var(--surface); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23736b7a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; font: inherit; color: var(--fg); cursor: pointer; }

/* Boutons de partage (fiche livre). */
.shareRow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: var(--sp-5); }
.shareLabel { font-size: .85rem; color: var(--fg-3); font-weight: 600; }
.shareBtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: var(--r-full); font-size: .85rem; font-weight: 600; line-height: 1; color: #fff; transition: .15s; }
.shareBtn i { display: inline-block; width: 1.1em; font-size: 1.05em; line-height: 1; text-align: center; }
.shareBtn:hover { color: #fff; opacity: .92; transform: translateY(-1px); }
.shareBtn--pin { background: #e60023; }
.shareBtn--fb { background: #1877f2; }
.shareBtn--x { background: #111; }
.formSectionLabel { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--fg); margin: var(--sp-5) 0 var(--sp-3); padding-bottom: 6px; border-bottom: 1px solid var(--border-soft); }
.formSectionLabel:first-child { margin-top: 0; }
.shareBtn--wa { background: #25d366; }
.shareBtn--li { background: #0a66c2; }
.shareBtn--mail { background: #6b7280; }

/* Article (post) : en-tête, méta, couverture. */
.postHead { margin-bottom: var(--sp-5); }
.postMeta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--fg-3); font-size: .9rem; margin: var(--sp-3) 0 0; }
.postMeta span { display: inline-flex; align-items: center; gap: 6px; }
.postMeta i { color: var(--mauve-400); }
.postCover { width: 100%; border-radius: var(--r-5); margin: var(--sp-6) 0; box-shadow: var(--shadow-md); }
.postBody { font-size: 1.08rem; }

/* Carte « à la une » du blog. */
.postFeature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-6); overflow: hidden; box-shadow: var(--shadow-sm); margin-top: var(--sp-8); transition: transform .2s var(--ease), box-shadow .2s; }
.postFeature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.postFeatureShot { background: var(--beige-200); min-height: 240px; }
.postFeatureShot img { width: 100%; height: 100%; object-fit: cover; }
.postFeatureBody { padding: var(--sp-8); display: flex; flex-direction: column; gap: var(--sp-3); justify-content: center; }
.postFeatureTitle { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; line-height: 1.15; color: var(--fg); }
.postFeatureExcerpt { color: var(--fg-2); }
@media (max-width: 700px) { .postFeature { grid-template-columns: 1fr; } .postFeatureShot { min-height: 180px; } .postFeatureBody { padding: var(--sp-6); } .postFeatureTitle { font-size: 1.4rem; } }
.detailShot { border-radius: var(--r-5); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-md); background: var(--beige-200); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .85rem; color: var(--fg-3); margin: var(--sp-4) 0 var(--sp-8); }
.breadcrumb a { color: var(--fg-3); text-decoration: none; border-radius: var(--r-2); transition: color .15s; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumbSep { color: var(--mauve-300); user-select: none; }
.breadcrumbCurrent { color: var(--fg-2); font-weight: 600; }

/* ---------- Démo embarquée (blog) ---------- */
.demoEmbed { margin: var(--sp-6) 0; }

/* ---------- Pagination ---------- */
.pager { display: flex; align-items: center; gap: 8px; justify-content: center; margin: var(--sp-12) 0; flex-wrap: wrap; }
.pagerNums { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0; }
.pagerBtn, .pagerNum { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 14px; border-radius: var(--r-full); border: 1.5px solid var(--border); background: var(--surface); color: var(--fg-2); font-weight: 600; font-size: .92rem; text-decoration: none; transition: .15s; }
a.pagerBtn:hover, a.pagerNum:hover { background: var(--brand-soft); border-color: var(--mauve-300); color: var(--brand); }
.pagerNum.is-current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagerBtn.is-disabled { opacity: .4; cursor: default; }
.pagerGap { display: inline-flex; align-items: center; padding: 0 4px; color: var(--fg-3); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .detailHero, .detailHero--cover { grid-template-columns: 1fr; gap: var(--sp-6); }
  .footGrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .navToggle { display: flex; order: 3; margin-left: auto; }
  .hdrNav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: var(--sp-4); box-shadow: var(--shadow-md); }
  .hdrNav.is-open { display: flex; }
  .hdrNav a { padding: 11px 13px; }
  .hdrSearch { display: none; }
  .hdrCta { display: none; }
  .hdrNavSearch { display: block; margin-top: 8px; }
  .hdrNav .navCta { display: block; margin-top: 6px; background: var(--brand); color: #fff; text-align: center; font-weight: 600; border-radius: var(--r-full); padding: 11px 14px; }
  .hdrNav .navCta:hover { background: var(--mauve-700); color: #fff; }
  /* Header mobile : barre plus haute et plus lisible. */
  .hdr { gap: var(--sp-4); padding: 18px var(--sp-5); min-height: 68px; }
  .brand { font-size: 1.35rem; }
  .hdrRight { gap: 10px; }
  /* L'univers passe DANS le menu : on masque le widget du header. */
  .sectionPick { display: none; }
  .navSections { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
  .navSectionsLabel { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); font-weight: 700; padding: 4px 13px; }
  .navSectionLink { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: var(--r-2); border-left: 3px solid transparent; color: var(--fg-2); }
  .navSectionLink:hover { background: var(--beige-200); color: var(--fg); }
  .navSectionLink.is-active { background: var(--brand-soft); border-left-color: var(--secAccent, var(--brand)); color: var(--brand); }
  .navSectionLink .sectionPopIcon { font-size: 1.1rem; }
  .navToggle { padding: 10px; margin-left: auto; }
  .navToggle span { width: 26px; height: 2.5px; }
  .hero { padding: var(--sp-10) 0 var(--sp-8); }
  .footGrid { grid-template-columns: 1fr; gap: var(--sp-6); }
}
/* Tablette/petit desktop : on resserre la grille des œuvres. */
@media (max-width: 640px) {
  .novelGrid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
  .genStage { padding: var(--sp-5); }
  .genStageHead { gap: var(--sp-3); }
  /* En-tête de section : on empile titre + lien pour que le titre garde
     toute la largeur (sinon « Générateurs de noms » passe sur deux lignes). */
  .sectionHead { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
  /* Le saut de ligne du titre du hero (nl2br) gêne en mobile : on le supprime. */
  .hero h1 br { display: none; }
}
/* Petits téléphones : padding, hero et recherche adaptés. */
@media (max-width: 480px) {
  .container { padding: 0 var(--sp-5); }
  .section { padding-block: var(--sp-8); }
  .hdr { padding: 16px var(--sp-5); }
  .hero { padding: var(--sp-8) 0 var(--sp-6); }
  .heroLead { font-size: 1.05rem; }
  .heroSearch { flex-direction: column; gap: 8px; }
  .heroSearch input, .heroSearch .btn { width: 100%; }
  .heroSearch .btn { justify-content: center; }
  /* Sélecteur d'univers compact : on garde l'icône, on masque le libellé. */
  .sectionPick { padding-left: var(--sp-3); }
  .sectionBtnLabel { display: none; }
  .brand { font-size: 1.25rem; }
}

/* ============================ Newsletter (à paraître) =================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Bandeau compact : icône + accroche à gauche, formulaire à droite, sur un
   fond marque doux. */
.nlBand {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-8); flex-wrap: wrap;
  background: linear-gradient(135deg, var(--brand-soft), var(--surface-2));
  border: 1px solid var(--border-soft); border-radius: var(--r-6);
  padding: var(--sp-6) var(--sp-8); box-shadow: var(--shadow-sm);
}
.nlBandLeft { display: flex; align-items: center; gap: 18px; min-width: 0; }
.nlBandIcon {
  width: 54px; height: 54px; flex: none; display: grid; place-items: center;
  background: var(--surface); border-radius: 15px; box-shadow: var(--shadow-sm); color: var(--brand);
}
.nlBandCopy h2 { font-family: var(--font-display); margin: 0; font-size: 1.45rem; line-height: 1.12; }
.nlBandCopy p { margin: 4px 0 0; color: var(--fg-2); font-size: .95rem; line-height: 1.5; }
.nlBandAside { display: flex; flex-direction: column; gap: 8px; flex: none; min-width: 0; }
.nlForm { display: flex; gap: 10px; }
.nlForm input[type="email"] {
  width: 240px; min-width: 0; padding: 14px 20px; border-radius: var(--r-full);
  border: 1.5px solid var(--border); background: var(--surface);
  font-family: inherit; font-size: 1rem; color: var(--fg); outline: none; transition: .2s;
}
.nlForm input[type="email"]:focus { border-color: var(--mauve-300); box-shadow: 0 0 0 4px var(--brand-soft); }
.nlForm .btn { border-radius: var(--r-full); white-space: nowrap; padding: 14px 26px; }
.nlBand .flash { margin: 0; }
@media (max-width: 760px) {
  .nlBand { flex-direction: column; align-items: stretch; gap: var(--sp-5); padding: var(--sp-6); }
  .nlBandAside { width: 100%; }
  .nlForm { flex-direction: column; }
  .nlForm input[type="email"] { width: auto; }
  .nlForm .btn { justify-content: center; }
}
