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

/* Styles spécifiques pour la page Documents UNIQUEMENT */
.documents-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.documents-container .breadcrumb {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
}

.documents-container .breadcrumb a {
    color: #0d6efd;
    text-decoration: none;
}

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

.documents-container .actions-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.documents-container .file-list {
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.documents-container .file-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

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

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

.documents-container .file-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 2rem;
    text-align: center;
}

.documents-container .file-info {
    flex: 1;
    min-width: 0;
}

.documents-container .file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.documents-container .file-name a {
    color: #0d6efd;
    text-decoration: none;
}

.documents-container .file-name a:hover {
    text-decoration: underline;
}

.documents-container .file-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.documents-container .file-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.documents-container .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.documents-container .empty-state p {
    margin-bottom: 0.5rem;
}

/* Styles pour les modals de documents UNIQUEMENT (pas pour participantsModal) */
#createFolderModal,
#uploadModal,
#deleteModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

#createFolderModal .modal-content,
#uploadModal .modal-content,
#deleteModal .modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 0.375rem;
    width: 90%;
    max-width: 500px;
    position: relative;
}

#createFolderModal .close,
#uploadModal .close,
#deleteModal .close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #6c757d;
}

#createFolderModal .close:hover,
#uploadModal .close:hover,
#deleteModal .close:hover {
    color: #000;
}

.documents-container .form-group {
    margin-bottom: 1rem;
}

.documents-container .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.documents-container .form-group input[type="text"],
.documents-container .form-group input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 1rem;
}

.documents-container .form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Styles responsifs pour les documents */
@media (max-width: 768px) {
    .documents-container {
        padding: 1rem;
    }
    
    .documents-container .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .documents-container .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .documents-container .actions-bar {
        flex-direction: column;
    }
    
    #createFolderModal .modal-content,
    #uploadModal .modal-content,
    #deleteModal .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

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