/* =====================================================================
   (10/11/2026) Pages de réglages et de supervision, version épurée :
   Équipe › Réglages d'équipe, Automatisation › Supervision, Automatisations, Messages groupés, Mots interdits,
   Rôles et accès. Un en-tête de section = un titre + une ligne au plus ; les détails dans « En savoir plus ».
   Formulaires en grille alignée, unités dans le champ, rythme de 8 px, aucun tableau qui déborde.
   Chargé après v2.css (jetons de couleur) et avant mobile.css (le téléphone garde le dernier mot).
   ===================================================================== */

/* ---------- en-tête de section : titre + une ligne, action à droite ---------- */
html body .app .ux-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin: 0 0 16px; }
html body .app .ux-head > div:first-child { min-width: 0; flex: 1 1 260px; }
html body .app .ux-head .ct-h { margin: 0 !important; }
html body .app .ux-head p { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
html body .app .ux-head .ux-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
html body .app .ux-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 4px; padding-top: 20px; border-top: 1px solid var(--line); }
html body .app .ux-sub h3 { margin: 0; font-size: var(--fs-base); font-weight: 650; }
html body .app .ux-hint { margin: 0 0 12px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
html body .app .ux-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
html body .app .ux-sec .note-fold { margin-top: 8px; }

/* ---------- champs : libellé au-dessus, grille alignée ---------- */
html body .app .ux-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 20px; }
html body .app .ux-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--fg); }
html body .app .ux-f[hidden] { display: none !important; }
html body .app .ux-f > small { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }
html body .app .ux-f > :is(select, input) { width: 100%; }

/* un champ avec son unité dedans (« % », « $ », « / jour ») et, si besoin, un mot devant (« dès ») */
html body .app .ux-in { display: inline-flex; align-items: center; width: 100%; height: var(--ctl-h); border: 1px solid var(--ctl-line); border-radius: var(--ctl-r); background: var(--ctl-bg); transition: border-color .15s ease, box-shadow .15s ease; overflow: hidden; }
html body .app .ux-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
html body .app .ux-in > input { flex: 1 1 auto; min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: var(--fs-base); font-weight: 500; padding: 0 0 0 12px; font-variant-numeric: tabular-nums; }
html body .app .ux-in > input:disabled { opacity: .6; }
html body .app .ux-in > :is(i, em) { flex: none; font-style: normal; font-weight: 500; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }
html body .app .ux-in > i { padding: 0 12px 0 6px; }
html body .app .ux-in > em { padding: 0 0 0 12px; }
html body .app .ux-in > em + input { padding-left: 6px; }
html body .app .ux-in > input::-webkit-inner-spin-button, html body .app .ux-in > input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
html body .app .ux-in > input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* interrupteur (case à cocher en bascule) */
html body .app input.ux-switch { appearance: none; -webkit-appearance: none; flex: none; width: 36px !important; height: 20px !important; min-width: 36px; margin: 0; padding: 0; border: 0; border-radius: 99px; background: var(--surface-3); position: relative; cursor: pointer; transition: background .15s; }
html body .app input.ux-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s var(--ease); }
html body .app input.ux-switch:checked { background: var(--accent-btn, var(--accent)); }
html body .app input.ux-switch:checked::after { transform: translateX(16px); }
html body .app input.ux-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html body .app input.ux-switch:disabled { opacity: .5; cursor: default; }
/* une ligne de réglage : texte à gauche, interrupteur à droite */
html body .app .ux-opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
html body .app .ux-opt:first-of-type { border-top: 0; padding-top: 0; }
html body .app .ux-opt > span { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-base); font-weight: 550; }
html body .app .ux-opt > span > small { font-weight: 400; color: var(--muted); font-size: var(--fs-sm); line-height: 1.4; }

