body {
    margin: 0 !important;
    background-color: #f6f6f6 !important;
}

main {
    z-index: 3;
    position: relative;
    margin-bottom: 10vh;
}


@media screen and (min-width: 768px) {
    .nav__menu {
        display: none;
    }
    .profile, section.profile__interests, section.options, section.logout {
        width: 85%;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    section.popup__interest {
        left: 7.5%;
        width: 85% !important;   
    }
    .popup__interest-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media screen and (max-width: 767px) {

}

.backButton {
    margin-top: 2vh;
    padding: 2vh 2vh;
    display: flex;
    align-items: center;
    font-size: 1.4vh;
    color: #525960;
    text-decoration: inherit;
    width: fit-content;
}

.backButton i {
    font-size: 4vh;
    color: #7daed6;
}

.nav__menu {
    z-index: 5;
}


.profile {
    text-align: center;
    padding: 20px;
    position: relative;
    background: #ffffff;
    margin: 0 3vh;
    border-radius: 25px;
    overflow: hidden;
    z-index: 9;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
}

.profile__identity {
    margin: 2vh 0 0 0;
}

/* Conteneur global de la pièce */
.profile__coin-container {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px; /* Crée une profondeur 3D */
    width: 150px;
    height: 150px;
}

.profile__coin {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    transform-style: preserve-3d; /* Permet la rotation 3D */
    transform-origin: center;
    transition: transform 0.3s ease-out; /* Animation fluide */
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

/* Bord de la pièce */
.profile__coin-edge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #d8e8f5; /* Couleur du bord */
    transform: translateZ(-3px); /* Donne une épaisseur au bord */
}


    
/* Face avant (photo de profil) */
.profile__coin-front {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
    backface-visibility: hidden;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateZ(5px); /* Épaisseur simulée */
}

.profile__coin-front img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
}

/* Face arrière (grade) */
.profile__coin-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #d4e4f4;
    color: #57636d;
    display: flex;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    transform: rotateY(180deg) translateZ(5px); /* Épaisseur simulée */
    font-size: 1.2em;
    font-weight: bold;
}


/* Animation */
@keyframes idle-spin {
    0% {
        transform: rotateY(0deg);
    }
    25% {
        transform: rotateY(-45deg);
    }
    50% {
        transform: rotateY(10deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}



.profile__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
    background-color: transparent;
}

.profile_overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    overflow: hidden;
    filter: blur(100px);
    z-index: 0;
}

.bullet_overlay {
    background-color: #7daed6;
    position: absolute;
    border-radius: 50%;
}

.bullet_overlay:nth-child(1) {
    height: 17vh;
    width: 17vh;
    top: -2vh;
    right: -7vh
}

.bullet_overlay:nth-child(2) {
    height: 17vh;
    width: 17vh;
    bottom: 5vh;
    left: -9vh
}

.profile__image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 2px solid #eee;
}

.profile__details h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}



.profile__actions {
    margin-top: 20px;
}

.profile__actions .btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px;
    text-decoration: none;
    border-radius: 5px;
    background-color: #5a67d8;
    color: #fff;
    transition: background-color 0.3s;
}

.profile__actions .btn:hover {
    background-color: #4c51bf;
}

.profile__actions .btn--danger {
    background-color: #e53e3e;
}

.profile__actions .btn--danger:hover {
    background-color: #c53030;
}

.profile__details {
    display: flex;
    justify-content: space-evenly;
}

.profile__numbers {
    font-size: 3vh;
}

/* =================================================================
    5. Profile - Become a member
================================================================= */

section.popup__becomebar {
    background: #ebf5ff;
    position: absolute;
    height: 20vh;
    padding: 3vh;
    margin: 2vh auto;
    border-radius: 25px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
    justify-self: anchor-center;
    will-change: transform, opacity, margin-top;
    opacity: 1;
    transition: opacity 0.3s ease-out;
    width: 85%;
    left: 0;
    right: 0;
    margin-left: auto;  
    margin-right: auto;
}

/* Masquer la popup par défaut */
.popup__becomebar {
    opacity: 0;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
    display: none; /* Sera affiché dynamiquement en JS */
}

/* Quand la popup apparaît */
.popup--visible {
    display: block;
    opacity: 1;
    animation: bounceIn 0.5s ease-out;
}

/* Animation bounce (effet battement de cœur) */
@keyframes bounceIn {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Effet de disparition */
.popup--hidden {
    opacity: 0;
    transform: scale(0.8);
    transition: transform 0.3s ease-in, opacity 0.3s ease-in;
}


.popup__becomebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 2vh 0;
}

h3.popup__becomebar-title {
    font-size: 2vh;
}

