/*
 Theme Name:   GeneratePress Child
 Description:  Design Harmonisé (Comfortaa + Gutenberg + 3 Blocs)
 Template:     generatepress
 Version:      12.0
*/

@import url("../generatepress/style.css");

/* 1. IMPORT DES POLICES (Comfortaa, Nunito, Roboto) - Tout en une ligne */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&family=Nunito:wght@300;400;500;600&family=Roboto:wght@300;400;500;700&display=swap');

/* =======================================================
   2. VARIABLES & CONFIGURATION
   ======================================================= */
:root {
    --font-main: 'Nunito', 'Roboto', sans-serif;
    /* Comfortaa remplace le Serif pour les titres */
    --font-serif: 'Comfortaa', cursive;
    --radius-card: 24px;
    --color-primary: #4F46E5;
    --color-accent: #7C3AED;
}

/* =======================================================
   3. GLOBAL & BACKGROUND (EFFET CANVA)
   ======================================================= */

/* 1. On dit au <body> de prendre toute la hauteur de l'écran minimum */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 100vh = 100% de la hauteur de la fenêtre */
    margin: 0;
    font-family: var(--font-main);
    color: #555;
    background-image: linear-gradient(-20deg, #E9DEFA 0%, #FBFCDB 100%);
    background-attachment: fixed;
    background-size: cover;
}

/* 2. On dit à la zone de contenu principal de s'étirer au maximum pour repousser le footer */
#page, 
.site-content,
.site {
    flex: 1;
}

h1, h2, h3, h4, h5, h6,p { 
    font-family: var(--font-serif); 
    color: #555; 
}
h1{
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    line-height: 1.2em;
    font-weight: bold;
    text-transform: none;
    color: #e67e22;
}
/*h2.wp-block-heading {
    font-size: 1.5rem;
    margin-bottom: 20px;
    line-height: 1.2em;
    font-weight: bold;
    text-transform: none;
    color: #e67e22;
}*/

h3 { margin: 0 0 5px; 
    font-size: 1.3rem; 
    font-weight: bold; 
    line-height: 1.2; 
 }
 h4 {
    font-size: 1.1rem;
 }
 p, a{ 
    font-size: 1rem;
    letter-spacing: 1.5;
  }

.page-header{
    padding: 0 !important;
}

/* Reset GeneratePress (Pleine Largeur de base) */
body #page, body .site-content, body .grid-container, body .site-main {
    max-width: 100% !important;
    width: 100% !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;;
    margin: 0 !important;
}

.site-content .content-area {
    width: 100%;
    margin: auto;
}

.orange {
    color: #e67E22;
}
/* =======================================================
   4. STRUCTURE & WRAPPERS
   ======================================================= */
.login-page-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center; /* Centré verticalement par défaut */
    padding: 40px 20px;
    box-sizing: border-box;
}

/* Mode Dashboard (Connecté) : On empile tout */
.login-page-wrapper.dashboard-mode {
    display: block; 
    margin: 0 auto;
}

/* =======================================================
   5. CARTES & CONTENEURS
   ======================================================= */
/* Carte Blanche Standard */
.login-card {
    background: #ffffff;
    padding: 40px;
    width: 100%;
    max-width: 550px;
    border-radius: var(--radius-card);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
    margin: 0 auto;
}

.login-icon-container {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px auto;
}
.login-icon-container .dashicons { font-size: 32px; color: white; width: 32px; height: 32px; }

/*.login-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 25px;
}*/
.proposer-livre .login-card{
    text-align: left !important;
}

/* =======================================================
   6. FORMULAIRES (Inputs & Boutons)
   ======================================================= */
.login-card input[type="text"],
.login-card input[type="email"],
.login-card input[type="password"],
.acf-field input[type="text"],
.acf-field input[type="email"],
.acf-field textarea,
.acf-field select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #F9FAFB;
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 15px;
    transition: all 0.2s;
    font-family: var(--font-main);
}

