/* =========================================================
   MENU SIGNATURE SOLVYLA
   Structure générique
   Fond / couleur définis par le contexte
   ========================================================= */


/* CONTENEUR */

.solvyla-cou .solvyla-signature-menu-wrap {
    position: relative;

    margin: 0;
    padding: 0;
}


/* =========================================================
   DECLENCHEUR
   ========================================================= */

.solvyla-cou .solvyla-signature-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 0.8vmin;

    width: 100%;
    padding: 0.8vh 1vw;

    border: 0;
    border-radius: 0.5vmin;

    background: transparent;

    font-family: var(--solvyla-font, Inter, system-ui, Arial, sans-serif);
    font-size: 1em;
    font-weight: var(--solvyla-weight-bold, 700);

    box-shadow: var(--solvyla-gloss-shadow);

    cursor: pointer;

    transition:
        filter 0.33s ease,
        box-shadow 0.33s ease,
        transform 0.33s ease;
}


/* VALEUR ACTUELLE */

.solvyla-cou .solvyla-signature-menu-current {
    display: block;

    min-width: 0;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* FLECHE */

.solvyla-cou .solvyla-signature-menu-arrow {
    display: inline-block;

    flex: 0 0 auto;

    transition: transform 0.33s ease;
}


/* ROTATION FLECHE */

.solvyla-cou
.solvyla-signature-menu-trigger[aria-expanded="true"]
.solvyla-signature-menu-arrow {
    transform: rotate(180deg);
}


/* SURVOL */

.solvyla-cou .solvyla-signature-menu-trigger:hover {
    filter: brightness(1.12);
}


/* FOCUS CLAVIER */

.solvyla-cou .solvyla-signature-menu-trigger:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}


/* =========================================================
   MENU DEPLOYE
   ========================================================= */

.solvyla-cou .solvyla-signature-menu {
    position: absolute;
    z-index: 50;

    top: calc(100% + 0.5vh);
    left: 0;

    width: 100%;
    min-width: 100%;

    margin: 0;
    padding: 0.5vh 0;

    border: 0;
    border-radius: 0.5vmin;

    background: transparent;

    box-shadow: var(--solvyla-gloss-shadow);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-1vh);

    transition:
        opacity 0.33s ease,
        transform 0.33s ease,
        visibility 0s linear 0.33s;
}


/* MENU OUVERT */

.solvyla-cou .solvyla-signature-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);

    transition:
        opacity 0.33s ease,
        transform 0.33s ease,
        visibility 0s linear 0s;
}


/* =========================================================
   OPTIONS
   ========================================================= */

.solvyla-cou .solvyla-signature-menu-item {
    display: block;

    width: 100%;
    padding: 0.7vh 1vw;

    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.42);

    background: transparent;

    font-family: var(--solvyla-font, Inter, system-ui, Arial, sans-serif);
    font-size: 0.9em;
    font-weight: var(--solvyla-weight-semibold, 600);

    text-align: left;

    cursor: pointer;

    transition:
        filter 0.33s ease,
        box-shadow 0.33s ease,
        transform 0.33s ease;
}


/* DERNIERE OPTION */

.solvyla-cou .solvyla-signature-menu-item:last-child {
    border-bottom: 0;
}


/* SURVOL OPTION */

.solvyla-cou .solvyla-signature-menu-item:hover {
    filter: brightness(1.20);

    transform: translateX(0.2vw);

    box-shadow:
        inset 0.2vw 0 0 currentColor;
}


/* FOCUS OPTION */

.solvyla-cou .solvyla-signature-menu-item:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

/* =========================================================
   BOUTON SIGNATURE SOLVYLA
   Structure générique
   Fond / couleur définis par le contexte
   ========================================================= */

