/* Formulaire public de mise en relation. */

.referral-form-section {
    margin-top: 38px;
    padding: 62px 0 66px;
    background:
        radial-gradient(circle at 4% 32%, rgba(42, 183, 184, .18), transparent 33%),
        radial-gradient(circle at 96% 70%, rgba(38, 120, 231, .17), transparent 35%),
        linear-gradient(115deg, #e6f7f7 0%, #edf6ff 50%, #eaf1ff 100%);
    border-block: 1px solid #d8e9f1;
    scroll-margin-top: 92px;
}

.referral-form-shell {
    display: grid;
    padding: 46px 48px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(255, 255, 255, .96);
    border-radius: 18px;
    grid-template-columns: minmax(260px, .78fr) minmax(0, 1.65fr);
    gap: 48px;
    box-shadow: 0 28px 70px rgba(27, 76, 120, .16);
    backdrop-filter: blur(12px);
}

.referral-form-intro {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.referral-form-intro h2 {
    margin: 0 0 13px;
    font-size: 2.05rem;
}

.referral-form-intro > p:not(.referral-kicker) {
    margin: 0;
    color: var(--referral-muted);
    font-size: .79rem;
}

.referral-form-intro img {
    width: min(100%, 310px);
    margin: auto auto 0;
    mix-blend-mode: multiply;
}

.referral-form-panel {
    min-width: 0;
}

.referral-alert {
    display: grid;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 8px;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    font-size: .72rem;
}

.referral-alert svg {
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.referral-alert strong,
.referral-alert p {
    display: block;
    margin: 0;
}

.referral-alert strong + p {
    margin-top: 3px;
}

.referral-alert-success {
    color: #176958;
    background: #ecfaf5;
    border-color: #bfe8da;
}

.referral-alert-error {
    color: #8c342e;
    background: #fff2f0;
    border-color: #efc7c2;
}

.referral-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 25px;
}

.referral-form-grid > label,
.referral-mode-fieldset {
    display: grid;
    min-width: 0;
    gap: 7px;
}

.referral-form-grid label > span,
.referral-mode-fieldset legend {
    color: #21466f;
    font-size: .68rem;
    font-weight: 750;
}

.referral-form-grid input,
.referral-form-grid select {
    width: 100%;
    min-height: 49px;
    padding: 11px 13px;
    color: #213f61;
    background: #fff;
    border: 1px solid #ccdce7;
    border-radius: 6px;
    outline: 0;
    font: inherit;
    font-size: .75rem;
}

.referral-form-grid input:focus,
.referral-form-grid select:focus,
.referral-consent input:focus-visible {
    border-color: var(--referral-blue);
    box-shadow: 0 0 0 3px rgba(38, 120, 231, .14);
}

.referral-form-grid [aria-invalid="true"],
.referral-consent input[aria-invalid="true"] {
    border-color: #c95c53;
}

.referral-form-grid input:disabled,
.referral-form-grid select:disabled {
    color: #8092a5;
    background: #f7f9fa;
    cursor: not-allowed;
}

.referral-mode-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.referral-mode-options {
    display: grid;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ccdce7;
    border-radius: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.referral-mode-options label {
    position: relative;
    min-width: 0;
}

.referral-mode-options label + label {
    border-left: 1px solid #ccdce7;
}

.referral-mode-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.referral-mode-options span {
    display: grid;
    min-height: 47px;
    padding: 8px;
    color: #536d88;
    place-items: center;
    font-size: .58rem;
    font-weight: 650;
    cursor: pointer;
    text-align: center;
}

.referral-mode-options input:checked + span {
    color: var(--referral-blue);
    background: #f4f8ff;
    box-shadow: inset 0 0 0 1px var(--referral-blue);
}

.referral-mode-options input:focus-visible + span {
    outline: 3px solid rgba(38, 120, 231, .2);
    outline-offset: -3px;
}

.referral-mode-options input:disabled + span {
    color: #8293a4;
    background: #f7f9fa;
    cursor: not-allowed;
}

.referral-phone-field {
    grid-column: 1 / -1;
}

.referral-phone-field span small {
    color: #708398;
    font-size: .6rem;
    font-weight: 600;
}

.referral-consent {
    display: grid;
    margin-top: 18px;
    color: #365675;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    font-size: .64rem;
    line-height: 1.52;
}

.referral-consent input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--referral-blue);
}

.referral-submit {
    width: 100%;
    margin-top: 16px;
}

.referral-submit:disabled {
    color: #748598;
    background: #dbe3e9;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.referral-form-note {
    margin: 10px 0 0;
    color: #708398;
    font-size: .58rem;
    line-height: 1.5;
}

.referral-form-note a {
    color: var(--referral-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.field-error,
.referral-form-error {
    color: #a53d36;
    font-size: .61rem;
    font-weight: 700;
}

.referral-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 940px) {
    .referral-form-shell {
        grid-template-columns: 1fr;
    }

    .referral-form-intro img {
        display: none;
    }
}

@media (max-width: 720px) {
    .referral-form-shell {
        padding: 29px 20px;
        gap: 28px;
    }

    .referral-form-grid {
        grid-template-columns: 1fr;
    }

    .referral-phone-field {
        grid-column: auto;
    }

    .referral-mode-options {
        grid-template-columns: 1fr;
    }

    .referral-mode-options label + label {
        border-top: 1px solid #ccdce7;
        border-left: 0;
    }
}

