:root {
  --accent: #FFCB01;
  --accent-2: #F0B400;
  --accent-soft: #FFF4C9;
  --ink: #0f0f0f;
  --ink-2: #3a3a3a;
  --muted: #8a8a85;
  --line: #ecebe5;
  --bg: #faf9f4;
  --card: #ffffff;
  --star: #FF9F0A;
  --success: #17a34a;
  --danger: #e5484d;
  --filter-w: 240px;
  --sidebar-w: 250px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15,15,15,.04);
  --shadow-md: 0 10px 30px rgba(15,15,15,.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.glow { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(600px 380px at 78% -6%, rgba(255,203,1,.16), transparent 65%),
              radial-gradient(520px 340px at 8% 108%, rgba(255,203,1,.08), transparent 60%); }

/* ── Sidebar de navigation (fixe à gauche) ── */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px 16px; overflow-y: auto; z-index: 40; }
.sidebar .logo { padding: 2px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.side-nav { flex: 1; }
.nav-label { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 14px 11px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: background .16s, transform .16s; }
.nav-item:hover { background: #f5f4ef; transform: translateX(2px); }
.nav-item svg { width: 18px; height: 18px; stroke: var(--ink-2); flex-shrink: 0; }
.nav-item.active { background: var(--accent); color: #000; font-weight: 700; box-shadow: 0 6px 16px rgba(255,203,1,.3); }
.nav-item.active svg { stroke: #000; }
.nav-sep { height: 1px; background: var(--line); margin: 11px 9px; }
.btn-ghost { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 500; text-decoration: none; transition: background .16s; }
.btn-ghost svg { width: 17px; height: 17px; stroke: var(--ink-2); }
.btn-ghost:hover { background: #f5f4ef; }
.btn-ghost + .btn-ghost { margin-top: 7px; }
.app { margin-left: var(--sidebar-w); }
.menu-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: #fff; place-items: center; cursor: pointer; }
.menu-toggle svg { width: 19px; height: 19px; stroke: var(--ink-2); }

/* ── Topbar ── */
.topbar-wrap { position: sticky; top: 14px; z-index: 50; padding: 0 24px; }
.topbar { display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(236,235,229,.9); border-radius: 18px; padding: 12px 16px; box-shadow: var(--shadow-sm); }
.logo { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.logo-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg,#FFD94A,#FFB400); display: grid; place-items: center; font-family: 'Playfair Display', serif; font-weight: 700; color: #000; font-size: 21px; box-shadow: 0 4px 12px rgba(255,203,1,.35); }
.logo-text { font-family: 'Playfair Display', serif; font-weight: 600; font-size: 16px; line-height: 1.1; }
.logo-sub { font-size: 9px; letter-spacing: .17em; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
.menu-wrap { position: relative; }
.menu-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 9px 14px; font: 600 13.5px 'Inter'; color: var(--ink); cursor: pointer; transition: border .16s; }
.menu-btn:hover { border-color: var(--accent); }
.menu-btn svg { width: 17px; height: 17px; stroke: var(--ink-2); }
.menu-drop { position: absolute; top: calc(100% + 10px); left: 0; width: 320px; max-height: 78vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px rgba(15,15,15,.14); padding: 14px; display: none; z-index: 60; }
.menu-drop.open { display: block; animation: pop .16s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.menu-label { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 12px 10px 6px; }
.menu-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background .14s; }
.menu-item:hover { background: #f5f4ef; }
.menu-item svg { width: 18px; height: 18px; stroke: var(--ink-2); flex-shrink: 0; }
.menu-item.active { background: var(--accent); color: #000; font-weight: 700; }
.menu-item.active svg { stroke: #000; }
.menu-sep { height: 1px; background: var(--line); margin: 10px 8px; }

.search { flex: 1; max-width: 460px; display: flex; align-items: center; background: #f4f3ee; border: 1px solid transparent; border-radius: 12px; padding: 9px 14px; transition: border .16s, background .16s, box-shadow .16s; }
.search:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,203,1,.14); }
.search input { border: 0; outline: 0; flex: 1; font-size: 13.5px; color: var(--ink); background: transparent; min-width: 0; }
.search .ico { stroke: var(--accent-2); flex-shrink: 0; }
.hdr-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn { position: relative; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: grid; place-items: center; cursor: pointer; transition: border .16s, transform .16s; }
.icon-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; stroke: var(--ink-2); }
.badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; font-size: 10px; font-weight: 700; color: #fff; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.badge.orange { background: var(--star); }
.badge.dark { background: var(--ink); color: var(--accent); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,#FFD94A,#F0A400); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #000; cursor: pointer; }
.space-link { display: inline-flex; align-items: center; gap: 7px; background: var(--ink); color: var(--accent); font-weight: 700; font-size: 12.5px; padding: 9px 14px; border-radius: 11px; transition: opacity .16s; }
.space-link:hover { opacity: .85; }
.space-link svg { width: 15px; height: 15px; stroke: var(--accent); }

/* ── Main ── */
.main { position: relative; z-index: 1; padding: 18px 24px 48px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin: 18px 2px 14px; }
.breadcrumb b { color: var(--ink); font-weight: 600; }
.topbar .breadcrumb { margin: 0; white-space: nowrap; }

/* ── Page head ── */
.page-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.page-head h1 { font-family: 'Playfair Display', serif; font-size: 34px; font-weight: 700; line-height: 1.05; }
.page-head h1 em { font-style: italic; color: var(--accent-2); }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 6px; max-width: 560px; }

/* ── Hero (accueil) ── */
.hero { position: relative; border-radius: 24px; overflow: hidden; padding: 56px 52px; color: #fff; background: linear-gradient(120deg, #0f0f0f, #1c1c1c); margin-bottom: 30px; }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px; background: radial-gradient(circle, rgba(255,203,1,.45), transparent 70%); }
.hero h1 { font-family: 'Playfair Display', serif; font-size: 42px; font-weight: 700; max-width: 620px; position: relative; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { color: #c6c6bf; font-size: 15px; margin-top: 14px; max-width: 480px; position: relative; }
.hero .cta { display: inline-flex; align-items: center; gap: 9px; background: var(--accent); color: #000; font-weight: 700; font-size: 14px; padding: 12px 22px; border-radius: 12px; margin-top: 22px; position: relative; transition: background .16s; }
.hero .cta:hover { background: var(--accent-2); }
.hero .cta svg { width: 17px; height: 17px; stroke: #000; }

/* ── Sections ── */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 16px; }
.section-head h2 { font-family: 'Playfair Display', serif; font-size: 22px; }
.section-head a { font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* ── Grille livres ── */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; position: relative; transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s, border .22s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(255,203,1,.5); }
.cover { aspect-ratio: 3/4; border-radius: var(--r-md); position: relative; display: grid; place-items: center; padding: 16px; font-family: 'Playfair Display', serif; font-weight: 600; font-size: 15px; text-align: center; overflow: hidden; isolation: isolate; }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.22), transparent 42%); z-index: 1; pointer-events: none; }
.cover .heart { position: absolute; top: 9px; right: 9px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; z-index: 2; cursor: pointer; border: 0; }
.cover .heart svg { width: 15px; height: 15px; stroke: var(--ink-2); fill: none; }
.cover .heart.liked svg { fill: #FF5C7A; stroke: #FF5C7A; }
.add-btn { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); color: #000; font-weight: 700; font-size: 12.5px; padding: 10px; display: flex; justify-content: center; align-items: center; gap: 7px; z-index: 3; transform: translateY(100%); transition: transform .22s cubic-bezier(.2,.7,.3,1); border: 0; cursor: pointer; }
.card:hover .add-btn { transform: translateY(0); }
.add-btn svg { width: 15px; height: 15px; stroke: #000; }
.card .title { font-size: 14px; font-weight: 700; margin-top: 10px; line-height: 1.25; }
.card .cat { font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 500; }
.card .author { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.stars { color: var(--star); font-size: 12px; margin-top: 6px; letter-spacing: 1px; }
.price { margin-top: 5px; font-size: 15px; font-weight: 800; color: var(--ink); }
.price .old { color: #c0c0bb; font-weight: 500; font-size: 12px; text-decoration: line-through; margin-left: 6px; }
.tag { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--accent); color: #000; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 7px; letter-spacing: .04em; }

/* ── Body filtres + contenu ── */
.body { display: flex; gap: 26px; align-items: flex-start; }
.filters { width: var(--filter-w); flex-shrink: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 16px; position: sticky; top: 92px; box-shadow: var(--shadow-sm); }
.filters h3 { font-family: 'Playfair Display', serif; font-size: 16px; margin-bottom: 14px; }
.filter-block { border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 15px; }
.filter-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.filter-title { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; cursor: pointer; }
.filter-title svg { width: 15px; height: 15px; stroke: var(--muted); transition: transform .2s; }
.filter-title.closed svg { transform: rotate(-90deg); }
.filter-sub { display: flex; align-items: center; justify-content: space-between; padding: 7px 8px; font-size: 12.5px; color: var(--ink-2); border-radius: 8px; cursor: pointer; transition: background .14s; }
.filter-sub:hover { background: #f5f4ef; }
.filter-sub.hl { color: var(--ink); font-weight: 700; background: var(--accent-soft); }
.filter-sub span.count { color: var(--muted); font-size: 11px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--accent-2); width: 14px; height: 14px; }
.content { flex: 1; min-width: 0; }

/* ── Promotions / badges ── */
.sale { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin-top: 30px; box-shadow: var(--shadow-md); }
.sale-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sale-head h3 { font-family: 'Playfair Display', serif; font-size: 19px; }
.sale-head a { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.sale-row { display: flex; gap: 16px; flex-wrap: wrap; }
.sale-card { width: 158px; }
.sale-cover { aspect-ratio: 3/4; border-radius: var(--r-md); display: grid; place-items: center; padding: 13px; font-family: 'Playfair Display', serif; font-weight: 600; font-size: 14px; text-align: center; position: relative; overflow: hidden; }
.sale-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.2), transparent 45%); }
.disc { position: absolute; top: 8px; left: 8px; border-radius: 9px; color: #fff; font-size: 11px; font-weight: 800; padding: 4px 8px; z-index: 2; }
.sale-card .stars { font-size: 11px; }
.sale-card .price { font-size: 13.5px; }
.sale-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.sale-badge { display: flex; gap: 12px; align-items: flex-start; background: #faf9f4; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; transition: border .16s; }
.sale-badge:hover { border-color: rgba(255,203,1,.5); }
.sale-badge svg { width: 21px; height: 21px; stroke: var(--accent-2); flex-shrink: 0; }
.sale-badge b { font-size: 13px; display: block; }
.sale-badge span { font-size: 11.5px; color: var(--muted); }

/* ── Newsletter ── */
.subscribe { position: relative; display: flex; align-items: center; gap: 20px; background: linear-gradient(120deg, #0f0f0f, #1c1c1c); color: #fff; border-radius: var(--r-lg); padding: 26px 28px; margin-top: 30px; overflow: hidden; }
.subscribe::before { content: ''; position: absolute; right: -40px; top: -50px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(255,203,1,.5), transparent 70%); }
.subscribe h4 { font-family: 'Playfair Display', serif; font-size: 20px; position: relative; }
.subscribe p { font-size: 13px; color: #b8b8b2; margin-top: 3px; position: relative; }
.subscribe .field { margin-left: auto; display: flex; background: #fff; border-radius: 12px; overflow: hidden; position: relative; }
.subscribe .field input { border: 0; outline: 0; padding: 12px 16px; font-size: 13px; width: 230px; }
.subscribe .field button { border: 0; background: var(--accent); color: #000; font-weight: 700; font-size: 13px; padding: 0 20px; cursor: pointer; }

/* ── Panels / cartes génériques ── */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.panel h2 { font-family: 'Playfair Display', serif; font-size: 19px; margin-bottom: 14px; }
.panel p { color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; transition: border .16s; }
.list-row:hover { border-color: rgba(255,203,1,.5); }
.list-row .thumb { width: 44px; height: 58px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; font-family: 'Playfair Display', serif; font-weight: 600; font-size: 11px; text-align: center; padding: 4px; }
.list-row .info { flex: 1; min-width: 0; }
.list-row .info b { font-size: 14px; }
.list-row .info span { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }

/* ── Formulaires ── */
.form { max-width: 560px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font: 400 14px 'Inter'; color: var(--ink); background: #fff; outline: none; transition: border .16s, box-shadow .16s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,203,1,.14); }
.field textarea { min-height: 110px; resize: vertical; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #000; font-weight: 700; font-size: 14px; padding: 11px 20px; border-radius: 12px; border: 0; cursor: pointer; transition: background .16s; }
.btn:hover { background: var(--accent-2); }
.btn.dark { background: var(--ink); color: var(--accent); }
.btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.btn.danger { background: var(--danger); color: #fff; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; }
.alert { border-radius: 12px; padding: 12px 16px; font-size: 13.5px; margin-bottom: 16px; }
.alert.ok { background: #e9f9ee; color: #147a3a; border: 1px solid #bfe8cb; }
.alert.err { background: #fdecec; color: #b3261e; border: 1px solid #f5c2c2; }

/* ── Dashboard (admin/auteur) ── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.stat .lbl { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stat .val { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 700; margin-top: 6px; }
.stat .val small { font-size: 14px; color: var(--muted); font-weight: 500; }
.stat .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); display: grid; place-items: center; float: right; }
.stat .ic svg { width: 19px; height: 19px; stroke: var(--accent-2); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.table tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.pill.green { background: #e9f9ee; color: #147a3a; }
.pill.amber { background: #fff4d6; color: #9a6b00; }
.pill.gray { background: #f0f0ec; color: #6b6b66; }

/* ── Footer ── */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: #fff; margin-top: 40px; }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 36px 24px 28px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer .logo-text { font-size: 15px; }
.footer p { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-top: 10px; max-width: 320px; }
.footer h5 { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.footer a { display: block; font-size: 13px; color: var(--ink-2); padding: 4px 0; }
.footer a:hover { color: var(--ink); }
.footer .bottom { border-top: 1px solid var(--line); padding: 18px 24px; text-align: center; font-size: 12px; color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 1200px) { .grid { grid-template-columns: repeat(3, 1fr); } .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } .filters { display: none; } .footer-inner { grid-template-columns: 1fr 1fr; } .menu-toggle { display: grid; } .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 10px 40px rgba(0,0,0,.15); } .sidebar.open { transform: none; } .app { margin-left: 0; } .topbar-wrap { padding: 0 12px; } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
