/*
Theme Name: Livres en Ligne — Bibliothèque Claire Premium
Theme URI: https://example.com
Author: Encre & Pixels
Description: Thème WordPress clair, doux et accessible avec élégance éditoriale premium pour une bibliothèque de livres en ligne.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: livres-en-ligne
*/

:root {
  --lep-bg: #fbf7ef;
  --lep-bg-soft: #fffdf8;
  --lep-cream: #f5ecdf;
  --lep-cream-2: #efe1cc;
  --lep-ink: #13233b;
  --lep-text: #3f4856;
  --lep-muted: #766e64;
  --lep-light-muted: #9b9287;
  --lep-gold: #c59a3d;
  --lep-gold-dark: #9f7627;
  --lep-gold-soft: rgba(197, 154, 61, 0.14);
  --lep-blue: #1e3a5f;
  --lep-blue-soft: #e9f0f7;
  --lep-sage: #819765;
  --lep-sage-soft: #edf3e6;
  --lep-rose-soft: #f6e9e1;
  --lep-border: rgba(19, 35, 59, 0.12);
  --lep-border-soft: rgba(19, 35, 59, 0.08);
  --lep-shadow: 0 22px 60px rgba(58, 47, 35, 0.11);
  --lep-shadow-soft: 0 12px 32px rgba(58, 47, 35, 0.08);
  --lep-radius: 24px;
  --lep-radius-lg: 34px;
  --lep-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 10% -10%, rgba(197, 154, 61, .12), transparent 30%),
    radial-gradient(circle at 90% 0%, rgba(30, 58, 95, .08), transparent 32%),
    var(--lep-bg);
  color: var(--lep-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
body.admin-bar .lep-site-header { top: 32px; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
svg { width: 1.08em; height: 1.08em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.lep-wrap { width: min(var(--lep-max), calc(100% - 40px)); margin: 0 auto; }

.lep-site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--lep-border-soft);
}
.lep-nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.lep-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--lep-ink); min-width: max-content; }
.lep-brand-icon {
  width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center;
  color: var(--lep-blue); background: linear-gradient(135deg, #ffffff, #f4eadb);
  border: 1px solid var(--lep-border-soft); box-shadow: 0 10px 24px rgba(30,58,95,.08);
}
.lep-brand-icon svg { width: 27px; height: 27px; stroke-width: 1.55; }
.lep-brand-text { display: grid; line-height: 1.15; }
.lep-brand-text strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; letter-spacing: .02em; color: var(--lep-ink); }
.lep-brand-text small { color: var(--lep-gold-dark); font-size: .76rem; font-weight: 700; letter-spacing: .02em; }
.lep-primary-nav { margin-left: auto; }
.lep-menu { list-style: none; display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; }
.lep-menu a {
  color: rgba(19, 35, 59, .84); font-size: .95rem; font-weight: 800; letter-spacing: .02em; position: relative;
}
.lep-menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 2px; background: var(--lep-gold); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.lep-menu a:hover { color: var(--lep-blue); }
.lep-menu a:hover::after { transform: scaleX(1); }
.lep-menu-toggle { display: none; border: 1px solid var(--lep-border); background: var(--lep-bg-soft); color: var(--lep-ink); border-radius: 14px; width: 46px; height: 46px; font-size: 1.3rem; cursor: pointer; }

