/* ============================================================
   NotiEvent — Design System
   Palette: Emerald green #0E9F6E / White / Slate grays
   ============================================================ */

:root {
  --ne-primary:       #0E9F6E;
  --ne-primary-dark:  #046C4E;
  --ne-primary-light: #31C48D;
  --ne-accent:        #84E1BC;
  --ne-accent-light:  #DEF7EC;
  --ne-bg:            #F1F8F5;
  --ne-surface:       #FFFFFF;
  --ne-border:        #E2E8F0;
  --ne-text:          #1E293B;
  --ne-muted:         #64748B;
  --ne-success:       #10B981;
  --ne-danger:        #EF4444;
  --ne-warning:       #F59E0B;
  --ne-info:          #3B82F6;
  --ne-cyan:          #06B6D4;
  --ne-shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --ne-shadow:        0 4px 16px rgba(0,0,0,.10);
  --ne-shadow-lg:     0 8px 32px rgba(0,0,0,.14);
  --ne-radius:        12px;
  --ne-radius-sm:     8px;
  --ne-radius-lg:     20px;
  --ne-transition:    .2s ease;
  --sidebar-width:    260px;
}

/* ── Scrollbars ──────────────────────────────────────────── */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: var(--ne-border); border-radius: 99px; }
::-webkit-scrollbar-thumb        { background: var(--ne-primary); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover  { background: var(--ne-primary-dark); }
* { scrollbar-width: thin; scrollbar-color: var(--ne-primary) var(--ne-border); }

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--ne-bg);
  color: var(--ne-text);
  min-height: 100vh;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--ne-text);
  letter-spacing: -.03em;
  margin-bottom: .5rem;
}
.text-muted { color: var(--ne-muted) !important; }

