.ace-config-header-wrapper {
    position: relative;   
}

.ace-config-header-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;    
}
.row-cols-7 > * {
  flex: 0 0 auto;
  width: 14.2857142857%; /* 100/7 */
}
.row-cols-8 > * {
  flex: 0 0 auto;
  width: 12.5%; /* 100/8 */
}
.row-cols-9 > * {
  flex: 0 0 auto;
  width: 11.1111111111%; /* 100/7 */
}
.row-cols-10 > * {
  flex: 0 0 auto;
  width: 10%; /* 100/8 */
}
.input-without-border {
  border: none;
  background-color: none;
  outline: 0;
  font-size: 25px;
  width: 300px;
  height: 30px;
}

.input-without-border:focus {
  border: none;
  background-color: none;
  outline: 0;
  width: 300px;
  height: 30px;
}

.ace-disabled-link {
    pointer-events: none;
    color: grey;
    cursor: not-allowed;
}

.ace-grey-overlay{
  filter: brightness(30%);
/*  pointer-events: none;*/
  cursor: move;
}

.ace-mr-1rem {
    margin-right: -1rem;
}

.ace-blink-color-red {
    
    animation: blinkingBackground 4s infinite;
}

.ace-highlight {
    background-color: #f3c78e !important;
    transition: background-color 1s ease;
}
.ace-highlight-card {
    border: 2px solid #666 !important; 
    box-shadow: 0 0 15px rgba(67, 75, 83, 0.5) !important; 
/*    transition: all 0.3s ease-in-out !important; */
}
.ace-dropzone {
  min-height: 39px;
  border: 1px dashed #4b5563;
  background: #fff;
  border-radius: .2rem!important;
  min-width: 150px;
  overflow-x: hidden;
  position: relative; 
}

.ace-dropzone:hover {
  background-color: #e5e7eb;
}

.ace-close-button {
  position: absolute; 
  top: 1px;
  right: 1px;
  background: none;
  border: none;
  font-size: 1rem; 
  cursor: pointer;
  color: #ff0000; 
  padding: 0; 
  line-height: 1; 
  z-index: 10;
}

.ace-badge{
  font-size: 0.875rem;
  font-weight: 500;
  padding: 4px 12px;
  background: #ffffff;
  background-color: rgb(255, 255, 255);
  border-radius: 0.35rem;
  box-shadow: 0 2px 5px rgba(140, 152, 164, 0.2);
  /*margin: 5px;*/
  cursor: pointer;
}

.left-column {
    width: calc(25% - 5px);
    float: left;
    padding-right: 5px;
}

.right-column {
    width: 75%;
    float: left;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.video-container {
  width: 100%;
  height: 100%;
  
}

.video-player {
  width: 100%;  
  height: 100%;
}

.timebar-wrap {
  position: relative;
  margin: 0 auto 1rem;
}
#timebar-absolute {
  width: 100%;
}

.timestamp-wrap {
  position: relative;
  margin: 0 auto 1rem;
  width: 100%;
  text-align: center;
}

.playbuttons-wrap
{
  text-align: center;
}

#listScenes {
  width: 100%;
}
.ace-video-fullscreen-active {
    padding: 0;
    border: none;
    background: black;
}

.ace-live-camera-item {
    position: relative;

}
.ace-alert-live-camera-item {
    position: relative;

}

.ace-video{
  
}

.ace-video-camera-name-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
}


.ace-video-camera-bottom-right-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
}
.ace-play-button {
    position: absolute;
    bottom: 50%;
    right: 50%;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
}


.ace-ptz-controls-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 20;
}

