/* ===== VANDAFA PÔLE LÉGAL — CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Share+Tech+Mono&family=Exo+2:wght@300;400;500;600;700;800&display=swap');

:root {
  --pink:         #ff0080;
  --pink-dark:    #cc0066;
  --pink-light:   #ff3399;
  --pink-glow:    rgba(255,0,128,0.25);
  --pink-subtle:  rgba(255,0,128,0.08);
  --bg:           #0d0005;
  --bg-2:         rgba(15,0,8,0.92);
  --bg-3:         rgba(22,0,11,0.88);
  --bg-4:         rgba(30,0,15,0.90);
  --border:       rgba(255,0,100,0.22);
  --border-subtle:rgba(255,255,255,0.06);
  --text:         #f8f0f4;
  --text-muted:   #cc99bb;
  --text-dim:     #775566;
  --success:      #00e676;
  --warning:      #ffd600;
  --danger:       #ff1744;
  --info:         #40c4ff;
  --sidebar-w:    240px;
  --radius:       8px;
  --radius-lg:    14px;
  --transition:   0.2s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  font-family: 'Exo 2', sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
  /* Fond bordeaux dégradé style VandaFA */
  background:
    radial-gradient(ellipse 130% 80% at 50% 10%, #320014 0%, #1e000c 25%, #0e0005 55%, #060002 100%)
    fixed;
  background-color: #060002;
}

.hidden { display: none !important; }
.pink { color: var(--pink); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: rgba(10,0,5,0.5); }
::-webkit-scrollbar-thumb { background: var(--pink-dark); border-radius: 2px; }

/* ===== AUTH SCREEN ===== */
.auth-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  background: transparent;
}

/* Lueurs de fond animées */
.auth-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  animation: glowPulse var(--dur,4s) ease-in-out infinite var(--delay,0s);
}
.auth-glow-1 {
  top: 20%; left: 50%; transform: translate(-50%,-50%);
  width: 1000px; height: 700px;
  background: radial-gradient(ellipse, rgba(255,0,70,0.20) 0%, rgba(180,0,50,0.08) 40%, transparent 65%);
  --dur: 4s; --delay: 0s;
}
.auth-glow-2 {
  top: 10%; right: 5%; transform: none;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,20,80,0.15) 0%, transparent 65%);
  --dur: 6s; --delay: 1.5s;
  animation-name: glowPulse2;
}
.auth-glow-3 {
  bottom: 15%; left: 5%; transform: none;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(200,0,60,0.12) 0%, transparent 65%);
  --dur: 5s; --delay: 3s;
  animation-name: glowPulse2;
}
.auth-vignette {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.85) 100%);
  pointer-events: none; z-index: 1;
}

@keyframes glowPulse {
  0%,100% { opacity:.5; transform: translate(-50%,-50%) scale(1); }
  50%      { opacity:1;  transform: translate(-50%,-50%) scale(1.10); }
}
@keyframes glowPulse2 {
  0%,100% { opacity:.4; transform: scale(1); }
  50%     { opacity:1;  transform: scale(1.12); }
}

/* ===== AUTH CONTAINER ===== */
.auth-container {
  position: relative; z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
  width: 100%; max-width: 420px; padding: 2rem;
}

.auth-logo {
  display: flex; align-items: center; gap: 1rem;
  animation: fadeDown .6s ease;
}
.auth-logo img {
  width: 64px; height: 64px;
  filter: drop-shadow(0 0 18px var(--pink));
}
.auth-brand-main {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2rem; font-weight: 700;
  letter-spacing: .1em; color: var(--text); display: block;
}
.auth-brand-sub {
  font-size: .7rem; letter-spacing: .3em;
  color: var(--text-muted); text-transform: uppercase; display: block;
}

.auth-card {
  width: 100%;
  background: rgba(16,0,8,0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 0 60px rgba(255,0,80,0.13), inset 0 1px 0 rgba(255,80,140,0.07);
  animation: fadeUp .5s ease;
}

@keyframes fadeUp   { from { opacity:0; transform:translateY(20px); }  to { opacity:1; transform:translateY(0); } }
@keyframes fadeDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }

