/* PSC Gestion — Tickets (tickets.js) : compléments aux classes sv-* de suivi.css (même charte). */
.app-tickets { --sv-blue: #0009E4; --sv-crit: #B3261E;
  --sv-retard-bg: #FBE3E1; --sv-retard-fg: #8C1D18; --sv-bientot-bg: #FFF0D4; --sv-bientot-fg: #8A5300; --sv-ok-bg: #DBF0E2; --sv-ok-fg: #1C6A3A;
  --sv-info-bg: #E2ECFB; --sv-info-fg: #1F4F8A; --sv-neutre-bg: #E5E6F8; --sv-neutre-fg: #4A4E7D;
  display: block; min-height: calc(100vh - 48px); background: var(--bg, #F2F3FC); color: var(--ink, #0C0E3D); font-family: 'Public Sans', system-ui, sans-serif; }
:root[data-theme="dark"] .app-tickets { --sv-retard-bg: #3D1714; --sv-retard-fg: #FFB4AB; --sv-bientot-bg: #3A2C10; --sv-bientot-fg: #F1C67A;
  --sv-ok-bg: #12321F; --sv-ok-fg: #8FD6A8; --sv-info-bg: #1B2C4A; --sv-info-fg: #A9C8F5; --sv-neutre-bg: #1C1F40; --sv-neutre-fg: #A4A8D2; --sv-crit: #FF8A80; }
.tk-band-t { display: flex; gap: 14px; align-items: center; padding-bottom: 14px; }
.tk-band-t > div:nth-child(2) { flex: 1; min-width: 0; }
.tk-cloche { position: relative; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.tk-cloche i { font-style: normal; background: #fff; color: var(--sv-blue); border-radius: 999px; font-size: 11.5px; padding: 1px 7px; font-weight: 800; }
.tk-row { grid-template-columns: 120px 118px minmax(0, 1.6fr) 150px minmax(0, 1fr); }
.tk-id { font: 700 12.5px ui-monospace, Menlo, Consolas, monospace; color: var(--muted, #4A4E7D); }
.tk-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.tk-tag { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--sv-neutre-bg); color: var(--sv-neutre-fg); font-weight: 600; }
.tk-dlg { width: min(1100px, 97vw); }
.tk-fiche { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.tk-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tk-side { display: flex; flex-direction: column; gap: 10px; background: var(--sunken, #F7F7FE); border-radius: 12px; padding: 12px; align-self: start; }
.tk-bloc { border: 1px solid var(--line, #D3D5F0); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.tk-bloc h3 { margin: 0; font: 700 14px 'Exo 2', 'Public Sans', sans-serif; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tk-desc { white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; }
.tk-com { border-left: 3px solid var(--line, #D3D5F0); padding: 4px 0 4px 10px; }
.tk-com b { font-size: 13px; } .tk-com span { color: var(--muted, #4A4E7D); font-size: 12px; margin-left: 6px; }
.tk-com p { margin: 4px 0 0; white-space: pre-wrap; font-size: 14px; }
.tk-ligne { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.tk-ligne .sv-f { flex: 1; min-width: 140px; }
.tk-st { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line, #D3D5F0); font-size: 13.5px; }
.tk-st:last-child { border-bottom: 0; }
.tk-st.fait > span:first-of-type { text-decoration: line-through; color: var(--muted, #4A4E7D); }
.tk-hist { font-size: 12.5px; color: var(--muted, #4A4E7D); display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; }
.tk-etoiles button { font-size: 22px; background: none; border: 0; cursor: pointer; color: #C9A227; padding: 0 2px; }
.tk-mini { font-size: 12px; color: var(--muted, #4A4E7D); }
.tk-tab { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tk-tab th, .tk-tab td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line, #D3D5F0); vertical-align: top; }
.tk-tab input[type=text], .tk-tab select, .tk-tab textarea { font: inherit; font-size: 13.5px; padding: 5px 8px; border: 1px solid var(--line, #D3D5F0); border-radius: 7px; background: var(--surface, #fff); color: var(--ink, #0C0E3D); width: 100%; min-width: 0; }
.tk-art { border: 1px solid var(--line, #D3D5F0); border-radius: 10px; padding: 10px 14px; }
.tk-art summary { cursor: pointer; font-weight: 700; }
.tk-art div { white-space: pre-wrap; margin-top: 8px; font-size: 14px; line-height: 1.55; }
@media (max-width: 900px) {
  .tk-fiche { grid-template-columns: 1fr; }
  .tk-row { grid-template-columns: minmax(0, 1fr) auto; }
}

/* contenu de l’onglet : même espacement que les blocs de PSC Gestion (tuiles, listes) */
#tkCorps { display: flex; flex-direction: column; gap: 16px; }

/* Vue d'ensemble */
.tk-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 18px 20px; }
.tk-tete h2 { margin: 0; font: 700 20px/1.25 'Exo 2', 'Public Sans', sans-serif; }
.tk-tete p { margin: 4px 0 0; color: var(--muted, #4A4E7D); font-size: 14px; }
.tk-ks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.tk-k { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-width: 0; padding: 14px 16px; border-radius: 14px; cursor: pointer; font: inherit;
  background: var(--surface, #fff); color: var(--muted, #4A4E7D); border: 1px solid var(--line, #D3D5F0); border-left: 4px solid var(--sv-blue); }
.tk-k:hover { border-color: var(--sv-blue); }
.tk-k > span { font-size: 13px; font-weight: 600; }
.tk-k b { font: 800 26px/1.15 'Exo 2', 'Public Sans', sans-serif; color: var(--ink, #0C0E3D); }
.tk-k small { font-size: 12px; overflow-wrap: anywhere; }
.tk-k.rouge { border-left-color: var(--sv-crit); background: var(--sv-retard-bg); } .tk-k.rouge b { color: var(--sv-retard-fg); }
.tk-k.orange { border-left-color: #C77700; background: var(--sv-bientot-bg); } .tk-k.orange b { color: var(--sv-bientot-fg); }
.tk-k.zero { border-left-color: var(--line, #D3D5F0); }
.tk-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.tk-large { grid-column: 1 / -1; }
.tk-carte { padding: 16px 18px; }
.tk-carte-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tk-carte-h h2 { margin: 0; font: 700 16px/1.3 'Exo 2', 'Public Sans', sans-serif; }
.tk-st2 { margin: 12px 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted, #4A4E7D); }
.tk-ok { margin: 4px 0; color: var(--sv-ok-fg); font-weight: 600; }
.tk-mlist { list-style: none; margin: 0; padding: 0; }
.tk-mrow { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line, #D3D5F0); cursor: pointer; border-radius: 8px; }
.tk-mrow:last-child { border-bottom: 0; }
.tk-mrow:hover, .tk-mrow:focus-visible { background: var(--sunken, #F7F7FE); }
.tk-mt { min-width: 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.tk-mt small { display: block; font-weight: 400; font-size: 12px; color: var(--muted, #4A4E7D); }
.tk-mp { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.tk-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.tk-chiffres div { background: var(--sunken, #F7F7FE); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--muted, #4A4E7D); }
.tk-chiffres b { display: block; font: 800 20px/1.2 'Exo 2', 'Public Sans', sans-serif; color: var(--ink, #0C0E3D); }
.tk-barres { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tk-barres li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 6px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.tk-barres li:hover, .tk-barres li:focus-visible { background: var(--sunken, #F7F7FE); }
.tk-barres li span { overflow-wrap: anywhere; } .tk-barres li b { text-align: right; }
.tk-barres i { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--sv-neutre-bg); overflow: hidden; }
.tk-barres em { display: block; height: 100%; border-radius: 99px; background: var(--sv-blue); }
.tk-barres em.rouge { background: var(--sv-crit); } .tk-barres em.orange { background: #C77700; }
@media (max-width: 1150px) { .tk-ks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .tk-grille { grid-template-columns: 1fr; } .tk-ks { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tk-mrow { grid-template-columns: minmax(0, 1fr) auto; } .tk-mrow .tk-id { display: none; } }
.tk-ks4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } @media (max-width: 800px) { .tk-ks4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