.ace-joystick-container {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.ace-joystick-handle {
    width: 20px;
    height: 20px;
    background-color: rgba(153, 155, 157, 0.8); 
    border-radius: 50%;
    position: absolute;
    transition: 0.1s ease;
    cursor: pointer;
}
.ace-search-input {
    max-width: 400px;
    margin: 0 auto;
}

.ace-contact-card {
    border-radius: 8px;
    overflow: hidden;
}

.ace-contact-card .card-header {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    padding : 14px
}

.ace-contact-body.collapse {
    display: none;
}

.ace-contact-body:not(.collapse) {
    display: block;
    transition: all 0.3s ease-in-out;
}

.ace-text-muted {
    font-size: 0.85em;
    color: #6c757d;
}

.card-without-site {
  background-color: #fff9d6 !important; 
  border-left: 3px solid #f0ad4e !important;
}

.ace-video-timebar-wrapper {
  width: 100%;
  background: #1e293b;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Graduations */
.ace-video-timebar-graduations {
  position: relative;
  height: 20px;
}

.ace-video-timebar-graduation {
  position: absolute;
  transform: translateX(-50%); 
  bottom: 0;                  
  font-size: 11px;
  color: #9ca3af;
}
.ace-timebar-controls-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* centre réellement le bloc boutons */
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
}
.ace-video-timebar-timeline {
  position: relative;
  width: 100%;
  height: 45px;
  background: #374151; /* Gris foncé */
  margin-top: 8px;
  cursor: pointer;
  overflow: hidden;
}
.ace-controls-left {
  justify-self: start;
  color: #9ca3af;
  font-weight: 600;
  padding: 0 6px;
}

.ace-controls-center {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ace-controls-right { justify-self: end; }
.ace-video-timebar-sequences {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: transparent;
}

.ace-video-timebar-sequence {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 4px;
  background-color: #4caf50;
}

.ace-video-timebar-current-time {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: #2563eb; 
  pointer-events: none;
  z-index: 10;
}

.ace-video-timebar-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.ace-video-timebar-btn {
  background: #1e293b !important 
  border: none !important;
  color: #9ca3af !important; 
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  /*font-size: 18px !important;*/
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  cursor: pointer !important;
}

.ace-timebar-shifts {
display: flex;
flex-wrap: wrap;
gap: .5rem;
justify-content: center;
padding: .25rem 0 .5rem;
/* largeur uniforme configurable */
--chip-w: 72px; /* ajustez: 72–112px selon place */
}


.btn-time-shift {
/* Teintes neutres par défaut, s'adapte aux variables Bootstrap/Volt */
--_bg: var(--bs-gray-100);
--_fg: var(--bs-gray-800);
--_bd: var(--bs-gray-300);
background: var(--_bg);
color: #9ca3af;
border: 1px solid var(--_bd);
border-radius: 50rem;
padding: .25rem .625rem;
line-height: 1.2;
/*font-weight: 600;*/
box-shadow: 0 1px 1px rgba(0,0,0,.04);
transition: transform .05s ease, box-shadow .2s ease,
background-color .2s ease, color .2s ease, border-color .2s ease;
/* uniformiser : largeur fixe + centrage */
display: inline-flex;
align-items: center;
justify-content: center;
gap: .35rem;
/*inline-size: var(--chip-w);*/
font-size: 12px;
text-align: center;
white-space: nowrap; /* évite les retours sur '15mn' */
font-variant-numeric: tabular-nums; /* aligne visuellement les chiffres */
}
.btn-time-shift .bi { margin-right: .25rem; font-size: .85em; color: var(--_accent, currentColor); }
.btn-time-shift:hover { box-shadow: 0 .25rem .75rem rgba(0,0,0,.06); }
.btn-time-shift:active { transform: translateY(1px); }


/* Variantes sémantiques: négatif / positif */
.btn-time-shift[data-variant="neg"] {
/* moins agressif: texte neutre, léger tint en fond + bordure */
--_fg: var(--bs-body-color);
--_bg: rgba(var(--bs-danger-rgb), .05);
--_bd: rgba(var(--bs-danger-rgb), .18);
--_accent: rgba(var(--bs-danger-rgb), .70);
}
.btn-time-shift[data-variant="pos"] {
/* moins agressif: texte neutre, léger tint en fond + bordure */
--_fg: var(--bs-body-color);
--_bg: rgba(var(--bs-success-rgb), .05);
--_bd: rgba(var(--bs-success-rgb), .18);
--_accent: rgba(var(--bs-success-rgb), .70);
}
.ace-video-timebar-btn i {
  pointer-events: none;
  font-size: 16px; 
}

.ace-video-timebar-btn-play i,
.ace-video-timebar-btn-pause i {
  font-size: 16px;
}

.ace-video-timebar-btn-pause {
  display: none; 
}

.ace-video-timebar-highlight {
  position: absolute;
  top: 0;
  height: 50%;
  background-color: rgba(255, 0, 0, 0.4); 
  pointer-events: none; 
  transition: left 0.2s, width 0.2s; 
}

.ace-video-timebar-highlight-fs {
  height: 50%;
}

.ace-video-timebar-highlight-s3 {
  height: 50%;
  top:50%;
}

.datepicker-day-red-dot {
  background-color: rgba(255, 0, 0, 0.4) !important;
    border-radius: 50%;
}

.datepicker-day-orange-dot {
  background-color: orange !important;
    border-radius: 50%;
}

.ace-video-timebar-btn.highlight-effect {
    background-color: rgba(255, 255, 255, 0.2); 
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.5); 
}


div.dt-container div.dt-length select {
    width: 80px !important
}
.ace-video-timebar-time-display-text {
    margin-right: 15px !important;
    
    color: #9ca3af !important;;
    font-size: 14px !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
/*    pointer-events: none !important;*/
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
@keyframes blinkingBackground {
    0%    { background-color: #fff; }
    25%   { background-color: #b81414; }
    50%   { background-color: #fff; }
    75%   { background-color: #b81414; }
    100%  { background-color: #fff; }
}
#ace-camera-service-parent-column {
  animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

 @keyframes ace-blink {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0;
    }
  }

  .ace-blink-slow {
    animation: ace-blink 1s infinite;
  }
  .ace-blink-very-fast {
    animation: ace-blink 0.5s infinite;
  }

  .ace-video-indicators {
    position : absolute;
    top : 10px;
    right : 10px;
    display : flex;
    gap : 1px;
}

  .ace-video-label {
    color : #ff4d4d;
    font-weight : bold;
    font-size : 12px;
    background : rgba(0,0,0,0.5);
    padding : 1px 5px;
    border-radius : 4px;
    /*animation : ace-pulse 2s infinite;*/
  }
  .ace-video-label-orange {
    color : #faa54b;
    
  }
   @keyframes ace-pulse {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0;
    }
  }

  .ace-overlay-glass{
     display : none;
    position : absolute;
    bottom : 10px;
    right : 10px;
    padding : 7px 12px;
    backdrop-filter : blur(8px);
    background : rgba(30, 30, 30, 0.5);
    border-radius : 14px;
    display : flex;
    gap : 4px;
    z-index : 999;
    box-shadow : 0 6px 18px rgba(0,0,0,0.25);
  }

  .ace-glass-button{
     width : 28px;
      height : 28px;
      border-radius : 50%;
      border : 1px solid rgba(255,255,255,0.1);
      background : rgba(255, 255, 255, 0.04);
      backdrop-filter : blur(4px);
      color : white;
      font-size : 13px;
      display : flex;
      align-items : center;
      justify-content : center;
      cursor : pointer;
      transition : all 0.15s ease-in-out;
  }

/*.ace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 350px)); 
  justify-content: start; 

  margin-bottom: 1rem;
}

.ace-camera {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0.5px solid transparent;
}*/
/* path: /assets/css/ace-multilive-grid.css */

/* Base grid */
.ace-grid {
  display: grid;
  /*gap: 0.75rem;        */      
  /*margin-bottom: 1rem;*/
  grid-template-columns: repeat(1, minmax(0, 1fr));
  justify-items: stretch;      /* éviter les trous */
  align-items: stretch;
}

/* Cartes: s'étirent pour remplir la cellule */
.ace-camera {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
  /* Pourquoi: garantir que le player/thumbnail prenne la largeur de la cellule */
}

/* Breakpoints (alignés sur Bootstrap) */
@media (min-width: 576px) {
  .ace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  .ace-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 992px) {
  .ace-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .ace-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)); /* max 5 par ligne */
  }
}

/* Plein écran: occuper 100% de l'espace, aligner avec les bordures */
#ace-container-multilive:fullscreen {
  /* Pourquoi: supprimer marges/paddings hérités pour un vrai plein écran */
  padding: 0 !important;
  margin: 0 !important;
  width: 100vw;
  height: 100vh;
  overflow: auto;                  /* ou overflow: overlay; si tu veux des barres flottantes (chromium) */
  scroll-behavior: smooth;
  overscroll-behavior: contain; 
     /* évite le "pull to refresh" sur mobile */
}
@supports (height: 100dvh) {
  #ace-container-multilive:fullscreen {
    height: 100dvh; /* viewport dynamique = vrai plein écran mobile */
  }
}
/* Optionnel: si un parent impose un max-width, on le neutralise en fullscreen */
#ace-container-multilive:fullscreen .container,
#ace-container-multilive:fullscreen .container-fluid {
  max-width: 100% !important;
  padding: 0 !important;
}

