/* =====================================================
   VARIABLES & THEMES
===================================================== */
:root {
  /* Sidebar */
  --sidebar-bg: #1c1f26;
  --sidebar-hover: #272b34;
  --sidebar-active: #3d5a99;
  --sidebar-text: rgba(255,255,255,0.6);
  --sidebar-text-active: #ffffff;
  --sidebar-width: 220px;

  /* Background & Surfaces */
  --bg: #f4f2ef;
  --surface: #ffffff;
  --surface-2: #eeebe6;
  --surface-hover: #f8f6f3;

  /* Text */
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --text-light: #9ca3af;

  /* Accent */
  --accent: #3d5a99;
  --accent-hover: #2f4880;
  --accent-light: rgba(61,90,153,0.1);

  /* Status colors */
  --green: #10b981;
  --green-light: rgba(16,185,129,0.12);
  --orange: #f59e0b;
  --orange-light: rgba(245,158,11,0.12);
  --red: #ef4444;
  --red-light: rgba(239,68,68,0.12);
  --purple: #8b5cf6;
  --purple-light: rgba(139,92,246,0.12);

  /* Borders & Shadows */
  --border: #e5ddd0;
  --border-light: rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.14);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.07);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Topbar */
  --topbar-h: 60px;

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --sidebar-bg: #111318;
  --sidebar-hover: #1a1d24;
  --sidebar-active: #3d5a99;
  --sidebar-text: rgba(255,255,255,0.5);
  --sidebar-text-active: #ffffff;

  --bg: #0f1117;
  --surface: #171a21;
  --surface-2: #1e2130;
  --surface-hover: #1c1f2b;

  --text: #e2e4e9;
  --text-muted: #8b8fa8;
  --text-light: #5e6278;

  --accent: #4d6db5;
  --accent-hover: #3d5a99;
  --accent-light: rgba(77,109,181,0.15);

  --border: #2a3444;
  --border-light: rgba(255,255,255,0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.3);
}

/* =====================================================
   RESET & BASE
===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  /* Fix iOS 100vh bug */
  height: -webkit-fill-available;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  /* 100dvh = dynamic viewport height, s'adapte à la barre URL mobile */
  height: 100vh;
  height: 100dvh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  transition: background var(--transition-slow), color var(--transition-slow);
}

img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* =====================================================
   LOGIN SCREEN
===================================================== */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--sidebar-bg);
  z-index: 1000;
  transition: opacity var(--transition-slow);
}

