* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: Inter, Arial, sans-serif;
  background: radial-gradient(circle at top left, #1d2333, #0f1117 40%, #090b10);
  color: #f1f1f1;
}

body {
  display: grid;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
}

.panel {
  padding: 18px 18px 10px;
  background: rgba(20, 23, 30, 0.75);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  overflow-y: auto;
  z-index: 3;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.language-picker {
  position: relative;
  margin-bottom: 6px;
}

.language-toggle-btn {
  border-radius: 999px;
  padding: 6px 9px;
  min-width: 38px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(12, 16, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 6px;
  display: grid;
  gap: 4px;
  z-index: 25;
}

.language-menu[hidden] {
  display: none !important;
}

.language-option {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 6px 8px;
  min-width: 40px;
  line-height: 1;
}

.language-option:hover {
  box-shadow: none;
  transform: none;
  background: rgba(85, 161, 255, 0.28);
}

.subtitle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
}

.subtitle {
  margin: 0;
  color: #9ea0a6;
}

.subtitle-row .subtitle {
  line-height: 1.35;
  display: flex;
  align-items: center;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 26px;
  padding: 0 11px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
  border-radius: 999px;
  color: #e8fff2;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  background: linear-gradient(145deg, rgba(32, 86, 62, 0.95), rgba(16, 48, 36, 0.98));
  border: 1px solid rgba(116, 198, 157, 0.5);
  /* Halo vert (identique au début de l’animation — seules les ombres changent au cycle) */
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(82, 183, 136, 0.3),
    0 0 12px rgba(74, 210, 150, 0.32),
    0 0 24px rgba(46, 190, 120, 0.22);
  animation: live-badge-breathe 2.5s ease-in-out infinite;
}

/* Seules les ombres respirent — pas d’opacité ni de scale sur le badge (texte stable). */
@keyframes live-badge-breathe {
  0%,
  100% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.45),
      0 0 0 1px rgba(82, 183, 136, 0.3),
      0 0 12px rgba(74, 210, 150, 0.32),
      0 0 24px rgba(46, 190, 120, 0.22);
  }

  50% {
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.45),
      0 0 0 2px rgba(116, 198, 157, 0.45),
      0 0 22px rgba(90, 235, 170, 0.55),
      0 0 40px rgba(52, 210, 130, 0.5),
      0 0 56px rgba(30, 180, 100, 0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-badge {
    animation: none;
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.45),
      0 0 0 1px rgba(82, 183, 136, 0.32),
      0 0 16px rgba(74, 210, 150, 0.38),
      0 0 28px rgba(46, 190, 120, 0.26);
  }
}

