/* styles.css */
:root{
  --primary:#0354c3;          
  --primary-600:#024aa6;
  --secondary:#f7db60;       
  --surface:#ffffff;
  --surface-2: #f7f9fc;
  --text:#1f2937;
  --muted:#6b7280;
  --ring: rgba(3,84,195,0.35);
  --shadow: 0 8px 24px rgba(3,84,195,0.10), 0 2px 8px rgba(0,0,0,0.06);
  --radius: 14px;
  --radius-sm: 12px;
  --radius-lg: 18px;
}


.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(2,74,143,0.06);
}

.card:hover{ transform: translateY(-2px); transition: .25s ease; }

.badge {
  display:inline-flex; align-items:center; gap:8px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(247,219,96,.18); color:#915f00; font-weight:600; font-size:12px;
}

.btn {
  border: 0; border-radius: 12px; padding: 10px 14px; font-weight:700;
  background: linear-gradient(180deg, var(--primary), var(--primary-600));
  color:#fff; box-shadow: var(--shadow); cursor: pointer;
}

.btn:hover{ filter: brightness(1.05); }

.btn-secondary{ background: #111827; }

.input, .select{
  width:100%; border-radius: 12px; border:1px solid #e5e7eb;
  padding:10px 12px; background:#fff; color:var(--text);
}

.input:focus, .select:focus{
  outline: 3px solid var(--ring);
  border-color: var(--primary);
}

.slider {
  -webkit-appearance: none; width:100%; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--secondary), #ffd861);
}

.slider::-webkit-slider-thumb{
  -webkit-appearance: none; width:18px; height:18px; border-radius:50%;
  background: var(--primary); box-shadow: 0 0 0 3px rgba(3,84,195,.25);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}
/* 🧭 Grille de catégories dans la sidebar */
.category-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  margin-bottom:14px;
}
.category-card{
  background:linear-gradient(140deg,rgba(3,84,166,.12),rgba(247,219,96,.10));
  border:1px solid rgba(247,219,96,.25);
  border-radius:12px;
  overflow:hidden;
  cursor:pointer;
  transition:transform .25s, box-shadow .25s, border-color .25s;
  display:flex; flex-direction:column;
}
.category-card:hover{ transform:translateY(-3px); box-shadow:0 8px 18px rgba(0,0,0,.25); border-color:var(--secondary); }
.category-thumb{height:110px;
  background:#0f1c2a center/cover no-repeat; /* cover = photo plein cadre */
  border-radius:14px 14px 0 0; }
.category-title{ padding:10px 12px; font-weight:700; color:#ECF0F1; font-size:13.5px; }
.category-card.active{ border-color:var(--secondary); box-shadow:0 0 0 2px rgba(247,219,96,.25) inset; }
/* === Définition des images par carte (CSS variables) === */
.card-bim   { --bg-url: url("./icon/cards/bim.jpg"); }
.card-nuage { --bg-url: url("./icon/cards/nuage.jpg"); }
.card-archi { --bg-url: url("./icon/cards/archi.jpg"); }
.card-modele{ --bg-url: url("./icon/cards/modele.jpg"); }


/* === Loader plein écran === */
#loader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #ffffff; /* fond blanc, tu peux changer */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999; /* devant tout */
  transition: opacity 0.8s ease;
}

.logo-img {
  width: 300px;
  height: auto;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.map-attrib{
  position:absolute;
  right:10px;
  bottom:8px;
  background:rgba(0,0,0,.45);
  color:#fff;
  font-size:11px;
  padding:4px 8px;
  border-radius:6px;
  z-index:1000
}

/* === Logo texte stylisé === */
.logo-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 42px;
  font-weight: 900;
  color: #0354c3;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.25);
}

.logo-text span {
  color: #f7db60; /* partie REVO en jaune */
}


.back-button{
  background: var(--secondary);
  color: var(--dark);
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  margin: 8px 0 12px;
}
.back-button:hover{ filter: brightness(1.05); }


/* Zone principale du viewer */
#viewer_container {
    width: 100%;
    height: 100vh;
    background-size: cover;
    /* Pour que l'image couvre toute la zone */
    background-position: center;
    /* Centre l'image dans la zone */
    background-repeat: no-repeat;
    /* Empêche la répétition de l'image */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    color: #333;
    font-size: 20px;
}

#cesiumContainer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Titre en haut de l'écran avec style et transparence */
.header-title {
    position: fixed;
    font-family: 'Montserrat', sans-serif;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: bold;
    color: #0354c3;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
    background: linear-gradient(to right,
            rgba(247, 219, 96, 0.8),
            rgba(255, 215, 0, 0.1));
    padding: 8px 20px;
    border-radius: 5px;
    z-index: 7;
    letter-spacing: 1px;
    transition: all 0.3s ease;

}

.header-title:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 84, 166, 0.4);
}

.close-button{
    width: fit-content;
}

#menuIcon, .close-button {
  font-family: 'Montserrat', sans-serif;
  font-style: bold;
  font-weight: 600;
  background: var(--secondary);
  color: var(--primary-600);
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

#menuIcon:hover, .close-button:hover {
  background: #d2cf02;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

