:root{
  --bg:#0f172a;
  --panel:#111827;
  --panel2:#1f2937;
  --border:#243041;
  --text:#f3f4f6;
  --muted:#9ca3af;
  --accent:#3b82f6;
  --danger:#ef4444;
  --warn:#f59e0b;
  --success:#10b981;
  --purple:#8b5cf6;
  --light:#e5e7eb;
  --intl:#f97316;
  --justice:#dc2626;
  --rumeur:#64748b;
}

*{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  padding:0;
  width:100%;
  min-height:100%;
  background:var(--bg);
}

body{
  color:var(--text);
  font-family:Arial, sans-serif;
}

.map-page{
  display:flex;
  width:100%;
  min-height:calc(var(--app-vh, 1vh) * 100);
  background:var(--bg);
  overflow:hidden;
}

.map-left{
  flex:1 1 auto;
  position:relative;
  min-width:0;
  height:calc(var(--app-vh, 1vh) * 100);
  min-height:700px;
  background:#0b1220;
}

#map{
  display:block;
  width:100%;
  height:100%;
  min-height:700px;
  background:#dbeafe;
}

.top-filters{
  position:absolute;
  top:15px;
  left:15px;
  z-index:1000;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  background:rgba(17,24,39,.94);
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  box-shadow:0 10px 25px rgba(0,0,0,.25);
  max-width:calc(100% - 90px);
  align-items:center;
}

.top-filters select,
.top-filters input,
.top-filters button{
  background:var(--panel2);
  border:1px solid #334155;
  color:#fff;
  border-radius:10px;
  padding:10px 12px;
  font-size:14px;
  outline:none;
}

.top-filters button{
  cursor:pointer;
  background:var(--accent);
  border-color:var(--accent);
  font-weight:700;
}

.top-filters button:hover{
  filter:brightness(1.08);
}

.filter-check{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:10px;
  background:var(--panel2);
  border:1px solid #334155;
  color:#fff;
  font-size:13px;
  white-space:nowrap;
}

.filter-check input{
  margin:0;
  transform:translateY(1px);
}

.sidebar-toggle{
  position:absolute;
  top:15px;
  right:15px;
  z-index:1100;
  background:rgba(17,24,39,.94);
  color:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 14px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 10px 25px rgba(0,0,0,.22);
  transition:.2s ease;
  white-space:nowrap;
}

.sidebar-toggle:hover{
  transform:translateY(-1px);
  filter:brightness(1.06);
}

.map-right{
  width:420px;
  max-width:420px;
  min-width:420px;
  background:var(--panel);
  border-left:1px solid var(--border);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  transition:
    width .28s ease,
    min-width .28s ease,
    max-width .28s ease,
    opacity .2s ease,
    border-left-color .2s ease;
}

.map-page.sidebar-collapsed .map-right{
  width:0;
  min-width:0;
  max-width:0;
  opacity:0;
  border-left-color:transparent;
}

.map-page.sidebar-collapsed .map-right *{
  pointer-events:none;
}

.sidebar-head{
  padding:18px 18px 12px;
  border-bottom:1px solid var(--border);
}

.sidebar-head h1{
  margin:0 0 6px;
  font-size:22px;
  line-height:1.2;
}

.sidebar-head p{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.news-list{
  overflow:auto;
  flex:1;
  padding:10px;
}

.news-card{
  display:block;
  text-decoration:none;
  color:inherit;
  background:var(--panel2);
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
  margin-bottom:12px;
  transition:.18s ease;
}

.news-card:hover{
  transform:translateY(-2px);
  border-color:#3b82f6;
  box-shadow:0 10px 20px rgba(0,0,0,.18);
}

.news-card.alert-card{
  background:rgba(127, 29, 29, 0.38);
  border:1px solid rgba(239, 68, 68, 0.45);
}

.news-card.alert-card:hover{
  border-color:rgba(248, 113, 113, 0.9);
  box-shadow:0 10px 20px rgba(127, 29, 29, .28);
}

.news-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
  font-size:12px;
  color:var(--muted);
}

.news-cat{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:700;
  color:#fff;
  flex-wrap:wrap;
}

.dot{
  width:10px;
  height:10px;
  border-radius:50%;
  display:inline-block;
  flex:0 0 auto;
}

