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

.history-box {
    width: 230px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px auto; /* Centre automatiquement horizontalement */
    background: var(--bleu);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
}

.history-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(52,152,219,0.35);
}

.history-box a {
    color: var(--blanc);
    text-decoration: none;
    font-weight: 600;
    width: 100%;
    text-align: center;
}

.Story-container{
    background: rgba(255, 255, 255, 0.05); /* Fond léger comme tes boîtes */
    border: 2px solid #3498db; /* Bleu identique à tes cadres */
    border-radius: 15px;
    padding: 30px;
    width: 100%;
    max-width: 1000px;
    text-align: justify; /* Justifie le texte pour un rendu plus professionnel */
}
.Story-container p {
    line-height: 1.6; /* Donne de l'air entre les lignes */
    padding: 10px;    /* Évite que le texte touche les bords */
}

.Story-container {
    max-height: 700px;    /* Fixe une hauteur max à la boîte */
    overflow-y: auto;     /* Ajoute une barre de défilement interne si le texte dépasse */
    padding-right: 20px;  /* Petit espace pour ne pas coller à la barre de scroll */
}

.Story-section{
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.btn-nav {
    background: #3498db;
    color: white;
    padding: 8px 18px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-nav:hover {
    background: #2ecc71; /* Devient vert au survol comme ton main */
    transform: translateY(-2px);
}



.card-contentgame {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.perso-button {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.perso-button img {
    width: 400px;
    transition: transform 0.3s ease;
    border: 1px solid var(--bleu);
    border-radius: 10px;
    background: rgba(52, 152, 219, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.perso-button img:hover {
    border-color: #ffffff; /* La bordure devient blanche ou plus claire au survol */
    box-shadow: 0 0 15px var(--bleu); /* Un léger halo lumineux */
}

.perso-title {
    color: var(--blanc);
    text-align: center;
    margin: 30px 0 10px 0;
}

.map-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
}
.map-card img {
    width: 100%;
    height: auto;
    border: 3px solid #2980b9;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(41, 128, 185, 0.4);
}

.map-text {
    line-height: 1.6; /* Donne de l'air entre les lignes */
    padding: 10px;    /* Évite que le texte touche les bords */
}           

.monde-title {
    color: var(--blanc);
    text-align: center;
    margin: 30px 0 10px 0;
}

.antagoniste-title {
    color: var(--blanc);
    text-align: center;
    margin: 30px 0 10px 0;
}

.deesse-title {
    color: var(--blanc);
    text-align: center;
    margin: 30px 0 10px 0;
}

.imagerumillia {
    display: flex;
    justify-content: center;
    width: 180px;
    margin: 0 auto;
    
}

/* --- SECTION ANTAGONISTES --- */
.antagonistes-title {
    text-align: center;
    margin: 30px 0;
    color: #ff4d4d;
}

.boss-card {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur PC */
    gap: 30px;
    justify-items: center;
    padding: 20px;
}

.antagoniste-text p, .deesse-text p {
    line-height: 1.6; /* Donne de l'air entre les lignes */
    padding: 10px;    /* Évite que le texte touche les bords */
}

.antagoniste-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
}

.antagoniste-item img {
    width: 400px; /* Taille fixe demandée */
    height: 400px;
    object-fit: cover;
    border: 3px solid #940000;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(148, 0, 0, 0.5);
}

.antagoniste-item img:hover {
    filter: brightness(1.2); /* L'aura rouge semble s'allumer */
    transition: 0.4s;
}

.antagoniste-text {
    margin-top: 15px;
    text-align: center;
    background: rgba(15, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
    color: #eee;
}


/* --- SECTION BESTIAIRE --- */
.bestiaire-title {
    text-align: center;
    margin: 30px 0;
    color: #a020f0; /* Violet pour Malakai */
}

.bestiaire-card {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.bestiaire-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px; /* Un peu plus large pour l'image de groupe */
}

.bestiaire-item img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border: 3px solid #a020f0; /* Bordure violette */
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(160, 32, 240, 0.5);
    transition: filter 0.3s ease;
}

.bestiaire-item img:hover {
    filter: brightness(1.2); /* L'aura violette semble s'allumer */
    transition: 0.4s;
}

.bestiaire-text {
    margin-top: 15px;
    text-align: center;
    background: rgba(20, 0, 30, 0.8);
    padding: 15px;
    border-radius: 10px;
    border-bottom: 2px solid #a020f0;
    color: #ddd;
}


/* --- SECTION DÉESSE AMALIA --- */
.deesse-card {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.deesse-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
}

.deesse-item img {
    width: 450px;
    height: auto;
    border: 3px solid #f1c40f;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(241, 196, 15, 0.4);
}

.deesse-item img:hover {
    filter: brightness(1.2); /* L'aura dorée semble s'allumer */
    transition: 0.4s;
}

.deesse-text {
    margin-top: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border-top: 2px solid #f1c40f;
}

.map-card {
    display: flex;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* --- CORRECTIF MOBILE EXPRESS --- */
@media (max-width: 768px) {
    .synopsis-box, .Story-container {
        max-height: none !important; /* On enlève la limite de hauteur */
        width: 95% !important;        /* On prend presque toute la largeur */
        margin: 20px auto !important; /* On centre */
        padding: 15px !important;     /* On respire */
        background: rgba(255, 255, 255, 0.1) !important; /* Fond plus clair */
    }

    .synopsis-box p, .Story-container p {
        color: #ffffff !important;    /* On force le texte en BLANC */
        font-size: 0.95rem !important;
        text-indent: 0 !important;    /* On enlève le décalage sur mobile */
    }

    .titre h1 {
        font-size: 2rem !important;   /* On réduit le gros titre */
    }
}


/* --- mobile --- */
@media (max-width: 768px) {
    .card-contentgame {
        padding: 20px;
    }

    .perso-button img {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .imagerumillia img {
        width: 100%;
        max-width: 480px;
        height: auto;
    }
}

/* Media Query pour mobiles (généralement max-width: 768px ou 900px selon ton site) */
@media (max-width: 900px) {
    
    /* On ajuste le container du bestiaire */
    .bestiaire-card {
        padding: 10px; /* Moins d'espace sur les côtés pour gagner de la place */
    }

    .bestiaire-item {
        width: 100%; /* Le bloc prend toute la largeur disponible */
        max-width: 100%; 
    }

    .bestiaire-item img {
        width: 100%; /* L'image s'étire pour remplir le téléphone */
        height: auto; /* Garde les proportions pour ne pas écraser les gobelins */
        max-width: 450px; /* On limite quand même pour que ça ne devienne pas géant sur tablette */
        border-radius: 8px; /* Bordures un peu plus fines sur mobile */
    }

    .bestiaire-text {
        width: 95%; /* Le texte prend presque toute la largeur */
        font-size: 0.9rem; /* On réduit un tout petit peu la taille de police pour la lisibilité */
    }
}

@media (max-width: 900px) {
    .boss-card {
        /* On passe d'une grille de 2 colonnes à 1 seule colonne */
        grid-template-columns: 1fr; 
        gap: 50px; /* On augmente un peu l'espace entre les deux méchants */
    }

    .antagoniste-item {
        /* On permet à l'image de s'adapter à la largeur de l'écran */
        width: 90%; 
        max-width: 400px; /* Mais elle ne dépassera jamais 400px */
    }

    .antagoniste-item img {
        /* L'image prend toute la largeur du container parent (90% de l'écran) */
        width: 100%;
        height: auto; /* On garde les proportions pour ne pas l'écraser */
    }
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
    .boss-card {
        grid-template-columns: 1fr; /* On empile les méchants */
    }

    .antagoniste-item img, .deesse-item img {
        width: 100%; /* S'adapte à l'écran du téléphone */
        max-width: 400px;
    }
}

/* --- ADAPTATION MOBILE --- */
@media (max-width: 768px) {
    .Story-section {
        padding: 10px; /* On réduit l'espace autour de la section */
    }

    .Story-container {
        width: 95%;        /* On laisse 5% de vide pour ne pas toucher les bords */
        padding: 15px;     /* On réduit l'espace interne pour gagner de la place */
        max-height: none;  /* On enlève la limite de hauteur pour scroller normalement avec le pouce */
    }

    .Story-container h3 {
        font-size: 1.2rem; /* Titre un peu plus petit sur téléphone */
    }

    p {
        font-size: 0.95rem; /* Texte légèrement plus petit pour la lecture mobile */
        line-height: 1.5;   /* On resserre un peu l'espace entre les lignes */
        text-align: left;   /* Le "justify" fait souvent des gros trous blancs sur mobile, "left" est plus sûr */
    }

    .navigation-chapitres {
        flex-direction: column; /* On empile les boutons Suivant/Précédent */
        gap: 15px;
        align-items: center;
        width: 100%;            /* Ajoute ça si ce n'est pas déjà fait */
        padding: 20px 0;
    }

    .btn-nav {
    width: 90%;             /* On laisse un peu de vide sur les côtés */
    max-width: 280px;       /* On évite qu'ils soient trop immenses */
    text-align: center;
    padding: 12px 5px;      /* On augmente la hauteur pour que ce soit facile à cliquer */
    display: block;         /* Pour bien prendre toute sa ligne */
    margin: 0 auto;         /* Centrage horizontal */
    white-space: nowrap;    /* Empêche le texte de revenir à la ligne à l'intérieur du bouton */
    overflow: hidden;       /* Sécurité anti-débordement */
    text-overflow: ellipsis;/* Si vraiment c'est trop long, ça met des "..." au lieu de couper moche */
    }

    
    /* On ajuste aussi tes boutons si besoin */
    .perso-button img {
        width: 100%;       /* L'image s'adapte à la largeur du téléphone */
        max-width: 300px;  /* Mais elle ne devient pas géante */
    }
}