#menuIcon::before {
  content: "☰";
  font-size: 18px;
}

.tool::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #2c3e50;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
  margin-bottom: 8px;
}

.tool:hover::after {
  opacity: 1;
}

.tooltip:hover::after {
  opacity: 1;
}
/* Cache le logo + textes de crédits (à n'utiliser que pour debug) */
.cesium-credit-logoContainer,
.cesium-credit-textContainer { display: none !important; }

.sidebar {
    position: fixed;
    display: flex;
    flex-direction: column;
    height: 100vh;
    left: 0;
    top: 0;
    width: 300px;
    max-width: 80%;
    background:rgba(0, 66, 120, 0.5);
    color: #ECF0F1; /* Couleur de texte principale */
    padding: 20px 15px 80px;
    padding-bottom: 80px; /* Espace pour le bouton */

    transform: translateX(-100%);
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;

    z-index: 1000;
    opacity: 0.97;
    border-right: 3px solid #f7db60;
    overflow-y: auto;
    user-select: none;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.sidebar.open {
  transform: translateX(0) scale(1.01);
  opacity: 1;
}

.sidebar-content {
  padding: 10px;
    flex: 1;
  overflow-y: auto;
  padding-bottom: 20px; 
}
.sidebar::after {
  content: "";
  position: sticky;
  bottom: 0;
  display: block;
  height: 60px;
  width: 100%;
  background: linear-gradient(to top, 
              rgba(44, 62, 80, 1) 0%, 
              rgba(44, 62, 80, 0) 100%);
  pointer-events: none;
}
/* Bouton de fermeture en bas du menu */


.close-button:hover {
  
  transform: translateX(-1%) scale(1.05);
}

/* Styles pour les sections de la barre latérale */
.sidebar h3 {
 color: var(--secondary); 
   text-shadow: 1px 1px 2px rgba(0,0,0,0.3); /* Légère ombre pour meilleure lisibilité */

   font-size: 1.3rem;
  margin: 20px 0 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(247, 219, 96, 0.3);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.sidebar h3:hover {
    background-color: rgba(247, 219, 96, 0.8);
}


.section-content.active {
    display: block;
}

/* Icônes de Navigation et Découpage */
.sidebar .icon-set {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
}

.sidebar #menu-3D {
    display: none;
    /* Par défaut */
}

.sidebar.open #menu-3D {
    display: block;
    /* Visible lorsqu'on ouvre la sidebar */
}

.icon-small {
    width: 25px;
    height: 25px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #d1d1d1, #808080);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4),
        inset -2px -2px 5px rgba(255, 255, 255, 0.5);
   
}

.icon-small img {
    width: 70%;
    height: 70%;
    filter: brightness(0) saturate(100%);
}

.icon-small:hover {
    transform: scale(1.1);
    background: radial-gradient(circle at 30% 30%, #f7db60, #d1d1d1, #808080);
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
  color: #ECF0F1; 
  padding: 8px 15px; 
  margin: 5px 0; 
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;  
  font-size: 13px;
  font-weight: bold;
    
    background-color: transparent;
    border: none;
    cursor: pointer;
}

.sidebar ul li:hover {
    background-color: rgba(247, 219, 96, 0.3); /* Jaune transparent au survol */
  color: #FFFFFF; /* Texte blanc pur au survol */
}

/* Style du conteneur du menu */
.filter-container {
    width: 250px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: Arial, sans-serif;
}

/* Style pour chaque élément de filtre */
.filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

/* Style de la checkbox */
.filter-checkbox {
    margin: 5px;
    margin-right: 10px;
    align-self: center;
    /* Aligne verticalement les cases à cocher */
}

/* Style du texte du filtre */
.filter-label {
    flex-grow: 1;
    font-size: 14px;
    color: #fff;
}

/* Style de l'outil de sélection de couleur */
.filter-color {
    margin-left: 8px;
    cursor: pointer;
    border: none;
    width: 30px;
    height: 25px;
}

/* Boutons d'Arrière-plan */
.background-options {
    display: flex;
    justify-content: space-around;
    margin: 10px 15px;
    gap: 5px;
    overflow: hidden;
}

.background-btn {
    padding: 6px;
    font-size: 12px;
    color: #333;
    background-color: #f7db60;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.background-btn:hover {
    background-color: #0354c3;
    color: #fff;
}

/* Slider pour opacité */
.slider-container {
    margin: 5px 10px;
}

.slider-container label {
    font-size: 13px;
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
    font-weight: bold;
}

.slider-container input[type="range"] {
    width: 100%;
}

/* Barre d'outils de mesure */
.tools-bar {
    
    position: fixed;
    bottom: 80px; /* Augmentez cette valeur pour décaler vers le haut */
    left: 50%;
    transform: translateX(-50%);
    display: none; /* Caché par défaut */
    flex-direction: row; /* Affichage vertical */
    gap: 10px;
    z-index: 101; /* Z-index plus élevé que les icônes */
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-width: 90%;
}

.tools-bar.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}



.tool-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tool-icon:hover {
     transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}
.tool-icon:active {
  transform: translateY(1px) scale(0.98);
}
.tool-icon img {
    width: 60%;
    height: 60%;
    filter: brightness(0) saturate(100%);
    pointer-events: none;
}

