:root {
  --primary-purple: #4a00e0;
  --accent-orange: #f39c12;
  --text-dark: #333;
  --good-green: #8fbf26;
  --danger-red: #ff4b1f;
  --menu-border: rgba(74, 0, 224, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  background: transparent !important;
  overflow: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body {
  font-family: "Georama", sans-serif;
  color: var(--text-dark);
  background: transparent !important;
}

.embed-shell {
  width: min(1160px, calc(100% - 20px));
  margin: 0 auto;
  padding: 6px 0 0;
  background: transparent !important;
}

.controls {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.combobox {
  position: relative;
  width: min(380px, 100%);
}

.combobox-input {
  width: 100%;
  min-height: 44px;
  padding: 0 80px 0 14px;
  border: 1px solid var(--menu-border);
  border-radius: 14px;
  background: #fff;
  color: var(--text-dark);
  font: inherit;
  outline: none;
  box-shadow: 0 10px 26px rgba(74, 0, 224, 0.06);
}

.combobox-input:focus {
  border-color: rgba(74, 0, 224, 0.42);
  box-shadow: 0 0 0 4px rgba(74, 0, 224, 0.08);
}

.combobox-clear,
.combobox-toggle {
  position: absolute;
  top: 7px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  background: rgba(74, 0, 224, 0.08);
  cursor: pointer;
}

.combobox-clear {
  right: 42px;
}

.combobox-clear::before,
.combobox-clear::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 9px;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary-purple);
}

.combobox-clear::before {
  transform: rotate(45deg);
}

.combobox-clear::after {
  transform: rotate(-45deg);
}

.combobox-toggle {
  right: 8px;
}

.combobox-toggle::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 9px;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--primary-purple);
  border-bottom: 2px solid var(--primary-purple);
  transform: rotate(45deg);
}

.combobox-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--menu-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(23, 18, 42, 0.14);
  z-index: 20;
}

.combobox.is-open .combobox-menu {
  display: block;
}

.combobox-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-dark);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.combobox-option:hover,
.combobox-option.is-active {
  background: rgba(74, 0, 224, 0.08);
}

.combobox-empty {
  padding: 10px 12px;
  color: rgba(51, 51, 51, 0.58);
}

.viz {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.arrondissement-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.96rem;
  font-weight: 600;
  color: rgba(51, 51, 51, 0.76);
}

.chart-card {
  padding: 0;
  background: transparent;
  text-align: center;
}

.gauge-wrap {
  width: min(100%, 330px);
  margin: 0 auto;
}

.gauge-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.value-line,
.year-line {
  margin: 0;
  text-align: center;
}

.value-line {
  margin-top: -5px;
  font-family: "Georama", sans-serif;
  font-size: 1.92rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-dark);
}

.year-line {
  margin-top: 14px;
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.1;
  color: rgba(51, 51, 51, 0.78);
}

.tooltip {
  position: fixed;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(26, 26, 26, 0.94);
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.4;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  z-index: 999;
}

.tooltip strong {
  display: block;
  margin-bottom: 6px;
  font-family: "Georama", sans-serif;
  font-size: 0.96rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .embed-shell {
    width: calc(100% - 12px);
    padding-top: 5px;
  }

  .controls {
    margin-bottom: 4px;
  }

  .combobox-input {
    min-height: 38px;
    padding-right: 70px;
  }

  .combobox-clear,
  .combobox-toggle {
    top: 5px;
    width: 28px;
    height: 28px;
  }

  .combobox-clear {
    right: 38px;
  }

  .combobox-toggle {
    right: 6px;
  }

  .viz {
    gap: 4px;
  }

  .gauge-wrap {
    width: min(100%, 205px);
  }

  .value-line {
    margin-top: -3px;
    font-size: 1.3rem;
  }

  .year-line {
    margin-top: 8px;
    font-size: 0.98rem;
  }

  .arrondissement-note {
    margin-top: 8px;
    font-size: 0.86rem;
  }
}

@media (max-width: 420px) {
  .gauge-wrap {
    width: 100%;
  }

  .value-line {
    font-size: 1.1rem;
  }

  .year-line {
    margin-top: 4px;
    font-size: 0.84rem;
  }
}