.solvyla-cou .solvyla-signature-button:not([data-wkp-resultat-tbx-xls-export]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    gap: clamp(0.35rem, 0.65vmin, 0.65rem);
    width: auto;
    min-width: 0;

    /*
     * Hauteur Signature standard.
     * Légèrement supérieure au bouton Charger / Télécharger.
     */
    min-height: clamp(2.45rem, 4.1vmin, 3rem);
    padding:
        clamp(0.38rem, 0.65vmin, 0.55rem)
        clamp(1rem, 1.6vmin, 1.6rem);
    border: 1px solid currentColor;

    /*
     * Rectangle arrondi premium.
     * Suppression de l'ancien effet capsule 1.2em.
     */
    
     border-radius: clamp(0.45rem, 0.7vmin, 0.7rem);
        background: transparent;
        font-family:
            var(--solvyla-font, Inter, system-ui, Arial, sans-serif);   
        font-size:
            clamp(0.78rem, 1.1vmin, 0.96rem);
        font-weight:
            var(--solvyla-weight-semibold, 600);
        line-height: 1;
        cursor: pointer;
        box-shadow:
            0 0.15rem 0.45rem rgba(0, 0, 0, 0.12);
        transition:
            filter 0.33s ease,
            box-shadow 0.33s ease,
            transform 0.33s ease;
    }

/* ICONE OPTIONNELLE */
.solvyla-cou .solvyla-signature-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.solvyla-cou .solvyla-signature-button-icon svg,
.solvyla-cou .solvyla-signature-button-icon img {
    display: block;
    width: 1.1em;
    height: 1.1em;
}
/* TEXTE */
.solvyla-cou .solvyla-signature-button-text {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
/* SURVOL */
.solvyla-cou .solvyla-signature-button:not([data-wkp-resultat-tbx-xls-export]):hover {
    filter: brightness(1.10);
    transform: translateY(-1px);
    box-shadow:
        0 0.2em 0.6em rgba(0, 0, 0, 0.16);
}
/* APPUI */
.solvyla-cou .solvyla-signature-button:not([data-wkp-resultat-tbx-xls-export]):active {
    transform: translateY(0);
}
/* FOCUS */
.solvyla-cou .solvyla-signature-button:not([data-wkp-resultat-tbx-xls-export]):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
/* DESACTIVE */
.solvyla-cou .solvyla-signature-button:not([data-wkp-resultat-tbx-xls-export]):disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

/* =========================================================
   SOLVYLA SIGNATURE
   BOUTON CHARGER / TELECHARGER

   Composant transversal :
   - SOLVYLA COU
   - SOLVYLA BRCH
   - SOLVYLA Academy

   Usages :
   - Charger
   - Choisir un fichier
   - Choisir plusieurs fichiers
   - Importer
   - Telecharger
   - Exporter
   - CSV / XLS / XLSX / documents
   ========================================================= */


/* =========================================================
   01 - BOUTON CHARGER / TELECHARGER
   ========================================================= */

.solvyla-signature-upload-button{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    width: auto;
    min-height: 2.3rem;

    margin: 0;

    padding:
        clamp(0.42rem, 0.7vmin, 0.58rem)
        clamp(1.2rem, 1.8vmin, 1.8rem);

    border: 1px solid rgba(55, 145, 225, 0.42);
    border-radius: 0.7rem;

    background: linear-gradient(
        90deg,
        rgba(160, 226, 232, 0.42) 0%,
        rgba(190, 235, 245, 0.48) 50%,
        rgba(160, 226, 232, 0.42) 100%
    );

    color:
        var(
            --solvyla-text-blue-royal,
            var(--solvyla-blue-deep, #143f91)
        );

    font-family:
        var(--solvyla-font, Inter, system-ui, Arial, sans-serif);

    font-size:
        clamp(0.76rem, 1.05vmin, 0.94rem);

    font-weight:
        var(--solvyla-weight-bold, 700);

    line-height: 1;

    text-align: center;
    text-decoration: none;

    white-space: nowrap;

    cursor: pointer;

    text-shadow:
        0 1px 1px rgba(255, 255, 255, 0.85);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 0.22rem 0.55rem rgba(4, 74, 150, 0.08);

    transition:
        border-color 0.20s ease,
        background 0.20s ease,
        box-shadow 0.20s ease,
        transform 0.20s ease;
}


/* =========================================================
   02 - SURVOL
   ========================================================= */

.solvyla-signature-upload-button:hover {
    border-color: rgba(55, 145, 225, 0.58);

    background: linear-gradient(
        90deg,
        rgba(160, 226, 232, 0.52) 0%,
        rgba(190, 235, 245, 0.62) 50%,
        rgba(160, 226, 232, 0.52) 100%
    );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 0.28rem 0.7rem rgba(4, 74, 150, 0.12);

    transform: translateY(-1px);
}


/* =========================================================
   03 - FOCUS CLAVIER
   ========================================================= */

.solvyla-signature-upload-button:focus-visible {
    outline: none;

    border-color: rgba(55, 145, 225, 0.72);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.90),
        0 0 0 2px rgba(55, 145, 225, 0.16),
        0 0.28rem 0.7rem rgba(4, 74, 150, 0.12);
}


/* =========================================================
   04 - BOUTON DESACTIVE
   ========================================================= */

.solvyla-signature-upload-button:disabled,
.solvyla-signature-upload-button[disabled],
.solvyla-signature-upload-button[aria-disabled="true"] {
    opacity: 1;

    cursor: not-allowed;

    transform: none;

    color: rgba(20, 67, 145, 0.62);

    border-color: rgba(55, 145, 225, 0.30);

    background: linear-gradient(
        90deg,
        rgba(160, 226, 232, 0.34) 0%,
        rgba(190, 235, 245, 0.42) 50%,
        rgba(160, 226, 232, 0.34) 100%
    );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.80),
        0 0.18rem 0.45rem rgba(4, 74, 150, 0.06);
}


