:root 
{
    --background: #042042;      
    --wireframe: #2e588a;  
    --secondary_900:#0A9196 ;
    --primaru_700: #1D3655; 
    --Primary_800:#1D3655;
    --base_shadow: #FBFCFE;
    --Primary_contrast:#ffffff;
    --secondary_700: #3ed9de;
    --secondary_800:#0dbac1;
    --color_tile: #142a45d9;
    --backgroud_tile:#0e2644fa;
    --font_default: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --glow_white: 0px 0px 12px 2px rgba(255, 255, 255, 0.2);
    --glow_cyan: 0px 0px 14px 2px rgba(66, 235, 226, 0.4);
    --glass_border: 1px solid rgba(255, 255, 255, 0.12);
    --color_surface: rgba(29, 54, 85, 0.6); 
    --color_primary: #364D68;            
    --color_cyan: #42ebe2;               
    --color_text_main: #FFFFFF;          
    --color_text_muted: #AAB4C0;     
    --color_danger: #e05454;            
}


@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('webfonts/fa-solid-900.woff2') format('woff2');
  font-weight: 900;
  font-display: normal;
}

html {
  height: 100%;
  margin: 0;
  scroll-behavior: smooth;
  background-color: #042042;
  font-family: var(--font_default);
  font-style: var(--color_text_main);
}

body {
    display: flex;
    flex-direction: column;
}

/* Le main prend tout l'espace disponible */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

h3 {
  font-family: var(--font_default);
  font-size: 16px;
  color: #ffffff;
}

/* BARRE DE NAVIGATION */
.nav {
  position: fixed;  
  top: 0;              
  left: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between; 
  align-items: center;
  min-height: clamp(60px, 8vh, 80px);
  width: 100%;
  box-sizing: border-box;
  padding: 0 clamp(8px, 3vw, 32px); 
  box-shadow: 0 4px 20px  var(--secondary_700); 
  background-color: var(--background);
  z-index:999;
}

.nav-group{
  display: flex;
  flex-direction: row;  
  justify-content: left;
  align-self: flex-start; 
  align-items: center;
  height: 80px;
  padding: 0px 6px;
  gap: 16px;
  background-color:var(--background);
  box-sizing: border-box;
}

.logo {
  font-family:var(--font_default);
  font-size: clamp(14px, 2vw, 20px);
  font-weight: 700;                 
  color: #FFFFFF;                  
  cursor: pointer;                 
  user-select: none;                
  text-decoration: none; 
}

    ---- SIDEBAR DROITE ----
.sidebar {
  position: relative; 
  top: 96px;      
  right: 0px;   
  width: 300px; 
  bottom: 20px;    
  background: rgba(20, 42, 69, 0.95); 
  border: 1px solid rgba(255, 255, 255, 0.12); 
  border-radius: 12px;
  padding: 1.5rem; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
  backdrop-filter: blur(15px);
  transition: right 0.3s ease-in-out; 
  z-index: 8;   
  display: flex; 
  flex-direction: column;
}

.sidebar.open { 
  right: 16px;
}

    .sidebar-body { flex: 0; overflow-y: visible; overflow-x: hidden; margin-top: 16px; color: #ffffff; }
    .sidebar-body::-webkit-scrollbar { width: 3px; }
    .sidebar-body::-webkit-scrollbar-thumb { background: rgba(66,235,226,.3); border-radius: 3px; }
    .sidebar-close { position: absolute; top: 16x; right: 16px; background: none; border: 0; color: var(--color_muted); font-size: 1.2rem; cursor: pointer; transition: color .2s; }
    .sidebar-close:hover { color: #fff; }

    /* Champs d'édition sidebar */
    .sidebar-edit-input {
      width: calc(100vh);
      background: rgba(4,32,66,.75);
      border: 1px solid rgba(255,255,255,.18);
      border-radius: 5px;
      padding: 8px 11px;
      color: #fff;
      font-family: var(--font);
      font-size: .88rem;
      margin-bottom: 10px;
      transition: border-color .2s;
    }
    .sidebar-edit-input:focus { border-color: var(--color_cyan); outline: none; }
    textarea.sidebar-edit-input { resize: vertical; min-height: 90px; }
    .prop-label { font-size: .72rem; color: var(--color_muted); display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .05em; }

  
.property-badge { 
  background: rgba(255,255,255,0.05); 
  border: 1px solid rgba(255,255,255,0.1); 
  padding: 8px 12px; 
  border-radius: 6px; 
  margin-bottom: 8px; 
  font-size: 0.85rem; 
  line-height: 1.4; 
}

#page-container {
  position:relative;
  width: 100%;
  height:calc(100vh - 80px);
  z-index: 2;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(24px, 4vw, 48px);
  box-sizing: border-box;
  padding: clamp(8px, 2vw, 24px);
  background-color:var(--background); 
  margin-top: 80px;
  min-width: 320px;

}

#welcome {
  display: flex;
  flex-direction: column;
  justify-content:flex-start; 
  align-items: center;   
  align-self: center;          
  margin: 0 auto;                
  min-width: 0px;     
  max-width: 960px;    
  height: auto;                
  margin-top: 0px; 
  box-sizing: border-box;      
  padding: 48px 32px;              
  background-color: var(--background);
  }

 

