

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #f7f8fa;
}
#main-layout {
  display: flex;
  height: 100vh;
  min-height: 600px;
  margin: 0 auto;
  box-shadow: 0 2px 24px rgba(0,0,0,0.07);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.sidebar {
  width: 350px;
  background: linear-gradient(135deg, #e4e9f2 0%, #f5f7fa 100%);
  padding: 32px 24px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid #e0e3eb;
  box-sizing: border-box;
  max-height: 100vh;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 999;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  overflow-x:hidden;
}

.sidebar label {
  font-weight: 600;
  font-size: 15px;
  color: #2c3e50;
}
.sidebar select, .sidebar button {
  width: 100%;
  font-size: 15px;
  margin-top: 6px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  transition: border-color 0.2s;
}
.sidebar button {
  background: #4a89dc;
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 0;
  margin-top: 10px;
  transition: background 0.2s;
}
.sidebar button:hover {
  background: #357ab7;
}
.sidebar-actions {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}




  
      .sidebar-collapsed {
        transform: translateX(-100%);
      }
      
      /* Scrollbar style pour la sidebar */
      .sidebar::-webkit-scrollbar {
        width: 6px;
      }
      
      .sidebar::-webkit-scrollbar-track {
        background: #f1f1f1;
      }
      
      .sidebar::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 3px;
      }
      
      .sidebar::-webkit-scrollbar-thumb:hover {
        background: #555;
      }
      
      /* Assurer que le contenu de la sidebar est scrollable */
      #controle_boutons {
        overflow-y: visible;  
        width: 100%;
      }
      




.main-map {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  background: #f7f8fa;
}
#map {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 600px;
  border-radius: 0 0 12px 0;
  z-index: 1;
}
.controls {
  padding: 0;
  background: none;
  border: none;
}
h1 {
  margin: 0;
  padding: 15px;
  background-color: #4a89dc;
  color: white;
}
.info {
  padding: 6px 8px;
  font: 14px/16px Arial, Helvetica, sans-serif;
  background: white;
  background: rgba(255,255,255,0.8);
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  border-radius: 5px;
}
.info h4 {
  margin: 0 0 5px;
  color: #777;
  max-width: 200px;;
}
.legend {
  text-align: left;
  line-height: 18px;
  color: #555;
}
.legend i {
  width: 18px;
  height: 18px;
  float: left;
  margin-right: 8px;
  opacity: 0.7;
}
.loading {
    position: fixed!important;
    top: 50vh; /* Utiliser vh au lieu de % */
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.95);
    padding: 25px 35px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    z-index: 10001!important;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    display: none;
    /* Ajout de propriétés pour assurer la compatibilité mobile */
    margin: 0;
    max-width: 80%; /* Limiter la largeur sur petits écrans */
    width: auto;
    pointer-events: auto; /* S'assurer que les interactions fonctionnent */
  }

  /* Style pour l'overlay */
  .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0; /* Assurer une couverture complète */
    bottom: 0; /* Assurer une couverture complète */
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
  }

  /* Ajoutez cette règle pour gérer le défilement sur mobile quand l'overlay est visible */
  body.loading-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }
.loading-spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #4a89dc;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1.5s linear infinite;
  margin: 15px auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
#csvUrlInput {
  width: 60%;
}