.lep-main { padding-bottom: 90px; }
.lep-hero-shell {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,253,248,.98) 0%, rgba(255,253,248,.92) 45%, rgba(245,236,223,.76) 100%);
  border-bottom: 1px solid var(--lep-border-soft);
}
.lep-hero-shell::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,253,248,.96), rgba(255,253,248,.64) 48%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.lep-hero { position: relative; z-index: 1; min-height: 520px; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1fr); gap: 50px; align-items: center; padding: 72px 0 54px; }
.lep-hero-content { max-width: 640px; }
.lep-eyebrow { color: var(--lep-gold-dark); text-transform: uppercase; letter-spacing: .16em; font-weight: 900; font-size: .76rem; margin: 0 0 16px; }
.lep-hero h1,
.lep-section-heading h2,
.lep-section-side-heading h2,
.lep-editorial-panel h2,
.lep-book-hero h1,
.lep-archive-title {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--lep-ink);
  letter-spacing: -.04em;
  line-height: 1.04;
  margin: 0;
}
.lep-hero h1 { font-size: clamp(2.45rem, 4.7vw, 5.25rem); max-width: 740px; }
.lep-hero h1::after,
.lep-section-heading h2::after,
.lep-archive-title::after { content: ""; display: block; width: 56px; height: 2px; background: var(--lep-gold); margin-top: 20px; }
.lep-section-heading-center h2::after { margin-left: auto; margin-right: auto; }
.lep-hero-text { color: var(--lep-text); font-size: 1.08rem; max-width: 560px; margin: 24px 0 30px; }
.lep-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.lep-button,
.lep-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 0 22px;
  border-radius: 999px; font-weight: 900; border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.lep-button:hover,
