body, html {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;   /*MIS EN COMMENTAIRE POUR RESPONSIVE */
	overflow: hidden;
	font-family: 'Roboto', sans-serif;
	cursor: none;
    
    min-height: 100vh;  /* Remplace height: 100% */  /* POUR RESPONSIVE */ 
    display: flex;  /* POUR RESPONSIVE */ 
    flex-direction: column;	/* POUR RESPONSIVE */ 
}

#viewer {
    width: 100%;
    /* flex: 1   /* POUR RESPONSIVE */
    /* height: 100%; MIS EN COMMENTAIRE POUR RESPONSIVE */ 
    background: #000;
    min-height: 0; /* POUR RESPONSIVE */
}
#openseadragon {
	width: 100vw; 
	height: 100vh;
	/*overflow: auto;*/
	z-index: 1;
	position: relative;
	background-color: black;
	/*border: 1px solid yellow;
	image-rendering: pixelated !important;
    image-rendering: -moz-crisp-edges !important;
    image-rendering: crisp-edges !important;*/
}

#canvas {
	position: absolute; /* Permet de superposer les canvas */
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 10;
	pointer-events: none;
	/*border: 1px solid red;*/
}

/* ========================================================================= */
/* Meridien central */
/* ========================================================================= */
#vertical-separator {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100vh;
    background-color: red;
    z-index: 10;
    pointer-events: none;
}

.meridian-label {
    position: fixed;          /* fixé à l'écran */
    top: 0;                   /* collé en haut */
    left: 50%;                /* centré horizontalement */
    transform: translateX(-50%);
    width: 50px;             /* largeur globale du composant */
    height: 30px;    
    z-index: 11;   /* IMPORTANT */
}

.bubble-shape {
    width: 100%;              /* la bulle prend toute la largeur du conteneur */
    height: 100%;             /* conserve les proportions */
    display: block;
    z-index: 11;   /* IMPORTANT */
}

.bubble-text {
    position: absolute;       /* positionné par rapport à .meridian-label */
    top: 35%;                 /* ajuste verticalement si nécessaire */
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;          /* taille indépendante du SVG */
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;     /* évite d'intercepter les clics */
    z-index: 11;   /* IMPORTANT */
}

/* ========================================================================= */
/* GESTION DU MENU DES CHAMPS METEO DISPONIBLES                              */
/* ========================================================================= */
.toolbar-submenu {
    position: absolute;
    left: 58px; /* largeur toolbar */
    top: 10px;
    /*background: white;*/
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 8px;
}

.hidden {
    display: none;
}

