* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Variables existantes */
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-bg: #ecf0f1;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f8f9fa;
    text-align: justify;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ------------------------------------------------------------------- */
/* ------------------- Navigation & Généralités ---------------------- */
/* ------------------------------------------------------------------- */

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000; /* NOUVEAU : Z-INDEX très haut pour s'assurer que rien ne le couvre */
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.8em;
    margin-bottom: 0.2rem;
}

.nav-brand .tagline {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Bouton Hamburger (caché par défaut) */
.nav-toggle {
    display: none; 
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.8em; 
    cursor: pointer;
    padding: 0;
    transition: color 0.3s ease;
    z-index: 1001; /* Doit être au-dessus de la barre et du menu */
}

.nav-toggle:hover {
    color: var(--secondary-color);
}


.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    /* CORRECTION PC : Assure que le menu est bien poussé à droite */
    margin-left: auto;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    background-attachment: fixed;
    color: var(--white);
    padding: 120px 20px;
    text-align: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(52, 152, 219, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    animation: floatBg 15s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255, 255, 255, 0.03) 50%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

@keyframes floatBg {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(20px, -20px);
    }
    50% {
        transform: translate(-10px, 10px);
    }
    75% {
        transform: translate(15px, 5px);
    }
}

.hero-content h2 {
    font-size: 3.5em;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
    animation: slideInDown 0.8s ease-out;
}