.welcome_form {
  display: flex;
  flex-direction: row;      
  flex-wrap: wrap;         
  gap: 16px;               
  justify-content: center;
  width: 100%;
  margin: 48px 0px 0px 0px;
}

.input_welcome {
  font-family:var(--font_default);
  font-size: 14px;
  padding: 8px 8px;
  border-radius: 6px;
  background: var(--Primary_contrast);
  color:var(--background_wireframe);
  min-width: 200px;
  height: 32px ;
  border: none;                   
  box-shadow: 2px 2px 4px 2px var(--secondary_900);
  
  }

#saved-views {
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-self: center;
    max-width: 1280px;
    align-items: center;
    margin: 40px auto 32px auto;
    position:relative;
    width: 100%;
    box-sizing: border-box;
    height: fit-content; 
    overflow: visible ;
    }

#categories {
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-self: center;
    max-width: 1280px;
    align-items: center;
    margin: 40px auto 32px auto;
    position:relative;
    width: 100%;
    box-sizing: border-box;
    height: fit-content; 
    overflow: visible ;
    }
#RG_categories {
  flex: 1;
  display: flex; 
  flex-direction: column;
  width: 100%;
  align-items: center;
  max-width: 960px; 
  min-width: 320px;
  overflow:visible ;
  margin:0;
  padding-bottom: 40px ;
  box-sizing: border-box;
  text-align: center;
  height: auto ;  
  justify-content: center;
}


#saved-graphs  {
  flex: 1;
  display: flex; 
  flex-direction: column;
  width: 100%;
  align-items: center;
  max-width: 960px; 
  min-width: 320px;
  overflow:visible ;
  margin: auto;
  padding: 24px ;
  box-sizing: border-box;
  text-align: center;
  height: auto ;
  
}


.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 240px)); 
  gap: clamp(10px, 2vw, 20px);
  width: 100%; 
  max-width: 960px;
  justify-items: center;
  align-items: start; 
  justify-content:center;
  z-index: 10;
  padding-bottom: 40px;
  margin: 0 auto;
}

