 
	#graphique {        margin: 1em;    }
 /* ==========================================================================
   MODE PAYSAGE (LANDSCAPE) : HEADER VERTICAL (100px)
   ========================================================================== */
@media screen and (orientation: landscape) and (max-height: 480px) {

    #graphique {        margin: 1em 3em;    }

}
 
 
 .tremor-widget {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
            background: #1e1e24;
            color: #f5f5f5;
            padding: 20px;
            border-radius: 12px;
            max-width: 700px;
            margin: auto;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        }
        .tremor-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            flex-wrap: wrap;
            gap: 15px;
            border-bottom: 1px solid #333;
            padding-bottom: 15px;
        }
        .tremor-header h2 { margin: 0; font-size: 1.2rem; }
        
        .controls-group {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: center;
        }

        .tremor-status {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
            flex-wrap: wrap;
            align-items: center;
        }
        .tremor-badge, .badge {
            padding: 6px 12px;
            border-radius: 20px;
            font-weight: bold;
            font-size: 0.85em;
            display: inline-block;
        }
        
         #rmsBadge {
            background: #2c3e50;
            color: #ecf0f1;
            border: 1px solid #34495e;
            padding:6px 12px; 
            border-radius:20px; 
            font-size:0.85em;
        }
        
        #stationSelect  {   max-width:12rem;    }
        
        .chart-legend-container
        {
            display:flex; justify-content:center; column-gap:15px; margin-block:12px; font-size:0.75em; color:#aaa; flex-wrap:wrap; text-align:center;
        }
        .chart-legend-container .chartLegende {  display:flex; align-items:center; gap:5px;  }
        
        .trend-up { background: #e74c3c; color: white; }
        .trend-down { background: green; color: white; }
        .trend-stable { background: #282828; color: white; }
        .trend-waking { background: #f1c40f; color: black; }
        .trend-warning { background: #e67e22; color: white; }
        
        /* --- BOÎTES D'INFORMATION (Zéro JS) --- */
.tremor-info-box {
    margin: 15px 0 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.85em;
    color: #bbb;
}

/* Le bouton cliquable (Le fameux 'i') */
.tremor-info-box summary {
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
    color: #3498db;
    list-style: none; /* Cache la flèche native */
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

/* Retire la flèche sur les vieux navigateurs Safari/Chrome */
.tremor-info-box summary::-webkit-details-marker {
    display: none;
}

/* Effet au survol */
.tremor-info-box summary:hover {
    color: #5dade2;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

/* Le texte qui se déroule */
.tremor-info-box .info-content {
    padding: 0 12px 12px 12px;
    line-height: 1.5;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 5px;
    padding-top: 10px;
}

        
        select {
            padding: 8px;
            border-radius: 8px;
            background: #3a3a48;
            color: white;
            border: 1px solid #555;
            outline: none;
            cursor: pointer;
        }
        .canvas-container {
            position: relative;
            height: 300px;
            width: 100%;
        }
        
        
        #divTremorGraph {    height:200px; position:relative;    }
        #divSeismeGraph {   height: 150px; width: 100%; }
        
        @media screen and (min-width: 560px) {
            #divSeismeGraph {  height: 180px;  }
            #divTremorGraph {  height: 220px;  }
        }
        @media screen and (min-width: 768px) {
            #divSeismeGraph {  height: 230px;  }
            #divTremorGraph {  height: 250px;  }
        }
        
        /* --- LÉGENDE SISMICITÉ --- */

/* --- TABLEAU DE BORD SISMIQUE (OVPF) --- */

/* Conteneur principal (côte à côte) */
.seismic-dashboard {
    display: flex;
    justify-content: space-evenly; /* Espace les colonnes équitablement */
    align-items: flex-start;
    gap: 15px;
    margin: 15px 0 10px 0;
}

/* Une colonne (Séisme ou Éboulement) */
.seismic-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1; /* Chaque boîte prend la moitié de l'espace */
}

/* Le gros chiffre */
.seismic-number {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    color: #f5f5f5;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Le petit texte sous le chiffre */
.seismic-label {
    font-size: 0.8rem;
    color: #bbb;
    line-height: 1.2;
}

/* Le texte détaillé en bas (Secousse la plus importante) */
.seismic-details {
    text-align: center;
    font-size: 0.75rem;
    color: #888;
    padding-top: 5px;
    border-top: 1px dashed #333; /* Petite ligne de séparation subtile */
    font-style: italic;
}

.chart-legend-container span {
    display: flex;
    align-items: center;
}

.chartLegende-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

/* Couleurs calquées sur ton graphique */
.dot-bleu   { background: rgba(52, 152, 219, 0.8); }
.dot-vert   { background: rgba(46, 204, 113, 0.8); }
.dot-jaune  { background: rgba(241, 196, 15, 0.9); }
.dot-orange { background: rgba(230, 126, 34, 0.9); }
.dot-rouge  { background: rgba(192, 57, 43, 0.9); }
        
        .mapStations {  padding: 5px; border-radius: 6px; transition: 0.2s;text-decoration:none;background-color:#ffffff0a;    }
        
        #resifPlotContainer 
        {        margin-top: 20px; text-align: center; width: 100%;display:none;
                border-radius: 10px;
                overflow: clip; 
                min-height: 100px;
        }
        
         @media screen and (min-width: 560px) { #resifPlotContainer{   min-height: 160px; }   }
        @media screen and (min-width: 1024px) {    #resifPlotContainer{   min-height: 230px;}  }
  
    
        #resifPlotImage   {   max-width: 105%; /* pour coller au graphique au dessus*/height: auto; /* border-radius: 8px; */ display: block; margin: 0 auto; background: rgba(0,0,0,0.1);    filter: invert(0.95);}
        
        #dateDisplay    {       font-size: 0.85em;
    /* color: #aaa; */
    /* margin-top: 5px; */
    text-align: center;
    font-style: italic;
        }
        
/* Effet de transparence sur le graphique pendant le chargement */
.tremor-loading {
    opacity: 0.5;
    filter: grayscale(0.5); /* Optionnel : met en gris pour bien montrer que c'est "vieux" */
    transition: opacity 3s ease;
}

/* Animation douce pour le badge de statut */
.loading-pulse {
    animation: pulse 1s infinite;
    opacity: 0.9;
}
.loading-pulse .iconLoading {
animation: pulse 2s infinite, volcanSpin 1.1s linear infinite;
  opacity: 0.7;
  display: inline-block;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/*
.volcan-webcams {
  margin-top: 18px;
}

.volcan-webcams__chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.volcan-webcams__chips .chip {
  flex: 0 0 auto;
  white-space: nowrap;
}

.volcan-webcams__nav {
  justify-content: space-between;
}

.volcan-webcams__nav .btn {
  min-width: 110px;
}

.volcan-webcams .card {
  margin-top: 8px;
}
*/

        /* --- LAYOUT GNSS --- */
            
        .imageGNSS {     
        width: 100%;
          object-position: bottom;
          border-radius: 12px;
          filter: invert(0.89) hue-rotate(270deg);
          transition: all 0.3s ease; /* Animation fluide lors du clic */
        }
        
        /* 1. Vue Complète par défaut */
.gnss-view-complet .imageGNSS {
    object-fit: contain;
    aspect-ratio: auto;
}

/* 2. Vue Verticale (Composante UP = En bas de l'image) */
.gnss-view-vertical .imageGNSS {
    object-fit: cover;
    object-position: bottom;
    aspect-ratio: 2.5 / 1;
}

/* 3. Vue Nord (Au milieu) */
.gnss-view-nord .imageGNSS {
    object-fit: cover;
    object-position: center;
    aspect-ratio: 2.5 / 1;
}

/* 4. Vue Est (En haut) */
.gnss-view-est .imageGNSS {
    object-fit: cover;
    object-position: top;
    aspect-ratio: 2.5 / 1;
}

/* 5. Vue Horizontale (Est + Nord combinés) */
.gnss-view-horizontal .imageGNSS {
    object-fit: cover;
    object-position: top;
    aspect-ratio: 1.25 / 1; /* Ratio plus carré pour afficher 2 graphiques sur 3 */
}
    

.gnss-header-layout {
    border: none !important;
    padding-bottom: 0 !important;
}

.gnss-title {
    margin-top: 0;
    font-size: larger;
    font-weight: bold;
    padding-right: 2rem;
}
    #gnssPlotContainer  {  margin-top: 15px; text-align: center; width: 100%;  }
    #gnssCropControls  {    }
    #gnss-groupImage  {  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 15px;  }
    #gnssCropControls  {  display:flex; gap:5px; flex-wrap: wrap;  }
    #gnssGroupSelect  {padding: 6px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.3); color: #fff; flex-grow: 1;    }
    #gnssTimeSelect  {  margin-right: 10px;  }
    #gnss-header  {  display:flex; flex-wrap:wrap; gap: 10px; align-items: center; margin-top: 15px; width: 100%;  }


/* --- ACCORDÉON GNSS --- */
.gnss-accordion summary {
    list-style: none; /* Cache la flèche standard */
    cursor: pointer;
    display: flex;
    align-items: center;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    justify-content: space-between;
}

/* Cache la flèche sur Safari */
.gnss-accordion summary::-webkit-details-marker {
    display: none;
}

/* Design de la flèche personnalisée */
.gnss-arrow-icon::after {
    content: '▼';
    font-size: 0.7em;
    margin-left: 10px;
    color: #888;
    transition: transform 0.3s ease;
    display: inline-block;
}

/* Rotation de la flèche quand c'est ouvert */
.gnss-accordion[open] .gnss-arrow-icon::after {
    transform: rotate(180deg);
}

/* Petit espacement pour le contenu déroulé */
.gnss-collapsible-wrapper {
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 10px;
}
/* ----------------------- */
.volcan-webcams {
  margin-top: 18px;
  transition: opacity 0.25s ease;
}

.volcan-webcams__chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.volcan-webcams__chips .chip {
  flex: 0 0 auto;
  white-space: nowrap;
}

.media-container, .media-container  .media{
     min-height: 160px;   
}
.volcan-webcams__viewer{
  display: flex;
  align-items: stretch;
  justify-content: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

@media screen and (min-width: 990px) {
  .media-container  {
    min-height: 370px;
  }
}
@media screen and (min-width: 560px) {
   .media-container  {
    min-height: 300px;
  }
}

/* .volcan-webcams__viewer.is-loading { */
  /* opacity: 0.72; */
/* } */

/* Affiche le loader si le parent a la classe is-loading */
.volcan-webcams__viewer.is-loading .volcan-webcams__loading {
    display: flex;
}

.volcan-webcams__loading {
  width: auto;
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: #aaa;
  font-size: 0.95rem;
  text-align: center;
    margin: 2rem;
}

.volcan-webcams__loadingIcon {
  display: inline-block;
  animation: volcanSpin 1.1s linear infinite;
}

@keyframes volcanSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.volcan-webcams__nav {
  justify-content: space-between;
}

@media screen and (min-width: 990px) {
    .volcan-webcams__nav .btn,  .volcan-webcams__nav .btn.btnIcon {
     width: 110px;
        padding-block: 1em;
    }
}
.volcan-webcams__nav .btn.btnIcon {
    min-width: fit-content;
}

.volcan-webcams .card {
  margin-top: 8px;
  width: 100%;
  opacity: 1;
  transition: opacity 0.22s ease, transform 0.22s ease;
}


/* Centre le sablier lors du rafraîchissement d'une webcam */
/* .webcam-refresh-loader { */
    /* display: flex; */
    /* justify-content: center; */
    /* align-items: center; */
    /* width: 100%; */
    /* height: 100%; */
    /* font-size: 3rem; /* Taille du sablier */ 
/* } */

/* 1. Le parent (qui englobe le loader ET l'image) DOIT servir de repère */
#webcamMediaContainer { 
    position: relative; 
}

/* 2. Le loader qui passe par-dessus */
.webcam-refresh-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10; /* Force le loader à passer au premier plan (au-dessus de .media) */
    
    /* Optionnel mais recommandé : centrer le contenu et assombrir l'image derrière */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
     font-size: 2rem; /* Taille du sablier */ 
    /* background: rgba(0, 0, 0, 0.4);*/ /* Fond noir transparent à XX% */ 
    opacity: 0;
  visibility: hidden;
    transition: opacity 0.3s ease-in;
    backdrop-filter: blur(2px);
}
.webcam-refresh-loader.active {
    opacity: 1;
     visibility: visible;
}

/* --- ANIMATIONS DE GLISSEMENT --- */
.slide-in-right { animation: slideInR 0.4s ease-out forwards; }
.slide-in-left  { animation: slideInL 0.4s ease-out forwards; }

@keyframes slideInR {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes slideInL {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* 3. Transition fluide pour le conteneur */
.volcan-webcams__viewer {
  overflow: hidden; /* Pour éviter que l'image ne dépasse pendant le swipe */
  transition: height 0.3s ease;
      width: 110%;
    display: grid; /* pour ios, test */
    justify-self: center;
    /* place-self: anchor-center; */
}

#webcamBtnPrev, #webcamBtnNext {
    min-width: 4rem;
    min-height: 2rem;
}

@media screen and (min-width: 768px) {
    
    #webcamBtnPrev, #webcamBtnNext {
    min-width: 8rem;
}

}

/* ---------------------------------------------- */

/* Couleurs de dangerosité du risque */
/* .risk-green { background-color: #2ecc71; color: white; } */
.risk-yellow { background-color: #f1c40f; color: black; }
.risk-orange { background-color: #e67e22; color: white; }
.risk-red { background-color: #e74c3c; color: white; }


/* --- COMPOSANTS OVPF --- */
.ovpf-header-box {   
 /* background: #1a1a20c2; */
    /* border: 1px solid #333; */
    /* border-radius: 12px; */
    padding: 15px;}
.ovpf-alert-row { display: flex; justify-content: space-between; align-items: center; /* margin-bottom: 12px;  */}
/* Couleurs officielles ORSEC pour les badges d'alerte */
.ovpf-badge-alerte { padding: 6px 12px; border-radius: 6px; font-weight: bold; text-transform: uppercase; font-size: 0.9em; text-align: center; }

.alerte-rouge  { background: #c0392b; color: white; } /* 🔴 Alerte 2-2 */
.alerte-orange { background: #e67e22; color: white; } /* 🟠 Alerte 2-1 */
.alerte-jaune  { background: #f1c40f; color: black; } /* 🟡 Alerte 1 */
.alerte-vert   { background: #27ae60; color: white; } /* 🟢 Vigilance */
.alerte-blanc  { background: #f5f5f5; color: black; } /* ⚪ Sauvegarde */
.alerte-gris   { background: #555555; color: white; } /* Par défaut / Inconnu */

/* Lien Icône Communiqués */
.ovpf-icon-link { font-size: 1.4em; text-decoration: none; filter: grayscale(1); transition: 0.2s; }
.ovpf-icon-link:hover { filter: grayscale(0); transform: scale(1.1); }

/* Contenu toujours visible */
.ovpf-infos-content {     background-color: #1a1a204a;
    border-left: 3px solid #3498db;
    padding-inline: 12px;
    padding-block: .5rem;
    margin-top: 1rem;
    margin-bottom: -.5rem;
    font-size: 0.75em;
    font-weight: 500;
    line-height: 1.1;
    color: #71baff;
    font-family: system-ui;}

/* Guide des alertes */
.ovpf-details-alerte { margin-top: 15px; /* background: rgba(255,255,255,0.03); */ border-radius: 8px; padding: 8px; font-size: 0.85em;
    border: solid #ffffff12 thin; }
.ovpf-details-alerte summary { cursor: pointer; color: #888; font-weight: bold; }
.ovpf-alert-guide { margin-top: 10px; color: #bbb;    font-size: small; 
    padding-inline: 1rem; }
.ovpf-alert-guide b { color: #ddd; }
.ovpf-alert-guide h2 {margin-top: 0; color: white; text-align: center; margin-bottom: 15px;}

/* Rapports dans les widgets (Sismicité & GNSS) */
.ovpf-mini-report { background: rgba(0,0,0,0.2); border-radius: 8px; padding: 10px; margin-bottom: 15px; font-size: 0.85em; color: #aaa; border-left: 2px solid #555;
    line-height: 1.5; }
.ovpf-mini-report b { color: #eee; }.ovpf-mini-report b { color: #eee; }

.infoSourceBulletin {  font-size: .5rem;  color:#ddd;  text-align: end;
    margin-top: .5rem;
    margin-bottom: -1rem    
}

/* --- TABS GNSS --- */
.gnss-panel-box { background: #1a1a20; border: 1px solid #333; border-radius: 12px; padding: 0; margin-bottom: 20px; overflow: hidden; }
.gnss-tabs-row { display: flex; border-bottom: 1px solid #333; background: #111; }
.gnss-tab-btn { flex: 1; padding: 12px 15px; background: none; border: none; border-bottom: 2px solid transparent; color: #888; cursor: pointer; font-weight: bold; font-size: 0.9em; outline: none; transition: 0.2s; }
.gnss-tab-btn:hover { background: rgba(255,255,255,0.05); color: #ddd; }
.gnss-tab-btn.active { color: #f5f5f5; border-bottom: 2px solid #3498db; background: #1a1a20; }

/* Masquer/Afficher les onglets */
.gnss-tab-content { display: none; padding: 20px; }
.gnss-tab-content.active { display: block; }

/* --- IMAGE OVPF ET EFFET --- */
.ovpf-image-container { position: relative; width: 100%; overflow: hidden; border-radius: 8px; border: 1px solid #333; }
.ovpf-image-baseline { width: 100%; display: block; height: auto;     filter: invert(0.9) hue-rotate(90deg);}
/* Le voile sombre sur les 3/4 gauche de l'image */
.ovpf-image-container::after {    content: "";
    position: absolute;
    top: 7.6%;
    left: 8%;
    width: 71%;
    height: 81.4%;
    background: rgba(25, 25, 25, 0.9);
    pointer-events: none; }
.ovpf-image-legend { margin-top: 10px; font-size: 0.85em; color: #bbb; line-height: 1.4; font-style: italic; 
    text-align: justify;}

#alerteModal 
{
       background: #325860;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px 10px;
    margin-block: 1rem;
    max-width: 95vw;
    max-height: 90vh;
    height: revert;
    width: 500px;
    box-shadow: 0 0 20px 10px black;
}


/* --- DOUBLE SLIDER HZ (Mode Avancé) --- */
.advanced-filter-container {
    display: none; /* Rendu visible via JS */
    align-items: center;
    gap: 15px;
    background: rgba(0,0,0,0.3);
    padding: 5px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.filter-group label {
    font-size: 0.75em;
    color: #bbb;
    white-space: nowrap;
}

.filter-group input[type="range"] {
    width: 65px;
    appearance: none;
    background: #555;
    height: 4px;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.filter-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3498db;
    transition: transform 0.1s;
}

.filter-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

#pwa-advanced-wrapper {
    max-width: 700px;
display: none; align-items: center; gap: 10px; margin: 0 auto; padding: 7px 14px; background: rgba(255,255,255,0.01); border-radius: 20px;
}

/* Container du Switch */
.pwa-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  padding-left: 5px;
        vertical-align: bottom;
}

/* Masquer le checkbox natif */
.pwa-switch input {
  opacity: 0; width: 0; height: 0;
}

/* Le rail du slider */
.pwa-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #444;
  transition: .3s;
  border-radius: 20px;
}

.pwa-slider:before {
  position: absolute;
  content: "";
  height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

/* Couleurs d'activation */
input:checked + .pwa-slider { background-color: #3498db; }
input:checked + .pwa-slider:before { transform: translateX(14px); }}


/* --- SEGMENTED CONTROLS (Onglets liés type iOS) --- */
.segmented-control {
    display: flex;
    background: #111;
    border-radius: 6px;
    padding: 2px;
    border: 1px solid #333;
}

.seg-btn {
    flex: 1;
    background: transparent;
    color: #888;
    border: none;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.seg-btn:hover {
    color: #ccc;
}

/* L'onglet actif */
.seg-btn.active {
    background: #3498db; /* Ton bleu existant */
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Inputs sombres */
.dark-input {
    width: 70px;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #222;
    color: white;
    font-size: 0.85rem;
    text-align: center;
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    filter: grayscale(1);
    transition: 0.2s;
}
.icon-btn:hover { filter: grayscale(0); transform: scale(1.1); }