.view-icon-main img {
    width: 70%;
    height: 70%;
}

/* Barre de vue (space) qui sort de droite à gauche */
.view-bar-container {
    display: none;
    flex-direction: row;
    gap: 10px;
    background-color: rgba(46, 46, 46, 0.7);
    padding: 5px;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 60px;
    right: 70px;
    z-index: 5;
}

.view-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, #ffffff, #d1d1d1, #808080);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4),
        inset -2px -2px 5px rgba(255, 255, 255, 0.5);
    transition: transform 0.2s, background 0.2s;
}

.view-icon:hover {
    transform: scale(1.1);
    background: radial-gradient(circle at 30% 30%, #f7db60, #d1d1d1, #808080);
}

.view-icon img {
    width: 60%;
    height: 60%;
}

.view-switch {
    width: 40px;
    height: 40px;
    background-color: rgba(46, 46, 46, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid #ddd;
}

.view-switch-container {
    display: flex;
    gap: 0;
    /* Pas d'espace entre les boutons */
    position: fixed;
    top: 6px;
    right: 48%;
    z-index: 6;
}

.view-switch:hover {
    background-color: #f7db60;
    color: #333;
}

/* Styles pour l'icône */
.view-switch img {
    width: 70%;
    height: 70%;
}

/* Barre de contrôle en bas avec effet 3D */
.footer-controls {
    position: fixed;
    bottom: 10px;
    background-color: rgba(46, 46, 46, 0.7);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 15px;
    gap: 10px;
    z-index: 5;
    border-radius: 12px;
    left: 45%;
}

.footer-controls .icon-wrapper {
    position: relative;
    width: 45px;
    height: 45px;
    background: radial-gradient(circle at 30% 30%, #ffffff, #d1d1d1, #808080);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4),
        inset -2px -2px 5px rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s, transform 0.2s;
}

.footer-controls .icon-wrapper:hover {
    transform: scale(1.1);
    background: radial-gradient(circle at 30% 30%, #f7db60, #d1d1d1, #808080);
}

.footer-controls .icon-wrapper img {
    width: 70%;
    height: 70%;
}

.footer-controls .icons-group {
    display: flex;
    gap: 10px;
}

.tooltip {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
}
.other .tooltip {
    position: relative; /* Nécessaire pour positionnement absolu des pseudo-éléments */
}

.other .tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%; /* Positionne en dessous de l'icône */
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    margin-top: 8px; /* Espace entre l'icône et le tooltip */
}
 .icon-wrapper:hover .tooltip {
    visibility: visible;
    opacity: 1;
}
/* === DASHBOARD — Pro + Jeune (glass / néomorphisme léger) === */

/* Conteneur latéral */
.dashboard-container{
  position: fixed; right: 24px; bottom: 80px;
  width: 360px; height: 74vh; padding: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(245,247,252,.88));
  backdrop-filter: blur(12px);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(2,16,40,.18);
  border: 1px solid rgba(2,74,143,.08);
  transform: translateX(110%); transition: transform .35s ease;
  z-index: 9; overflow-y: auto;
}
.dashboard-container.active{ transform: translateX(0); }

/* Grille intérieure */
.dashboard-mini{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Cartes */
.stat-card{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(14,30,80,.07);
  border-radius: 16px;
  padding: 16px 16px 14px;
  box-shadow: 0 8px 22px rgba(17,24,39,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(17,24,39,.12);
  border-color: rgba(14,30,80,.14);
}

/* Titre de carte : barre colorée à gauche (+ emoji autorisé) */
.stat-title{
  display:flex; align-items:center; gap:10px;
  font: 700 15.5px/1.25 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color:#0f172a; margin: 2px 0 10px; position:relative; padding-left:12px;
}
.stat-title::before{
  content:""; position:absolute; left:0; top:4px; bottom:4px; width:4px; border-radius:6px;
  background: linear-gradient(180deg, #0354c3, #06b6d4);
  box-shadow: 0 0 0 1px rgba(3,84,195,.08);
}
.stat-title img, .stat-title svg{ width:16px; height:16px; opacity:.85 }

/* Valeurs / texte */
.stat-value{ font: 500 13.5px/1.5 Inter, system-ui, sans-serif; color:#334155; }

/* Charts (Chart.js) */
#materialsChart, #progressChart, #phaseChart{
  width:100% !important; height: 190px !important; display:block;
}
.chart-container-bar{ width:100%; height:190px; display:flex; align-items:center; justify-content:center; }

/* Mini progress (si tu les utilises) */
.progress-card{ background: rgba(255,255,255,.92); border:1px solid rgba(14,30,80,.07); border-radius:16px; padding:14px; }
.progress-bar-mini{ width:100%; height:8px; background:#e8edf6; border-radius:99px; overflow:hidden; }
.progress-mini{ height:100%; background: linear-gradient(90deg,#10b981,#22c55e); }

/* Scroll doux dans le panneau */
.dashboard-container::-webkit-scrollbar{ width:8px; }
.dashboard-container::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(3,84,195,.25), rgba(6,182,212,.25));
  border-radius: 99px;
}


.theme-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--secondary);
   text-shadow: none; 
  background: rgba(0,0,0,0.2);
  padding: 12px 15px;
  margin: 15px 0 10px;
  border-left: 4px solid var(--secondary);
  transition: all 0.3s ease;
}
.group-title {
    position: relative;
  cursor: pointer;
    user-select: none;
  transition: all 0.3s ease;
  font-weight: 600;
  color: white;
  padding: 10px 15px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.group-title::before {
  content: "▶";
  font-size: 10px;
  transition: transform 0.3s;
}

.group-title:hover::before {
  transform: rotate(90deg);
}

.group-title:hover {
  background: linear-gradient(to right, #2c3e50, #1a2634);
  box-shadow: inset 2px 0 0 #f7db60;
  color: #f7db60;
}

#menu-2D  {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#menu-2D .theme-title:hover {
    background-color: rgba(247, 219, 96, 0.8);
    color: #333;
}

/* Conteneur de groupe dans le menu 2D */
#menu-2D .group-container {
  margin-left: 10px;
  border-left: 2px solid #f7db60;
  padding-left: 10px;
  display: none;
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 1000px;
    /* Masqué par défaut, visible au clic */
}
.group-container.collapsed {
  max-height: 0 !important;
}
.group-title.collapsed::before {
  transform: rotate(-90deg) !important;
}
/* Titre du groupe dans le menu 2D */

.layer-item {
    padding: 10px 15px 10px 30px;
    margin: 5px 0;
    border-radius: 4px;
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: relative;
    color: #ECF0F1 !important;
    transform: translateX(-10px);
    opacity: 0;

}

.layer-item::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--secondary);
  border-radius: 50%;
}

.layer-item:hover {
  background: rgba(247, 219, 96, 0.15);
  transform: translateX(5px);
}

.group-container.collapsed .layer-item {
  opacity: 0;
  transform: translateX(-10px);
}
.layer-item {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.group-container:not(.collapsed) .layer-item {
  opacity: 1;
  transform: translateX(0);
}

.layer-item label {
  color: #ecf0f1 !important;
  margin-left: 8px;
  font-weight: 500
}

#menu-2D .layer-item input {
    margin-right: 10px;
    /* Espacement entre la case à cocher et le texte */
}

#menu-2D .layer-item label {
    cursor: pointer;
}
#materialsChart, #progressChart, #phaseChart {
  width: 100% !important;
  height: 190px !important; /* ou 220px si tu veux plus haut */
  display: block;
}