.preset-tile, .cta-premium-tile {
  background: #0e2644fa; 
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 40px 20px; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.preset-tile:hover {
  transform: translateY(-5px); 
  border-color: var(--secondary_700);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.cta-premium-tile {
  border: 2px dashed rgba(0, 242, 254, 0.3);
}
.cta-premium-tile:hover {
  border-style: solid;
  border-color: var(--secondary_700);
}
.tile-card {
      background: var(--color_tile); 
      border: var(--glass_border); 
      border-radius: 8px;
      height: 200px; 
      width: 240px;
      aspect-ratio: 1 / 1; 
      padding: 24px; 
      position: relative; 
      overflow: hidden;
      display: flex; 
      flex-direction: column; 
      align-items: center; 
      justify-content: center;
      text-align: center; 
      cursor: pointer; 
      backdrop-filter: blur(8px);
      transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
      box-sizing: border-box;
    }
    .tile-card:hover { transform: translateY(-4px); border-color: var(--color_cyan); box-shadow: var(--glow_cyan); }
    .tile-icon { font-size: 2.2rem; color: var(--color_cyan); margin-bottom: 8px; }
    .tile-title { font-size: clamp(1.4rem, 4vw, 2.5rem); font-weight: 500; color: var(--color_text_main); }


    
    
    .tile-card:hover .tile-overlay { opacity: 1; }

    .tile-card.tile-add { border-style: dashed; opacity: 0.4; cursor: not-allowed; }

.tile-card .tile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(14, 38, 68, 0.98);
  padding: 16px;
  box-sizing: border-box;
 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.tile-card:hover .tile-overlay {
  opacity: 1;
}

.tile-card .tile-overlay .tile-desc {
  font-size: clamp(1.2rem, 3vw, 1rem);
  line-height: 1.4;
  color: #FFFFFF;
  text-align: center;
  width: 100%;
  
  margin: 0;
  padding: 0;
}

    .modal-overlay {
      position: fixed; 
      top: 0; 
      left: 0; 
      width: 90%; 
    
      height: 100%;
      background: rgba(2, 11, 22, 0.85); 
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(8px);
      display: flex; 
      justify-content: center; 
      align-items: center; 
      z-index: 2000;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease-in-out;
    }

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

    .modal-content.panel-glass { 
      width: 420px; 
      text-align: center; 
      padding: 2.5rem 2rem; 
      box-shadow: var(--glow_cyan); 
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .modal-content i { font-size: 3rem; color:#FFD700;; margin-bottom: 15px; }
    .modal-content h3 { font-size: 1.4rem; margin-bottom: 10px; color: #FBFCFE; }
    .modal-content p { color: var(--base_shadow); font-size: 0.95rem; margin-bottom: 25px; line-height: 1.5; }


.panel-glass {
      background: rgba(20, 42, 69, 0.95); border: var(--glass_border);
      border-radius: 12px; padding: 1.5rem; box-shadow: 0 10px 25px rgba(0,0,0,0.4); backdrop-filter: blur(10px);
    }
    .panel-glass h4 { margin: 0 0 15px 0; color: var(--color_cyan); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px;}


#page-container > section {
    display: none;
}

#page-container > section.active {
    display: flex;
}

span {
  color: var(--secondary_800);        
}

.titre{
  font-family:var(--font_default);
  font-size: clamp(1.4rem, 4vw, 2.5rem);                
  font-weight: 700;                
  color: var(--Primary_contrast);                  
  line-height: 1.6;
  text-align: center;
}

.sous_titre{
  font-family:var(--font_default);
  font-size: clamp(0.85rem, 2.5vw, 1.2rem);
  color: var(--Primary_contrast);
  line-height: 1.4;  
  text-align: center;
}
.texte {
  font-family: var(--font_default);
  font-size: clamp(9px, 1.2vw, 12px);
  color: var(--color_text_muted);
  line-height: 1.4;  
  text-align: center;
}

.texte1 {
  font-family: var(--font_default);
  font-size: clamp(13px, 1.8vw, 16px);
  color: var(--base_shadow);
  line-height: 1.4;  
  text-align: center;
}

@media (max-width: 480px) {
    .grid-container {
     grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        justify-content: center; 
        justify-items: center;
    }
}

#drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;       
    padding: 40px 24px;
    border: 2px dashed rgba(0, 255, 255, 0.4); 
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    box-sizing: border-box;
    text-align: center;
}

#drop-zone.dragover { background: rgba(66,235,226,.07); }
#drop-zone h2 { font-size: 1.3rem; margin-bottom: 10px; color: #ffffff; }
#drop-zone p  { color: var(--color_text_muted); font-size: .9rem; line-height: 1.6; margin-bottom: 24px; }
#drop-zone .hint { font-size: .78rem; color: var(--color_text_muted); margin-top: 14px; line-height: 1.5; }

#import {
    display: flex;
    flex-direction: column; 
    align-items: center;   
    justify-content: flex-start;
    width: 100%;
    max-width: 960px;       
    margin: 32px auto;
    padding: 0 24px;
    box-sizing: border-box;
    min-height: 70vh;       
}

    #workspace {
      flex: 1;
      display: flex;
      flex-direction: row;
      overflow: hidden; 
      position: relative;
      width: 100%;  
      height: 100%;
      background: var(--color_bg);
    }
   
#workspace.active {
  display: flex; 
}
    
    #graph-container { 
    flex: 1; 
    height: calc(100vh -96px);
    /* width: 100%; */
    position: relative;
    box-sizing: border-box;
    }
    
    .panel-left {

    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 350px;
    height: 100%;     
    background: var(--primaru_700);
    border-right: var(--border_glass);
    padding: 1.25rem;
    box-shadow:var(--base_shadow);
    backdrop-filter: blur(12px);
    box-sizing: border-box;
    overflow-y: auto; 
    overflow-x: hidden;             
    z-index: 8;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease, min-width 0.3s ease;
    color: #ffffff ;
    box-sizing: border-box;
    
}


    .panel-left::-webkit-scrollbar { width: 3px; }
    .panel-left::-webkit-scrollbar-thumb { background: rgba(66,235,226,.3); border-radius: 4px; } */

    .panel {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(66, 235, 226, 0.4);
  backdrop-filter: none;
  padding: 16px 0;
}
    .panel h4 {
      margin: 0 0 14px;
      color: var(--color_cyan);
      font-size: .82rem;
      text-transform: uppercase;
      letter-spacing: .07em;
      border-bottom: 1px solid rgba(255,255,255,.09);
      padding-bottom: 8px;
    }