.group {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.group h2 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

/* Actions : titre sur toute la largeur, boutons côte à côte */
.group:has(#actionsTitle) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 10px;
}

.group:has(#actionsTitle) h2 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.group:has(#actionsTitle) button {
  width: 100%;
  font-size: 0.74rem;
  padding: 7px 8px;
  line-height: 1.2;
}

.group:has(#actionsTitle) button + button {
  margin-top: 0;
}

.seo-copy p {
  margin: 0;
  color: #c5c9d4;
  line-height: 1.4;
  font-size: 0.9rem;
}

.seo-copy {
  margin-top: auto;
}

.panel-links a {
  display: inline-block;
  margin-right: 10px;
  margin-bottom: 6px;
  color: #9fc4ff;
  text-decoration: none;
  font-size: 0.9rem;
}

.panel-links a:hover {
  text-decoration: underline;
}

/* ───────── Custom interactive case legend (bottom-right of map) ───────── */
.case-legend {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  width: min(232px, calc(100vw - 28px));
  margin: 0;
  padding: 10px 12px 10px;
  list-style: none;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    165deg,
    rgba(38, 44, 62, 0.78) 0%,
    rgba(20, 24, 36, 0.92) 48%,
    rgba(10, 12, 20, 0.96) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: inherit;
}

.case-legend-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.case-legend-title {
  flex: 1;
  min-width: 0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8b97b3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-legend-total {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(85, 161, 255, 0.18);
  border: 1px solid rgba(85, 161, 255, 0.32);
  color: #cfe1ff;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.case-legend.is-loading .case-legend-total {
  opacity: 0.45;
}

.case-legend-reset {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(20, 24, 36, 0.72);
  color: #c5cad6;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.15s ease;
}

.case-legend-reset:hover {
  background: rgba(40, 50, 72, 0.85);
  border-color: rgba(140, 175, 255, 0.32);
  color: #fff;
  transform: rotate(-25deg);
  box-shadow: none;
}

.case-legend-reset[hidden] {
  display: none;
}

.case-legend-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.case-legend-item {
  --status-color: #ffffff;
  --status-color-rgb: 255, 255, 255;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  margin: 0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: #e8ecf4;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

.case-legend-item input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.case-legend-item-confirmed { --status-color: #ff4d6d; --status-color-rgb: 255, 77, 109; }
.case-legend-item-deceased  { --status-color: #9b5de5; --status-color-rgb: 155, 93, 229; }
.case-legend-item-suspected { --status-color: #ffca3a; --status-color-rgb: 255, 202, 58; }
.case-legend-item-monitoring{ --status-color: #74c69d; --status-color-rgb: 116, 198, 157; }

.case-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--status-color);
  box-shadow:
    0 0 0 2px rgba(var(--status-color-rgb), 0.16),
    0 0 8px rgba(var(--status-color-rgb), 0.42);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.case-legend-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.case-legend-count {
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #8b97b3;
  flex-shrink: 0;
}

.case-legend-item:hover {
  background: rgba(var(--status-color-rgb), 0.14);
}

.case-legend-item:focus-within {
  outline: none;
  background: rgba(var(--status-color-rgb), 0.18);
  box-shadow: 0 0 0 1px rgba(var(--status-color-rgb), 0.4);
}

.case-legend-item:has(input:not(:checked)) {
  opacity: 0.5;
}

.case-legend-item:has(input:not(:checked)) .case-legend-dot {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--status-color);
}

.case-legend-item:has(input:not(:checked)) .case-legend-count {
  color: #5a6072;
}

@media (max-width: 480px) {
  .case-legend {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 12px;
  }
}

/* Hide the legend on mobile when the side panel is open (avoids overlap) */
@media (max-width: 960px) {
  body:has(.panel.open) .case-legend {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-legend-reset:hover {
    transform: none;
  }
}

/* ───────── Live news section ───────── */
.group.news-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  background: linear-gradient(
    165deg,
    rgba(38, 44, 62, 0.72) 0%,
    rgba(20, 24, 36, 0.88) 48%,
    rgba(10, 12, 20, 0.94) 100%
  );
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.news-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4d6d;
  box-shadow:
    0 0 0 2px rgba(255, 77, 109, 0.18),
    0 0 10px rgba(255, 77, 109, 0.55);
  animation: news-live-pulse 1.6s ease-in-out infinite;
}

@keyframes news-live-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(255, 77, 109, 0.18),
      0 0 6px rgba(255, 77, 109, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(255, 77, 109, 0.28),
      0 0 14px rgba(255, 77, 109, 0.75);
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-live-dot {
    animation: none;
  }
}

.news-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 24, 36, 0.72);
  color: #c5cad6;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.news-refresh-btn:hover {
  background: rgba(40, 50, 72, 0.85);
  border-color: rgba(140, 175, 255, 0.32);
  color: #e8ecf4;
  transform: none;
  box-shadow: none;
}

.news-refresh-btn.is-loading svg {
  animation: spin 0.9s linear infinite;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-item {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(12, 15, 24, 0.6);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.15s ease;
}

.news-item:hover {
  background: rgba(26, 32, 48, 0.78);
  border-color: rgba(140, 175, 255, 0.28);
  transform: translateX(2px);
}

.news-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  outline: none;
}

.news-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(85, 161, 255, 0.45);
  border-radius: 10px;
}

.news-item-title {
  font-size: 0.85rem;
  line-height: 1.35;
  font-weight: 500;
  color: #e8ecf4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.news-item:hover .news-item-title {
  color: #f4f6fb;
}

.news-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: #8b919d;
  letter-spacing: 0.02em;
}

.news-item-source {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-item-arrow {
  color: #6fa8ff;
  font-size: 0.85rem;
  line-height: 1;
  opacity: 0;
  transform: translate(-2px, 2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.news-item:hover .news-item-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.news-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(12, 15, 24, 0.45);
}

.news-skeleton span {
  display: block;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: news-skeleton-shimmer 1.4s ease-in-out infinite;
}

.news-skeleton span:first-child {
  width: 92%;
}

.news-skeleton span:last-child {
  width: 58%;
  height: 8px;
}

@keyframes news-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .news-skeleton span {
    animation: none;
  }
}

.news-empty,
.news-error {
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(12, 15, 24, 0.45);
  color: #9aa1b3;
  font-size: 0.82rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.news-error {
  border-color: rgba(255, 77, 109, 0.35);
  color: #ffb1b1;
}

.news-retry-btn {
  padding: 5px 12px;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 77, 109, 0.18);
  border: 1px solid rgba(255, 77, 109, 0.38);
  color: #ffd4d4;
}

.news-retry-btn:hover {
  background: rgba(255, 77, 109, 0.28);
  box-shadow: 0 4px 12px rgba(255, 77, 109, 0.22);
}

input[type="text"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(14, 16, 22, 0.75);
  color: #eee;
  padding: 10px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

input[type="text"]:focus {
  border-color: #55a1ff;
  box-shadow: 0 0 0 3px rgba(85, 161, 255, 0.2);
  outline: none;
}

button {
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #2f71ff, #49a0ff);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.group button + button {
  margin-top: 8px;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(47, 113, 255, 0.35);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-btn:hover {
  box-shadow: 0 8px 20px rgba(120, 140, 180, 0.2);
}

#viewDiv {
  width: 100%;
  height: 100%;
}

/* Supprime le contour bleu de focus ArcGIS sur la MapView */
.esri-view {
  --esri-view-outline-color: transparent;
}

.esri-view-surface,
.esri-view-surface--inset-outline,
.esri-view-surface--touch-none,
#viewDiv,
#viewDiv canvas {
  outline: none !important;
}

.esri-view-surface:focus,
.esri-view-surface:focus-visible,
.esri-view-surface--inset-outline:focus,
.esri-view-surface--inset-outline:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.esri-view-surface:focus::after,
.esri-view-surface:focus-visible::after,
.esri-view-surface--inset-outline:focus::after,
.esri-view-surface--inset-outline:focus-visible::after {
  content: none !important;
  outline: none !important;
  border: none !important;
  display: none !important;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: radial-gradient(circle at center, rgba(19, 24, 36, 0.96), rgba(10, 13, 20, 0.98));
  color: #e8ecf7;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: #6fa8ff;
  animation: spin 0.9s linear infinite;
}

.page-loader p {
  margin: 0;
  font-size: 0.92rem;
  color: #cbd5e6;
}

.page-loader.error {
  gap: 14px;
  padding: 0 24px;
}

.page-loader.error #loaderText {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffb1b1;
}

.page-loader-detail {
  max-width: 460px;
  margin: 0;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #c5cad6;
}

.page-loader-retry {
  margin-top: 4px;
  padding: 10px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f71ff, #49a0ff);
}

.mobile-filter-toggle {
  display: none;
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 5;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: rgba(20, 23, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e8ecf4;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.mobile-filter-toggle .burger-bars {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 14px;
  pointer-events: none;
}

.mobile-filter-toggle .bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: 50% 50%;
  transition: transform 0.25s ease, opacity 0.18s ease, top 0.25s ease, bottom 0.25s ease;
}

.mobile-filter-toggle .bar-top { top: 0; }
.mobile-filter-toggle .bar-mid { top: 50%; transform: translateY(-50%); }
.mobile-filter-toggle .bar-bot { bottom: 0; }

.mobile-filter-toggle.is-open .bar-top {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.mobile-filter-toggle.is-open .bar-mid {
  opacity: 0;
  transform: translateY(-50%) scaleX(0.4);
}

.mobile-filter-toggle.is-open .bar-bot {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

.mobile-filter-toggle:hover {
  transform: none;
  background: rgba(40, 50, 72, 0.92);
  border-color: rgba(140, 175, 255, 0.32);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
}

.mobile-filter-toggle.is-open {
  background: rgba(40, 50, 72, 0.92);
  border-color: rgba(140, 175, 255, 0.36);
}

.filter-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff4d6d;
  border: 2px solid rgba(20, 23, 30, 0.95);
  box-shadow: 0 0 10px rgba(255, 77, 109, 0.6);
  pointer-events: none;
}

.filter-badge[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-filter-toggle .bar {
    transition: opacity 0.15s ease;
  }
}

/* ───────── Panel backdrop (mobile only) ───────── */
.panel-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  background: rgba(5, 8, 14, 0);
  pointer-events: none;
  transition: background 0.25s ease;
}

.panel-backdrop.visible {
  background: rgba(5, 8, 14, 0.55);
  pointer-events: auto;
}

/* ───────── News collapsible header ───────── */
.news-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.news-toggle-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
  border-radius: 6px;
  transition: color 0.18s ease;
}

.news-toggle-area:hover {
  transform: none;
  box-shadow: none;
  background: transparent;
}

.news-toggle-area:hover .news-title-text {
  color: #c0c8d8;
}

.news-toggle-area:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(85, 161, 255, 0.4);
}

