/* --------------------- ALL --------------------- */
.parent {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 0.5fr repeat(3, 1fr) 0.5fr;
    column-gap: 0px;
    row-gap: 0px;
    height: 100vh;
    width: 100vw;
    background-color: #f0f2f5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 1;
}

body {
    overflow: hidden;
}

/* --------------------- HEADER --------------------- */

.div1 {
    grid-area: 1 / 1 / 2 / 5; 
    background-color: #2c3e50;
    color: white;
}

.header-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

.title {
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --------------------- CONTENT ZONE - MIDDLE - VIDEO AND MAP --------------------- */

.div2 {
    grid-area: 2 / 1 / 5 / 3; 
    background-color: #000;
    position: relative;
}

.div3 {
    grid-area: 2 / 3 / 5 / 5;
    background-color: #e0e0e0;
    position: relative;
    flex-direction: column;
}

.content-zone {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}



/* --------------------- FOOTER --------------------- */

.div4 {
    grid-area: 5 / 1 / 6 / 3;
    background-color: #fff;
    border-top: 2px solid #ccc;
}

.div5 {
    grid-area: 5 / 3 / 6 / 5;
    background-color: #fff;
    border-top: 2px solid #ccc;
    border-left: 1px solid #eee;
    flex-direction: column;
}

.footer-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.controls-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --------------------- VIDEO --------------------- */

.video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.timestamp-display {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    background: #eee;
    padding: 5px 10px;
    border-radius: 4px;
}

/* --------------------- 2D  MAP --------------------- */

/*
.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    font-weight: bold;
    position: relative; 
}

.map-placeholder img {
    object-fit: contain; 
    width: 100%;
    height: 100%;
}
*/
/* Style pour la carte Leaflet */
.map-real {
  width: 100%;
  height: 100%;
  /* min-width: 800px;
  min-height: 600px;
  border: 1px solid #ccc;
  box-shadow: 0 0 10px rgba(0,0,0,0.2); */
}

/* Force Leaflet à remplir son conteneur */
.map-real .leaflet-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #666;
  font-weight: bold;
  position: relative;
}

.marker {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #ff0000;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 100;
    transform: translate(-50%, -50%); 
}

.marker-label {
    position: absolute;
    left: 15px; 
    top: -5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
    white-space: nowrap;
    pointer-events: none; 
}

/* --------------------- FUNCTIONNALITIES --------------------- */

.label-tracker {
  font-family: sans-serif;
  font-size: 1rem;
  padding-right: 10px;
}

.tracker-select {
  font-size: 0.9rem;
  padding: 2px 5px;
}

#newTrackerName {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 120px;
    outline: none;
}

#newTrackerName:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.15);
}

.leaflet-container,
.leaflet-container .leaflet-marker-icon {
    cursor: crosshair !important;
}

.deletion-mode .leaflet-container,
.deletion-mode .leaflet-container .leaflet-marker-icon {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Ccircle cx='8' cy='8' r='6' stroke='black' stroke-width='2' fill='none'/%3E%3C/svg%3E") 8 8, cell !important;
}



/* --------------------- MULTIPLAN --------------------- */

.tab {
  width: 100%;
  overflow: hidden;
  border: none;
  background-color: #f1f1f1;
  border-bottom: 1px solid #ccc;
  padding: 0;
  margin: 0;
  height: auto;
  display: flex;
  flex-direction: row;
}

.tab button {
  background-color: inherit;
  float: top;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  text-align: center;
  transition: 0.1s;
}

.tab button:hover {
  background-color: #ddd;
}

.floors {
  width: 100%;
  overflow: hidden;
  /* border: 1px solid #ccc; */
  border: none;
  background-color: #f1f1f1;
  border-bottom: 1px solid #ccc;
  padding: 0;
  margin: 0;
  height: auto;
}

.floors button {
  background-color: inherit;
  float: top;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  text-align: center;
  transition: 0.1s;
}

.floors button:hover {
  background-color: #ddd;
}

.floors button.active {
  background-color: #ccc;
  font-weight: bold;
}

.tabcontent {
  display: none;
  padding: 6px 12px;
  /* border: 1px solid #ccc; */
  border: none;
  border-top: none;
  overflow: auto;
  width: 100%;
  height: calc(100% - 40px);
  justify-content: center;
  align-items: center;
}

.topright {
  float: right;
  cursor: pointer;
  right: 12px;
  top: 8px;
  font-size: 16px;
  border: none;
  background: none;
}

.topright:hover {
    color: red;
    text-align: center;
}

.submit {
    cursor: pointer;
    background-color: inherit;
    border: none;
}

.submit:hover {
    color: green;
    text-align: center;
}

/* --------------------- 3D MAP --------------------- */

#scene3d {
    background-color: #000;
    width: 100%;
    height: 100%;
    border: 1px solid black;
    padding: 0px;
    position: static; /* fixed or static */
    top: 100px;
    left: 100px;
}

.marker-tooltip {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: monospace;
    pointer-events: none;
    z-index: 10000 !important; 
    display: none;
    white-space: nowrap;
}

/* --------------------- BUTTONS --------------------- */

.button {
    display: inline-block;
    padding: 8px 16px;
    cursor: pointer;
    background-color: #2c3e50;
    color: white;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration-line: none;
    border:0px;
}

.button:hover {
    background-color: #4e6e8f;
}

.custom-file-upload {
    background-color: #007bff;
}

.custom-file-upload:hover {
    background-color: #0056b3;
}

/* --------------------- BOTTOM BUTTONS --------------------- */

input[type="file"] {
    display: none;
}

.file-name {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.frame {
    background-color: #8b8b8b;
    padding: 4px 8px;
}

.frame:hover {
    background-color: #494949;
}

.downloadCSV{
    position : left;
    background-color: #b71818;
}

.downloadCSV:hover {
    background-color: #921414;
}

.typeText {
    padding-bottom: 4px;
    width: 100%;
    font-size: 0.7rem;
}


/* --------------------- HEADER BUTTONS --------------------- */

.headerButton{
    background-color: #202d3b;
}

.header-right {
    position: absolute;
    right: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-left {
    position: absolute;
    left: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/*---------------------- SCALE ---------------------- */
.scalebutton_un {
    background-color: #b71818;
    display: none;
}

.scalebutton_deux {
    background-color: #397a32;
    display: none;
}

.scaledistance {
    width: 80px;
    display: none;
}



/* --------------------- DIALOG --------------------- */

dialog {
    margin: auto;
    padding: 15px;
    align-items: center;
}

.inDialog {
    padding: 8px;
}

.warning {
    color : #b71818;
}

h2 {
    color: #007bff;
}

h3 {
    color : #2c3e50;
}