.auth-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 1.5rem; color: var(--text);
}

.auth-error {
  background: rgba(255,23,68,.15); border: 1px solid rgba(255,23,68,.3);
  border-radius: var(--radius); padding: .75rem;
  color: var(--danger); font-size: .85rem; margin-bottom: 1rem;
}
.auth-error:empty { display: none; }

.auth-switch {
  margin-top: 1.25rem; text-align: center;
  color: var(--text-muted); font-size: .875rem;
}
.auth-switch a { color: var(--pink); cursor: pointer; font-weight: 600; transition: var(--transition); }
.auth-switch a:hover { color: var(--pink-light); }

/* ===== FORMS ===== */
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

label {
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted);
}

input, select, textarea {
  background: rgba(10,0,5,.7); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: .65rem .875rem;
  color: var(--text); font-family: 'Exo 2', sans-serif; font-size: .9rem;
  transition: var(--transition); outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 2px var(--pink-glow);
}
textarea { resize: vertical; min-height: 80px; }
select option { background: #1a000e; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.25rem;
  border: none; border-radius: var(--radius); cursor: pointer;
  font-family: 'Exo 2', sans-serif; font-size: .85rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  transition: var(--transition); text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark) 100%);
  color: white; box-shadow: 0 4px 15px rgba(255,0,128,.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--pink-light) 0%, var(--pink) 100%);
  box-shadow: 0 6px 22px rgba(255,0,128,.55);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover { background: var(--bg-4); color: var(--text); }
.btn-full { width: 100%; }
.btn-sm { padding: .35rem .75rem; font-size: .75rem; }
.btn-danger { background: rgba(255,23,68,.15); color: var(--danger); border: 1px solid rgba(255,23,68,.3); }
.btn-danger:hover { background: rgba(255,23,68,.3); }
.btn-success { background: rgba(0,230,118,.15); color: var(--success); border: 1px solid rgba(0,230,118,.3); }
.btn-success:hover { background: rgba(0,230,118,.3); }

/* ===== APP LAYOUT ===== */
.app { display: flex; height: 100vh; overflow: hidden; position: relative; z-index: 5; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: rgba(10,0,5,.92);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.sidebar-logo {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-logo img { width: 36px; height: 36px; }
.sidebar-brand {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem; font-weight: 700; letter-spacing: .05em;
}
.sidebar-sub { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); }

.sidebar-nav {
  flex: 1; padding: .75rem 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
}
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 1rem; cursor: pointer;
  border-radius: var(--radius); margin: 0 .5rem;
  color: var(--text-muted); font-size: .875rem; font-weight: 500;
  transition: var(--transition); text-decoration: none;
  border: 1px solid transparent;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; fill: currentColor; }
.nav-item:hover { background: var(--pink-subtle); color: var(--text); border-color: var(--border); }
.nav-item.active { background: var(--pink-subtle); color: var(--pink); border-color: var(--border); }

.sidebar-user {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem; border-top: 1px solid var(--border-subtle);
}
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .875rem; flex-shrink: 0;
}
.user-name { font-size: .875rem; font-weight: 600; }
.user-role { font-size: .7rem; color: var(--text-muted); letter-spacing: .05em; }
.user-info { flex: 1; min-width: 0; }
.logout-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); padding: .25rem;
  transition: var(--transition); border-radius: 4px;
}
.logout-btn:hover { color: var(--danger); background: rgba(255,23,68,.1); }
.logout-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1; overflow-y: auto;
  background: rgba(6,0,3,.65);
  }
