/* ==========================================================================
   Annuaire Loop Filters - Design FTPerpignan
   ========================================================================== */

.annuaire-loop-filter__item-hidden {
    display: none !important;
}

/* Container principal avec fond pêche */
.annuaire-loop-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    padding: 32px;
    background-color: #ffede6;
    border-radius: 16px;
    font-family: 'Poppins', sans-serif;
}

/* Groupe de recherche */
.annuaire-loop-filter__search-group {
    flex: 1 1 0;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Labels */
.annuaire-loop-filter__label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.365;
    color: #160b47;
    margin: 0;
}

/* Wrapper du champ de recherche */
.annuaire-loop-filter__search-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

/* Champ de recherche */
.annuaire-loop-filter__search {
    width: 100%;
    padding: 12px 48px 12px 24px;
    border: 1px solid #dedddd !important;
    border-radius: 24px !important;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.365;
    transition: border-color 0.2s ease;
    background: white !important;
    color: #160b47;
    outline: none !important;
    box-shadow: none !important;
}

.annuaire-loop-filter__search:focus {
    border-color: #160b47 !important;
    border-width: 1.2px !important;
}

.annuaire-loop-filter__search::placeholder {
    color: #999;
}

/* Icône de recherche (flèche) */
.annuaire-loop-filter__search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #e62a45;
}

.annuaire-loop-filter__search-icon svg {
    width: 20px;
    height: 20px;
}

/* Bouton clear (X) dans le champ de recherche */
.annuaire-loop-filter__clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #160b47;
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
}

.annuaire-loop-filter__clear:hover {
    opacity: 0.8;
}

.annuaire-loop-filter__clear svg {
    width: 14px;
    height: 14px;
}

/* Afficher le bouton clear quand il y a du texte */
.annuaire-loop-filter__search-wrapper--has-value .annuaire-loop-filter__clear {
    display: flex;
}

.annuaire-loop-filter__search-wrapper--has-value .annuaire-loop-filter__search-icon {
    display: none;
}

/* Quand la recherche a une valeur, ajuster le border */
.annuaire-loop-filter__search-wrapper--has-value .annuaire-loop-filter__search {
    border-color: #160b47 !important;
    border-width: 1.2px !important;
}


.annuaire-loop-filter__group {
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Sélecteur de catégorie
   ========================================================================== */

.uael-post__header {
    flex: 1 1 0;
    min-width: 280px;
}

/* Loader */
.annuaire-loop-filter__loader {
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    color: #160b47;
    width: 100%;
    padding-top: 8px;
}

.annuaire-loop-filter--loading .annuaire-loop-filter__loader {
    display: inline-flex;
}

.annuaire-loop-filter__loader-spinner {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid #160b47;
    border-top-color: transparent;
    animation: annuaire-loop-spin 0.8s linear infinite;
}

@keyframes annuaire-loop-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.uael-post__header-select {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uael-post__header-select-control {
    width: 100%;
    position: relative;
}

.uael-post__header-select-control::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    width: 10px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23160b47' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transform: translateY(-50%);
    pointer-events: none;
}

.uael-post__header-select-input {
    width: 100%;
    padding: 12px 42px 12px 24px;
    border: 1px solid #dedddd;
    border-radius: 24px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.365;
    background: #fff;
    color: #160b47;
    appearance: none;
    -webkit-appearance: none;
    min-height: 46px;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.uael-post__header-select-input:focus {
    outline: none;
    border-color: #160b47;
    border-width: 1.2px;
}

/* État actif du dropdown (quand une catégorie est sélectionnée) */
.uael-post__header-select-input.is-active {
    border-color: #160b47;
    border-width: 1.2px;
}

.annuaire-loop-filter__submit {
    padding: 12px 30px;
    background: #160b47;
    color: white;
    border: 2px solid #160b47;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
}

.annuaire-loop-filter__submit:hover {
    background: white;
    color: #160b47;
}

.annuaire-loop-filter__submit--hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.uael-post__header-select-label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.365;
    color: #160b47;
    margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .annuaire-loop-filter {
        flex-direction: column;
        gap: 20px;
        padding: 24px;
    }

    .annuaire-loop-filter__search-group,
    .uael-post__header {
        min-width: 100%;
    }
}

/* ==========================================================================
   CTA Button & Misc
   ========================================================================== */

.annuaire-team-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    background-color: #160B47;
    border: none;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(22, 11, 71, 0.2);
    cursor: pointer;
}

.annuaire-team-cta:hover,
.annuaire-team-cta:focus {
    background-color: #160B47;
    color: #fff;
    transform: none;
    box-shadow: 0 10px 25px rgba(22, 11, 71, 0.2);
}

.annuaire-team-cta:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(22, 11, 71, 0.3), 0 10px 25px rgba(22, 11, 71, 0.2);
}

.annuaire-team-cta__wrapper {
    display: flex;
    justify-content: flex-start;
    margin-top: 1rem;
}

.annuaire-team-cta--inline {
    width: auto;
}

.annuaire-ft-address {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: #fff;
}

.ekit-team-modal-position .annuaire-ft-address {
    color: inherit;
}

.uael-team-member__position,
.uael-team-member__designation,
.annuaire-team-position {
    color: #fff !important;
}