.login-bg-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(67,97,238,0.2) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 20%, rgba(139,92,246,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.login-card {
  position: relative; z-index: 1;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-logo-icon {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.login-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.login-title em {
  font-style: italic;
  color: var(--accent);
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.login-form {
  display: flex; flex-direction: column; gap: 1.25rem;
}

.login-error {
  background: var(--red-light);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border: 1px solid rgba(239,68,68,0.2);
}

/* =====================================================
   FORM ELEMENTS
===================================================== */
.form-group {
  display: flex; flex-direction: column; gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group label .req { color: var(--red); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

textarea { resize: vertical; line-height: 1.5; }

.password-wrapper {
  position: relative;
}

.password-wrapper input { padding-right: 2.5rem; }

.toggle-pwd {
  position: absolute; right: 0.75rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: color var(--transition);
  padding: 0;
}
.toggle-pwd:hover { color: var(--accent); }

.checkbox-label {
  display: flex; align-items: center; gap: 0.5rem;
  cursor: pointer; font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
}

/* =====================================================
   BUTTONS
===================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer; border: none;
  white-space: nowrap;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-danger {
  background: var(--red);
  color: white;
}
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

.btn-full { width: 100%; }

.btn-text-sm {
  background: none; border: none;
  color: var(--accent); font-size: 0.8rem;
  font-weight: 500; cursor: pointer;
  padding: 0;
}
.btn-text-sm:hover { text-decoration: underline; }

.btn-roulette {
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  color: white;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 24px rgba(67,97,238,0.35);
  font-style: italic;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}
.btn-roulette:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(67,97,238,0.45); }
.btn-roulette:active { transform: translateY(0); }

.roulette-dice { font-size: 1.2rem; }

.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* =====================================================
   APP LAYOUT
===================================================== */
.app-layout {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* =====================================================
   SIDEBAR
===================================================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: width var(--transition-slow);
}

.sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
  display: flex; align-items: center; gap: 0.625rem;
}

.logo-mark {
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.01em;
}

.sidebar-user-card {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  flex-shrink: 0;
}

.user-meta {
  display: flex; flex-direction: column; gap: 0.15rem;
  overflow: hidden;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-tag {
  font-size: 0.7rem;
  color: var(--sidebar-text);
  white-space: nowrap;
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}

.nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  position: relative;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
}

.nav-item-icon {
  flex-shrink: 0;
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.75;
}
.nav-item.active .nav-item-icon,
.nav-item:hover .nav-item-icon { opacity: 1; }

.nav-item-badge {
  margin-left: auto;
  background: var(--red);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  padding: 0.75rem 0.75rem 0.25rem;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-btn {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.8rem;
  font-weight: 500;
  width: 100%;
  text-align: left;
  transition: all var(--transition);
}

.sidebar-btn:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

.theme-label { flex: 1; }

.logout-btn { color: rgba(255,100,100,0.7); }
.logout-btn:hover { background: rgba(239,68,68,0.15); color: #f87171; }

/* =====================================================
   MAIN WRAPPER & TOPBAR
===================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 1.25rem;
  gap: 0.75rem;
  flex-shrink: 0;
  transition: background var(--transition-slow), border-color var(--transition-slow);
}

/* La barre de recherche prend tout l'espace disponible */
.topbar-search { flex: 1; }

.topbar-search {
  flex: 1; max-width: 480px;
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0 1rem;
  transition: border-color var(--transition);
}

.topbar-search:focus-within {
  border-color: var(--accent);
  background: var(--surface);
}

.topbar-search svg { color: var(--text-muted); flex-shrink: 0; }

.search-input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  flex: 1;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text);
}
.search-input::placeholder { color: var(--text-light); }
.search-input:focus { box-shadow: none !important; border-color: transparent !important; }

.search-clear {
  color: var(--text-muted); font-size: 0.8rem;
  transition: color var(--transition);
}
.search-clear:hover { color: var(--text); }

.topbar-actions {
  display: flex; align-items: center; gap: 0.5rem;
}

.notif-btn {
  position: relative;
}

.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--surface);
}

.view-mode-toggle {
  display: flex;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.vm-btn {
  width: 30px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.vm-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.vm-btn:hover:not(.active) { color: var(--text); }

/* =====================================================
   PAGE CONTENT
===================================================== */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  transition: background var(--transition-slow);
}

.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.page-loader {
  display: flex; align-items: center; justify-content: center;
  height: 200px;
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Filter bar */
.filter-bar {
  display: flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.filter-chip {
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: white; }

/* =====================================================
   BOOK GRID
===================================================== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.25rem;
}

.book-card {
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  animation: fadeSlideUp 0.4s ease backwards;
  position: relative;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.book-card:hover .book-card-overlay {
  opacity: 1;
}

.book-cover-wrap {
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
}

.book-cover {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.book-card:hover .book-cover { transform: scale(1.04); }

.book-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--border) 100%);
  color: var(--text-muted);
  font-size: 2rem;
}

.book-cover-placeholder span { font-size: 0.7rem; text-align: center; padding: 0 0.5rem; color: var(--text-light); font-family: var(--font-serif); }

.book-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,14,26,0.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.22s ease;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0.75rem;
  gap: 0.25rem;
}

.book-overlay-title {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
}

.book-overlay-author {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
}

/* Tags dans l'overlay hover */
.book-overlay-tags {
  display: flex; flex-wrap: wrap; gap: 3px;
  margin-bottom: 0.3rem;
}

.book-overlay-tags .book-tag {
  font-size: 0.6rem;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Tags dans le détail panel */
.book-tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* Progress bar on card */
.book-progress-bar {
  height: 3px;
  background: var(--border);
  position: absolute;
  bottom: 0; left: 0; right: 0;
}

.book-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--green), var(--accent));
  border-radius: 0 2px 2px 0;
  transition: width 0.4s ease;
}

/* Status badge */
.status-badge {
  position: absolute; top: 0.5rem; right: 0.5rem;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-badge.lu { background: var(--green-light); color: var(--green); }
.status-badge.a_lire { background: var(--accent-light); color: var(--accent); }
.status-badge.wishlist { background: var(--orange-light); color: var(--orange); }

/* Wishlist heart */
.card-wishlist-btn {
  position: absolute; top: 0.4rem; left: 0.4rem;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  z-index: 2;
  opacity: 0;
}
.book-card:hover .card-wishlist-btn { opacity: 1; }
.card-wishlist-btn.active { opacity: 1; background: white; }
.card-wishlist-btn:hover { transform: scale(1.15); }

/* Animation stagger */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.book-card:nth-child(1) { animation-delay: 0.04s; }
.book-card:nth-child(2) { animation-delay: 0.08s; }
.book-card:nth-child(3) { animation-delay: 0.12s; }
.book-card:nth-child(4) { animation-delay: 0.16s; }
.book-card:nth-child(5) { animation-delay: 0.20s; }
.book-card:nth-child(6) { animation-delay: 0.24s; }
.book-card:nth-child(7) { animation-delay: 0.28s; }
.book-card:nth-child(8) { animation-delay: 0.32s; }
.book-card:nth-child(n+9) { animation-delay: 0.36s; }

/* =====================================================
   BOOK LIST VIEW
===================================================== */
.books-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
}

.list-header {
  display: grid;
  grid-template-columns: 48px 1fr 160px 120px 100px 80px;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.list-row {
  display: grid;
  grid-template-columns: 48px 1fr 160px 120px 100px 80px;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  cursor: pointer;
  transition: background var(--transition);
  animation: fadeSlideUp 0.3s ease backwards;
}

.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--surface-hover); }

.list-cover {
  width: 32px; height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--surface-2);
}

.list-cover-placeholder {
  width: 32px; height: 48px;
  border-radius: 4px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.list-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-genre {
  font-size: 0.775rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-status-badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.list-note {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text);
}

.list-actions {
  display: flex; gap: 0.25rem; justify-content: flex-end;
}

/* =====================================================
   EMPTY STATE
===================================================== */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 1rem;
}

.empty-icon { font-size: 3rem; opacity: 0.4; }
.empty-title { font-family: var(--font-serif); font-size: 1.25rem; color: var(--text); font-weight: 600; }
.empty-subtitle { font-size: 0.875rem; color: var(--text-muted); max-width: 300px; line-height: 1.6; }

/* =====================================================
   DETAIL PANEL — modale centrée
===================================================== */
.detail-panel {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(10, 14, 26, 0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.detail-panel.open {
  opacity: 1;
  pointer-events: all;
}

.detail-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
  display: flex;
  flex-direction: column;
}

.detail-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.detail-close:hover { background: var(--border); color: var(--text); }

.detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 3rem 1.75rem 1.75rem;
}

.detail-cover-wrap {
  margin: 0 auto 1.5rem;
  width: 160px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.detail-cover {
  width: 100%;
  object-fit: contain;
  display: block;
  background: var(--surface-2);
}

.detail-cover-placeholder {
  width: 100%; aspect-ratio: 2/3;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: var(--surface-2);
}

.detail-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.detail-author {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.detail-meta {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.detail-meta-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
}

.detail-meta-value {
  font-weight: 700; font-size: 1rem; color: var(--text);
}

.detail-meta-label {
  font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
}

.detail-meta-divider {
  width: 1px; height: 28px; background: var(--border);
}

.detail-note-stars {
  display: flex; gap: 3px; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}

.star { color: #fbbf24; font-size: 1rem; }
.star-empty { color: var(--border); font-size: 1rem; }

.detail-tags {
  display: flex; flex-wrap: wrap; gap: 0.375rem; justify-content: center;
  margin-bottom: 1.25rem;
}

.detail-section {
  margin-bottom: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.detail-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.detail-verdict {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text);
}

.detail-citation {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.detail-points {
  display: flex; flex-direction: column; gap: 0.35rem;
}

.detail-point {
  display: flex; align-items: flex-start; gap: 0.5rem;
  font-size: 0.825rem;
  line-height: 1.5;
  color: var(--text);
}

.detail-point-icon { flex-shrink: 0; margin-top: 2px; }

.detail-actions {
  display: flex; flex-direction: column; gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.detail-actions .btn { width: 100%; }

/* Progress selector in detail */
.progress-selector {
  display: flex; gap: 0.375rem;
  flex-wrap: wrap;
}

.progress-chip {
  padding: 0.3rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.progress-chip:hover { border-color: var(--accent); color: var(--accent); }
.progress-chip.active { background: var(--accent); border-color: var(--accent); color: white; }

.avis-textarea {
  width: 100%;
  margin-top: 0.5rem;
}

/* =====================================================
   MODALS
===================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10,14,26,0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
  position: sticky; top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.modal-close-btn:hover { background: var(--border); color: var(--text); }

/* =====================================================
   BOOK FORM
===================================================== */
.gbooks-search-area {
  padding: 1rem 1.5rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.gbooks-search-row {
  display: flex; gap: 0.5rem;
}

.gbooks-input {
  flex: 1;
  padding: 0.55rem 0.875rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
}
.gbooks-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.gbooks-results {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 240px;
  overflow-y: auto;
}

.gbooks-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--surface);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.gbooks-item:hover { border-color: var(--accent); background: var(--accent-light); }

.gbooks-item-cover {
  width: 36px; height: 52px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--surface-2);
  flex-shrink: 0;
}

.gbooks-item-info { flex: 1; min-width: 0; }

.gbooks-item-title {
  font-weight: 600;
  font-size: 0.825rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gbooks-item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#book-form {
  padding: 1.25rem 1.5rem 1.5rem;
}

.book-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.fg-span2 { grid-column: span 2; }

.cover-row {
  display: flex; gap: 0.5rem;
}

.cover-url-input { flex: 1; }

.cover-preview {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--surface-2);
}

.cover-preview img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.cover-preview-placeholder {
  font-size: 0.6rem;
  color: var(--text-light);
}

.form-actions {
  display: flex; gap: 0.5rem; justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* =====================================================
   ROULETTE MODAL
===================================================== */
.roulette-container {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  width: 100%; max-width: 700px;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.roulette-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.roulette-title em { font-style: italic; color: var(--accent); }

.roulette-subtitle {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-bottom: 2rem;
}

.spinning-title { font-size: 1.4rem; margin-bottom: 1.5rem; }

/* Track */
.roulette-track-wrapper {
  position: relative;
  overflow: hidden;
  height: 180px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.roulette-track {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 12px;
  padding: 0 12px;
  will-change: transform;
}

.roulette-cover {
  height: 140px;
  width: 93px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease;
}

.roulette-cover.selected {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px var(--accent), var(--shadow-lg);
}

.roulette-cover-placeholder {
  height: 140px; width: 93px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}

.roulette-fade-left,
.roulette-fade-right {
  position: absolute; top: 0; bottom: 0; width: 80px; z-index: 1; pointer-events: none;
}
.roulette-fade-left { left: 0; background: linear-gradient(to right, var(--surface-2), transparent); }
.roulette-fade-right { right: 0; background: linear-gradient(to left, var(--surface-2), transparent); }

.roulette-needle {
  position: absolute; top: 0; bottom: 0;
  left: 50%; transform: translateX(-50%);
  width: 3px;
  background: var(--accent);
  z-index: 2;
  pointer-events: none;
}
.roulette-needle::before,
.roulette-needle::after {
  content: '';
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
}
.roulette-needle::before {
  top: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid var(--accent);
}
.roulette-needle::after {
  bottom: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid var(--accent);
}

/* Result */
.result-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.result-book-card {
  display: flex;
  gap: 1.5rem;
  text-align: left;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.result-cover-wrap {
  flex-shrink: 0;
  width: 120px;
}

.result-cover {
  width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

.result-info { flex: 1; min-width: 0; }

.result-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.result-author { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1rem; }

.result-verdict-box {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.verdict-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 0.375rem;
}

.verdict-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
  font-style: italic;
  font-family: var(--font-serif);
}

/* =====================================================
   NOTIFICATION DROPDOWN
===================================================== */
.notif-dropdown {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  right: 1rem;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 400;
  overflow: hidden;
  animation: slideDown 0.2s ease;
  max-height: 480px;
  display: flex;
  flex-direction: column;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notif-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
}

.notif-list {
  overflow-y: auto;
  flex: 1;
}

.notif-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
  cursor: default;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-hover); }
.notif-item.unread { background: var(--accent-light); }

.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 5px;
}
.notif-dot.read { background: var(--border); }

.notif-text {
  flex: 1;
  font-size: 0.825rem;
  line-height: 1.5;
  color: var(--text);
}

.notif-time {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}

.notif-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* =====================================================
   TOAST NOTIFICATIONS
===================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--text);
  color: var(--surface);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 280px; max-width: 380px;
  pointer-events: all;
  animation: toastIn 0.3s ease;
}

.toast.toast-success { background: var(--green); }
.toast.toast-error { background: var(--red); }
.toast.toast-info { background: var(--accent); }
.toast.toast-out { animation: toastOut 0.25s ease forwards; }

.toast-icon { font-size: 1rem; flex-shrink: 0; }

@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* =====================================================
   CONFIRM DIALOG
===================================================== */
.confirm-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%; max-width: 380px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}

.confirm-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.confirm-message {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.confirm-actions {
  display: flex; gap: 0.5rem; justify-content: flex-end;
}

/* =====================================================
   ADMIN VIEWS
===================================================== */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 0.5rem;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-icon {
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
}

/* Suivi Jade */
.jade-suivi-section {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.jade-suivi-header {
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.875rem;
  display: flex; align-items: center; gap: 0.5rem;
}

/* =====================================================
   JADE VIEWS
===================================================== */
.roulette-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  gap: 1.5rem;
}

.roulette-page-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text);
}

.roulette-page-title em { color: var(--accent); font-style: italic; }

.roulette-page-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 380px;
  line-height: 1.7;
}

/* =====================================================
   UTILITY CLASSES
===================================================== */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-green { background: var(--green-light); color: var(--green); }
.badge-blue { background: var(--accent-light); color: var(--accent); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-purple { background: var(--purple-light); color: var(--purple); }
.badge-gray { background: var(--surface-2); color: var(--text-muted); }

.flex-center { display: flex; align-items: center; justify-content: center; }

/* =====================================================
   SCROLLBARS
===================================================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* =====================================================
   HAMBURGER (visible seulement sur écrans < 900px)
===================================================== */
.hamburger-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}
.hamburger-btn:hover { background: var(--surface-2); color: var(--text); }

/* =====================================================
   RESPONSIVE — Tablette & Mobile (< 900px)
===================================================== */
@media (max-width: 900px) {

  /* ---- Layout ---- */
  .hamburger-btn { display: flex; }

  /* Sidebar : overlay glissant depuis la gauche */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 500;
    width: var(--sidebar-width);
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    box-shadow: var(--shadow-lg);
  }
  .app-layout.sidebar-open .sidebar {
    transform: translateX(0);
  }
  /* Fond sombre derrière la sidebar */
  .app-layout.sidebar-open::before {
    content: '';
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 499;
  }

  /* Main wrapper : pleine largeur */
  .main-wrapper { width: 100%; }

  /* Topbar */
  .topbar { padding: 0 0.875rem; gap: 0.5rem; }
  .topbar-search { max-width: none; }

  /* Grille */
  .books-grid { grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: 1rem; }

  /* Page content */
  .page-content { padding: 1rem 1rem 2rem; }

  /* Stats admin sur 2 colonnes */
  .admin-stats { grid-template-columns: repeat(2, 1fr); }

  /* Page header */
  .page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  /* Vue liste */
  .list-header, .list-row { grid-template-columns: 40px 1fr 90px; gap: 0.5rem; padding: 0.6rem 0.75rem; }
  .list-header > :nth-child(n+4), .list-row > :nth-child(n+4) { display: none; }

  /* Panneau détail */
  .detail-panel { padding: 0.875rem; align-items: flex-end; }
  .detail-card { max-width: 100%; max-height: 90dvh; border-radius: var(--radius-xl) var(--radius-xl) var(--radius-lg) var(--radius-lg); }

  /* Formulaire livre */
  .book-form-grid { grid-template-columns: 1fr; }
  .fg-span2 { grid-column: span 1; }
  .modal-card { border-radius: var(--radius-lg); }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-card { border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 92dvh; }

  /* Roulette résultat */
  .result-book-card { flex-direction: column; }
  .result-cover-wrap { width: 100%; max-width: 130px; margin: 0 auto; }
}