.toolbar-submenu div {
    padding: 6px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.toolbar-submenu div:hover {
    background: #f0f0f0;
}

/* ========================================================================= */
/* Onglet Parametres (au-dessus de Tools)                                    */
/* ========================================================================= */
/*
.params-panel {
    position: fixed;
    top: 10px;
    left: 0;
    align-items: flex-start;
    z-index: 9002;
    transform: translateX(-100%);   
    transition: transform 0.3s ease;
    pointer-events: none;
}
*/ 
.params-panel {
    position: fixed;
    top: 10px;
    left: 0;
    z-index: 9002;
    pointer-events: none;
}

.params-panel.open {
    transform: translateX(0);
}
/* 
.params-tab {
    position: absolute;
    top: 0;
    right: -37px;
    width: 25px;
    height: 100px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    background: rgba(30, 30, 30, 0.7);
    color: #f1f1f1;
    padding: 10px 6px;
    border-radius: 8px 0 0 8px;
    user-select: none;
    font-family: 'Open Sans';
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
}
*/ 
.params-tab {
    position: absolute;
    top: 0;
    left: 0;
    width: 25px;
    height: 100px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    background: rgba(30, 30, 30, 0.7);
    color: #f1f1f1;
    padding: 10px 6px;
    border-radius: 8px 0px 0px 8px;
    user-select: none;
    font-family: 'Open Sans';
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    z-index: 2;
}
/*
.params-content {
    background: rgba(30, 30, 30, 0.8);
    color: #f1f1f1;
    position: relative;
    top: 0;
    left: 0;
    width: auto;
    min-width: 280px;
    max-height: 80vh;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    font-size: 14px;
    pointer-events: auto;
    padding: 12px 14px;
    text-align: left;
    overflow-y: auto;
    box-sizing: border-box;
}
*/
.params-content {
    position: absolute;
    top: 0;
    left: 0px; /* juste après la languette */
    background: rgba(30, 30, 30, 0.8);
    color: #f1f1f1;
    min-width: 280px;
    max-height: 80vh;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    font-size: 14px;
    padding: 12px 14px;
    text-align: left;
    overflow-y: auto;
    box-sizing: border-box;
    transform: translateX(-100%);   /* replié : caché derrière la languette */
    transition: transform 0.3s ease;
    pointer-events: none;
    z-index: 1;
}
.params-panel.open .params-content {
    transform: translateX(38px);
    pointer-events: auto;
}

.params-group-title {
    font-weight: 700;
    margin: 10px 0 6px;
    font-size: 15px;
}

.params-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.params-separator {
    border-top: 1px solid #555;
    margin: 8px 0;
}

/* ========================================================================= */
/* Toolbar */
/* ========================================================================= */
/*
.toolbar-panel {
    position: fixed;
    top: 135px;
    left: 0;
    align-items: flex-start;
    z-index: 9002;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}
*/
.toolbar-panel {
    position: fixed;
    top: 135px;
    left: 0;
    z-index: 9002;
    pointer-events: none;
}

.toolbar-panel.open {
    transform: translateX(0);
    /*pointer-events: auto;*/
}
/*
.toolbar-tab {
    position: absolute;
    top: 0;
    right: -37px;
    width: 25px;
    height: 100px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    background: rgba(30, 30, 30, 0.7);
    color: #f1f1f1;
    padding: 10px 6px;
    border-radius: 8px 0 0 8px;
    user-select: none;
    font-family: 'Open Sans';
    font-size: 16px;  
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
}
*/
.toolbar-tab {
    position: absolute;
    top: 0;
    left: 0;
    width: 25px;
    height: 100px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    background: rgba(30, 30, 30, 0.7);
    color: #f1f1f1;
    padding: 10px 6px;
    border-radius: 8px 0 0 8px;
    user-select: none;
    font-family: 'Open Sans';
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    z-index: 2;
}
/*
.toolbar-content {
    background: rgba(30, 30, 30, 0.0);
    color: #f1f1f1;
    position: relative;
    top: 0;
    left: 0;   
    width: 48px; 
    max-height: 80vh;    
 	box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
	z-index: 1000;
	display: flex;
	flex-direction: column;
    flex-wrap: wrap;
	align-items: center;
	cursor: grab;
	font-size: 14px;
    pointer-events: auto;
} 
*/
.toolbar-content {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(30, 30, 30, 0.8);
    color: #f1f1f1;
    width: 52px;
    max-height: 80vh;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    cursor: grab;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
    /*transform: translateX(calc(-100% - var(--params-tab-width)));*/
    transform: translateX(-100%);   /* replié : caché derrière la languette */
    transition: transform 0.3s ease;
}

.toolbar-panel.open .toolbar-content {
    transform: translateX(38px);
    pointer-events: auto;
}

.toolbar-content button {
	background: none;
	border: none;
	margin: 1px 0;
	width: 44px;
	height: 44px;
	cursor: pointer;
	padding: 0;
	font-size: inherit; 
}
.toolbar-content button img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.toolbar-content button.selected {
    background-color: #ccc;
    transform: translateY(4px); 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toolbar-content button:hover {
    background: black; 
    transform: scale(1.05); 
    transition: transform 0.2s ease-in-out;
}
.toolbar-content button:active {
    transform: translateY(2px); 
    box-shadow: none; 
    background-color: red;
}

.highlighted {
    background-color: #212121;
    transform: translateY(2px);
    box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.8), 
                0 2px 6px rgba(0, 0, 0, 0.6);
}	

/* ========================================================================= */
/* Slider */
/* ========================================================================= */
/* 1. Mise à jour de l'Overlay du Slider */
#slider-overlay {
    position: absolute; 
    bottom: 20px; 
    left: 50%;
    transform: translateX(-50%); 
    z-index: 100; 
    background: rgba(48, 48, 48, 0.5); 
    /*padding: 10px 20px 30px; /* Espace en bas pour les graduations */
	padding: 10px 20px 30px;
    border-radius: 5px;
    color: white;

    /* Largeur du conteneur extérieur (80vw) */
    width: 80vw; 
    max-width: none; 

    text-align: center;
    display: flex; 
    align-items: center; 
    justify-content: center; /* Centrer le contenu (slider-container) */
    cursor: pointer;
	
}

/* 3. Conteneur principal du Slider et des Ticks */
#slider-container {
    /* Il prend la totalité de la largeur disponible dans l'overlay */
    flex-grow: 1; 
    flex-basis: 0; 
    
    text-align: left; 
    position: relative; 

}

/* 4. Style du conteneur noUiSlider */
/*
#slider-container #imageSlider {
    margin-top: 25px; 
	height: 5px;
}
*/
#slider-container {
    height: 30px;
    box-sizing: border-box;
}

