/* =========================================================================
   BODEZIA — ÉCRANS DE CHOIX DU TUNNEL
   -------------------------------------------------------------------------
   Fichier partagé par origin-money.php ET motif-money.php.
   Les règles sont portées par .flow-main, la classe commune : un
   troisième écran de choix n'aura rien à ajouter ici.

   Ce qui change
     - Un vrai titre de page (26px) au lieu d'un h2 de section à 15,2px
     - Radio dessiné, identique à celui du choix d'opérateur
     - Cartes de hauteur égale sur une même ligne
     - Gris conformes AA : #99a2a8 (2,57:1) et #dc3545 (3,9:1) sortent
     - Bascule à 991,98px comme le reste du projet, plus 767,98px

   Les tokens --flow-* viennent de flow.css, les --home-* de home-page.css,
   avec valeur de repli dans les deux cas.
   ========================================================================= */

.flow-main {
    min-width: 0;
}


/* =========================================================================
   EN-TÊTE DE PAGE
   ========================================================================= */

.flow-main .flow-page-header {
    display: flex;
    align-items: center;

    gap: 14px;

    margin-bottom: 18px;
}

.flow-main .flow-page-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 44px;
    height: 44px;

    color: var(--flow-c-accent, #7441d4);

    background: var(--flow-c-accent-soft, #f3eefd);

    border-radius: 12px;

    font-size: 1.0625rem;
}

.flow-main .flow-page-title {
    margin: 0;

    color: var(--flow-c-heading, #2b3034);

    font-size: var(--flow-fs-title, 1.625rem);
    font-weight: 600;

    line-height: 1.25;
    letter-spacing: -0.01em;
}

.flow-main .flow-page-subtitle {
    margin: 5px 0 0;

    color: var(--flow-c-body, #5c6670);

    font-size: var(--flow-fs-body, 0.9375rem);
    line-height: 1.5;
}


/* =========================================================================
   CARTE ET SECTION
   ========================================================================= */

.flow-main .flow-card {
    background: #fff;

    border: 1px solid var(--flow-c-border, #e6e9ee);
    border-radius: 14px;

    box-shadow: 0 3px 12px rgba(30, 40, 50, 0.05);

    overflow: hidden;
}

.flow-main .flow-section {
    border-bottom: 1px solid var(--flow-c-border, #e6e9ee);
}

.flow-main .flow-section:last-child {
    border-bottom: 0;
}

.flow-main .flow-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 20px 22px 12px;
}

.flow-main .flow-section-heading {
    display: flex;
    align-items: center;

    gap: 12px;

    min-width: 0;
}

.flow-main .flow-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 40px;
    height: 40px;

    color: var(--flow-c-accent, #7441d4);

    background: var(--flow-c-accent-soft, #f3eefd);

    border-radius: 10px;

    font-size: 1rem;
}

.flow-main .flow-section-heading h2 {
    margin: 0;

    color: var(--flow-c-heading, #2b3034);

    font-size: var(--flow-fs-section, 1.0625rem);
    font-weight: 600;

    line-height: 1.35;
}

.flow-main .flow-section-heading p {
    margin: 2px 0 0;

    color: var(--flow-c-body, #5c6670);

    font-size: var(--flow-fs-label, 0.875rem);
    line-height: 1.4;
}

.flow-main .flow-section-body {
    padding: 18px 22px 20px;
}


/* =========================================================================
   CARTE DE CHOIX
   ========================================================================= */

.flow-main .flow-choice-grid > [class*="col-"] {
    display: flex;
}

.flow-main .flow-choice-item {
    position: relative;

    display: flex;

    width: 100%;
    margin: 0;
    padding: 0;

    border: 0;
}

.flow-main .flow-choice-card {
    position: relative;

    display: flex;
    align-items: center;

    gap: 12px;

    width: 100%;
    min-height: 64px;

    margin: 0;
    padding: 12px 16px !important;

    background: #fff;

    border: 1px solid var(--flow-c-border, #e6e9ee);
    border-radius: 12px;

    cursor: pointer;

    transition:
            border-color 0.15s ease,
            background-color 0.15s ease;
}

.flow-main .flow-choice-card:hover {
    background: rgba(116, 65, 212, 0.03);

    border-color: #cdbcef;
}


/* --- Radio dessiné, identique au choix d'opérateur ---------------------- */

.flow-main .flow-choice-input {
    flex: 0 0 auto;

    width: 20px;
    height: 20px;

    margin: 0;

    accent-color: var(--flow-c-accent, #7441d4);

    cursor: pointer;
}

.flow-main .flow-choice-input:focus-visible {
    outline: 2px solid var(--flow-c-accent, #7441d4);
    outline-offset: 2px;
}


/* --- Contenu ------------------------------------------------------------ */

.flow-main .flow-choice-content {
    display: flex;
    align-items: center;

    gap: 12px;

    min-width: 0;
}

.flow-main .flow-choice-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 36px;
    height: 36px;

    color: var(--flow-c-accent, #7441d4);

    background: var(--flow-c-accent-soft, #f3eefd);

    border-radius: 10px;

    font-size: 0.875rem;
}

.flow-main .flow-choice-card .custom-option-header {
    display: block;

    min-width: 0;

    padding: 0 !important;
}

.flow-main .flow-choice-card .fw-medium {
    color: var(--flow-c-heading, #2b3034);

    font-size: var(--flow-fs-body, 0.9375rem);
    font-weight: 600;

    line-height: 1.35;
}


/* --- Sélectionné -------------------------------------------------------- */

.flow-main .flow-choice-item:has(.flow-choice-input:checked) .flow-choice-card {
    background: #faf7ff;

    border-color: var(--flow-c-accent, #7441d4);
}

/* Repli pour les navigateurs sans :has() */
.flow-main .flow-choice-input:checked ~ .flow-choice-content .flow-choice-icon {
    color: #fff;

    background: var(--flow-c-accent, #7441d4);
}


/* =========================================================================
   ERREUR
   ========================================================================= */

.flow-main .flow-field-error {
    margin-top: 8px;

    color: #c62b39;

    font-size: var(--flow-fs-label, 0.875rem);
    line-height: 1.4;
}


/* =========================================================================
   BOUTON
   ========================================================================= */

.flow-main .flow-submit-row {
    display: flex;
    justify-content: flex-end;

    padding: 20px 22px 22px;

    border-top: 1px solid var(--flow-c-border, #e6e9ee);
}

.flow-main .flow-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 190px;
    min-height: 50px;

    padding: 12px 28px;

    border-radius: 999px;

    font-size: var(--flow-fs-body, 0.9375rem);
    font-weight: 600;
}


/* =========================================================================
   TABLETTE ET MOBILE  (< 992px)
   ========================================================================= */

@media (max-width: 991.98px) {

    .flow-main .flow-page-header {
        margin-bottom: 14px;
    }
}


/* =========================================================================
   MOBILE  (< 576px)
   ========================================================================= */

@media (max-width: 575.98px) {

    .flow-main .flow-page-icon {
        width: 40px;
        height: 40px;

        border-radius: 11px;

        font-size: 1rem;
    }

    .flow-main .flow-section-body {
        padding: 14px 16px 16px;
    }

    .flow-main .flow-choice-card {
        min-height: 60px;

        gap: 10px;

        padding: 10px 12px !important;
    }

    .flow-main .flow-choice-icon {
        width: 34px;
        height: 34px;

        font-size: 0.8125rem;
    }

    .flow-main .flow-submit-row {
        padding: 16px;
    }

    /* Même bouton que sur les autres écrans du tunnel : pleine largeur */
    .flow-main .flow-submit-button {
        width: 100%;
        min-width: 0;
        min-height: 52px;
    }
}