.popup__becomebar-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.popup__becomebar-close-btn {
    background: #57636d;
    width: 2.5vh;
    height: 2.5vh;
    border-radius: 50%;
    color: white;
    font-size: 2vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

a.popup__becomebar-btn {
    background: #525960;
    width: fit-content;
    padding: 1vh 1.9vh;
    border: none;
    border-radius: 15px;
    color: #fafffe;
    font-size: 1.5vh;
    font-weight: 550;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* =================================================================
    5. Profile - Interests
================================================================= */

section.profile__interests {
    margin: 2vh 3vh;
    border-radius: 25px;
    display: flex;
    gap: 2vh;
    align-items: center;
    justify-content: center;
    transition: margin-top 0.3s ease-out;
    will-change: transform, opacity, margin-top;
    z-index: 99999;
    position: relative;
}
.interests__content {
    height: 14vh;
    width: 100%;
    background: #ffffff;
    border-radius: 25px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
    padding: 3vh;
    transition: height 0.4s ease-in-out, width 0.4s ease-in-out, top 0.4s ease-in-out;

}



.interest_icon {
    display: flex;
    font-size: 3vh;
}

.interest_text {
    display: flex;
    margin-bottom: -1vh;
    align-items: center;
    font-size: 1.8vh;
    position: relative;
    width: fit-content;
    height: 6vh;
}

.interest_goto {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6vh;
    background: #d4ebfd;
    border-radius: 25px;
    padding: 1vh;
}

i.bx.bx-chevron-right {
    font-size: 2vh;
}

.interests__number {
    background: #55606a;
    padding: 0.6vh;
    border-radius: 50%;
    font-size: 0.8vh;
    color: white;
    position: absolute;
    right: -20px;
    top: 10px;
    width: 1.9vh;
    height: 1.9vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

section.popup__interest {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    display: none;
    transition: margin-top 0.3s ease-out, opacity 0.3s ease-out;
}

.popup__interest-content {
    margin-left: 3vh;
    margin-right: 3vh;
    border-radius: 25px;
    display: flex;
    gap: 2vh;
    align-items: center;
    justify-content: center;
    transition: margin-top 0.3s ease-out, width 0.3s ease-out, opacity 0.3s ease-out;
    z-index: 99999;
    position: relative;
    flex-direction: row;
}

#favorite_popup {
    display: none;
    width: 50%;
    margin-right: auto;
}

#todo_popup {
    display: none;
    width: 50%;
    margin-left: auto;
}   

.interests_disapear {
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.interests_appear {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}


/* =================================================================
    6. Options
================================================================= */



section.options {
    background: #ffffff;
    padding: 2vh;
    margin: 2vh 3vh;
    border-radius : 25px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

h3.option__title.underlined {
    margin: 0.5vh 1vh;
}

.option {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 2vh;
    margin: 1.5vh 0;
}

a.option__link {
    color: #555f68;
    font-weight: 500;
    font-size: 1.5vh;
    background: #f5f9fc;
    padding: 1.5vh 3vh;
    border-radius: 13px;
    display: flex;
    gap: 2vh;
    align-items: center;
}

i.option__icon {
    font-size: 2.3vh;
}


/* =================================================================
    7. Logout
================================================================= */

section.logout {
    background: #ffd9d9;
    padding: 2vh;
    margin: 2vh 3vh;
    border-radius: 20px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
    opacity: 1;
    transition: opacity 0.3s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

a.logout__link {
    font-size: 1.7vh;
    color: #525960;
    font-weight: 500;
}

/* --- Styles pour Swipe-to-Delete --- */
/* Conteneur pour la liste dans le popup */
.popup__interest-content .results__content_list {
    max-height: calc(78vh - 100px); /* Ajuster en fonction de la hauteur du titre/header dans le popup */
    overflow-y: auto;
    padding: 50px 15px 15px 15px; /* Espace pour titre/retour et padding bas/côtés */
    position: relative; /* Pour positionner le titre et le bouton retour */
}

/* Style pour les items dans le profil (hérite de items.css mais on ajoute des spécificités) */
.popup__interest-content .results__content__item {
    position: relative; /* Nécessaire pour positionner l'action */
    overflow: hidden;   /* Cache le bouton delete qui dépasse */
    transition: transform 0.3s ease, opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease, border 0.3s ease; /* Animations */
    z-index: 2;         /* Au-dessus du bouton delete */
    cursor: pointer;
    margin-bottom: 10px; /* Espacement */
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Assurez-vous que les styles de base de items.css sont bien appliqués */
}



/* Style du loader simple */
.list-loader {
    border: 4px solid #f0f0f0; /* Gris clair */
    border-top: 4px solid #7daed6; /* Bleu Noctee */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 30px auto; /* Centrer un peu */
    position: absolute; /* Permet de le centrer dans le conteneur si besoin */
    top: 30px; /* Ajuster position verticale */
    left: 0;
    right: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Conteneur de la liste pendant le chargement */
.results__content_list.list-loading {
    min-height: 100px; /* Donner de l'espace au loader */
    position: relative; /* Pour positionner le loader absolument */
    transition: none; /* Pas de transition pendant le chargement */
    opacity: 1; /* Le conteneur est visible pour montrer le loader */
    visibility: visible;
}
.results__content_list.list-loading > *:not(.list-loader) {
    display: none; /* Cache les vrais items pendant le chargement */
}


/* Conteneur de la liste avant/après affichage du contenu */
.results__content_list {
    transition: opacity 0.4s ease-in-out; /* Transition pour l'apparition du contenu */
    opacity: 0; /* Caché par défaut après fermeture ou avant chargement */
    visibility: hidden;
}

/* Conteneur de la liste quand le contenu est prêt et visible */
.results__content_list.list-visible {
    opacity: 1;
    visibility: visible;
}

/* Assurez-vous que le conteneur parent a assez de hauteur */
.popup__interest-content .interests__content {
    /* ... autres styles ... */
    overflow: hidden; /* Pour cacher le contenu qui dépasse */
}
.popup__interest-content .results__content_list {
    /* Ajustement pour le scroll après apparition */
    max-height: calc(78vh - 100px); /* Hauteur existante */
    overflow-y: auto; /* Activer le scroll si nécessaire */
    /* Le padding-top existant peut être conservé ou ajusté */
    padding: 50px 15px 15px 15px;
}
