/* ---- Testeur : 2 ecrans (choix de l'ECG / resultats), mobile d'abord, confortable sur PC */
#tab-test { --ac: #88c0d0; --carte: #1d2026; --bord: #2e3440; }
.ts-app { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ts-ecran { display: none; flex: 1; min-height: 0; flex-direction: column; }
.ts-app[data-ecran=choix] .ts-choix, .ts-app[data-ecran=res] .ts-res { display: flex; }
.ts-mob { display: none !important; }

/* ecran 1 : choix */
.ts-choix { overflow-y: auto; padding: 14px max(14px, calc((100% - 1200px) / 2)); gap: 12px; }
.ts-envoi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: 2px dashed #3b4252; border-radius: 14px; padding: 12px; }
.ts-envoi.survol { border-color: var(--ac); background: #1b2430; }
.ts-envoi .hint { grid-column: 1 / -1; text-align: center; }
.ts-big { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border-radius: 12px; background: #2a3140; cursor: pointer; font-weight: 600; font-size: 15px; text-align: center; }
.ts-big:hover { background: #34405a; } .ts-big .ico { font-size: 30px; }
.ts-sect { font-weight: 700; font-size: 16px; margin-top: 4px; }
.ts-card { background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ts-job-l { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.pbar { height: 8px; background: #2a2f38; border-radius: 4px; overflow: hidden; }
.pbar > div { height: 100%; width: 0; background: var(--ac); transition: width .4s; }
.ts-filtres { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ts-chip { border-radius: 16px; padding: 6px 12px; background: #2a3140; border: 1px solid #3b4252; font-size: 13px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ts-chip.on { background: var(--ac); color: #10141a; border-color: var(--ac); }
.ts-chips { display: flex; gap: 6px; flex-wrap: wrap; }
#tf-nb:not(:empty) { background: var(--ac); color: #10141a; border-radius: 9px; padding: 0 6px; font-size: 11px; }
.tf-l { font-size: 12px; color: #8c96a8; }
.tf-r { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.tf-r input[type=range] { width: 100%; accent-color: var(--ac); }
.tf-tri { flex-direction: row; align-items: center; justify-content: space-between; }
.ts-compte { font-size: 12px; color: #8c96a8; }
.ts-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ts-it { background: var(--carte); border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; position: relative; }
.ts-it:hover { border-color: #4c566a; } .ts-it.sel { border-color: var(--ac); }
.ts-it img, .ts-it .ph { width: 100%; aspect-ratio: 3648 / 2624; object-fit: cover; display: block; background: #2a2f38; }
.ts-it .ph { display: flex; align-items: center; justify-content: center; color: #6b7385; font-size: 12px; }
.ts-it .tags { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.ts-it .tag { font-size: 11px; padding: 1px 7px; border-radius: 8px; background: rgba(20, 22, 26, .82); }
.ts-it .tag.d { background: #bf616a; color: #fff; }
.ts-it .bas { padding: 6px 8px; font-size: 12px; white-space: nowrap; display: flex; justify-content: space-between; gap: 4px; color: #b8c0cc; }
.ts-it .bas b { color: #fff; }
.ts-vide { grid-column: 1 / -1; text-align: center; padding: 30px 10px; color: #8c96a8; }
.ts-moteur { font-size: 11px; padding-bottom: 10px; }

/* ecran 2 : resultats */
.ts-titre { display: flex; align-items: center; gap: 8px; padding: 6px 10px; min-height: 46px; border-bottom: 1px solid var(--bord); flex-wrap: wrap; }
.ts-retour { border-radius: 18px; padding: 6px 12px; background: #2a3140; font-weight: 600; }
.ts-nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.ts-titre .ts-chips .ts-chip { cursor: default; padding: 2px 9px; font-size: 12px; }
.ts-icone { background: #2a3140; border: 1px solid #3b4252; border-radius: 50%; width: 36px; height: 36px; padding: 0; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
#ts-info-btn { margin-left: auto; }
.ts-info { padding: 8px 12px; font-size: 12px; color: #b8c0cc; border-bottom: 1px solid var(--bord); line-height: 1.6; }
.ts-vues { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--bord); }
.seg { display: inline-flex; background: #1d2026; border: 1px solid #3b4252; border-radius: 18px; padding: 2px; }
.seg button { border: none; background: none; border-radius: 16px; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.seg button.active { background: var(--ac); color: #10141a; font-weight: 600; }
.seg button:disabled { opacity: .35; cursor: default; }
.ts-defil { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.ts-vues .ts-defil { flex: 1; }
.ts-pop { margin: 0 10px 8px; background: #1d2026; border: 1px solid #3b4252; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; align-items: flex-start; }
.ts-pop input[type=range] { accent-color: var(--ac); vertical-align: middle; }
.ts-corps { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ts-view { position: relative; flex: 1; min-height: 0; background: #0b0c0e; overflow: hidden; cursor: grab; touch-action: none; }
.ts-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ts-msg { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); color: #8c96a8; pointer-events: none; text-align: center; line-height: 1.5; }
.ts-ajuster { position: absolute; top: 10px; right: 10px; background: rgba(42, 49, 64, .85); z-index: 2; }
.ts-encours { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(360px, 86%); z-index: 3; }
.ts-sig { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ts-sig.hidden { display: none; }
.ts-sigbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.ts-aide { padding: 0 10px 4px; }
.ts-axes { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 10px; padding: 6px 10px 12px; align-content: start; grid-auto-rows: max-content; }
.ts-ax { background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; }
.ts-ax .t { font-size: 12px; padding: 5px 9px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.ts-ax canvas { width: 100%; height: 140px; display: block; cursor: crosshair; touch-action: none; }

@media (max-width: 820px) {              /* telephone */
  header { gap: 6px; padding: 0 6px; }
  #title { max-width: 26vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
  #mini, #cloudcli { display: none !important; }
  header nav { overflow-x: auto; flex: 1; scrollbar-width: none; }
  header nav button { padding: 10px 8px; white-space: nowrap; }
  .ts-mob { display: inline !important; } .ts-pc { display: none !important; }
  .ts-choix { padding: 10px; }
  .ts-grille { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ts-nom { max-width: 46%; }
  .ts-res .ts-vues { order: 9; border-top: 1px solid var(--bord); border-bottom: none; padding-bottom: 10px; }   /* vues en bas : zone du pouce */
  .ts-res .ts-pop { order: 8; }
  .ts-res .ts-corps { order: 5; }
  .ts-axes { grid-template-columns: 1fr; }
  .ts-ax canvas { height: 130px; }
}
/* historique « Mes images » */
.ts-hist .ts-it .bas .nom { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ts-it .tag.m { background: #5e81ac; color: #fff; } .ts-it .tag.v { background: #d08770; color: #10141a; } .ts-it .tag.e { background: #bf616a; color: #fff; }
.ts-it .sup { position: absolute; top: 6px; right: 6px; border: 0; border-radius: 8px; background: rgba(20, 22, 26, .82); color: #d8dee9;
  font-size: 12px; padding: 2px 8px; cursor: pointer; }
.ts-it .sup.conf { background: #bf616a; color: #fff; }