#imageSlider {
    margin-top: 25px;
	height: 5px;
}

#imageSlider .noUi-base {
    height: 7px; /* Épaisseur de la piste */
}

/* Style du CURSEUR UNIQUE (le handle 0) */
#imageSlider .noUi-handle[data-handle="0"] {
    background: rgb(255, 180, 0, 0.7); /*#FF004C; /* Curseur unique bien visible (Rouge/Magenta) */
    border-color: black; /*#AA0030;*/
    /*box-shadow: 0px 0px 5px rgba(255, 0, 76, 0.8);*/
	top: -10px;
}
#imageSlider .noUi-connect {
    background: #007bff; /* Bleu standard */
}

/* 5. NOUVELLES RÈGLES : Style du Tooltip (Date/Heure) */
#imageSlider .noUi-tooltip {
    /* Permet au contenu d'aller à la ligne (essentiel pour l'affichage sur 2 lignes) */
    white-space: normal; 
    
    /* Ajuster la largeur pour accommoder la date */
    min-width: 90px; 
    max-width: 140px; 
    
    /* Centrer le texte */
    text-align: center; 
    
    /* Augmenter la hauteur pour accommoder 2 lignes */
    padding: 1px 2px; 
    
    /* Optionnel : Ajuster la position pour le nouveau format */
    bottom: 150%; 
    
    /* Optionnel : Légèrement plus grand pour la lisibilité */
    font-size: 0.9em;
}

/* 6. Structure et Style des Graduations Temporelles (Inchangé) */
#slider-ticks {
    position: absolute;
    top: 0px; /*55px; */
    left: 0;
    right: 0;
    height: 35px; 
    z-index: 1;
    pointer-events: none; 
}

/* ... (Le reste des styles .tick, .hour-tick, .hour-12, .hour-00, .day-label reste inchangé) ... */
.tick {
    position: absolute;
    width: 1px;
    height: 10px; 
    background: rgba(255, 255, 255, 0.7); 
    bottom: 0;
    transform: translateX(-50%); 
}

.tick.hour-tick {
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
}

.tick.hour-12 {
    height: 14px; 
    width: 2px;
    background: rgb(150, 250, 255); 
}

.tick.hour-00 {
    height: 18px; 
    width: 3px;
    background: rgb(255, 180, 0); 
}

.day-label {
    position: absolute;
    top: 0px; 
    font-size: 0.8em
	font-weight: 300;
    color: #fff;
    white-space: nowrap; 
    transform: translateX(-50%);
}

/* Style pour les mentions "00h" et "12h" */
.hour-label {
    position: absolute;
    /* Position verticale : sous le tick (les ticks commencent en bas de #slider-ticks) */
    bottom: -20px; /* Déplacer sous les ticks de 10px */
    font-size: 1.0em;
    font-weight: 300;
    color: #fff; /*rgba(255, 255, 255, 0.7); /* Gris clair */
    white-space: nowrap; 
    /* Centrage horizontal sur la position 'left' */
    transform: translateX(-50%); 
}
/* ========================================================================= */
/* Effet impact au doubleclick */
/* ========================================================================= */
#ripple {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #0078ff;
    background-color: rgba(255,255,255,0.8); /* fond blanc semi-transparent */
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    z-index: 10000;
}

/* expansion */
#ripple.expand {
    animation: rippleExpand 500ms ease-out;
}

/* contraction */
#ripple.contract {
    animation: rippleContract 500ms ease-out;
}

@keyframes rippleExpand {
    0%   {opacity:1; transform:translate(-50%,-50%) scale(0.3);}
    100% {opacity:0; transform:translate(-50%,-50%) scale(4);}
}

@keyframes rippleContract {
    0%   {opacity:0; transform:translate(-50%,-50%) scale(4);}
    100% {opacity:1; transform:translate(-50%,-50%) scale(0.3);}
}

/* ========================================================================= */
/* SIDE PANEL POUR LES INFOS DE LA CARTE */
/* ========================================================================= */
/* ===== PANEL GLOBAL ===== */
.info-panel {
  position: fixed;
  top: 132px;
  right: 0;
  height: 100%;
  z-index: 9000;
  cursor: pointer;
  display: flex;
  /*align-items: center;*/
  align-items: flex-start; 

  /* état fermé : seul l’onglet reste visible */
  transform: translateX(calc(100% - 37px)); /* 37px = 25px +2x6px */
  transition: transform 0.3s ease;
}

/* ===== ÉTAT OUVERT ===== */
.info-panel.open {
  transform: translateX(0);
}

