/* Material Symbols — paramètres globaux */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    line-height: 1;
    user-select: none;
}

/* Variables CSS */
:root {
    --primary-color: #059669;
    --primary-hover: #047857;
    --primary-light: #D1FAE5;
    --primary-glow: rgba(5, 150, 105, 0.15);

    --accent-color: #D97706;
    --accent-hover: #B45309;
    --accent-light: #FEF3C7;

    --secondary-color: #64748B;
    --success-color: #10B981;
    --error-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;

    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #F1F5F9;

    --border-color: #E2E8F0;
    --border-light: #F1F5F9;

    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 10px -5px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-green: 0 4px 20px rgba(5, 150, 105, 0.25);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --border-radius: 10px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --transition: all 0.2s ease;
    --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === Accessibilité — utilitaires globaux === */

/* Focus visible pour tous les éléments interactifs non stylisés */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* Contenu visible uniquement par les lecteurs d'écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Lien "Aller au contenu principal" */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    z-index: 10000;
    border-radius: 0 0 var(--border-radius) 0;
    text-decoration: none;
    transition: none;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: -3px;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-slow);
    text-decoration: none;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.2s;
}

.btn:hover::after {
    background: rgba(255,255,255,0.08);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: var(--shadow-green);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #065F46 100%);
    color: white;
    box-shadow: 0 6px 25px rgba(5, 150, 105, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-green);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #92400E 100%);
    color: white;
    box-shadow: 0 6px 25px rgba(217, 119, 6, 0.45);
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(5, 150, 105, 0.08);
    color: var(--primary-color);
    border-color: transparent;
}

.btn-ghost:hover {
    background: rgba(5, 150, 105, 0.15);
    color: var(--primary-hover);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    border-radius: var(--border-radius-lg);
}

