/* ═══════════════════════════════════════════════════════
   FS94B1 DMR — Thème sombre personnalisé
   Version 1.0 — 24/09/2026
   ═══════════════════════════════════════════════════════ */

:root {
  /* Palette principale */
  --bg-primary:    #0a0e1a;
  --bg-secondary:  #141b2d;
  --bg-tertiary:   #1e2842;
  --bg-hover:      #252f4d;

  /* Bordures */
  --border:        #2d3742;
  --border-light:  #3a4754;

  /* Texte */
  --text:          #e6edf3;
  --text-dim:      #8b98a5;
  --text-muted:    #5a6673;

  /* Accents */
  --accent:        #00d4ff;
  --accent-hover:  #33ddff;
  --accent-dim:    rgba(0, 212, 255, 0.15);

  /* Statuts */
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #3b82f6;
  --parrot:        #7c3aed;

  /* Ombres */
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md:     0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg:     0 10px 30px rgba(0, 0, 0, 0.5);

  /* Divers */
  --radius:        12px;
  --radius-sm:     8px;
  --transition:    180ms ease;
  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;
}

/* ─── Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Liens ─── */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

/* ─── Code / Monospace ─── */
code, pre, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ─── Scrollbar personnalisée ─── */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* ─── Sélection ─── */
::selection {
  background: var(--accent-dim);
  color: var(--text);
}

/* ─── Focus ─── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ─── Utilitaires ─── */
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.hidden { display: none !important; }


/* ═══════════════════════════════════════════════════════════════════
   FIX - Empêcher le retour à la ligne dans les colonnes Ville/Département
   Ajouté le 03/10/2026
   ═══════════════════════════════════════════════════════════════════ */
#lastheard-preview td,
#lastheard-preview th,
#lh-table td,
#lh-table th {
  white-space: nowrap;
}

/* Si l'écran est petit, on autorise le scroll horizontal */
.table-wrap {
  overflow-x: auto;
}

/* Réduire légèrement la police si nécessaire */
#lastheard-preview td,
#lastheard-preview th,
#lh-table td,
#lh-table th {
  font-size: 13px;
  padding: 8px 6px;
}
/* --- MENU UTILISATEUR (SIDEBAR) --- */
.user-menu-container {
    position: relative;
    display: inline-block;
}
.user-menu-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.user-menu-btn:hover {
    background: rgba(255,255,255,0.2);
}
.user-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 10px;
    background-color: #1e1e2d;
    min-width: 280px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    border: 1px solid #333;
    z-index: 1000;
    color: #fff;
    text-align: left;
}
.user-menu-dropdown.open {
    display: block;
}
.user-menu-header {
    padding: 15px;
    border-bottom: 1px solid #333;
}
.user-menu-header .name {
    font-weight: bold;
    font-size: 16px;
}
.user-menu-header .role {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
}
.user-menu-section {
    padding: 15px;
    border-bottom: 1px solid #333;
}
.user-menu-section .label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}
.user-menu-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.user-menu-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
}
.user-menu-links a:hover, .user-menu-links a.active {
    background: #333;
    color: #fff;
}
.user-menu-search {
    width: 100%;
    padding: 10px;
    background: #2b2b3d;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    box-sizing: border-box;
}
.user-menu-logout {
    padding: 15px;
}
.user-menu-logout a {
    color: #ff6b6b;
    text-decoration: none;
    display: block;
    font-size: 14px;
}
.user-menu-logout a:hover {
    text-decoration: underline;
}

/* --- CORRECTION MENU DROPDOWN --- */
.dropdown { position: relative; display: inline-block; }
.dropbtn { background: rgba(255,255,255,0.1); border: none; color: #fff; padding: 8px 15px; border-radius: 20px; cursor: pointer; font-size: 14px; }
.dropbtn:hover { background: rgba(255,255,255,0.2); }
.dropdown-content { display: none; position: absolute; right: 0; top: 100%; margin-top: 10px; background-color: #1e1e2d; min-width: 280px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); border: 1px solid #333; z-index: 1000; color: #fff; text-align: left; }
.dropdown-content.show { display: block; }
.dropdown-header { padding: 15px; border-bottom: 1px solid #333; }
.dropdown-header .role-label { font-size: 12px; color: #888; text-transform: uppercase; }
.dropdown-section { padding: 15px; border-bottom: 1px solid #333; }
.dropdown-section span { font-size: 11px; color: #888; text-transform: uppercase; margin-bottom: 10px; display: block; }
.dropdown-content a { color: #ccc; text-decoration: none; font-size: 14px; padding: 4px 8px; border-radius: 4px; display: inline-block; }
.dropdown-content a:hover, .dropdown-content a.active { background: #333; color: #fff; }
.dropdown-content input { width: 100%; padding: 10px; background: #2b2b3d; border: 1px solid #444; border-radius: 4px; color: #fff; box-sizing: border-box; }
.logout-link { color: #ff6b6b !important; display: block !important; }
.dropdown-content.open { display: block !important; }
.dropdown-content { display: none; } .dropdown-content.open { display: block !important; }

/* Menu 100% CSS : s'ouvre au survol ou au clic */
.dropdown-content { display: none; }
.dropdown:hover .dropdown-content,
.dropbtn:focus + .dropdown-content {
    display: block !important;
}
.dropbtn { cursor: pointer; }
.user-menu, #userMenu { display: none !important; }

/* Force la position des boutons en haut à droite */
.boutons-flottants {
    position: fixed !important;
    top: 35px !important;
    right: 320px !important;
    left: auto !important;
    z-index: 900;
    display: flex;
    gap: 10px;
}
/* Cache l'IP et les boutons de bannissement pour les non-admins */
body:not(.mode-admin) .peer-ip,
body:not(.mode-admin) .peer-ip *,
body:not(.mode-admin) .btn-ban-ip,
body:not(.mode-admin) .btn-ban-id {
    display: none !important;
}
/* ─── WIDGET MÉTÉO ─── */
.weather-widget {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    color: #fff;
    margin-right: auto; /* <-- Pousse vers la gauche */
    margin-left: 120px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.weather-widget:hover {
    background: rgba(255, 255, 255, 0.15);
}
.weather-icon { font-size: 18px; }
.weather-temp { font-weight: bold; }
.weather-city { font-size: 11px; color: #aaa; text-transform: uppercase; }
