/* RESPONSIVE DESIGN */

/* Tablettes (768px à 1024px) */
@media screen and (max-width: 1024px) {
    body {
        padding-left: 10%;
        padding-right: 10%;
    }
    
    .fiche-personnage {
        flex-direction: column;
    }
    
    .personnalite,
    .contacts,
    .langues,
    .univers {
        width: 100%;
        margin-bottom: 2%;
    }
    
    .photo {
        width: 100%;
        max-width: 200px;
        margin: 0 auto 2%;
    }
    
    .fiche-projets section {
        width: 100%;
    }
    
    .images-fiche-projets {
        width: 100%;
        max-width: 400px;
    }
    
    .skill-btn {
        width: 22%;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}

/* Petites tablettes et grands mobiles (481px à 768px) */
@media screen and (max-width: 768px) {
    body {
        padding-left: 5%;
        padding-right: 5%;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .personnage-entete {
        flex-direction: column;
        text-align: center;
    }
    
    .fiches-xp section,
    .fiches-formations section {
        flex-direction: column;
        text-align: center;
    }
    
    .fiches-xp-texte,
    .fiches-formations-texte {
        width: 100%;
    }
    
    .fiches-xp img,
    .fiches-formations img {
        margin-bottom: 15px;
        width: 80px;
    }
    
    .skill-btn {
        width: 30%;
        margin: 2%;
    }
    
    .skills img {
        width: 20px;
        height: 20px;
    }
    
    .portal:hover {
        transform: scale(1.5);
    }
    
    .skill-btn:hover {
        transform: scale(1.2);
    }
    
    .fiche-personnage section:hover,
    .fiche-xp section:hover,
    .fiches-formations section:hover,
    .fiche-pouvoirs section:hover,
    .fiche-projets section:hover {
        transform: scale(1.02);
    }
    
    #modalContent {
        max-width: 90%;
        margin: 20% auto;
    }
}

/* Mobiles (320px à 480px) */
@media screen and (max-width: 480px) {
    body {
        padding-left: 2%;
        padding-right: 2%;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 0.9rem;
    }
    
    .section,
    .personnage,
    .fiche-personnage,
    .fiche-personnage section,
    .xp,
    .fiches-xp section,
    .formations,
    .fiches-formations,
    .fiches-formations section,
    .fiche-pouvoirs,
    .fiche-pouvoirs section,
    .projets,
    .fiche-projets,
    .fiche-projets section {
        margin: 2% 0;
        padding: 3%;
    }
    
    .skill-btn {
        width: 45%;
        margin: 2%;
        padding: 3%;
    }
    
    .skills img {
        width: 18px;
        height: 18px;
        margin: 5%;
    }
    
    .fiches-xp img,
    .fiches-formations img {
        width: 60px;
    }
    
    .images-fiche-projets {
        width: 100%;
        max-width: 300px;
    }
    
    .download-button {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Désactiver les effets hover sur mobile pour éviter les problèmes tactiles */
    .portal:hover,
    .skill-btn:hover,
    .download-button:hover,
    .fiche-personnage section:hover,
    .fiche-xp section:hover,
    .fiches-formations section:hover,
    .fiche-pouvoirs section:hover,
    .fiche-projets section:hover {
        transform: none;
        background-color: initial;
    }
    
    /* Mais garder un effet au tap/touch */
    .portal:active,
    .skill-btn:active,
    .download-button:active {
        transform: scale(0.98);
    }
    
    #modalContent {
        max-width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    #modalContent ul li {
        margin: 3% 0;
        padding: 3%;
    }
}

/* Très petits mobiles (moins de 320px) */
@media screen and (max-width: 320px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .skill-btn {
        width: 100%;
        margin: 1% 0;
    }
    
    .images-fiche-projets {
        max-width: 250px;
    }
    
    .fiches-xp img,
    .fiches-formations img {
        width: 50px;
    }
}