/* ---------- état vide : une icône, une phrase, une action ---------- */
html body .app .ux-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 16px; text-align: center; }
html body .app .ux-empty > svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
html body .app .ux-empty > p { margin: 0; color: var(--muted); font-size: var(--fs-base); }
html body .app .ux-empty > button { margin-top: 8px; }
html body .app .ux-calm { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: var(--fs-sm); }
html body .app .ux-calm > svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* les états vides du reste de l'appli : l'icône seule, sans cadre en pointillés */
html body .app .view :is(p.empty, div.empty)::before { border: 0 !important; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8b93' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M4 12h10M4 17h7'/%3E%3C/svg%3E") center / 22px no-repeat !important; width: 28px !important; height: 28px !important; margin: 0 auto 8px !important; border-radius: 0 !important; }

/* ---------- Réglages d'équipe ---------- */
html body .app #st-tiers { display: grid; gap: 8px; }
html body .app #st-tiers .st-tier { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr) minmax(120px, .8fr) 36px; gap: 8px; align-items: center; padding: 0; border: 0; }
html body .app #st-tiers .st-tier > input[data-k="name"] { width: 100% !important; }
html body .app #st-tiers .st-tier input { width: 100%; }
html body .app #st-tiers .pl-x { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: var(--ctl-r); background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
html body .app #st-tiers .pl-x:hover { background: var(--danger-soft); color: var(--danger); }
html body .app #st-tiers .ux-none { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
html body .app #st-people .ct-row.st .ux-in { max-width: 140px; height: var(--ctl-h-sm); }
html body .app #st-people .ct-row.st select { height: var(--ctl-h-sm) !important; min-height: var(--ctl-h-sm); max-width: 180px; }
html body .app #st-people .ct-row.st > span:first-child small { display: block; color: var(--muted); font-size: var(--fs-xs); }
html body .app #st-safety { width: 100%; min-height: 72px !important; }
html body .app .st-words { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
html body .app .st-words > span { padding: 2px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg-2, var(--fg)); font-size: var(--fs-xs); }

/* ---------- Supervision ---------- */
html body .app #view-supervision .sup-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
html body .app #view-supervision .sup-worker { flex: 1 1 320px; padding: 0; border: 0; gap: 12px; }
html body .app #view-supervision .sup-worker > i { width: 8px; height: 8px; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
html body .app #view-supervision .sup-worker.late > i { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
html body .app #view-supervision .sup-worker b { font-size: var(--fs-base); font-weight: 600; }
html body .app #view-supervision .sup-worker small { font-size: var(--fs-sm); margin-top: 2px; }
/* l'arrêt d'urgence : bouton contour rouge (plein seulement quand l'arrêt est en cours, dans le bandeau) */
html body .app #view-supervision .sup-kill { flex: none; height: var(--ctl-h); padding: 0 14px; border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line)); background: transparent; color: var(--danger); font-weight: 600; font-size: var(--fs-sm); border-radius: var(--ctl-r); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .15s, border-color .15s; }
html body .app #view-supervision .sup-kill::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 3v9M6.3 6.3a8 8 0 1 0 11.4 0'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 3v9M6.3 6.3a8 8 0 1 0 11.4 0'/%3E%3C/svg%3E") center / contain no-repeat; }
html body .app #view-supervision .sup-kill:hover { background: var(--danger-soft); border-color: var(--danger); }
html body .app #view-supervision .sup-stopped { padding: 12px 16px; border-radius: var(--r-lg); background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); font-size: var(--fs-sm); line-height: 1.5; }
html body .app #view-supervision .sup-stopped .btn-main { margin-left: auto; }

/* les compteurs : une seule bande, les zéros en retrait ; masquée quand tout est à zéro */
html body .app #view-supervision .sup-kpis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
html body .app #view-supervision .sup-kpis[hidden] { display: none; }
html body .app #view-supervision .sup-k { border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; transition: background .15s; }
html body .app #view-supervision .sup-k:first-child { border-left: 0; }
html body .app #view-supervision .sup-k:hover { background: var(--surface-2); }
html body .app #view-supervision .sup-k b { font-size: 20px; font-weight: 650; line-height: 1.2; color: var(--fg); }
html body .app #view-supervision .sup-k small { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .app #view-supervision .sup-k.zero b { color: var(--muted-2, var(--muted)); font-weight: 500; }
html body .app #view-supervision .sup-k:is(.intervention, .failed):not(.zero) b { color: var(--danger); }
html body .app #view-supervision .sup-k.waiting:not(.zero) b { color: var(--warn); }
html body .app #view-supervision .sup-k.on { background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); border-color: var(--line); }
@media (max-width: 1100px) { html body .app #view-supervision .sup-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } html body .app #view-supervision .sup-k:nth-child(4n + 1) { border-left: 0; } html body .app #view-supervision .sup-k:nth-child(n + 5) { border-top: 1px solid var(--line); } }

/* pastilles de statut (couleurs du thème, clair et sombre) */
html body .app #view-supervision .sup-st { font-size: var(--fs-xs); font-weight: 600; padding: 2px 8px; line-height: 1.5; background: var(--surface-3); color: var(--fg-2, var(--fg)); }
html body .app #view-supervision .sup-st.active { background: var(--ok-soft); color: var(--ok); }
html body .app #view-supervision .sup-st.scheduled { background: color-mix(in srgb, #0ea5e9 14%, transparent); color: #38bdf8; }
html[data-theme="light"] body .app #view-supervision .sup-st.scheduled { color: #0369a1; }
html body .app #view-supervision .sup-st.running { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
html body .app #view-supervision .sup-st.waiting { background: var(--warn-soft); color: var(--warn); }
html body .app #view-supervision .sup-st:is(.suspended, .done) { background: var(--surface-3); color: var(--muted); }
html body .app #view-supervision .sup-st:is(.intervention, .failed) { background: var(--danger-soft); color: var(--danger); }

/* filtres des automatisations : compacts, à droite du titre */
html body .app #view-supervision .sup-filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
html body .app #view-supervision .sup-filters[hidden] { display: none; }
html body .app #view-supervision .sup-filters select { height: var(--ctl-h-sm) !important; min-height: var(--ctl-h-sm); font-size: var(--fs-sm); width: auto; }
html body .app #view-supervision .sup-tr { gap: 16px; }
html body .app #view-supervision .sup-tr > span { min-width: 0; }
html body .app #view-supervision .sup-tr b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .app #view-supervision .sup-tr small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }

/* à traiter */
html body .app #view-supervision .sup-job { gap: 12px; padding: 12px 0; font-size: var(--fs-sm); }
html body .app #view-supervision .sup-job:first-child { border-top: 0; padding-top: 0; }

/* créatrices : une ligne par créatrice, chaque réglage avec son libellé */
html body .app #view-supervision .sup-crs { display: grid; gap: 0; }
html body .app #view-supervision .sup-cr { display: grid; grid-template-columns: minmax(190px, 1.4fr) 150px 210px 120px minmax(160px, 1fr) 140px; gap: 16px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
html body .app #view-supervision .sup-cr:first-child { border-top: 0; padding-top: 0; }
html body .app #view-supervision .sup-cr-id { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
html body .app #view-supervision .sup-cr-id > div { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
html body .app #view-supervision .sup-cr-id b { font-size: var(--fs-base); font-weight: 600; }
html body .app #view-supervision .sup-cr-id small { color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; }
html body .app #view-supervision .sup-cr .ux-f > span { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); text-transform: none; }
html body .app #view-supervision .sup-cr select, html body .app #view-supervision .sup-cr .ux-in { height: var(--ctl-h-sm) !important; min-height: var(--ctl-h-sm); font-size: var(--fs-sm); }
html body .app #view-supervision .sup-hours { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
html body .app #view-supervision .sup-hours > input { flex: 1 1 0; min-width: 0; width: auto !important; height: var(--ctl-h-sm) !important; min-height: var(--ctl-h-sm); padding: 0 8px !important; font-size: var(--fs-sm); }
html body .app #view-supervision .sup-hours > i { font-style: normal; color: var(--muted); font-size: var(--fs-xs); }
html body .app #view-supervision .sup-cr .ux-f > small { font-size: var(--fs-xs); }
html body .app #view-supervision .sup-auth { display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-sm); }
html body .app #view-supervision .sup-auth label { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
html body .app #view-supervision .sup-auth > small { color: var(--muted); font-size: var(--fs-xs); }
html body .app #view-supervision .sup-cr .sup-acts { align-self: center; }
html body .app #view-supervision .sup-pfs { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
html body .app #view-supervision .sup-pfs > span { color: var(--muted); }
html body .app #view-supervision .sup-pfs label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
@media (max-width: 1200px) and (min-width: 761px) {
  html body .app #view-supervision .sup-cr { grid-template-columns: minmax(150px, 1fr) 150px 200px 110px; }
  html body .app #view-supervision .sup-cr > .sup-auth { grid-column: 2 / 4; }
  html body .app #view-supervision .sup-cr > .sup-acts { grid-column: 4; justify-content: flex-end; }
}

/* journal */
html body .app #view-supervision .sup-events { gap: 0; max-height: 360px; }
html body .app #view-supervision .sup-ev { display: grid; grid-template-columns: 84px auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0; font-size: var(--fs-sm); }
html body .app #view-supervision .sup-ev:first-child { border-top: 0; }
html body .app #view-supervision .sup-ev > small { font-variant-numeric: tabular-nums; font-size: var(--fs-xs); }
html body .app #view-supervision .sup-ev > span:last-child { min-width: 0; overflow-wrap: anywhere; }
html body .app #view-supervision .sup-ev:not(:has(.sup-st)) { grid-template-columns: 84px minmax(0, 1fr); }

/* ce que chaque plateforme permet : replié par défaut */
html body .app #view-supervision .sup-capcard > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
html body .app #view-supervision .sup-capcard > summary::-webkit-details-marker { display: none; }
html body .app #view-supervision .sup-capcard > summary .ct-h { margin: 0 !important; }
html body .app #view-supervision .sup-capcard > summary small { color: var(--muted); font-size: var(--fs-sm); }
html body .app #view-supervision .sup-capcard > summary::after { content: ""; margin-left: auto; width: 16px; height: 16px; background: var(--muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .15s; }
html body .app #view-supervision .sup-capcard[open] > summary::after { transform: rotate(180deg); }
html body .app #view-supervision .sup-capcard[open] > summary { margin-bottom: 16px; }
html body .app #view-supervision .sup-cap { margin: 0 0 16px; }
html body .app #view-supervision .sup-cap:last-child { margin-bottom: 0; }
html body .app #view-supervision .sup-cap h4 { font-size: var(--fs-base); margin: 0 0 8px; }
html body .app #view-supervision .sup-cap td { padding: 8px; font-size: var(--fs-sm); border-top-color: var(--line); }
html body .app #view-supervision .sup-cap td:first-child { padding-left: 0; width: 34%; }

/* ---------- Automatisations ---------- */
html body .app #au-alerts-card.au-quiet .ux-calm { margin-top: 4px; }

/* ---------- Rôles et accès : l'intro en une ligne ---------- */
html body .app #view-roles .rl-lead, html body .app .rl-lead { margin: 0 0 12px; color: var(--muted); font-size: var(--fs-sm); }

/* ---------- téléphone ---------- */
@media (max-width: 760px) {
  html body .app .ux-grid { grid-template-columns: 1fr; gap: 16px; }
  html body .app .ux-in > input { font-size: 16px; }
  html body .app .ux-in { height: 44px; }
  html body .app .ux-head { margin-bottom: 12px; }
  html body .app .ux-foot > .btn-main { flex: 1; }
  html body .app input.ux-switch { width: 44px !important; height: 26px !important; min-width: 44px; }
  html body .app input.ux-switch::after { width: 20px; height: 20px; }
  html body .app input.ux-switch:checked::after { transform: translateX(18px); }
  html body .app #st-tiers .st-tier { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
  html body .app #st-tiers .st-tier > input[data-k="name"] { grid-column: 1 / -1; }
  html body .app #st-tiers .pl-x { width: 44px; height: 44px; }
  html body .app #st-people .ct-row.st .ux-in { max-width: none; height: 44px; }

  html body .app #view-supervision .sup-head { gap: 12px; }
  html body .app #view-supervision .sup-kill { width: 100%; justify-content: center; height: 44px; }
  html body .app #view-supervision .sup-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html body .app #view-supervision .sup-k { padding: 10px 8px; }
  html body .app #view-supervision .sup-k b { font-size: 17px; }
  html body .app #view-supervision .sup-k small { white-space: normal; line-height: 1.25; }
  html body .app #view-supervision .sup-filters { width: 100%; justify-content: stretch; }
  html body .app #view-supervision .sup-filters select { flex: 1 1 140px; height: 44px !important; }
  html body .app #view-supervision .sup-cr { grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 0; }
  html body .app #view-supervision .sup-cr > :is(.sup-cr-id, .sup-hours-f, .sup-auth, .sup-acts) { grid-column: 1 / -1; }
  html body .app #view-supervision .sup-cr select, html body .app #view-supervision .sup-cr .ux-in, html body .app #view-supervision .sup-hours > input { height: 44px !important; font-size: 16px; }
  html body .app #view-supervision .sup-cr .sup-acts { justify-content: flex-start; }
  html body .app #view-supervision .sup-cr .sup-acts > button { flex: 1; min-height: 44px; }
  html body .app #view-supervision .sup-ev { grid-template-columns: auto minmax(0, 1fr); row-gap: 4px; }
  html body .app #view-supervision .sup-ev > small { grid-column: 1 / -1; }
  html body .app #view-supervision .sup-cap td { display: block; width: auto !important; padding: 2px 0; border: 0; }
  html body .app #view-supervision .sup-cap tr { display: block; padding: 8px 0; border-top: 1px solid var(--line); }
}
html body .app #au-rules-card:has(.ux-empty) .au-thead { display: none !important; }
/* passes de finition : le champ intérieur d'un .ux-in sans son propre cadre ; l'interrupteur sans la coche des cases ; une ligne de réglage pleine largeur */
html body .app .ux-in > input.ui-bare { border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; height: 100% !important; min-height: 0 !important; outline: 0 !important; }
html body .app .ux-in > em + input.ui-bare { padding-left: 6px !important; }
html body .app input.ux-switch::before { display: none !important; content: none !important; }
html body .app input.ux-switch:checked { border-color: transparent; }
html body .app label.ux-opt { display: flex !important; width: 100%; }
html body .app .ux-grid.ux-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { html body .app .ux-grid.ux-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { html body .app .ux-grid.ux-3 { grid-template-columns: 1fr; } }
html body .app #view-supervision .sup-cr > .sup-acts { justify-content: flex-end; }
@media (max-width: 760px) {
  /* téléphone : Mode et Limite côte à côte, puis les horaires, les options et les boutons */
  html body .app #view-supervision .sup-cr > :is(.sup-hours-f, .sup-auth, .sup-acts) { order: 2; }
  html body .app #view-supervision .sup-cr > .sup-cr-id { order: -1; }
  html body .app #view-supervision .sup-pfs > span { flex-basis: 100%; }
}
/* Rôles et accès : chaque droit sur une grille (interrupteur, libellé, « hérité » toujours aligné à droite) */
html body .app #rl-list label.rl2-perm { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto auto; width: 100%; gap: 8px 12px; }
html body .app #rl-list .rl2-perm > .rl2-tag { justify-self: end; white-space: nowrap; }
/* liste des automatisations : colonnes fixes (les pastilles de statut tombent sous leur titre), créatrice et plateforme sur une ligne */
@media (min-width: 761px) {
  html body .app #view-supervision .sup-tr { grid-template-columns: minmax(0, 1.4fr) 130px 170px minmax(0, 2fr) 170px; }
  html body .app #view-supervision .sup-tr > span:nth-child(2) { display: flex; align-items: center; gap: 8px; min-width: 0; }
  html body .app #view-supervision .sup-tr > span:nth-child(2) > small { margin: 0; }
  html body .app #view-supervision .sup-k small { white-space: normal; line-height: 1.3; }
}
/* téléphone : une automatisation = une carte compacte (titre et statut sur la première ligne, créatrice, raison, actions) */
@media (max-width: 760px) {
  html body .app #view-supervision .sup-filters { display: grid; grid-template-columns: 1fr; gap: 8px; }
  html body .app #view-supervision .sup-filters[hidden] { display: none; }
  html body .app #view-supervision .sup-filters select { width: 100%; }
  html body .app .view#view-supervision .sup-table.m-cards > .vai-tr:not(.th) { grid-template-columns: minmax(0, 1fr) auto !important; gap: 8px 12px !important; padding: 12px 14px !important; }
  html body .app .view#view-supervision .sup-table.m-cards > .vai-tr:not(.th) > :nth-child(1) { grid-column: 1 !important; grid-row: 1; display: block !important; }
  html body .app .view#view-supervision .sup-table.m-cards > .vai-tr:not(.th) > :nth-child(1) b { white-space: normal; }
  html body .app .view#view-supervision .sup-table.m-cards > .vai-tr:not(.th) > :nth-child(3) { grid-column: 2; grid-row: 1; justify-self: end; }
  html body .app .view#view-supervision .sup-table.m-cards > .vai-tr:not(.th) > :nth-child(2) { grid-column: 1 / -1; display: flex !important; align-items: center; gap: 8px; color: var(--fg-2, var(--fg)); font-size: var(--fs-sm); }
  html body .app .view#view-supervision .sup-table.m-cards > .vai-tr:not(.th) > :nth-child(2) > small { margin: 0; }
  html body .app .view#view-supervision .sup-table.m-cards > .vai-tr:not(.th) > :nth-child(4) { grid-column: 1 / -1; font-size: var(--fs-sm); }
  html body .app .view#view-supervision .sup-table.m-cards > .vai-tr:not(.th) > :nth-child(5) { grid-column: 1 / -1; justify-self: end; }
  html body .app .view#view-supervision .sup-table.m-cards > .vai-tr:not(.th) > :nth-child(5):empty { display: none !important; }
  html body .app .view#view-supervision .sup-table.m-cards [data-l]::before { display: none !important; }
  html body .app #view-supervision .sup-job { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  html body .app #view-supervision .sup-job > .sup-st { justify-self: start; }
  html body .app #view-supervision .sup-job .sup-acts { justify-content: flex-start; }
  html body .app #view-supervision .sup-job .sup-acts > button { flex: 1; min-height: 44px; }
}
@media (max-width: 760px) { html body .app .view#view-supervision .sup-table.m-cards > .vai-tr:not(.th) > .sup-why:has(> .sup-none:only-child) { display: none !important; } }
/* Rôles et accès : les groupes de droits ne débordent plus du panneau sur un écran étroit ; interrupteurs sans la coche des cases */
html body .app #rl-list .rl2-groups { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
html body .app #rl-list input.rl2-sw::before { display: none !important; content: none !important; }
@media (max-width: 760px) {
  html body .app #rl-list input.rl2-sw::after { top: 3px; left: 3px; width: 22px; height: 22px; }
  html body .app #rl-list input.rl2-sw:checked::after { transform: translateX(20px); }
  html body .app #rl-list .rl2-group { padding: 10px; }
}

/* (10/11/2026) Telegram > Canaux : le bloc des arrivees/liens passe sous le canal (pleine largeur), le nom ne se tasse plus */
html body .app .tg-item { flex-wrap: wrap; row-gap: 10px; }
html body .app .tg-item > .tg-k { flex: 1 1 280px; }
html body .app .tg-item > .acts { order: 2; }
html body .app .tg-item > .tg-chst { order: 3; flex: 1 1 100%; margin: 0; padding: 10px 0 0 48px; border-top: 1px solid var(--line); }
html body .app .tg-item .tg-k b .tg-pill { white-space: nowrap; }
html body .app .tg-item .tg-k small .tg-pill { white-space: nowrap; }
@media (max-width: 760px) { html body .app .tg-item > .tg-chst { padding-left: 0; } }

/* (10/11/2026) bandeau « cette page concerne toute l'agence » : toute la largeur, meme dans une page en grille (Mots interdits) */
html body .app .ctx-agency { grid-column: 1 / -1; }

/* (10/11/2026) Rôles et accès : on clique sur un membre, puis sur un rôle (cartes), on coche ses créatrices ;
   les droits un par un sont repliés sous « Ajuster les droits un par un » */
html body .app #rl-list .rl3-top { display: flex; align-items: center; gap: 12px; }
html body .app #rl-list .rl3-av { width: 40px; height: 40px; font-size: 16px; }
html body .app #rl-list .rl3-top h3 { margin: 0; font-size: 18px; }
html body .app #rl-list .rl3-sec { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
html body .app #rl-list .rl3-sec > b { font-size: 13.5px; }
html body .app #rl-list .rl3-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 8px; margin-top: 4px; }
html body .app #rl-list .rl3-role { display: grid; gap: 3px; align-content: start; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, transparent); color: var(--fg); cursor: pointer; transition: border-color .12s, background .12s; }
html body .app #rl-list .rl3-role:hover { border-color: var(--line-2, var(--line)); background: var(--surface-3, var(--surface-2)); }
html body .app #rl-list .rl3-role[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
html body .app #rl-list .rl3-role b { font-size: 14px; }
html body .app #rl-list .rl3-role small { color: var(--fg-2, var(--muted)); font-size: 12px; line-height: 1.35; }
html body .app #rl-list .rl3-role em { font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
html body .app #rl-list .rl3-role[aria-checked="true"] em { color: var(--accent); }
html body .app #rl-list .rl3-new { border-style: dashed; background: transparent; }
html body .app #rl-list .rl3-doms { display: flex; flex-wrap: wrap; gap: 6px; }
html body .app #rl-list .rl3-dom { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
html body .app #rl-list .rl3-dom.on { color: var(--fg); border-color: var(--line-2, var(--line)); background: var(--surface-2, transparent); }
html body .app #rl-list .rl3-dom em { font-style: normal; font-size: 11.5px; color: var(--muted); }
html body .app #rl-list .rl3-adv { margin-top: 4px; }
html body .app #rl-list .rl3-adv > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--fg-2, var(--fg)); padding: 6px 0; }
html body .app #rl-list .rl3-adv[open] > summary { margin-bottom: 8px; }
html body .app #rl-list .rl3-cu { margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600; }