.panel-left.collapsed {
    width: 60px ;
    min-width: 60px ;
    padding: 1.25rem 0.5rem ;/
}

.panel-left.collapsed #sidebar,
.panel-left.collapsed .panel {
    display: none ;
}
    .form-group { margin-bottom: 14px; margin-right: 16px}
    .form-group:last-child { margin-bottom: 0; }
    .form-group label { display: block; font-size: .78rem; color: var(--color_muted); margin-bottom: 5px; }
    .form-control {
      width: 100%;
      background: rgba(4,32,66,.75);
      border: 1px solid rgba(255,255,255,.18);
      border-radius: 5px;
      padding: 10px;
      color: #fff;
      
      font-family: var(--font);
      font-size: .88rem;
      transition: border-color .2s;
    }
    .form-control:focus { border-color: var(--color_cyan); outline: none; }
    select.form-control option { background: #042042; color: #fff; }

  


    #sidebar-body { flex: 1; overflow-y:visible; margin-top: 14px;  }
   
    .sidebar-close { position: absolute; top: 14px; right: 14px; background: none; border: none; color: var(--color_muted); font-size: 1rem; cursor: pointer; transition: color .2s; }
    .sidebar-close:hover { color: #fff; }

   
    .sidebar-edit-input {
      width: 100%;
      background: rgba(4,32,66,.75);
      border: 1px solid rgba(255,255,255,.18);
      border-radius: 5px;
      padding: 8px 11px;
      color: #fff;
      font-family: var(--font);
      font-size: .88rem;
      margin-bottom: 10px;
      transition: border-color .2s;
    }
    .sidebar-edit-input:focus { border-color: var(--color_cyan); outline: none; }
    textarea.sidebar-edit-input { resize: vertical; min-height: 90px; }
    .prop-label { font-size: .72rem; color: var(--color_muted); display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .05em; }

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
    font-size: 0.9rem;
    background: rgba(20, 38, 66, 0.4);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* En-têtes du tableau */
.data-table th {
    background: rgba(29, 54, 85, 0.8);
    color: #AAB4C0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border-bottom: 2px solid rgba(66, 235, 226, 0.15);
}

.data-table td {
    padding: 14px 16px;
    color: #E2E8F0;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.data-table tbody tr:hover {
    background-color: rgba(66, 235, 226, 0.04) !important; 
}

.data-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

#workspace-table-container::-webkit-scrollbar {
    width: 8px;
}

#workspace-table-container::-webkit-scrollbar-track {
    background: rgba(15, 32, 55, 0.5);
    border-radius: 0 12px 12px 0;
}

#workspace-table-container::-webkit-scrollbar-thumb {
    background: rgba(66, 235, 226, 0.3);
    border-radius: 4px;
}

#workspace-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(66, 235, 226, 0.5);
}

    .badge-local {
      background: rgba(66,235,226,.12);
      color: var(--color_cyan);
      border: 1px solid var(--color_cyan);
      padding: 4px 12px;
      border-radius: 20px;
      font-size: .78rem;
      font-weight: 700;
      letter-spacing: .03em;
    }

    /* Boutons */
    /* .btn {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      border-radius: 6px;
      font-weight: 700;
      font-family: var(--font);
      cursor: pointer;
      transition: transform .15s;
      padding: 9px 18px;
      font-size: .88rem;
    } */

    .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: none;
  border-radius: 5px;
  font-family: var(--font_default);
  color: #FFFFFF;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box; 
}
    .btn:hover { transform: translateY(-1px); opacity: 0.9;}
    .btn-primary { background: var(--color_primary); color: #fff; border: 1px solid rgba(255,255,255,.35); box-shadow: var(--glow_white); }
    .btn-cyan    { background: transparent; color: var(--color_cyan); border: 1px solid var(--color_cyan); box-shadow: var(--glow_cyan); }
    .btn-ghost   { background: transparent; color: var(--color_muted); border: 1px solid rgba(255,255,255,.18); }
    .btn-danger  { background:var(--color_danger); color: var(--color_danger); border: 1px solid var(--color_danger); }
    .btn-danger:hover { background: #b13434; }
    .btn-full    { width: 100%; justify-content: center; }
    .btn-sm {padding: 7px 13px; font-size: .82rem; }

.saved-view-tile {
    position: relative; 
}

.tile-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(4, 32, 66, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ff4d4d;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15; 
    transition: all 0.2s ease;
}

.tile-delete-btn:hover {
    background: #ff4d4d;
    color: #ffffff;
    transform: scale(1.15);
}

.hidden{ display: none;}



.btn-nav {
  background-color: var(--background);
  font-size: clamp(11px, 1.5vw, 14px);
  font-weight: 700;
  width: auto; /* ✅ plus de largeur fixe */
  padding: clamp(4px, 0.5vw, 8px) clamp(8px, 1vw, 16px);
  box-shadow: 2px 2px 4px 2px #FBFCFE;
  white-space: nowrap;
}

.btn-cta {
  background-color: var(--background);
  font-size: clamp(12px, 1.5vw, 14px); 
  font-weight: 700;
  padding: clamp(6px, 0.8vw, 8px) clamp(12px, 1.5vw, 16px); 
  box-shadow: 2px 2px 4px 2px var(--secondary_700);
}


.btn-cta:hover {
  transform: scale(1.05);
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(29, 54, 85, 0.95);
  border: 1px solid rgba(66, 235, 226, 0.4);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}
/* Cacher le bouton flottant sur desktop */
#btn-open-panel {
  display: none;
}
#context-menu {
  position: fixed;
  background: rgba(20, 42, 69, 0.98);
  border: 1px solid rgba(66, 235, 226, 0.3);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 200px;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

#context-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#context-menu li {
  padding: 8px 16px;
  font-size: 13px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

#context-menu li:hover {
  background: rgba(66, 235, 226, 0.1);
  color: #42ebe2;
}

