/* Pages Jobs & Tâches planifiées (/admin/global/*) — habillage du bundle
   job-scheduler. Cible : nos templates hôtes (aj-*, cartes, macros de grille)
   + classes émises par les templates du bundle (stables au SHA épinglé de
   modules/platform-modules.ref — REVALIDER visuellement à chaque bump).
   ⚠️ Scoppé .aj-shell = UNIQUEMENT le shell du bundle (super_admin_interface/
   layout/base.html.twig). Ne JAMAIS cibler la classe « admin-shell » ici : la
   console admin classique (admin/_base.html.twig) l'utilise aussi et serait
   restylée silencieusement. */

/* — Tuiles de pilotage — */
.aj-tuiles { display: flex; gap: .8rem; margin: 0 1rem 1rem; flex-wrap: wrap; }
.aj-tuile {
    flex: 1; min-width: 130px; background: #fff; border: 1px solid var(--border, #e3e0f0);
    border-radius: 12px; padding: .7rem .9rem; box-shadow: 0 1px 3px rgba(109, 94, 252, .10);
    display: flex; flex-direction: column; gap: .1rem;
}
.aj-tuile strong { font-size: 1.35rem; color: var(--primary); font-family: 'Baloo 2', sans-serif; }
.aj-tuile span { font-size: .8rem; color: #777; }
.aj-tuile.is-ok strong { color: #1a7f4b; }
.aj-tuile.is-warn strong { color: #b26a00; }
.aj-tuile.is-ko strong { color: #c0392b; }

/* — Badges de statut (grille des jobs) — pastilles pleines (choix Philippe,
     checkpoint visuel 2026-07-07 : options B compacte + C pastilles) */
.aj-badge {
    display: inline-block; padding: .1rem .5rem; border-radius: 999px;
    font-size: .72rem; font-weight: 600; white-space: nowrap;
}
.aj-badge-ok      { background: #e6f7ed; color: #1a7f4b; }
.aj-badge-ko      { background: #fdecec; color: #c0392b; }
.aj-badge-attente { background: #fff3e0; color: #b26a00; }
.aj-badge-encours { background: #efedff; color: var(--primary); }
.aj-badge-annule  { background: #f0f0f2; color: #666; }
.aj-type { white-space: nowrap; }

/* — Badges Bootstrap émis par les templates du bundle (tâches planifiées) :
     remappés sur la même famille visuelle — */
.aj-shell .badge.bg-success { background: #e6f7ed !important; color: #1a7f4b; border-radius: 999px; }
.aj-shell .badge.bg-danger  { background: #fdecec !important; color: #c0392b; border-radius: 999px; }
.aj-shell .badge.bg-secondary { background: #f0f0f2 !important; color: #666; border-radius: 999px; }
.aj-shell .badge.bg-light-primary { background: #efedff !important; color: var(--primary); border-radius: 999px; }
.aj-shell .badge.bg-light-info { background: #e8f4fd !important; color: var(--brand, #0189d9); border-radius: 999px; }

/* — Grilles Bootstrap du bundle (row/col-*) : flex simple, sans framework — */
.aj-shell .row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.aj-shell .row > [class*="col-lg-8"], .aj-shell .row > [class*="col-xl-9"] { flex: 3; min-width: 320px; }
.aj-shell .row > [class*="col-lg-4"], .aj-shell .row > [class*="col-xl-3"] { flex: 1; min-width: 240px; }

/* — Tableaux des pages du bundle — densité COMPACTE (choix Philippe,
     checkpoint visuel 2026-07-07 : ~13 lignes par écran) — */
.aj-shell table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.aj-shell table th {
    text-align: left; color: var(--primary); border-bottom: 2px solid var(--primary);
    padding: .3rem .5rem; font-weight: 700;
}
.aj-shell table td { padding: .3rem .5rem; border-bottom: 1px solid #f0eef8; }
.aj-shell table tr:hover td { background: #faf9ff; }

/* — Filtres : les <select> émis par nos composants hôtes (global_uc_filter,
     global_tenant_filter) portent la classe `grid-filter-input`, pas un
     wrapper .grid-filter. La classe `data-model` est un attribut, non une
     classe CSS. Sélecteur adapté au markup réel. — */
.aj-shell .grid-filter-input {
    border: 1px solid var(--border, #e3e0f0); border-radius: 999px; padding: .25rem .8rem;
    background: #f3f1fc; font-size: .85rem;
}

/* — Pager (grid_pager.html.twig : .grid-pager > .btn) — */
.aj-shell .grid-pager .btn { width: auto; padding: .2rem .7rem; border-radius: 999px; }

/* — En-têtes de colonne triables (grids/_macros.html.twig : .grid-header-link) — */
.aj-shell .grid-header-link { cursor: pointer; background: none; border: none; color: var(--primary); font-weight: 700; }

/* — Boutons/icônes des pages du bundle — */
.aj-shell .btn { width: auto; }
.aj-shell svg { vertical-align: -0.15em; }

/* ============================================================
   PEAU « CONSOLE » — alignement sur les autres écrans super-admin
   ============================================================
   Décision Philippe, 2026-09-19. Jobs et Tâches planifiées ont DÉJÀ leurs
   filtres, leur tri et leur pagination — ils viennent du bundle et sont donc
   habillés en Bootstrap, pas dans la peau de la console. On les y ramène
   UNIQUEMENT par le style : ni `modules/` ni ses surcharges Twig ne bougent,
   et rien ici ne suppose autre chose que des classes déjà émises au SHA
   épinglé (REVALIDER à chaque bump de modules/platform-modules.ref).
   ⚠️ Toujours scopé `.aj-shell` : jamais `.admin-shell`, que la console
   classique utilise aussi (cf. l'avertissement en tête de fichier). */
.aj-shell {
    --aj-sans: "IBM Plex Sans", "Inter", system-ui, sans-serif;
    --aj-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --aj-line: #dfe5ee;
    font-family: var(--aj-sans);
    font-variant-numeric: tabular-nums;
}
.aj-shell h1, .aj-shell h2, .aj-shell h3, .aj-shell .card-title, .aj-shell .card-label {
    font-family: var(--aj-sans); font-weight: 600; letter-spacing: -.012em;
}
.aj-shell h1 { font-size: 1.35rem; }
.aj-shell .card-title, .aj-shell .card-label { font-size: .95rem; }
/* La tuile de pilotage reprend la mesure des tuiles de la console. */
.aj-shell .aj-tuile strong { font-family: var(--aj-mono); font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; }
.aj-shell .aj-tuile span { font-size: .68rem; }

/* — Densité de la grille du bundle : 36 px la ligne, en-têtes en capitales fines — */
.aj-shell table.table > thead th,
.aj-shell .grid-header-cell {
    height: 30px; padding: 0 .65rem;
    background: #f7f9fc; border-bottom: 1px solid var(--aj-line);
    font-size: .66rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
    color: #8590a4; white-space: nowrap;
}
.aj-shell table.table > tbody td { height: 36px; padding: .25rem .65rem; font-size: .8rem; vertical-align: middle; }
/* Identifiants, dates et compteurs : la chasse fixe, comme partout dans la console. */
.aj-shell .text-monospace, .aj-shell td.text-muted { font-family: var(--aj-mono); font-size: .75rem; }

/* — Contrôles de filtre : une seule hauteur, 30 px, comme la barre `.filters` — */
.aj-shell .form-control-sm, .aj-shell .form-select-sm, .aj-shell .grid-filter-input {
    height: 30px; padding: 0 .5rem; border: 1px solid var(--aj-line); border-radius: 6px;
    font-family: var(--aj-sans); font-size: .78rem; color: #111721; background: #fff;
}
.aj-shell .grid-filter-cell { padding: .35rem .5rem; background: #fbfcfe; }
.aj-shell .grid-filter-container { gap: .3rem; }
