/**
 * WeXchange Formulaire d'Inscription CSS
 * Theme: WeXchange Forum 2026
 * Style: Clean, Modern 2-Column Registration Form
 * Matches Adobe Illustrator / CleanShot Design: CleanShot 2026-10-03 at 03.50.34@2x.png
 */

/* ==========================================================================
   CONTAINER & LAYOUT (2 COLUMNS: LEFT INTRO + RIGHT FORM)
   ========================================================================== */
.wex-form-section-wrapper {
    width: 100%;
    box-sizing: border-box;
    font-family: 'Gotham', 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2b3340;
    position: relative;
    padding: 20px 0;
}

.wex-form-section-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    box-sizing: border-box;
}

/* ==========================================================================
   LEFT COLUMN: TITLE & SUBTITLE
   ========================================================================== */
.wex-form-left-col {
    flex: 0 0 42%;
    max-width: 460px;
    box-sizing: border-box;
    padding-top: 10px;
}

.wex-form-main-title {
    color: #f08150;
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin: 0 0 16px 0;
    text-transform: none;
    font-family: inherit;
}

.wex-form-main-desc {
    color: #2b3340;
    font-size: 15.5px;
    line-height: 1.55;
    margin: 0;
    font-weight: 400;
    max-width: 410px;
    font-family: inherit;
}

/* ==========================================================================
   RIGHT COLUMN: STEPS HEADER + INPUTS + ACTIONS
   ========================================================================== */
.wex-form-right-col {
    flex: 1 1 54%;
    max-width: 640px;
    box-sizing: border-box;
}

/* Step Indicator (① Vous   ② Organisation   ③ Sessions) */
.wex-form-step-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 22px;
    user-select: none;
}

.wex-step-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #6f6aa6;
    font-size: 16px;
    font-weight: 700;
    cursor: default;
    transition: color 0.25s ease, opacity 0.25s ease;
    opacity: 0.75;
}

.wex-step-item.active {
    opacity: 1;
    color: #6f6aa6;
    font-weight: 800;
}

.wex-step-item.completed {
    opacity: 1;
    color: #5fa4b0;
    cursor: pointer;
}

.wex-step-circle {
    font-size: 19px;
    line-height: 1;
    display: inline-block;
}

.wex-step-name {
    font-size: 16px;
    letter-spacing: 0.2px;
}

/* ==========================================================================
   FORM STEP CONTENT & GRID ROWS
   ========================================================================== */
.wex-form-step-content {
    display: none;
    width: 100%;
}

.wex-form-step-content.active {
    display: block;
    animation: wexFormFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.wex-form-fields-row {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
    width: 100%;
    box-sizing: border-box;
}

.wex-input-wrap {
    position: relative;
    box-sizing: border-box;
}

/* Width Helpers */
.wex-col-civilite {
    flex: 0 0 32%;
    max-width: 32%;
}

.wex-col-nom {
    flex: 1 1 68%;
    max-width: 68%;
}

.wex-col-half {
    flex: 1 1 50%;
    max-width: 50%;
}

.wex-col-full {
    flex: 1 1 100%;
    max-width: 100%;
}

/* ==========================================================================
   INPUTS & SELECTS (ORANGE BORDER #f08150, ROUNDED 10px, WHITE BG)
   ========================================================================== */
.wex-form-section-wrapper .wex-custom-input,
.wex-form-section-wrapper input.wex-custom-input,
.wex-form-section-wrapper select.wex-custom-input {
    width: 100% !important;
    height: 48px !important;
    padding: 0 18px !important;
    border: 1.5px solid #f08150 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    font-family: inherit !important;
    font-size: 15px !important;
    color: #2b3340 !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none !important;
}

.wex-form-section-wrapper .wex-custom-input::placeholder,
.wex-form-section-wrapper input.wex-custom-input::placeholder {
    color: #999ca0 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

.wex-form-section-wrapper .wex-custom-input:focus,
.wex-form-section-wrapper input.wex-custom-input:focus,
.wex-form-section-wrapper select.wex-custom-input:focus {
    border-color: #df6b35 !important;
    box-shadow: 0 0 0 3px rgba(240, 129, 80, 0.18) !important;
}

.wex-form-section-wrapper .wex-custom-input.is-invalid,
.wex-form-section-wrapper input.wex-custom-input.is-invalid,
.wex-form-section-wrapper select.wex-custom-input.is-invalid {
    border-color: #e02424 !important;
    background-color: #fff8f8 !important;
}

/* Select Arrow Styling */
.wex-form-section-wrapper select.wex-custom-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999ca0' d='M6 8L0 0h12z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 10px 7px !important;
    padding-right: 36px !important;
}

.wex-custom-select option {
    color: #2b3340;
    background-color: #ffffff;
    padding: 8px 12px;
}

.wex-custom-select:invalid,
.wex-custom-select option[value=""] {
    color: #999ca0;
}

/* Invalid Feedback */
.wex-field-error {
    font-size: 12px;
    color: #e02424;
    margin-top: 4px;
    padding-left: 4px;
    display: none;
}

.wex-custom-input.is-invalid + .wex-field-error {
    display: block;
}

/* ==========================================================================
   BUTTONS & FOOTER ACTIONS
   ========================================================================== */
.wex-form-footer-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 14px;
    width: 100%;
}