/* ===== ONGLET ===== */
.info-tab {
  width: 25;
  height: 100px;

  writing-mode: vertical-rl;
  transform: rotate(180deg);

  background: rgba(30, 30, 30, .8);
  color: #fff;

  padding: 10px 6px;
  cursor: pointer;

  border-radius: 0 8px 8px 0;

  user-select: none;
  font-family: 'Open Sans';
  font-size: 16px;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== CONTENU PANEL ===== */
.info-content {
  width: 320px;
  height: 600px; /*100%;*/

  background: rgba(30, 30, 30, .8);
  color: #f1f1f1;
  
  box-shadow: -5px 0 20px rgba(0,0,0,0.4);
  padding: 15px;

  overflow-y: auto;
  cursor: default;
}

/* ===== HEADER ===== */
.info-header {
  border-bottom: 1px solid #444;
  margin-bottom: 10px;
}

.info-header h3 {
  margin: 0;
  font-family: 'Open Sans';
  font-size: 32px;
}

/* ===== SECTIONS ===== */
.info-section {
  margin-bottom: 15px;
}

.info-section h4 {
  font-family: 'Open Sans';
  font-size: 15px;
  color: #9ecfff;
  margin-bottom: 6px;
}

/* ===== LIGNES ===== */
.info-row {
  display: flex;
  justify-content: space-between;
  font-family: 'Open Sans';
  font-size: 15px;
  margin-bottom: 4px;
}

.info-label {
  color: #aaa;
}

.info-value {
  text-align: right;
}

/* ========================================================================= */
/* Coordinates Panel */
/* ========================================================================= */
/* PANEL GLOBAL */
.coord-panel {
  position: fixed;
  top: 10px;
  right: 0;
  display: flex;
  align-items: center;
  z-index: 9001;

  /* fermé : seul l’onglet visible */
  transform: translateX(calc(100% - 37px)); /* 37px = 25px +2x6px */
  transition: transform 0.3s ease;
}

/* ouvert */
.coord-panel.open {
  transform: translateX(0);
}

/* ONGLET */
.coord-tab {
  width: 25px;
  height: 100px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: rgba(30, 30, 30, 0.7);
  color: #f1f1f1;
  padding: 10px 6px;
  border-radius: 0 8px 8px 0;
  user-select: none;
  font-family: 'Open Sans';
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* CONTENU */
.coord-content {
  width: 240px;
  height: 120px;  /* 120px = 100px + 2x10px */
  box-sizing: border-box;
  background: rgba(30, 30, 30, 0.7);
  color: #f1f1f1;
  padding: 10px 12px;
  box-shadow: -5px 0 15px rgba(0,0,0,0.3);
  font-family: 'Open Sans';
  font-size: 18px;
  white-space: nowrap;
  cursor: default;
}

.coord-header {
  margin: 0;
  font-family: 'Open Sans';
  font-size: 30px;
  margin-top: -10px;
  margin-bottom: 10px;
  border-bottom: 2px solid #444;
  padding-bottom: 0px;
}


/* LIGNES */
.coord-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.coord-label {
  color: #aaa;
}

.coord-value {
  font-family: monospace;
}

/* ========================================================================= */
/* SIDE PANEL POUR LA LEGENDE */
/* ========================================================================= */
/* ===== PANEL GLOBAL ===== */
.legend-panel {
  position: fixed;
  top: 254px;
  right: 0;
  height: 100%;
  z-index: 9000;
  cursor: pointer;
  display: flex;
  align-items: flex-start;

  transform: translateX(calc(100% - 37px));
  transition: transform 0.3s ease;
}

/* ===== ÉTAT OUVERT ===== */
.legend-panel.open {
  transform: translateX(0);
}

/* ===== ONGLET ===== */
.legend-tab {
  width: 25px;
  height: 100px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: rgba(30, 30, 30, .8);
  color: #fff;
  padding: 10px 6px;
  cursor: pointer;
  border-radius: 0 8px 8px 0;
  user-select: none;
  font-family: 'Open Sans';
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== CONTENU PANEL ===== */
.legend-content {
  width: 150px;
  height: 500px;
  background: rgba(30, 30, 30, .8);
  color: #f1f1f1;
  box-shadow: -5px 0 20px rgba(0,0,0,0.4);
  padding: 15px;
  overflow-y: auto;
  cursor: default;
}

/* ===== HEADER ===== */
.legend-header {
  border-bottom: 1px solid #444;
  margin-bottom: 10px;
}

.legend-header h3 {
  margin: 0;
  font-family: 'Open Sans';
  font-size: 32px;
}

/* ===== IMAGE ===== */
.legend-body {
  width: 100%;
  height: calc(100% - 60px); /* ajuste selon la hauteur du header */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#labelBarImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}