.lep-submit:hover { transform: translateY(-2px); }
.lep-button svg { width: 20px; height: 20px; }
.lep-button-primary, .lep-submit { background: var(--lep-blue); color: #fff; box-shadow: 0 14px 32px rgba(30,58,95,.18); }
.lep-button-primary:hover, .lep-submit:hover { background: #152b48; }
.lep-button-secondary { border-color: rgba(197,154,61,.45); color: var(--lep-ink); background: rgba(255,253,248,.74); }
.lep-button-secondary:hover { border-color: var(--lep-gold); background: #fff; box-shadow: var(--lep-shadow-soft); }
.lep-button-amazon { background: #111; color: #fff; }
.lep-button-payhip { background: #3f75c4; color: #fff; }
.lep-hero-visual { align-self: stretch; min-height: 360px; display: flex; align-items: center; justify-content: center; }
.lep-hero-visual img { width: min(690px, 100%); filter: drop-shadow(0 24px 42px rgba(68, 54, 36, .16)); }

.lep-trust-strip {
  margin-top: -28px; position: relative; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,253,248,.94); border: 1px solid var(--lep-border-soft); border-radius: 22px;
  box-shadow: var(--lep-shadow); overflow: hidden;
}
.lep-trust-strip article { display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px; border-right: 1px solid var(--lep-border-soft); }
.lep-trust-strip article:last-child { border-right: 0; }
.lep-trust-strip span:first-child { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; color: var(--lep-gold-dark); background: var(--lep-gold-soft); }
.lep-trust-strip span:first-child svg { width: 24px; height: 24px; }
.lep-kdp-icon { font-family: Georgia, serif; font-weight: 900; font-size: 1.1rem; color: var(--lep-gold-dark); }
.lep-trust-strip h2 { font-family: Georgia, serif; color: var(--lep-ink); font-size: 1.05rem; margin: 0 0 4px; }
.lep-trust-strip p { margin: 0; color: var(--lep-muted); font-size: .92rem; line-height: 1.45; }

.lep-section { margin: 76px auto 0; }
.lep-section-heading { max-width: 760px; margin-bottom: 32px; }
.lep-section-heading-center { margin-left: auto; margin-right: auto; text-align: center; }
.lep-section-heading h2,
.lep-section-side-heading h2,
.lep-editorial-panel h2 { font-size: clamp(2rem, 3.4vw, 3.35rem); }
.lep-section-heading p,
.lep-section-side-heading p,
.lep-editorial-panel p { color: var(--lep-muted); margin: 16px 0 0; }
.lep-section-side-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.lep-section-side-heading > div { max-width: 640px; }
.lep-text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--lep-gold-dark); font-weight: 900; white-space: nowrap; }
.lep-text-link svg { width: 18px; height: 18px; }

.lep-category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.lep-category-card {
  position: relative; overflow: hidden; min-height: 180px; border-radius: var(--lep-radius); padding: 28px;
  background: var(--lep-bg-soft); border: 1px solid var(--lep-border-soft); box-shadow: var(--lep-shadow-soft);
}
.lep-category-card::after { content: ""; position: absolute; inset: auto -20px -30px auto; width: 210px; height: 160px; opacity: .46; background: radial-gradient(circle, #fff, transparent 70%); }
.lep-category-card-personal { background: linear-gradient(135deg, #fffdf8, #edf3e6); }
.lep-category-card-pro { background: linear-gradient(135deg, #fffdf8, #e9f0f7); }
.lep-category-card-diverse { background: linear-gradient(135deg, #fffdf8, #f6e9e1); }
.lep-category-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: var(--lep-gold-dark); background: rgba(255,253,248,.85); border: 1px solid rgba(197,154,61,.22); margin-bottom: 20px; }
.lep-category-icon svg { width: 28px; height: 28px; }
.lep-category-card h3 { font-family: Georgia, serif; font-size: 1.85rem; color: var(--lep-ink); margin: 0 0 8px; }
.lep-category-card p { color: var(--lep-text); margin: 0 0 20px; max-width: 400px; }
.lep-category-card a { display: inline-flex; align-items: center; gap: 8px; color: var(--lep-gold-dark); font-weight: 900; }
.lep-category-card a svg { width: 17px; height: 17px; }

.lep-books-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.lep-books-grid-home { grid-template-columns: repeat(6, 1fr); align-items: stretch; overflow: visible; }
.lep-books-grid-home .lep-book-card { grid-column: span 2; }
.lep-book-card {
  background: rgba(255,253,248,.94); border: 1px solid var(--lep-border-soft); border-radius: 22px;
  overflow: hidden; box-shadow: var(--lep-shadow-soft); display: flex; flex-direction: column; min-width: 0;
  transition: transform .18s ease, box-shadow .18s ease;
}
.lep-book-card:hover { transform: translateY(-4px); box-shadow: var(--lep-shadow); }
.lep-book-cover { display: block; aspect-ratio: 3 / 4; background: linear-gradient(135deg, #f4eadb, #fffdf8); padding: 16px; }
.lep-book-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; box-shadow: 0 12px 28px rgba(30, 58, 95, .14); }
.lep-cover-placeholder {
  display: grid; place-items: center; width: 100%; height: 100%; min-height: 260px; padding: 22px; border-radius: 14px;
  text-align: center; color: var(--lep-ink); font-family: Georgia, serif; font-size: 1.35rem; line-height: 1.1;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.78), transparent 28%),
    linear-gradient(145deg, #e9f0f7, #f5ecdf);
  border: 1px solid rgba(19,35,59,.1);
}
.lep-cover-placeholder-large { min-height: 460px; }
.lep-book-content { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.lep-tax-line { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 11px; }
.lep-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: .75rem; font-weight: 900; line-height: 1.1; }
.lep-pill-gold { color: var(--lep-gold-dark); background: var(--lep-gold-soft); }
.lep-pill-blue { color: var(--lep-blue); background: var(--lep-blue-soft); }
.lep-book-card h3 { margin: 0 0 8px; color: var(--lep-ink); font-family: Georgia, serif; font-size: 1.35rem; line-height: 1.15; }
.lep-book-card h3 a:hover { color: var(--lep-gold-dark); }
.lep-book-subtitle { margin: 0 0 9px; color: var(--lep-gold-dark); font-weight: 800; line-height: 1.35; }
.lep-book-description { margin: 0 0 16px; color: var(--lep-muted); font-size: .95rem; }
.lep-book-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; margin-bottom: 16px; }
.lep-book-meta span { background: #f3eee6; color: var(--lep-text); border-radius: 999px; padding: 5px 10px; font-size: .76rem; font-weight: 800; }
.lep-book-links { display: flex; flex-wrap: wrap; gap: 8px; }
.lep-book-links .lep-button { min-height: 40px; padding: 0 14px; font-size: .86rem; }

.lep-editorial-section { margin-top: 78px; }
.lep-editorial-panel {
  border-radius: var(--lep-radius-lg); padding: clamp(30px, 6vw, 62px);
  background:
    linear-gradient(90deg, rgba(255,253,248,.94), rgba(255,253,248,.78)),
    radial-gradient(circle at 90% 20%, rgba(197,154,61,.18), transparent 36%),
    var(--lep-cream);
  border: 1px solid var(--lep-border-soft); box-shadow: var(--lep-shadow-soft);
}
.lep-editorial-panel p { max-width: 760px; font-size: 1.06rem; }

.lep-catalogue-page { padding-top: 60px; }
.lep-catalogue-header { text-align: center; max-width: 820px; margin-bottom: 34px; }
.lep-catalogue-header .lep-eyebrow { text-align: center; }
.lep-archive-title { font-size: clamp(2.4rem, 4.2vw, 4.25rem); }
.lep-archive-title::after { margin-left: auto; margin-right: auto; }
.lep-archive-intro { margin: 22px auto 0; color: var(--lep-muted); max-width: 680px; }
.lep-filter-panel { background: rgba(255,253,248,.94); border: 1px solid var(--lep-border-soft); border-radius: 24px; padding: 20px; box-shadow: var(--lep-shadow-soft); margin-bottom: 24px; }
.lep-filter-form { display: grid; grid-template-columns: minmax(240px, 1.2fr) minmax(160px, .8fr) minmax(170px, .9fr) minmax(140px, .65fr) auto auto; gap: 14px; align-items: end; }
.lep-field label { display: block; color: var(--lep-ink); font-size: .78rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 7px; }
.lep-field input,
.lep-field select { width: 100%; border: 1px solid var(--lep-border); border-radius: 14px; background: #fff; color: var(--lep-ink); min-height: 48px; padding: 0 13px; font: inherit; outline: none; }
.lep-field input:focus,
.lep-field select:focus { border-color: var(--lep-gold); box-shadow: 0 0 0 4px rgba(197,154,61,.12); }
.lep-input-icon { position: relative; }
.lep-input-icon svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--lep-light-muted); width: 19px; height: 19px; }
.lep-input-icon input { padding-left: 42px; }
.lep-reset { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; color: var(--lep-muted); font-weight: 900; }
.lep-results-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.lep-results-count { color: var(--lep-muted); font-weight: 900; margin: 0; }
.lep-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.lep-pagination .page-numbers { min-width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--lep-border); color: var(--lep-ink); background: #fff; font-weight: 900; }
.lep-pagination .current { background: var(--lep-blue); color: #fff; border-color: var(--lep-blue); }

.lep-book-hero { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 54px; align-items: center; padding-top: 66px; }
.lep-book-single-cover { background: linear-gradient(135deg, #fff, #f4eadb); border: 1px solid var(--lep-border-soft); border-radius: 28px; padding: 22px; box-shadow: var(--lep-shadow); }
.lep-book-single-cover img { width: 100%; border-radius: 18px; box-shadow: 0 18px 42px rgba(30,58,95,.14); }
.lep-book-single-content h1 { font-size: clamp(2.3rem, 4.3vw, 4.5rem); }
.lep-single-subtitle { color: var(--lep-gold-dark); font-size: 1.35rem; line-height: 1.35; margin: 14px 0 0; font-weight: 800; }
.lep-single-description { color: var(--lep-muted); font-size: 1.08rem; max-width: 720px; margin: 22px 0 0; }
.lep-single-meta { display: flex; flex-wrap: wrap; gap: 9px; margin: 24px 0 26px; }
.lep-single-actions { margin-top: 26px; }
.lep-book-body { background: rgba(255,253,248,.94); border: 1px solid var(--lep-border-soft); border-radius: 28px; padding: clamp(26px, 5vw, 54px); box-shadow: var(--lep-shadow-soft); color: var(--lep-text); }
.lep-book-body h2,
.lep-book-body h3 { color: var(--lep-ink); font-family: Georgia, serif; }
.lep-book-body a { color: var(--lep-blue); font-weight: 900; text-decoration: underline; text-decoration-color: rgba(30,58,95,.25); text-underline-offset: 3px; }

.lep-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.lep-card,
.lep-empty { background: rgba(255,253,248,.94); border: 1px solid var(--lep-border-soft); border-radius: 24px; padding: 28px; box-shadow: var(--lep-shadow-soft); }
.lep-card h2 { font-family: Georgia, serif; color: var(--lep-ink); margin: 0 0 10px; }
.lep-card p,
.lep-empty p { color: var(--lep-muted); }
.lep-empty { text-align: center; color: var(--lep-muted); }
.lep-empty h3 { font-family: Georgia, serif; color: var(--lep-ink); font-size: 2rem; margin: 0 0 10px; }
.lep-empty-wide { grid-column: 1 / -1; }

.lep-footer { background: #f4eadb; border-top: 1px solid var(--lep-border-soft); padding: 48px 0; color: var(--lep-muted); }
.lep-footer-grid { display: flex; justify-content: space-between; gap: 40px; align-items: center; }
.lep-footer p { max-width: 520px; margin: 14px 0 0; }
.lep-footer-links,
.lep-footer-menu { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; }
.lep-footer-links a,
.lep-footer-menu a { color: var(--lep-ink); font-weight: 900; }
.lep-footer-brand .lep-brand-icon { background: #fff; }

@media (max-width: 1080px) {
  .lep-menu { gap: 18px; }
  .lep-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 58px; }
  .lep-hero-content { max-width: 760px; }
  .lep-hero-visual { min-height: 260px; }
  .lep-trust-strip { grid-template-columns: repeat(2, 1fr); }
  .lep-trust-strip article:nth-child(2) { border-right: 0; }
  .lep-trust-strip article:nth-child(1), .lep-trust-strip article:nth-child(2) { border-bottom: 1px solid var(--lep-border-soft); }
  .lep-category-grid { grid-template-columns: 1fr; }
  .lep-books-grid, .lep-post-grid { grid-template-columns: repeat(2, 1fr); }
  .lep-books-grid-home { grid-template-columns: repeat(2, 1fr); }
  .lep-books-grid-home .lep-book-card { grid-column: auto; }
  .lep-filter-form { grid-template-columns: repeat(2, 1fr); }
  .lep-book-hero { grid-template-columns: 300px minmax(0, 1fr); gap: 36px; }
}

@media (max-width: 820px) {
  body.admin-bar .lep-site-header { top: 46px; }
  .lep-menu-toggle { display: grid; place-items: center; margin-left: auto; }
  .lep-primary-nav { display: none; position: absolute; left: 20px; right: 20px; top: calc(100% + 10px); padding: 18px; background: rgba(255,253,248,.98); border: 1px solid var(--lep-border); border-radius: 22px; box-shadow: var(--lep-shadow); }
  .lep-primary-nav.is-open { display: block; }
  .lep-menu { display: grid; gap: 12px; }
  .lep-menu a { display: block; padding: 9px 0; }
  .lep-menu a::after { display: none; }
  .lep-brand-text strong { font-size: 1.1rem; }
  .lep-brand-text small { font-size: .68rem; }
  .lep-hero { padding: 42px 0; gap: 26px; }
  .lep-hero h1 { font-size: clamp(2.2rem, 11vw, 3.2rem); }
  .lep-hero-visual { min-height: 220px; }
  .lep-trust-strip { margin-top: 20px; grid-template-columns: 1fr; }
  .lep-trust-strip article { border-right: 0; border-bottom: 1px solid var(--lep-border-soft); }
  .lep-trust-strip article:last-child { border-bottom: 0; }
  .lep-section-side-heading { display: grid; }
  .lep-books-grid, .lep-books-grid-home, .lep-post-grid { grid-template-columns: 1fr; }
  .lep-filter-form { grid-template-columns: 1fr; }
  .lep-book-hero { grid-template-columns: 1fr; padding-top: 36px; }
  .lep-book-single-cover { max-width: 360px; margin: 0 auto; }
  .lep-footer-grid { display: grid; }
}

@media (max-width: 520px) {
  .lep-wrap { width: min(var(--lep-max), calc(100% - 28px)); }
  .lep-nav { min-height: 70px; }
  .lep-brand-icon { width: 40px; height: 40px; border-radius: 14px; }
  .lep-brand-icon svg { width: 23px; height: 23px; }
  .lep-brand-text small { display: none; }
  .lep-actions, .lep-book-links { display: grid; grid-template-columns: 1fr; width: 100%; }
  .lep-button, .lep-submit { width: 100%; }
  .lep-category-card, .lep-filter-panel, .lep-book-body { border-radius: 20px; }
}
