/* === Layout 2 rangées par schéma (CSS Grid) — UX compacte, moins de scroll vertical === */
        .aiforya-sm-schemas-table { display:block; width:100%; border:none; }
        .aiforya-sm-schemas-table thead, .aiforya-sm-schemas-table tbody { display:block; width:100%; }
        .aiforya-sm-schemas-table thead tr,
        .aiforya-sm-schemas-table tbody tr {
            display:grid;
            grid-template-columns: 36px minmax(0, 2.6fr) minmax(150px, 1.1fr) minmax(120px, 0.9fr);
            grid-template-rows: auto;
            gap:6px 14px;
            align-items:center;
            padding:10px 12px;
            border-bottom:1px solid rgba(255,255,255,0.06);
            background:transparent !important;
        }
        .aiforya-sm-schemas-table thead tr { background:rgba(255,255,255,0.03) !important; border-bottom:1px solid rgba(255,255,255,0.10); }
        .aiforya-sm-schemas-table thead th { display:block; padding:6px 0 !important; background:transparent !important; border:none !important; font-size:12px; text-transform:uppercase; letter-spacing:0.04em; color:#94a3b8; font-weight:600; }
        .aiforya-sm-schemas-table tbody tr { grid-template-rows: auto auto; padding:14px 12px; }
        .aiforya-sm-schemas-table tbody tr:hover { background:rgba(99,102,241,0.04) !important; }
        .aiforya-sm-schemas-table tbody td,
        .aiforya-sm-schemas-table tbody th.check-column {
            display:block; padding:0 !important; border:none !important; background:transparent !important; line-height:1.4;
        }
        .aiforya-sm-schemas-table tbody tr td.column-actions {
            grid-column: 1 / -1;
            grid-row: 2;
            margin-top:4px;
            padding-top:10px !important;
            border-top:1px dashed rgba(255,255,255,0.06) !important;
        }
        /* No-items row : ne pas afficher en grid */
        .aiforya-sm-schemas-table tbody tr:has(.no-items) { display:block; padding:18px; text-align:center; color:#94a3b8; }
        .aiforya-sm-schemas-table tbody td.no-items { display:block; padding:0 !important; }

        /* Le selector :has est récent — fallback safe : si non supporté, le no-items reste en grid mais la cell colspan masque le reste */
        .aiforya-sm-schemas-table tbody tr td[colspan] { grid-column: 1 / -1; padding:18px !important; text-align:center; color:#94a3b8; }

        /* Actions ligne par ligne — 4 boutons répartis sur toute la largeur, centrés */
        .aiforya-sm-actions {
            display:grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap:8px;
            width:100%;
        }
        .aiforya-sm-action {
            display:inline-flex !important;
            align-items:center;
            justify-content:center;
            gap:6px;
            padding:7px 8px !important;
            line-height:1.3 !important;
            font-size:12.5px !important;
            border-radius:8px !important;
            width:100%;
            text-align:center;
            min-height:32px;
        }
        .aiforya-sm-action .dashicons { font-size:14px; width:14px; height:14px; line-height:14px; }

        @media (max-width:780px) {
            .aiforya-sm-schemas-table thead tr,
            .aiforya-sm-schemas-table tbody tr {
                grid-template-columns: 32px 1fr;
                grid-template-rows: auto;
            }
            .aiforya-sm-schemas-table thead tr th:not(.column-cb):not(.column-title) { display:none; }
            .aiforya-sm-schemas-table tbody tr td.column-type,
            .aiforya-sm-schemas-table tbody tr td.column-post-type {
                grid-column: 1 / -1;
                margin-top:6px;
            }
            .aiforya-sm-schemas-table tbody tr td.column-actions { grid-row:auto; }
            .aiforya-sm-actions { grid-template-columns: repeat(2, 1fr); }
        }
        .aiforya-sm-action-view { background:rgba(99,102,241,0.10) !important; border-color:rgba(99,102,241,0.4) !important; color:#c7d2fe !important; }
        .aiforya-sm-action-view:hover { background:rgba(99,102,241,0.18) !important; border-color:rgba(99,102,241,0.55) !important; }
        .aiforya-sm-action-google { background:rgba(74,222,128,0.10) !important; border-color:rgba(74,222,128,0.4) !important; color:#bbf7d0 !important; }
        .aiforya-sm-action-google:hover { background:rgba(74,222,128,0.18) !important; border-color:rgba(74,222,128,0.55) !important; }
        .aiforya-sm-action-regen { background:rgba(251,191,36,0.10) !important; border-color:rgba(251,191,36,0.4) !important; color:#fde68a !important; }
        .aiforya-sm-action-regen:hover { background:rgba(251,191,36,0.18) !important; border-color:rgba(251,191,36,0.55) !important; }
        .aiforya-sm-action-delete { background:rgba(239,68,68,0.10) !important; border-color:rgba(239,68,68,0.4) !important; color:#fecaca !important; }
        .aiforya-sm-action-delete:hover { background:rgba(239,68,68,0.20) !important; border-color:rgba(239,68,68,0.6) !important; color:#fee2e2 !important; }

        /* Modal stacking + background durcis (fix doctrine wrap shell AIFORYA transform/filter) */
        #aiforya-sm-json-modal { position:fixed !important; inset:0 !important; z-index:99999 !important; display:none; isolation:isolate; }
        #aiforya-sm-json-modal.is-open { display:block !important; }
        .aiforya-sm-modal-backdrop { position:fixed !important; inset:0 !important; z-index:1; background:rgba(2,6,23,0.85); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); }
        .aiforya-sm-modal-panel { position:fixed !important; top:50%; left:50%; transform:translate(-50%, -50%); z-index:2; width:min(880px, 92vw); max-height:88vh; display:flex; flex-direction:column; background:#0f172a !important; color:#f1f5f9; border:1px solid rgba(99,102,241,0.45); border-radius:14px; box-shadow:0 24px 64px rgba(0,0,0,0.65), 0 0 0 1px rgba(99,102,241,0.20); overflow:hidden; }
        .aiforya-sm-modal-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; background:#0f172a !important; border-bottom:1px solid rgba(255,255,255,0.10); }
        .aiforya-sm-modal-head h3 { margin:0; font-size:15px; color:#f1f5f9; }
        .aiforya-sm-modal-actions { display:flex; gap:6px; }
        .aiforya-sm-modal-actions .button { background:rgba(255,255,255,0.05) !important; border-color:rgba(255,255,255,0.15) !important; color:#e2e8f0 !important; }
        .aiforya-sm-modal-actions .button:hover { background:rgba(255,255,255,0.10) !important; }
        .aiforya-sm-modal-body { padding:0; overflow:auto; flex:1 1 auto; background:#0f172a !important; }
        .aiforya-sm-json-display { margin:0; padding:18px; font-family:Menlo, Consolas, "SF Mono", monospace; font-size:12.5px; line-height:1.55; color:#e2e8f0; background:#0f172a !important; white-space:pre-wrap; word-break:break-word; max-height:calc(88vh - 70px); overflow:auto; }

        /* Confirm modal */
        .aiforya-sm-confirm-modal { position:fixed; inset:0; z-index:100000; opacity:0; transition:opacity .18s; }
        .aiforya-sm-confirm-modal.is-open { opacity:1; }
        .aiforya-sm-confirm-panel { width:min(440px, 92vw); padding:0; }
        .aiforya-sm-confirm-panel .aiforya-sm-modal-body { padding:22px 22px 8px; font-size:14px; line-height:1.5; }
        .aiforya-sm-confirm-actions { display:flex; gap:10px; justify-content:flex-end; padding:12px 18px 18px; }

        /* Toast host */
        .aiforya-sm-toast-host { position:fixed; right:24px; bottom:24px; z-index:100001; display:flex; flex-direction:column; gap:10px; pointer-events:none; }
        .aiforya-sm-toast { pointer-events:auto; min-width:240px; max-width:380px; padding:12px 16px; border-radius:10px; font-size:13px; line-height:1.45; color:#f1f5f9; background:#0f172a; border:1px solid rgba(255,255,255,0.12); box-shadow:0 12px 32px rgba(0,0,0,0.45); transform:translateX(120%); opacity:0; transition:transform .28s ease, opacity .28s ease; }
        .aiforya-sm-toast.is-visible { transform:translateX(0); opacity:1; }
        .aiforya-sm-toast--success { border-left:3px solid #4ade80; }
        .aiforya-sm-toast--error   { border-left:3px solid #f87171; }
        .aiforya-sm-toast--warning { border-left:3px solid #fbbf24; }
        .aiforya-sm-toast--info    { border-left:3px solid #60a5fa; }

        /* === Bulk toolbar === */
        .aiforya-sm-bulk-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:14px; padding:12px 14px; margin:0 0 14px 0; background:rgba(99,102,241,0.10); border:1px solid rgba(99,102,241,0.35); border-radius:10px; }
        .aiforya-sm-bulk-toolbar[hidden] { display:none; }
        .aiforya-sm-bulk-count { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:#c7d2fe; }
        .aiforya-sm-bulk-count-num { font-size:18px; color:#a5b4fc; font-weight:700; }
        .aiforya-sm-bulk-actions { display:flex; flex-wrap:wrap; gap:6px; align-items:center; flex:1 1 auto; }
        .aiforya-sm-bulk-btn { display:inline-flex !important; align-items:center; gap:5px; padding:5px 12px !important; font-size:12.5px !important; line-height:1.4 !important; border-radius:6px !important; }
        .aiforya-sm-bulk-btn .dashicons { font-size:14px; width:14px; height:14px; line-height:14px; }
        .aiforya-sm-bulk-btn--danger { background:rgba(248,113,113,0.10) !important; border-color:rgba(248,113,113,0.4) !important; color:#fecaca !important; }
        .aiforya-sm-bulk-btn--danger:hover { background:rgba(248,113,113,0.18) !important; }
        .aiforya-sm-bulk-change-type { display:inline-flex; align-items:center; gap:4px; padding-left:6px; border-left:1px solid rgba(255,255,255,0.10); margin-left:4px; }
        .aiforya-sm-bulk-type-select { background:#0f172a; color:#e2e8f0; border:1px solid rgba(255,255,255,0.15); border-radius:6px; padding:4px 8px; font-size:12.5px; max-width:160px; }

        /* check-column alignment with WP defaults */
        .aiforya-sm-schemas-table .check-column { width:32px; padding:8px 0 8px 10px; }