/* style M grid mesh */
#meshGridContainer {
    display: flex;
    flex-wrap: wrap;
    /* Pour que les éléments se répartissent sur plusieurs lignes */
    gap: 20px;
    /* Espacement entre les éléments */
    padding: 20px;
    overflow-y: auto;
    /* Permettre le défilement vertical */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    /* Limite la largeur pour que les cartes ne soient pas trop espacées */
    height: 100%;
    /* Limite la hauteur pour laisser un peu d'espace en haut/bas */
    background-color: rgba(0,
            0,
            0,
            0.8);
    /* Fond sombre pour une meilleure lisibilité */
    z-index: 1;
    justify-content: center;
    /* Centre les éléments horizontalement */
    align-items: center;
    /* Centre les éléments verticalement */
}

.meshProjectCard {
    flex: 1 1 calc(25% - 20px);
    /* Pour afficher 4 projets par ligne */
    box-sizing: border-box;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    color: white;
    max-width: calc(25% - 20px);
    /* Limite la taille maximale à 25% de la largeur */
    text-align: center;
    /* Centre le contenu texte */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    /* Ajoute un effet d'ombre pour un meilleur visuel */
    transition: transform 0.3s;
    /* Transition lors du survol */
}

.meshProjectCard:hover {
    transform: scale(1.05);
    /* Zoom sur la carte lors du survol */
}

.meshProjectCard iframe {
    width: 100%;
    height: 200px;
    /* Hauteur de chaque iframe, ajustable */
    border: none;
}

.meshProjectInfo {
    padding: 10px;
    font-size: 14px;
    text-align: center;
}

.demo-ribbon {
  position: fixed;
  bottom: 0;
  right: -45px;
  background: linear-gradient(135deg, #ff3333, #cc0000);
  color: white;
  padding: 12px 60px; /* Taille augmentée */
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  transform: rotate(-45deg);
  transform-origin: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  z-index: 100;
  pointer-events: none;
  letter-spacing: 1px; /* Meilleure lisibilité */
  border-top: 2px solid white;
  border-bottom: 2px solid white;
  animation: pulse 2s infinite alternate;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);


}

/*mesure*/
/* Cache le curseur normal quand l'outil est activé */
.crosshair-active {
    cursor: none !important;
}

/* Curseur en croix jaune, plus fin et bien visible */
#custom-cursor {
    position: absolute;
    width: 28px;
    /* Augmenté légèrement */
    height: 28px;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    display: none;
    /* Caché par défaut */
    background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='none' stroke='%23d4a700' stroke-width='3.5' d='M16 0v12M16 20v32M0 16h12M20 16h32'/%3E%3C/svg%3E") center center no-repeat;
    background-size: contain;
}

