@keyframes fadeInUserCard {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIcon {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(20deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    0% {
        border-right-color: rgba(255, 255, 255, 0.75);
    }
    50% {
        border-right-color: transparent;
    }
    100% {
        border-right-color: transparent;
    }
}


.card-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--main-border-color);
    background: linear-gradient(135deg, var(--fourth-bg-color), var(--second-bg-color)); /* Dégradé léger */
    padding: 1.5em 3em; /* Légèrement plus d'espace */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Ombre plus douce */
    border-radius: 15px; /* Coins arrondis */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Ajout d'une transition fluide */
    position: absolute;
    z-index: 999;
    animation: fadeInUserCard 0.3s ease-in-out;
}

.card-info:hover {
    transform: translateY(-10px); /* Effet flottant au survol */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25); /* Accentuation de l'ombre */
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 0.75em;
}

.card-icon {
    flex: 0 0 auto; /* Ne prend pas de place flexible */
    width: 5em; /* Largeur fixe */
    height: 5em; /* Hauteur fixe */
    border-radius: 50%; /* Assure que l'icône reste ronde */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.2em;
    border: 1px solid var(--main-text-color);
    border-radius: 50%;
    background-color: var(--main-background-color); /* Couleur de fond douce */
    display: inline-flex; /* Centrage facile */
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombrage léger pour ajouter de la profondeur */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Animation fluide */
    cursor: pointer; /* Indication qu’il est cliquable */
}

.card-icon:hover {
    transform: translateY(-5px); /* Effet de survol pour donner l'impression qu'il "flotte" */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); /* Accentuer l'ombre au survol */
    background-color: var(--third-bg-color); /* Légère modification de la couleur de fond au survol */
}

.card-icon:active {
    transform: translateY(0); /* Annuler l'effet de survol lors du clic */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Réduire l'ombre lors du clic */
}

.card-image {
    font-size: 2em;
}

.card-name {
    flex: 0 0 70%; /* Prend 70% de l'espace */
    margin-left: 2em;
    white-space: nowrap;
    font-weight: bold;
    font-size: 1.25em;
}

.card-user-infos {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.card-lib {
    flex-basis: 30%;
    font-weight: bold;
}
.card-val {
    flex-basis: 70%;
}

.card-hr {
    width: 100%;
    margin-top: 1em;
    border: none;
    height: 1px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0), var(--main-text-color), rgba(0, 0, 0, 0)); /* Effet de ligne centrale dégradée */
}

.card-name:hover, .card-lib:hover, .card-val:hover {
    color: var(--highlight-color); /* Changement de couleur */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); /* Légère ombre du texte pour plus de profondeur */
}

/* Conteneur de l'icône avec un espacement */
.copy-icon-container {
    margin-left: 0.5em; /* Espacement entre l'email et l'icône */
    display: none; /* Cacher l'icône par défaut */
}

/* Afficher l'icône seulement lorsque la souris survole la ligne de l'email */
.card-mail:hover .copy-icon-container {
    display: inline-block; /* Afficher l'icône au survol */
}

.card-mail {
    transition: opacity 0.3s ease, transform 0.3s ease; /* Ajout de transitions */
}

.copy-message {
    color: var(--main-text-color);
    z-index: 1000;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid;
    width: 0;
    animation: typewriter 2s steps(30, end) 0s 1 normal both, blinkCursor 2s steps(30, end) 1 normal both;
}

.copy-message.show {
    opacity: 1;
    transform: translateY(0); /* Animation d'apparition */
}

.copy-icon {
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

.copy-icon:hover {
    animation: rotateIcon 0.6s ease-in-out;
    color: var(--highlight-color); /* Change la couleur au survol */
}