/* En fullscreen, garder le max à 5 colonnes (déjà OK via breakpoint ≥1200px). 
   Si vous voulez FORCER 5 colonnes quelle que soit la largeur en fullscreen, dé-commentez: */
/*
#ace-container-multilive.is-fullscreen .ace-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
*/

    .ace-camera.alert {
      border-color: red;
      animation: blink 1s infinite;
    }
    @keyframes blink {
      0%, 100% { border-color: red; }
      50% { border-color: transparent; }
    }
    .ace-camera video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      background: #111;
    }
    .ace-camera-footer {
      position: absolute;
      bottom: 0;
      width: 100%;
      background: rgba(0, 0, 0, 0.4);
      padding: 0.25rem 0.5rem;
      font-size: 0.75rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      opacity: 0;
      transition: opacity 0.2s ease-in-out;
    }
    .ace-camera:hover .ace-camera-footer {
      opacity: 1;
    }
    .ace-camera-controls button {
      font-size: 0.7rem;
      background: rgba(255,255,255,0.1);
      border: none;
      padding: 0.15rem 0.4rem;
      color: #fff;
      cursor: pointer;
      border-radius: 0.2rem;
    }
    .ace-camera-controls button:hover {
      background: rgba(255,255,255,0.25);
    }

    .link-arrow[data-bs-toggle="collapse"][aria-expanded="true"]  {
      transform: rotate(90deg);
      transition: all 0.2s ease;
    }

    .ace-fade-in {
      opacity: 0;
      transform: translateY(20px);
      animation: fadeInUp 0.6s ease forwards;
    }

    .ace-camera-menu {
      
      background: linear-gradient(135deg, #ffffff, #f1f3f5);
      transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
      cursor: pointer;
    }

    .ace-camera-menu:hover {
      transform: translateY(-5px) scale(1.05);
      box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2) !important;
      background-color: #f8f9fa;
    }

    .ace-camera-menu i {
      transition: transform 0.3s ease;
    }

    .ace-camera-menu:hover i {
      transform: rotate(5deg) scale(1.1);
    }

    .ace-camera-menu h6 {
      text-transform: uppercase;
      font-size: 1.1rem;
    }

    @keyframes fadeInUp {
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .ace-menu-container {
  transform: translateY(-30px);
}

@media (min-width: 768px) {
  .ace-menu-container {
    transform: translateY(-50px);
  }
}

@media (min-width: 1200px) {
  .ace-menu-container {
    transform: translateY(-100px);
  }
}
.badge-pro {
  background-color: #ffc107;
  color: #000;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.25em 0.5em;
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}
.ace-accordion-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #0d6efd; /* Bootstrap primary */
  background-color: #f8f9fa;
  border: none;
  text-align: left;
  transition: background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  cursor: pointer;
}

