/* ===========================================================================
   ÉCRAN NOTIFICATIONS (.ntf-*) — /app/notifications-parametres et /admin/notifications.
   Port de « design_handoff_notifications_parametres » (2026-10-03), qui succède à
   « design_handoff_notifications » (Design 30).

   Tuiles, bandeau et onglets viennent du gabarit (modele-erp.css §11.x). Cette feuille
   porte ce qui ne sert que cet écran : la barre onglets + recherche, la bande « cocher
   pour tous », la table REGROUPÉE PAR CATÉGORIE (un <tbody> par catégorie, sa ligne de
   tête), et ses cartes sous 1024 px — une par type, les six canaux en puces de 44 px.

   Retirés avec le port : le panneau latéral et ses sept facettes, le tri par en-tête,
   la pagination, la colonne Catégorie et son filet coloré (la catégorie est devenue
   le regroupement). Aucune couleur en dur : tout passe par les jetons --et-*.
   ========================================================================= */

/* --- Le bandeau ------------------------------------------------------------ */
.ntf-signal-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* --- La barre : onglets à gauche, recherche et destinataire à droite ------- */
.ntf-barre {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px;
    padding: 0 16px 0 0; border-bottom: 1px solid var(--et-hairline);
}
.ntf-vues { flex: 0 1 auto; border-bottom: 0; }
.ntf-recherche-bloc { display: flex; gap: 8px; flex: 1 1 360px; min-width: 0; justify-content: flex-end; padding: var(--et-criteres-py) 0; }
.ntf-recherche {
    flex: 1 1 240px; max-width: 420px; display: flex; align-items: center; gap: 8px;
    height: 44px; margin: 0; padding: 0 12px; border: 1px solid var(--et-bord-champ); background: var(--et-surface);
}
.ntf-recherche .bi { color: var(--et-muted); }
.ntf-recherche input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--et-ink); }
.ntf-recherche input:focus { outline: none; }
.ntf-recherche:focus-within { border-color: var(--et-form-blue); }
.ntf-dest-choix { height: 44px; width: auto; }

/* --- Cocher pour tous les types affichés ----------------------------------- */
.ntf-masse {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 10px 16px; background: var(--et-surface-2); border-bottom: 1px solid var(--et-hairline);
}
.ntf-masse .lbl { margin-right: 4px; font-size: 13px; font-weight: 600; color: var(--et-ink); }
.ntf-masse-btn {
    min-height: 32px; padding: 0 12px; background: var(--et-surface);
    border: 1px solid var(--et-form-border); font-size: 13px; font-weight: 600; color: var(--et-ink);
    cursor: pointer; white-space: nowrap;
}
.ntf-masse-btn:hover:not(:disabled) { border-color: var(--et-form-blue); }
.ntf-masse-btn:disabled { cursor: not-allowed; color: var(--et-inerte); }
.ntf-masse-btn.est-actif { background: var(--et-tint); border-color: var(--et-form-blue); color: var(--et-form-blue-d); }
/* Push : la case s'enregistre, aucun émetteur ne la lit — bordure pointillée, encre secondaire. */
.ntf-masse-btn.est-nondesservi { border-style: dashed; color: var(--et-muted); }

/* --- La table regroupée ---------------------------------------------------- */
.ntf-cadre { background: var(--et-surface); overflow-x: auto; }
.ntf-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ntf-table thead th {
    padding: var(--et-cellule-tete-y) 12px; background: var(--et-table-head); text-align: left; white-space: nowrap;
    font-size: 12px; font-weight: 600; color: var(--et-sur-ardoise-plein);
}
.ntf-table thead th.centre { text-align: center; padding: var(--et-cellule-tete-y) 4px; width: 52px; }
.ntf-table thead th.est-nondesservi { font-style: italic; }
.ntf-groupe-tete th {
    padding: 8px 12px; background: var(--et-surface-2); border-bottom: 1px solid var(--et-hairline);
    text-align: left; font-size: 13px; font-weight: 700; color: var(--et-ink);
}
.ntf-groupe-tete .n { font-weight: 400; color: var(--et-muted); }
.ntf-ligne > td { padding: var(--et-cellule-y) 12px; border-bottom: 1px solid var(--et-rang); color: var(--et-ink); vertical-align: middle; }
/* 44 px : la règle tactile, sous 1024 px seulement (docs/cibles-tactiles.md). Posée dès le
   bureau, elle figeait la ligne et « Compacte » n'y pouvait rien (lot AK2). */