.sidebar-pill{
  display:inline-flex;
  align-items:center;
  padding:4px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  line-height:1;
  border:1px solid #334155;
  background:#0f172a;
  color:#e5e7eb;
}

.news-title{
  font-size:16px;
  line-height:1.35;
  font-weight:700;
  margin-bottom:8px;
}

.news-resume{
  font-size:14px;
  line-height:1.45;
  color:#d1d5db;
}

.news-loc{
  margin-top:10px;
  font-size:13px;
  color:var(--muted);
}

.news-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.news-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #334155;
  background:#0f172a;
  color:#fff;
  border-radius:10px;
  padding:8px 10px;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
  transition:.16s ease;
}

.news-btn:hover{
  border-color:#3b82f6;
  background:#172033;
}

.news-btn[disabled]{
  opacity:.45;
  cursor:not-allowed;
}

.marker-pin{
  width:18px;
  height:18px;
  border-radius:50%;
  border:3px solid #fff;
  box-shadow:0 0 0 2px rgba(0,0,0,.15);
}

.cat-politique{ background:#3b82f6; }
.cat-economie{ background:#10b981; }
.cat-societe{ background:#f59e0b; }
.cat-divers{ background:#8b5cf6; }
.cat-international{ background:#f97316; }
.cat-justice{ background:#dc2626; }
.cat-rumeur{ background:#64748b; }
.cat-sciences-tech{ background:#06b6d4; }
.cat-default{ background:#94a3b8; }

.leaflet-container{
  width:100%;
  height:100%;
  background:#dbeafe;
}

.leaflet-popup-content-wrapper{
  background:#111827;
  color:#fff;
  border-radius:14px;
}

.leaflet-popup-tip{
  background:#111827;
}

.leaflet-popup-content{
  margin:14px 16px;
}

.popup-title{
  font-size:15px;
  font-weight:700;
  margin-bottom:8px;
}

.popup-resume{
  font-size:13px;
  line-height:1.45;
  color:#d1d5db;
  margin-bottom:10px;
}

.popup-link{
  display:inline-block;
  background:#2563eb;
  color:#fff !important;
  text-decoration:none;
  padding:8px 10px;
  border-radius:10px;
  font-size:13px;
  font-weight:700;
}

.empty-state{
  color:var(--muted);
  text-align:center;
  padding:25px 15px;
}

.city-label{
  background:none;
  border:none;
}

.city-label div{
  color:#111827;
  background:rgba(255,255,255,.86);
  padding:4px 7px;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
  box-shadow:0 2px 10px rgba(0,0,0,.12);
  border:1px solid rgba(148,163,184,.35);
}

@media (max-width:1100px){
  .map-page{
    flex-direction:column;
    overflow:visible;
  }

  .map-left{
    width:100%;
    min-height:380px;
  }

  .map-right{
    width:100%;
    min-width:0;
    max-width:none;
    height:auto;
    border-left:none;
    border-top:1px solid var(--border);
  }

  .news-list{
    max-height:500px;
  }

  .map-page.sidebar-collapsed .map-right{
    display:none;
  }

  .top-filters{
    max-width:calc(100% - 30px);
  }
}

@media (max-width:768px){
  .top-filters{
    position:relative;
    top:auto;
    left:auto;
    right:auto;
    max-width:none;
    margin:14px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }

  .top-filters select,
  .top-filters input,
  .top-filters button,
  .filter-check{
    width:100%;
  }

  .filter-check{
    grid-column:1 / -1;
    white-space:normal;
  }

  #btnFilter{
    grid-column:2 / 3;
  }

  .sidebar-toggle{
    position:relative;
    top:auto;
    right:auto;
    display:block;
    width:calc(100% - 28px);
    margin:0 14px 12px 14px;
  }

  .sidebar-head{
    padding-top:10px;
  }

  .news-list{
    max-height:none;
  }
}

@media (max-width:560px){
  .top-filters{
    grid-template-columns:1fr;
  }

  #btnFilter{
    grid-column:auto;
  }

  .news-meta{
    align-items:flex-start;
    flex-direction:column;
  }

  .news-title{
    font-size:15px;
  }

  .news-resume{
    font-size:13px;
  }
}