.page { padding: 2rem; display: none; }
.page.active { display: block; }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.75rem; gap: 1rem;
}
.page-header h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.75rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
}
.page-sub { color: var(--text-muted); font-size: .8rem; letter-spacing: .1em; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-3); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 1.25rem;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem;
}
.card-header h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
}
.card-link { color: var(--pink); font-size: .8rem; cursor: pointer; font-weight: 600; transition: var(--transition); }
.card-link:hover { color: var(--pink-light); }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-3); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 1.25rem;
  position: relative; overflow: hidden; transition: var(--transition);
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%; background: var(--accent,var(--pink));
}
.stat-card:hover { border-color: var(--border); transform: translateY(-2px); }
.stat-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 2.25rem; font-weight: 400; color: var(--text);
  line-height: 1; margin-bottom: .4rem;
}
.stat-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--text-muted); }
.stat-icon { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); opacity: .08; font-size: 3rem; }

/* ===== DASHBOARD GRID ===== */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ===== ACTIVITY LIST ===== */
.activity-list { display: flex; flex-direction: column; gap: .5rem; }
.activity-item {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .65rem; border-radius: var(--radius);
  border: 1px solid transparent; transition: var(--transition);
}
.activity-item:hover { background: var(--bg-4); border-color: var(--border-subtle); }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); flex-shrink: 0; margin-top: .25rem; }
.activity-type { font-weight: 600; font-size: .875rem; margin-bottom: .15rem; }
.activity-meta { font-size: .75rem; color: var(--text-muted); }