.ace-accordion-button:not(.collapsed) {
  /*background-color: #e7f1ff;*/
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
  color: #0a58ca;
}

.ace-accordion-button::after {
  content: "";
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-left: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230d6efd' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 1rem;
  transition: transform 0.2s ease-in-out;
  transform: rotate(0deg);
}

.ace-accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
}
   .event-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
  background: #f9f9f9;
  transition: background 0.3s;
}
.event-item:hover {
  background: #f1f1f1;
}
.event-item .event-time {
  font-weight: bold;
  margin-right: 0.5rem;
  white-space: nowrap;
}
.event-item .event-icon {
  margin-right: 0.5rem;
}
.event-item .event-name {
  font-weight: 500;
  margin-right: 0.25rem;
}
.event-item .event-text {
  flex-grow: 1;
}
.event-item[data-visible="false"] {
  display: none;
}

   .ace-device-filter {
    padding: 1rem;
  }



  .ace-device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }

  .ace-device-box {
    position: relative;
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .ace-device-box:hover {
    transform: scale(1.01);
  }

  .ace-alarm-active {
    border-color: #dc3545 !important;
  }

  .ace-inactive {
    background-color: #f1f3f5;
    color: #999;
    border-color: #ddd !important;
  }

  .ace-device-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ace-device-id, .ace-device-event, .ace-device-mail, .ace-device-event-time {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.2;
  }

  .ace-device-icon {
    font-size: 1.2rem;
  }

  .ace-device-alert {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.1rem;
  }

  .ace-marker-icon {
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.ace-marker-alarm {
  animation: ace-marker-pulse 1.5s infinite;
}

@keyframes ace-marker-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.6); /* Bootstrap danger */
  }
  70% {
    transform: scale(1.2);
    box-shadow: 0 0 0 15px rgba(220, 53, 69, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}
.hidden-important {
  display: none !important;
}
.ace-video-image-first-frame-contain{
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; 
  background-color: black;
  z-index: 5;
  display: block
}
.ace-video-image-first-frame-fill{
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill; 
  background-color: black;
  z-index: 5;
  display: block;
}

 @keyframes aceSpin { to { transform: rotate(360deg); } }
.ace-spinner {
  width: 42px; 
  height: 42px;
  border: 4px solid rgba(255,255,255,.25);
  border-top-color: #00E0FF;
  border-radius: 50%;
  animation: aceSpin 1s linear infinite;
}
.ace-loading-overlay{
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  z-index: 8;
  pointer-events: none;
  backdrop-filter: blur(1px);
}

.ace-hint{
  position: fixed;
  z-index: 16;
  /*pointer-events: none;*/
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: rgb(255, 255, 255);
  text-align: center;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 6px 24px;
  /*width: 420px;
  left: 1760px;
  top: 218px;*/
}

.ace-hint-btn{
  padding: 6px 10px;
  margin-left: 10px;
  background: rgba(20, 20, 20, 0.75);
  color: rgb(255, 255, 255);
  cursor: pointer;
  backdrop-filter: blur(4px);
  border: none;
}


.ace-track-label {
  position: absolute;
  left: 8px;
  z-index: 2;
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  text-shadow: 0 1px 1px rgba(0,0,0,.4);
  padding: 2px 6px;
  border-radius: 6px;
  pointer-events: none;
  user-select: none;   /* optionnel : éviter la sélection du texte */
}
.ace-track-label-s3 {
  bottom: 0%;
}
.ace-track-label-fs {
  bottom: 51%;
}
.ace-track-label .clickable {
  pointer-events: auto;
}




.ace-table-nowrap td {
  white-space: nowrap;
}
.ace-table-nowrap th{
  white-space: nowrap;
}

.ace-opacity-50 {
  opacity: 0.6;
}




.ace-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: stretch; }
.ace-col { flex: 1 1 320px; display: flex; }
.ace-card { width: 100%; }