.wex-form-footer-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    width: 100%;
}

.wex-custom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f08150;
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    padding: 10px 26px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    user-select: none;
    line-height: 1.3;
    text-align: center;
    vertical-align: middle;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}

.wex-custom-btn:hover {
    background-color: #df6b35;
    box-shadow: 0 4px 12px rgba(240, 129, 80, 0.28);
    transform: translateY(-1px);
}

.wex-custom-btn:active {
    transform: translateY(0);
}

.wex-custom-btn:focus,
.wex-custom-btn:focus-visible {
    outline: none !important;
    outline-color: transparent !important;
}

.wex-custom-btn-back {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #6f6aa6;
    border: none;
    outline: none !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 0;
    margin: 0;
    line-height: 1.3;
    -webkit-appearance: none;
    appearance: none;
    transition: color 0.2s ease;
}

.wex-custom-btn-back:hover {
    color: #555088;
    text-decoration: underline;
}

.wex-custom-btn-back:focus,
.wex-custom-btn-back:focus-visible,
.wex-custom-btn-back:active {
    outline: none !important;
    outline-color: transparent !important;
    box-shadow: none !important;
}

/* ==========================================================================
   STEP 3 : SESSIONS CARDS & CHOICES
   ========================================================================== */
.wex-step3-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
}

.wex-session-choice-card {
    border: 1.5px solid #f08150;
    border-radius: 10px;
    background-color: #ffffff;
    padding: 14px 16px;
    box-sizing: border-box;
}

.wex-session-choice-card.highlight {
    background-color: #fbfbfc;
}

.wex-session-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.wex-session-card-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #6f6aa6;
    margin: 0;
}

.wex-session-card-badge {
    font-size: 12px;
    font-weight: 600;
    color: #f08150;
    background-color: rgba(240, 129, 80, 0.12);
    padding: 2px 8px;
    border-radius: 6px;
}

.wex-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: #2b3340;
    cursor: pointer;
    line-height: 1.4;
    user-select: none;
}

.wex-checkbox-label input[type="checkbox"] {
    accent-color: #f08150;
    width: 17px;
    height: 17px;
    margin-top: 2px;
    cursor: pointer;
}

.wex-rgpd-wrap {
    font-size: 11.5px;
    line-height: 1.45;
    color: #6b7280;
    margin-top: 6px;
}

/* ==========================================================================
   SUCCESS MESSAGE
   ========================================================================== */
.wex-form-success-box {
    display: none;
    text-align: center;
    padding: 40px 20px;
    background-color: #ffffff;
    border: 1.5px solid #5fa4b0;
    border-radius: 12px;
    animation: wexFormFadeIn 0.35s ease;
}

.wex-form-success-box.active {
    display: block;
}

.wex-form-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background-color: rgba(95, 164, 176, 0.15);
    color: #5fa4b0;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.wex-form-success-title {
    font-size: 26px;
    font-weight: 800;
    color: #2b3340;
    margin: 0 0 10px;
}

.wex-form-success-desc {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 20px;
}

/* ==========================================================================
   PHOTO (OPTIONNELLE) — VISUEL « J'Y SERAI ! »
   ========================================================================== */