/* Bouton d'application */
.apply-button {
  background: linear-gradient(to bottom, #83a843 0%, #729638 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  width: 100%;
  font-weight: 600;
  font-size: 15px;
  margin-top: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.apply-button:hover {
  background: linear-gradient(to bottom, #8fb64a 0%, #7da13c 100%);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.15);
}



.help-button{
  margin-top:20px;
}


.segmentSelect {
  min-width: 200px;
}

.paramsection{
  margin:5px;
  display: block;
}

#downloadOverlay{
  margin:auto;
  padding-top:5px;
}

#downloadOverlayButton{
  font-size:16px;
  color:#FFF;
  background-color:#357ab7;
  border:0px;
  padding:4px 10px;
  border-radius:8px;
  cursor: pointer;
}
@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

.site-footer {
  background-color: #f5f5f5;
  border-top: 1px solid #e0e0e0;
  padding: 20px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  margin-top: 30px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-section {
  margin-bottom: 15px;
}

.main-info {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 10px;
  font-weight: 500;
}

.main-info a {
  color: #4a89dc;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}

.main-info a:hover {
  color: #2a69bc;
  text-decoration: underline;
}

.disclaimer p {
  margin: 8px 0;
  text-align: justify;
}

.copyright {
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.noUi-pips-horizontal {
    padding: 0px 0;
    height: 24px;
    top: 100%;
    left: 0;
    width: 100%;
}

/* Style pour les checkboxes */
input[type="checkbox"] {
  accent-color: #4a89dc;
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.controls {
  padding: 0;
}

[v-cloak] { display: none; }
  
#welcomeScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

.welcome-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  transition: opacity 0.8s ease, backdrop-filter 0.8s ease;
}

.welcome-container > div {
  background-color: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 90%;
  text-align: center;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.welcome-container.hide {
  opacity: 0;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
}

.welcome-container.hide > div {
  opacity: 0;
  transform: scale(0.95);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.welcome-logo {
  margin: auto;
  height: 70px;
  width: auto;
}

.welcome-byline {
  font-weight: bold;
  font-style: italic;
}

#welcome-loader {
  margin: 20px auto;
}

#welcome-loader .spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto;
  border: 4px solid rgba(131, 168, 67, 0.2);
  border-radius: 50%;
  border-top-color: #83a843;
  animation: spin 1s ease-in-out infinite;
}
  
  .welcome-enter-active, .welcome-leave-active {
    transition: all 0.5s ease;
  }
  
  .welcome-enter-from, .welcome-leave-to {
    opacity: 0;
    transform: translateY(20px);
  }
  
  .fade-enter-active, .fade-leave-active {
    transition: opacity 0.5s ease;
  }
  
  .fade-enter-from, .fade-leave-to {
    opacity: 0;
  }
  
  #closeWelcomeBtn:hover {
    color: #333;
    transform: scale(1.2);
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  .welcome-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    transition: opacity 0.8s ease, backdrop-filter 0.8s ease;
  }
  
  .welcome-container > div {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  
  .welcome-container.hide {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    pointer-events: none;
  }
  
  .welcome-container.hide > div {
    opacity: 0;
    transform: scale(0.95);
  }

/* Styles pour la nouvelle organisation hiérarchique progressive des contrôles */
.control-section {
  margin-bottom: 12px;
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

#toggleControlsButton{
  display: none !important;
  position: fixed;
  left: 10px;
  top: 10px;
  background: #4a89dc;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
  font-size: 24px;
  transition: all 0.3s ease;
}


/* Styles pour les sections actives vs. réduites vs. cachées */
.control-section.active-section {
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


.control-section.minimized-section {
  padding: 10px 15px;
  background-color: #f0f7ff;
}

.control-section.minimized-section .section-content {
  display: none;
}

/* Style pour le contenu de la section */
.section-content {
  margin-top: 12px;
  transition: all 0.3s ease;
}

/* Styles pour les catégories d'indicateurs */
.category-header {
  font-size: 14px;
  font-weight: 600;
  color: #4a89dc;
  margin: 18px 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #eaeaea;
}

/* Premier titre de catégorie sans marge supérieure */
.all-indicators .category-header:first-child {
  margin-top: 0;
}

/* Style pour l'indication de la sélection actuelle */
.section-selection {
  font-weight: normal;
  color: #4a89dc;
  margin-left: 8px;
  font-size: 0.9em;
  cursor: pointer;
}

.selection-description {
  font-weight: normal;
  color: #777;
  font-size: 0.9em;
  font-style: italic;
}

/* Styles pour les tooltips des indicateurs */
.indicator-tooltip, .category-tooltip {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  pointer-events: none;
}

.tooltip-content {
  background-color: #333;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  font-size: 12px;
  line-height: 1.4;
  width: 150px;
  text-align: left;
  position: relative;
}

.tooltip-content:after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; 
  height: 0; 
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #333;
}

.indicator-tab:hover .indicator-tooltip,
.category-tab:hover .category-tooltip {
  opacity: 1;
  visibility: visible;
  top: -15px;
}

/* Styles pour les catégories et indicateurs spécifiques */
.main-categories, .specific-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;      min-width: 250px;
}

.specific-indicators.hidden {
  display: none;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

/* Styles pour les onglets de modèles */
.model-tabs, .type-tabs, .indicator-tabs, .indicator-category {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 12px 0;
  gap: 10px;
}

.model-tab:first-child, .type-tab:first-child, .indicator-tab:first-child {
  margin-left: 0;
}

.model-tab:last-child, .type-tab:last-child, .indicator-tab:last-child {
  margin-right: 0;
}

.model-tab.active, .type-tab.active, .indicator-tab.active {
  background-color: #e7f0ff;
  border-color: #4a89dc;
  box-shadow: 0 2px 4px rgba(74, 137, 220, 0.15);
}

.indicator-icon, .type-icon, .model-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.model-name, .type-name, .indicator-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.model-desc {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

.model-tab.disabled{
  cursor:not-allowed;
}

.model-unavailable{
  font-size:10px;
  color:#999;
  font-style: italic;
}

/* Styles pour les éléments désactivés */
.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  position: relative;
}

.coming-soon {
  font-size: 10px;
  background-color: #f1c40f;
  color: #fff;
  padding: 2px 5px;
  border-radius: 3px;
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 1;
}


/* Styles pour les sélecteurs */
.full-width-select {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background-color: #fff;
  margin-top: 5px;
  font-size: 14px;
}

/* Bouton d'application */
.apply-button {
  background: linear-gradient(to bottom, #83a843 0%, #729638 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  width: 100%;
  font-weight: 600;
  font-size: 15px;
  margin-top: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.apply-button:hover {
  background: linear-gradient(to bottom, #8fb64a 0%, #7da13c 100%);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.15);
}

 /* Simulateur de température */
  .simulation-wrapper {
    margin-top: 10px;
  }
  .simulation-mode-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
  }
  .simulation-mode-container label {
    cursor: pointer;
    font-weight: 500;
    user-select: none;
  }
  #enableSimulationMode {
    width: 18px;
    height: 18px;
    cursor: pointer;
  }
  .temperature-offset-container {
    display: none;
    flex-direction: column;
    margin-top: 10px;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 15px;
  }
  .temperature-offset-container.active {
    display: flex;
  }
  .slider-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  #temperatureOffsetValue {
    margin-left: 10px;
    font-weight: bold;
    color: #4a89dc;
  }
  #temperatureOffsetSlider {
    width: 100%;
    accent-color: #4a89dc;
    margin-bottom: 5px;
  }

  .legend-container {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
  }

  .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
  }
  
  .legend-color {
    width: 15px;
    height: 15px;
    display: inline-block;
    margin-right: 5px;
  }
  
  

  .model-tab, .type-tab, .indicator-tab, .category-tab {
      flex: 1 1 calc(50% - 16px);
      min-width: 70px;    /* à ajuster selon ton design */
      max-width: calc(50% - 16px);
      width: calc(50% - 20px); /* 2 par ligne avec marge */
      box-sizing: border-box;
      margin: 0; /* marges supprimées, gérées par gap */
      padding: 15px 10px;
      text-align: center;
      border-radius: 8px;
      border: 1px solid #eaeaea;
      background: #fff;
      transition: all 0.3s ease;
      font-size: 0.8rem;
      font-weight: 500;
      position: relative;
  cursor: pointer;
  }

  .category-icon{
    font-size: 24px;
    padding-bottom: 5px;
  }
  
  .model-name, .type-name, .indicator-name{
    MARGIN-TOP:10PX;
  }

  /* Pour les "À venir" */
  .category-tab.disabled {
      opacity: 0.4;
      cursor: not-allowed;
  }


#modelInfo{
  text-align: center;
  font-size: 12px;
  color: #888;
  font-style: italic;
  margin-top: 15px;
}

#flash{
  position:absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(92, 184, 92, 0.2);
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#toast{
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #5cb85c;
  color: white;
  padding: 10px 15px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 10000;
}

@media (max-width: 768px) {
  .social-share-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .share-text {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .site-footer {
    padding: 15px 10px;
  }
  
  .disclaimer p {
    text-align: left;
  }
  
  h1 {
    font-size: 1.2rem;
    padding: 12px;
  }
  
  .controls > div {
    flex-direction: column;
    gap: 10px;
  }

  #map {
    height: 400px;
  }  
  #main-layout {
    flex-direction: column;
    min-height: unset;
    height:auto;
  }
  .sidebar {
    width: 100%;
    min-width: unset;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid #e0e3eb;
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 300px;
    background: white;
  }
  .main-map {
    min-height: 400px;
  }
  .leaflet-left {
    padding-top: 50px!important;
  }

  
  #toggleControlsButton {
    display: flex !important;
    left: 10px;
  }
}



