/* Styles pour la page Résultats Kid VTT */

.results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0 60px;
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 18px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.no-results {
    background: #f3f4f6;
    padding: 50px;
    text-align: center;
    border-radius: var(--border-radius);
    color: #4b5563;
    box-shadow: var(--box-shadow);
}

/* Sélecteur d'année */
.year-selector {
    background: #f8fafc;
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    box-shadow: var(--box-shadow);
}

.selector-label {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.year-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.year-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #e5e7eb;
    color: #374151;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.year-btn:hover {
    background: #d1d5db;
    transform: translateY(-2px);
}

.year-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Section des résultats */
.results-content {
    margin-top: 30px;
}

.results-content h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.results-content h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    bottom: 0;
    left: 0;
    border-radius: 2px;
}

.category-section {
    margin-bottom: 50px;
}

.category-section h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f3f4f6;
    border-radius: 8px;
    display: inline-block;
}

/* Grille de PDF */
.pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.pdf-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pdf-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.pdf-icon {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
    padding: 20px;
    text-align: center;
}

.pdf-icon i {
    font-size: 2.5rem;
}

.pdf-info {
    padding: 20px;
    flex-grow: 1;
}

.pdf-info h4 {
    font-size: 1.2rem;
    margin: 0 0 15px;
    color: var(--dark-color);
}

.pdf-info p {
    color: #6b7280;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.pdf-meta {
    font-size: 0.85rem;
    color: #9ca3af;
}

.pdf-actions {
    display: flex;
    border-top: 1px solid #e5e7eb;
}

.pdf-actions a {
    flex: 1;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-actions a i {
    margin-right: 8px;
}

.btn-view {
    color: #3b82f6;
    background: #eff6ff;
}

.btn-view:hover {
    background: #dbeafe;
}

.btn-download {
    color: #10b981;
    background: #ecfdf5;
}

.btn-download:hover {
    background: #d1fae5;
}

/* Modal PDF Viewer */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 18px 25px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.3rem;
}

.close-modal {
    color: #6b7280;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: #111827;
}

.modal-body {
    padding: 20px;
}

#pdfFrame {
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    width: 100%;
    height: 600px;
}

/* Filtres supplémentaires */
.filters-section {
    margin-bottom: 40px;
}

.filters-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: #f8fafc;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: var(--dark-color);
}

.filter-group select,
.filter-group input[type="text"] {
    padding: 8px 15px;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    outline: none;
    font-size: 0.9rem;
    min-width: 150px;
}

.search-btn {
    padding: 8px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: var(--secondary-color);
}

/* Media queries */
@media (max-width: 768px) {
    .pdf-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    #pdfFrame {
        height: 450px;
    }
    
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group select,
    .filter-group input[type="text"] {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .results-container {
        padding: 20px 0 40px;
    }
    
    .year-selector {
        padding: 15px;
    }
    
    .year-btn {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .results-content h2 {
        font-size: 1.7rem;
    }
    
    .category-section h3 {
        font-size: 1.3rem;
    }
    
    .pdf-icon {
        padding: 15px;
    }
    
    .pdf-icon i {
        font-size: 2rem;
    }
    
    .pdf-info {
        padding: 15px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    #pdfFrame {
        height: 350px;
    }
}