/* =================================================
   DESIGN SPÉCIFIQUE : PAGE TOME 1 (GOLD THEME)
   ================================================= */
:root {
    --tome1-color: #eab308;       /* Jaune Or principal */
    --tome1-light: #fefce8;       /* Jaune très très clair (fond) */
    --tome1-border: #fde047;      /* Bordure */
    --tome1-dark: #854d0e;        /* Texte foncé jaune */
}

/* --- 1. HERO SECTION (En-tête) --- */
.book-hero-section {
    background: linear-gradient(to bottom, #fff 0%, #fefce8 100%);
    
    /* CORRECTION ICI : */
    padding-top: 1.5em; /* C'était 4em. On réduit pour remonter le tout */
    padding-bottom: 4em; /* On garde de l'espace en bas */
    border-bottom: 1px solid var(--tome1-border);
}

/* Style amélioré pour le lien "Retour" */
.breadcrumb {
    margin-bottom: 3em; /* Espace entre le lien et le livre */
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.breadcrumb a {
    text-decoration: none;
    color: #94a3b8; /* Gris discret par défaut */
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Espace entre la flèche et le texte */
    transition: all 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--tome1-dark) !important; /* Devient foncé au survol */
    transform: translateX(-5px); /* Petite animation vers la gauche */
}

.hero-grid {
    display: flex;
    align-items: center;
    gap: 4em;
    margin-top: 2em;
}

/* Image 3D du livre */
.hero-image { flex: 1; display: flex; justify-content: center; }
.book-3d-wrapper img {
    max-width: 280px;
    width: 100%;
    border-radius: 4px;
    box-shadow: -12px 12px 20px rgba(0,0,0,0.15), -4px 4px 6px rgba(0,0,0,0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}
.book-3d-wrapper img:hover { transform: perspective(1000px) rotateY(0deg) scale(1.02); }

/* Contenu Texte */
.hero-content { flex: 1.5; }

.hero-badge {
    background: var(--tome1-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-content h2 {
    font-size: 2.2em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    color: #0f172a;
}

.hero-desc { font-size: 1.1em; line-height: 1.6; color: #475569; }

/* Boite "Statistique Clé" */
.hero-key-stat {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border: 1px solid var(--tome1-border);
    padding: 15px 20px;
    border-radius: 8px;
    margin: 2em 0;
    box-shadow: 0 4px 6px rgba(234, 179, 8, 0.1);
}
.stat-icon { font-size: 2em; color: var(--tome1-color); }
.stat-text strong { display: block; color: var(--tome1-dark); font-size: 1.1em; }
.stat-text span { font-size: 0.9em; color: #854d0e; }

/* Boutons d'action */
.hero-actions { display: flex; gap: 1em; flex-wrap: wrap; }
.hero-actions .button.primary {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    box-shadow: 0 4px 10px rgba(234, 179, 8, 0.4);
    border: none;
    color: #fff !important;
}

/* --- 2. GRILLE FICHIERS (Scripts) --- */
.section-gray { background-color: #f8fafc; border-top: 1px solid #e2e8f0; padding: 4em 0; }

.download-all-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2.5em;
}
.special-dl {
    background: #0f172a; 
    color: #fff !important;
}
.meta-info { font-size: 0.85em; color: #94a3b8; font-style: italic; }

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5em;
}

.file-card {
    background: #fff;
    padding: 1.2em;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}
.file-card:hover {
    border-color: var(--tome1-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.file-icon { font-size: 1.6em; color: #cbd5e1; }
.file-card:hover .file-icon { color: var(--tome1-color); }

.file-details { flex: 1; }
.file-details h4 { margin: 0; font-size: 1em; color: #334155; }
.file-details span { font-size: 0.8em; color: #94a3b8; }

.download-btn-mini {
    width: 35px; height: 35px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    transition: all 0.2s;
}
.file-card:hover .download-btn-mini {
    background: var(--tome1-color);
    color: #fff;
}

/* --- 3. TABLEAU ERRATA --- */
.errata-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.errata-table { width: 100%; border-collapse: collapse; background: #fff; }
.errata-table th {
    background: #f8fafc;
    text-align: left;
    padding: 1em;
    font-size: 0.9em;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}
.errata-table td {
    padding: 1em;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    font-size: 0.95em;
}
.errata-table tr:last-child td { border-bottom: none; }

.page-num { font-weight: 800; color: #0f172a; }
.exo-ref { font-family: monospace; color: #64748b; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }
.text-error { color: #ef4444; }
.text-correct { color: #15803d; }

/* --- RESPONSIVE --- */
@media screen and (max-width: 900px) {
    .hero-grid { flex-direction: column; text-align: center; }
    .hero-content { width: 100%; }
    .hero-actions { justify-content: center; }
    .hero-key-stat { text-align: left; }
    .book-3d-wrapper img { max-width: 200px; }
    .download-all-wrapper { flex-direction: column; align-items: flex-start; }
}