.wex-photo-field {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 18px 14px 14px;
    border: 1.5px dashed rgba(240, 129, 80, 0.75);
    border-radius: 10px;
    background: linear-gradient(120deg, rgba(240, 129, 80, 0.05), rgba(111, 106, 166, 0.06));
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.wex-photo-field.is-dragover {
    border-color: #f08150;
    border-style: solid;
    box-shadow: 0 0 0 3px rgba(240, 129, 80, 0.18);
}

.wex-photo-field.has-photo {
    border-style: solid;
}

.wex-form-section-wrapper .wex-photo-preview {
    position: relative;
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    margin: 0 4px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    box-shadow: none;
    outline: none;
}

.wex-photo-diamond {
    position: absolute;
    inset: 9px;
    overflow: hidden;
    border-radius: 14px;
    transform: rotate(45deg);
    background: linear-gradient(160deg, #b9b2e6, #8a80c8);
    box-shadow: 0 8px 18px -8px rgba(111, 106, 166, 0.7);
    transition: transform 0.3s cubic-bezier(.2, .8, .2, 1), box-shadow 0.2s ease;
}

.wex-form-section-wrapper .wex-photo-preview:hover .wex-photo-diamond,
.wex-form-section-wrapper .wex-photo-preview:focus-visible .wex-photo-diamond {
    transform: rotate(45deg) scale(1.06);
    box-shadow: 0 10px 22px -8px rgba(111, 106, 166, 0.85), 0 0 0 3px rgba(240, 129, 80, 0.25);
}

.wex-photo-img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 142%;
    height: 142%;
    max-width: none !important;
    object-fit: cover;
    object-position: center 30%;
    transform: translate(-50%, -50%) rotate(-45deg);
    animation: wexFormFadeIn 0.35s ease;
}

.wex-photo-img[hidden] {
    display: none;
}

.wex-photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transform: rotate(-45deg);
}

.wex-photo-field.has-image .wex-photo-placeholder {
    display: none;
}

.wex-photo-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f08150;
    color: #ffffff;
    border: 2.5px solid #ffffff;
    box-shadow: 0 4px 10px rgba(240, 129, 80, 0.45);
}

.wex-photo-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.wex-photo-title {
    font-size: 15px;
    font-weight: 700;
    color: #2b3340;
}

.wex-photo-title em {
    font-style: normal;
    font-weight: 400;
    color: #999ca0;
    font-size: 13px;
}

.wex-photo-desc {
    font-size: 12.5px;
    line-height: 1.4;
    color: #6b7280;
}

.wex-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 6px;
}

.wex-form-section-wrapper .wex-photo-btn {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #f08150;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    transition: color 0.2s ease;
}

.wex-form-section-wrapper .wex-photo-btn:hover,
.wex-form-section-wrapper .wex-photo-btn:focus-visible {
    color: #6f6aa6;
    background: transparent;
    outline: none;
}

.wex-form-section-wrapper .wex-photo-remove {
    color: #6f6aa6;
    font-weight: 600;
}

.wex-form-section-wrapper .wex-photo-btn[hidden] {
    display: none;
}

.wex-photo-field.is-processing .wex-photo-diamond::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    animation: wexPhotoSpin 0.8s linear infinite;
}

@keyframes wexPhotoSpin {
    to { transform: rotate(360deg); }
}

.wex-photo-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.wex-photo-error {
    display: none;
    font-size: 12px;
    color: #e02424;
    margin-top: 5px;
    padding-left: 4px;
}

