﻿html, body {
   font-family: verdana, arial, sans-serif;
   font-size: 10px;
   height: 100%;
   margin: 0;
   padding: 0;
   display: flex;
   flex-direction: column;
   overflow: hidden;       /* no scroll bar */
}

header {
   position: relative;
   z-index: 1000;
   background-color: black;
   width: 100%;
}

header a, .menu {
   border: 0px solid white;
   padding: 4px 8px;
   font-size: 14px;
   font-weight: bold;
   text-decoration: none;
   background-color: black;
   color: white;
   width: 90px;
   display: inline-block;
   text-align: left;
}

/* popups over all other Leaflet */
.leaflet-popup-pane {
    z-index: 10000 !important;
}
#wind-layer {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 300; /* lower than .leaflet-popup-pane (700) */
}

#cadenas {
   color: lightgray;
}

.menu-link {
   border: 0px solid white;
   padding: 4px 8px;
   font-size: 14px;
   font-weight: bold;
   text-decoration: none;
   background-color: black;
   color: white;
   width: 100%;
   display: inline-block;
   text-align: left;
}

header a:hover, .menu:hover {
   background-color: #ddd;
   color: white;
}

.dropdownRight { /* for connexion */
   position: absolute;
   right: 0px;
   display: inline-block;
}

.dropdown {
   position: relative;
   display: inline-block;
}

.dropdown-content  {
   display: none;
   position: absolute;
   background-color: white;
   min-width: 100px;
   box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
   z-index: 1;
}

.dropdown-content a {
   display: block;
   padding: 4px 8px;
   text-decoration: none;
   color: white;
}

.dropdown-content a:hover, .menu-link:hover {
   background-color: #ddd;
}

.dropdown:hover .dropdown-content {
   display: block;
}

.container {
   display: flex;
   flex-direction: column;
   height: 100vh;
}

.btn {
   border: none;
   padding: 5px 5px;
   margin: 5px;
   margin-bottom: 30px; 
   width: 40px;
   height: 40px;
   font-size: 18px;
   cursor: pointer;
   border-radius: 50%;
   background-color: orange;
   color: white;
   transition: 0.3s;
}
.btn:hover {
   background-color: black;
}
.btn:active {
   transform: scale(0.95);
}
.btn i {
   margin-right: 5px;
}

.footer {
   /*position: fixed;*/
   bottom: 0;
   width: 100%;
   background-color: #666;
   color: white;
   padding: 10px 20px;
   text-align: left;
   display: flex;
   justify-content: space-between;
   align-items: center;
   font-size: 14px;
   position: relative;
   z-index: 1000;
}
.footer .left {
   display: flex;
   align-items: center;
   gap: 10px;
}
.footer .right {
   display: flex;
   align-items: center;
   gap: 25px;
}
.footer i {
   margin-right: 5px;
}
/* Pour slider et boite à cocher isochrone */
.isocContainer {
   margin-left: 50px; 
   /*margin-right: 50px; /* Ajoute un espace à droite */
   /* display: flex;*/
   align-items: center;
   gap: 10px; /* Espacement entre les éléments */
}

/* Changer la couleur du slider */
input[type="range"] {
   /*accent-color: #444; *//* Gris foncé */
   accent-color: orange; /* Gris foncé */
}

#infoTime {
   margin-left: 50px; 
   font-size: 18px;
   margin-bottom: 30px; 
   font-family: Courier;
}

.poi-delete-button {
    background: none;
    border: none;
    padding: 0;
    margin-left: 6px;
    font-size: 16px;
    cursor: pointer;
    vertical-align: middle;
}

.poi-delete-button:hover {
    color: red;
}

#windy {
   flex: 1 1 auto;
   z-index: 0;                /* lesse than header/footer */
   background-color: #d0e7ff; /* blue sea*/
   position: relative;        /* Useful for Windy map*/
}

/* Masquer la timeline + son player */
#windy.no-timeline #bottom, #windy.no-timeline .progress-bar {
   display: none !important;
}

#tools {
   height: 50px;
   display: flex;
   align-items: center;
}

#infoRoute {
   font-size:16px; 
   display: inline; /* ou flex si besoin */
   /*width: 100%;*/
   white-space: nowrap; /* Empêche les retours à la ligne */
   overflow: hidden; /* Masque le débordement */
   text-overflow: ellipsis; /* Ajoute "..." si trop long */
}

#coords {
   display: inline-block;
   margin-right: 30px;
   font-size:12px;
   width: 150px; 
}

#context-menu {
   position: absolute;
   background: #2c2c2c; /* gris très foncé */
   border: 1px solid #444;
   padding: 6px;
   box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
   z-index: 1000;
   border-radius: 4px;
}

.context-button {
   display: flex;
   align-items: center;
   background: transparent;
   border: 1px solid #555;
   color: #f0f0f0;
   padding: 6px 10px;
   margin: 2px 0;
   width: 240px;
   text-align: left;
   cursor: pointer;
   gap: 8px;
   border-radius: 3px;
}

.context-button:hover {
   background-color: #3a3a3a;
}

.color-dot {
   display: inline-block;
   width: 12px;
   height: 12px;
   border-radius: 50%;
   flex-shrink: 0;
}

select {
   background-color: white;
   color: black;
}

/* Changer la couleur de l'option sélectionnée dans la liste */
select:focus option:checked {
   background-color: #ddd;
   color: white;
}

