/* ============================================
   MIABOOKS - Styles Globaux
   Version 1.0 | 2026
   ============================================ */

/* --- Variables CSS --- */
:root {
  --primary: #6C3FA8;
  --primary-dark: #4A2880;
  --primary-light: #9B6DD4;
  --secondary: #F4A261;
  --secondary-dark: #E07A30;
  --accent: #E8D5F5;
  --bg-main: #FAF8FD;
  --bg-card: #FFFFFF;
  --bg-dark: #1A1030;
  --text-dark: #1E1333;
  --text-medium: #4A4060;
  --text-light: #8B7BAA;
  --text-white: #FFFFFF;
  --border: #E5D9F5;
  --success: #2ECC71;
  --error: #E74C3C;
  --warning: #F39C12;
  --info: #3498DB;
  --shadow-sm: 0 2px 8px rgba(108, 63, 168, 0.08);
  --shadow-md: 0 4px 20px rgba(108, 63, 168, 0.15);
  --shadow-lg: 0 8px 40px rgba(108, 63, 168, 0.2);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Empêcher la sélection de texte sensible */
.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1rem; color: var(--text-medium); }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(108, 63, 168, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 63, 168, 0.45);
  color: white;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(244, 162, 97, 0.35);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 162, 97, 0.45);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(108, 63, 168, 0.08);
  color: var(--primary);
}
.btn-ghost:hover {
  background: rgba(108, 63, 168, 0.15);
  color: var(--primary-dark);
}

.btn-danger {
  background: var(--error);
  color: white;
}
.btn-danger:hover {
  background: #c0392b;
  color: white;
  transform: translateY(-2px);
}

.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.card-body { padding: 1.5rem; }
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-family: var(--font-main);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-main);
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: white;
  transition: var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 63, 168, 0.1);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.8rem; color: var(--text-light); margin-top: 0.25rem; }
.form-error { font-size: 0.82rem; color: var(--error); margin-top: 0.25rem; }

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.navbar-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.navbar-brand-name {
  font-family: var(--font-main);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.navbar-nav a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-medium);
  transition: var(--transition);
}

.navbar-nav a:hover, .navbar-nav a.active {
  background: var(--accent);
  color: var(--primary);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cart-badge {
  position: relative;
}
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--secondary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #1A1030 0%, #2D1B5E 50%, #4A2880 100%);
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(244, 162, 97, 0.2);
  border: 1px solid rgba(244, 162, 97, 0.4);
  color: var(--secondary);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-main);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  color: white;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-title span {
  background: linear-gradient(135deg, var(--secondary), #f7c59f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-book {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.book-mockup {
  width: 280px;
  height: 380px;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  border-radius: 4px 16px 16px 4px;
  box-shadow: 
    -8px 8px 0 rgba(0,0,0,0.3),
    -16px 16px 0 rgba(0,0,0,0.15),
    0 30px 60px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(-2deg); }
  50% { transform: translateY(-15px) rotate(-2deg); }
}

.book-mockup::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: rgba(0,0,0,0.3);
}

.book-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.book-mockup-title {
  font-family: var(--font-main);
  font-size: 1.1rem;
  color: white;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.book-mockup-subtitle {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
}
.book-mockup-author {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Stars float */
.star-float {
  position: absolute;
  font-size: 1.5rem;
  animation: starFloat 3s ease-in-out infinite;
}
.star-float:nth-child(1) { top: 20%; right: -10%; animation-delay: 0s; }
.star-float:nth-child(2) { bottom: 30%; right: -15%; animation-delay: 1s; }
.star-float:nth-child(3) { top: 50%; right: 5%; animation-delay: 0.5s; }

@keyframes starFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
  50% { transform: translateY(-10px) scale(1.1); opacity: 1; }
}

/* --- Pricing Cards --- */
.pricing-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 2px solid var(--border);
  position: relative;
  transition: var(--transition);
  text-align: center;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: scale(1.04);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 0.3rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pricing-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.pricing-icon.book { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); }
.pricing-icon.dev { background: linear-gradient(135deg, #ede7f6, #d1c4e9); }

.pricing-name {
  font-family: var(--font-main);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin: 1rem 0;
}

.pricing-price sup { font-size: 1.2rem; }
.pricing-price sub { font-size: 0.9rem; font-weight: 400; color: var(--text-light); }

.pricing-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-medium);
  border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li .check { color: var(--success); font-size: 1rem; flex-shrink: 0; }

/* --- Footer --- */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand-name {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
}

.footer-desc { font-size: 0.9rem; line-height: 1.7; margin-bottom: 1.5rem; }

.footer h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--secondary); padding-left: 4px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
}
.footer-legal-links a { color: rgba(255,255,255,0.5); font-size: 0.82rem; }
.footer-legal-links a:hover { color: var(--secondary); }

