/**
 * Styles pour l'affichage des images de profil
 * Améliore l'apparence et la cohérence des images
 */

/* Styles pour les images de profil */
.profile-image {
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.profile-image:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

/* Styles pour les placeholders avec initiales */
.profile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.profile-placeholder:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

/* Styles pour les avatars dans les tableaux */
.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.avatar-sm:hover {
    border-color: #007bff;
    transform: scale(1.1);
}

/* Styles pour les avatars moyens */
.avatar-md {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #dee2e6;
    transition: all 0.2s ease;
}

.avatar-md:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

/* Styles pour les avatars larges */
.avatar-lg {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #dee2e6;
    transition: all 0.3s ease;
}

.avatar-lg:hover {
    border-color: #007bff;
    transform: scale(1.02);
}

/* Styles pour les avatars extra-larges */
.avatar-xl {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #dee2e6;
    transition: all 0.3s ease;
}

.avatar-xl:hover {
    border-color: #007bff;
    transform: scale(1.02);
}

/* Animation de chargement pour les images */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Styles pour les erreurs d'images */
.image-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.image-error::before {
    content: "⚠️";
    margin-right: 5px;
}

/* Styles pour les images cassées */
.broken-image {
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.broken-image::before {
    content: "🖼️";
    margin-right: 5px;
}

/* Responsive design pour les images */
@media (max-width: 768px) {
    .avatar-lg {
        width: 120px;
        height: 120px;
    }
    
    .avatar-xl {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 576px) {
    .avatar-lg {
        width: 100px;
        height: 100px;
    }
    
    .avatar-xl {
        width: 120px;
        height: 120px;
    }
}

/* Styles pour les images dans les cartes */
.card .profile-image {
    margin: 0 auto;
    display: block;
}

/* Styles pour les images dans les tableaux */
.table .profile-image {
    margin: 0;
    display: inline-block;
}

/* Amélioration de l'accessibilité */
.profile-image:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Styles pour les images avec bordures colorées */
.profile-image.border-primary {
    border-color: #007bff !important;
}

.profile-image.border-success {
    border-color: #28a745 !important;
}

.profile-image.border-warning {
    border-color: #ffc107 !important;
}

.profile-image.border-danger {
    border-color: #dc3545 !important;
}
