/**
 * Styles frontend pour le widget Membres Elementor
 */

.wp-members-container {
    width: 100%;
    max-width: 100%;
}

.wp-members-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
}

.wp-member-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-member-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.member-photo {
    margin-bottom: 20px;
    position: relative;
}

.member-photo img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #e0e0e0;
    transition: border-color 0.3s ease;
}

.wp-member-item:hover .member-photo img {
    border-color: #007cba;
}

.no-photo {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
}

.no-photo span {
    color: #fff;
    font-size: 48px;
    font-weight: bold;
    text-transform: uppercase;
}

.member-info {
    width: 100%;
}

.member-name {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.member-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    text-align: justify;
    margin: 0;
}

/* Responsive Design */

/* Tablette */
@media (max-width: 768px) {
    .wp-members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .wp-member-item {
        padding: 15px;
    }
    
    .member-photo img,
    .no-photo {
        width: 120px;
        height: 120px;
    }
    
    .no-photo span {
        font-size: 36px;
    }
    
    .member-name {
        font-size: 20px;
    }
    
    .member-description {
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .wp-members-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .wp-member-item {
        padding: 20px;
        margin: 0 10px;
    }
    
    .member-photo img,
    .no-photo {
        width: 100px;
        height: 100px;
    }
    
    .no-photo span {
        font-size: 32px;
    }
    
    .member-name {
        font-size: 18px;
    }
    
    .member-description {
        font-size: 14px;
        text-align: left;
    }
}

/* Lazy Loading */
.member-photo img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.member-photo img[loading="lazy"].loaded {
    opacity: 1;
}

/* Animation de chargement */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wp-member-item {
    animation: fadeIn 0.6s ease forwards;
}

.wp-member-item:nth-child(1) { animation-delay: 0.1s; }
.wp-member-item:nth-child(2) { animation-delay: 0.2s; }
.wp-member-item:nth-child(3) { animation-delay: 0.3s; }
.wp-member-item:nth-child(4) { animation-delay: 0.4s; }
.wp-member-item:nth-child(5) { animation-delay: 0.5s; }
.wp-member-item:nth-child(6) { animation-delay: 0.6s; }

/* Styles pour Elementor Editor */
.elementor-editor .wp-members-container {
    pointer-events: none;
}

.elementor-editor .wp-member-item:hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Support pour les thèmes sombres */
@media (prefers-color-scheme: dark) {
    .wp-member-item {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .member-name {
        color: #ecf0f1;
    }
    
    .member-description {
        color: #bdc3c7;
    }
    
    .member-photo img {
        border-color: #34495e;
    }
    
    .wp-member-item:hover .member-photo img {
        border-color: #3498db;
    }
}