.hero-content p {
    font-size: 1.5em;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-details {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 8px 20px;
    font-size: 0.9em;
    text-decoration: none;
    display: inline-block;
}

.btn-details:hover {
    background-color: #2980b9;
}

/* ------------------------------------------------------------------- */
/* ---------------------- Page Détails du Livre ---------------------- */
/* ------------------------------------------------------------------- */

.book-details-section {
    padding: 60px 0;
    background-color: var(--light-bg); 
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
}

.book-details-container {
    display: flex;
    gap: 3rem;
    background: var(--white);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Partie gauche : Couverture et Meta */
.book-details-left {
    flex-shrink: 0;
    width: 350px; 
}

.book-cover-large {
    width: 100%;
    height: auto;
    max-height: 500px; 
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.book-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;
}

.book-meta h2 {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.book-author-detail {
    font-size: 1.2em;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.book-type-detail {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.book-rating-detail {
    margin-bottom: 2rem;
}

.book-purchase h3 {
    font-size: 1.3em;
    color: var(--accent-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 0.5rem;
}

.purchase-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn-purchase {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%; 
}

.btn-purchase.btn-paper {
    background-color: var(--secondary-color);
    color: var(--white);
}
.btn-purchase.btn-paper:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Style spécifique Gumroad (eBook) */
.btn-purchase.btn-gumroad {
    background-color: #ff904e; 
    color: var(--white);
}
.btn-purchase.btn-gumroad:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
}

.purchase-note {
    font-size: 0.9em;
    color: var(--text-light);
    font-style: italic;
    text-align: center;
}

/* Partie droite : Description et détails */
.book-details-right {
    flex-grow: 1;
}

.book-content h3 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.book-description {
    line-height: 1.7;
    margin-bottom: 2rem;
    text-align: justify;
}

.book-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.book-info-table td {
    padding: 10px 0;
    border-bottom: 1px solid var(--light-bg);
}

.book-info-table strong {
    color: var(--primary-color);
}

.book-tags .tag {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

/* ------------------------------------------------------------------- */
/* ----------------------- Section Commentaires ---------------------- */
/* ------------------------------------------------------------------- */

.comments-section {
    padding: 60px 0;
}

.comments-section h2 {
    text-align: center;
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.add-comment-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    padding: 2rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.add-comment-form h3 {
    font-size: 1.5em;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

/* --- CORRECTIONS DU FORMULAIRE ET DES CHAMPS (Nouvelles règles) --- */

.add-comment-form {
    /* Ajout du style pour encadrer le formulaire */
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #ddd;
    box-shadow: var(--shadow); /* Utilisation de la variable d'ombre existante */
}

.add-comment-form h3 {
    /* Ajout d'une ligne de séparation sous le titre du formulaire */
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--primary-color); /* Mieux aligné avec le style général */
}

.form-group {
    /* Correction de l'espacement pour réduire les espaces entre les champs */
    margin-bottom: 15px; 
}

.form-group label {
    /* Assure que le label est sur sa propre ligne */
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    /* Style pour les champs de saisie */
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; 
    font-family: inherit;
    font-size: 1em;
}

.form-group textarea {
    resize: vertical;
}

/* --- STYLES SYSTÈME DE NOTATION (Étoiles) --- */

/* L'ancienne règle '.rating-input' a été remplacée par celle-ci pour utiliser les classes du HTML */
.rating-stars {
    direction: rtl; /* Inverse l'ordre pour que 5 étoiles soit à gauche */
    display: inline-block;
    unicode-bidi: bidi-override; /* Nécessaire pour l'affichage RTL */
}

.rating-stars input[type="radio"] {
    display: none; /* Cache les boutons radio standard */
}

.rating-stars label {
    color: #ccc; /* Couleur de base (gris) */
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
    margin: 0 1px; /* Réduit l'espacement entre les étoiles */
    display: inline-block; /* Assure que les labels ne sont pas en block */
}

.rating-stars label:hover,
.rating-stars label:hover ~ label {
    color: #f39c12; /* Couleur au survol */
}

.rating-stars input[type="radio"]:checked ~ label {
    color: #f39c12; /* Couleur quand c'est sélectionné (orange) */
}

/* Styles pour les messages de succès/erreur */
.alert-success, .alert-error {
    padding: 15px;
    margin-bottom: 1rem;
    border-radius: 5px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ------------------------------------------------------------------- */
/* --------------------- Sections de la Page d'Accueil ---------------- */
/* ------------------------------------------------------------------- */

/* Featured Book Section */
.featured-book-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.featured-book-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background: var(--white);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
}

.featured-book-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    /* min-height: 400px; <- Suppression pour éviter le rognage */ 
    height: auto; /* Ajout pour que la hauteur s'adapte au contenu */
    border-radius: 10px;
    position: relative;
    padding: 20px; 
}

.featured-book-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.coming-soon-badge-featured {
    text-align: center;
    color: var(--white);
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.featured-book-content h2 {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.featured-book-content h3 {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.featured-badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 1rem;
}

.featured-tagline {
    font-size: 1.3em;
    color: var(--accent-color);
    font-style: italic;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.featured-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.05em;
    text-align: justify;
}

.featured-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background-color: var(--light-bg);
    color: var(--primary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.book-formats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.format-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    border: 1px solid var(--secondary-color);
}

/* Books Section */
.books-section {
    padding: 80px 0;
    background-color: var(--white);
}

.books-section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--text-light);
    background-color: transparent;
    color: var(--text-dark);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.book-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.book-cover {
    position: relative;
    overflow: hidden;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

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

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.book-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-action:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.book-subtitle {
    color: var(--secondary-color);
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.book-formats-small {
    display: flex;
    gap: 0.5rem;
    margin: 0.8rem 0;
}

.format-small {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8em;
    color: var(--text-light);
    background-color: var(--light-bg);
    padding: 4px 10px;
    border-radius: 15px;
}

.coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.coming-soon-badge {
    text-align: center;
    color: var(--white);
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.book-info {
    padding: 1.5rem;
}

.book-info h3 {
    font-size: 1.3em;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.book-type {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 0.3rem;
}

.book-author {
    color: var(--text-light);
    font-size: 0.95em;
    margin-bottom: 0.8rem;
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    color: #f39c12;
    font-size: 0.9em;
}

.rating-count {
    color: var(--text-light);
    font-size: 0.85em;
}

.coming-soon-text {
    color: var(--accent-color);
    font-weight: 600;
    margin-top: 0.5rem;
}

/* --- Author Section --- */
.author-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.author-section h2 {
    font-size: 2.5em;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center; 
}

.author-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    justify-items: center; 
}

.author-text {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}
.author-bio {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
}

.author-socials {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.social-link:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.social-link i {
    font-size: 1.2em;
}

.author-image {
    flex-shrink: 0; 
    width: 100%; 
    max-width: 300px; 
    border-radius: 10px;
    overflow: hidden; 
    box-shadow: var(--shadow); 
}

.author-image img {
    width: 100%; 
    height: auto; 
    display: block; 
    border-radius: 10px; 
}

/* Newsletter Section */
.newsletter-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content > p {
    font-size: 1.1em;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.newsletter-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
}

.newsletter-form .form-group {
    margin-bottom: 1rem;
}

.newsletter-form input[type="text"],
.newsletter-form input[type="email"] {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--primary-color);
}

.newsletter-form input[type="text"]::placeholder,
.newsletter-form input[type="email"]::placeholder {
    color: var(--text-light);
}

.newsletter-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    cursor: pointer;
    font-size: 0.95em;
}

.newsletter-form input[type="checkbox"] {
    cursor: pointer;
}

.newsletter-note {
    font-size: 0.9em;
    opacity: 0.85;
    font-style: italic;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: var(--white);
}

.contact-section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Les règles suivantes sont importantes pour tous les formulaires, donc je les modifie */
/* pour éviter la redéfinition dans '.form-group' */
.contact-form .form-group {
    margin-bottom: 15px; /* Réduit l'espacement entre les groupes de champs */
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* IMPORTANT: pour maintenir la taille du champ */
    font-family: inherit;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    /* Ajout du conteneur du footer pour mieux aligner le contenu */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-socials {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer-socials a {
    color: var(--white);
    font-size: 1.5em;
    transition: color 0.3s ease;
}

.footer-socials a:hover {
    color: var(--secondary-color);
}
/* --- CORRECTION POUR LES LIENS DU FOOTER --- */
/* Cela assure que les liens légaux sont blancs et bien visibles sur le fond foncé du footer */
.footer-links {
    margin: 1rem 0; /* Ajoute de l'espace au-dessus et au-dessous des liens légaux */
}

.footer a {
    /* Force les liens (Mentions, CGV, etc.) à être blancs */
    color: var(--white); 
    text-decoration: none; /* Enlève le soulignement pour un look plus épuré */
    transition: color 0.3s ease;
    font-weight: 400; 
}

.footer a:hover {
    /* Couleur de survol pour un meilleur feedback */
    color: var(--secondary-color); /* Le bleu clair lors du survol */
    text-decoration: underline; 
}

/* S'assure que le séparateur (|) est également blanc */
.footer-links .separator {
    color: var(--white);
    margin: 0 0.5rem;
}
/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-hover);
    animation: slideIn 0.3s ease;
}

.close {
    color: var(--text-light);
    float: right;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--accent-color);
}

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

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

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

/* ------------------------------------------------------------------- */
/* -------------------------- Responsive ----------------------------- */
/* ------------------------------------------------------------------- */

/* Responsive Page Détails */
@media (max-width: 992px) {
    .book-details-container {
        flex-direction: column;
        padding: 2rem;
    }
    .book-details-left {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    .book-details-left .book-cover-large {
        max-height: 400px;
    }
}

/* Responsive Page Accueil */
@media (max-width: 768px) {

    /* CORRECTION CRITIQUE : Définit la référence pour le positionnement absolu et force le wrapping */
    .navbar .container {
        flex-wrap: wrap; 
        position: relative; /* Base de référence pour le positionnement absolu du menu */
    }

    /* Affiche le bouton hamburger */
    .nav-toggle {
        display: block; 
    }

    /* Le menu en mode mobile (caché par défaut) */
    .nav-menu {
        display: none; /* Cache par défaut */
        flex-direction: column;
        
        /* Positionnement absolu robuste */
        position: absolute;
        top: 100%; /* S'affiche juste sous le conteneur du logo/bouton */
        left: 0;
        right: 0; /* Prend toute la largeur */
        
        width: 100%;
        text-align: center;
        padding: 1rem 0; 
        background-color: var(--primary-color); 
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); 
        z-index: 999; /* Z-index très haut, juste en dessous de nav-toggle */
        
        /* SUPPRESSION DES PROPRIÉTÉS D'ANIMATION/TRANSITION POUR UNE MEILLEURE FIABILITÉ MOBILE */
        transition: none; 
        visibility: visible; /* Laisser visible par défaut, display: none s'en charge */
        opacity: 1; /* Laisser opaque par défaut */
        
        margin-left: 0;
        gap: 0; 
    }
    
    /* Règle pour afficher le menu lorsque la classe est ajoutée par JavaScript */
    .nav-menu.nav-open {
        display: flex;
        /* Pas besoin de redéfinir opacity et visibility, display: flex est suffisant */
    }

    /* Ajout de séparateurs pour les liens en mode colonne */
    .nav-menu li {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu a {
        display: block;
        padding: 10px 0;
    }

    .nav-menu li:first-child {
        border-top: none;
    }

    /* (Règles existantes conservées et ajustées) */
    .hero-content h2 {
        font-size: 2em;
    }

    .hero-content p {
        font-size: 1.1em;
    }

    .featured-book-container {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .featured-book-content h2 {
        font-size: 1.8em;
    }

    .featured-actions {
        flex-direction: column;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }

    .author-content {
        grid-template-columns: 1fr;
    }

    .author-image {
        margin: 2rem auto; 
        max-width: 250px; 
    }

    .books-section h2,
    .author-section h2,
    .contact-section h2 {
        font-size: 1.8em;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .nav-brand h1 {
        font-size: 1.3em;
    }

    .hero-content h2 {
        font-size: 1.5em;
    }

    .hero-content p {
        font-size: 1em;
    }

    .hero {
        padding: 60px 20px;
        min-height: 300px;
    }
    
    .rating-stars label { /* Utilisation de la nouvelle classe */
        font-size: 1.5em;
    }
}

/* --- CORRECTION POUR LE WIDGET NEWSLETTER MAILERLITE (Texte blanc) --- */

/* Force une couleur de texte sombre pour les éléments de texte injectés */
/* par MailerLite, résolvant le problème du "texte blanc" sur fond clair. */
.ml-embedded p, .ml-embedded span, .ml-embedded div, .ml-embedded label {
    color: var(--text-dark) !important;
}

/* Style spécifique pour le message d'erreur, pour assurer un contraste maximal. */
.ml-embedded .ml-error-message {
    color: var(--accent-color) !important; /* Utilisation de la couleur rouge pour l'erreur */
    background-color: var(--white) !important; /* S'assure que le fond du message d'erreur est blanc */
    padding: 15px !important;
    border-radius: 5px !important;
}