/* Chips d'infos */
.ace-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .55rem; border-radius: 10rem; background: #f8fafc; font-size: .85rem; }


/* Alarme : style amélioré (fond blanc Volt, anneau d'accent, halo léger) */
.ace-alarm { position: relative; }
.ace-alarm[data-state] { --ace-accent: #16a34a; --ace-contrast: #fff; }
.ace-alarm::after { /* anneau doux autour de la carte pour l'état */
content: ""; position: absolute; inset: -2px; border-radius: .75rem; pointer-events: none;
background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 100%);
}
.ace-alarm[data-state]::after {
background: linear-gradient(180deg, color-mix(in oklab, var(--ace-accent) 30%, transparent), transparent);
filter: saturate(1.1);
}

.ace-col.ace-alarm-col {
  flex: 2 1 480px; /* Plus large que la col info */
}

/* Logo */
.ace-logo { max-width: 160px; height: auto; }


/* Badge synchronisé avec l'état */
.ace-badge.ace-sync { background: var(--ace-accent); color: var(--ace-contrast); border: none; }


/* Actions */
.ace-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }


/* Progress arming */
.ace-arming { display: none; }
.ace-arming .progress.ace-progress-narrow {
  width: 60%;         /* moins de largeur */
  margin: 0.25rem auto;
  height: 4px;        /* plus fine */
}
.ace-alarm[data-state="Arming"] .ace-arming { display: block; }


