/* Styles pour la pagination horizontale et les filtres */

/* Filtres verticaux */
.countries-container {
    display: flex;
    gap: 20px;
}

.countries-filters {
    width: 280px;
    flex-shrink: 0;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.countries-filters h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group-title {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
}

.filter-group-title i {
    margin-right: 8px;
    color: #007bff;
}

.filter-option {
    margin-bottom: 10px;
    padding-left: 10px;
}

.filter-checkbox {
    display: none;
}

.filter-checkbox + label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #6c757d;
    transition: all 0.2s ease;
}

.filter-checkbox + label:before {
    content: '';
    width: 16px;
    height: 16px;
    border: 1.5px solid #ced4da;
    border-radius: 3px;
    margin-right: 8px;
    transition: all 0.2s ease;
}

.filter-checkbox:checked + label {
    color: #007bff;
    font-weight: 500;
}

.filter-checkbox:checked + label:before {
    background-color: #007bff;
    border-color: #007bff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8' fill='none'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.filter-option-count {
    margin-left: auto;
    background-color: #e9ecef;
    color: #6c757d;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 500;
}

.filter-clear {
    margin-top: 30px;
    padding: 8px 0;
    border-top: 1px solid #e9ecef;
}

.filter-clear-btn {
    background-color: transparent;
    border: none;
    color: #dc3545;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
}

.filter-clear-btn i {
    margin-right: 5px;
}

.filter-clear-btn:hover {
    text-decoration: underline;
}

.countries-grid {
    flex: 1;
}

/* Correction: Les éléments country-item doivent être visibles par défaut */
.country-item {
    display: block !important; /* Forcer l'affichage par défaut */
    transition: all 0.3s ease;
}

.country-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.country-flag img {
    width: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}


.country-schools-count {
    margin-top: 8px;
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.country-schools-count i {
    margin-right: 5px;
    color: #007bff;
}

/* Style amélioré pour les cartes d'écoles */
.school-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.school-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.school-card:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #7A428A, #1D2A4F);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s ease;
}

.school-card:hover:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.school-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.school-logo {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    margin-right: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.school-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.school-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
    font-weight: bold;
    border-radius: 8px;
    font-size: 1.25rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.school-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 20px;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    margin-right: 8px;
}

.school-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.school-card .card-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #333;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 48px;
}

.school-card:hover .card-title {
    color: #007bff;
}

.school-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 72px;
    margin-bottom: 15px;
}

.school-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.school-website {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Pagination horizontale */
.pagination-horizontal {
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    margin: 20px 0;
}

.pagination-controls {
    display: flex;
    align-items: center;
    max-width: 100%;
}

.pagination-pages {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    padding: 0 10px;
}

.pagination-pages::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.pagination-page {
    min-width: 40px;
    height: 40px;
    margin: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.pagination-page.active {
    background-color: #007bff;
    color: white;
}

.pagination-page:not(.active):hover {
    background-color: #f0f0f0;
}

.pagination-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
}

.pagination-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Styles pour les filtres d'écoles */
#school-filters {
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.filter-select {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 8px 12px;
    font-size: 14px;
    background-color: white;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

/* Animation de chargement */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Effets de transition */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Responsive */
@media (max-width: 992px) {
    .countries-container {
        flex-direction: column;
    }
    
    .countries-filters {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 20px;
    }
    
    .filter-section {
        flex-direction: column;
    }
    
    .filter-group {
        margin-bottom: 15px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .pagination-page {
        min-width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .pagination-arrow {
        width: 35px;
        height: 35px;
    }
}

/* Styles pour les boutons de filtres */
#toggle-filters {
    transition: all 0.3s ease;
}

#toggle-filters.active {
    background-color: #007bff;
    color: white;
}

#reset-filters, #apply-filters {
    transition: all 0.3s ease;
    border-radius: 20px;
    padding: 5px 15px;
}

#reset-filters:hover {
    background-color: #e9ecef;
}

#apply-filters:hover {
    background-color: #0069d9;
} 