/* Styles pour le plugin Liste Adhérent */

.adherent-filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: end;
    position: relative;
}

.filter-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-column label {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.adherent-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    width: 100%;
}

#reset-filters {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

#reset-filters:hover {
    background: #c82333;
}

.adherents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.adherent-card {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.adherent-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.adherent-name {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.adherent-categories {
    margin-bottom: 15px;
}

.category-badge {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.adherent-info p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.adherent-info strong {
    color: #333;
}

.adherent-info a {
    color: #0073aa;
    text-decoration: none;
    word-break: break-word;
}

.adherent-info a:hover {
    text-decoration: underline;
}

.cheque-kdo {
    color: #46b450;
    font-weight: bold;
}

.cheque-kdo strong {
    color: #46b450;
}

/* Responsive */
@media (max-width: 768px) {
    .adherent-filters {
        grid-template-columns: 1fr;
        padding-top: 50px;
    }
    
    #reset-filters {
        top: 10px;
        right: 10px;
    }
    
    .adherents-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading state */
.adherents-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.adherents-loading:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Message d'erreur */
.adherent-error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    border-left: 4px solid #c62828;
}

/* Message de succès */
.adherent-success {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    border-left: 4px solid #2e7d32;
}

/* Styles pour les pages d'administration */
.wrap .card {
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.wrap .card h2 {
    margin-top: 0;
    font-size: 18px;
    color: #23282d;
}

#import-form {
    margin-top: 15px;
}

#import-form input[type="file"] {
    margin-right: 10px;
}

#import-result, #export-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

#import-result.success, #export-result.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

#import-result.error, #export-result.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

.import-errors {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
}

.import-errors ul {
    margin: 0;
    padding-left: 20px;
}

.import-errors li {
    margin-bottom: 5px;
    font-size: 13px;
}

/* Bouton de téléchargement */
.download-link {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
}

.download-link:hover {
    background: #005a87;
    color: white;
}

/* Animation pour les filtres */
.adherents-grid {
    transition: opacity 0.3s ease;
}

.adherents-grid.loading {
    opacity: 0.5;
}

/* Amélioration de l'affichage des informations */
.adherent-info p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.adherent-info strong {
    min-width: 80px;
    flex-shrink: 0;
}

/* Style pour les pages vides */
.no-adherents {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Amélioration du focus et accessibilité */
.adherent-filters select:focus,
.adherent-filters .button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Animation d'apparition des cartes */
.adherent-card {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}