/* Etat → Couleurs */
.ace-alarm[data-state="unknown"] { --ace-accent:#6f6f6f; --ace-contrast:#fff; }
.ace-alarm[data-state="Disarmed"] { --ace-accent:#16a34a; --ace-contrast:#fff; }
.ace-alarm[data-state="Arming"] { --ace-accent:#f59e0b; --ace-contrast:#111827; }
.ace-alarm[data-state="Armed"] { --ace-accent:#ef4444; --ace-contrast:#fff; }
.ace-alarm[data-state="Alarm"] { --ace-accent:#ef4444; --ace-contrast:#fff; }


@media (max-width: 768px){ .ace-logo { max-width: 130px; } }
@media (prefers-reduced-motion: reduce){ .ace-arming .progress-bar { transition: none !important; } }

.ace-card-config-menu i { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.ace-card-config-menu h6 { font-size: clamp(0.9rem, 1.8vw, 1rem); }
.ace-card-config-menu { padding: clamp(0.75rem, 2vw, 1rem) !important; }
  .ace-header {
    display:flex; align-items:center; gap:.75rem;
    padding:.6rem .8rem; border-radius:12px;
    background:#fff; box-shadow:0 2px 12px rgba(0,0,0,.06);
    margin-bottom:.8rem;
  }
  .ace-back {
    border:0; border-radius:10px; background:#f2f3f5;
    padding:.4rem .6rem; cursor:pointer;
  }
  .ace-title { font-weight:600 }
  .ace-view { animation:fade .18s ease-out; }
  @keyframes fade { from {opacity:.0; transform:translateY(4px)} to {opacity:1; transform:none} }
  .ace-loader {
    position:relative; border-radius:12px; background:#f5f6f8; height:120px; overflow:hidden;
  }
  .ace-loader::after {
    content:""; position:absolute; inset:0; transform:translateX(-100%);
    background:linear-gradient(90deg,transparent,rgba(0,0,0,.06),transparent);
    animation:shimmer 1.1s infinite;
  }
  @keyframes shimmer { to { transform:translateX(100%); } }

/* === Mode compact du sidebar (Volt) === */
#sidebarMenu.sidebar-collapsed {
    width: 70px !important;
    min-width: 70px !important;
    transition: width .25s ease;
}

/* cacher les textes partout */
#sidebarMenu.sidebar-collapsed .sidebar-text {
    display: none !important;
}

/* liens centrés */
#sidebarMenu.sidebar-collapsed .nav-link {
    justify-content: center !important;
}
#sidebarMenu.sidebar-collapsed .nav-link .sidebar-icon {
    margin-right: 0 !important;
}

/* liste de sites + filtre cachés */
#sidebarMenu.sidebar-collapsed #siteListContainer,
#sidebarMenu.sidebar-collapsed #menuInputFilterSite {
    display: none !important;
}

/* bloc compte caché */
#sidebarMenu.sidebar-collapsed .btn-upgrade-pro {
    display: none !important;
}

/* bouton + (create site) caché */
#sidebarMenu.sidebar-collapsed a[href*="create_site=true"] {
    display: none !important;
}

/* bouton + (create site) caché */
#sidebarMenu.sidebar-collapsed ul {
    overflow : hidden
}

#sidebarMenu.sidebar-collapsed .logo {
     display: none !important;
}

/* badges cachés */
#sidebarMenu.sidebar-collapsed .badge,
#sidebarMenu.sidebar-collapsed .menu-camera-notification-count {
    display: none !important;
}

/* ----- ADMIN quand collapsed ----- */
/* on ne le cache plus : on le laisse se dérouler, mais version icône-only */
#sidebarMenu.sidebar-collapsed #submenu-admin {
    justify-content: flex-start !important;
    padding-left: 0rem;   /* tu peux mettre 1.4rem ou 1.8rem selon ton goût */
}
}