/* Popup des coordonnées */
.coord-popup {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    /* 🔥 Fond blanc comme les barres */
    color: black;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    pointer-events: auto;
    white-space: nowrap;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
    min-width: 200px;
    text-align: left;
    top: 50px;
    /* Éviter le chevauchement avec le curseur */
    left: 50px;
    pointer-events: none;
    min-width: 120px;
    border: 1px solid #ddd;
    /* 🔥 Contour jaune vif */
}

.coord-popup.fixed {
    background-color: rgba(30, 30, 30, 0.95);
}

/* Icônes de fermeture et copie */
.close-btn,
.copy-btn {
    position: fixed;
    top: 5px;
    font-size: 14px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: white;
}

.close-btn {
    right: 5px;
}

.copy-btn {
    right: 25px;
}

.close-btn:hover,
.copy-btn:hover {
    color: red;
}

/*style Distance measure */

/* Curseur CROSSHAIR pour mesure distance */
.crosshair-active {
    cursor: crosshair !important;
}

/* Popup distance */
.distance-popup {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    /* 🔥 Fond blanc comme les barres */
    color: black;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    transform: translate(-50%, -100%);
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    pointer-events: none;
    min-width: 120px;
    border: 1px solid #ddd;
    /* 🔥 Contour jaune vif */
}

.distance-popup .close-btn {
    position: absolute;
    top: 5px;
    right: 8px;
    cursor: pointer;
    font-size: 16px;
    color: white;
}

.distance-popup .distance-text {
    margin-top: 5px;
    font-weight: bold;
}

/*surface measure*/

.measure-popup {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    /* 🔥 Fond blanc comme les barres */
    color: black;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    min-width: 140px;
    border: 1px solid #ddd;
}

.measure-popup b,
.coord-popup b,
.distance-popup b {
    color: #B8860B;
    /* 🔥 Texte en jaune foncé */
}


/*annotation*/

/* ✅ Fenêtre d'annotation (Mise à jour avec options de personnalisation) */
/* Popup d'annotation repositionnée et réduite */
.annotation-popup{
   position: fixed;
    top: 50px;
    right: 20px; width: 280px;
  background: var(--surface) !important; border-radius: var(--radius);
  box-shadow: var(--shadow) !important; border:1px solid rgba(2,74,143,0.08);
  padding: 14px; z-index: 9999;
}}

