/* ============================================================
   RenoMaps V1 — Styles
   Identité : navy #1B2A47 · gradient #4CAF50→#00BCD4 · Nunito
   ============================================================ */

:root {
  --navy: #1B2A47;
  --navy-soft: #2A3B5C;
  --green: #4CAF50;
  --cyan: #00BCD4;
  --gradient: linear-gradient(135deg, #4CAF50 0%, #00BCD4 100%);
  --bg: #ffffff;
  --ink: #1B2A47;
  --muted: #6B7785;
  --line: #E4E8ED;
  --shadow: 0 8px 30px rgba(27, 42, 71, .12);

  --c-A: #1A7A3C;
  --c-B: #4CAF50;
  --c-C: #00BCD4;
  --c-D: #F5A623;
  --c-E: #9AA5B1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito Sans', sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
}

#app { display: flex; height: 100vh; width: 100vw; }

/* ── Sidebar ── */
#sidebar {
  width: 340px;
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 22px;
  gap: 24px;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--gradient);
  position: relative; flex-shrink: 0;
}
.logo-mark::after {
  content: ''; position: absolute; inset: 11px;
  border: 3px solid #fff; border-radius: 4px;
  border-bottom-color: transparent; border-right-color: transparent;
  transform: rotate(45deg);
}
.brand h1 {
  font-family: 'Nunito', sans-serif; font-weight: 900;
  font-size: 24px; color: var(--navy); letter-spacing: -.5px;
}
.tagline { font-size: 12px; color: var(--muted); font-weight: 600; }

.vertical-badge {
  font-size: 12.5px; font-weight: 700; color: var(--navy);
  background: #F2F8F4; border: 1px solid #DCEEE1;
  padding: 9px 12px; border-radius: 9px;
  display: flex; align-items: center; gap: 8px;
}
.vertical-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 4px rgba(76,175,80,.18);
}

.filters h2, .legende h2, .stats h2 {
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 13px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); margin-bottom: 14px;
}

.field { display: block; margin-bottom: 18px; }
.field > span {
  display: flex; justify-content: space-between;
  font-size: 13.5px; font-weight: 700; margin-bottom: 9px;
}
.field strong { color: var(--cyan); }

input[type=range] {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 3px; background: var(--line);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  border-radius: 50%; background: var(--gradient);
  cursor: pointer; box-shadow: 0 2px 6px rgba(0,188,212,.4);
}

.classes { display: flex; gap: 7px; }
.classes button {
  flex: 1; padding: 9px 0; border: 1.5px solid var(--line);
  background: #fff; border-radius: 8px; font-weight: 800;
  font-family: 'Nunito', sans-serif; cursor: pointer;
  color: var(--muted); transition: all .15s;
}
.classes button.active {
  background: var(--navy); color: #fff; border-color: var(--navy);
}

.apply {
  width: 100%; padding: 13px; border: none; border-radius: 10px;
  background: var(--gradient); color: #fff; font-weight: 800;
  font-family: 'Nunito', sans-serif; font-size: 14.5px;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0,188,212,.3);
  transition: transform .12s;
}
.apply:active { transform: scale(.98); }

.legende ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.legende li { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.legende i { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }

.stat-grid { display: flex; gap: 12px; }
.stat-grid > div {
  flex: 1; background: #F7F9FB; border: 1px solid var(--line);
  border-radius: 11px; padding: 14px; text-align: center;
}
.stat-grid strong {
  display: block; font-family: 'Nunito', sans-serif;
  font-size: 26px; font-weight: 900; color: var(--navy);
}
.stat-grid span { font-size: 11.5px; color: var(--muted); font-weight: 600; }

.legal { margin-top: auto; font-size: 11px; color: var(--muted); line-height: 1.6; padding-top: 12px; }

/* ── Carte ── */
#map { flex: 1; position: relative; }

/* ── Drawer ── */
.drawer {
  position: absolute; top: 0; right: 0; height: 100vh; width: 360px;
  background: #fff; box-shadow: var(--shadow); z-index: 20;
  padding: 26px; overflow-y: auto;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.drawer.hidden { transform: translateX(110%); }
.drawer .close {
  position: absolute; top: 16px; right: 18px; border: none;
  background: #F2F4F7; width: 32px; height: 32px; border-radius: 50%;
  font-size: 20px; cursor: pointer; color: var(--muted);
}

.drawer-score { display: flex; align-items: center; gap: 16px; margin: 14px 0 24px; }
.score-circle {
  width: 76px; height: 76px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 26px;
  color: #fff; flex-shrink: 0;
}
.classe-tag {
  display: inline-block; font-weight: 800; font-size: 12px;
  padding: 3px 10px; border-radius: 20px; color: #fff; margin-bottom: 5px;
}
.drawer-score h3 { font-family: 'Nunito', sans-serif; font-size: 18px; color: var(--navy); }

.drawer-layers { display: flex; flex-direction: column; gap: 13px; margin-bottom: 22px; }
.layer { display: grid; grid-template-columns: 78px 1fr 42px; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.layer .bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.layer .bar i { display: block; height: 100%; background: var(--gradient); border-radius: 4px; }
.layer b { text-align: right; color: var(--navy); }

.drawer-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drawer-facts div {
  background: #F7F9FB; border-radius: 10px; padding: 11px 13px;
}
.drawer-facts dt { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.drawer-facts dd { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 15px; color: var(--navy); }

@media (max-width: 768px) {
  #sidebar { width: 100%; position: absolute; height: auto; max-height: 45vh; bottom: 0; top: auto; border-right: none; border-top: 1px solid var(--line); }
  .drawer { width: 100%; }
}