/* les éléments du sous-menu admin centraux aussi */
#sidebarMenu.sidebar-collapsed #submenu-admin .nav-link {
    margin-right: 0 !important;
}

/* on cache les petites flèches du lien parent Admin */
#sidebarMenu.sidebar-collapsed a[data-bs-toggle="collapse"] .link-arrow {
    display: none !important;
}

/* le lien "Admin" lui-même reste centré */
#sidebarMenu.sidebar-collapsed a[data-bs-toggle="collapse"] {
    justify-content: center !important;
}

/* transitions */
#sidebarMenu.sidebar-collapsed .nav-link,
#sidebarMenu.sidebar-collapsed .sidebar-icon {
    transition: all .25s ease;
}

body.with-sidebar-collapsed .content {
    margin-left: 70px;
    transition: margin-left .25s ease;
}
/* grille sous la carte alarme */
.ace-alarm-external {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* petite carte d’état */
.ace-external-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: all .2s ease-out;
  min-height: 44px;
}

.ace-external-card .ace-ext-icon {
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-size: 1rem;
  flex-shrink: 0;
}

.ace-external-card .ace-ext-content {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.ace-external-card .ace-ext-label {
  font-size: .72rem;
  font-weight: 500;
  color: #1f2937;
}

.ace-external-card .ace-ext-status {
  font-size: .68rem;
  color: #64748b;
}

/* quand l’état est actif */
.ace-external-card.is-active {
  background: rgba(239, 68, 68, 0.09);
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.18);
}

.ace-external-card.is-active .ace-ext-icon {
  background: #ef4444;
  color: #fff;
}

.ace-external-card.is-active .ace-ext-status {
  color: #b91c1c;
  font-weight: 600;
}

/* légère anim quand ça s’allume */
.ace-external-card.is-active {
  animation: aceExtPulse 1.4s ease-in-out infinite alternate;
}

@keyframes aceExtPulse {
  from { transform: translateY(0); }
  to   { transform: translateY(-1px); }
}
/* conteneur des états externes */
.ace-alarm-external {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .5rem;
}

/* badge externe */
.ace-external-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .6rem;
  border-radius: 9999px;
  background: #f8fafc;
  border: 1px solid rgba(148,163,184,.35);
  font-size: .74rem;
  color: #475569;
  transition: all .15s ease-out;
}

.ace-external-chip i {
  font-size: .8rem;
  line-height: 1;
}

/* état actif (alarme, batterie basse, etc.) */
.ace-external-chip.is-active {
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .45);
  color: #b91c1c;
  font-weight: 600;
}
/* Scène image centrée, ne pas forcer 100% */
.ace-map-stage { display: inline-block; }
.ace-map-img {
  display: block;
  margin: 0 auto;         /* centre l’image */
  width: auto;            /* taille naturelle */
  max-width: 100%;        /* rétrécit si conteneur trop étroit */
  height: auto;           /* respecte le ratio */
  border-bottom-left-radius: .375rem;
  border-bottom-right-radius: .375rem;
}

/* L’overlay est dimensionné dynamiquement en JS pour matcher l’image */
#srs-layer { pointer-events: none; } /* les spots remettent les events */
#srs-layer > * { pointer-events: auto; }

/* safety-radio-spot */
.ace-safety-radio-spot-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: #0d6efd; box-shadow: 0 0 0 4px rgba(13,110,253,.25);
  border: 0; 
}
.ace-safety-radio-spot-dot:focus { outline: 0; box-shadow: 0 0 0 4px rgba(13,110,253,.35), 0 0 0 6px rgba(13,110,253,.15); }
.ace-safety-radio-spot-label {
  white-space: nowrap; font-size: 12px;
  background: rgba(255,255,255,.75); padding: 0 .35rem; border-radius: .35rem;
  backdrop-filter: blur(2px);
}

