/* === DOCUMENTS PAGE STYLES === */

/* Container principal pour header + filtres côte à côte */
.documents-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 40px;
}

.documents-header {
    padding: 40px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
}

.documents-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 700;
}

.documents-subtitle {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.5;
}

.documents-search-container {
    display: flex;
    align-items: stretch;
}

.search-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    height: fit-content;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    padding: 15px 60px 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-dark, #0056b3);
}

.search-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.filters-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary);
    font-weight: 600;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    user-select: none;
}

.filter-checkbox:hover {
    background-color: #f8f9fa;
}

.filter-checkbox input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-checkbox .checkmark {
    font-weight: 500;
    color: #333;
}

.filter-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.filter-action-btn {
    padding: 8px 16px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-action-btn:hover {
    background: var(--primary);
    color: white;
}

.documents-results {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results-count {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-sort label {
    font-weight: 500;
    color: #666;
}

.results-sort select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.document-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.document-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.document-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.document-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #888;
}

.document-date {
    font-weight: 500;
}

.document-actions {
    display: flex;
    gap: 10px;
}

.document-action {
    padding: 5px 10px;
    background: #f8f9fa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: var(--primary);
    font-size: 0.8rem;
}

.document-action:hover {
    background: var(--primary);
    color: white;
}

.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results img {
    width: 120px;
    height: 120px;
    opacity: 0.5;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #666;
    margin-bottom: 10px;
}

.no-results p {
    color: #888;
}

/* Section Contact Presse */
.contact-presse-section {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 0 20px;
}

.section-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    margin-bottom: 40px;
}

.contact-presse-section h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 30px;
    font-weight: 600;
}

.presse-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.presse-link {
    display: flex;
    align-items: center;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.presse-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.presse-link img {
    width: 50px;
    height: 50px;
    margin-right: 20px;
    opacity: 0.8;
}

.presse-link h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 5px;
    font-weight: 600;
}

.presse-link p {
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    /* Sur mobile, empiler header et filtres verticalement */
    .documents-top-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .documents-header {
        min-height: auto;
        padding: 30px 20px;
        text-align: center;
    }
    
    .documents-header h1 {
        font-size: 2rem;
    }
    
    .documents-subtitle {
        font-size: 1rem;
    }
    
    .search-section {
        padding: 20px;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .presse-links {
        grid-template-columns: 1fr;
    }
    
    .presse-link {
        flex-direction: column;
        text-align: center;
    }
    
    .presse-link img {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .documents-top-section {
        padding: 0 15px;
    }
    
    .documents-header {
        padding: 20px 15px;
    }
    
    .documents-results,
    .contact-presse-section {
        padding: 0 15px;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-action-btn {
        width: 100%;
    }
}