#context-menu li.separator {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 4px;
  padding-top: 8px;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-wrapper input {
  padding-right: 32px;
  width: 100%;
}

#search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 1;
  display: none;
}
#search-clear:hover {
  color: #42ebe2;
}
.nav-hamburger {
  display: none; 
  background: none;
  border: none;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
  z-index: 1000;
}

@media (max-width: 768px) {

  .nav {
    flex-wrap: nowrap;
    padding: 0 16px;
    min-height: 60px;
    justify-content: space-between; 
    align-items: center;
    position: relative;
  }

  .nav-group:first-child {
    align-self: center;
    height: auto;
  }
  .nav-group:not(:first-child) {
    display: none;
  }  
    
  .nav-hamburger {
    display: block;
  }

  
  .badge-local {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 4px 0;
    border: none;
    background: var(--background);
  }


  #nav-links,
  #nav-actions {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute; 
    top: 60px;
    left: 0;
    background: var(--background);
    padding: 12px 0;
    gap: 8px;
    border-top: 1px solid rgba(66, 235, 226, 0.2);
    z-index: 998;
  }

  /* Menu ouvert */
  #nav-links.open,
  #nav-actions.open {
    display: flex;
  }

  .nav-group {
    height: auto;
    width: 100%;
  }
  
  .btn-nav, .btn-cta, .btn-cyan {
    width: 50%;
    justify-content: center;
  }

  .badge-local {
    text-align: center;
    border: none;
    background: var(--background);
  }

  /* ================================================
   RESPONSIVE — WORKSPACE MOBILE
   ================================================ */

  #workspace {
    flex-direction: column;
    height: calc(100vh - 60px);
    overflow: hidden;
  }

  /* Graphe plein écran */
  #graph-container {
    width: 100%;
    height: 100%;
    flex: 1;
  }

  /* Panel gauche en drawer */
  .panel-left {
    position: fixed;
    top: 60px;
    left: -100vw; 
    width: 85%;
    max-width: 360px;
    height: calc(100vh - 60px);
    z-index: 100;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding-bottom: 120px 
  }

  /* Panel ouvert */
  .panel-left.drawer-open {
    left: 0; 
  }

  /* Overlay sombre derrière le drawer */
  .drawer-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 70vw; /* ← commence après le panneau */
    width: 25vw;
    height: calc(100vh - 60px);
    background: rgba(0,0,0,0);
    z-index: 99;
  }

  .drawer-overlay.show {
    display: block;
  }

  /* Bouton flottant pour ouvrir le panneau */
  #btn-open-panel {
    display: flex;
    position: fixed;
    bottom: 48px;
    right: 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color_cyan);
    color: var(--background);
    border: none;
    font-size: 20px;
    align-items: center;
    justify-content: center;
    z-index: 98;
    box-shadow: 0 4px 16px rgba(66,235,226,0.4);
    cursor: pointer;
  }

  /* Cacher le bouton toggle existant sur mobile */
  #toggle-panel-btn {
    display: none;
  }



}

@media (min-width: 769px) and (max-width: 1024px) {
  .nav {
    padding: 0 16px;
    gap: 8px;
  }

  .btn-nav {
    font-size: 12px;
    padding: 6px 10px;
  }

  .btn-cyan {
    font-size: 11px;
    padding: 5px 8px;
  }
}