/* ===== FILTERS BAR ===== */
.filters-bar { display: flex; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.filters-bar input { flex: 1; min-width: 200px; }
.filters-bar select { min-width: 150px; }

/* ===== BUSINESSES GRID ===== */
.businesses-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 1rem; }
.biz-card {
  background: var(--bg-3); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 1.25rem;
  transition: var(--transition); cursor: pointer;
  position: relative; overflow: hidden;
}
.biz-card::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0;
  width: 3px; background: var(--status-color,var(--text-dim));
}
.biz-card:hover { border-color: var(--border); transform: translateY(-2px); }
.biz-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: .75rem; gap: .5rem; }
.biz-name { font-family: 'Rajdhani', sans-serif; font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.biz-type {
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  padding: .2rem .5rem; background: var(--pink-subtle); color: var(--pink);
  border: 1px solid var(--border); border-radius: 4px; flex-shrink: 0;
}
.biz-status { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .5rem; }
.status-taken { color: var(--danger); }
.status-available { color: var(--success); }
.biz-location { font-size: .8rem; color: var(--text-muted); margin-bottom: .5rem; }
.biz-location::before { content: '📍 '; }
.biz-price { font-family: 'Share Tech Mono', monospace; font-size: .9rem; color: var(--warning); }
.biz-desc { font-size: .8rem; color: var(--text-muted); margin-top: .5rem; }
.biz-actions {
  display: flex; gap: .5rem; margin-top: 1rem;
  border-top: 1px solid var(--border-subtle); padding-top: .75rem;
}

/* ===== TABLE ===== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead tr { border-bottom: 1px solid var(--border); }
th {
  text-align: left; padding: .75rem 1rem;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted);
}
td { padding: .75rem 1rem; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
tr:hover td { background: var(--bg-3); }
tr:last-child td { border-bottom: none; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .5rem; border-radius: 4px;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
}
.badge-success { background: rgba(0,230,118,.15); color: var(--success); border: 1px solid rgba(0,230,118,.3); }
.badge-danger  { background: rgba(255,23,68,.15);  color: var(--danger);  border: 1px solid rgba(255,23,68,.3); }
.badge-warning { background: rgba(255,214,0,.15);  color: var(--warning); border: 1px solid rgba(255,214,0,.3); }
.badge-info    { background: rgba(64,196,255,.15);  color: var(--info);    border: 1px solid rgba(64,196,255,.3); }
.badge-pink    { background: var(--pink-subtle); color: var(--pink); border: 1px solid var(--border); }

/* ===== KANBAN ===== */
.kanban-board { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; height: calc(100vh - 180px); }
.kanban-col {
  background: var(--bg-3); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); display: flex; flex-direction: column; overflow: hidden;
}
.kanban-col-header {
  padding: 1rem; border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
}
.kanban-col-title { font-family: 'Rajdhani', sans-serif; font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.kanban-count { font-family: 'Share Tech Mono', monospace; font-size: .75rem; color: var(--text-muted); background: var(--bg-4); padding: .1rem .4rem; border-radius: 4px; }
.kanban-cards { flex: 1; overflow-y: auto; padding: .75rem; gap: .65rem; display: flex; flex-direction: column; }
.kanban-card {
  background: var(--bg-4); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: .875rem;
  cursor: pointer; transition: var(--transition);
}
.kanban-card:hover { border-color: var(--border); transform: translateX(3px); }
.kanban-card-title { font-weight: 600; font-size: .875rem; margin-bottom: .35rem; }
.kanban-card-meta { font-size: .75rem; color: var(--text-muted); margin-bottom: .5rem; }
.kanban-card-footer { display: flex; align-items: center; justify-content: space-between; }

/* ===== MAP ===== */
.map-container { display: grid; grid-template-columns: 1fr 280px; gap: 1rem; height: calc(100vh - 160px); }
.map-wrapper {
  background: var(--bg-3); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
}
#gta-map {
  width: 100%; height: 100%; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(0,80,30,.3) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(30,30,80,.3) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(0,40,80,.4) 0%, transparent 40%),
    linear-gradient(160deg,#0f1a2a 0%,#1a2a1a 40%,#0d1a0d 60%,#0a1520 100%);
  cursor: grab;
}
#gta-map:active { cursor: grabbing; }
#map-svg { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }
#map-pins { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.map-pin { position: absolute; transform: translate(-50%,-100%); cursor: pointer; pointer-events: all; transition: transform var(--transition); }
.map-pin:hover { transform: translate(-50%,-110%) scale(1.2); }
.map-pin-inner { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.map-pin-inner span { transform: rotate(45deg); font-size: 12px; }
.pin-taken .map-pin-inner { background: var(--danger); }
.pin-available .map-pin-inner { background: var(--success); }
.map-tooltip { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .75rem; font-size: .75rem; white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.5); pointer-events: none; }
.map-tooltip-name { font-weight: 700; color: var(--text); }
.map-tooltip-loc { color: var(--text-muted); }
.map-zoom-controls { position: absolute; bottom: 1rem; right: 1rem; display: flex; flex-direction: column; gap: 4px; }
.map-zoom-controls button { width: 32px; height: 32px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; color: var(--text); font-size: 1.1rem; font-weight: 700; transition: var(--transition); }
.map-zoom-controls button:hover { background: var(--pink); border-color: var(--pink); }
.map-legend { background: var(--bg-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 1.25rem; overflow-y: auto; }
.map-legend h3 { font-family: 'Rajdhani', sans-serif; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); margin-bottom: .75rem; }
.legend-item { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--text-muted); margin-bottom: .4rem; }
.pin { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.pin-taken { background: var(--danger); }
.pin-available { background: var(--success); }
.map-biz-list { display: flex; flex-direction: column; gap: .5rem; }
.map-biz-item { padding: .5rem; border-radius: var(--radius); border: 1px solid var(--border-subtle); cursor: pointer; transition: var(--transition); font-size: .8rem; }
.map-biz-item:hover { border-color: var(--border); background: var(--bg-4); }
.map-biz-item-name { font-weight: 600; }
.map-biz-item-loc { color: var(--text-muted); font-size: .72rem; }

/* ===== RECAP ===== */
.recap-user-section { background: var(--bg-3); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); margin-bottom: 1rem; overflow: hidden; }
.recap-user-header { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-subtle); cursor: pointer; }
.recap-user-header:hover { background: var(--bg-4); }
.recap-user-name { font-weight: 700; font-size: 1rem; }
.recap-user-count { font-size: .8rem; color: var(--text-muted); }
.recap-user-body { padding: .75rem 1.25rem; }

