.tx-udem-distinctions {

    /*****************
        Accomplete
     ******************/

    .acomplete-outer {
        position: relative;
        display: inline-block;
        min-width: 200px;
    }

    .acomplete-inner {
        display: block;
    }

    .acomplete-outer, .awesomplete, .acomplete-outer input {
        width: 100%;
    }

    /* Flèche dropdown */

    .acomplete-dropdown {
        position: absolute;
        top: 50%;
        right: 1em;
        transform: translateY(-50%);
        width: 0.625em;
        height: 0.625em;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--colors-ui-element-marine);
        transition: color 0.15s ease;
    }

    .acomplete-dropdown::before {
        content: '';
        display: block;
        width: 100%;
        height: 100%;
        background-color: currentColor;
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M13.55 4.03L7.55 10.02c-.29.29-.77.29-1.06 0L.49 4.03' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M13.55 4.03L7.55 10.02c-.29.29-.77.29-1.06 0L.49 4.03' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-position: center;
        mask-position: center;
        -webkit-mask-size: contain;
        mask-size: contain;
    }

    /* Bouton effacer (X) — affiché seulement quand l'input contient une valeur */

    .acomplete-clearbtn {
        position: absolute;
        top: 50%;
        right: 2em;
        transform: translateY(-50%);
        width: 1em;
        height: 1em;
        cursor: pointer;
        display: none;
        align-items: center;
        justify-content: center;
        color: var(--colors-ui-element-marine);
        font-size: 1.1em;
        line-height: 1;
        transition: color 0.15s ease;
    }

    .acomplete-clearbtn.is-visible {
        display: flex;
    }

    .acomplete-clearbtn::before {
        content: '';
        display: inline-block;
        width: 1rem;
        height: 1rem;
        background-color: currentColor;
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.65 3.65a.5.5 0 0 1 .7.7L8.71 8l3.64 3.65a.5.5 0 0 1-.7.7L8 8.71l-3.65 3.64a.5.5 0 0 1-.7-.7L7.29 8 3.65 4.35a.5.5 0 0 1 .7-.7L8 7.29l3.65-3.64Z'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11.65 3.65a.5.5 0 0 1 .7.7L8.71 8l3.64 3.65a.5.5 0 0 1-.7.7L8 8.71l-3.65 3.64a.5.5 0 0 1-.7-.7L7.29 8 3.65 4.35a.5.5 0 0 1 .7-.7L8 7.29l3.65-3.64Z'/%3E%3C/svg%3E");
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-size: contain;
        mask-size: contain;
    }

    /* État désactivé (filtre secteurs quand catégorie ≠ Recherche) */

    .acomplete-outer input.form-control:disabled {
        background-color: var(--colors-ui-surface-inactive);
        border-color: var(--colors-ui-surface-inactive);
        color: var(--colors-ui-element-field-innactive);
        cursor: not-allowed;
    }

    .acomplete-outer input.form-control:disabled ~ .acomplete-dropdown,
    .acomplete-outer input.form-control:disabled ~ .acomplete-clearbtn {
        display: none;
    }

    /* */

    .awesomplete > ul {
        min-width: 100%; /* au moins large comme l'input */
        max-width: min(500px, calc(100vw - 2rem)); /* mais pas hors-écran */
        max-height: min(300px, 50vh);
        overflow-y: auto;
        overflow-x: hidden;
        padding: var(--spacing-tiny) 0;
        background-color: var(--colors-ui-surface-defaut);
        z-index: 5;
        box-shadow: inset 0 0 0 1px var(--colors-ui-element-hover);
        border: none;
        scrollbar-color: var(--colors-ui-bordure-secondaire) transparent;
        scrollbar-width: thin;

        @media (min-width: 768px) {
            width: max-content;
        }

        &::before {
            content: '';
            padding: 0;
        }
    }

    .awesomplete > ul > li {
        font-size: var(--font-singleline-medium);
        line-height: var(--font-line-height-small);
        padding-left: var(--spacing-large);
        padding-right: var(--spacing-large);
    }

    .awesomplete > ul > li:hover {
        background-color: var(--colors-ui-element-hover);
        color: var(--colors-ui-element-hover-inverted);
    }

    /* Reproduction du mixin scrollbar-themed de udem_coquille
       (ce fichier n'est pas compilé par Vite, donc pas d'@mixin disponible). */

    .awesomplete > ul::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    .awesomplete > ul::-webkit-scrollbar-track {
        background: transparent;
    }

    .awesomplete > ul::-webkit-scrollbar-thumb {
        background: var(--colors-ui-bordure-secondaire);
        border-radius: 3px;
        border: 1px solid transparent;
    }

    .acomplete-outer.is-loading .acomplete-dropdown {
        visibility: hidden; /* on cache la flèche pendant le chargement */
    }

    .acomplete-outer.is-loading::after {
        content: '';
        position: absolute;
        right: 12px;
        top: 50%;
        width: 16px;
        height: 16px;
        margin-top: -8px;
        border: 2px solid;
        border-color: var(--udem-bleu-fonce);
        border-bottom-color: transparent;
        border-radius: 50%;
        animation: rotation 1s linear infinite;
    }

    input {
        border-radius: var(--border-radius-full);
        /*border: 1px solid var(--colors-ui-bordure-secondaire);*/
        border: none;
        box-shadow: inset 0 0 0 1px var(--colors-ui-bordure-secondaire);
        padding: 0 4rem 0 1rem;
        height: var(--layout-button-medium-height);
        color: var(--colors-ui-element-switch);
        font-size: var(--font-singleline-small);
        line-height: var(--font-line-height-small);

        &::placeholder {
            color: var(--colors-ui-element-switch);
            opacity: 1;
            font-size: var(--font-singleline-small);
            line-height: var(--font-line-height-small);
        }

        &:focus-within, &:focus-visible {
            box-shadow: inset 0 0 0 2px var(--colors-ui-element-hover);
            outline: none;
        }
    }

    @media (min-width: 768px) {
        .filter-group .awesomplete > ul {
            /* On ouvre les panneaux alignés à droite car sinon ils débordent de l'écran */
            right: 0;
            left: auto;
        }

        .filter-categories {
            width: 175px;
            min-width: 175px;
        }

        .filter-secteurs {
            min-width: 230px;
        }

        .filter-organismes {
            min-width: 230px;
        }

        .filter-annee {
            width: 120px;
            min-width: 120px;
        }
    }

    @media (min-width: 1249px) {

        .jumpto-laureat {
            min-width: 419px;
        }

        .jumpto-prix {
            min-width: 419px;
        }
    }
}
