/* Variables de Couleurs Basées sur le Moodboard */
:root {
    --color-dark-primary: #121212;
    /* Noir très sombre pour le fond */
    --color-dark-secondary: #222222;
    /* Gris sombre pour les sections alternées */
    --color-accent-gold: #D4AF37;
    /* Or pour les accents (comme le titre GIN B.) */
    --color-text-light: #F0EAD6;
    /* Crème/Sépia pour le texte clair */
    --color-text-muted: #A9A9A9;
    /* Gris pour les textes secondaires */
}

/* --------------------
   RESET & POLICES
   -------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--color-text-light);
    background-color: var(--color-dark-primary);
    scroll-behavior: smooth;
}

h1,
h2,
h3 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--color-accent-gold);
    text-transform: uppercase;
}

a {
    color: var(--color-accent-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-text-light);
}

/* --------------------
   Général & Conteneur
   -------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.content-section {
    padding: 80px 0;
    text-align: center;
}

.dark-bg {
    background-color: var(--color-dark-secondary);
}

/* --------------------
   HEADER & NAVIGATION
   -------------------- */
.main-header {
    background-color: rgba(0, 0, 0, 0.8);
    /* Fond semi-transparent */
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1.8em;
    color: var(--color-accent-gold);
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul a {
    text-transform: uppercase;
    font-size: 0.9em;
    padding: 5px 0;
}

/* --------------------
   SECTION ACCUEIL (HERO)
   -------------------- */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    /* Utilisation d'une image de votre moodboard comme fond (remplacez '1.jpg') */
    background: url('../images/fond.jpg') no-repeat center center/cover;
    position: relative;
    /* Ombre/filtre sombre pour améliorer la lisibilité */
    box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.5);
}

.hero-content {
    padding: 20px;
    text-align: center;
}

