
/* ================================================================
   CœursConnect — correctifs runtime mobile / stabilité formulaires
   2026-08-19
   ================================================================ */

/* Deux profils côte à côte sur mobile pour la recherche et les listes. */
@media (max-width: 560px) {
    .discovery-profile-grid,
    .members-profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    .discovery-profile-grid .profile-card,
    .members-profile-grid .profile-card {
        min-width: 0;
        border-radius: 16px;
    }

    .discovery-profile-grid .profile-card-media,
    .members-profile-grid .profile-card-media {
        height: 218px !important;
        min-height: 218px !important;
    }

    .discovery-profile-grid .profile-card-body,
    .members-profile-grid .profile-card-body {
        gap: 8px !important;
        padding: 10px 8px 9px !important;
    }

    .discovery-profile-grid .profile-card h3,
    .members-profile-grid .profile-card h3 {
        margin-bottom: 2px !important;
        font-size: 13px !important;
        line-height: 1.18;
    }

    .discovery-profile-grid .profile-card p,
    .members-profile-grid .profile-card p {
        font-size: 9px !important;
    }

    .discovery-profile-grid .profile-city-line svg,
    .members-profile-grid .profile-city-line svg {
        width: 11px !important;
        height: 11px !important;
    }

    .discovery-profile-grid .profile-card-actions,
    .members-profile-grid .profile-card-actions {
        display: grid !important;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px !important;
    }

    .discovery-profile-grid .profile-card-actions form,
    .members-profile-grid .profile-card-actions form {
        display: block !important;
        min-width: 0;
    }

    .discovery-profile-grid .profile-text-action,
    .members-profile-grid .profile-text-action {
        width: 100%;
        min-width: 0;
        min-height: 27px !important;
        padding: 4px 5px !important;
        overflow: hidden;
        border-radius: 8px !important;
        font-size: 7.7px !important;
        line-height: 1.05;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .discovery-profile-grid .round-action,
    .members-profile-grid .round-action {
        position: absolute;
        right: 7px;
        bottom: 7px;
        width: 29px !important;
        height: 29px !important;
        font-size: 13px !important;
        box-shadow: 0 6px 16px rgba(42, 23, 36, .16);
    }

    .discovery-profile-grid .profile-card-actions,
    .members-profile-grid .profile-card-actions {
        position: relative;
        padding-right: 34px;
    }

    .discovery-profile-grid .profile-card-media .presence,
    .members-profile-grid .profile-card-media .presence,
    .discovery-profile-grid .profile-plan-chip,
    .members-profile-grid .profile-plan-chip {
        min-height: 21px !important;
        padding: 4px 6px !important;
        font-size: 6.8px !important;
    }

    .discovery-profile-grid .profile-country-chip,
    .members-profile-grid .profile-country-chip,
    .discovery-profile-grid .match-score,
    .members-profile-grid .match-score {
        max-width: 48% !important;
        padding: 4px 6px !important;
        font-size: 6.7px !important;
    }

    .discovery-profile-grid .profile-country-chip img,
    .members-profile-grid .profile-country-chip img {
        width: 13px !important;
        height: 9px !important;
    }
}

/* Très petits mobiles : on conserve deux cartes sans débordement. */
@media (max-width: 380px) {
    .discovery-profile-grid,
    .members-profile-grid {
        gap: 7px !important;
    }

    .discovery-profile-grid .profile-card-media,
    .members-profile-grid .profile-card-media {
        height: 195px !important;
        min-height: 195px !important;
    }

    .discovery-profile-grid .profile-text-action,
    .members-profile-grid .profile-text-action {
        font-size: 7px !important;
    }
}