.login-card input:focus, .acf-field input:focus {
    border-color: var(--color-accent);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Labels ACF */
.acf-field label { font-weight: 600; margin-bottom: 8px; display: block; text-align: left; color: #374151; }

.mon-profil .acf-fields > .acf-field{padding:0 !important;}

/* Boutons d'action Principaux */
.login-card input[type="submit"], .btn-action {
    width: 100%;
    background: linear-gradient(90deg, #2563EB 0%, #7C3AED 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}
.btn-action:hover, .login-card input[type="submit"]:hover { 
    opacity: 0.95; 
    transform: translateY(-2px); 
}

/* Bouton Secondaire (Outline) */
.btn-action-outline {
    display: inline-block;
    padding: 5px 10px;
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-action-outline:hover { background-color: var(--color-primary); color: white; }

/* Bouton "En savoir plus" */
.btn-savoir-plus {
    width: 100%;
    background: #e6e2dd;
    color: #433C32;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    margin-top: 15px;
    transition: 0.2s;
}
.livre-card:hover .btn-savoir-plus {
    background-color: #CDC5BC; color: white; transform: translateY(-2px);
}

.forminator-ui.forminator-custom-form[data-design="default"] .forminator-button{
    background: linear-gradient(90deg, #2563EB 0%, #7C3AED 100%) !important;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px !important;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s; 
}

/* Bouton Parcourir ACF */
.acf-form input[type="file"]{
  font-family: inherit;
  font-size: 14px;
}
.acf-form input[type="file"]::file-selector-button {
  background: #F3E8FF;
  color: #7C3AED;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  border: none;
  transition: background-color 0.3s ease;
  cursor: pointer;
}
.acf-form input[type="file"]::file-selector-button:hover {
  background: #7C3AED;
  color: white;
  border-radius: 50px; 
}

/* =======================================================
   7. PAGE D'ACCUEIL (NON CONNECTÉ - GUTENBERG)
   ======================================================= */
.home-split-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* --- COLONNE GAUCHE (TEXTE) --- */
.home-text-column {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.home-text-column h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #2c3e50;
    line-height: 1.1;
    margin-bottom: 20px;
    font-family: var(--font-serif);
}

/*.home-text-column h2 {
    font-size: 1.5rem;
    color: #e67e22; 
    font-weight: 800;
    margin-bottom: 30px;
    font-family: var(--font-serif);
}*/

.home-text-column p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    max-width: 500px;
    margin-bottom: 20px;
    letter-spacing: 1.5px;
}

/* --- COLONNE DROITE (LOGIN) --- */
.home-login-column {
    flex: 1;
    min-width: 320px;
    max-width: 450px;
}
.home-login-column .login-card {
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    background: #fff;
    border-radius: 20px;
}

/* Responsive Home */
@media (max-width: 768px) {
    .home-split-container { flex-direction: column; text-align: center; gap: 40px; }
    .home-text-column { text-align: center; padding-bottom: 20px; }
    .home-text-column h1 { font-size: 2.5rem; }
    .home-text-column p { margin: 0 auto 20px auto; }
}

/* =======================================================
   8. DASHBOARD CONNECTÉ (Entête & Sections)
   ======================================================= */
.dashboard-header {
    text-align: center;
    margin-bottom: 20px; /* <-- Divisé par 2 (était à 40px) */
    padding-top: 0; /* Plus d'espace vide en haut */
}

.member-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 4px 12px; /* <-- Pilule plus fine en hauteur */
    border-radius: 30px;
    font-size: 0.8rem; /* <-- Un poil plus petit */
    font-weight: bold;
    margin-bottom: 10px; /* <-- Divisé par 2 (était à 20px) */
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: transform 0.2s;
}

/* On cible spécifiquement le H1 et le P du header pour les tasser */
.dashboard-header h1 {
    font-size: 1.6rem; /* Légèrement plus petit */
    margin-bottom: 5px; /* Rapproche le sous-titre du titre */
}

.dashboard-header p {
    margin-bottom: 0; /* Évite de repousser la barre de recherche en dessous */
    font-size: 0.95rem;
}

/* Sections par Groupe */
.group-section { margin-bottom: 100px; }
.group-header {
    display: flex; align-items: center; gap: 15px;
    margin-bottom: 30px; border-bottom: 1px solid #fff; padding-bottom: 15px;
}
.group-header h2 { margin: 0;}
.empty-group-message {
    text-align: center; padding: 40px; background: rgba(255,255,255,0.5);
    border-radius: 20px; font-style: italic; color: #666;
}
/* =======================================================
   9. GRILLE DE LIVRES (BIBLIOTHÈQUE)
   ======================================================= */
.livres-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 30px;
    width: 100%;
}

.livre-card {
    background: #fff; 
    border-radius: 16px;
    overflow: hidden; 
    display: flex; flex-direction: column; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.livre-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.livre-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; }

.card-image { 
    height: 240px; 
    background: #FFF; 
    position: relative; 
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    margin: 5%;
}
.card-image img { 
    width: auto; height: 100%; object-fit: cover; 
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s ease;
}
.livre-card:hover .card-image img { transform: scale(1.05); }

/* Badges sur l'image */
.badge-en-cours { 
    position: absolute; top: 10px; right: 10px; 
    background: rgba(255, 255, 255, 0.9); color: #e67e22; 
    padding: 4px 10px; border-radius: 12px; 
    font-size: 0.9rem; font-weight: bold; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.no-cover-visual {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white; font-size: 2rem; border-radius: 16px;
}

.card-infos { padding: 20px; flex-grow: 1; }
.card-infos h3 { margin: 0 0 5px; font-size: 1.2rem; font-weight: bold; line-height: 1.2; font-family: var(--font-serif); }
.card-author a{ color: #555 !important; font-size: 0.9rem; font-style: italic;}

.card-footer { 
    padding: 15px 20px; 
    background: #fff; 
    border-top: 1px solid #f3f4f6; 
    display: flex; align-items: center; gap: 10px; 
    font-size: 0.85rem; 
}
.card-footer img { border-radius: 50%; width: 24px; height: 24px; }

/* Responsive Grille */
@media (max-width: 1200px) { .livres-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .livres-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 550px) { .livres-grid { grid-template-columns: 1fr; } }

/* =======================================================
   10. PAGE SINGLE LIVRE (NOUVEAU DESIGN 3 BLOCS)
   ======================================================= */
.single-livre-container {
    display: flex; gap: 60px; align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}
.single-left-col { flex: 0 0 40%; max-width: 400px; }
.single-left-col img {
    width: 100%; height: auto; border-radius: 16px;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.25);
    display: block;
}
.sticky-cover { position: sticky; top: 40px; }

.single-right-col {
    flex: 1; display: flex; flex-direction: column; gap: 30px;
}

/* Styles des Blocs Blancs */
.white-block {
    background: #ffffff; padding: 40px; border-radius: 24px;
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.8);
}
.block-title {
    font-size: 1.5rem; margin-bottom: 25px;
    border-bottom: 2px solid #f3f4f6; padding-bottom: 15px;
    color: #555;
}

/* Infos Single */
.info-header .single-title { font-size: 2rem; line-height: 1.1; margin-bottom: 15px; }
.info-header .single-author { font-size: 1.1rem; font-style:italic; margin-bottom: 20px; }
.meta-badges { margin-bottom: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.badge-groupe { background: #EEF2FF; color: #4F46E5; padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: bold; }
.badge-statut-en-cours { background: #FEF3C7; color: #e67e22; padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: bold; }

.single-footer-actions {
    margin-top: 30px; padding-top: 20px; border-top: 1px solid #f3f4f6;
    display: flex; justify-content: space-between; align-items: center;
}
.propose-par { display: flex; align-items: center; gap: 10px; color: #666; }
.propose-par img { border-radius: 50%; width: 40px; height: 40px; }


.badge-genre {
    background: #F3E8FF;
    color: #7C3AED;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-left: 5px;
    display: inline-block;
}


@media (max-width: 900px) {
    .single-livre-container { flex-direction: column; gap: 40px; }
    .single-left-col { width: 100%; max-width: 300px; margin: 0 auto; }
    .sticky-cover { position: static; }
    .info-header .single-title { font-size: 2.5rem; }
}

/* =======================================================
   11. COMMENTAIRES (NETTOYAGE)
   ======================================================= */
.comments-section-wrapper { padding-top: 0; }
.comments-title { display: none; } /* On cache les titres par défaut WP */
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment { margin-bottom: 25px; }
.comment-body {
    background: #f9fafb; padding: 20px; border-radius: 16px;
    border: 1px solid #f0f0f0;
}
.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fn { font-weight: bold; }
.comment-content p { margin: 0; }
.comment-respond {
    background: #f9fafb; padding: 20px; border-radius: 16px; margin-top: 30px;
}
.comment-form textarea { width: 100%; height: 100px; border-radius: 12px; padding: 10px; border: 1px solid #ddd; }

/* Spécifique Single Livre */
.single-livre .comments-title, 
.single-livre h3.comment-reply-title, 
.single-livre .entry-meta, 
.single-livre .comment-metadata { display: none !important; }

.single-livre .comment-list li {
    list-style: none; 
    margin-bottom: 15px !important; 
    border-bottom: 1px solid #eee; 
    padding-bottom: 15px !important; 
}

.single-livre .comment-author {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 5px !important; 
}

.single-livre .comment-list .avatar, 
.single-livre .comment-body .avatar {
    display: block !important;
    width: 32px !important; 
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover;
    margin-right: 0 !important;
    margin-top: 0 !important;
}

.single-livre .comment-author cite::before { content: "De "; font-weight: normal; color: #666; }
.single-livre .comment-author cite { font-weight: bold; font-style: normal; font-size: 1em; }
.single-livre .comment-content p { margin-bottom: 0 !important; }
.logged-in-as { display: none; }

/* =======================================================
   12. TWEAKS ACF & DIVERS
   ======================================================= */
/* Page Inviter */
.titre-en-nom .acf-label label { font-size: 0; }
.titre-en-nom .acf-label label:before { content: "Nom de l'ami"; font-size: 1rem; font-weight: 600; color: #374151; }
.titre-en-nom .acf-label label .acf-required { font-size: 1rem; margin-left: 5px; }
/* Image Profil */
.acf-image-uploader .image-wrap img { border-radius: 50%; width: 120px; height: 120px; object-fit: cover; margin: 0 auto; display: block; }
.acf-image-uploader .acf-icon.-cancel { display: none; }

/* =======================================================
   13. BOUTON MENU "PROPOSER UN LIVRE"
   ======================================================= */
.main-navigation .main-nav ul li.menu-btn-proposer a {
    background: linear-gradient(90deg, #2563EB 0%, #7C3AED 100%);
    color: white !important;
    padding: 8px 20px !important; 
    border-radius: 50px; 
    font-weight: bold;
    font-size: 0.9rem;
    line-height: 1.2;
    margin-left: 10px;
    margin-top: 8px; /* Ajustement pour centrer verticalement */
    transition: all 0.3s ease;
}
.main-navigation .main-nav ul li.menu-btn-proposer a:hover {
    background: linear-gradient(90deg, #1e40af 0%, #5b21b6 100%);
    transform: translateY(-2px);
    opacity: 1;
}
.media-router .media-menu-item{color: #1d2327;}

/* =======================================================
   14. PAGE PROFIL (RESPONSIVE & CLEAN)
   ======================================================= */
.profile-card { min-height: 400px; }
.hidden-mode { display: none; }

.profile-name { margin-bottom: 5px; margin-top: 15px; }
.profile-username { color: #999; font-size: 0.9rem; margin-bottom: 5px; }
.profile-email { color: #666; margin-bottom: 30px; font-size: 1rem; }
.edit-title { font-size: 1.2rem; margin-bottom: 20px; text-align: center; }
.section-title { font-size: 1rem; margin-bottom: 15px; color: #333; font-weight: bold; }

.form-group { margin-bottom: 15px; text-align: left; }
.form-label { font-weight: bold; display: block; margin-bottom: 6px; color: #374151; }
.form-input {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px;
    background: #fff; font-size: 1rem; box-sizing: border-box;
}
.form-notice { font-size: 0.8rem; color: #888; margin-top: 5px; }
.form-divider { margin: 30px 0; border: 0; border-top: 1px solid #eee; }

.form-grid { display: flex; gap: 15px; }
.form-grid .form-group { flex: 1; }

.btn-full { width: 100%; cursor: pointer; }
.btn-text-link {
    margin-top: 15px; background: none; border: none; color: #666; 
    cursor: pointer; width: 100%; text-decoration: underline; font-size: 0.9rem;
}
.logout-container { margin-top: 20px; text-align: center; }
.logout-link { color: #e74c3c; font-size: 13px; text-decoration: none; }
.logout-link:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .form-grid { flex-direction: column; gap: 0; }
    .login-card { padding: 30px 20px; }
    .profile-name { font-size: 1.5rem; }
}

/* =======================================================
   15. DESIGN CHAT STYLE MESSENGER 
   =======================================================*/
.chat-wrapper {
    background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 20px; max-width: 800px; margin: 0 auto;
}
.wcActiveChannel { border: none !important; }
.wcMessages {
    background-color: #f9fafb !important; border-radius: 12px;
    border: 1px solid #eee !important; min-height: 400px;
}
.wcMessage .wcMessageContent {
    background: #eef2ff !important; color: #333 !important;
    padding: 10px 15px !important; border-radius: 15px !important;
    display: inline-block; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.wcCurrentUser .wcMessageContent { background: #4F46E5 !important; color: white !important; }
.wcInputContainer { margin-top: 15px !important; }
.wcInput { border-radius: 20px !important; border: 1px solid #ddd !important; padding: 10px 15px !important; }
.wcSubmitButton {
    background: #4F46E5 !important; color: white !important;
    border-radius: 20px !important; padding: 10px 20px !important;
    border: none !important; font-weight: bold;
}

/* =======================================================
   16. STYLE CHAMP GENRES (ACF) - DESIGN FINAL
   ======================================================= */
.acf-field[data-name="taxonomie_genre"] > .acf-label { display: none !important; }
.acf-field[data-name="taxonomie_genre"] .acf-input,
.acf-field[data-name="taxonomie_genre"] .categorychecklist-holder {
    border: none !important; background: transparent !important; box-shadow: none !important;
    padding: 0 !important; margin: 0 !important; min-height: 0 !important; 
}
.acf-field[data-name="taxonomie_genre"] .acf-checkbox-list,
.acf-field[data-name="taxonomie_genre"] .categorychecklist {
    display: flex !important; flex-wrap: wrap !important; gap: 10px;                       
    list-style: none !important; padding: 0 !important; margin: 0 !important;  
}
.acf-field[data-name="taxonomie_genre"] .acf-checkbox-list li,
.acf-field[data-name="taxonomie_genre"] .categorychecklist li { margin: 0 !important; width: auto !important; }
.acf-field[data-name="taxonomie_genre"] .acf-checkbox-list label,
.acf-field[data-name="taxonomie_genre"] .categorychecklist label {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: 0.9rem; color: #555; background: #fff; padding: 10px 18px;
    border-radius: 50px; border: 1px solid #ddd !important; 
    transition: all 0.2s ease; width: auto !important; margin: 0 !important;
}
.acf-field[data-name="taxonomie_genre"] label:hover {
    border-color: #4F46E5 !important; background: #f9fafb;
}
.acf-field[data-name="taxonomie_genre"] label:has(input:checked),
.acf-field[data-name="taxonomie_genre"] label.selected {
    background: #4F46E5 !important; color: white !important;
    border-color: #4F46E5 !important; transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}
.acf-field[data-name="taxonomie_genre"] input[type="checkbox"] { display: none !important; }
.acf-field[data-name="taxonomie_genre"] { margin-top: 10px !important; margin-bottom: 30px !important; }

.little-genre {
    display: inline-block; background: #F3E8FF; color: #7C3AED; font-size: 0.7rem; 
    font-weight: 800; text-transform: uppercase; padding: 4px 12px; 
    border-radius: 50px; margin-bottom: 10px; letter-spacing: 0.5px; 
}

/* =======================================================
   17. FOOTER PERSONNALISÉ
   ======================================================= */
.site-footer { width: 100%; padding-bottom: 10px; margin-top: auto; }
.footer-card {
    background: #ffffff; border-radius: 24px; padding: 25px 40px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); border: 1px solid rgba(255,255,255,0.8);
}
.footer-brand h3 { margin: 0 0 5px 0; font-size: 1.4rem; color: #4F46E5; font-family: var(--font-serif); }
.footer-brand .copyright { margin: 0; font-size: 0.85rem; color: #999; }
.footer-nav { display: flex; gap: 20px; align-items: center; }
.footer-link { text-decoration: none; color: #555; font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.footer-link:hover { color: #4F46E5; }
.footer-link.btn-contact, .footer-link.btn-contact a {
    background: #F3E8FF; color: #7C3AED; padding: 8px 16px; border-radius: 50px; font-size: 0.9rem;
}
.footer-link.btn-contact:hover, .footer-link.btn-contact a:hover {
    background: #7C3AED; color: white; transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(124, 58, 237, 0.2);
}

@media (max-width: 768px) {
    .footer-card { flex-direction: column; text-align: center; gap: 20px; padding: 30px 20px; }
    .footer-nav { flex-direction: column; gap: 15px; }
}

/* =======================================================
   18. PAGES STANDARDS (Règlement, Contact)
   ======================================================= */
.page-standard-card { max-width: 900px !important; text-align: left !important; }
.page-content-wrapper { line-height: 1.7; color: #4b5563; font-size: 1.05rem; }
.page-content-wrapper ul, .page-content-wrapper ol { margin-bottom: 25px; padding-left: 20px; }
.page-content-wrapper ul, .page-content-wrapper ol { margin-bottom: 25px; padding-left: 20px; }
.page-content-wrapper li { margin-bottom: 10px; }
.page-content-wrapper h2, .page-content-wrapper h3 { margin-top: 30px; margin-bottom: 15px; }

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width: 100%; padding: 12px; border: 1px solid #E5E7EB; border-radius: 8px;
    background: #F9FAFB; margin-bottom: 15px;
}
.wpcf7-submit, .wpforms-submit { display: inline-block; width: auto !important; padding: 12px 30px !important; }

/* =======================================================
   19. ANNUAIRE DES MEMBRES & CARTES
   ======================================================= */
.directory-card { max-width: 1000px; width: 100%; }
.directory-header { text-align: center; margin-bottom: 40px; }
.empty-directory-message { text-align: center; }

.membres-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px; margin-top: 20px;
}

.membre-card {
    background: #f8fafc; border-radius: 15px; padding: 30px 20px; text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid #e2e8f0;
}
.membre-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }

.membre-avatar img {
    border-radius: 50%; margin-bottom: 15px; border: 4px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); object-fit: cover;
    transition: transform 0.3s ease;
}
.membre-card:hover .membre-avatar img { transform: scale(1.1); }

.membre-nom { font-size: 1.2em; margin: 0; color: #1e293b; font-weight: bold; }

/* =======================================================
   20. SYSTÈME DE NOTATION COMMUNAUTAIRE (ÉTOILES)
   ======================================================= */
/* Transformé en ligne horizontale, très fine et épurée */
.rating-communautaire { 
    background: transparent; 
    padding: 15px 0; 
    border-radius: 0; 
    margin: 10px 0 20px 0; 
    border-top: 1px solid rgba(0,0,0,0.05); 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.moyenne-globale h4 { 
    margin: 0; 
    color: #4A4453; 
    font-size: 0.95rem; /* Beaucoup plus petit */
}

.compteur-avis { color: #9CA3AF; font-weight: normal; font-size: 0.85rem; }

.stars-interactive { display: flex; align-items: center; gap: 10px; }
.stars-label { font-weight: normal; color: #6B7280; font-size: 0.9rem; margin-right: 5px; }

.stars-container { display: flex; gap: 3px; font-size: 20px; cursor: pointer; } /* Étoiles plus petites (20px au lieu de 26px) */
.stars-interactive .star { color: #E5E7EB; transition: color 0.2s ease, transform 0.2s ease; }
.stars-interactive .star.active, .stars-interactive .star.hover { color: #e67e22; }
.stars-interactive .star:hover { transform: scale(1.1); }

.rating-feedback { color: #10b981; font-size: 0.85rem; font-weight: bold; opacity: 0; transition: opacity 0.3s ease; margin-left: 10px; }
.rating-feedback.show { opacity: 1; }
/* =======================================================
   21. PAGE ANNUAIRE DES AUTEURS
   ======================================================= */
.auteurs-page-container {
    /*max-width: 1200px;*/
    margin: 0 auto;
    padding: 20px;
}

.auteurs-layout-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 30px;
}

/* Sidebar Gauche */
.auteurs-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #F9FAFB;
    padding: 25px 20px;
    border-radius: var(--radius-card);
    border: 1px solid #E5E7EB;
}

.auteurs-sidebar-title {
    margin-top: 0;
    border-bottom: 2px solid #E5E7EB;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.auteurs-sidebar-title-link {
    text-decoration: none;
    color: #111;
    transition: color 0.2s ease;
}

.auteurs-sidebar-title-link:hover {
    color: var(--color-primary);
}

.auteurs-empty-msg {
    color: #666;
    font-style: italic;
}

/* Liste des auteurs dans la sidebar */
.auteurs-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auteurs-list li {
    margin-bottom: 10px;
}

.auteur-list-link {
    text-decoration: none;
    color: #433C32;
    transition: all 0.2s ease;
    display: block;
    padding: 4px 0;
}

.auteur-list-link:hover {
    color: var(--color-primary);
    transform: translateX(4px);
}

.auteur-list-link.active {
    font-weight: bold;
    color: var(--color-primary);
}

.auteur-list-count {
    font-size: 0.85em;
    color: #999;
    font-weight: normal;
}

/* Contenu Principal (Droite) */
.auteurs-content {
    flex-grow: 1;
}



.btn-retour-auteurs {
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 0.9em;
    transition: transform 0.2s ease;
}

.btn-retour-auteurs:hover {
    transform: translateX(-5px);
}

.auteurs-section-title {
    margin-top: 0;
    margin-bottom: 25px;
    color: #111;
}

/* Les petits badges (Lire la suite & Compteurs) */
.badge-lire-suite, .carte-auteur-count {
    display: inline-block;
    background: #F3E8FF;
    color: var(--color-accent);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.85em;
    font-weight: bold;
    margin-top: 10px;
}

/* Grille des 6 derniers auteurs */
.auteurs-recent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.carte-auteur-accueil {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-card);
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.carte-auteur-accueil:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.carte-auteur-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}

.carte-auteur-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.carte-auteur-name {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #111;
    font-family: var(--font-serif);
}

/* Zone Accès restreint */
.restricted-access-wrapper {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: var(--radius-card);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 50px auto;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .auteurs-layout-wrapper {
        flex-direction: column;
    }
    .auteurs-sidebar {
        width: 100%;
        box-sizing: border-box;
    }
}
/* =======================================================
   24. CARNET DE LECTURE & FAVORIS (LISTES ET BOUTONS)
   ======================================================= */

/* Conteneur des boutons (Toujours sur 1 ligne) */
.card-actions-row { 
    display: flex; 
    gap: 15px; 
    align-items: center; 
    margin-bottom: 15px; 
    flex-wrap: nowrap; /* On interdit le passage à la ligne */
}

/* Design des boutons (Lu / Favoris) */
.btn-action-livre { 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    font-weight: bold; 
    margin: 0; 
    font-size: 0.85rem; 
    white-space: nowrap; /* Le texte ne se coupe jamais en deux */
}

/* --- LE SECRET DES RONDS --- */
/* On cache le carré par défaut et on dessine un cercle parfait */
.btn-action-livre input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #CBD5E1;
    border-radius: 50%; /* C'est ici que ça devient rond ! */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin: 0;
    background: #fff;
    flex-shrink: 0; /* Empêche le rond de s'écraser */
}

/* Le petit "V" de validation à l'intérieur du rond */
.btn-action-livre input[type="checkbox"]:checked::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* LE SECRET RESPONSIVE : Ajustement automatique sur les petits téléphones */
@media (max-width: 450px) {
    .card-actions-row {
        gap: 8px; /* On réduit l'espace entre les deux boutons */
        justify-content: space-between; /* On les écarte pour occuper l'espace proprement */
    }
    .btn-action-livre {
        font-size: 0.75rem; /* Le texte devient un poil plus petit */
        gap: 4px; /* On rapproche un peu la puce de son texte */
    }
    .btn-action-livre input[type="checkbox"] {
        width: 16px;
        height: 16px; /* Rond un peu plus petit sur mobile */
    }
}

/* Couleurs spécifiques "Lu" (Indigo) */
.btn-lu { color: var(--color-primary); }
.btn-lu input[type="checkbox"]:hover { border-color: var(--color-primary); }
.btn-lu input[type="checkbox"]:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Couleurs spécifiques "Favoris" (Violet) au lieu du rouge ! */
.btn-favori { color: var(--color-accent); }
.btn-favori input[type="checkbox"]:hover { border-color: var(--color-accent); }
.btn-favori input[type="checkbox"]:checked {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

/* --- Listes (Ma Bibliothèque & Mes Favoris) --- */
.bibliotheque-titre {
    margin-top: 40px;
    margin-bottom: 20px;
    font-family: var(--font-serif);
}

.bibliotheque-liste {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.bibliotheque-item {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px; /* Un peu plus arrondi */
    padding: 12px 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

/* Animation au survol de la ligne (Lu) */
.bibliotheque-item:hover {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Animation au survol spécifique pour les Favoris (Violet) */
.bibliotheque-item.favori-item:hover {
    border-color: var(--color-accent);
}

/* Infos du livre dans la liste */
.bibliotheque-item-infos {
    flex-grow: 1;
}

.bibliotheque-item-titre {
    text-decoration: none;
    color: #111;
    font-size: 1.05rem;
    font-weight: bold;
    font-family: var(--font-serif);
}

.bibliotheque-item-auteur {
    color: #666;
    font-size: 0.95rem;
    margin-left: 8px;
    font-style: italic;
}

/* Bouton "Revoir" standard (Lu = Indigo très clair) */
.bibliotheque-btn-revoir {
    text-decoration: none;
    background: #EEF2FF; 
    color: var(--color-primary);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.bibliotheque-btn-revoir:hover {
    background: var(--color-primary);
    color: white;
}

/* Bouton "Revoir" spécifique Favoris (Violet très clair) */
.bibliotheque-btn-revoir.btn-revoir-favori {
    background: #F3E8FF; 
    color: var(--color-accent);
}
.bibliotheque-btn-revoir.btn-revoir-favori:hover {
    background: var(--color-accent);
    color: white;
}

/* --- Message si la liste est vide --- */
.bibliotheque-vide {
    background: #f9fafb;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    margin-top: 30px;
}
.bibliotheque-vide-titre {
    color: #64748b;
    margin: 0;
    font-size: 1.1em;
    font-weight: bold;
}
.bibliotheque-vide-sous-titre {
    font-size: 0.9em;
    color: #64748b;
    display: block;
    margin-top: 5px;
}

/* =======================================================
   25. AJUSTEMENTS STRUCTURELS HEADER (LOGO & PADDING)
   ======================================================= */
/* Ajoute de l'air à gauche et à droite du header (décolle le logo et le menu) */
.inside-header {
    padding-left: 30px !important;
    padding-right: 30px !important;
}
/* Entête Single Livre (Badges à gauche, Modifier à droite) */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}
.header-top-row .meta-badges {
    margin-bottom: 0; /* Évite les marges en double */
}

/* Bouton secondaire miniature */
.btn-small {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-width: 1px; /* Trait plus fin que le bouton standard */
}
/* =======================================================
   26. FILTRES AVANCÉS & ENTÊTE (VERSION COMPACTE)
   ======================================================= */

/* 1. On réduit drastiquement l'espace vide tout en haut de la page */
.login-page-wrapper.dashboard-mode {
    padding-top: 15px; 
}

/* 2. L'entête de bienvenue (Bonjour) beaucoup plus fine */
.dashboard-header-compact {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(10px);
    padding: 12px 25px; /* Hauteur réduite */
    border-radius: var(--radius-card);
    border: 1px solid rgba(255,255,255,0.8); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    margin-bottom: 15px; /* Espace en dessous réduit (était à 30px) */
}
.dashboard-header-compact h1 { font-size: 1.4rem; margin-bottom: 0; }
.dashboard-header-compact .header-subtitle { margin-top: 2px !important; font-size: 0.9rem; margin-bottom: 0; }

/* 3. Le conteneur global des filtres moins encombrant */
.super-filtres-container { 
    background: transparent; 
    padding: 0; 
    border-radius: 0; 
    box-shadow: none; 
    margin-bottom: 20px; /* Espace réduit avant les livres (était à 40px) */
    border: none; 
    scroll-margin-top: 100px;
}

/* 4. La barre de recherche moins longue et moins haute */
.search-bar-top.mb-30 { margin-bottom: 15px !important; }
/* Ligne 1 : Barre de recherche (Centrée) */
.search-form-clean { 
    display: flex; 
    width: 100%; 
    gap: 10px; 
    flex-wrap: wrap; 
    align-items: center; 
    justify-content: center; /* C'est la formule magique pour tout centrer ! */
}

.search-input-clean { 
    flex-grow: 0 !important; /* Elle ne s'étire plus à l'infini ! */
    width: 100% !important; 
    max-width: 350px !important; /* Longueur maximale fixée */
    padding: 8px 20px !important; /* Hauteur de la case réduite */
    border-radius: 50px !important; 
    border: 1px solid rgba(255,255,255,0.8) !important; 
    background: rgba(255, 255, 255, 0.6) !important; 
    margin-bottom: 0 !important; 
    min-width: 250px; 
    font-family: var(--font-main); 
}

.btn-search-clean { 
    background: var(--color-primary); color: white; border: none; 
    padding: 8px 25px; /* Hauteur du bouton réduite */
    border-radius: 50px; font-weight: bold; cursor: pointer; transition: 0.2s; 
}
.btn-search-clean:hover { background: var(--color-accent); transform: translateY(-2px); }

/* Lignes 2 et 3 : Filtres empilés (espaces réduits) */
.filtres-row-stacked { 
    display: flex; 
    flex-direction: column;
    align-items: flex-start;
    gap: 10px; 
    margin-top: 15px; /* Espace réduit (était à 20px) */
    padding-top: 15px; /* Espace réduit */
    border-top: 1px solid rgba(0,0,0,0.05); 
}
.filtres-label { font-weight: bold; color: #4A4453; font-size: 0.95rem; }

/* Pilules de Genre (Catégories) */
.genre-pills-wrapper { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.genre-pill { padding: 6px 16px; background: rgba(255,255,255,0.5); color: #4B5563; border-radius: 50px; text-decoration: none; font-size: 0.85rem; font-weight: bold; border: 1px solid rgba(255,255,255,0.8); transition: 0.2s; }
.genre-pill:hover { background: rgba(255,255,255,0.8); }
.genre-pill.active { background: var(--color-primary); color: white; border-color: var(--color-primary); }

/* Cases à cocher interactives */
.checkbox-filters-wrapper { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; }
.checkbox-filter-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #4B5563; font-weight: 600; font-size: 0.9rem; padding: 6px 12px; border-radius: 8px; transition: background 0.2s; }
.checkbox-filter-link:hover { background: rgba(255,255,255,0.4); }
.fake-checkbox { width: 18px; height: 18px; border: 2px solid #CBD5E1; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.8); transition: all 0.2s ease; }
.checkbox-filter-link.active { color: var(--color-primary); }
.checkbox-filter-link.active .fake-checkbox { background: var(--color-primary); border-color: var(--color-primary); }
.checkbox-filter-link.active .fake-checkbox::after { content: "✓"; color: white; font-size: 12px; font-weight: bold; }

/* Responsive de l'entête */
@media (max-width: 768px) { 
    .dashboard-header-compact { flex-direction: column; text-align: center; gap: 10px; } 
    .search-input-clean { max-width: 100% !important; } /* Sur mobile, la barre reprend toute la largeur */
}
/* Petit badge compteur de commentaires sur les cartes */
.badge-commentaires {
    background: #F3F4F6;
    color: #6B7280;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.badge-commentaires:hover {
    background: #E5E7EB;
    color: #374151;
    transform: translateY(-2px);
}
/* Le style de la nouvelle pilule "Effacer les filtres" */
.genre-pill.pill-reset {
    
    margin-left: 20px; /* Le sépare légèrement des autres catégories */
}
.genre-pill.pill-reset:hover {
    background: #FEE2E2;
    color: #B91C1C;
    border-color: #F87171;
}
/* =======================================================
   27. CORRECTION MENU DÉROULANT (MON COMPTE)
   ======================================================= */
/* Force le dernier sous-menu à s'aligner sur la droite pour ne pas sortir de l'écran */
.main-navigation .main-nav ul li.menu-item-has-children:last-child .sub-menu {
    left: auto !important;
    right: 0 !important;
}
.main-navigation ul ul{
    box-shadow: none;
}



/* =======================================================
   31. ONGLETS VUE ADMINISTRATEUR (STYLE HARMONISÉ)
   ======================================================= */
.admin-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    justify-content: center; /* On centre les onglets pour un look plus élégant */
    border-bottom: 1px solid rgba(0,0,0,0.05); /* Ligne de séparation très douce */
}

.admin-tab-btn {
    padding: 8px 22px;
    background: rgba(255, 255, 255, 0.5); /* Effet transparence comme tes filtres */
    color: #4B5563;
    border-radius: 50px; /* Forme de pilule harmonisée avec le reste du site */
    font-size: 0.95rem;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-main);
}

.admin-tab-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* L'onglet actif prend ton dégradé principal */
.admin-tab-btn.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 12px rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
}

.admin-tab-pane {
    display: none;
    animation: fadeInTab 0.4s ease;
}

.admin-tab-pane.active {
    display: block;
}

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

/* Grille de base pour l'affichage Admin */
.admin-grid-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}