/* 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;
}

/* 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(-5px);
}

.event-date {
    font-weight: bold;
    color: #0d6efd;
}

.event-location {
    color: #6c757d;
    font-style: italic;
}

/* Documents styles */
.documents-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.breadcrumb {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.actions-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn:hover {
    opacity: 0.8;
}

.file-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: #f8f9fa;
}

.file-item:last-child {
    border-bottom: none;
}

.file-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.file-meta {
    font-size: 12px;
    color: #666;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .adherent-photo {
        height: 150px;
    }
    
    #map {
        height: 300px;
    }
}

/* Animation de chargement */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #0d6efd;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Statuts de participation */
.status-waiting {
    background-color: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background-color: #d4edda;
    color: #155724;
}

.status-unavailable {
    background-color: #f8d7da;
    color: #721c24;
}

/* Styles pour les événements */
.event-card {
    margin-bottom: 20px;
}

#map, #edit_map {
    height: 300px;
    margin-bottom: 15px;
    width: 100%;
    z-index: 1; /* Assure que la carte est au-dessus des autres éléments */
}

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

/* Styles spécifiques pour le modal participants */
#participantsModal.modal {
    overflow: visible !important;
}

#participantsModal .modal-dialog {
    max-width: 99% !important;
    width: 99% !important;
    margin: 0.5rem auto !important;
    height: auto !important;
    max-height: none !important;
}

#participantsModal .modal-content {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    border: none !important;
}

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

#participantsModal .modal-body {
    max-height: none !important;
    overflow: visible !important;
    padding: 1rem !important;
    height: auto !important;
}

#participantsModal .modal-footer {
    border-top: 1px solid #dee2e6 !important;
    padding: 0.75rem 1rem !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;
}

/* Force la suppression de toute scrollbar */
#participantsModal * {
    overflow: visible !important;
    max-height: none !important;
}

.participant-status {
    cursor: pointer;
}