/* Styles spécifiques à la page Documents */

/* Variables CSS avec la palette fournie */
:root {
    --bleu-nuit: #1a237e;
    --rouge-nuit: #b71c1c;
    --blanc: #ffffff;
    --gris-clair: #f5f5f5;
    --gris-fonce: #424242;
    --bleu-clair: #3f51b5;
    --rouge-clair: #e53935;
    --bleu-gradient: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    --rouge-gradient: linear-gradient(135deg, #b71c1c 0%, #c62828 100%);
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.15);
    --black: #020205;
    --animation: slideUp 1s ease;
}

/* Animation d'apparition */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bannière Documents - Design Amélioré */
.documents-banner {
    background: 
        linear-gradient(135deg, rgba(26, 35, 126, 0.95) 0%, rgba(183, 28, 28, 0.9) 100%),
        url('https://images.unsplash.com/photo-1497636577773-f1231844b336?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--blanc);
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.documents-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at top, rgba(26, 35, 126, 0.3), transparent),
        radial-gradient(ellipse at bottom, rgba(183, 28, 28, 0.3), transparent);
    z-index: 1;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.documents-banner::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.02) 10px,
            rgba(255, 255, 255, 0.02) 20px
        );
    animation: slide 20s linear infinite;
    z-index: 1;
}

@keyframes slide {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.documents-banner .banner-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.documents-banner h1 {
    font-size: 4rem;
    margin-bottom: 25px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 
        3px 3px 6px rgba(0,0,0,0.4),
        0 0 20px rgba(255, 255, 255, 0.1);
    background: linear-gradient(to right, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.documents-banner p {
    font-size: 1.4rem;
    opacity: 0.95;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Section Recherche et Filtres */
.search-filters {
    padding: 40px 0;
    background: var(--gris-clair);
    border-bottom: 1px solid #e0e0e0;
}

.search-container {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--blanc);
    border-radius: 50px;
    padding: 5px;
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 300px;
}

.search-box i {
    color: var(--gris-fonce);
    margin: 0 15px;
    font-size: 1.1rem;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 0;
    font-size: 1rem;
    background: transparent;
}

.search-box button {
    background: var(--bleu-gradient);
    color: var(--blanc);
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background: var(--rouge-gradient);
    transform: translateY(-2px);
}

.filter-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-options select {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    background: var(--blanc);
    color: var(--gris-fonce);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.filter-options select:focus {
    border-color: var(--bleu-clair);
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

/* Section Documents */
.documents-section {
    padding: 80px 0;
    background: var(--blanc);
}

/* En-tête de section - Design Amélioré */
.section-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--bleu-nuit);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.section-header h2::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--bleu-gradient);
    border-radius: 2px;
}

.section-header .divider {
    width: 100px;
    height: 4px;
    background: var(--rouge-gradient);
    margin: 20px auto;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.section-header .divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.section-header p {
    font-size: 1.2rem;
    color: var(--gris-fonce);
    max-width: 700px;
    margin: 20px auto 0;
    line-height: 1.8;
    opacity: 0.9;
}

/* Statistiques des documents - Design Compact et Responsive */
.documents-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bleu-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.stat-card:hover::before {
    opacity: 0.04;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(26, 35, 126, 0.12);
    border-color: var(--bleu-clair);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--bleu-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanc);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.25);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.stat-card:nth-child(2) .stat-icon {
    background: var(--rouge-gradient);
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.25);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    box-shadow: 0 4px 12px rgba(67, 160, 71, 0.25);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-info {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--bleu-nuit);
    line-height: 1;
    background: linear-gradient(135deg, var(--bleu-nuit), var(--bleu-clair));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card:nth-child(2) .stat-number {
    background: linear-gradient(135deg, var(--rouge-nuit), var(--rouge-clair));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card:nth-child(3) .stat-number {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--gris-fonce);
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 500;
    opacity: 0.8;
}

/* Grille des documents */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.document-card {
    background: var(--blanc);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    border-left: 4px solid var(--bleu-nuit);
    position: relative;
    animation: var(--animation);
}

.document-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-left-color: var(--rouge-nuit);
}

.document-card.important {
    border-left-color: var(--rouge-nuit);
    background: linear-gradient(135deg, #fff5f5 0%, var(--blanc) 100%);
}

.important-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--rouge-gradient);
    color: var(--blanc);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
}

