/* =====================================================================
   SeneHotspot -- Identite visuelle "signal reseau"
   Display : Space Grotesk | Body : Inter | Data : JetBrains Mono
   ===================================================================== */

:root {
  --ink:        #0A2540;
  --ink-700:    #143a5e;
  --ink-800:    #0d2c4a;
  --signal:     #06B6A9;
  --signal-600: #04958B;
  --signal-050: #E6FAF7;
  --surface:    #F4F7FA;
  --card:       #FFFFFF;
  --amber:      #F4A623;
  --amber-050:  #FEF6E7;
  --danger:     #E5484D;
  --danger-050: #FCEBEC;
  --green:      #17B26A;
  --green-050:  #E7F7EE;
  --muted:      #64748B;
  --line:       #E2E8F0;
  --text:       #1E293B;
  --radius:     14px;
  --shadow:     0 1px 2px rgba(10,37,64,.06), 0 8px 24px rgba(10,37,64,.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -.01em;
}

.mono { font-family: 'JetBrains Mono', monospace; }

a { color: var(--signal-600); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Logo + motif signal ------------------------------------------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 1.25rem; color: #fff; letter-spacing: -.02em;
}
.brand .sene { color: #fff; }
.brand .spot { color: var(--signal); }
.signal-bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
.signal-bars i {
  width: 4px; background: var(--signal); border-radius: 2px; display: block;
}
.signal-bars i:nth-child(1) { height: 30%; opacity: .5; }
.signal-bars i:nth-child(2) { height: 55%; opacity: .7; }
.signal-bars i:nth-child(3) { height: 80%; opacity: .85; }
.signal-bars i:nth-child(4) { height: 100%; }

/* =====================================================================
   AUTH (connexion / inscription)
   ===================================================================== */
.auth-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.auth-aside {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(6,182,169,.25), transparent 60%),
    linear-gradient(160deg, var(--ink) 0%, var(--ink-800) 100%);
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-aside::after {
  content: ""; position: absolute; inset: auto -80px -120px auto;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,169,.18), transparent 70%);
}
.auth-aside .lead {
  font-family: 'Space Grotesk', sans-serif; font-size: 2rem; line-height: 1.15;
  font-weight: 600; max-width: 460px; margin: 32px 0 16px;
}
.auth-aside .lead span { color: var(--signal); }
.auth-aside p.sub { color: #B9CBDD; max-width: 420px; line-height: 1.6; }
.auth-aside ul.feat { list-style: none; padding: 0; margin: 24px 0 0; }
.auth-aside ul.feat li {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; color: #DCE7F1;
}
.auth-aside ul.feat li::before { content: "\2714"; color: var(--signal); font-weight: 700; }

.auth-main {
  display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--card);
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.6rem; margin: 0 0 6px; color: var(--ink); }
.auth-card .muted { color: var(--muted); margin: 0 0 28px; }

/* =====================================================================
   FORMULAIRES
   ===================================================================== */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: .95rem; font-family: inherit; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(6,182,169,.15);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: inherit; font-weight: 600; font-size: .95rem;
  padding: 12px 18px; border-radius: 10px; transition: transform .05s, background .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { background: var(--signal-600); text-decoration: none; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-700); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface); text-decoration: none; }
.btn-sm { padding: 7px 12px; font-size: .82rem; border-radius: 8px; }
.btn-green { background: var(--green); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-amber  { background: var(--amber); color: #613b00; }

.form-foot { margin-top: 18px; font-size: .9rem; color: var(--muted); text-align: center; }

/* ---- Alertes ------------------------------------------------------- */
.alert { padding: 12px 14px; border-radius: 10px; font-size: .9rem; margin-bottom: 16px; }
.alert-error   { background: var(--danger-050); color: #a01c20; border: 1px solid #f3c7c9; }
.alert-success { background: var(--green-050);  color: #0c6b3f; border: 1px solid #bfe8d0; }
.alert ul { margin: 0; padding-left: 18px; }

/* =====================================================================
   LAYOUT DASHBOARD
   ===================================================================== */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-800) 100%);
  color: #cdd9e6; padding: 22px 16px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.sidebar .brand { margin: 4px 8px 26px; }
.nav { list-style: none; padding: 0; margin: 0; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
  color: #B9CBDD; font-size: .92rem; font-weight: 500; margin-bottom: 3px; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav a.active { background: var(--signal); color: #06231f; font-weight: 600; }
.nav a .ic { width: 18px; text-align: center; opacity: .9; }
.nav .section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #6f88a3; margin: 18px 12px 8px; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; margin-top: 10px; font-size: .8rem; color: #8aa1ba; }

.main { display: flex; flex-direction: column; }
.topbar {
  height: 64px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 26px; position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 1.15rem; margin: 0; color: var(--ink); }
.topbar .user { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--signal-050); color: var(--signal-600);
  display: grid; place-items: center; font-weight: 700; font-family: 'Space Grotesk', sans-serif;
}
.content { padding: 26px; }

/* ---- Cartes de stats ----------------------------------------------- */
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat .label { font-size: .82rem; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.stat .value { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1; }
.stat .ic {
  position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; font-size: 1.1rem;
  background: var(--signal-050); color: var(--signal-600);
}
.stat.accent-amber  .ic { background: var(--amber-050);  color: #b9791a; }
.stat.accent-green  .ic { background: var(--green-050);  color: var(--green); }
.stat.accent-danger .ic { background: var(--danger-050); color: var(--danger); }

/* ---- Carte panneau ------------------------------------------------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.panel-head h2 { font-size: 1rem; margin: 0; color: var(--ink); }
.panel-body { padding: 20px; }

/* ---- Tableau ------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface); }

/* ---- Badges statut (motif signal) ---------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: .76rem; font-weight: 600; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.badge-actif    { background: var(--green-050);  color: #0c6b3f; }
.badge-actif::before    { background: var(--green); }
.badge-attente  { background: var(--amber-050);  color: #8a5a06; }
.badge-attente::before  { background: var(--amber); }
.badge-suspendu { background: var(--danger-050); color: #a01c20; }
.badge-suspendu::before { background: var(--danger); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; z-index: 50; transition: left .2s; width: 250px; }
  .sidebar.open { left: 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex !important; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .content { padding: 18px; }
}
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; cursor: pointer; }

/* focus visible (accessibilite) */
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
