/* ============================================================
   HG CONNECT - MOBILE & TABLET FIXES
   This file must load AFTER hg-connect.css, connect-page.css,
   and public-profile.css.

   STRICT RESPONSIBILITY:
   - Dashboard layout (sidebar, content, tabs)
   - Dashboard cards, stats, forms, tables
   - Dashboard buttons, actions
   - Auth modal ONLY (login/register)
   - Save Contact Profile Modal
   - Does NOT control Welcome page (connect-page.css)
   - Does NOT control Public Profile / Business Card (public-profile.css)
   - Does NOT control .hg-connect-wrapper (global)
   - Does NOT control .hg-header, .hg-logo, .hg-tagline, .hg-description
   - Does NOT control .hg-modal, .hg-modal-actions (used by Public Profile)
   ============================================================ */

/* ============================================================
   TABLET / SMALL DESKTOP BROWSER (max-width: 1024px)
   ============================================================ */

@media (max-width: 1024px) {

    .hg-dashboard-layout {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-sidebar {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin: 0 !important;
        padding: 0 0 18px 0 !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-content {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        margin: 0 !important;
        padding: 18px 0 30px 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-content-inner {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .hg-sidebar-user {
        width: 100% !important;
        max-width: 100% !important;
        padding: 22px 10px 24px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-tabs {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px !important;
        border: none !important;
        background: transparent !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-tab {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-tab a {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 42px !important;
        padding: 8px 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.18 !important;
        border-radius: 8px !important;
        border: 1px solid #e9ecef !important;
        background: #ffffff !important;
        color: var(--hg-primary) !important;
        box-shadow: none !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-tab a:hover {
        background: #f5f9ff !important;
        border-color: var(--hg-light) !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .hg-dashboard-tab.active a {
        background: var(--hg-primary) !important;
        color: #ffffff !important;
        border-color: var(--hg-primary) !important;
        box-shadow: none !important;
    }

    .hg-dashboard-tab:last-child {
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
    }

    .hg-dashboard-tab:last-child a,
    .hg-dashboard-tab a[href*="logout"],
    .hg-dashboard-tab a[href*="log-out"],
    .hg-dashboard-tab a[href*="wp-login.php?action=logout"] {
        background: #fff5f5 !important;
        color: #dc3545 !important;
        border-color: #f3b6bd !important;
        box-shadow: none !important;
    }

    .hg-dashboard-tab:last-child a:hover,
    .hg-dashboard-tab a[href*="logout"]:hover,
    .hg-dashboard-tab a[href*="log-out"]:hover,
    .hg-dashboard-tab a[href*="wp-login.php?action=logout"]:hover {
        background: #dc3545 !important;
        color: #ffffff !important;
        border-color: #dc3545 !important;
    }
}

/* ============================================================
   PHONE / MOBILE (max-width: 768px)
   B/C container applied ONLY to dashboard/member/manager/admin pages
   Welcome page and Public Profile are NOT affected
   ============================================================ */

@media (max-width: 768px) {

    body {
        overflow-x: hidden !important;
    }

    /* ===== B = Wrapper principal (Dashboard ONLY) ===== */
    .hg-dashboard-wrap,
    .hg-member-connect-page,
    .hg-manager-connect-page,
    .hg-admin-connect-page {
        width: calc(100vw - 19px) !important;
        max-width: calc(100vw - 19px) !important;
        min-width: 0 !important;
        margin-left: calc(50% - 50vw + 9.5px) !important;
        margin-right: calc(50% - 50vw + 9.5px) !important;
        padding: 0 0 24px 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        background: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }

    /* ===== C = Tout contenu anndan B (Dashboard ONLY) ===== */
    .hg-dashboard-wrap > *,
    .hg-dashboard-layout,
    .hg-dashboard-sidebar,
    .hg-dashboard-content,
    .hg-dashboard-content-inner,
    .hg-member-connect-page > *,
    .hg-manager-connect-page > *,
    .hg-admin-connect-page > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* ===== DASHBOARD LAYOUT ===== */
    .hg-dashboard-layout {
        display: block !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }

    .hg-dashboard-sidebar {
        display: block !important;
        flex: none !important;
        margin: 0 !important;
        padding: 0 0 16px 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }

    .hg-dashboard-content {
        display: block !important;
        flex: none !important;
        margin: 0 !important;
        padding: 10px 0 28px 0 !important;
        border: none !important;
        border-radius: 0 !important;
        min-height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }

    .hg-dashboard-content-inner {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .hg-sidebar-user {
        width: 100% !important;
        max-width: 100% !important;
        padding: 18px 10px 20px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* ===== DASHBOARD TABS - 2 colonnes ===== */
    .hg-dashboard-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 14px 0 0 0 !important;
        border: none !important;
        background: transparent !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-tab {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-tab a {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 50px !important;
        padding: 8px 5px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        font-size: 14px !important;
        line-height: 1.15 !important;
        white-space: normal !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-tab:last-child {
        grid-column: 1 / 2 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
    }

    /* ===== DASHBOARD HEADER ===== */
    .hg-dashboard-header {
        margin-bottom: 10px !important;
        padding-bottom: 10px !important;
        gap: 8px !important;
    }

    .hg-dashboard-header h2,
    .hg-dashboard-content h2 {
        font-size: 18px !important;
        line-height: 1.2 !important;
        margin: 0 0 6px !important;
    }

    .hg-dashboard-content h3 {
        font-size: 15px !important;
        line-height: 1.2 !important;
        margin: 0 0 6px !important;
    }

    .hg-dashboard-content p,
    .hg-dashboard-content .hg-small {
        font-size: 12.5px !important;
        line-height: 1.35 !important;
    }

    /* ===== PROFILE OVERVIEW BOX ===== */
    .hg-profile-overview-box {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        align-items: stretch !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin: 0 0 12px 0 !important;
        padding: 10px !important;
        border-radius: 10px !important;
        border: 1px solid #d9e6f8 !important;
        background: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0, 29, 110, 0.06) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .hg-profile-overview-left {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .hg-profile-overview-avatar {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        font-size: 16px !important;
    }

    .hg-profile-overview-main {
        min-width: 0 !important;
    }

    .hg-profile-overview-main h2 {
        font-size: 15px !important;
        line-height: 1.15 !important;
        margin: 0 0 3px 0 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .hg-profile-overview-id {
        font-size: 10.5px !important;
        line-height: 1.2 !important;
        margin: 0 0 5px 0 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .hg-profile-overview-role {
        padding: 2px 8px !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    .hg-profile-overview-right {
        flex: 0 0 108px !important;
        width: 108px !important;
        min-width: 108px !important;
        max-width: 108px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        align-items: stretch !important;
    }

    .hg-profile-overview-info {
        width: 100% !important;
        padding: 6px 7px !important;
        border-radius: 8px !important;
        text-align: right !important;
    }

    .hg-profile-overview-info .hg-info-label {
        font-size: 8.5px !important;
        line-height: 1.1 !important;
    }

    .hg-profile-overview-info strong {
        font-size: 10.5px !important;
        line-height: 1.15 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    /* ===== DASHBOARD CARDS / BOXES ===== */
    .hg-dashboard-content .hg-card,
    .hg-dashboard-content .hg-admin-card,
    .hg-dashboard-content .hg-community-view,
    .hg-dashboard-content .hg-profile-section,
    .hg-dashboard-content .hg-community-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 10px !important;
        padding: 12px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .hg-dashboard-content .hg-card:hover {
        box-shadow: none !important;
        transform: none !important;
    }

    /* ===== DASHBOARD STATS ===== */
    .hg-dashboard-content .hg-stats,
    .hg-dashboard-content .hg-stats-grid,
    .hg-dashboard-content .hg-admin-stats,
    .hg-member-connect-page .hg-stats,
    .hg-manager-connect-page .hg-stats,
    .hg-admin-connect-page .hg-stats {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin: 10px 0 14px !important;
    }

    .hg-dashboard-content .hg-stat,
    .hg-dashboard-content .hg-stat-box,
    .hg-dashboard-content .hg-admin-card,
    .hg-member-connect-page .hg-stat,
    .hg-manager-connect-page .hg-stat,
    .hg-admin-connect-page .hg-stat {
        padding: 10px !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-content .hg-stat-number,
    .hg-dashboard-content .hg-admin-number,
    .hg-dashboard-content .hg-stat-box h3,
    .hg-member-connect-page .hg-stat-number,
    .hg-manager-connect-page .hg-stat-number,
    .hg-admin-connect-page .hg-stat-number {
        font-size: 20px !important;
        line-height: 1.1 !important;
        margin: 0 !important;
    }

    .hg-dashboard-content .hg-stat-label,
    .hg-dashboard-content .hg-admin-label,
    .hg-dashboard-content .hg-stat-box p,
    .hg-member-connect-page .hg-stat-label,
    .hg-manager-connect-page .hg-stat-label,
    .hg-admin-connect-page .hg-stat-label {
        font-size: 10.5px !important;
        line-height: 1.2 !important;
        margin-top: 3px !important;
    }

    /* ===== DASHBOARD FORMS ===== */
    .hg-dashboard-content .hg-form-group,
    .hg-member-connect-page .hg-form-group,
    .hg-manager-connect-page .hg-form-group,
    .hg-admin-connect-page .hg-form-group {
        margin-bottom: 12px !important;
    }

    .hg-dashboard-content .hg-form-group label,
    .hg-member-connect-page .hg-form-group label,
    .hg-manager-connect-page .hg-form-group label,
    .hg-admin-connect-page .hg-form-group label {
        font-size: 13px !important;
        margin-bottom: 5px !important;
    }

    .hg-dashboard-content .hg-form-group input[type="text"],
    .hg-dashboard-content .hg-form-group input[type="tel"],
    .hg-dashboard-content .hg-form-group input[type="email"],
    .hg-dashboard-content .hg-form-group input[type="password"],
    .hg-dashboard-content .hg-form-group select,
    .hg-dashboard-content .hg-form-group textarea,
    .hg-dashboard-content .hg-input,
    .hg-dashboard-content .hg-select,
    .hg-dashboard-content .hg-textarea,
    .hg-member-connect-page .hg-input,
    .hg-member-connect-page .hg-select,
    .hg-member-connect-page .hg-textarea,
    .hg-manager-connect-page .hg-input,
    .hg-manager-connect-page .hg-select,
    .hg-manager-connect-page .hg-textarea,
    .hg-admin-connect-page .hg-input,
    .hg-admin-connect-page .hg-select,
    .hg-admin-connect-page .hg-textarea {
        width: 100% !important;
        max-width: 100% !important;
        height: 40px !important;
        min-height: 40px !important;
        padding: 8px 10px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-content .hg-form-group textarea,
    .hg-dashboard-content .hg-textarea,
    .hg-member-connect-page .hg-textarea,
    .hg-manager-connect-page .hg-textarea,
    .hg-admin-connect-page .hg-textarea {
        height: auto !important;
        min-height: 90px !important;
    }

    /* Multi phone fields - Dashboard ONLY */
    .hg-dashboard-content .hg-phone-numbers-group .hg-phone-row > div,
    .hg-member-connect-page .hg-phone-numbers-group .hg-phone-row > div,
    .hg-manager-connect-page .hg-phone-numbers-group .hg-phone-row > div,
    .hg-admin-connect-page .hg-phone-numbers-group .hg-phone-row > div {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .hg-dashboard-content .hg-phone-numbers-group .hg-phone-code-select,
    .hg-dashboard-content .hg-phone-numbers-group .hg-phone-field,
    .hg-dashboard-content .hg-phone-numbers-group .hg-remove-phone-row,
    .hg-member-connect-page .hg-phone-numbers-group .hg-phone-code-select,
    .hg-member-connect-page .hg-phone-numbers-group .hg-phone-field,
    .hg-member-connect-page .hg-phone-numbers-group .hg-remove-phone-row,
    .hg-manager-connect-page .hg-phone-numbers-group .hg-phone-code-select,
    .hg-manager-connect-page .hg-phone-numbers-group .hg-phone-field,
    .hg-manager-connect-page .hg-phone-numbers-group .hg-remove-phone-row,
    .hg-admin-connect-page .hg-phone-numbers-group .hg-phone-code-select,
    .hg-admin-connect-page .hg-phone-numbers-group .hg-phone-field,
    .hg-admin-connect-page .hg-phone-numbers-group .hg-remove-phone-row {
        width: 100% !important;
        height: 40px !important;
        min-height: 40px !important;
    }

    /* ===== DASHBOARD BUTTONS ===== */
    .hg-dashboard-content .hg-button,
    .hg-dashboard-content .hg-form-actions .hg-button,
    .hg-dashboard-content .hg-member-actions .hg-button,
    .hg-dashboard-content .hg-link-actions .hg-button,
    .hg-dashboard-content .hg-community-actions .hg-button,
    .hg-member-connect-page .hg-form-actions .hg-button,
    .hg-manager-connect-page .hg-form-actions .hg-button,
    .hg-admin-connect-page .hg-form-actions .hg-button {
        min-height: 38px !important;
        min-width: 0 !important;
        padding: 8px 12px !important;
        font-size: 12.5px !important;
        line-height: 1.15 !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        box-shadow: none !important;
    }

    .hg-dashboard-content .hg-button:hover,
    .hg-dashboard-content .hg-form-actions .hg-button:hover,
    .hg-dashboard-content .hg-member-actions .hg-button:hover,
    .hg-dashboard-content .hg-link-actions .hg-button:hover,
    .hg-dashboard-content .hg-community-actions .hg-button:hover,
    .hg-member-connect-page .hg-form-actions .hg-button:hover,
    .hg-manager-connect-page .hg-form-actions .hg-button:hover,
    .hg-admin-connect-page .hg-form-actions .hg-button:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    .hg-dashboard-content .hg-actions,
    .hg-dashboard-content .hg-actions-row,
    .hg-dashboard-content .hg-button-group,
    .hg-dashboard-content .hg-form-actions,
    .hg-dashboard-content .hg-inline-actions,
    .hg-dashboard-content .hg-table-actions,
    .hg-dashboard-content .hg-member-actions,
    .hg-dashboard-content .hg-link-actions,
    .hg-dashboard-content .hg-community-actions,
    .hg-dashboard-content .hg-community-actions .hg-button-group,
    .hg-member-connect-page .hg-actions,
    .hg-member-connect-page .hg-form-actions,
    .hg-manager-connect-page .hg-actions,
    .hg-manager-connect-page .hg-form-actions,
    .hg-admin-connect-page .hg-actions,
    .hg-admin-connect-page .hg-form-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .hg-dashboard-content .hg-actions > .hg-button,
    .hg-dashboard-content .hg-button-group > .hg-button,
    .hg-dashboard-content .hg-form-actions > .hg-button {
        flex: 1 1 130px !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .hg-dashboard-content .hg-inline-actions .hg-button,
    .hg-dashboard-content .hg-table-actions .hg-button,
    .hg-dashboard-content .hg-member-actions .hg-button,
    .hg-dashboard-content .hg-link-actions .hg-button,
    .hg-dashboard-content .hg-link-actions button,
    .hg-dashboard-content .hg-community-actions .button,
    .hg-dashboard-content .hg-community-actions .button-small,
    .hg-dashboard-content .button,
    .hg-dashboard-content button {
        width: auto !important;
        min-width: 34px !important;
        max-width: 100% !important;
        min-height: 30px !important;
        height: auto !important;
        padding: 5px 9px !important;
        font-size: 11px !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        border-radius: 6px !important;
        box-shadow: none !important;
    }

    /* ===== TABLES ===== */
    .hg-dashboard-content .hg-responsive-table-wrap,
    .hg-dashboard-content .hg-admin-table-wrap,
    .hg-dashboard-content .hg-limited-table-wrap,
    .hg-dashboard-content .hg-table-wrap,
    .hg-dashboard-content .table-responsive,
    .hg-member-connect-page .hg-responsive-table-wrap,
    .hg-manager-connect-page .hg-responsive-table-wrap,
    .hg-admin-connect-page .hg-responsive-table-wrap {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .hg-dashboard-content table,
    .hg-dashboard-content .hg-limited-table,
    .hg-member-connect-page .hg-limited-table,
    .hg-manager-connect-page .hg-limited-table,
    .hg-admin-connect-page .hg-limited-table {
        width: 100% !important;
        min-width: 520px !important;
        font-size: 11px !important;
    }

    .hg-dashboard-content th,
    .hg-dashboard-content td,
    .hg-dashboard-content .hg-limited-table th,
    .hg-dashboard-content .hg-limited-table td,
    .hg-member-connect-page .hg-limited-table th,
    .hg-member-connect-page .hg-limited-table td,
    .hg-manager-connect-page .hg-limited-table th,
    .hg-manager-connect-page .hg-limited-table td,
    .hg-admin-connect-page .hg-limited-table th,
    .hg-admin-connect-page .hg-limited-table td {
        padding: 6px 7px !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
    }

    /* ===== AUTH MODAL ONLY ===== */
    .hg-auth-modal {
        align-items: center !important;
        justify-content: center !important;
        padding: 10px !important;
    }

    .hg-auth-content {
        width: 100% !important;
        max-width: 420px !important;
        max-height: calc(100vh - 20px) !important;
        border-radius: 12px !important;
        overflow-y: auto !important;
    }

    .hg-auth-header {
        padding: 14px 16px !important;
    }

    .hg-auth-header h2 {
        font-size: 17px !important;
    }

    .hg-auth-body {
        padding: 18px 14px !important;
    }

    .hg-auth-tabs {
        margin: 0 -14px 16px !important;
        padding: 0 14px !important;
    }

    .hg-auth-tab {
        flex: 1 !important;
        text-align: center !important;
        padding: 10px 8px !important;
        font-size: 13px !important;
    }

    .hg-auth-modal .hg-modal-actions {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .hg-auth-modal .hg-modal-actions .hg-button,
    .hg-auth-modal .hg-modal-actions .button {
        width: 100% !important;
    }
}

/* ============================================================
   SMALL PHONE (max-width: 480px)
   ============================================================ */

@media (max-width: 480px) {

    .hg-dashboard-tabs {
        gap: 6px !important;
        padding: 12px 0 0 0 !important;
    }

    .hg-dashboard-tab a {
        min-height: 44px !important;
        padding: 6px 4px !important;
        font-size: 12.5px !important;
        line-height: 1.1 !important;
        border-radius: 8px !important;
    }

    .hg-dashboard-content {
        padding: 8px 0 24px 0 !important;
    }

    .hg-dashboard-header h2,
    .hg-dashboard-content h2 {
        font-size: 16px !important;
    }

    .hg-dashboard-content .hg-card,
    .hg-dashboard-content .hg-admin-card,
    .hg-dashboard-content .hg-community-view,
    .hg-dashboard-content .hg-profile-section {
        padding: 10px !important;
        border-radius: 8px !important;
    }

    .hg-dashboard-content .hg-stats,
    .hg-dashboard-content .hg-stats-grid,
    .hg-dashboard-content .hg-admin-stats,
    .hg-member-connect-page .hg-stats,
    .hg-manager-connect-page .hg-stats,
    .hg-admin-connect-page .hg-stats {
        gap: 6px !important;
    }

    .hg-dashboard-content .hg-stat-number,
    .hg-dashboard-content .hg-admin-number,
    .hg-dashboard-content .hg-stat-box h3,
    .hg-member-connect-page .hg-stat-number,
    .hg-manager-connect-page .hg-stat-number,
    .hg-admin-connect-page .hg-stat-number {
        font-size: 18px !important;
    }

    .hg-dashboard-content .hg-stat-label,
    .hg-dashboard-content .hg-admin-label,
    .hg-dashboard-content .hg-stat-box p,
    .hg-member-connect-page .hg-stat-label,
    .hg-manager-connect-page .hg-stat-label,
    .hg-admin-connect-page .hg-stat-label {
        font-size: 10px !important;
    }

    .hg-dashboard-content table,
    .hg-dashboard-content .hg-limited-table,
    .hg-member-connect-page .hg-limited-table,
    .hg-manager-connect-page .hg-limited-table,
    .hg-admin-connect-page .hg-limited-table {
        min-width: 480px !important;
        font-size: 10.5px !important;
    }

    .hg-dashboard-content .hg-button,
    .hg-dashboard-content .hg-form-actions .hg-button,
    .hg-dashboard-content .hg-member-actions .hg-button,
    .hg-dashboard-content .hg-link-actions .hg-button,
    .hg-dashboard-content .hg-community-actions .hg-button,
    .hg-member-connect-page .hg-form-actions .hg-button,
    .hg-manager-connect-page .hg-form-actions .hg-button,
    .hg-admin-connect-page .hg-form-actions .hg-button {
        min-height: 36px !important;
        padding: 7px 10px !important;
        font-size: 12px !important;
    }

    .hg-dashboard-content .hg-inline-actions .hg-button,
    .hg-dashboard-content .hg-table-actions .hg-button,
    .hg-dashboard-content .hg-member-actions .hg-button,
    .hg-dashboard-content .hg-link-actions .hg-button,
    .hg-dashboard-content .hg-link-actions button,
    .hg-dashboard-content .hg-community-actions .button,
    .hg-dashboard-content .hg-community-actions .button-small,
    .hg-dashboard-content .button,
    .hg-dashboard-content button {
        min-height: 30px !important;
        padding: 5px 8px !important;
        font-size: 10.5px !important;
    }

    /* Profile overview small */
    .hg-profile-overview-box {
        gap: 6px !important;
        padding: 9px !important;
    }

    .hg-profile-overview-avatar {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        font-size: 15px !important;
    }

    .hg-profile-overview-main h2 {
        font-size: 14px !important;
    }

    .hg-profile-overview-id {
        font-size: 10px !important;
    }

    .hg-profile-overview-right {
        flex: 0 0 100px !important;
        width: 100px !important;
        min-width: 100px !important;
        max-width: 100px !important;
    }

    .hg-profile-overview-info {
        padding: 5px 6px !important;
    }

    .hg-profile-overview-info strong {
        font-size: 10px !important;
    }

    /* AUTH MODAL ONLY */
    .hg-auth-content {
        max-width: 100% !important;
        border-radius: 10px !important;
    }

    .hg-auth-header {
        padding: 12px 14px !important;
    }

    .hg-auth-header h2 {
        font-size: 15px !important;
    }

    .hg-auth-body {
        padding: 16px 12px !important;
    }
}

/* ============================================================
   VERY SMALL PHONE (max-width: 360px)
   ============================================================ */

@media (max-width: 360px) {

    .hg-dashboard-tabs {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
        padding: 10px 0 0 0 !important;
    }

    .hg-dashboard-tab a {
        min-height: 40px !important;
        font-size: 13px !important;
        padding: 8px 5px !important;
    }

    .hg-dashboard-content .hg-stats,
    .hg-dashboard-content .hg-stats-grid,
    .hg-dashboard-content .hg-admin-stats,
    .hg-member-connect-page .hg-stats,
    .hg-manager-connect-page .hg-stats,
    .hg-admin-connect-page .hg-stats {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }

    .hg-profile-overview-box {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .hg-profile-overview-right {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    .hg-profile-overview-info {
        text-align: center !important;
    }
}

/* ============================================================
   LANDSCAPE PHONE
   ============================================================ */

@media (max-width: 900px) and (orientation: landscape) {

    .hg-auth-content {
        max-height: calc(100vh - 14px) !important;
    }

    .hg-auth-body {
        padding: 12px !important;
    }
}

/* ============================================================
   STRICT MOBILE RESPONSIBILITY LOCK
   ============================================================ */

/*
   mobile.css must NOT control:
   - Welcome page (connect-page.css)
   - Connect landing hero/cards (connect-page.css)
   - Public profile (public-profile.css)
   - Business card (public-profile.css)
   - Public landing page (public-profile.css)
   - Global .hg-connect-wrapper (global CSS)
   - .hg-header, .hg-logo, .hg-tagline, .hg-description (global CSS)
   - .hg-modal, .hg-modal-content, .hg-modal-header, .hg-modal-body, .hg-modal-actions (used by Public Profile)

   Do NOT add selectors here:
   .hg-welcome
   .hg-welcome-grid
   .hg-welcome .hg-card
   .hg-card-join
   .hg-card-save
   .hg-card-member
   .hg-card-manager
   .hg-card-icon
   .hg-card-content
   .hg-card-hint
   .hg-search-wrapper
   .hg-join-view-row
   .hg-btn-join
   .hg-btn-view
   .hg-btn-login
   .hg-btn-register
   .hg-btn-apply
   .hg-public-profile-wrap
   .hg-public-profile-layout
   .hg-public-profile-form
   .hg-public-profile-preview
   .hg-public-landing
   .hg-business-card
   .hg-card-rectangle
   .hg-card-centered
   .hg-biz-*
   .hg-modal
   .hg-modal-content
   .hg-modal-header
   .hg-modal-body
   .hg-modal-actions
*/

/* Dashboard-only final overrides */
@media (max-width: 768px) {
    .hg-dashboard-content .hg-card,
    .hg-dashboard-content .hg-admin-card,
    .hg-dashboard-content .hg-community-view,
    .hg-dashboard-content .hg-profile-section {
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 768px) {
    .hg-dashboard-content .hg-button,
    .hg-dashboard-content .hg-form-actions .hg-button,
    .hg-dashboard-content .hg-member-actions .hg-button,
    .hg-dashboard-content .hg-link-actions .hg-button,
    .hg-dashboard-content .hg-community-actions .hg-button,
    .hg-member-connect-page .hg-form-actions .hg-button,
    .hg-manager-connect-page .hg-form-actions .hg-button,
    .hg-admin-connect-page .hg-form-actions .hg-button {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 768px) {
    .hg-dashboard-content h3 {
        font-size: 15px !important;
        line-height: 1.2 !important;
        margin: 0 0 6px !important;
    }

    .hg-dashboard-content p,
    .hg-dashboard-content .hg-small {
        font-size: 12.5px !important;
        line-height: 1.35 !important;
    }
}
@media (max-width: 768px) {

    .hg-connect-wrapper .hg-dashboard-wrap,
    .hg-connect-wrapper .hg-member-connect-page,
    .hg-connect-wrapper .hg-manager-connect-page,
    .hg-connect-wrapper .hg-admin-connect-page {
        width: calc(100vw - 19px) !important;
        max-width: calc(100vw - 19px) !important;
        min-width: 0 !important;
        margin-left: calc(50% - 50vw + 9.5px) !important;
        margin-right: calc(50% - 50vw + 9.5px) !important;
        padding: 0 0 24px 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .hg-connect-wrapper .hg-dashboard-wrap .hg-dashboard-layout,
    .hg-connect-wrapper .hg-member-connect-page .hg-dashboard-layout,
    .hg-connect-wrapper .hg-manager-connect-page .hg-dashboard-layout,
    .hg-connect-wrapper .hg-admin-connect-page .hg-dashboard-layout {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .hg-connect-wrapper .hg-dashboard-wrap .hg-dashboard-sidebar,
    .hg-connect-wrapper .hg-member-connect-page .hg-dashboard-sidebar,
    .hg-connect-wrapper .hg-manager-connect-page .hg-dashboard-sidebar,
    .hg-connect-wrapper .hg-admin-connect-page .hg-dashboard-sidebar {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
        margin: 0 !important;
        padding: 0 0 16px 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .hg-connect-wrapper .hg-dashboard-wrap .hg-dashboard-tabs,
    .hg-connect-wrapper .hg-member-connect-page .hg-dashboard-tabs,
    .hg-connect-wrapper .hg-manager-connect-page .hg-dashboard-tabs,
    .hg-connect-wrapper .hg-admin-connect-page .hg-dashboard-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 14px 0 0 0 !important;
        border: none !important;
        background: transparent !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .hg-connect-wrapper .hg-dashboard-wrap .hg-dashboard-content,
    .hg-connect-wrapper .hg-member-connect-page .hg-dashboard-content,
    .hg-connect-wrapper .hg-manager-connect-page .hg-dashboard-content,
    .hg-connect-wrapper .hg-admin-connect-page .hg-dashboard-content {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
        margin: 0 !important;
        padding: 10px 0 28px 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .hg-connect-wrapper .hg-dashboard-wrap .hg-dashboard-content-inner,
    .hg-connect-wrapper .hg-member-connect-page .hg-dashboard-content-inner,
    .hg-connect-wrapper .hg-manager-connect-page .hg-dashboard-content-inner,
    .hg-connect-wrapper .hg-admin-connect-page .hg-dashboard-content-inner {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
}
@media (max-width: 360px) {
    .hg-connect-wrapper .hg-dashboard-wrap .hg-dashboard-tabs,
    .hg-connect-wrapper .hg-member-connect-page .hg-dashboard-tabs,
    .hg-connect-wrapper .hg-manager-connect-page .hg-dashboard-tabs,
    .hg-connect-wrapper .hg-admin-connect-page .hg-dashboard-tabs {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================================
   MANAGER COMMUNITY FILTERS & BADGES - MOBILE
   ============================================================ */

/* --- Tablet (max-width: 1024px) --- */
@media (max-width: 1024px) {
    .hg-connect-wrapper .hg-status-filter {
        gap: 6px !important;
        margin: 12px 0 14px !important;
        padding-bottom: 8px !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-btn {
        font-size: 12px !important;
        padding: 5px 14px !important;
        min-height: 32px !important;
        border-radius: 16px !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-count {
        font-size: 10px !important;
        padding: 0 8px !important;
    }

    .hg-connect-wrapper .hg-community-item {
        padding: 10px 14px !important;
        gap: 8px !important;
    }

    .hg-connect-wrapper .hg-summary-box {
        gap: 12px !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
}

/* --- Phone (max-width: 768px) --- */
@media (max-width: 768px) {
    /* Filter tabs - horizontal scroll ou wrap */
    .hg-connect-wrapper .hg-status-filter {
        gap: 5px !important;
        margin: 10px 0 12px !important;
        padding-bottom: 6px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex-wrap: nowrap !important;
        padding-bottom: 10px !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-btn {
        font-size: 11px !important;
        padding: 4px 12px !important;
        min-height: 30px !important;
        border-radius: 14px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-count {
        font-size: 9px !important;
        padding: 0 6px !important;
    }

    /* Community items - stack vertical */
    .hg-connect-wrapper .hg-community-item {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 10px 12px !important;
        gap: 6px !important;
    }

    .hg-connect-wrapper .hg-community-item .hg-community-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    .hg-connect-wrapper .hg-community-item .hg-community-info .hg-community-name {
        font-size: 14px !important;
        font-weight: 600 !important;
    }

    .hg-connect-wrapper .hg-community-item .hg-community-actions {
        display: flex !important;
        gap: 4px !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }

    .hg-connect-wrapper .hg-community-item .hg-community-actions .button-small,
    .hg-connect-wrapper .hg-community-item .hg-community-actions .button {
        font-size: 10px !important;
        height: 28px !important;
        min-height: 28px !important;
        padding: 2px 8px !important;
        border-radius: 4px !important;
        flex: 1 0 auto !important;
        min-width: 44px !important;
        justify-content: center !important;
    }

    /* Status badges on mobile */
    .hg-connect-wrapper .hg-status-badge {
        font-size: 10px !important;
        padding: 1px 8px !important;
        margin-left: 4px !important;
    }

    /* Reactivate button mobile */
    .hg-connect-wrapper .hg-btn-reactivate {
        font-size: 10px !important;
        height: 28px !important;
        min-height: 28px !important;
        padding: 2px 8px !important;
        flex: 1 0 auto !important;
        min-width: 60px !important;
        justify-content: center !important;
    }

    /* Summary box mobile */
    .hg-connect-wrapper .hg-summary-box {
        gap: 8px !important;
        padding: 8px 10px !important;
        font-size: 11px !important;
        flex-wrap: wrap !important;
        margin-top: 12px !important;
    }

    .hg-connect-wrapper .hg-summary-box .hg-summary-item {
        font-size: 11px !important;
    }

    /* Indicator badge on mobile */
    .hg-connect-wrapper .hg-indicator {
        font-size: 10px !important;
        padding: 1px 8px !important;
    }
}

/* --- Small Phone (max-width: 480px) --- */
@media (max-width: 480px) {
    .hg-connect-wrapper .hg-status-filter {
        gap: 4px !important;
        margin: 8px 0 10px !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-btn {
        font-size: 10px !important;
        padding: 3px 10px !important;
        min-height: 28px !important;
        border-radius: 12px !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-count {
        font-size: 8px !important;
        padding: 0 5px !important;
    }

    .hg-connect-wrapper .hg-community-item {
        padding: 8px 10px !important;
        gap: 5px !important;
    }

    .hg-connect-wrapper .hg-community-item .hg-community-info .hg-community-name {
        font-size: 13px !important;
    }

    .hg-connect-wrapper .hg-community-item .hg-community-actions .button-small,
    .hg-connect-wrapper .hg-community-item .hg-community-actions .button {
        font-size: 9px !important;
        height: 26px !important;
        min-height: 26px !important;
        padding: 1px 6px !important;
        min-width: 36px !important;
    }

    .hg-connect-wrapper .hg-status-badge {
        font-size: 9px !important;
        padding: 1px 6px !important;
    }

    .hg-connect-wrapper .hg-btn-reactivate {
        font-size: 9px !important;
        height: 26px !important;
        min-height: 26px !important;
        padding: 1px 6px !important;
        min-width: 50px !important;
    }

    .hg-connect-wrapper .hg-summary-box {
        gap: 5px !important;
        padding: 6px 8px !important;
        font-size: 10px !important;
    }

    .hg-connect-wrapper .hg-summary-box .hg-summary-item {
        font-size: 10px !important;
    }

    .hg-connect-wrapper .hg-indicator {
        font-size: 9px !important;
        padding: 1px 6px !important;
        margin-left: 4px !important;
    }
}

/* --- Very Small Phone (max-width: 360px) --- */
@media (max-width: 360px) {
    .hg-connect-wrapper .hg-status-filter {
        gap: 3px !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-btn {
        font-size: 9px !important;
        padding: 2px 8px !important;
        min-height: 24px !important;
        border-radius: 10px !important;
    }

    .hg-connect-wrapper .hg-community-item .hg-community-actions .button-small,
    .hg-connect-wrapper .hg-community-item .hg-community-actions .button {
        font-size: 8px !important;
        height: 24px !important;
        min-height: 24px !important;
        padding: 1px 5px !important;
        min-width: 32px !important;
    }

    .hg-connect-wrapper .hg-btn-reactivate {
        font-size: 8px !important;
        height: 24px !important;
        min-height: 24px !important;
        padding: 1px 5px !important;
        min-width: 44px !important;
    }
}
/* ============================================================
   MANAGER COMMUNITY TABLE - MOBILE RESPONSIVE
   ============================================================ */

/* --- Tablette (max-width: 1024px) --- */
@media (max-width: 1024px) {

    /* Filtres */
    .hg-connect-wrapper .hg-status-filter {
        gap: 6px !important;
        margin: 12px 0 14px !important;
        padding-bottom: 8px !important;
        flex-wrap: wrap !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-btn {
        font-size: 12px !important;
        padding: 5px 14px !important;
        min-height: 32px !important;
        border-radius: 16px !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-count {
        font-size: 10px !important;
        padding: 0 8px !important;
    }

    /* Tableau - header */
    .hg-connect-wrapper .hg-community-table-header {
        font-size: 11px !important;
        padding: 10px 12px !important;
        grid-template-columns: 1.8fr 1fr 1fr 1.6fr !important;
    }

    /* Lignes */
    .hg-connect-wrapper .hg-community-row {
        padding: 8px 12px !important;
        grid-template-columns: 1.8fr 1fr 1fr 1.6fr !important;
        gap: 4px !important;
    }

    .hg-connect-wrapper .hg-community-name {
        font-size: 13px !important;
    }

    .hg-connect-wrapper .hg-status-badge {
        font-size: 11px !important;
        padding: 2px 10px !important;
    }

    .hg-connect-wrapper .hg-btn {
        font-size: 10px !important;
        height: 26px !important;
        min-height: 26px !important;
        padding: 1px 8px !important;
    }

    .hg-connect-wrapper .hg-summary-box {
        gap: 12px !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
}

/* --- Téléphone (max-width: 768px) --- */
@media (max-width: 768px) {

    /* Filtres - scroll horizontal */
    .hg-connect-wrapper .hg-status-filter {
        gap: 5px !important;
        margin: 10px 0 12px !important;
        padding-bottom: 6px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex-wrap: nowrap !important;
        padding-bottom: 10px !important;
        display: flex !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-btn {
        font-size: 11px !important;
        padding: 4px 12px !important;
        min-height: 30px !important;
        border-radius: 14px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-count {
        font-size: 9px !important;
        padding: 0 6px !important;
    }

    /* Tableau - passage en mode carte */
    .hg-connect-wrapper .hg-community-table-wrap {
        border-radius: 8px !important;
        overflow: hidden !important;
    }

    .hg-connect-wrapper .hg-community-table-header {
        display: none !important;
    }

    .hg-connect-wrapper .hg-community-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        padding: 10px 12px !important;
        gap: 6px 8px !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    .hg-connect-wrapper .hg-community-row:last-child {
        border-bottom: none !important;
    }

    /* ============================================================
       NOM | STATUT | MEMBRES - SUR UNE SEULE LIGNE
       ============================================================ */
    .hg-connect-wrapper .hg-col-community {
        flex: 1 1 30% !important;
        min-width: 100px !important;
        text-align: left !important;
        padding: 0 !important;
    }

    .hg-connect-wrapper .hg-col-community .hg-community-name-wrap {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }

    .hg-connect-wrapper .hg-community-name {
        font-size: 13px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }

    .hg-connect-wrapper .hg-indicator {
        font-size: 9px !important;
        padding: 1px 6px !important;
        white-space: nowrap !important;
    }

    .hg-connect-wrapper .hg-status-badge-small {
        font-size: 10px !important;
        margin-left: 2px !important;
    }

    /* Status - compact */
    .hg-connect-wrapper .hg-col-status {
        flex: 0 0 auto !important;
        text-align: left !important;
        padding: 0 !important;
    }

    .hg-connect-wrapper .hg-status-badge {
        font-size: 10px !important;
        padding: 2px 8px !important;
        white-space: nowrap !important;
    }

    /* Members - compact */
    .hg-connect-wrapper .hg-col-members {
        flex: 0 0 auto !important;
        text-align: left !important;
        font-size: 11px !important;
        color: #5f6f89 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .hg-connect-wrapper .hg-members-count {
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    .hg-connect-wrapper .hg-pending-count {
        font-size: 8px !important;
        padding: 0 5px !important;
        white-space: nowrap !important;
    }

    /* ============================================================
       BOUTONS - COPY ET REACTIVATE EN BAS, CÔTE À CÔTE
       ============================================================ */
    .hg-connect-wrapper .hg-col-actions {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
        padding: 0 !important;
        margin-top: 4px !important;
        justify-content: flex-start !important;
    }

    .hg-connect-wrapper .hg-btn {
        font-size: 10px !important;
        height: 28px !important;
        min-height: 28px !important;
        padding: 2px 10px !important;
        flex: 1 1 auto !important;
        min-width: 60px !important;
        max-width: 48% !important;
        justify-content: center !important;
        border-radius: 4px !important;
        white-space: nowrap !important;
    }

    .hg-connect-wrapper .hg-btn-copy {
        flex: 1 1 auto !important;
        min-width: 60px !important;
        max-width: 48% !important;
    }

    .hg-connect-wrapper .hg-btn-reactivate {
        font-size: 10px !important;
        height: 28px !important;
        min-height: 28px !important;
        padding: 2px 10px !important;
        flex: 1 1 auto !important;
        min-width: 60px !important;
        max-width: 48% !important;
        justify-content: center !important;
    }

    /* Les autres boutons (View, Add) aussi en bas */
    .hg-connect-wrapper .hg-btn-view,
    .hg-connect-wrapper .hg-btn-add {
        flex: 1 1 auto !important;
        min-width: 60px !important;
        max-width: 48% !important;
    }

    /* État vide */
    .hg-connect-wrapper .hg-empty-state {
        padding: 30px 16px !important;
    }

    .hg-connect-wrapper .hg-empty-icon {
        font-size: 40px !important;
    }

    .hg-connect-wrapper .hg-empty-message {
        font-size: 14px !important;
    }

    /* Résumé */
    .hg-connect-wrapper .hg-summary-box {
        gap: 6px !important;
        padding: 8px 12px !important;
        font-size: 11px !important;
        flex-wrap: wrap !important;
        margin-top: 12px !important;
        border-radius: 6px !important;
    }

    .hg-connect-wrapper .hg-summary-box .hg-summary-item {
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    .hg-connect-wrapper .hg-summary-label {
        font-size: 11px !important;
    }
}

/* --- Petit téléphone (max-width: 480px) --- */
@media (max-width: 480px) {

    .hg-connect-wrapper .hg-status-filter {
        gap: 4px !important;
        margin: 8px 0 10px !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-btn {
        font-size: 10px !important;
        padding: 3px 10px !important;
        min-height: 28px !important;
        border-radius: 12px !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-count {
        font-size: 8px !important;
        padding: 0 5px !important;
    }

    .hg-connect-wrapper .hg-community-row {
        padding: 8px 10px !important;
        gap: 4px 6px !important;
    }

    .hg-connect-wrapper .hg-col-community {
        flex: 1 1 25% !important;
        min-width: 80px !important;
    }

    .hg-connect-wrapper .hg-community-name {
        font-size: 12px !important;
    }

    .hg-connect-wrapper .hg-indicator {
        font-size: 8px !important;
        padding: 1px 5px !important;
    }

    .hg-connect-wrapper .hg-status-badge-small {
        font-size: 9px !important;
    }

    .hg-connect-wrapper .hg-status-badge {
        font-size: 9px !important;
        padding: 1px 6px !important;
    }

    .hg-connect-wrapper .hg-col-members {
        font-size: 10px !important;
        gap: 3px !important;
    }

    .hg-connect-wrapper .hg-members-count {
        font-size: 10px !important;
    }

    .hg-connect-wrapper .hg-pending-count {
        font-size: 7px !important;
        padding: 0 4px !important;
    }

    .hg-connect-wrapper .hg-btn {
        font-size: 9px !important;
        height: 26px !important;
        min-height: 26px !important;
        padding: 1px 6px !important;
        min-width: 50px !important;
        max-width: 48% !important;
        border-radius: 3px !important;
    }

    .hg-connect-wrapper .hg-btn-copy {
        min-width: 50px !important;
        max-width: 48% !important;
    }

    .hg-connect-wrapper .hg-btn-reactivate {
        font-size: 9px !important;
        height: 26px !important;
        min-height: 26px !important;
        padding: 1px 6px !important;
        min-width: 50px !important;
        max-width: 48% !important;
    }

    .hg-connect-wrapper .hg-btn-view,
    .hg-connect-wrapper .hg-btn-add {
        min-width: 50px !important;
        max-width: 48% !important;
    }

    .hg-connect-wrapper .hg-empty-state {
        padding: 24px 12px !important;
    }

    .hg-connect-wrapper .hg-empty-icon {
        font-size: 36px !important;
    }

    .hg-connect-wrapper .hg-empty-message {
        font-size: 13px !important;
    }

    .hg-connect-wrapper .hg-summary-box {
        gap: 4px !important;
        padding: 6px 10px !important;
        font-size: 10px !important;
    }

    .hg-connect-wrapper .hg-summary-box .hg-summary-item {
        font-size: 10px !important;
    }

    .hg-connect-wrapper .hg-summary-label {
        font-size: 10px !important;
    }
}

/* --- Très petit téléphone (max-width: 360px) --- */
@media (max-width: 360px) {

    .hg-connect-wrapper .hg-status-filter {
        gap: 3px !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-btn {
        font-size: 9px !important;
        padding: 2px 8px !important;
        min-height: 24px !important;
        border-radius: 10px !important;
    }

    .hg-connect-wrapper .hg-status-filter .hg-filter-count {
        font-size: 7px !important;
        padding: 0 4px !important;
    }

    .hg-connect-wrapper .hg-community-row {
        padding: 6px 8px !important;
        gap: 3px 5px !important;
    }

    .hg-connect-wrapper .hg-col-community {
        flex: 1 1 20% !important;
        min-width: 60px !important;
    }

    .hg-connect-wrapper .hg-community-name {
        font-size: 11px !important;
    }

    .hg-connect-wrapper .hg-indicator {
        font-size: 7px !important;
        padding: 1px 4px !important;
    }

    .hg-connect-wrapper .hg-status-badge-small {
        font-size: 8px !important;
    }

    .hg-connect-wrapper .hg-status-badge {
        font-size: 8px !important;
        padding: 1px 5px !important;
    }

    .hg-connect-wrapper .hg-col-members {
        font-size: 9px !important;
        gap: 2px !important;
    }

    .hg-connect-wrapper .hg-members-count {
        font-size: 9px !important;
    }

    .hg-connect-wrapper .hg-pending-count {
        font-size: 7px !important;
        padding: 0 3px !important;
    }

    .hg-connect-wrapper .hg-btn {
        font-size: 8px !important;
        height: 24px !important;
        min-height: 24px !important;
        padding: 1px 5px !important;
        min-width: 40px !important;
        max-width: 48% !important;
        border-radius: 3px !important;
    }

    .hg-connect-wrapper .hg-btn-copy {
        min-width: 40px !important;
        max-width: 48% !important;
    }

    .hg-connect-wrapper .hg-btn-reactivate {
        font-size: 8px !important;
        height: 24px !important;
        min-height: 24px !important;
        padding: 1px 5px !important;
        min-width: 40px !important;
        max-width: 48% !important;
    }

    .hg-connect-wrapper .hg-btn-view,
    .hg-connect-wrapper .hg-btn-add {
        min-width: 40px !important;
        max-width: 48% !important;
    }

    .hg-connect-wrapper .hg-empty-state {
        padding: 20px 10px !important;
    }

    .hg-connect-wrapper .hg-empty-icon {
        font-size: 32px !important;
    }

    .hg-connect-wrapper .hg-empty-message {
        font-size: 12px !important;
    }

    .hg-connect-wrapper .hg-summary-box {
        gap: 3px !important;
        padding: 5px 8px !important;
        font-size: 9px !important;
    }

    .hg-connect-wrapper .hg-summary-box .hg-summary-item {
        font-size: 9px !important;
    }

    .hg-connect-wrapper .hg-summary-label {
        font-size: 9px !important;
    }
}