/* dots d’état */
.ace-dot-success, .ace-dot-default, .ace-dot-muted {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.ace-dot-success { background: #198754; box-shadow: 0 0 0 3px rgba(25,135,84,.2); }
.ace-opacity-50 {
    opacity: 0.5 !important;
}


/* Suppression du fond gris/bleu par défaut de bootstrap sur l'accordéon ouvert */
.accordion-button:not(.collapsed) {
    color: #0d6efd; /* Couleur primaire Bootstrap */
    background-color: #fff; /* Fond blanc */
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125); /* Légère bordure */
    border-bottom: 2px solid #0d6efd; /* Bordure active */
}

/* Capteur désactivé (is_hidden = true) */
.ace-sensor-item.disabled-sensor {
    opacity: 0.6;
    background-color: #f8f9fa;
}
.ace-sensor-item.disabled-sensor .accordion-button {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Alignement du switch dans le header */
.ace-sensor-header-switch {
    z-index: 5; /* S'assurer qu'il est cliquable au dessus de l'accordéon */
}

.ace-sensor-body-offline {
  filter: grayscale(100%);
  opacity: 0.3;
  pointer-events: none;
  transition: all 0.3s ease;
}

.ace-aranet-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
  font-size: 0.85rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ace-aranet-card .card-body {
  flex: 1; 
}

/* Badge Hors Ligne */
.ace-offline-badge {
  background-color: #e74a3b;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  animation: ace-pulse-offline 2s infinite;
}

@keyframes ace-pulse-offline {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* Animations */
@keyframes ace-slideInHighlight {
  0% { background-color: #ffe6e6; transform: scale(0.98); }
  50% { background-color: #ffe6e6; transform: scale(1.02); }
  100% { background-color: white; transform: scale(1); }
}
.ace-priority-move {
  animation: ace-slideInHighlight 1.5s ease-out;
}

/* Badges métriques */
.ace-metric-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  background-color: #f2f4f6;
  color: #555;
  border: 1px solid transparent;
  transition: all 0.3s;
  font-weight: 600;
}
.ace-metric-badge.ace-status-ok {
  background-color: #d1e7dd;
  color: #0f5132;
  border-color: #badbcc;
}
.ace-metric-badge.ace-status-alarm {
  background-color: #f8d7da;
  color: #842029;
  border-color: #f5c2c7;
  animation: ace-pulse-red 2s infinite;
}

@keyframes ace-pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(220, 53, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.ace-metric-value { font-size: 0.95rem; }
.ace-metric-unit { font-size: 0.7rem; opacity: 0.8; margin-left: 2px; }

/* Indicateurs icones */
.ace-icon-indicator { font-size: 1rem; }
.ace-text-rssi-good { color: #1cc88a; }
.ace-text-rssi-medium { color: #f6c23e; }
.ace-text-rssi-bad { color: #e74a3b; }

/* Batterie Text */
.ace-battery-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  margin-left: 4px;
}

/* Bouton Historique */
.ace-btn-history {
  font-size: 0.7rem;
  padding: 2px 0;
  color: #adb5bd;
  text-decoration: none;
  transition: color 0.2s;
}
.ace-btn-history:hover {
  color: #4e73df;
  text-decoration: underline;
}
.ace-alarm-time {
    font-size: 0.65rem;
    display: block;
    opacity: 0.9;
    font-weight: normal;
}
/* MODAL HISTORY STYLES */
/* --- Aranet History Modal CSS --- */

/* Le fond sombre (Backdrop) */

/* Zone du graphique */
.ace-chart-wrapper {
    position: relative;
    min-height: 350px; /* Hauteur minimale garantie pour le graphique */
    flex: 1; /* Prend l'espace restant */
}

/* Loader sur le graphique */
.ace-chart-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 10;
    display: none; /* Caché par défaut */
    align-items: center;
    justify-content: center;
}

         

.ace-chart-container { min-height: 350px; }

.ace-hist-tab {
    cursor: pointer; padding: 8px 16px; border-bottom: 2px solid transparent;
    font-weight: 600; color: #6c757d; transition: all 0.2s;
}
.ace-hist-tab:hover { color: #4e73df; background: #f8f9fa; }
.ace-hist-tab.active { color: #4e73df; border-bottom-color: #4e73df; background: #f0f4ff; }

.ace-date-input {
    border: 1px solid #ced4da; border-radius: 4px; padding: 4px 8px; font-size: 0.85rem;
}
.ace-no-accordion-icon::after {
                display: none !important;
                background-image: none !important;
                content: none !important;
            }