.wex-photo-error.is-visible {
    display: block;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 991px) {
    .wex-form-section-inner {
        flex-direction: column;
        gap: 30px;
    }

    .wex-form-left-col,
    .wex-form-right-col {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .wex-form-main-title {
        font-size: 36px;
    }
}

@media (max-width: 640px) {
    .wex-form-fields-row {
        flex-direction: column;
        gap: 12px;
    }

    .wex-col-civilite,
    .wex-col-nom,
    .wex-col-half {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .wex-form-step-nav {
        gap: 16px;
        flex-wrap: wrap;
    }

    .wex-step-item {
        font-size: 14px;
    }

    .wex-step-circle {
        font-size: 17px;
    }

    .wex-form-main-title {
        font-size: 30px;
    }

    .wex-custom-btn {
        width: 100%;
    }

    .wex-photo-field {
        gap: 14px;
        padding: 12px 14px 12px 10px;
    }

    .wex-form-section-wrapper .wex-photo-preview {
        width: 68px;
        height: 68px;
    }

    .wex-photo-desc {
        font-size: 12px;
    }
}

/* ==========================================================================
   INSCRIPTION : ALERTES, CAPACITÉS, ANTI-ROBOTS, FORMULAIRE FERMÉ
   ========================================================================== */
.wex-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Erreur RGPD (case à cocher) */
.wex-rgpd-wrap input.is-invalid + span { color: #e02424; }
.wex-rgpd-wrap:has(input.is-invalid) .wex-field-error { display: block; }

/* Bandeau d'erreur (réponse serveur) */
.wex-form-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fdf1ec;
    border: 1px solid rgba(240, 129, 80, 0.45);
    color: #a2441b;
    font-size: 13.5px;
    line-height: 1.45;
    font-weight: 600;
    animation: wexFormFadeIn 0.25s ease;
}
.wex-form-alert::before {
    content: "!";
    flex: 0 0 20px;
    height: 20px;
    border-radius: 50%;
    background: #f08150;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.wex-form-alert[hidden] { display: none; }

/* Sessions complètes */
.wex-session-select option:disabled { color: #a3a6ad; }
.wex-session-choice-card.is-full { border-color: #d6d3e3; background: #f7f7f9; }
.wex-session-choice-card.is-full .wex-session-card-badge { color: #b42323; background: rgba(180, 35, 35, 0.1); }
.wex-session-choice-card.is-full .wex-checkbox-label { color: #9ca0a8; cursor: not-allowed; }

/* Bouton en cours d'envoi */
.wex-custom-btn.is-loading {
    opacity: 0.85;
    cursor: progress;
    pointer-events: none;
}
.wex-custom-btn.is-loading::after {
    content: "";
    width: 15px;
    height: 15px;
    margin-left: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    animation: wexSpin 0.7s linear infinite;
}
@keyframes wexSpin { to { transform: rotate(360deg); } }

/* Inscriptions fermées */
.wex-form-closed {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 26px 24px;
    border-radius: 12px;
    border: 1.5px solid #6f6aa6;
    background: linear-gradient(135deg, rgba(111, 106, 166, 0.08), rgba(95, 164, 176, 0.08));
    color: #2b3340;
}
.wex-form-closed-icon {
    flex: 0 0 52px;
    height: 52px;
    border-radius: 14px;
    background: #6f6aa6;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wex-form-closed p { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; text-align: left; }

/* ==========================================================================
   LIBELLÉS VISIBLES, CHAMPS SÉPARÉS, CHOIX OUI/NON, OBJECTIFS, MENTION LÉGALE
   Les libellés restent affichés au-dessus de chaque champ : le contenu à
   renseigner est lisible sur tous les navigateurs (même si le placeholder
   est masqué par l'auto-remplissage ou un thème de navigateur).
   ========================================================================== */
.wex-required-note {
    margin: -8px 0 12px;
    font-size: 12px;
    color: #8a8f98;
    text-align: right;
}

.wex-req {
    color: #f08150;
    font-weight: 700;
}

.wex-form-section-wrapper .wex-field-label {
    display: block;
    margin: 0 0 6px 2px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: #3b3f6b;
    letter-spacing: 0.1px;
    cursor: default;
}

.wex-form-section-wrapper label.wex-field-label {
    cursor: pointer;
}

.wex-field-label-note {
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    color: #8a8f98;
    margin-left: 2px;
}

/* Étape 1 : Civilité | Prénom | Nom */
.wex-form-section-wrapper .wex-col-civilite {
    flex: 0 0 24%;
    max-width: 24%;
}

.wex-form-section-wrapper .wex-col-name {
    flex: 1 1 0;
    min-width: 0;
}

/* Les colonnes s'alignent sur la ligne de base des champs, même si une erreur s'affiche */
.wex-form-fields-row {
    align-items: flex-start;
}

/* Indication sous le téléphone (compteur de chiffres) */
.wex-field-hint {
    margin-top: 5px;
    padding-left: 4px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #8a8f98;
    transition: color 0.2s ease;
}

.wex-field-hint.is-progress {
    color: #b0683f;
}

.wex-field-hint.is-valid {
    color: #3f8f9b;
    font-weight: 600;
}

.wex-custom-input.is-invalid ~ .wex-field-hint {
    display: none;
}

/* Zone de texte (besoin spécifique) */
.wex-form-section-wrapper textarea.wex-custom-input.wex-custom-textarea {
    height: auto !important;
    min-height: 78px;
    padding: 12px 18px !important;
    line-height: 1.5;
    resize: vertical;
}

.wex-form-section-wrapper textarea.wex-custom-input::placeholder {
    color: #999ca0;
    opacity: 1;
}

/* ---------- Oui / Non (boutons segmentés) ---------- */
.wex-segmented {
    display: flex;
    gap: 10px;
}

.wex-segment {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}

.wex-segment input,
.wex-chip input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.wex-segment span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 8px 14px;
    border: 1.5px solid #f08150;
    border-radius: 10px;
    background: #ffffff;
    color: #2b3340;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    user-select: none;
}

.wex-segment span::before {
    content: "";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid #f08150;
    background: #fff;
    box-sizing: border-box;
    transition: border-width 0.2s ease, border-color 0.2s ease;
}

.wex-segment:hover span {
    background: #fff6f1;
}

.wex-segment input:checked + span {
    background: #f08150;
    border-color: #f08150;
    color: #ffffff;
    box-shadow: 0 6px 16px -6px rgba(240, 129, 80, 0.6);
}

.wex-segment input:checked + span::before {
    border: 5px solid #ffffff;
    background: #f08150;
}

.wex-segment input:focus-visible + span,
.wex-chip input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(240, 129, 80, 0.28);
}

/* ---------- Objectifs (puces à cocher) ---------- */
.wex-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wex-chip {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.wex-chip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    border: 1.5px solid rgba(240, 129, 80, 0.55);
    border-radius: 999px;
    background: #ffffff;
    color: #2b3340;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    user-select: none;
}

.wex-chip span::before {
    content: "+";
    font-weight: 700;
    color: #f08150;
    width: 10px;
    text-align: center;
}

.wex-chip:hover span {
    border-color: #f08150;
    background: #fff6f1;
}

.wex-chip input:checked + span {
    border-color: #f08150;
    background: #f08150;
    color: #ffffff;
}

.wex-chip input:checked + span::before {
    content: "✓";
    color: #ffffff;
}

/* Erreurs des groupes de choix */
.wex-choice-group.is-invalid > .wex-field-error {
    display: block;
}

.wex-choice-group.is-invalid .wex-segment span,
.wex-choice-group.is-invalid .wex-chip span {
    border-color: #e02424;
}

/* RGPD */
.wex-form-section-wrapper .wex-rgpd-wrap .wex-checkbox-label {
    font-size: 12.5px;
    color: #555a63;
}

/* ---------- Mention légale (loi 09-08) ---------- */
.wex-form-legal {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 22px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid rgba(111, 106, 166, 0.18);
    font-size: 12px;
    line-height: 1.55;
    color: #6b7280;
}

.wex-form-legal-icon {
    flex: 0 0 auto;
    margin-top: 2px;
    color: #6f6aa6;
}

.wex-form-section-wrapper .wex-form-legal a {
    color: #6f6aa6;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.wex-form-section-wrapper .wex-form-legal a:hover {
    color: #f08150;
}

/* Responsive */
@media (max-width: 640px) {
    .wex-form-fields-row {
        align-items: stretch;
    }

    .wex-form-section-wrapper .wex-col-civilite,
    .wex-form-section-wrapper .wex-col-name {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .wex-required-note {
        margin-top: 0;
        text-align: left;
    }

    .wex-segmented {
        flex-direction: column;
        gap: 8px;
    }

    .wex-chip span {
        padding: 8px 13px;
        font-size: 13px;
    }
}

/* Liste déroulante sans choix : texte gris comme un placeholder */
.wex-form-section-wrapper select.wex-custom-select:invalid {
    color: #999ca0 !important;
}

/* ==========================================================================
   CERCLE DE DISCUSSION LIÉ À LA MASTER CLASS (sélection automatique)
   ========================================================================== */
.wex-form-section-wrapper select.wex-custom-select.wex-session-linked {
    cursor: default;
    pointer-events: none;
    border-style: dashed !important;
    border-color: rgba(240, 129, 80, 0.55) !important;
    background-color: #fff8f4 !important;
    /* Icône « lien » à la place de la flèche : le champ n'est pas modifiable */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f08150' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E") !important;
    background-position: right 14px center !important;
    background-size: 15px 15px !important;
    padding-right: 40px !important;
    text-overflow: ellipsis;
    transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.wex-form-section-wrapper select.wex-custom-select.wex-session-linked.is-empty {
    color: #999ca0 !important;
    font-style: italic;
}

.wex-form-section-wrapper .wex-linked-wrap.is-linked select.wex-session-linked {
    border-style: solid !important;
    border-color: #f08150 !important;
    color: #2b3340 !important;
}

.wex-form-section-wrapper select.wex-session-linked.is-synced {
    animation: wexLinkedPulse .9s ease;
}

@keyframes wexLinkedPulse {
    0%   { transform: scale(1);     filter: drop-shadow(0 0 0 rgba(240, 129, 80, 0)); }
    35%  { transform: scale(1.012); filter: drop-shadow(0 0 7px rgba(240, 129, 80, 0.55)); }
    100% { transform: scale(1);     filter: drop-shadow(0 0 0 rgba(240, 129, 80, 0)); }
}

.wex-form-section-wrapper .wex-linked-hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 7px 2px 0 !important;
    font-size: 12px;
    line-height: 1.45;
    color: #7a7f87;
    text-align: left !important;
}

.wex-form-section-wrapper .wex-linked-hint svg {
    flex: 0 0 auto;
    margin-top: 1px;
    color: #f08150;
}

@media (prefers-reduced-motion: reduce) {
    .wex-form-section-wrapper select.wex-session-linked.is-synced { animation: none; }
}

.wex-form-section-wrapper .wex-form-legal span {
    text-align: left;
}