.news-title-text {
  flex: 0 1 auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8b97b3;
  transition: color 0.18s ease;
}

.news-chevron {
  margin-left: auto;
  color: #8b97b3;
  transition: transform 0.25s ease, color 0.18s ease;
  flex-shrink: 0;
}

.news-toggle-area:hover .news-chevron {
  color: #c0c8d8;
}

.news-group.is-collapsed .news-chevron {
  transform: rotate(-90deg);
}

.news-group.is-collapsed .news-list,
.news-group.is-collapsed .news-refresh-btn {
  display: none;
}

.news-group.is-collapsed .news-header {
  margin-bottom: 0;
  padding-bottom: 4px;
  border-bottom: none;
}

.cookie-consent {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(12, 16, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #dce1eb;
  font-size: 0.8rem;
  max-width: min(380px, calc(100vw - 24px));
  text-align: center;
  pointer-events: auto;
  isolation: isolate;
}

.cookie-consent[hidden] {
  display: none !important;
}

.cookie-consent button {
  padding: 6px 9px;
  font-size: 0.78rem;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  body {
    grid-template-columns: 1fr;
  }

  .mobile-filter-toggle {
    display: inline-flex;
  }

  .panel-backdrop {
    display: block;
  }

  .panel {
    --panel-top: calc(56px + env(safe-area-inset-top, 0px));
    --panel-bottom-space: calc(12px + env(safe-area-inset-bottom, 0px));
    position: fixed;
    top: var(--panel-top);
    left: max(12px, env(safe-area-inset-left, 0px));
    right: auto;
    bottom: auto;
    width: min(360px, calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    /* Annule le min-height:100vh desktop (sinon le panneau dépasse l’écran) */
    min-height: 0 !important;
    /* Hauteur explicite = viewport visible − marges (svh évite la barre d’adresse mobile) */
    height: calc(100vh - var(--panel-top) - var(--panel-bottom-space));
    max-height: calc(100vh - var(--panel-top) - var(--panel-bottom-space));
    height: calc(100dvh - var(--panel-top) - var(--panel-bottom-space));
    max-height: calc(100dvh - var(--panel-top) - var(--panel-bottom-space));
    height: calc(100svh - var(--panel-top) - var(--panel-bottom-space));
    max-height: calc(100svh - var(--panel-top) - var(--panel-bottom-space));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateX(calc(-100% - 20px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: stretch;
  }

  .panel.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .cookie-consent {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
    justify-content: space-between;
    padding: 10px 12px;
  }

  /* Sur mobile, on masque le bouton de zoom arriere */
  .esri-ui .esri-zoom .esri-widget--button:last-child {
    display: none !important;
  }
}