.important-badge i {
    margin-right: 5px;
}

.epingle-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--blanc);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
    animation: pulse 2s infinite;
}

.epingle-badge i {
    margin-right: 5px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.document-card.epingle {
    border-left-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.document-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.file-icon {
    font-size: 2.5rem;
}

.document-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.file-type {
    background: var(--gris-clair);
    color: var(--gris-fonce);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.file-size {
    color: var(--gris-fonce);
    font-size: 0.85rem;
}

.document-content {
    margin-bottom: 20px;
}

.document-title {
    color: var(--bleu-nuit);
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
}

.document-description {
    color: var(--gris-fonce);
    line-height: 1.5;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.document-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gris-fonce);
    font-size: 0.85rem;
}

.info-item i {
    color: var(--bleu-clair);
    width: 16px;
}

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

.btn-download, .btn-preview {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-download {
    background: var(--bleu-gradient);
    color: var(--blanc);
    text-decoration: none;
}

.btn-download:hover {
    background: var(--rouge-gradient);
    transform: translateY(-2px);
}

.btn-preview {
    background: var(--gris-clair);
    color: var(--gris-fonce);
    border: 2px solid #e0e0e0;
}

.btn-preview:hover {
    background: var(--bleu-clair);
    color: var(--blanc);
    border-color: var(--bleu-clair);
    transform: translateY(-2px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    padding: 10px 15px;
    background: var(--gris-clair);
    color: var(--gris-fonce);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-btn:hover,
.page-btn.active {
    background: var(--bleu-gradient);
    color: var(--blanc);
    transform: translateY(-2px);
}

.page-dots {
    color: var(--gris-fonce);
    padding: 0 5px;
}

/* Section Documents Récents */
.recent-documents {
    padding: 80px 0;
    background: var(--gris-clair);
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.recent-card {
    background: var(--blanc);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.recent-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.recent-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.recent-content {
    flex: 1;
}

.recent-content h4 {
    color: var(--bleu-nuit);
    margin-bottom: 5px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.recent-content p {
    color: var(--gris-fonce);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.recent-link {
    color: var(--bleu-clair);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.recent-link:hover {
    color: var(--rouge-nuit);
}

.recent-link i {
    margin-right: 5px;
}

/* Section Upload */
.upload-section {
    padding: 80px 0;
    background: var(--blanc);
    border-top: 1px solid #e0e0e0;
}

.upload-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--gris-clair);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.upload-container h3 {
    color: var(--bleu-nuit);
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
}

.upload-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--bleu-nuit);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--blanc);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--bleu-clair);
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-upload {
    background: var(--rouge-gradient);
    color: var(--blanc);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-upload:hover {
    background: var(--bleu-gradient);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Responsive Design */
@media (max-width: 992px) {
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filter-options {
        justify-content: center;
    }
    
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .upload-form .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .documents-banner {
        padding: 80px 0 60px;
        background-attachment: scroll;
    }
    
    .documents-banner h1 {
        font-size: 2.8rem;
        letter-spacing: 2px;
    }
    
    .documents-banner p {
        font-size: 1.15rem;
        padding: 0 20px;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }

    .section-header p {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    .documents-stats {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 400px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .document-actions {
        flex-direction: column;
    }
    
    .recent-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-container {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .documents-banner h1 {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .documents-banner p {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .documents-stats {
        gap: 12px;
        max-width: 100%;
        padding: 0 15px;
    }

    .stat-card {
        padding: 15px;
        gap: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 15px;
        padding: 15px;
    }
    
    .search-box input {
        margin: 10px 0;
        text-align: center;
    }
    
    .filter-options {
        flex-direction: column;
    }
    
    .document-card {
        margin: 0 10px;
        padding: 20px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}