/* =================================================
   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; }
}
/* --- LE BOUTON STYLÉ --- */
.sidebar-contact-btn {
    display: flex;
    align-items: center;       /* Centre verticalement */
    justify-content: center;   /* Centre horizontalement */
    gap: 12px;                 /* Espace propre entre icône et texte */
    
    width: 100%;               /* Prend toute la largeur dispo */
    max-width: 240px;          /* Mais ne devient pas gigantesque */
    padding: 12px 20px;        /* Hauteur confortable */
    
    /* Style "Ghost" sur fond foncé */
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;       /* Forme de "pilule" moderne */
    
    /* Texte */
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    transition: all 0.3s ease;
}

/* L'icône dans le bouton */
.sidebar-contact-btn i {
    font-size: 1.1em;
    margin: 0; 
    line-height: 1; /* Fixe l'alignement vertical */
}

/* EFFET AU SURVOL */
.sidebar-contact-btn:hover {
    background: var(--color-blue); /* Fond bleu */
    border-color: var(--color-blue);
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
/* =================================================
   MINI AVATARS (Sidebar) - Thème Vert (Tome 1)
   ================================================= */
.sidebar-avatars {
    display: flex;
    justify-content: center;
    gap: 15px; 
    margin-top: 2em; 
    padding-bottom: 0.5em;
}

.avatar-link {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 50%; 
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2); 
    background-color: #fff;
    border-bottom: none !important; 
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.avatar-link img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center top;
    display: block;
}

/* Effet au survol : Adapté au vert du Tome 1 */
.avatar-link:hover {
    transform: translateY(-3px) scale(1.05); 
    border-color: var(--tome1-color); /* Bordure verte */
    box-shadow: 0 4px 15px rgba(132, 204, 22, 0.5); /* Halo vert tendre */
}
/* =================================================
   STYLES YOUTUBE (Animations & Boutons)
   ================================================= */

/* Le bloc statistique YouTube */
.youtube-stat {
    border-left: 3px solid #ff0000; /* Liseré rouge sur le côté si vous en avez un */
    background: linear-gradient(to right, rgba(255, 0, 0, 0.03), transparent);
}

.youtube-stat .stat-icon {
    color: #ff0000; 
    background: rgba(255, 0, 0, 0.1); /* Cercle rouge clair derrière l'icône */
}

/* Le bouton YouTube */
.btn-youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #ffffff !important;
    border: none;
}

.btn-youtube:hover {
    background: linear-gradient(135deg, #e60000 0%, #b30000 100%);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(255, 0, 0, 0.3);
}
/* --- RÉDUCTION DE L'ESPACE DES BLOCS FEATURES --- */
.stats-container {
    margin-top: 1em !important;    
    margin-bottom: 1.5em !important; 
    gap: 10px !important;          
}

.hero-key-stat {
    padding: 10px 20px !important; 
    min-height: auto !important;   
    margin: 0 !important; /* Ajout important pour écraser le margin: 2em 0 du code d'origine */
}

.hero-key-stat .stat-text strong {
    font-size: 0.95em;
    margin-bottom: 2px;
}
.hero-key-stat .stat-text span {
    font-size: 0.85em;
}
/* --- RÉDUCTION DE L'ESPACE DES BOUTONS --- */
.buttons-row {
    margin-top: 0.5em !important; 
    gap: 10px !important;         
}

.btn-modern {
    padding: 10px 20px !important; 
    font-size: 0.85em !important;  
}