/* Spinner*/
.spinner {
   width: 60px;
   height: 60px;
   border-width: 8px;
   border-style: solid;
   border-color: rgba(243, 243, 243, 0.6);
   border-top-color: #3498db;
   border-radius: 50%;
   animation: spin 1s linear infinite;
   /* En bonus : le centrer */
   margin: 50px auto;
   display: block;
}

/* Animation du spinner */
@keyframes spin {
   from {
      transform: rotate(0deg);
   }
   to {
      transform: rotate(360deg);
   }
}

/* Overlay du spinner qui recouvre la carte */
.spinner-overlay {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0, 0, 0, 0.2); /* Fond noir avec faible opacité */
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 1000;
   display: none; /* Caché par défaut */
}

/*--------------------------------------------------------------------------------------*/
/* SweetAlert2 - common sizing / overflow control */

.swal-wide {
  width: 550px !important;
  max-width: 100vw !important;
  overflow: hidden !important;
}

.swal2-popup {
  overflow-x: hidden !important;
}

.swal2-html-container {
  max-width: 100% !important;
  overflow-x: hidden !important;
  padding: 10px 0 !important;
}

/* Select inside Swal (polarChoose etc.) */
.swal2-select {
  width: 95% !important;
  max-width: 300px !important;
  font-size: 16px;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  margin: 0 auto;
}

/* Confirm button */
.swal2-confirm {
  background-color: orange !important;
  border-color: black !important;
}

/* Plotly wrapper inside Swal */
#plotWrap {
  width: 100% !important;
  height: 500px;
}

/* ------------------------------------------------------------------ */
/* Tables inside Swal (Import competitors / etc.)
   NOTE: this is global for tables inside swal2-html-container.
   If you want stricter scope later, we can narrow it to specific classes. */

.swal2-html-container table {
  border-collapse: collapse;
  margin: auto;
  width: 100%;
  font-size: 13px;
  table-layout: auto;
}

.swal2-html-container th,
.swal2-html-container td {
  border: 1px solid #ccc;
  padding: 4px 6px;
  text-align: center;
}

.swal2-html-container thead {
  background-color: #f0f0f0;
  font-weight: bold;
}

/* displayComp () table */
.comp-table {
  width: 100%;
  border-collapse: collapse;
}
.comp-table th,
.comp-table td {
  padding: 8px;
  border: 1px solid #ddd;
  text-align: center;
}
.comp-table thead {
  background-color: #f2f2f2;
}

/* Feedback layout (custom) */
.swal2-custom-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  border: none;
}

.swal2-feedback-custom-table td {
  padding: 0.5em;
  vertical-align: top;
  border: none;
}

.swal2-feedback-label {
  font-weight: bold;
  white-space: nowrap;
  padding-right: 0.5em;
  color: #333;
  width: 25%;
}

.swal2-feedback-input,
.swal2-feedback-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6em 0.75em;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.swal2-feedback-input:focus,
.swal2-feedback-textarea:focus {
  border-color: #3085d6;
  outline: none;
}

.swal2-feedback-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Init message buttons */
.swal-init-cancel {
  background-color: orange !important;
  color: white !important;
}
.swal-init-confirm {
  background: none !important;
  border: none;
  color: inherit !important;
  box-shadow: none !important;
}

/* ------------------------------------------------------------------ */
/* TWA Route Parameters layout */

.swal-grid input[type="number"],
.swal-grid input[type="datetime-local"],
.swal-grid select {
  width: 100%;
  box-sizing: border-box;
}

/* Checkbox wrapper cells align with labels */
.swal-checkcell {
  display: flex;
  align-items: center;
}

/* Row with two pairs (label + field) */
.swal-row-2 {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  align-items: center;
  gap: 0.45rem 0.8rem;
  margin-top: 0.25rem;
}

/* ------------------------------------------------------------------ */
/* Segments (table + buttons + footer/preview) */

.swal-segments {
  grid-column: 1 / -1;
  margin-top: 0.65rem;
  padding-top: 0.2rem;
}

.swal-segments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.swal-segments-title {
  font-weight: 600;
}

/* Table */
.swal-segments-table {
  width: 100%;
  border-collapse: collapse;
}

.swal-segments-table thead th {
  text-align: left;
  font-size: 0.9rem;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.swal-segments-table td {
  padding: 0.25rem 0.4rem;
  vertical-align: middle;
}

.seg-center {
  text-align: center;
}

/* Fixed widths for duration and angle inputs (as you wanted) */
.swal-segments-table input.seg-duration {
  width: 8.5rem;
  box-sizing: border-box;
}

.swal-segments-table input.seg-angle {
  width: 6.5rem;
  box-sizing: border-box;
}

/* Checkbox alignment */
.swal-segments-table input.seg-fromTwa {
  transform: translateY(1px);
}

/* Footer */
.swal-segments-footer {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.25rem;
  font-size: 0.95rem;
}

.swal-total {
  font-weight: 600;
}

.swal-cmd-preview {
  opacity: 0.85;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
}

.swal-cmd-preview code {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
}

/* "+" green button */
.seg-add-btn {
  background: #20a253 !important;
  border: 1px solid rgba(0,0,0,0.15) !important;
  border-radius: 0.6rem !important;
  padding: 0.15rem 0.65rem !important;
  font-size: 1.15rem !important;
  line-height: 1.1 !important;
  box-shadow: none !important;
}

/* Red "×" remove button */
.seg-remove-btn {
  background: #d93025 !important;
  border: 1px solid rgba(0,0,0,0.15) !important;
  border-radius: 0.6rem !important;
  padding: 0.15rem 0.55rem !important;
  font-size: 1.05rem !important;
  line-height: 1.1 !important;
  box-shadow: none !important;
}



