.team-container {
    flex: 0.9
}

@media (min-width: 800px) {
    .left-container {
        display: flex;
        justify-content: left;
        width: 80%;
    }

    .right-container {
        display: flex;
        justify-content: right;
        width: 80%;
    }
}

.bulle-membre {
    border-style: solid;
    border-width: 0px 37px 0px 37px;
    border-image-source: url('../img/bulle.png');
    border-image-slice: 0 37 0 37 fill;
    border-image-repeat: stretch;
    max-width: 100%;
    margin-top: 10px;
    
    /* ON VIRÉ LA HAUTEUR FIXE POUR QUE LA BULLE SE TASSE */
    height: auto; 
    
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: visible !important; 
    position: relative;
    filter: drop-shadow(0px 4px 5px rgba(0,0,0,0.5));
    margin-bottom: 0px;
    padding: 0;
}
.bulle-nom-titre {
    font-family: 'Averia Serif Libre', serif;
    color: #fde08d;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 2px 2px 3px #000;
    margin-bottom: 0;
    
    z-index: 15;
    position: relative;
    display: inline-block;
    padding: 5px 40px;
    background-image: url('../img/name_bg.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    left: 50%;
    transform: translateX(-50%);
}

/* --- NOUVEAU : TAGS TOUT EN BAS --- */
.tags-row-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1; /* Prend le reste de la place à droite */
    justify-content: center; /* CENTRE LES TAGS DANS CETTE ZONE RESTANTE */
    align-items: center;
}

.tag {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: rgba(0,0,0,0.8);
    border: 1px solid #fde08d;
    color: #fde08d;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.avatar-box {
    margin-top: -1.3vw;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bulle-inner-content {
    flex: 0 0 auto;
    display: flex;
    align-items: stretch;
    gap: 1.5vw;
    padding: 0 0.4vw;
    flex-direction: row;
}

.avatar-img-giant {
    width: calc(70px + 2.5vw);
    height: calc(70px + 2.5vw);
    border: 2px solid #fde08d;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.8);
    position: relative;
    z-index: 10;
    margin-bottom: 5px;
}

.details-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0px; 
    margin-top: 0;
    justify-content: space-between;
    margin-bottom: 8px;
}

.projects-row {
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.4;
    padding-bottom: 5px;
}

.projects-row strong {
    color: #fde08d;
    font-weight: bold;
}

.project-list-vertical {
    padding: 5px; /* Padding minimal par défaut */
    font-size: 1rem;
    color: #eee;
    line-height: 1.2;
    max-height: 80px; 
    overflow-y: auto;
    overflow-x: hidden;
    transition: background 0.3s ease; /* Transition douce pour l'apparition du fond */
    
    /* PAR DÉFAUT : Pas de fond, pas de bordure */
    background: transparent;
    border: 1px solid transparent;
}

/* --- LE STYLE QUI S'ACTIVE SEULEMENT SI ÇA SCROLLE --- */
.project-list-vertical.has-scroll {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(253, 224, 141, 0.1);
    border-radius: 4px;
    padding: 10px; /* On augmente le padding pour le confort quand le fond est là */
}

/* Garde ta scrollbar RPG ici (elle ne s'affichera de toute façon que si ça dépasse) */
.project-list-vertical::-webkit-scrollbar { width: 8px; }
.project-list-vertical::-webkit-scrollbar-thumb { background: #fde08d; border-radius: 10px; }


.project-list-vertical::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.project-list-vertical::-webkit-scrollbar-thumb {
    background: #fde08d; /* Jaune doré comme tes bordures */
    border-radius: 10px;
}

.project-list-vertical::-webkit-scrollbar-thumb:hover {
    background: #fff; /* Elle s'illumine au survol */
}

/* RESEAUX */
.socials-row {
    display: flex;
    gap: 15px;
    flex-direction: row;
    min-height: 10px;
    min-width: 130px;
}

.social-icon {
    display: inline-block !important;
    min-width: 24px;
    min-height: 24px;
    color: #fde08d !important;
    text-decoration: none;
    font-size: 1.4rem;
    transition: transform 0.2s, color 0.2s;
}

.social-icon i {
    font-style: normal;
    display: inline-block;
    vertical-align: middle;
}

.social-icon:hover {
    color: #fff;
    transform: scale(1.2);
}

/* Couleurs spécifiques */
.tag-programmeur { background: #2980b9; color: white; }
.tag-traducteur { background: #27ae60; color: white; }
.tag-editeur-images { background: #e67e22; color: white; }
.tag-editeur-video          { background: #8e44ad; color: white; }
.tag-blagueur-professionnel { background: #f1c40f; color: black; }
.tag-fondateur              { background: #c0392b; color: white; }
.tag-lexique                { background: #7f8c8d; color: white; }
.tag-testeur                { background: #16a085; color: white; }
.bulle-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 10px;
    /* ON RÉDUIT LES MARGES ICI */
    
    z-index: 20;
    position: relative;
    margin-top: 10px;
    margin-bottom: -25px;
}

.bulle-membre.has-avatar .socials-row {
    width: 130px; /* Même largeur que l'avatar */
    justify-content: center;
    margin-bottom: 8px;
}

.bulle-membre.no-avatar {
    /* On réduit la hauteur car il n'y a pas d'image de 130px à loger */
    min-height: 110px; 
    height: auto;
}

.bulle-membre.no-avatar .bulle-inner-content {
    /* On remonte un peu pour coller au titre, mais pas trop */
    margin-top: -0px; 
    padding-top: 0;
}

.bulle-membre.no-avatar .bulle-footer {
    /* C'EST ICI QUE ÇA SE JOUE */
    /* On pousse le footer vers le bas pour qu'il s'affiche SUR la bordure de 37px */
    margin-top: 10px;    /* Espace entre les projets et les icônes */
    
    padding-left: 15px;
    z-index: 20;
}

.bulle-membre.no-avatar .socials-row {
    width: auto; /* On n'a plus besoin de simuler la largeur de l'avatar */
    margin-left: 0;
}

/* --- RAPPEL POUR LA VERSION AVEC AVATAR (pour pas que ça bouge) --- */
.bulle-membre.has-avatar {
    min-height: 170px;
}

.bulle-membre.has-avatar .bulle-footer {
}
