/* ============================================================================
   Tik Tak PASS — DEV 1.2.84 — CAPTURE FENÊTRE / AIDE V01
   Ne modifie aucune géométrie HG/HD/BG/BD. Les commandes vivent dans FOOTER 01.
   ============================================================================ */

.kalaFooter .kalaCenterTools,
.moduleKalaFooter .kalaCenterTools {
  justify-self:center !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:4px !important;
  min-width:0 !important;
  max-width:58vw !important;
  height:100% !important;
  pointer-events:auto !important;
}
.kalaFooter .kalaCenterTools .kalaUser,
.moduleKalaFooter .kalaCenterTools .kalaUser {
  display:block !important;
  min-width:0 !important;
  max-width:34vw !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-weight:900 !important;
}
.ttFooterCaptureBtn {
  display:none;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  border:1px solid rgba(80,105,125,.55);
  border-radius:5px;
  background:rgba(240,246,250,.92);
  color:#173d50;
  height:18px;
  min-height:18px;
  padding:0 6px;
  margin:0;
  line-height:1;
  font-size:9px;
  font-weight:1000;
  cursor:pointer;
  pointer-events:auto;
  white-space:nowrap;
}
.ttFooterCaptureBtn.ttCameraBtn {
  width:23px;
  min-width:23px;
  padding:0;
  font-size:12px;
}
body[data-theme="dark"] .ttFooterCaptureBtn {
  background:rgba(26,42,54,.96);
  border-color:rgba(126,166,190,.60);
  color:#e8f7ff;
}
body.authenticated.capture-admin .ttFooterCaptureBtn.ttCameraBtn { display:inline-flex; }
body.authenticated.capture-user .ttFooterCaptureBtn.ttHelpBtn { display:inline-flex; }

.ttCaptureFlash {
  position:fixed;
  inset:0;
  z-index:2147483646;
  background:#fff;
  opacity:0;
  pointer-events:none;
  visibility:hidden;
}
.ttCaptureFlash.active {
  visibility:visible;
  animation:ttCaptureFlashAnim 320ms ease-out both;
}
@keyframes ttCaptureFlashAnim {
  0% { opacity:0; }
  18% { opacity:.94; }
  48% { opacity:.35; }
  100% { opacity:0; }
}