.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.8125rem;
    border-radius: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 5rem 0 4rem;
    text-align: center;
    background: linear-gradient(160deg, #0D1117 0%, #0F2B1F 45%, #0D1A2E 100%);
    overflow: hidden;
    isolation: isolate;
    /* Full-bleed: escape main-content padding */
    margin: -2rem -2.5rem 0;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 50%, rgba(5, 150, 105, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 80% 30%, rgba(217, 119, 6, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(5, 150, 105, 0.08) 0%, transparent 50%);
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    border: 1px solid rgba(5, 150, 105, 0.08);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(5, 150, 105, 0.15);
    border: 1px solid rgba(5, 150, 105, 0.3);
    color: #6EE7B7;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34D399;
    box-shadow: 0 0 6px #34D399;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5.5vw, 4.25rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: #F8FAFC;
    letter-spacing: -0.01em;
}

.hero-title-italic {
    display: block;
    font-style: italic;
    color: #CBD5E1;
}

.gradient-text {
    background: linear-gradient(135deg, #34D399 0%, #D97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.375rem;
    color: rgba(248, 250, 252, 0.7);
    margin-bottom: 1rem;
    font-weight: 400;
}

.hero-description {
    font-size: 1.0625rem;
    color: rgba(203, 213, 225, 0.9);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.hero-actions .btn-secondary {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.15);
    color: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(10px);
}

.hero-actions .btn-secondary:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
    color: white;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,0.07);
    padding-top: 2.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.hero-stat {
    flex: 1;
    min-width: 130px;
    padding: 1rem 1.5rem;
    border-right: 1px solid rgba(255,255,255,0.07);
    text-align: center;
}

.hero-stat:last-child {
    border-right: none;
}

.hero-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 0.35rem;
    background: linear-gradient(135deg, #34D399 0%, #6EE7B7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    font-size: 0.8125rem;
    color: rgba(148, 163, 184, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: #0D1117;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    /* Full-bleed */
    margin-left: -2.5rem;
    margin-right: -2.5rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.features .section-eyebrow {
    color: #34D399;
}

.features .section-title {
    color: #F8FAFC;
}

.features .feature-card h3 {
    color: #F8FAFC;
}

.features .feature-card p {
    color: rgba(148, 163, 184, 0.85);
}

.section-eyebrow {
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.0625rem;
    max-width: 500px;
    margin: 0 auto 3.5rem;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 2.5rem;
}

.feature-card {
    display: flex;
    flex-direction: column;
}

.feature-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #161B22;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34D399;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.feature-icon-box .material-symbols-outlined {
    font-size: 26px;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.feature-card:hover .feature-icon-box {
    transform: scale(1.1);
}

/* Legacy icon support */
.feature-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.625rem;
    margin-bottom: 1.25rem;
}

.feature-icon-green { background: linear-gradient(135deg, #D1FAE5, #A7F3D0); }
.feature-icon-blue  { background: linear-gradient(135deg, #DBEAFE, #BFDBFE); }
.feature-icon-amber { background: linear-gradient(135deg, #FEF3C7, #FDE68A); }
.feature-icon-purple{ background: linear-gradient(135deg, #EDE9FE, #DDD6FE); }
.feature-icon-rose  { background: linear-gradient(135deg, #FFE4E6, #FECDD3); }
.feature-icon-teal  { background: linear-gradient(135deg, #CCFBF1, #99F6E4); }

.feature-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* CTA Section */
.cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, #0D1117 0%, #0F2B1F 60%, #0D1A2E 100%);
    position: relative;
    overflow: hidden;
    /* Full-bleed */
    margin-left: -2.5rem;
    margin-right: -2.5rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 80% at 70% 50%, rgba(5, 150, 105, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 20% 30%, rgba(217, 119, 6, 0.12) 0%, transparent 60%);
}

.cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(52, 211, 153, 0.6) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.04;
    pointer-events: none;
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta-content {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    margin-bottom: 1rem;
    color: #F8FAFC;
    letter-spacing: -0.01em;
}

.cta-content p {
    font-size: 1.0625rem;
    color: rgba(148, 163, 184, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-actions .btn-secondary {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.15);
    color: rgba(248, 250, 252, 0.9);
}

.cta-actions .btn-secondary:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
    color: white;
}

/* =====================================================
   Homepage — Authenticated User View
   ===================================================== */

.home-hero {
    padding: 3rem 0 2rem;
    background: linear-gradient(160deg, #0D1117 0%, #0F1F18 55%, #0D1117 100%);
    position: relative;
    /* Full-bleed */
    margin: -2rem -2.5rem 0;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 70% at 80% 20%, rgba(52, 211, 153, 0.07) 0%, transparent 60%);
    pointer-events: none;
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
}

.home-greeting {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: #F8FAFC;
    margin-bottom: 2.5rem;
}

.home-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #F8FAFC;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
}

/* Continue reading card */
.home-continue-card {
    margin-bottom: 3rem;
}

.home-reading-scroll {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.home-reading-scroll::-webkit-scrollbar {
    height: 6px;
}

.home-reading-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
}

.home-reading-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
}

.home-reading-card {
    background: #161B22;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.2s;
    scroll-snap-align: start;
    min-width: 340px;
    flex-shrink: 0;
}

/* Single card: full width */
.home-reading-scroll .home-reading-card:only-child {
    min-width: 100%;
}

.home-reading-card:hover {
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.4);
}

.home-reading-cover {
    width: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #1e242d;
    background-size: cover;
    background-position: center;
    min-height: 170px;
}

.home-reading-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.home-reading-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #F8FAFC;
    margin-bottom: 0.25rem;
    line-height: 1.35;
}

.home-reading-author {
    color: rgba(148, 163, 184, 0.8);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.home-progress-wrap {
    margin-bottom: 1.25rem;
}

.home-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: rgba(148, 163, 184, 0.85);
    margin-bottom: 0.5rem;
}

.home-progress-pct {
    color: #34D399;
    font-weight: 600;
}

.home-progress-bar {
    height: 6px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.home-progress-fill {
    height: 100%;
    border-radius: 100px;
    background: #34D399;
    transition: width 0.5s ease;
}

.home-resume-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.home-resume-btn .material-symbols-outlined {
    font-size: 18px;
}

/* Empty reading state */
.home-empty-reading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2.5rem;
    background: #161B22;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    text-align: center;
    color: rgba(148, 163, 184, 0.8);
    margin-bottom: 3rem;
}

.home-empty-icon {
    font-size: 2.5rem;
    color: rgba(52, 211, 153, 0.5);
}

/* Stats section */
.home-stats-section {
    padding: 3rem 0;
    background: #0D1117;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    /* Full-bleed */
    margin-left: -2.5rem;
    margin-right: -2.5rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.home-stat-card {
    background: #161B22;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.home-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(52, 211, 153, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34D399;
    margin-bottom: 0.5rem;
}

.home-stat-icon .material-symbols-outlined {
    font-size: 22px;
}

.home-stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: #F8FAFC;
    line-height: 1;
}

.home-stat-label {
    font-size: 0.875rem;
    color: rgba(148, 163, 184, 0.8);
}

/* Featured CTA */
.home-featured-cta {
    padding: 4rem 0;
    background: #090C10;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    /* Full-bleed */
    margin-left: -2.5rem;
    margin-right: -2.5rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.home-featured-cta-inner {
    text-align: center;
}

.home-featured-cta h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    color: #F8FAFC;
    margin-bottom: 0.75rem;
}

.home-featured-cta p {
    font-size: 1rem;
    color: rgba(148, 163, 184, 0.85);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
}

.home-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.home-cta-btn .material-symbols-outlined {
    font-size: 18px;
}

/* Responsive */
@media (max-width: 640px) {
    .home-reading-card {
        flex-direction: column;
        min-width: 280px;
    }
    .home-reading-cover {
        width: 100%;
        min-height: 220px;
    }
    .home-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Auth Pages */
.auth-page {
    background: linear-gradient(160deg, #0D1117 0%, #0F2B1F 50%, #0D1A2E 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255,255,255,0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    display: inline-block;
}

.auth-header h1 {
    font-size: 1.625rem;
    font-weight: 800;
    margin-bottom: 0.375rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.auth-form {
    margin-top: 1.75rem;
}

.auth-footer {
    margin-top: 1.75rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.auth-footer p {
    margin: 0.5rem 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: var(--font-family);
}

.form-control:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.form-control:disabled {
    background-color: var(--bg-tertiary);
    cursor: not-allowed;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #D1FAE5;
    color: #065F46;
    border: 1px solid #10B981;
}

.alert-error {
    background-color: #FEE2E2;
    color: #991B1B;
    border: 1px solid #EF4444;
}

/* Profile */
.profile-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.profile-card {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.profile-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-stats {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.stats-grid {
    display: grid;
    gap: 1rem;
}

.stat-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: #090C10;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 4rem 4rem 2rem;
    margin-top: 0;
    color: rgba(148, 163, 184, 0.9);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.footer-logo-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #F8FAFC;
}

.footer-section h3,
.footer-section h4 {
    color: #F8FAFC;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    letter-spacing: 0.03em;
}

.footer-section p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(148, 163, 184, 0.85);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.625rem;
}

.footer-section ul li a {
    color: rgba(148, 163, 184, 0.9);
    font-size: 0.875rem;
    transition: color 0.2s;
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: #6EE7B7;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.8125rem;
    color: rgba(148, 163, 184, 0.5);
}

@media (max-width: 900px) {
    .footer {
        padding: 3rem 2rem 1.5rem;
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 2.5rem 1.5rem 1.5rem;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .footer-section ul {
        padding: 0;
    }
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================
   CATALOG STYLES
   ============================ */

/* Catalog Header */
.catalog-header {
    background: linear-gradient(160deg, #0D1117 0%, #0F2B1F 60%, #0D1A2E 100%);
    padding: 3rem 0 2rem;
    color: white;
    text-align: center;
}

.catalog-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.catalog-header .subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Search Bar */
.search-bar {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.search-input:focus {
    outline: 3px solid #34D399;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.35), var(--shadow-lg);
}

.quick-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.mobile-only {
    display: none !important;
}

.filter-toggle {
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.filter-toggle:hover {
    background-color: rgba(52, 211, 153, 0.15);
    border-color: rgba(52, 211, 153, 0.45);
    color: #34D399;
}

.results-count {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Catalog Layout */
.catalog-container {
    margin-top: 2rem;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Filters Sidebar */
.filters-sidebar {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.filters-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group h4 {
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-color);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-options.scrollable {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0;
}

.checkbox-label:hover,
.radio-label:hover {
    color: var(--primary-color);
    font-weight: 500;
}

.checkbox-label .count {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.select-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    background-color: white;
}

.btn-block {
    width: 100%;
}

/* Catalog Main */
.catalog-main {
    min-height: 500px;
}

/* Sort Bar */
.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.875rem 1.25rem;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.sort-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sort-select {
    padding: 0.45rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    background-color: white;
    cursor: pointer;
    transition: var(--transition);
}

.sort-select:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.view-toggle {
    display: flex;
    gap: 0.375rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: var(--border-radius);
}

.view-btn {
    padding: 0.375rem 0.625rem;
    background-color: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    color: var(--text-muted);
}

.view-btn:hover,
.view-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #34D399);
    color: white;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* Ebooks Grid */
.ebooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ebook-card {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    position: relative;
}

.ebook-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #34D399);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-slow);
    z-index: 1;
}

.ebook-card:hover {
    box-shadow: var(--shadow-green);
    transform: translateY(-6px);
    border-color: rgba(5, 150, 105, 0.18);
}

.ebook-card:hover::before {
    transform: scaleX(1);
}

.ebook-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.ebook-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background-color: var(--bg-tertiary);
    overflow: hidden;
}

.cover-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-muted);
}

.ebook-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: linear-gradient(135deg, var(--primary-color), #059669);
    color: white;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.badge-favorite {
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.ebook-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ebook-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.ebook-author {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.ebook-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stars {
    color: #F59E0B;
}

.reviews-count {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.no-rating {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.ebook-price {
    margin-bottom: 0.5rem;
}

.price {
    font-size: 1.125rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), #34D399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ebook-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: auto;
}

.ebook-actions {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
}

.ebook-actions .btn {
    font-size: 0.8125rem;
    padding: 0.45rem 0.6rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--bg-secondary);
}

.btn-outline.favorite-active {
    background-color: #FEE2E2;
    border-color: #EF4444;
    color: #EF4444;
}

/* Bouton Filtrer dans le header sombre du catalogue */
.filter-toggle.btn-outline {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    color: white;
}

/* List View */
.ebooks-grid.list-view {
    grid-template-columns: 1fr;
}

.ebooks-grid.list-view .ebook-card {
    flex-direction: row;
}

.ebooks-grid.list-view .ebook-cover {
    width: 150px;
    flex-shrink: 0;
}

.ebooks-grid.list-view .ebook-link {
    flex-direction: row;
}

.ebooks-grid.list-view .ebook-description {
    display: block;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    border: 1px dashed var(--border-color);
}

.empty-icon {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.35;
    display: block;
}

.empty-state h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

/* Pagination */
.pagination {
    margin-top: 2.5rem;
}

.pagination-list {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    list-style: none;
}

.pagination-list li {
    display: inline-block;
}

.page-link {
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.page-link:hover {
    background-color: rgba(5, 150, 105, 0.07);
    color: var(--primary-color);
    border-color: rgba(5, 150, 105, 0.3);
}

.pagination-list li.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), #34D399);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.pagination-list li.disabled .page-link {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================
   EBOOK DETAIL PAGE
   ============================ */

/* Breadcrumb */
.breadcrumb-nav {
    padding: 0.875rem 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

.breadcrumb li::after {
    content: '›';
    margin-left: 0.5rem;
    color: var(--text-muted);
    font-weight: 300;
}

.breadcrumb li:last-child::after {
    content: '';
}

.breadcrumb li.active {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Ebook Detail Layout */
.ebook-detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

/* Ebook Sidebar */
.ebook-sidebar {
    position: sticky;
    top: 80px;
}

.ebook-cover-large {
    width: 100%;
    aspect-ratio: 3/4;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-xl), 0 0 40px rgba(5, 150, 105, 0.12);
}

.cover-image-large {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder-large {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: var(--text-muted);
}

.purchase-box {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    padding: 1.75rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-green);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(5, 150, 105, 0.14);
}

.price-info {
    text-align: center;
    margin-bottom: 1.25rem;
}

.current-price {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), #34D399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1;
}

.btn-large {
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.ebook-meta {
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.ebook-meta h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.meta-list {
    display: grid;
    gap: 0.75rem;
}

.meta-list dt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.meta-list dd {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-left: 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bg-tertiary);
}

.meta-list dd:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Ebook Main Content */
.ebook-main-content {
    background-color: var(--bg-primary);
    padding: 2.25rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.ebook-title-large {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.ebook-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.author-info,
.publisher-info {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.author-link {
    color: var(--primary-color);
    font-weight: 500;
}

.author-link:hover {
    text-decoration: underline;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-radius: var(--border-radius);
}

.rating-display {
    text-align: center;
}

.big-rating {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), #34D399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1;
}

.stars-large {
    font-size: 1.5rem;
    color: #F59E0B;
}

.no-rating-text {
    color: var(--text-muted);
}

.rating-details {
    color: var(--text-secondary);
}

.ebook-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.category-tag {
    padding: 0.375rem 0.875rem;
    background-color: rgba(5, 150, 105, 0.06);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.category-tag:hover {
    background: linear-gradient(135deg, var(--primary-color), #34D399);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.ebook-description {
    margin: 2rem 0;
}

.ebook-description h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.ebook-description p {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Reviews Section */
.reviews-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.review-form {
    background: linear-gradient(135deg, #f8fafb, #f0fdf4);
    padding: 1.75rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 2rem;
    border: 1px solid rgba(5, 150, 105, 0.1);
}

.review-form h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.rating-input {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input label {
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition);
    background: white;
}

.rating-input label:hover,
.rating-input input[type="radio"]:checked + label {
    background: linear-gradient(135deg, var(--primary-color), #34D399);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.review-item {
    padding: 1.5rem;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.review-item:hover {
    border-color: rgba(5, 150, 105, 0.2);
    box-shadow: var(--shadow-sm);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.review-author strong {
    font-weight: 600;
}

.review-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.review-rating {
    color: #F59E0B;
}

.review-content {
    line-height: 1.6;
    color: var(--text-secondary);
}

.no-reviews {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

/* Related Books */
.related-books {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.related-books h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.related-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.25rem;
}

.related-book-card {
    text-align: center;
    transition: var(--transition-slow);
    border-radius: var(--border-radius);
    padding: 0.5rem;
}

.related-book-card:hover {
    transform: translateY(-4px);
}

.related-book-card a {
    text-decoration: none;
    color: inherit;
}

.related-cover {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-slow);
}

.related-book-card:hover .related-cover {
    box-shadow: var(--shadow-green);
}

.related-cover-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary), #e8f5e9);
    border-radius: var(--border-radius);
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-slow);
}

.related-book-card:hover .related-cover-placeholder {
    box-shadow: var(--shadow-green);
}

.related-book-card h4 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.related-book-card p {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

/* ============================
   CATEGORIES PAGE
   ============================ */

.categories-header {
    background: linear-gradient(160deg, #0D1117 0%, #0F2B1F 60%, #0D1A2E 100%);
    padding: 3rem 0;
    color: white;
    text-align: center;
}

.categories-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.categories-header .subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-card-large {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
}

.category-card-large:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.category-link {
    display: block;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.category-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.category-stats {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.subcategories {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.subcategories-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.subcategories-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subcategory-link {
    font-size: 0.875rem;
    color: var(--primary-color);
}

.subcategory-link .count {
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* Category Detail */
.category-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.category-info {
    display: flex;
    align-items: start;
    gap: 1.5rem;
}

.category-icon-large {
    font-size: 4rem;
}

.category-meta {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.subcategories-nav {
    margin-top: 1.5rem;
}

.subcategories-nav h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.subcategories-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chip {
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.chip:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Author Detail */
.author-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.author-info {
    display: flex;
    align-items: start;
    gap: 1.5rem;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    flex-shrink: 0;
}

.author-bio {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 0.5rem;
}

.author-meta {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Alert Container for Toasts */
.alert-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 1000;
    max-width: 400px;
}

.alert-dismissible {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert.fade-out {
    animation: fadeOut 0.3s ease;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Quick Search Results */
.quick-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 60px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.quick-search-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.quick-search-item:hover {
    background-color: var(--bg-secondary);
}

.quick-search-item:last-child {
    border-bottom: none;
}

.quick-search-cover {
    width: 50px;
    height: 70px;
    flex-shrink: 0;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.quick-search-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-search-info {
    flex: 1;
}

.quick-search-info .title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.quick-search-info .author {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.quick-search-info .price {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
}

.no-results {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Alert Info */
.alert-info {
    background-color: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #3B82F6;
}

/* Responsive */
@media (max-width: 1024px) {
    /* Tablet: sidebar.css sets padding-top to calc(58px + 1.75rem), left/right still 2.5rem */
    .hero {
        margin: -1.75rem -2.5rem 0;
    }

    .features {
        margin-left: -2.5rem;
        margin-right: -2.5rem;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }

    .cta {
        margin-left: -2.5rem;
        margin-right: -2.5rem;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

@media (max-width: 768px) {
    /* Mobile: sidebar.css sets padding: 1rem everywhere except top */
    .hero {
        margin: -1rem -1rem 0;
        padding: 3.5rem 1rem 3rem;
    }

    .features {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .cta {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 0;
    }

    .hero-stat {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.07);
        padding: 0.875rem 1rem;
    }

    .hero-stat:last-child {
        border-bottom: none;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.5rem;
    }

    @media (max-width: 600px) {
        .features-grid { grid-template-columns: 1fr; }
    }

    .profile-container {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        display: none;
    }

    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--bg-primary);
        z-index: 999;
        max-height: 100vh;
    }

    .filters-sidebar.active {
        display: block;
    }

    .ebooks-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .ebook-detail-layout {
        grid-template-columns: 1fr;
    }

    .ebook-sidebar {
        position: static;
    }

    .ebook-cover-large {
        max-width: 300px;
        margin: 0 auto 1.5rem;
    }

    .catalog-header h1 {
        font-size: 2rem;
    }

    /* --- Search bar compacte sur mobile --- */
    .search-input {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }

    .search-bar .btn {
        padding: 0.625rem 0.875rem;
        min-width: 44px;
    }

    .mobile-only {
        display: flex;
    }

    .filter-toggle {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }

    .quick-filters {
        gap: 0.75rem;
        margin-top: 1rem;
    }

    /* --- Catégories : liste compacte sur mobile --- */
    .categories-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-lg);
        overflow: hidden;
        margin: 1.5rem 0;
    }

    .category-card-large {
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid var(--border-color);
    }

    .category-card-large:last-child {
        border-bottom: none;
    }

    .category-card-large:hover {
        transform: none;
        box-shadow: none;
        background-color: rgba(52, 211, 153, 0.06);
    }

    .category-link {
        display: flex;
        align-items: center;
        padding: 0.875rem 1rem;
    }

    .category-link::after {
        content: "›";
        font-size: 1.4rem;
        line-height: 1;
        color: var(--text-muted);
        margin-left: 0.5rem;
        flex-shrink: 0;
    }

    .category-content {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        min-width: 0;
    }

    .category-name {
        font-size: 0.9375rem;
        margin: 0;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .category-description,
    .subcategories {
        display: none;
    }

    .category-stats {
        font-size: 0.8125rem;
        flex-shrink: 0;
    }

    .ebook-title-large {
        font-size: 1.75rem;
    }

    .related-books-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* ========================================
   PHASE 4 ÉTAPE 2 - PAGES UTILISATEUR
   ======================================== */

/* === Page Header Générique === */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0 0 0.5rem;
    font-size: 2.5rem;
}

.page-header .subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* === Statistiques Cards === */
.library-stats,
.favorites-stats,
.reviews-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.875rem;
}

/* === Contrôles de Bibliothèque === */
.library-controls,
.favorites-controls,
.reviews-controls {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.tab-btn:hover {
    background: #f9fafb;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-select,
.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
}

/* === Progress Badge et Barre === */
.progress-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    transition: width 0.3s ease;
}

.purchase-date,
.added-date {
    margin-top: 0.5rem;
    color: #6b7280;
}

/* === Reviews List === */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.review-ebook-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.review-ebook-cover {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.review-ebook-details {
    flex: 1;
}

.review-ebook-title {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}

.review-ebook-title a {
    color: inherit;
    text-decoration: none;
}

.review-ebook-title a:hover {
    color: var(--primary-color);
}

.review-ebook-author {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    font-size: 1.1rem;
}

.rating-value {
    color: #6b7280;
    font-size: 0.875rem;
}

.review-date {
    color: #6b7280;
    font-size: 0.875rem;
}

.review-comment {
    margin: 1rem 0;
    line-height: 1.6;
    color: #374151;
}

.review-comment-empty {
    margin: 1rem 0;
    color: #9ca3af;
    font-style: italic;
}

.review-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-danger {
    color: var(--error-color);
}

.btn-danger:hover {
    background: #fee2e2;
}

/* === Modal === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--error-color);
}

.modal form {
    padding: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* === Rating Input === */
.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input label {
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s;
}

.rating-input input[type="radio"]:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: #fbbf24;
}

/* === Interface de Lecture === */
.reading-mode {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.reading-header {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.reading-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    gap: 1rem;
}

.btn-back {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-back:hover {
    background: #f3f4f6;
}

.reading-title {
    flex: 1;
    text-align: center;
}

.reading-title h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.reading-author {
    display: block;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.reading-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: #f3f4f6;
}

.reading-progress-bar {
    height: 4px;
    background: #e5e7eb;
    position: relative;
}

.reading-progress-fill {
    height: 100%;
    background: var(--success-color);
    transition: width 0.3s ease;
}

.reading-progress-text {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #6b7280;
}

.reading-content {
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.reading-container {
    max-width: 900px;
    margin: 0 auto;
}

.reading-viewer {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    min-height: 600px;
}

/* Placeholder de lecteur */
.reader-placeholder {
    text-align: center;
    padding: 3rem;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.placeholder-info {
    background: #f9fafb;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
}

.placeholder-info h3 {
    margin-top: 0;
}

.placeholder-info ul {
    list-style: none;
    padding: 0;
}

.placeholder-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.placeholder-info li:last-child {
    border-bottom: none;
}

.page-simulator {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #eff6ff;
    border-radius: 8px;
}

.simulator-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Panneau de paramètres */
.reading-settings {
    position: fixed;
    right: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 101;
    overflow-y: auto;
}

.reading-settings.active {
    right: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.settings-header h3 {
    margin: 0;
}

.settings-content {
    padding: 1.5rem;
}

.setting-group {
    margin-bottom: 2rem;
}

.setting-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.setting-buttons {
    display: flex;
    gap: 0.5rem;
}

.setting-buttons .btn {
    flex: 1;
}

/* Footer de lecture (mobile) */
.reading-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.btn-nav {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-nav:hover {
    background: #1e40af;
}

.page-info {
    font-weight: 500;
}

/* Thèmes de lecture */
.theme-light {
    background: white;
    color: #1f2937;
}

.theme-sepia {
    background: #f4ecd8;
    color: #5b4636;
}

.theme-dark {
    background: #1f2937;
    color: #f3f4f6;
}

/* Tailles de police */
.font-small {
    font-size: 0.875rem;
}

.font-medium {
    font-size: 1rem;
}

.font-large {
    font-size: 1.25rem;
}

/* === Responsive Mobile === */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.75rem;
    }

    .library-stats,
    .favorites-stats,
    .reviews-stats {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .library-controls,
    .favorites-controls,
    .reviews-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-tabs,
    .sort-controls {
        width: 100%;
        justify-content: center;
    }

    .review-card {
        padding: 1rem;
    }

    .review-ebook-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .reading-nav {
        padding: 0.75rem 1rem;
    }

    .reading-title h1 {
        font-size: 1rem;
    }

    .reading-viewer {
        padding: 1.5rem;
    }

    .reading-content {
        padding: 1rem;
        padding-bottom: 4rem;
    }

    .simulator-controls {
        flex-direction: column;
    }
}

/* ========================================
   ADMIN PANEL STYLES
   ======================================== */

/* === Admin Dashboard === */
.admin-dashboard {
    padding: 2rem 0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-header h1 {
    font-size: 2rem;
    margin: 0;
}

.admin-header p {
    margin: 0.5rem 0 0;
    color: var(--text-secondary);
}

/* === Statistics Grid === */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Quick Actions === */
.admin-quick-actions {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.admin-quick-actions h2 {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    font-weight: 500;
}

.action-btn:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-btn.primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
}

.action-btn .icon {
    font-size: 1.5rem;
}

/* === Admin Sections === */
.admin-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.admin-section h2 {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
}

.activity-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.activity-placeholder p:first-child {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* === Admin Content === */
.admin-content {
    padding: 2rem 0;
}

/* === Alerts === */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    transition: opacity 0.3s ease;
}

.alert-success {
    background: #D1FAE5;
    border: 1px solid var(--success-color);
    color: #065F46;
}

.alert-error {
    background: #FEE2E2;
    border: 1px solid var(--error-color);
    color: #991B1B;
}

.alert-warning {
    background: #FEF3C7;
    border: 1px solid var(--warning-color);
    color: #92400E;
}

.alert-info {
    background: #DBEAFE;
    border: 1px solid var(--primary-color);
    color: #1E40AF;
}

/* === Admin Filters === */
.admin-filters {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.filter-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* === Admin Table === */
.admin-table-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
}

.admin-table th {
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.admin-table tbody tr:hover {
    background: var(--bg-secondary);
}

.table-thumbnail {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.table-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.table-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.price-badge {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
}

.category-badge {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
}

.stat-number {
    font-weight: 600;
    color: var(--text-primary);
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
}

.rating-display .star {
    font-size: 1rem;
}

.rating-display .review-count {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* === Action Buttons === */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem 0.5rem;
    transition: var(--transition);
    opacity: 0.7;
}

.btn-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.btn-icon.btn-danger:hover {
    opacity: 1;
}

.btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* === Admin Form === */
.admin-form {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label.required::after {
    content: ' *';
    color: var(--error-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.field-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* === Info Box === */
.info-box {
    background: #DBEAFE;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
}

.info-box p {
    margin: 0;
    color: #1E40AF;
}

/* === Button Styles === */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: white;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* === Responsive Admin === */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .admin-table-container {
        overflow-x: scroll;
    }

    .admin-table {
        min-width: 800px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}


/* === Accessibilité — Réduction des animations (WCAG 2.3.3) === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