/* Boutons dans la popup - en utilisant le style tool-icon */
.annotation-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.tool-icon {
    position: relative;
    width: 30px;
    /* Augmente légèrement la taille pour plus de visibilité */
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #d1d1d1, #808080);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.tool-icon:hover {
    transform: scale(1.1);
    background: radial-gradient(circle at 30% 30%, #f7db60, #d1d1d1, #808080);
}

.tool-icon img {
    width: 70%;
    height: 70%;
    filter: brightness(0) saturate(100%);
}

/*Style de l'infobulle */
.tool-icon .tooltip {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 10px;
  padding: 5px;
  position: absolute;
  bottom: 125%;             /* place la tooltip au-dessus de l'icône */
  left: 50%;                /* centre horizontalement */
  transform: translateX(-50%);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
  z-index: 9999;            /* s’assurer qu'elle passe devant */
}

.tool-icon:hover .tooltip {
  visibility: visible;
  opacity: 1;
}



/* ✅ Texte en direct sur la carte */
.annotation-display {
    position: absolute;
    color: var(--annotation-text-color, #2c3e50);
    font-family: var(--annotation-font, Arial);
    font-size: var(--annotation-font-size, 14px);
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, -50%);
    pointer-events: none;
    white-space: nowrap;
    display: none;
    /* Caché par défaut */
}


/* ✅ Barre des boutons (Entête) */
.annotation-header{
  display:flex; align-items:center; justify-content:space-between;
  border-bottom: 1px dashed rgba(247,219,96,.6); padding-bottom: 8px; margin-bottom: 10px;
  color: var(--text); font-weight: 700;
}

/* ✅ Zone de texte */
.annotation-textarea {
    width: 100%;
    height: 84px;
    background: white;
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 8px;
    margin-top: 10px;
    outline: none;
    resize: vertical;
    transition: border 0.3s ease;
    font-family: var(--annotation-font, Arial);
    font-size: var(--annotation-font-size, 14px);
    color: var(--annotation-text-color, #2c3e50);
}

.annotation-textarea:focus {
    border-color: #0354c3;
}

/* ✅ Options de personnalisation */
.annotation-options {
   display:grid; gap:10px; margin-top:8px;
}

.annotation-options label {
   font-weight:600; color:#374151; font-size: 13px;
}
#color-picker-btn, #color-picker-bg{
  width: 42px; height: 42px; border-radius: 10px; border:1px solid #e5e7eb;
  box-shadow: var(--shadow); background: #fff;
}
/* ✅ Sélecteur de couleur */
.annotation-color-picker {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.annotation-color-picker input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    cursor: pointer;
    padding: 5px;
}

/* ✅ Transparence */
.annotation-opacity {
    display: flex;
    flex-direction: column;
}

.annotation-opacity input {
    width: 100%;
}

/* ✅ Sélecteur de police et taille */
.annotation-fonts {
    display: flex;
    gap: 10px;
}

.annotation-fonts select {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
}

/* ✅ Bouton Enregistrer */
.annotation-save {
    background: #0354c3;
    color: white;
    font-weight: bold;
    font-size: 16px;
    padding: 12px 0;
    width: 100%;
    text-align: center;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.annotation-save:hover {
    background: #f7db60;
    color: #2c3e50;
    transform: scale(1.05);
}

.annotation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.annotation-buttons button {
    flex: 1;
    margin-right: 5px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

/* Optionnel : supprimer la marge droite sur le dernier bouton */
.annotation-buttons button:last-child {
    margin-right: 0;
}

.annotation-insert {
    background-color: #f7db60;
    color: #2c3e50;
}

.annotation-save {
    background-color: #0354c3;
    color: white;
}

.annotation-insert:hover {
    background-color: #e6c84e;
}

.annotation-save:hover {
    background-color: #0248a6;
}


/* 📊 Styles personnalisés pour les nouvelles sections */
.stat-card {
    background-color: #222;
    color: white;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.stat-title {
    font-size: 16px;
    font-weight: bold;
    color: #f7db60;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 14px;
    color: #ddd;
}

/* 📊 Style des nouvelles cartes de graphiques */
.stat-card canvas {
    width: 100%;
    height: 200px;
}

/* 📊 Ajustements du dashboard */
.dashboard-container {
    overflow-y: auto;
    max-height: 75vh;
}


/*Mesure HAuteur*/

/* ✅ Curseur en croix jaune pour la mesure de hauteur */
.crosshair-active {
    cursor: crosshair !important;
}

/* ✅ Popup de mesure de hauteur */
.height-popup {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    /* 🔥 Fond blanc comme les barres */
    color: black;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    min-width: 100px;
    border: 1px solid #ddd;
}

/* ✅ Augmenter la visibilité de la ligne */
.height-line {
    stroke: yellow;
    stroke-width: 4px;
    opacity: 0.9;
}

/*Volume*/

.volume-popup {
    position: fixed;
    top: 20px;
    right: 50%;
    transform: translateX(50%);
    background-color: rgba(30, 30, 30, 0.9);
    color: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    border: 2px solid yellow;
    min-width: 220px;
}

h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #f7db60;
}

.move-controls,
.rotate-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

button {
    background-color: #444;
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

button:hover {
    background-color: #f7db60;
    color: black;
}

.save-button {
    background-color: #0354c3;
    color: white;
    padding: 8px 15px;
    font-weight: bold;
    margin-top: 10px;
}

.save-button:hover {
    background-color: #0248a6;
}


/*barre dessin*/

/* Boutons flottants (style général) */
.floating-icon {
    position: fixed;
    width: 43px;
    height: 43px;
    background: #2c3e50;
    border: 2px solid #f7db60;
    border-radius: 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center bottom;

}

.floating-icon:hover {
 transform: translateY(-8px) scale(1.1);
  animation: float 2s ease-in-out infinite;}
.floating-icon:active {
  transform: translateY(1px) scale(0.98);
}
.floating-icon img {
    width: 65%;
    height: 65%;
}
.floating-icon:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* Bouton "Mesure" placé au-dessus de la barre de mesures */
.measure-icon {
    bottom: 20px;
    left: 40%;
    z-index: 100; /* Z-index légèrement inférieur */
    background: linear-gradient(135deg, #f7db60, #fbc531);
}

.measure-icon:hover{
      background: linear-gradient(135deg, #e6c84e, #f5b800);

}

.volume-icon {
    bottom: 20px;
    left: 50%;
    z-index: 100;
    background: linear-gradient(135deg, #f7db60, #fbc531);
}
.volume-icon:hover{
      background: linear-gradient(135deg, #e6c84e, #f5b800);

}
.clear-icon {
    bottom: 20px;
    left: 60%;
    z-index: 100;
    background: linear-gradient(135deg, #f7db60, #fbc531);

}
.clear-icon:hover {
      background: linear-gradient(135deg, #e6c84e, #f5b800);
}

/* Bouton "Dessin" placé à droite de la barre de dessin */
.draw-icon {
    top: 100px;
    right: 10px;
}

.annot-icon {
    top: 1%;
    right: 15%;
    background: linear-gradient(135deg, #f7db60, #fbc531);
}
.annot-icon:hover{
      background: linear-gradient(135deg, #e6c84e, #f5b800);

}


.dash-icon {
    top: 1%;
    right: 8%;
    background: linear-gradient(135deg, #f7db60, #fbc531);

}
.dash-icon:hover{
      background: linear-gradient(135deg, #e6c84e, #f5b800);
}



.help-icon {
    top: 1%;
    right: 1%;
    background: linear-gradient(135deg, #f7db60, #fbc531);

}
.help-icon:hover{
      background: linear-gradient(135deg, #e6c84e, #f5b800);

}

.annot-icon .tooltip,
.dash-icon .tooltip,
.help-icon .tooltip {
    top: 100%;
    bottom: auto;
}
/* Barre d’outils droite (dessin) */
.tools-bar-right {
    position: fixed;
    right: 10px;
    top: 32%;
    transform: translateY(-50%);
    background: rgba(, 255, 255, 0.9);
    /* Fond blanc */
    padding: 2px;
    border-radius: 8px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

/* Icônes de la barre d'outils */
.tool-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10%;
    background: rgba(240, 240, 240, 1);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.tool-icon:hover {
    transform: scale(1.1);
    background: #f7db60;
}

.tool-icon img {
    width: 70%;
    height: 70%;
}


#annotationButton.active {
    background-color: #f7db60;
    /* Par exemple, ou toute autre couleur indiquant le mode actif */
}


#annotation-live {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* pour laisser passer les clics vers la carte */
    z-index: 1000;
}

/* Icône flottante pour ouvrir le panneau des calques */
.layers-icon {
  position: fixed;
  bottom:19%;
  right: 1.5%;
  width: 43px;
  height: 43px;
  background: rgba(250, 250, 250, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 100;
}


/* Panneau des calques */
.layers-panel {
  display:none;
  width: 300px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  padding: 10px;
  position: fixed;
  top: 80px;
  right: 80px;
  z-index: 9999;
}

/* En-tête du panneau */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #f7db60;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

/* Contenu du panneau */
.layers-content {
  margin-top: 10px;
}

/* Élément de la liste */
.layer-item {
  padding: 5px 0;
  font-size: 14px;
}
.layer-item label {
  color: #f8f8f8;
  font-weight: 500;
}

/* Bouton de fermeture du panneau */
.close-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

/* Arborescence principale */
.nav-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tree-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 3px 0;
  padding: 2px 5px;
}

/* Survol */
.tree-item:hover {
  background: #f5f5f5;
}

/* Petite flèche */
.tree-item .arrow {
  width: 20px;
  text-align: center;
  color: #555;
}

.tree-item .title {
  flex: 1;
  color: #333;
  font-weight: 500;
}

/* Compteur (ex: "(84 models)") */
.tree-item .count {
  color: #999;
  margin-left: 5px;
  font-size: 13px;
}

/* Sous-liste masquée par défaut */
.subtree {
  display: none;
  list-style: none;
  margin-left: 20px; /* Indentation visuelle */
  padding-left: 0;
}

/* Quand on ouvre, on fait pivoter la flèche */
.open > .tree-item .arrow {
  transform: rotate(90deg);
}
/* Arborescence */
.layer-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.layer-group {
  margin-bottom: 5px;
}

.layer-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 5px;
  background: #eaeaea;
  border-radius: 5px;
  margin-bottom: 2px;
}

.toggle-icon {
  width: 20px;
  display: inline-block;
  transition: transform 0.3s;
}

.layer-group.open .toggle-icon {
  transform: rotate(90deg);
}

.group-title {
  flex: 1;
  padding-left: 5px;
  font-weight: bold;
  color: #333;
}

.visibility-icon {
  margin-left: 5px;
  cursor: pointer;
  font-size: 16px;
}

.layer-subtree {
  list-style: none;
  margin: 0;
  padding-left: 25px;
  display: none;
}

.layer-group.open .layer-subtree {
  display: block;
}

.layer-item {
  display: flex;
  align-items: center;
  padding: 3px 0;
}

.layer-item label {
  margin-left: 5px;
  font-size: 14px;
  color: #333;
}



/* Ajustements pour tablettes */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .dashboard-container {
        width: 35%;
    }
    
    /* Réorganisation des icônes en haut */
    .annot-icon {
        right: 20%;
    }
    
    .dash-icon {
        right: 10%;
    }
    
    /* Réorganisation des icônes en bas */
    .measure-icon {
        left: 35%;
    }
    
    .volume-icon {
        left: 50%;
    }
    
    .clear-icon {
        left: 65%;
    }
    .demo-ribbon {
    padding: 10px 55px;
    font-size: 15px;
    right: -42px;
  }
}

/* Ajustements pour mobiles */
@media (max-width: 768px) {

    .sidebar {
    width: 40%;
    min-width: 250px; 
    padding: 15px 8px 70px;
    box-shadow: 3px 0 15px rgba(0,0,0,0.4);
        
    }

    .close-button {

    width: 90%;
    max-width: none;
    padding: 10px;
    font-size: 14px;
    bottom: 15px;

    }

    .theme-title {
    font-size: 15px;
    padding: 8px;
    margin: 8px 0;
    }

    .dashboard-container {

        width: 80%;
        bottom: 50px; /* Laisse de la place pour les icônes en bas */
        height: 60%; /* Hauteur réduite */
    }
    
    /* Réorganisation complète des icônes en haut */
    .header-title {
        font-size: 16px;
        padding: 5px 10px;
        top: 5px;
    }
    
    #menuIcon {
        top: 5px;
        left: 5px;
        padding: 5px;
        font-size: 12px;
    }
    
    .annot-icon, 
    .dash-icon, 
    .help-icon {
        width: 35px;
        height: 35px;
        top: 5px;
    }
    
    .annot-icon {
        right: 25%;
    }
    
    .dash-icon {
        right: 15%;
    }
    
    .help-icon {
        right: 5%;
    }
    
    
    .measure-icon {
        left: 30%;
    }
    
    .volume-icon {
        left: 50%;
    }
    .clear-icon{
        left: 70%;
    }
    
    
    /* Ajustement de la barre d'outils */
    .tools-bar {
        bottom: 60px;
        flex-wrap: wrap;
        justify-content: center;
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .tool-icon {
        width: 35px;
        height: 35px;
        margin: 3px;
    }
    .tooltip {
        display: none; /* Cache les tooltips sur mobile pour gagner de la place */
    }

    .demo-ribbon {
        
    padding: 15px 70px; /* Taille significativement augmentée */
    font-size: 18px; /* Texte plus gros */
    right: -50px;
    bottom: 10px; /* Légèrement remonté */
   transform: rotate(-45deg) scale(1.1); /* Légèrement agrandi */
    }

    .tools-bar,
  .measure-icon,
  .volume-icon,
  .clear-icon {
    bottom: 80px !important; /* Espacement accru */
  }

}




/* Très petits écrans */
@media (max-width: 480px) {
  .annot-icon, 
  .dash-icon, 
  .help-icon {
    width: 36px;
    height: 36px;
    top: 8px;
  }



    .annot-icon {
        right: 102px;
    }
    
    .dash-icon {
        right: 56px;
    }
    .help-icon{
        right: 10px;
    }

    .header-title {
    max-width: 50%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #menuIcon {
    padding: 6px 10px;
    font-size: 11px;
  }

    .measure-icon {
        left: 20%;
    }
    
    .volume-icon {
        left: 50%;
    }
    
    .clear-icon {
        left: 80%;
    }
    


    /* Réduire la taille des cartes dans le dashboard */
    .stat-card {
        padding: 10px;
    }
    
    .stat-title {
        font-size: 14px;
    }
    
    .stat-value {
        font-size: 12px;
    }

  
    .demo-ribbon {
    padding: 12px 65px;
    font-size: 16px;
    right: -45px;
    bottom: 5px;
  }
   .tools-bar {
    bottom: 70px !important;
  }
}



@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
  
  
  
  @keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tools-bar.active {
  animation: slideUp 0.3s ease-out, fadeIn 0.3s ease-in;
}
/* ---- Panel pro (verre dépoli + micro-interactions) ---- */
.panel-card.glass{
  background: rgba(25, 32, 44, 0.55);
  border: 1px solid rgba(247,219,96,.25);
  border-radius: 14px;
  padding: 8px;
  margin: 8px 0 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
}

.panel-header{
  width: 100%;
  background: transparent;
  border: 0;
  color: #ecf0f1;
  display:flex; align-items:center; justify-content:space-between;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .25s ease, transform .15s ease;
}
.panel-header:hover{ background: rgba(247,219,96,.07); transform: translateY(-1px); }

.panel-title{ display:flex; align-items:center; gap:10px; font-weight:700; letter-spacing:.2px; }
.dot{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.dot-yellow{ background: var(--secondary); box-shadow: 0 0 10px rgba(247,219,96,.8); }

.panel-meta{ display:flex; align-items:center; gap:8px; color:#cbd5e1; }
.chip{
  font-size:11px; line-height:1; padding:6px 8px; border-radius:999px;
  background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12);
}
.chevron{ transition: transform .25s ease; opacity:.9; }
.panel-header.open .chevron{ transform: rotate(180deg); }

/* Corps repliable doux */
.panel-body{
  overflow:hidden;
  max-height: 0;
  transition: max-height .35s ease;
  padding: 0 8px;
}
.panel-body.open{ max-height: 200px; padding-bottom: 8px; }

/* ---- Interrupteurs élégants (remplace visuel checkbox) ---- */
.switch-row{
  display:flex; align-items:center; gap:10px;
  padding:10px; margin-top:6px;
  border-radius:10px;
  transition: background .2s ease;
}
.switch-row:hover{ background: rgba(255,255,255,.05); }

.switch-row input{ display:none; }

.switch{
  position:relative; width:44px; height:24px; flex:0 0 auto;
  background: rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.15);
  border-radius:999px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.35);
  transition: all .25s ease;
}
.switch::after{
  content:"";
  position:absolute; top:50%; left:3px; transform: translateY(-50%);
  width:18px; height:18px; border-radius:50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  transition: all .25s ease;
}
.switch-row input:checked + .switch{
  background: linear-gradient(135deg, var(--secondary), #ffd86a);
  border-color: rgba(247,219,96,.85);
}
.switch-row input:checked + .switch::after{ left: 23px; }

.switch-label{
  color:#ecf0f1; font-weight:600; font-size:13.5px;
  text-shadow: 0 1px 0 rgba(0,0,0,.2);
}

/* Optionnel : bordure de mise en avant quand le panel est ouvert */
.panel-card.glass.open { box-shadow: 0 14px 36px rgba(2,84,166,.35); border-color: rgba(3,84,166,.35); }
/* Au chargement : afficher la grille, cacher les panels + bouton retour */
#categoryGrid{ display:grid; }
#bimrevoogy-group{ display:none; }
#backButton{ display:none; }


