body {
    background: linear-gradient(180deg, #5973a6 0%, #0D0053 56%);
    background-attachment: fixed;
}

/* --- ROMAN PAGE (inspiré de monHistoire / Rumillia) --- */
.roman-section{
    padding: 40px 20px;
    display: flex;
    flex-direction: column; /* place l'image au-dessus du container */
    align-items: center;    /* centre horizontalement les enfants */
    justify-content: center;
    gap: 24px; /* espace entre image et container */
}

.roman-container{
  width: 90%;
  max-width: 1100px;
  margin: 30px auto;
  background: rgba(255,255,255, 0.05);
  border: 2px solid var(--bleu);
  border-radius: 16px;
  padding: 32px;
  padding-right: 20px; /* place pour la barre */
  
  /* LA BARRE EST ICI */
  max-height: 500px; /* mets 400px si tu veux la voir plus vite */
  overflow-y: scroll; /* scroll et pas auto = toujours visible */
  
  text-align: justify;
  line-height: 1.8;
  color: var(--blanc);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);

  scrollbar-width: thin;
  scrollbar-color: var(--bleu) rgba(255,255,255,0.02);
}

.roman-container p{
    padding: 10px 0;
    margin: 0 0 1rem 0;
    text-indent: 30px; /* indentation classique d'un roman */
}

.roman-container:hover{
    border-color: #ffffff;
    box-shadow: 0 0 18px var(--bleu);
}

/* Scrollbar styling */
.roman-container::-webkit-scrollbar{
    width: 10px;
}
.roman-container::-webkit-scrollbar-track{
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
}
.roman-container::-webkit-scrollbar-thumb{
    background: linear-gradient(180deg, var(--bleu), #2a7fb0);
    border-radius: 10px;
    border: 2px solid rgba(0,0,0,0.08);
}
.roman-container{
    scrollbar-width: thin;
    scrollbar-color: var(--bleu) rgba(255,255,255,0.02);
}

/* Mobile / responsive */
@media (max-width: 768px) {
    .roman-container{
        max-height: none !important; /* on enlève la limite de hauteur */
        width: 95% !important;
        margin: 18px auto !important;
        padding: 18px !important;
        border-radius: 12px !important;
        background: rgba(255,255,255,0.06) !important;
    }

    .roman-container p{
        font-size: 0.98rem;
        text-indent: 0; /* pas d'indent sur mobile */
        line-height: 1.6;
    }
}

@media (max-width: 420px) {
    .roman-container p{
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* Hero image above the roman content */
.roman-hero{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 20px 0 10px 0;
    text-align: center;
}
.roman-hero img{
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 420px;
    height: auto;
    border: 3px solid var(--bleu);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(52,152,219,0.25);
    background: rgba(255,255,255,0.02);
}

@media (max-width: 480px) {
    .roman-hero img{
        max-width: 320px;
        width: 90%;
    }
}

/* Illustration insérée depuis les textes (ex: [IMG:ChaletALaPlage.jpg]) */
.illustration-roman{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}
.illustration-roman img{
    width: 100%;
    max-width: 540px; /* taille de lecture confortable */
    max-height: 80vh; /* ne dépasse pas la hauteur de l'écran */
    height: auto;
    object-fit: contain;
    border: 3px solid var(--bleu);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(52,152,219,0.18);
    background: rgba(255,255,255,0.02);
}
.illustration-roman span{
    display: block;
    margin-top: 8px;
    color: var(--gris-clair);
    font-size: 0.9rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .illustration-roman img{
        max-width: 95%;
        height: auto;
    }
}

/* Chapitre 1 : appliquer le même style visuel que le synopsis */
.chapitre1{
    width: 90%;
    max-width: 1100px;
    margin: 20px auto 60px auto; /* espacement entre synopsis et chapitre */
    background: rgba(255,255,255,0.05);
    border: 2px solid var(--bleu);
    border-radius: 16px;
    padding: 30px;
    text-align: justify;
    line-height: 1.8;
    color: var(--blanc);
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

.chapitre1 h3{
    margin-top: 0;
    color: var(--bleu);
    text-align: center;
}

@media (max-width: 768px) {
    .chapitre1{
        width: 95% !important;
        padding: 18px !important;
        margin: 16px auto 40px auto;
        border-radius: 12px !important;
        background: rgba(255,255,255,0.06) !important;
    }
    .chapitre1 h3{
        font-size: 1.1rem;
    }
}