.hero-section h1 {
    font-size: 5em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-section h2 {
    font-size: 1.5em;
    font-weight: 300;
    color: var(--color-text-light);
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Bouton d'appel à l'action (CTA) */
.cta-button {
    display: flex;
    /* On passe en flexbox pour un centrage parfait */
    justify-content: center;
    /* Centre horizontalement le texte */
    align-items: center;
    /* Centre verticalement le texte */

    max-width: 300px;
    margin: 30px auto 0 auto;
    padding: 12px 30px;

    border: 2px solid var(--color-accent-gold);
    color: var(--color-accent-gold);
    background: transparent;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    /* Toujours utile pour le texte multiligne */
    transition: background-color 0.3s, color 0.3s;
    cursor: pointer;
}


.cta-button:hover {
    background-color: var(--color-accent-gold);
    color: var(--color-dark-primary);
}

/* --------------------
   SECTIONS CONTENU
   -------------------- */
h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

/* Petite décoration sous les titres */
h2::after {
    content: '';
    display: block;
    width: 50%;
    height: 2px;
    background: var(--color-accent-gold);
    margin: 10px auto 0;
}

.prose-block {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.prose-block p {
    margin-bottom: 20px;
}

/* ROMANS - GRILLE */
.roman-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.roman-card {
    background-color: var(--color-dark-primary);
    padding: 20px;
    border: 1px solid var(--color-text-muted);
    border-radius: 5px;
    text-align: center;
}

.roman-card img {
    width: 100%;
    max-width: 200px;
    /* Taille pour simuler une couverture de livre */
    height: auto;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.roman-card h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    /* On utilise flexbox pour s'assurer que si l'espace est petit, le titre s'adapte, 
       mais le style du span forcera la ligne. */
    display: flex;
    flex-direction: column;
    /* Force le titre et le tome à être l'un sous l'autre */
    align-items: center;
}

.tome-numero {
    /* Taille réduite */
    font-size: 0.6em;
    /* Style pour le mettre en évidence mais en subtil */
    color: var(--color-text-muted);
    font-family: 'Roboto', sans-serif;
    /* Utiliser la police du corps pour le rendre moins "titre" */
    font-weight: 300;
    margin-top: 5px;
    /* Petit espace au-dessus */
}

/* ACTUALITÉS */
.news-list {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

.news-item {
    border-bottom: 1px dashed var(--color-text-muted);
    padding: 15px 0;
}

.news-item h4 {
    color: var(--color-accent-gold);
    margin-bottom: 5px;
}

/* CONTACT */
.contact-form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 30px auto;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--color-text-muted);
    background-color: var(--color-dark-secondary);
    color: var(--color-text-light);
    border-radius: 3px;
    font-family: inherit;
}

.contact-form textarea {
    resize: vertical;
}

/* --------------------
   FOOTER
   -------------------- */
.site-footer {
    background-color: var(--color-dark-primary);
    color: var(--color-text-muted);
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    border-top: 1px solid var(--color-dark-secondary);
}

.site-footer a {
    color: var(--color-text-muted);
}

/* --------------------
   RESPONSIVE (Mobile)
   -------------------- */
@media (max-width: 768px) {

    /* Navigation */
    nav {
        flex-direction: column;
    }

    nav ul {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px 10px;
    }

    /* Hero */
    .hero-section h1 {
        font-size: 3em;
    }

    .hero-section h2 {
        font-size: 1.2em;
    }

    /* Général */
    .content-section {
        padding: 60px 0;
    }

    h2 {
        font-size: 2em;
    }

    /* Romans */
    .roman-grid {
        grid-template-columns: 1fr;
        /* Une seule colonne sur mobile */
    }

    .roman-card img {
        max-width: 150px;
    }
}

/* --------------------
   SECTION CONTACT (PIGEON VOYAGEUR)
   -------------------- */

.contact-pigeon .container {
    max-width: 800px;
}

.pigeon-box {
    margin: 40px auto;
    padding: 30px;
    background-color: var(--color-dark-secondary);
    border: 1px solid var(--color-accent-gold);
    /* Cadre doré pour l'effet parchemin */
    border-radius: 5px;
}

.contact-prose {
    max-width: 600px;
    margin: 0 auto 25px auto;
}

/* Image du pigeon */
.pigeon-image-container img {
    max-width: 150px;
    /* Ajustez la taille selon l'image */
    height: auto;
    margin-bottom: 25px;
    border-radius: 50%;
    /* Si l'image le permet, pour un effet de médaillon */
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
    /* Ombre dorée */
}

/* Style de l'adresse email */
.email-prompt {
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.email-link {
    display: inline-block;
    font-family: 'Cinzel', serif;
    /* Met l'accent sur l'adresse */
    font-size: 1.2em;
    color: var(--color-text-light);
    /* Couleur contrastée */
    text-decoration: underline;
    text-underline-offset: 5px;
    margin-bottom: 30px;
}

.email-link:hover {
    color: var(--color-accent-gold);
}

/* --------------------
   SECTION NOUVELLE (Cœur Mécanique)
   -------------------- */

.nouvelle-card {
    /* Mise en page en ligne (image à gauche, texte à droite) */
    display: flex;
    align-items: flex-start;
    /* Alignement du haut */
    gap: 40px;
    max-width: 900px;
    margin: 40px auto;
    text-align: left;
}

.nouvelle-card img {
    /* DÉFINITION DE LA TAILLE DE L'IMAGE DE COUVERTURE */
    max-width: 200px;
    /* Aligné avec la taille des couvertures des romans */
    width: 100%;
    height: auto;
    flex-shrink: 0;
    /* Empêche l'image de rétrécir */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    /* Optionnel : pour correspondre aux romans */
}

.nouvelle-details {
    /* Permet au texte de prendre l'espace restant */
    flex-grow: 1;
}

.nouvelle-details h3 {
    margin-top: 0;
}

/* Version Mobile (pour empiler l'image au-dessus du texte) */
@media (max-width: 768px) {
    .nouvelle-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
}

/* ---------- MODALE ---------- */
/* --- Styles des Modales Légales --- */

.modal-overlay {
    /* Cache et centre la fenêtre modale */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /* Fond sombre transparent */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    /* Transition pour l'opacité (fond noir) */
}

.modal-overlay.active {
    /* La modale devient visible lorsque la classe 'active' est ajoutée par JS */
    opacity: 1;
    visibility: visible;
}

.modal-content {
    /* Style de la boîte de contenu */
    background: #f7f7f7;
    /* Couleur plus claire pour contraster avec le fond sombre */
    color: #333;
    padding: 30px;
    border-radius: 8px;
    max-width: 700px;
    /* Limite la largeur du contenu */
    max-height: 90vh;
    /* Permet un défilement interne */
    overflow-y: auto;
    /* Active le défilement si le contenu est long */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);

    /* Préparation pour l'animation : commence à une échelle nulle */
    transform: scale(0);
    transform-origin: center;
    /* L'animation part du centre */
}

.modal-overlay.active .modal-content {
    /* Déclenche l'animation personnalisée */
    animation: expand-modal 1.0s forwards cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* L'animation : agrandissement horizontal, puis vertical */
@keyframes expand-modal {
    0% {
        transform: scale(0, 0);
        /* Rien (point) */
    }

    50% {
        transform: scale(1, 0.05);
        /* Horizontal (ligne presque plate) */
    }

    100% {
        transform: scale(1, 1);
        /* Horizontal et Vertical (taille finale) */
    }
}

.close-button {
    /* Bouton de fermeture */
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    line-height: 1;
    /* Assure un bon alignement du 'X' */
    transition: color 0.2s;
}

.close-button:hover {
    color: #333;
}

/* */
.decalage-liste {
    /* Ajoute une marge à gauche pour décaler la liste entière de 20 pixels */
    margin-left: 40px;
}

.nouvelle-separator {
    border: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, gold, transparent);
    margin: 32px 0;
    width: 100%;
}