.ttHelpOverlay {
  position:fixed;
  inset:0;
  z-index:2147483645;
  display:none;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  padding:12px;
  background:rgba(5,10,15,.72);
}
.ttHelpOverlay.show { display:flex; }
.ttHelpCard {
  width:min(520px,96vw);
  max-height:94vh;
  overflow:auto;
  box-sizing:border-box;
  border:1px solid rgba(120,150,170,.75);
  border-radius:14px;
  background:#f8fbfd;
  color:#15232d;
  padding:14px;
  box-shadow:0 18px 60px rgba(0,0,0,.42);
}
body[data-theme="dark"] .ttHelpCard {
  background:#111b24;
  color:#eef8ff;
  border-color:#47657a;
}
.ttHelpTitle { font-size:16px; font-weight:1000; margin:0 0 10px; text-align:center; }
.ttHelpPreviewWrap { display:grid; gap:4px; margin-bottom:10px; }
.ttHelpPreview {
  width:100%;
  max-height:36vh;
  object-fit:contain;
  border:1px solid rgba(90,115,130,.48);
  border-radius:8px;
  background:#05090d;
}
.ttHelpPreviewCaption { font-size:10px; font-weight:800; opacity:.72; text-align:center; }
.ttHelpLabel { display:block; font-size:12px; font-weight:1000; margin-bottom:5px; }
.ttHelpMessage {
  width:100%;
  min-height:92px;
  box-sizing:border-box;
  resize:vertical;
  border:1px solid #9db0bd;
  border-radius:8px;
  padding:9px;
  font:inherit;
  font-size:14px;
  background:#fff;
  color:#14222b;
}
body[data-theme="dark"] .ttHelpMessage { background:#09121a; color:#fff; border-color:#526f82; }
.ttHelpStatus { min-height:18px; margin-top:6px; font-size:11px; font-weight:800; color:#b52e22; }
.ttHelpActions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:7px; }
.ttHelpActions button {
  min-height:38px;
  border-radius:8px;
  border:1px solid #879eae;
  font-weight:1000;
  cursor:pointer;
}
.ttHelpCancel { background:#eef2f4; color:#263943; }
.ttHelpSend { background:#168f88; border-color:#168f88 !important; color:#fff; }
.ttHelpActions button:disabled { opacity:.5; cursor:default; }


.ttHelpResultOverlay {
  position:fixed;
  inset:0;
  z-index:2147483647;
  display:none;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  padding:16px;
  background:rgba(5,10,15,.54);
}
.ttHelpResultOverlay.show { display:flex; }
.ttHelpResultCard {
  position:relative;
  width:min(460px,92vw);
  box-sizing:border-box;
  border:1px solid rgba(120,150,170,.78);
  border-radius:16px;
  background:#f8fbfd;
  color:#15232d;
  padding:24px 22px 18px;
  text-align:center;
  box-shadow:0 20px 70px rgba(0,0,0,.48);
}
body[data-theme="dark"] .ttHelpResultCard {
  background:#111b24;
  color:#eef8ff;
  border-color:#47657a;
}
.ttHelpResultClose {
  position:absolute;
  top:8px;
  right:9px;
  width:34px;
  height:34px;
  border:0;
  border-radius:50%;
  background:rgba(100,125,140,.17);
  color:inherit;
  font-size:25px;
  font-weight:900;
  line-height:30px;
  cursor:pointer;
}
.ttHelpResultIcon {
  width:52px;
  height:52px;
  margin:0 auto 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#168f88;
  color:#fff;
  font-size:31px;
  font-weight:1000;
}
.ttHelpResultTitle { font-size:20px; font-weight:1000; margin:0 34px 8px; }
.ttHelpResultText { font-size:14px; font-weight:800; line-height:1.45; }
.ttHelpResultAuto { margin-top:12px; font-size:10px; font-weight:800; opacity:.62; }

.captureAdminPanel { display:grid; gap:10px; }
.captureAdminStats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.captureStatCard {
  border:1px solid rgba(110,135,150,.45);
  border-radius:10px;
  padding:10px;
  background:rgba(120,150,170,.08);
}
.captureStatCard h3 { margin:0 0 6px; font-size:14px; }
.captureStatLine { display:flex; justify-content:space-between; gap:12px; font-size:12px; margin:3px 0; }
.captureCleanupBlock { border-top:1px solid rgba(110,135,150,.35); padding-top:10px; }
.captureCleanupRow { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.captureCleanupRow input[type="date"] { min-height:32px; border-radius:7px; border:1px solid #879eae; padding:0 7px; }
@media (max-width:700px) {
  .ttFooterCaptureBtn { height:17px; min-height:17px; font-size:8px; padding:0 4px; }
  .ttFooterCaptureBtn.ttCameraBtn { width:21px; min-width:21px; font-size:11px; }
  .kalaFooter .kalaCenterTools,
.moduleKalaFooter .kalaCenterTools { gap:3px !important; max-width:62vw !important; }
  .kalaFooter .kalaCenterTools .kalaUser,
.moduleKalaFooter .kalaCenterTools .kalaUser { max-width:28vw !important; }
  .captureAdminStats { grid-template-columns:1fr; }
}


/* ============================================================================
   DEV 1.2.155I — APPAREIL PHOTO TOUJOURS ACCESSIBLE
   Les fonds des pop-up internes laissent passer les clics hors de leur carte.
   Les cartes restent interactives. Le bouton photo du footer reste donc
   disponible même pendant un message/popup applicatif.
   ============================================================================ */
body.authenticated.capture-admin #message,
body.authenticated.capture-admin .ttHelpOverlay,
body.authenticated.capture-admin .ttHelpResultOverlay,
body.authenticated.capture-admin .ttAutoUpdateOverlay {
  pointer-events:none !important;
}
body.authenticated.capture-admin #message .messagePopupCard,
body.authenticated.capture-admin .ttHelpOverlay .ttHelpCard,
body.authenticated.capture-admin .ttHelpResultOverlay .ttHelpResultCard,
body.authenticated.capture-admin .ttAutoUpdateOverlay .ttAutoUpdateCard {
  pointer-events:auto !important;
}