/* ===== ROLES PAGE ===== */
.roles-content { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.role-badge-list { display: flex; flex-direction: column; gap: .5rem; }
.role-badge { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-radius: var(--radius); border: 1px solid var(--border-subtle); background: var(--bg-4); }
.role-color { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.role-name { font-weight: 700; font-size: .875rem; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 1rem;
}
.modal {
  background: rgba(18,0,9,.95); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 100%; max-width: 540px;
  box-shadow: 0 20px 60px rgba(0,0,0,.8);
  animation: modalIn .25s cubic-bezier(.4,0,.2,1);
}
@keyframes modalIn { from { opacity:0; transform:scale(.95) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-subtle); }
.modal-header h3 { font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.modal-header button { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.1rem; transition: var(--transition); padding: .25rem; border-radius: 4px; }
.modal-header button:hover { background: var(--bg-4); color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-footer { display: flex; gap: .75rem; justify-content: flex-end; padding: 1rem 1.5rem; border-top: 1px solid var(--border-subtle); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: rgba(18,0,9,.95); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .75rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.6); font-size: .875rem; z-index: 1000;
  animation: toastIn .3s ease; max-width: 320px;
}
@keyframes toastIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-info    { border-left: 3px solid var(--pink); }

/* ===== RESPONSIVE ===== */
@media (max-width:1024px) {
  .kanban-board { grid-template-columns: 1fr; height: auto; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .roles-content { grid-template-columns: 1fr; }
  .map-container { grid-template-columns: 1fr; }
}
@media (max-width:768px) {
  :root { --sidebar-w: 60px; }
  .sidebar-logo div, .sidebar-sub, .sidebar-brand { display: none; }
  .sidebar-logo img { width: 30px; height: 30px; }
  .nav-item span, .user-name, .user-role { display: none; }
  .sidebar-user { justify-content: center; }
  .logout-btn, .auth-brand { display: none; }
  .nav-item { justify-content: center; padding: .65rem; }
  .page { padding: 1rem; }
  .form-row { grid-template-columns: 1fr; }
}

/* ===== CARTE GTA V INTERACTIVE ===== */
.map-page-layout {
  display: flex; gap: 0;
  height: calc(100vh - 0px);
  margin: -2rem;
  overflow: hidden;
}

/* Panneau gauche */
.map-sidebar-panel {
  width: 300px; min-width: 300px;
  background: rgba(8,0,4,.95);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 1rem; overflow: hidden;
  backdrop-filter: blur(16px);
}

.map-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.map-panel-header h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
}

/* Filtres */
.map-filter-bar {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: .5rem;
}
.filter-btn {
  font-size: .68rem; font-weight: 700;
  padding: .2rem .5rem; border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: transparent; color: var(--text-muted);
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 3px;
}
.filter-btn.active {
  background: color-mix(in srgb, var(--cat-color,var(--pink)) 15%, transparent);
  border-color: var(--cat-color, var(--pink));
  color: var(--cat-color, var(--pink));
}
.filter-btn:hover { opacity: .85; }
.filter-all, .filter-none {
  background: rgba(255,255,255,.05);
  color: var(--text-muted);
  font-size: .65rem;
}

/* Liste marqueurs */
.map-marker-list {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: .5rem;
}
.marker-list-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .6rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: var(--transition); font-size: .82rem;
}
.marker-list-item:hover { background: rgba(255,0,80,.07); border-color: var(--border); }
.mli-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.mli-name { font-weight: 600; line-height: 1.2; }
.mli-cat  { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

/* Légende */
.map-legend-section { border-top: 1px solid var(--border-subtle); padding-top: .75rem; margin-top: .5rem; }
.map-legend-cats { display: flex; flex-direction: column; gap: 3px; }
.legend-cat { display: flex; align-items: center; gap: .4rem; font-size: .75rem; color: var(--text-muted); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Viewport carte */
.map-main { flex: 1; position: relative; overflow: hidden; background: #1a2a1a; }

.map-viewport {
  width: 100%; height: 100%;
  overflow: hidden; position: relative;
  user-select: none;
}

.map-layer {
  position: absolute; top: 0; left: 0;
  transform-origin: 0 0;
  transition: none;
  will-change: transform;
}

#map-img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  pointer-events: none;
  image-rendering: auto;
}

.map-markers-layer {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* Marqueurs */
.map-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: all;
  cursor: pointer;
  z-index: 10;
  transition: transform .15s ease;
}
.map-marker:hover { transform: translate(-50%, -100%) scale(1.25); z-index: 20; }

.marker-pin {
  width: 32px; height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.25);
  position: relative;
}
.marker-pin::after {
  content: '';
  position: absolute; bottom: -5px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 6px; height: 6px;
  background: inherit;
}
.marker-icon {
  transform: rotate(45deg);
  font-size: 15px; line-height: 1;
  pointer-events: none;
}
.marker-label {
  position: absolute; top: calc(100% + 4px); left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.85); color: #fff;
  font-size: .6rem; font-weight: 700;
  padding: 2px 5px; border-radius: 3px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s;
  backdrop-filter: blur(4px);
}
.map-marker:hover .marker-label { opacity: 1; }

/* Popup marqueur */
.marker-popup {
  position: absolute; bottom: calc(100% + 10px); left: 50%;
  transform: translateX(-50%);
  background: rgba(12,0,6,.97);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0; min-width: 220px; max-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,.7);
  z-index: 100;
  animation: popupIn .2s ease;
  pointer-events: all;
}
@keyframes popupIn { from { opacity:0; transform:translateX(-50%) translateY(8px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }

.popup-header {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .75rem; border-bottom: 1px solid var(--border-subtle);
}
.popup-cat-icon { font-size: 1.5rem; flex-shrink: 0; }
.popup-name { font-weight: 700; font-size: .9rem; line-height: 1.2; }
.popup-cat  { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.popup-close { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: .9rem; padding: 0; line-height: 1; }
.popup-close:hover { color: var(--danger); }
.popup-logo { width: 100%; max-height: 80px; object-fit: contain; padding: .5rem; background: rgba(255,255,255,.05); }
.popup-desc { padding: .5rem .75rem; font-size: .8rem; color: var(--text-muted); border-bottom: 1px solid var(--border-subtle); }
.popup-info { padding: .3rem .75rem; font-size: .78rem; color: var(--text-muted); }
.popup-info strong { color: var(--text); }
.popup-actions { display: flex; gap: .5rem; padding: .6rem .75rem; border-top: 1px solid var(--border-subtle); }

/* Contrôles zoom */
.map-controls {
  position: absolute; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: 4px; z-index: 50;
}
.map-controls button {
  width: 36px; height: 36px;
  background: rgba(12,0,6,.9); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  color: var(--text); font-size: 1.2rem; font-weight: 700;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}
.map-controls button:hover { background: var(--pink); border-color: var(--pink); }

/* Hint placement */
.map-placing-hint {
  position: absolute; top: 1rem; left: 50%; transform: translateX(-50%);
  background: rgba(255,0,80,.2); border: 1px solid var(--pink);
  border-radius: 20px; padding: .4rem 1rem;
  font-size: .8rem; font-weight: 600; color: var(--pink);
  backdrop-filter: blur(8px); z-index: 50;
  animation: fadeUp .3s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .map-page-layout { flex-direction: column; }
  .map-sidebar-panel { width: 100%; min-width: unset; height: 200px; }
}

#page-map{padding:0!important;margin:0!important;height:100vh!important;overflow:hidden!important;display:none}
#page-map.active{display:block!important}

#page-map{padding:0!important;margin:0!important}
#page-map>div:first-child{width:270px!important;min-width:270px!important}
.map-viewport-inner,.map-right,#mview{height:100%!important}

#page-map{padding:0!important;margin:0!important;height:calc(100vh)!important;overflow:hidden!important}
#page-map>div{height:calc(100vh)!important;margin:0!important}
#mview{height:calc(100vh)!important}
.map-right{height:calc(100vh)!important}
.map-left{height:calc(100vh)!important;overflow-y:auto!important}
