/* ===== Grille responsive ===== */
.grid-pays {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 54px;
}

/* 2 colonnes sur tablette */
@media (max-width: 1024px) {
    .grid-pays {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1 colonne sur mobile */
@media (max-width: 768px) {
    .grid-pays {
        grid-template-columns: 1fr;
    }
}


#row-listing{z-index: 9999;}
/* ===== Carte pays ===== */
.pays-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}
.pays-card:hover {
    transform: translateY(-5px);
}

/* ===== Image ===== */
.pays-image {
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
}
.pays-image img {
    width: 100%;
    aspect-ratio: 353 / 400;
    border-radius: 16px;
    object-fit: cover; /* Recadrage, pas de déformation */
}

/* ===== Contenu ===== */
.pays-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.pays-region {
    color: #A047E6;
    font-size: 15px;
    font-weight: 400;
}
.pays-title {
    margin: 10px 0;
    min-height: 36px;
}
.pays-title a {
    text-decoration: none;
    color: #333;
    font-size: 18px;
    font-weight: 500;
}
.pays-title a:hover {
    color: #A047E6;
}
.pays-meta {
    margin-top: auto;
    font-size: 15px;
    color: #7A7A7A;
    font-weight: 400;
    letter-spacing: -0.5px;
    padding: 20px 0;
}

/* ===== Pagination ===== */
.pagination ul {
    display: inline-flex;
    list-style: none;
    gap: 10px;
    padding: 0;
    margin: 0 auto;
}
.pagination ul.page-numbers {
    list-style: none !important;
}

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 48px;
}

.pagination a, .pagination span {
    text-decoration: none;
    color: #333;
    border-radius: 9px;
    font-size: 16px;
}

.pagination span {
    padding: 8px 18px;
}

.pagination .prev, .pagination .next{
    color: #7900F0;
    background: #F8F2FE;
    font-size: 16px;
    margin: 0 9px;
}
.pagination a {
    padding: 13px 18px;
}

.pagination .current {
    background: #7900F0;
    color: #fff;
}

.pagination .disabled {
    color: #999;
    border-color: #eee;
    background: #f9f9f9;
    cursor: not-allowed;
}

.pagination ul li {
    padding: 8px 12px;
    border-radius: 50%;
    background: #eee;
    font-weight: bold;
}
.pagination ul li a,
.pagination ul li span {
    color: #000;
    text-decoration: none;
}
.pagination ul li .current {
    background: #A047E6;
    color: #fff !important;
}

/* ===== Filtres par région ===== */
.region-filters {
    display: none;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 20px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 15px 15px 20px 15px;
    border-radius: 16px;
    border: 1px solid #7900F0;
    box-shadow: 0 4px 8px rgb(115 0 228 / 15%);
    z-index: 10;
}
.region-filter {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #000;

}
.region-filter img {
    width: 153px;
    height: 153px;
    object-fit: contain;
}
.region-filter .img-region{
    padding: 12px;
    border: 1px solid #D9DCEC;
    border-radius: 16px;
    background: #D9D9D9;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.region-filter span {
    font-size: 15px;
    text-align: left;
    margin: 5px 0px;
}
.region-filter:hover img {
    filter: brightness(0) saturate(100%) invert(15%) sepia(100%) saturate(7400%) hue-rotate(270deg) brightness(90%) contrast(95%);
}
.region-filter.active img {
    filter: brightness(0) saturate(100%) invert(15%) sepia(100%) saturate(7400%) hue-rotate(270deg) brightness(90%) contrast(95%);
}
.region-filter:hover .img-region{
    background: #F8F2FE;
    border: 1.5px solid #7900F0;
}
.region-filter.active .img-region{
    background: #F8F2FE;
    color: #5200a4;
    border-color: #7900F0;
}

.text-region{
    width: 100%;
    color: #000;
    padding: 5px 10px 25px 15px;
    font-size: 15px;
}

/* ===== Champ de recherche ===== */
.search-form {
    margin-bottom: 20px;

    position: relative;
    border: 1px solid transparent;   /* bordure par défaut invisible */
    border-radius: 8px;             /* espace autour de l'input + icône */
    transition: border-color .18s ease, box-shadow .18s ease;
    background: white;
}

/* bordure visible quand le champ (ou tout descendant) a le focus */
.search-input:focus-visible {
    border-color: #7900F0;
    outline: none;
}

.search-input:focus + .search-icon,
.search-form:focus-within .search-icon {
    color: #7900F0;
}
/* icône SVG placée à l'intérieur */
.search-icon {
    position: absolute;
    z-index: 11;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* l'icône ne bloque pas le clic sur l'input */
    fill: currentColor;   /* hérite de la couleur du conteneur/input */
    color: #666666;       /* couleur par défaut de l'icône */
}
.search-input {
    padding: 16px 57px;
    border-radius: 16px;
    border: 1px solid #D9DCEC;
    width: 100%;
    font-size: 15px;
    color: #7A7A7A;
    background: #F7F7F7;
    letter-spacing: -0.5px;
}
.search-form.active .search-input {
    display: block;
    position: relative;
    z-index: 10;
    border: 1px solid #7900F0;
    box-shadow: 0 4px 8px rgb(115 0 228 / 15%);
}
.search-form.active .region-filters {
    display: flex;
}
.grid-pays::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
   /* background: rgba(0, 0, 0, 0.15);*/
    backdrop-filter: blur(5px);
    z-index: 5;
    display: none;
}
.grid-pays.active::before {
    display: block;
}

#text-header h1 {
    font-size: 64px;
    line-height: 64px;
    font-weight: 900;
    margin: 0;
    color: #151515;
    text-align: center;
}

.gradient-text {
    background: linear-gradient(to right, #8e44ad, #d35400);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#subtitle {
    font-size: 0.9rem;
    color: #777;
    margin-top: 15px;
    text-align: center;
}

@media (max-width: 768px) {


    .search-form.active .region-filters{
        display: grid;
        gap: 8px;
        justify-content: left;
        padding-left: 20px;
    }
    .region-filter img{
        width: 52px;
        height: 52px;
    }

    .region-filter .img-region{
        width: 64px;
        height: 64px;
        padding: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 5px;
        box-shadow: none;
    }
    .region-filter.active span{
        color: #7900F0;
        font-weight: 600;
    }
    .region-filter {
        display: flex;
        align-items: center;
        flex-direction: row;
        gap: 8px;
    }
    .region-filter .img-region img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
    .text-region{
        padding: 5px 10px 10px 0px;
    }
    #text-header h1{
        font-size: 41px;
        line-height: 41px;
    }
    .vc_row.vc_custom_1754873556637{
        margin-top: 115px !important;
        margin-bottom: 30px !important;
    }
    .pays-image img{
        width: 167px;
        aspect-ratio: 167 / 167;
    }
    .pays-card{
        flex-direction: row;
        gap: 8px;
    }
    .pays-content{
        padding: 2px;
        justify-content: center;
    }
    .pays-meta{
        margin-top: 0;
        padding: 8px 0;
    }
    
    #row-listing .wpb_column{
        padding-left: 0 !important;
        padding-right: 0 !important;
    } 


}