/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #006633 0%, #004d26 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: #FFD700;
}

.logo-text p {
    font-size: 0.9rem;
    color: #e0e0e0;
}

.contact-info {
    text-align: right;
    font-size: 0.9rem;
}

.contact-info p {
    margin-bottom: 0.25rem;
}

.contact-info strong {
    color: #FFD700;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.main-title {
    text-align: center;
    font-size: 2rem;
    color: #006633;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Section des filtres */
.filters-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

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

.filter-group label {
    font-weight: 600;
    color: #006633;
    font-size: 0.9rem;
}

.filter-select {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #006633;
    box-shadow: 0 0 0 3px rgba(0, 102, 51, 0.1);
}

.filter-select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Champ de recherche */
.search-section {
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #006633;
    box-shadow: 0 0 0 3px rgba(0, 102, 51, 0.1);
}

/* Checkboxes */
.checkbox-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
}

.main-checkboxes {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.sub-checkboxes {
    margin-left: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    transition: all 0.3s ease;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: #006633;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #eee;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #006633;
    border-color: #006633;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

/* Section des résultats */
.results-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.result-category {
    border-bottom: 1px solid #e0e0e0;
}

.result-category:last-child {
    border-bottom: none;
}

.category-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: #006633;
    font-size: 1.1rem;
    border-left: 4px solid #006633;
}

.result-list {
    padding: 0;
}

.result-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.result-item:hover {
    background-color: #f8f9fa;
}

.result-item:last-child {
    border-bottom: none;
}

.result-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.result-details {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.no-results {
    padding: 2rem;
    text-align: center;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
}

/* Tableau des structures */
.structures-table-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.structures-table-section h3 {
    color: #006633;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
}

.structures-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.structures-table th,
.structures-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.structures-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #006633;
    border-bottom: 2px solid #006633;
}

.structures-table tr:hover {
    background-color: #f8f9fa;
}

.structures-table td:first-child {
    font-weight: 500;
}

.structures-table td:nth-child(2) {
    font-weight: 600;
    color: #006633;
}

/* Footer */
.footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 1.5rem 0 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-title {
    font-weight: 600;
    color: #006633;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.footer-subtitle {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.benin-flag {
    width: 100%;
    height: 0.5cm;
    display: flex;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.flag-stripe {
    flex: 1;
    height: 100%;
}

.flag-green {
    background: linear-gradient(135deg, #009E60 0%, #007A4D 100%);
}

.flag-yellow {
    background: linear-gradient(135deg, #FCD116 0%, #F1C40F 100%);
}

.flag-red {
    background: linear-gradient(135deg, #CE1126 0%, #A61E1E 100%);
}

/* Classes utilitaires */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Media Queries pour la responsivité */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .hierarchical-filters {
        grid-template-columns: 1fr;
    }
    
    .main-checkboxes {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sub-checkboxes {
        margin-left: 0;
        grid-template-columns: 1fr;
    }
    
    .filters-section {
        padding: 1.5rem;
    }
    
    .structures-table-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main-title {
        font-size: 1.3rem;
    }
    
    .filters-section {
        padding: 1rem;
    }
    
    .structures-table-section {
        padding: 1rem;
    }
    
    .structures-table th,
    .structures-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}