/* =========================================================
   05 - DECLINAISON INPUT FILE

   Pour :
   - Choisir le fichier
   - Choisir les fichiers

   Le texte natif indiquant le fichier selectionne reste conserve.
   ========================================================= */

.solvyla-signature-upload-input::file-selector-button {
    box-sizing: border-box;

    min-height: 2.3rem;

    margin-right: 0.7rem;

    padding:
        clamp(0.42rem, 0.7vmin, 0.58rem)
        clamp(1.2rem, 1.8vmin, 1.8rem);

    border: 1px solid rgba(55, 145, 225, 0.42);
    border-radius: 0.7rem;

    background: linear-gradient(
        90deg,
        rgba(160, 226, 232, 0.42) 0%,
        rgba(190, 235, 245, 0.48) 50%,
        rgba(160, 226, 232, 0.42) 100%
    );

    color:
        var(
            --solvyla-text-blue-royal,
            var(--solvyla-blue-deep, #143f91)
        );

    font-family:
        var(--solvyla-font, Inter, system-ui, Arial, sans-serif);

    font-size:
        clamp(0.76rem, 1.05vmin, 0.94rem);

    font-weight:
        var(--solvyla-weight-bold, 700);

    line-height: 1;

    text-shadow:
        0 1px 1px rgba(255, 255, 255, 0.85);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 0.22rem 0.55rem rgba(4, 74, 150, 0.08);

    cursor: pointer;

    transition:
        border-color 0.20s ease,
        background 0.20s ease,
        box-shadow 0.20s ease;
}


/* =========================================================
   06 - INPUT FILE : SURVOL
   ========================================================= */

.solvyla-signature-upload-input:hover::file-selector-button {
    border-color: rgba(55, 145, 225, 0.58);

    background: linear-gradient(
        90deg,
        rgba(160, 226, 232, 0.52) 0%,
        rgba(190, 235, 245, 0.62) 50%,
        rgba(160, 226, 232, 0.52) 100%
    );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 0.28rem 0.7rem rgba(4, 74, 150, 0.12);
}


/* =========================================================
   07 - INPUT FILE : FOCUS
   ========================================================= */

.solvyla-signature-upload-input:focus-visible {
    outline: none;
}


/* =========================================================
   08 - INPUT FILE : DESACTIVE
   ========================================================= */

.solvyla-signature-upload-input:disabled::file-selector-button {
    opacity: 1;

    cursor: not-allowed;

    color: rgba(20, 67, 145, 0.62);

    border-color: rgba(55, 145, 225, 0.30);

    background: linear-gradient(
        90deg,
        rgba(160, 226, 232, 0.34) 0%,
        rgba(190, 235, 245, 0.42) 50%,
        rgba(160, 226, 232, 0.34) 100%
    );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.80),
        0 0.18rem 0.45rem rgba(4, 74, 150, 0.06);
}