/* ── Card ────────────────────────────────────────────────── */
.nv-card {
  background: var(--ne-surface);
  border-radius: var(--ne-radius);
  box-shadow: var(--ne-shadow-sm);
  border: 1px solid var(--ne-border);
  padding: 1.75rem;
  transition: box-shadow var(--ne-transition);
}
.nv-card:hover { box-shadow: var(--ne-shadow); }
.nv-card-header {
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--ne-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nv-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

/* ── Stat cards ──────────────────────────────────────────── */
.nv-stat-card {
  background: var(--ne-surface);
  border-radius: var(--ne-radius);
  border: 1px solid var(--ne-border);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--ne-shadow-sm);
  transition: box-shadow var(--ne-transition), transform var(--ne-transition);
}
.nv-stat-card:hover { box-shadow: var(--ne-shadow); transform: translateY(-2px); }
.nv-stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--ne-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.nv-stat-icon.blue   { background: #EFF6FF; color: var(--ne-primary); }
.nv-stat-icon.green  { background: #ECFDF5; color: var(--ne-success); }
.nv-stat-icon.orange { background: #FFFBEB; color: var(--ne-warning); }
.nv-stat-icon.red    { background: #FEF2F2; color: var(--ne-danger);  }
.nv-stat-value {
  font-size: 2rem; font-weight: 800;
  color: var(--ne-text); line-height: 1;
}
.nv-stat-label {
  font-size: .8rem; color: var(--ne-muted);
  text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
  margin-top: 2px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.nv-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem 1.1rem;
  border-radius: var(--ne-radius-sm);
  font-size: .875rem; font-weight: 600;
  border: none; cursor: pointer;
  transition: all var(--ne-transition);
  text-decoration: none; white-space: nowrap;
  line-height: 1.4;
}
.nv-btn:focus-visible { outline: 3px solid var(--ne-accent); outline-offset: 2px; }
.nv-btn-primary {
  background: var(--ne-primary); color: #fff;
  box-shadow: 0 2px 8px rgba(14,159,110,.3);
}
.nv-btn-primary:hover { background: var(--ne-primary-dark); color: #fff; transform: translateY(-1px); }
.nv-btn-outline {
  background: transparent; color: var(--ne-primary);
  border: 2px solid var(--ne-primary);
}
.nv-btn-outline:hover { background: var(--ne-primary); color: #fff; }
.nv-btn-ghost {
  background: transparent; color: var(--ne-muted);
}
.nv-btn-ghost:hover { background: var(--ne-border); color: var(--ne-text); }
/* Actions de ligne standard : éditeur graphique (vert) · éditer (bleu) · dupliquer (cyan) · supprimer (rouge). */
.nv-act-editor { color: var(--ne-primary); }
.nv-act-edit  { color: var(--ne-info); }
.nv-act-dup   { color: var(--ne-cyan); }
.nv-act-del   { color: var(--ne-danger); }
.nv-btn-ghost.nv-act-editor:hover { color: var(--ne-primary); }
.nv-btn-ghost.nv-act-edit:hover  { color: var(--ne-info); }
.nv-btn-ghost.nv-act-dup:hover   { color: var(--ne-cyan); }
.nv-btn-ghost.nv-act-del:hover   { color: var(--ne-danger); }
#nv-logout { color: #fff; }
.nv-btn-danger {
  background: var(--ne-danger); color: #fff;
}
.nv-btn-danger:hover { background: #DC2626; color: #fff; }
.nv-btn-warning {
  background: #F97316; color: #fff;
}
.nv-btn-warning:hover { background: #EA580C; color: #fff; }
.nv-btn-success {
  background: var(--ne-success); color: #fff;
}
.nv-btn-success:hover { background: #059669; color: #fff; }
.nv-btn-sm { padding: .35rem .75rem; font-size: .8rem; }
.nv-btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; transform: none !important; box-shadow: none !important; }
.nv-btn-lg { padding: .75rem 1.75rem; font-size: 1rem; border-radius: 10px; }
.nv-btn-block { width: 100%; justify-content: center; }

/* ── Bandeau de liste : tuiles de stats + barre de recherche/filtres ── */
/* Tuiles de statistique (rangée responsive au-dessus d'une liste). */
.nv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.nv-stat-tile { background: var(--ne-surface); border: 1px solid var(--ne-border); border-radius: var(--ne-radius); padding: 1rem 1.15rem; display: flex; align-items: center; gap: .9rem; }
.nv-stat-tile .nv-stat-ico { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; color: #fff; background: var(--ne-primary); flex-shrink: 0; }
.nv-stat-tile .nv-stat-ico.is-info    { background: var(--ne-info); }
.nv-stat-tile .nv-stat-ico.is-cyan    { background: var(--ne-cyan); }
.nv-stat-tile .nv-stat-ico.is-warning { background: var(--ne-warning); }
.nv-stat-tile .nv-stat-ico.is-danger  { background: var(--ne-danger); }
.nv-stat-tile .nv-stat-ico.is-muted   { background: var(--ne-muted); }
.nv-stat-val { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.nv-stat-lbl { font-size: .74rem; color: var(--ne-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; margin-top: 3px; }

/* Barre d'outils : recherche à gauche, filtres (selects) à droite. */
.nv-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.nv-toolbar-search { position: relative; flex: 0 1 33%; max-width: 33%; min-width: 200px; }
.nv-toolbar-search i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--ne-muted); font-size: .85rem; pointer-events: none; }
.nv-toolbar-search .nv-input { padding-left: 2.1rem; }
.nv-toolbar-filters { display: flex; flex-wrap: wrap; gap: .5rem; flex: 0 0 auto; }
.nv-toolbar-filters .nv-select { flex: 0 0 auto; width: auto; min-width: 150px; }

/* ── Form Controls ───────────────────────────────────────── */
.nv-form-group { margin-bottom: 1.25rem; }
.nv-label {
  display: block; margin-bottom: .4rem;
  font-size: .85rem; font-weight: 600; color: var(--ne-text);
}
.nv-label .required { color: var(--ne-danger); margin-left: 2px; }
.nv-input, .nv-select, .nv-textarea {
  display: block; width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid var(--ne-border);
  border-radius: var(--ne-radius-sm);
  font-size: .9rem; color: var(--ne-text);
  background: var(--ne-surface);
  transition: border-color var(--ne-transition), box-shadow var(--ne-transition);
  outline: none;
  -webkit-appearance: none;
}
input.nv-input, .nv-select { height: 2.5rem; }
.nv-input:focus, .nv-select:focus, .nv-textarea:focus {
  border-color: var(--ne-primary);
  box-shadow: 0 0 0 3px rgba(14,159,110,.15);
}
.nv-input.is-invalid, .nv-select.is-invalid {
  border-color: var(--ne-danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}
.nv-invalid-feedback {
  display: none; color: var(--ne-danger);
  font-size: .8rem; margin-top: .3rem;
}
.nv-input.is-invalid ~ .nv-invalid-feedback,
.nv-select.is-invalid ~ .nv-invalid-feedback { display: block; }
.nv-textarea { resize: vertical; min-height: 100px; }
.pwd-strength-wrap { margin-top: .55rem; }
.pwd-strength-bar { height: 5px; background: var(--ne-border); border-radius: 99px; overflow: hidden; margin-bottom: .55rem; }
.pwd-bar-fill { height: 100%; width: 0; border-radius: 99px; transition: width .25s, background-color .25s; }
.pwd-bar-fill.lvl1 { background: #ef4444; }
.pwd-bar-fill.lvl2 { background: #f97316; }
.pwd-bar-fill.lvl3 { background: #eab308; }
.pwd-bar-fill.lvl4 { background: #22c55e; }
.pwd-checks { display: flex; flex-direction: column; gap: .28rem; }
.pwd-check { display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--ne-muted); transition: color .2s; }
.pwd-check.ok { color: #16a34a; }
.pwd-check i { font-size: .72rem; width: 13px; flex-shrink: 0; transition: color .2s; }
.nv-input-icon { position: relative; }
.nv-input-icon .nv-input { padding-left: 2.5rem; }
.nv-input-icon > i {
  position: absolute; left: .85rem; top: 50%;
  transform: translateY(-50%);
  color: var(--ne-muted); font-size: .9rem; pointer-events: none;
}
.nv-input-icon .nv-input { padding-right: 2.75rem; }
.nv-input-pwd-toggle {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 2.75rem; display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--ne-muted); transition: color var(--ne-transition);
}
.nv-input-pwd-toggle:hover { color: var(--ne-primary); }

/* ── Toggle Switch ───────────────────────────────────────── */
.nv-switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.nv-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.nv-switch-track {
  width: 42px; height: 24px;
  background: #CBD5E1; border-radius: 99px;
  transition: background var(--ne-transition);
  position: relative; flex-shrink: 0;
}
.nv-switch-track::after {
  content: ''; position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%; background: #fff;
  top: 3px; left: 3px;
  box-shadow: var(--ne-shadow-sm);
  transition: transform var(--ne-transition);
}
.nv-switch input:checked + .nv-switch-track { background: var(--ne-primary); }
.nv-switch input:checked + .nv-switch-track::after { transform: translateX(18px); }
.nv-switch-label { font-size: .875rem; color: var(--ne-text); user-select: none; }

/* ── Table ───────────────────────────────────────────────── */
.nv-table-wrap { overflow-x: auto; border-radius: var(--ne-radius); }
.nv-table {
  width: 100%; border-collapse: collapse;
  font-size: .875rem;
}
.nv-table thead th {
  background: #F8FAFC; padding: .75rem 1rem;
  text-align: left; font-weight: 700; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ne-muted); border-bottom: 1px solid var(--ne-border);
  white-space: nowrap;
}
.nv-table tbody td {
  padding: .85rem 1rem; border-bottom: 1px solid var(--ne-border);
  vertical-align: middle; color: var(--ne-text);
}
.nv-table tbody tr:last-child td { border-bottom: none; }
.nv-table tbody tr:hover { background: #F8FAFC; }
.nv-table .actions { display: flex; gap: .4rem; }

/* ── Sidebar Layout ──────────────────────────────────────── */
.nv-layout { display: flex; min-height: 100vh; }
.nv-sidebar {
  width: var(--sidebar-width);
  background: var(--ne-primary-dark);
  flex-shrink: 0;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--ne-transition);
}
.nv-sidebar-logo {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.nv-sidebar-logo h1 {
  color: #fff; font-size: 1.4rem; font-weight: 800;
  margin: 0; letter-spacing: -.02em;
  display: flex; align-items: center;
}
.nv-sidebar-logo h1 img { width: 26px; height: 26px; margin-right: .5rem; flex-shrink: 0; }
.nv-sidebar-logo span { color: var(--ne-accent); }
.nv-sidebar-logo p { color: rgba(255,255,255,.5); font-size: .75rem; margin: 0; }
.nv-sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.nv-nav-section-title {
  padding: .5rem 1.5rem;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.35);
}
.nv-nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 1.5rem; margin: .1rem .75rem;
  border-radius: var(--ne-radius-sm);
  color: rgba(255,255,255,.7);
  text-decoration: none; font-size: .875rem; font-weight: 500;
  transition: all var(--ne-transition);
  cursor: pointer;
}
.nv-nav-item i { width: 18px; text-align: center; font-size: 1rem; }
.nv-nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nv-nav-item.active { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; }
.nv-nav-item.active i { color: var(--ne-accent); }
.nv-sidebar-footer {
  padding: .875rem 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.nv-user-info { display: flex; align-items: center; gap: .5rem; overflow: hidden; }
.nv-user-avatar {
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: 32px;
  align-self: center;
  width: 32px;   min-width: 32px;   max-width: 32px;
  height: 32px;  min-height: 32px;  max-height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  line-height: 32px;
  text-align: center;
  font-size: .8rem; font-weight: 700; color: #fff;
  overflow: hidden;
  box-sizing: border-box;
}
.nv-user-info > div { flex: 1; min-width: 0; overflow: hidden; }
.nv-user-name { font-size: .78rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-user-role { font-size: .68rem; color: rgba(255,255,255,.5); }
.nv-user-info > button { flex: 0 0 auto; }

/* ── Main content ────────────────────────────────────────── */
.nv-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex; flex-direction: column;
  min-height: 100vh;
}
.nv-topbar {
  background: var(--ne-surface);
  border-bottom: 1px solid var(--ne-border);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--ne-shadow-sm);
}
.nv-topbar-title h2 { font-size: 1.25rem; margin: 0; }
.nv-topbar-title p { font-size: .8rem; color: var(--ne-muted); margin: 0; }
/* Bloc titre de page : tuile d'icône contextuelle + (titre / sous-titre). */
.nv-topbar-head { display: flex; align-items: center; gap: .85rem; }
.nv-topbar-ico {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff;
  background: linear-gradient(135deg, var(--ne-primary-dark), var(--ne-primary));
  box-shadow: var(--ne-shadow-sm);
}
.nv-content { padding: 2rem; flex: 1; }

/* ── Tour guidé (aide contextuelle par page) ──────────────────
   Bouton rond « ? » dans le topbar + surbrillance (spotlight) d'un
   élément + infobulle explicative. Aucun CDN (auto-hébergé, js/tour.js). */
.nv-help-btn {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ne-border); background: var(--ne-surface);
  color: var(--ne-primary); font-size: 1rem; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.nv-help-btn:hover { background: var(--ne-primary); color: #fff; border-color: var(--ne-primary); }
/* Cluster à droite du topbar (regroupe actions + bouton d'aide). */
.nv-topbar-right { display: flex; align-items: center; gap: .75rem; }

.nv-tour-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  /* Transparent par défaut : quand un spotlight est actif, c'est le « trou »
     (box-shadow inversé de .nv-tour-spot) qui assombrit toute la page SAUF
     l'élément mis en avant. Le backdrop ne sert alors qu'à capter les clics.
     Le voile n'est réactivé (.dim) que pour les étapes centrées (sans cible). */
  background: transparent;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.nv-tour-backdrop.on { opacity: 1; pointer-events: auto; }
.nv-tour-backdrop.dim { background: rgba(15, 23, 42, .55); }
/* Halo autour de l'élément mis en avant (box-shadow inversé = trou). */
.nv-tour-spot {
  position: absolute; z-index: 1001; border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, .55), 0 0 0 3px var(--ne-primary);
  transition: all .25s ease; pointer-events: none;
}
.nv-tour-pop {
  position: fixed; z-index: 1002; max-width: 340px; width: calc(100vw - 2rem);
  background: var(--ne-surface); border: 1px solid var(--ne-border);
  border-radius: 12px; box-shadow: var(--ne-shadow-lg, 0 12px 32px rgba(15,23,42,.22));
  padding: 1.1rem 1.15rem; transition: top .25s ease, left .25s ease;
}
.nv-tour-pop-step { font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ne-primary); margin: 0 0 .35rem; }
.nv-tour-pop-title { font-size: 1.02rem; font-weight: 700; color: var(--ne-text); margin: 0 0 .4rem; }
.nv-tour-pop-body { font-size: .88rem; color: var(--ne-muted); line-height: 1.55; margin: 0 0 1rem; }
.nv-tour-pop-nav { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.nv-tour-dots { display: flex; gap: .3rem; }
.nv-tour-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ne-border); }
.nv-tour-dot.on { background: var(--ne-primary); }
.nv-tour-actions { display: flex; gap: .5rem; }
.nv-tour-skip { background: none; border: none; color: var(--ne-muted); font-size: .82rem; cursor: pointer; }
.nv-tour-skip:hover { color: var(--ne-text); }

/* ── Auth pages ──────────────────────────────────────────── */
.nv-auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--ne-primary-dark) 0%, var(--ne-primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.nv-auth-card {
  background: var(--ne-surface);
  border-radius: var(--ne-radius-lg);
  box-shadow: var(--ne-shadow-lg);
  padding: 2.5rem;
  width: 100%; max-width: 420px;
}
.nv-auth-logo {
  text-align: center; margin-bottom: 2rem;
}
.nv-auth-logo h1 {
  font-size: 2rem; font-weight: 800;
  color: var(--ne-primary);
  letter-spacing: -.04em; margin: 0;
  display: inline-flex; align-items: center;
}
.nv-auth-logo h1 img { width: 36px; height: 36px; margin-right: .5rem; flex-shrink: 0; }
.nv-auth-logo span { color: var(--ne-accent); }
.nv-auth-logo p { color: var(--ne-muted); font-size: .875rem; margin: .5rem 0 0; }
.nv-auth-divider {
  height: 1px; background: var(--ne-border);
  margin: 1.5rem 0; position: relative;
}

/* ── Visitor form ────────────────────────────────────────── */
.nv-visitor-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #EFF6FF 0%, #DBEAFE 100%);
  display: flex; flex-direction: column;
}
.nv-visitor-header {
  background: var(--ne-surface);
  border-bottom: 1px solid var(--ne-border);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--ne-shadow-sm);
}
.nv-visitor-header .brand h1 {
  font-size: 1.25rem; font-weight: 800;
  color: var(--ne-primary); margin: 0;
}
.nv-visitor-header .brand span { color: var(--ne-accent); }
.nv-visitor-logo { max-height: 44px; max-width: 180px; object-fit: contain; display: block; }
.nv-visitor-brand-name { font-size: 1.1rem; font-weight: 700; color: var(--ne-primary); }
.nv-visitor-footer {
  text-align: center; padding: .6rem 1rem;
  font-size: .75rem; color: var(--ne-muted);
  background: var(--ne-surface); border-top: 1px solid var(--ne-border);
}
.nv-visitor-body {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}
.nv-visitor-card {
  background: var(--ne-surface);
  border-radius: var(--ne-radius-lg);
  box-shadow: var(--ne-shadow-lg);
  padding: 2.5rem;
  width: 100%; max-width: 560px;
}
.nv-visitor-card h2 {
  font-size: 1.5rem; color: var(--ne-primary); margin-bottom: .25rem;
}
.nv-visitor-card .subtitle { color: var(--ne-muted); font-size: .9rem; margin-bottom: 2rem; }

/* ── Success / Empty states ──────────────────────────────── */
/* État vide/succès de référence : carte blanche soignée + cercle d'icône
   + icône animée (variantes anim-*). Voir la règle « États vides » du CLAUDE.md. */
.nv-state {
  text-align: center;
  padding: 3rem 2rem;
  /* Carte blanche soignée */
  background: var(--ne-surface);
  border: 1px solid var(--ne-border);
  border-radius: var(--ne-radius-lg);
  box-shadow: var(--ne-shadow-sm);
  max-width: 480px;
  margin: 1.5rem auto;
}
.nv-state-icon {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto 1.25rem;
}
.nv-state-icon.success { background: #DCFCE7; color: var(--ne-success); }
.nv-state-icon.empty   {
  background: linear-gradient(135deg, var(--ne-accent-light) 0%, var(--ne-accent) 100%);
  color: var(--ne-primary-dark);
}
.nv-state h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.nv-state p  { color: var(--ne-muted); max-width: 400px; margin: 0 auto; }
/* Déjà dans une carte (.nv-card) ou une cellule de tableau → pas de double carte */
.nv-card .nv-state,
td .nv-state, th .nv-state {
  background: none; border: none; box-shadow: none;
  max-width: none; margin: 0; padding: 2.5rem 1rem;
}

/* Icônes d'état animées — variantes appliquées par page pour varier l'ambiance.
   Respecte prefers-reduced-motion (désactivées plus bas). */
.nv-state-icon i { animation-duration: 3s; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
.nv-state-icon.anim-float i  { animation-name: nv-state-float; }
.nv-state-icon.anim-pulse i  { animation-name: nv-state-pulse; }
.nv-state-icon.anim-swing i  { animation-name: nv-state-swing; transform-origin: 50% 10%; }
.nv-state-icon.anim-bob i    { animation-name: nv-state-bob; }
.nv-state-icon.anim-pop i    { animation-name: nv-state-pop; }
.nv-state-icon.anim-tilt i   { animation-name: nv-state-tilt; }
.nv-state-icon.anim-spin i   { animation-name: nv-state-spin; animation-timing-function: linear; animation-duration: 6s; }
.nv-state-icon.anim-heartbeat i { animation-name: nv-state-heartbeat; animation-duration: 2s; }

@keyframes nv-state-float  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes nv-state-pulse  { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .82; } }
@keyframes nv-state-swing  { 0%,100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
@keyframes nv-state-bob    { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(3deg); } }
@keyframes nv-state-pop    { 0%,60%,100% { transform: scale(1); } 30% { transform: scale(1.18); } }
@keyframes nv-state-tilt   { 0%,100% { transform: rotate(0); } 25% { transform: rotate(6deg); } 75% { transform: rotate(-6deg); } }
@keyframes nv-state-spin   { to { transform: rotate(360deg); } }
@keyframes nv-state-heartbeat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.2); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) {
  .nv-state-icon i { animation: none !important; }
}

/* État vide compact (inline dans une carte) — conservé pour les petits encarts.
   Pour un état vide de liste/page, préférer .nv-state (carte + cercle animé). */
.nv-empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; text-align: center; padding: 2rem 1rem; color: var(--ne-muted);
}
.nv-empty-state > i { font-size: 1.5rem; color: var(--ne-muted); }
.nv-empty-state p   { margin: 0; color: var(--ne-muted); }

/* ── Badge de version discret (coin bas-droite, cf. js/version.js) ── */
.nv-version-badge {
  position: fixed; right: 8px; bottom: 6px; z-index: 2000;
  font-size: 10px; line-height: 1; letter-spacing: .02em;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color: var(--ne-muted, #64748B); opacity: .45;
  pointer-events: none; user-select: none;
}

/* ── Toast ───────────────────────────────────────────────── */
#nv-toast-container {
  position: fixed; top: 1.5rem; right: 1.5rem;
  z-index: 9999; display: flex; flex-direction: column; gap: .5rem;
}
.nv-toast {
  background: var(--ne-surface);
  border-radius: var(--ne-radius-sm);
  box-shadow: var(--ne-shadow-lg);
  padding: .875rem 1.25rem;
  display: flex; align-items: center; gap: .75rem;
  min-width: 280px; max-width: 400px;
  animation: slideInRight .25s ease;
  border-left: 4px solid var(--ne-info);
}
.nv-toast.success { border-left-color: var(--ne-success); }
.nv-toast.danger  { border-left-color: var(--ne-danger);  }
.nv-toast.warning { border-left-color: var(--ne-warning); }
.nv-toast i { font-size: 1.1rem; }
.nv-toast.success i { color: var(--ne-success); }
.nv-toast.danger  i { color: var(--ne-danger);  }
.nv-toast.warning i { color: var(--ne-warning); }
.nv-toast span { flex: 1; font-size: .875rem; }
@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

/* ── Modal ───────────────────────────────────────────────── */
.nv-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem;
  animation: fadeIn .2s ease;
}
.nv-modal {
  background: var(--ne-surface);
  border-radius: var(--ne-radius-lg);
  box-shadow: var(--ne-shadow-lg);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: scaleIn .2s ease;
  overflow: hidden;
}
.nv-modal.nv-modal-lg { max-width: 740px; }
.nv-modal-header {
  background: linear-gradient(135deg, var(--ne-primary-dark) 0%, var(--ne-primary-light) 100%);
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: none;
  display: flex; align-items: center; justify-content: space-between; gap: .875rem; flex-shrink: 0;
  color: #fff;
}
.nv-modal-head-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,.15); display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: .95rem; flex-shrink: 0;
}
.nv-modal-title { font-size: 1rem; font-weight: 700; margin: 0; color: #fff; }
.nv-modal-close {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.85); font-size: 1.2rem; padding: .25rem;
  border-radius: 6px; transition: all var(--ne-transition);
  display: flex; align-items: center;
}
.nv-modal-close:hover { background: rgba(255,255,255,.15); color: #fff; }
.nv-modal-header.danger  { background: linear-gradient(135deg, #7F1D1D 0%, #EF4444 100%); animation: nv-danger-pulse  1.6s ease-in-out infinite; }
.nv-modal-header.warning { background: linear-gradient(135deg, #7C2D12 0%, #F97316 100%); animation: nv-warning-pulse 1.6s ease-in-out infinite; }
.nv-modal-body { padding: 1.75rem; overflow-y: auto; flex: 1; }
.nv-modal-footer {
  padding: 1rem 1.75rem;
  background: var(--ne-bg);
  border-top: 1px solid var(--ne-border);
  border-bottom: none;
  display: flex; gap: .75rem; justify-content: flex-end;
  flex-shrink: 0;
}
@keyframes fadeIn        { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn       { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes nv-danger-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
  50%      { box-shadow: 0 6px 24px rgba(239,68,68,.55); }
}
@keyframes nv-warning-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
  50%      { box-shadow: 0 6px 24px rgba(249,115,22,.55); }
}

/* ── Loader ──────────────────────────────────────────────── */
.nv-loader {
  display: flex; align-items: center; justify-content: center;
  padding: 3rem;
}
.nv-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--ne-border);
  border-top-color: var(--ne-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Search bar ──────────────────────────────────────────── */
.nv-search {
  position: relative; max-width: 320px;
}
.nv-search input {
  padding-left: 2.5rem;
  border-radius: 99px;
  border: 1.5px solid var(--ne-border);
  background: var(--ne-bg);
  width: 100%;
}
.nv-search i {
  position: absolute; left: .9rem; top: 50%;
  transform: translateY(-50%);
  color: var(--ne-muted); font-size: .875rem;
}

/* ── Lang toggle ─────────────────────────────────────────── */
.nv-lang-toggle {
  display: flex; gap: .35rem;
}
.nv-lang-btn {
  padding: .3rem .65rem;
  border-radius: 6px; border: 1.5px solid var(--ne-border);
  background: transparent; font-size: .8rem; font-weight: 700;
  color: var(--ne-muted); cursor: pointer;
  transition: all var(--ne-transition);
}
.nv-lang-btn.active {
  background: var(--ne-primary); color: #fff; border-color: var(--ne-primary);
}

/* ── QR code box ─────────────────────────────────────────── */
.nv-qr-box {
  background: var(--ne-bg);
  border: 2px solid var(--ne-border);
  border-radius: var(--ne-radius);
  padding: 2rem;
  display: inline-flex;
  flex-direction: column; align-items: center; gap: 1rem;
}
.nv-qr-box canvas { border-radius: var(--ne-radius-sm); }

/* ── Drag handle ─────────────────────────────────────────── */
.nv-drag-handle {
  cursor: grab; color: var(--ne-muted);
  padding: .25rem; touch-action: none;
}
.nv-drag-handle:active { cursor: grabbing; }
.nv-sortable-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  background: var(--ne-surface);
  border: 1.5px solid var(--ne-border);
  border-radius: var(--ne-radius-sm);
  margin-bottom: .5rem;
  transition: box-shadow var(--ne-transition);
}
.nv-sortable-item:hover { box-shadow: var(--ne-shadow-sm); }
.nv-sortable-item.dragging { box-shadow: var(--ne-shadow); opacity: .8; }

/* ── Utilities ───────────────────────────────────────────── */
.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem  !important; }
.gap-3 { gap: .75rem !important; }
.gap-4 { gap: 1rem   !important; }
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.flex-wrap { flex-wrap: wrap !important; }
.w-100 { width: 100% !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-auto { margin-top: auto !important; }
.ms-auto { margin-left: auto !important; }

@media (min-width: 769px) {
  .d-md-none { display: none !important; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nv-sidebar {
    width: var(--sidebar-width);
    transform: translateX(-100%);
    box-shadow: none;
  }
  .nv-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--ne-shadow-lg);
  }
  .nv-main { margin-left: 0; overflow-x: hidden; }
  .nv-content { padding: 1rem; overflow-x: hidden; }

  /* Topbar mobile : compact et sans débordement */
  .nv-topbar {
    padding: .75rem 1rem;
    gap: .5rem;
    overflow: hidden;
  }
  .nv-topbar-title,
  .nv-topbar-ico { display: none; }            /* cache titre+date (et l'icône) — remplacé par logo mobile */
  .nv-topbar .nv-lang-toggle { display: none; }/* cache le sélecteur de langue */
  .nv-topbar .nv-btn > span { display: none; } /* icônes seules dans les boutons du topbar */
  .nv-topbar .nv-btn > i { margin: 0; }

  .nv-visitor-card { padding: 1.5rem; }
  .nv-auth-card { padding: 1.75rem; }

  /* Overlay sombre derrière la sidebar ouverte */
  .nv-sidebar-backdrop {
    display: block !important;
    position: fixed; inset: 0;
    background: rgba(15,23,42,.45);
    z-index: 99;
    animation: fadeIn .2s ease;
  }
}

.nv-sidebar-backdrop { display: none; }

.nv-mobile-brand {
  display: none;
  font-size: 1.2rem; font-weight: 800;
  color: var(--ne-primary); letter-spacing: -.03em;
  flex-shrink: 0;
  margin-right: auto;
}
.nv-mobile-brand span { color: var(--ne-accent); }
@media (max-width: 768px) {
  .nv-mobile-brand { display: block; }
}

/* ═══════════════════════════════════════════════════════════
   Utilitaires CSS — à utiliser à la place des styles inline
   ═══════════════════════════════════════════════════════════ */

/* ── Display ── */
.hidden        { display: none; }
.d-flex        { display: flex; }
.d-grid        { display: grid; }
.d-block       { display: block; }
.d-inline-flex { display: inline-flex; }

/* ── Flexbox ── */
.flex-col        { flex-direction: column; }
.items-center    { align-items: center; }
.items-start     { align-items: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.flex-wrap       { flex-wrap: wrap; }
.flex-1          { flex: 1; }
.flex-shrink-0   { flex-shrink: 0; }
.min-w-0         { min-width: 0; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }

/* ── Margin ── */
.m-0  { margin: 0; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mr-1 { margin-right: .25rem; }
.mr-2 { margin-right: .5rem; }
.ml-auto { margin-left: auto; }

/* ── Padding ── */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* ── Typography ── */
.text-xs   { font-size: .75rem; }
.text-sm   { font-size: .85rem; }
.text-base { font-size: .875rem; }
.fw-400    { font-weight: 400; }
.fw-600    { font-weight: 600; }
.fw-700    { font-weight: 700; }
.fw-800    { font-weight: 800; }
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* ── Couleurs ── */
.text-muted   { color: var(--ne-muted); }
.text-primary { color: var(--ne-primary); }
.text-danger  { color: var(--ne-danger); }
.text-success { color: var(--ne-success); }
.text-white   { color: #fff; }

/* ── Misc ── */
.resize-y        { resize: vertical; }
.w-full          { width: 100%; }
.overflow-hidden { overflow: hidden; }
.cursor-pointer  { cursor: pointer; }
.link-underline  { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