/* --- Alerts & Toasts --- */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid var(--success); }
.alert-error { background: #f8d7da; color: #721c24; border-left: 4px solid var(--error); }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid var(--warning); }
.alert-info { background: #d1ecf1; color: #0c5460; border-left: 4px solid var(--info); }

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: white;
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  min-width: 280px;
  border-left: 4px solid var(--primary);
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: var(--font-main);
  font-size: 1.4rem;
  color: var(--text-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  padding: 0;
  transition: var(--transition);
}
.modal-close:hover { color: var(--error); }

/* --- Loader --- */
.loader {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: loaderDot 1.4s ease-in-out infinite;
}
.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loaderDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* --- Badge / Labels --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-primary { background: var(--accent); color: var(--primary); }
.badge-success { background: #d4edda; color: #155724; }
.badge-error { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-gray { background: #f0f0f0; color: #666; }

/* --- Stars Rating --- */
.stars { color: #f4c430; font-size: 1rem; }
.stars-sm { font-size: 0.8rem; }

/* --- Divider --- */
.divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 1.5rem 0;
}
.divider-text::before, .divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Table --- */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-sm); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
thead { background: var(--bg-main); }
th {
  padding: 0.9rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  border-bottom: 2px solid var(--border);
}
td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-medium);
  vertical-align: middle;
}
tr:hover td { background: var(--bg-main); }

/* --- Sidebar Layout (Admin/Client) --- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--bg-dark);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 500;
  overflow-y: auto;
}

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

.sidebar-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-brand {
  font-family: var(--font-main);
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
}

.sidebar-role {
  font-size: 0.7rem;
  color: var(--secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidebar-nav {
  flex: 1;
  padding: 1.5rem 1rem;
}

.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}
.sidebar-section-label:first-child { margin-top: 0; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.75rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 0.25rem;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(108, 63, 168, 0.35);
  color: white;
}
.sidebar-nav a.active { background: var(--primary); }

.sidebar-footer {
  padding: 1.5rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.app-main {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  background: var(--bg-main);
}

.app-topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 400;
}

.app-content {
  padding: 2rem;
}

/* --- Stats Cards --- */
.stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}

/* --- Book Reader --- */
.reader-container {
  background: #2D2D2D;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.reader-toolbar {
  background: #1A1A1A;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  user-select: none;
}

.reader-toolbar-title {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
}

.reader-mode-toggle {
  display: flex;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  padding: 3px;
}

.reader-mode-btn {
  padding: 0.35rem 1rem;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  color: rgba(255,255,255,0.5);
}

.reader-mode-btn.active {
  background: var(--primary);
  color: white;
}

.reader-body {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 2rem;
}

/* Anti-copy protections */
.pdf-viewer {
  position: relative;
  max-width: 900px;
  width: 100%;
}

.pdf-viewer::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: default;
}

.watermark-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-30deg);
  opacity: 0.04;
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
  white-space: nowrap;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  user-select: none;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; gap: 3rem; }
  .hero-book { order: -1; }
  .book-mockup { width: 200px; height: 270px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .navbar-nav { display: none; }
  .hamburger { display: flex; }
  .sidebar { transform: translateX(-100%); transition: var(--transition); }
  .sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .pricing-card.featured { transform: scale(1); }
  .app-content { padding: 1rem; }
}

@media (max-width: 480px) {
  .section { padding: 3rem 0; }
  .hero-cta { flex-direction: column; }
  .btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }
  .modal { padding: 1.5rem; }
}

/* --- Animations --- */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

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

.slide-in-right {
  animation: slideInRight 0.4s ease forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Scrollbar custom --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* --- Protected content --- */
.protected-zone {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* Désactiver le clic droit visuel */
.no-context { position: relative; }

/* === Stepper Checkout === */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
}
.step.active { color: var(--primary); }
.step.done { color: var(--success); }

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  transition: var(--transition);
  background: white;
}
.step.active .step-circle { background: var(--primary); border-color: var(--primary); color: white; }
.step.done .step-circle { background: var(--success); border-color: var(--success); color: white; }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  max-width: 80px;
}
.step-line.done { background: var(--success); }

/* === Cookie Banner === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3000;
  background: var(--bg-dark);
  color: white;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  transform: translateY(100%);
  transition: var(--transition);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-text { font-size: 0.88rem; line-height: 1.6; flex: 1; }
.cookie-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }

/* === GDPR Checkbox === */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}
.checkbox-label {
  font-size: 0.88rem;
  color: var(--text-medium);
  line-height: 1.5;
  cursor: pointer;
}
.checkbox-label a { color: var(--primary); text-decoration: underline; }

/* === Progress Bar === */
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* Input password toggle */
.input-group {
  position: relative;
}
.input-group .form-input { padding-right: 3rem; }
.input-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1rem;
}

/* === Section Titles === */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}
.section-title {
  margin-bottom: 1rem;
}
.section-desc {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-light);
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-light { color: var(--text-light); }
.text-white { color: white; }
.fw-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.visible { display: block !important; }
