/* public/css/characters_page.css */

.characters-page-section { background-color: #1a1c1d; }

/* Barre de sélection (Roster) */
#character-roster-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    background-color: #25282a;
    border-radius: 12px;
    margin-bottom: 30px;
}
.roster-portrait {
    text-align: center;
    text-decoration: none;
    color: #a0a0a0;
    transition: transform 0.2s ease;
}
.roster-portrait:hover, .roster-portrait.active {
    transform: scale(1.1);
    color: #fff;
}
.roster-portrait img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #444;
    transition: border-color 0.2s ease;
}
.roster-portrait:hover img, .roster-portrait.active img {
    border-color: #2ECC71;
}
.roster-portrait span {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
    font-weight: 500; /* On donne un peu de graisse au texte */
    color: #a0a0a0; /* Couleur par défaut pour les noms inactifs */
    transition: color 0.2s ease;
}

/* On change la couleur du nom en même temps que la bordure de l'image */
.roster-portrait:hover span, 
.roster-portrait.active span {
    color: #2ECC71; /* Vert signature pour le nom actif/survolé */
	text-decoration: none;
	font-weight: 500;
	
}
/* On rend le sélecteur plus spécifique que "main a" */
#character-roster-nav a.roster-portrait,
#character-roster-nav a.roster-portrait:link,
#character-roster-nav a.roster-portrait:visited {
    text-decoration: none;
    color: #a0a0a0; /* Couleur par défaut */
    transition: all 0.2s ease;
}

/* On rend aussi ce sélecteur plus spécifique */
#character-roster-nav a.roster-portrait:hover,
#character-roster-nav a.roster-portrait.active {
    transform: scale(1.1);
    color: #2ECC71 !important; /* On ajoute !important pour être absolument sûr de gagner */
}

/* Fiche Personnage */
.character-sheet {
    position: relative;
    min-height: 500px;
    background-color: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #3a3a3a;
}
.sheet-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain; /* L'image est contenue, pas coupée */
    background-repeat: no-repeat;
    background-position: left bottom; /* Personnage calé en bas à gauche */
    opacity: 0.7;
}
.sheet-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.sheet-header, .sheet-body {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8); /* Ombre légère pour la lisibilité */
}

.sheet-header { text-align: right; }
.char-name { font-size: 3rem; margin: 0; text-shadow: 2px 2px 5px #000; }
.char-bio-title { font-size: 1.2rem; color: #b0b0b0; font-style: italic; margin-top: 5px; margin-bottom: 5px; }

.sheet-body {
    display: flex;
    justify-content: flex-end; /* Aligne le contenu à droite */
    gap: 40px;
}
.char-bio { max-width: 50%; }
.char-bio p { line-height: 1.7; color: #ccc; }

.char-stats { width: 250px; }
.char-stats h4 { margin-top: 0; color: #2ECC71; }


.characters-page-section .stats-list { list-style: none; padding: 0; margin: 0; }
.characters-page-section .stats-list li {
    display: flex;
    align-items: center;
    margin-bottom: 12px; /* Un peu plus d'espace */
    font-size: 0.9rem;
    font-weight: 500;
}
.characters-page-section .stats-list li > span:first-child { /* Le label (Power, Control...) */
    width: 80px;
    color: #ccc;
}
.characters-page-section .stat-bar {
    flex-grow: 1;
    height: 12px; /* Barres un peu plus épaisses */
    background-color: #444;
    border-radius: 6px;
    overflow: hidden; /* Pour que la barre interne hérite du border-radius */
}
.characters-page-section .stat-bar div {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease-out; /* Petite animation au chargement */
}

/* NOUVEAU : La valeur numérique de la stat */
.characters-page-section .stat-value {
    width: 30px; /* Espace fixe pour l'alignement */
    text-align: right;
    font-weight: bold;
    color: #fff;
    margin-left: 10px;
	font-size: 0.9rem;
}

/* NOUVEAU : Application des couleurs officielles */
.characters-page-section .stat-power .stat-bar div { background-color: #FD0100; }
.characters-page-section .stat-control .stat-bar div { background-color: #FFA200; }
.characters-page-section .stat-accuracy .stat-bar div { background-color: #76C410; }
.characters-page-section .stat-spin .stat-bar div { background-color: #00A2FF; }
.characters-page-section .stat-curve .stat-bar div { background-color: #AB3DFF; }

/* On peut même colorer la valeur numérique */
.characters-page-section .stat-power .stat-value { color: #FD0100; }
.characters-page-section .stat-control .stat-value { color: #FFA200; }
.characters-page-section .stat-accuracy .stat-value { color: #76C410; }
.characters-page-section .stat-spin .stat-value { color: #00A2FF; }
.characters-page-section .stat-curve .stat-value { color: #AB3DFF; }

.character-hall-of-fame {
    padding-bottom: 20px;
}

/* Pour les écrans jusqu'à 1600px */
@media (max-width: 1600px) {
    .char-name { font-size: 2.8rem; }
    .sheet-body { gap: 30px; }
    .char-bio { max-width: 45%; }
}

/* Pour les écrans jusqu'à 1280px */
@media (max-width: 1280px) {
    .sheet-content { padding: 30px; }
    .char-name { font-size: 2.5rem; }
    
    /* Le changement principal : on passe en colonne */
    .sheet-body { 
        flex-direction: column;
        justify-content: flex-start; /* On aligne en haut */
        margin-top: 20px; /* On ajoute de l'espace */
    }
    .char-bio { max-width: 100%; } /* La bio prend toute la largeur */
    .char-stats { width: 100%; }   /* Les stats aussi */
}

/* Pour les écrans jusqu'à 800px (Tablettes) */
@media (max-width: 800px) {
    .sheet-background {
        background-position: center top; /* Centre le personnage en haut */
        opacity: 0.3; /* On le rend plus transparent */
    }
    .sheet-header { text-align: center; } /* Centre le nom */
    .char-name { font-size: 2.2rem; }
    .sheet-body { margin-top: 20px; }
}

/* Pour les écrans mobiles */
@media (max-width: 500px) {
    /* On ajuste la barre de sélection */
    .roster-portrait img { width: 50px; height: 50px; }
    .roster-portrait span { font-size: 0.8rem; }
    #character-roster-nav { padding: 15px; gap: 10px; }

    /* On ajuste la fiche */
    .sheet-content { padding: 20px; }
    .char-name { font-size: 1.8rem; }
    .char-bio-title { font-size: 1rem; }
    .char-bio p { font-size: 0.9rem; line-height: 1.6; }
    
    /* On ajuste les stats */
    .characters-page-section .stats-list li > span:first-child { width: 70px; }
}

/* NOUVEAU : Styles pour les infos personnelles */
.char-personal-info {
    display: flex;
    justify-content: flex-end; /* Aligner à droite */
    gap: 20px; /* Espace entre les infos */
    color: #ccc;
	margin-bottom: 15px;
}
.info-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
	vertical-align: middle; 
}
.info-item .material-symbols-outlined {
    font-size: 1.2rem;
    margin-right: 8px;
    color: #2ECC71; /* Vert signature pour les icônes */
	line-height: 1; 
}