/* Style pour la page de gestion des documents - Style CNEJI */

.lbs-documents-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Message de connexion requis */
.documents-login-required {
    text-align: center;
    padding: 3rem;
    background: #f3f4f6;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 600px;
}

.documents-login-required p {
    font-size: 1.125rem;
    color: #374151;
    margin-bottom: 1.5rem;
}

.btn-login {
    display: inline-block;
    background: #5b6fa8;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-login:hover {
    background: #4a5a87;
}

/* Bannière avec titre */
.documents-banner {
    background-image: url('path-to-your-banner-image.jpg');
    background-size: cover;
    background-position: center;
    padding: 4rem 2rem;
    text-align: left;
    position: relative;
    margin-bottom: 2rem;
}

.documents-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.documents-banner h1 {
    position: relative;
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
}

/* Container principal */
.documents-container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

/* Sidebar gauche */
.documents-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: #f3f4f6;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* Bouton ajouter document */
.btn-add-document {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: #5b6fa8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.btn-add-document:hover {
    background: #4a5a87;
}

.btn-add-document svg {
    flex-shrink: 0;
}

/* Navigation des filtres */
.documents-nav {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #d1d5db;
}

.documents-nav h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #5b6fa8;
    margin: 0 0 0.75rem 0;
}

.documents-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.documents-nav ul li {
    margin: 0;
}

.documents-nav .nav-link {
    display: block;
    padding: 0.5rem 0;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.documents-nav .nav-link:hover {
    color: #5b6fa8;
}

/* Sections de filtres */
.filter-section {
    margin-bottom: 2rem;
}

.filter-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem 0;
}

.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4b5563;
}

.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-checkbox:hover span {
    color: #111827;
}

/* Contenu principal */
.documents-main {
    flex: 1;
    min-width: 0;
}

/* Barre de recherche */
.documents-search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 50px;
    padding: 0.5rem;
}

#document-search {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: none;
    font-size: 0.95rem;
    outline: none;
}

#document-search::placeholder {
    color: #9ca3af;
}

.btn-search {
    padding: 0.75rem 1.5rem;
    background: #5b6fa8;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-search:hover {
    background: #4a5a87;
}

.btn-search svg {
    display: block;
}

/* Section documents */
.documents-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #5b6fa8;
    margin: 0 0 1.5rem 0;
}

/* Liste des documents */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Item de document */
.document-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.document-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.document-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #5b6fa8;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.document-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.document-icon svg {
    stroke: currentColor;
}

.document-content {
    flex: 1;
    min-width: 0;
}

.document-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.document-title a {
    color: #5b6fa8;
    text-decoration: none;
    transition: color 0.2s;
}

.document-title a:hover {
    color: #4a5a87;
    text-decoration: underline;
}

.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.meta-item strong {
    color: #111827;
    font-weight: 600;
}

.document-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: #e0e7ff;
    color: #5b6fa8;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Pagination */
.documents-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.page-link:hover {
    background: #f3f4f6;
    border-color: #5b6fa8;
    color: #5b6fa8;
}

.page-link.active {
    background: #5b6fa8;
    border-color: #5b6fa8;
    color: white;
}

.page-dots {
    color: #9ca3af;
    padding: 0 0.5rem;
}

/* Message "Aucun document" */
.no-documents {
    text-align: center;
    padding: 3rem;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
}

.no-documents p {
    font-size: 1.125rem;
    margin: 0;
}

/* Loader */
.documents-loader {
    text-align: center;
    padding: 2rem;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top-color: #5b6fa8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .documents-container {
        flex-direction: column;
    }
    
    .documents-sidebar {
        width: 100%;
        position: static;
    }
    
    .documents-banner h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .documents-container {
        padding: 0 1rem 2rem;
    }
    
    .documents-banner {
        padding: 2rem 1rem;
    }
    
    .documents-banner h1 {
        font-size: 1.75rem;
        padding-left: 0;
    }
    
    .document-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .document-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .documents-search-bar {
        border-radius: 8px;
    }
}