/* Styles généraux */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* En-tête */
header {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Cartes adhérents */
.adherent-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.adherent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.adherent-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

.adherent-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.adherent-actions {
    margin-top: auto;
}

/* Formulaires */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-body {
    overflow: visible; /* Évite que la carte soit coupée */
}

/* Styles spécifiques pour le modal participants - VERSION UNIQUE OPTIMISÉE */
#participantsModal.modal {
    overflow-y: auto !important;
}

#participantsModal .modal-dialog {
    max-width: 95% !important;
    width: 95% !important;
    margin: 1rem auto !important;
    height: auto !important;
    max-height: calc(100vh - 2rem) !important;
    display: flex !important;
    flex-direction: column !important;
}

#participantsModal .modal-content {
    max-height: 100% !important;
    height: auto !important;
    overflow: hidden !important;
    border: 1px solid #dee2e6 !important;
    display: flex !important;
    flex-direction: column !important;
}

#participantsModal .modal-header {
    border-bottom: 1px solid #dee2e6 !important;
    padding: 0.75rem 1rem !important;
    flex-shrink: 0 !important;
}

#participantsModal .modal-body {
    max-height: calc(85vh - 120px) !important;
    overflow-y: auto !important;
    padding: 1rem !important;
    flex: 1 1 auto !important;
}

#participantsModal .modal-footer {
    border-top: 1px solid #dee2e6 !important;
    padding: 0.75rem 1rem !important;
    flex-shrink: 0 !important;
}

#participantsModal .table-responsive {
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
}

#participantsModal table {
    margin-bottom: 0 !important;
    width: 100% !important;
    table-layout: fixed !important;
    font-size: 0.9rem !important;
}

#participantsModal table th,
#participantsModal table td {
    padding: 0.5rem !important;
    vertical-align: middle !important;
}

#participantsModal table th:nth-child(1),
#participantsModal table td:nth-child(1) {
    width: 20% !important;
}

#participantsModal table th:nth-child(2),
#participantsModal table td:nth-child(2) {
    width: 20% !important;
}

#participantsModal table th:nth-child(3),
#participantsModal table td:nth-child(3) {
    width: 15% !important;
}

#participantsModal table th:nth-child(4),
#participantsModal table td:nth-child(4) {
    width: 45% !important;
}

#participantsModal .btn-group {
    white-space: nowrap !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
}

#participantsModal .btn-group .btn {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 0.25rem !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.participant-status {
    cursor: pointer;
}

/* Style pour les événements passés */
.table-secondary.text-muted {
    background-color: #f8f9fa !important;
    opacity: 0.7;
}

.table-secondary.text-muted td {
    color: #6c757d !important;
}

.badge.bg-secondary {
    font-size: 0.7em;
    margin-left: 5px;
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

/* Recherche */
.search-container {
    margin-bottom: 2rem;
}

/* Carte Leaflet */
#map {
    height: 400px;
    width: 100%;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Événements */
.event-card {
    transition: transform 0.3s ease;
    margin-bottom: 1.5rem;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Styles responsifs */
@media (max-width: 768px) {
    .adherent-card {
        margin-bottom: 1rem;
    }
    
    #participantsModal .modal-dialog {
        max-width: 98% !important;
        width: 98% !important;
        margin: 0.5rem auto !important;
    }
    
    #participantsModal .modal-body {
        max-height: calc(90vh - 120px) !important;
    }
}