@media (max-width: 1024px) { .ntf-ligne > td { height: 44px; } }
.ntf-ligne > td.centre { text-align: center; padding: var(--et-cellule-y) 4px; }
.ntf-ligne:hover > td { background: var(--et-survol); }
.ntf-code { font-family: var(--et-font-mono); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ntf-type .nom { font-weight: 600; }
.ntf-type .seuil { margin-left: 6px; font-size: 13px; color: var(--et-muted); white-space: nowrap; }
.ntf-regle {
    display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--et-r-pill);
    font-size: 12px; font-weight: 600; background: var(--et-neutre-bg); color: var(--et-muted); white-space: nowrap;
}
.ntf-regle.est-regle { background: var(--et-tint); color: var(--et-form-blue-d); }
.ntf-dest { font-size: 13px; white-space: nowrap; }
.ntf-table .mx-switch { display: inline-flex; }

/* Un type coupé s'éteint sans disparaître : fond doux, libellé à l'encre secondaire. */
.ntf-ligne.est-inactif > td { background: var(--et-surface-2); }
.ntf-ligne.est-inactif .nom { color: var(--et-muted); }

/* --- La case de canal (.mx-case du gabarit) -------------------------------- */
.ntf-case { display: inline-grid; vertical-align: middle; position: relative; }
.ntf-case.est-inerte { cursor: not-allowed; border-color: var(--et-hairline); background: var(--et-surface-3); }
.ntf-case.est-inerte.est-cochee { background: var(--et-repos-bord); border-color: var(--et-repos-bord); }
.ntf-case.est-nondesservi:not(.est-cochee) { border-style: dashed; }
/* Le nom du canal ne s'écrit qu'en carte : en table, la colonne le porte. */
.ntf-case-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ntf-case-lbl { color: var(--et-ink); }
.ntf-case.est-cochee:not(.est-inerte) .ntf-case-lbl { color: var(--et-sur-aplat); }

.ntf-pied {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
    padding: 10px 16px; border-top: 1px solid var(--et-hairline); font-size: 13px; color: var(--et-muted);
}
.ntf-pied .tbl-methode { padding: 0; border: 0; flex: 1 1 360px; text-align: right; }

/* --- Sous 1024 px : une carte par type -------------------------------------
   Code, libellé et destinataire en tête, l'interrupteur à droite ; les six canaux
   en puces de 44 px sous la tête, leur nom écrit dans la puce. */
@media (max-width: 1024px) {
    .ntf-barre { padding: 0; }
    .ntf-recherche-bloc { padding: var(--et-criteres-py) 16px; flex-basis: 100%; }
    .ntf-recherche { max-width: none; }
    .ntf-masse-btn { min-height: 44px; }

    .ntf-cadre { overflow-x: visible; }
    .ntf-table, .ntf-table tbody { display: block; width: 100%; }
    .ntf-table thead { display: none; }
    .ntf-groupe-tete { display: block; }
    .ntf-groupe-tete th { display: block; }
    .ntf-ligne {
        display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 6px;
        padding: 12px 16px; border-bottom: 1px solid var(--et-rang);
    }
    .ntf-ligne.est-inactif { background: var(--et-surface-2); }
    .ntf-ligne > td, .ntf-ligne > td.centre { display: block; height: auto; padding: 0; border: 0; background: none; text-align: left; }
    .ntf-ligne:hover > td { background: none; }
    .ntf-code { order: 1; flex: 1 1 calc(100% - 70px); }
    .ntf-actif { order: 2; flex: none; margin-left: auto; }
    .ntf-actif .mx-switch { min-height: 44px; align-items: center; }
    .ntf-type { order: 3; flex: 1 1 100%; }
    .ntf-type .nom { display: block; }
    .ntf-type .seuil, .ntf-type .ntf-regle { margin-left: 0; margin-right: 6px; }
    .ntf-dest { order: 4; flex: 1 1 100%; margin-bottom: 6px; color: var(--et-muted); }
    .ntf-ligne > td.ntf-canal { order: 5; flex: none; }
    .ntf-case {
        display: inline-flex; align-items: center; gap: 4px; width: auto; height: 44px; min-width: 52px;
        padding: 0 10px; justify-content: center;
    }
    .ntf-case-lbl { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: 13px; font-weight: 600; }
    .ntf-pied .tbl-methode { text-align: left; }
}
@media print {
    .ntf-masse, .ntf-barre { display: none !important; }
}
