:root {
  --ink-900: #121814;
  --ink-800: #1b251e;
  --ink-700: #233027;
  --ink-600: #2c3c31;
  --line: #343a46;
  --ash: #8b92a0;
  --ash-soft: #5f6674;
  --paper: #f2f0ea;
  --ember: #046b58;
  --ember-dim: #e4592d;
  --amber: #ffb627;
  --danger: #e63946;
  --info: #4fa8d8;
  --success: #2c9357;

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-lift: 0 12px 32px -12px rgba(0, 0, 0, .55);
}

html {
  background: var(--ink-900) !important;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100dvh;
  background: var(--ink-800) !important;
  touch-action: pan-x pan-y;
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--ember);
  color: #1b1e25;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--ink-800);
}

::-webkit-scrollbar-thumb {
  background: var(--ink-600);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ash-soft);
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

/* LAYOUT */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--ink-900);
}

.map-locked {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.map-container, 
#map,
#detail-map,
input, 
textarea {
  touch-action: auto;
  -webkit-user-select: auto;
  user-select: auto;
}

.main-content {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  background: var(--ink-900);
}

@media (max-width: 991.98px) {
  .app {
    min-height: 100dvh;
  }

  .main-content {
    margin-bottom: 5vh
  }
}

.bg-danger {
  background: var(--ember-dim) !important;
}


.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.brand-mark {
  position: flex;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: .3px;
  line-height: 1;
}

.brand-text small {
  display: block;
  font-family: var(--font-body);
  font-size: .66rem;
  font-weight: 500;
  color: var(--ash);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-top: 3px;
}

.brand-subtext {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ash);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 0 rgba(230, 57, 70, .7);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(230, 57, 70, .55);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(230, 57, 70, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(230, 57, 70, 0);
  }
}

.kpi {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.80rem;
}

.kpi-icon i {
  font-size: 1.25rem;
}

.kpi-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--kpi-accent) 15%, transparent);
  color: var(--kpi-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.kpi-unit {
  font-size: 0.90rem;
  margin-left: 5px;
}

.kpi-icon svg {
  width: 18px;
  height: 18px;
}

.kpi-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--kpi-accent);
  line-height: 1;
  margin-bottom: 2px;
}

.kpi-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash);
}

/*  Main */
.main-layout {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

/* sidebar */
.sidebar {
  position: absolute;
  top: 16px;
  left: 16px;
  bottom: 16px;
  width: 340px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  background: rgba(8, 15, 10, 0.8);
  backdrop-filter: blur(13px) saturate(0);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), opacity .3s ease;
}

.sidebar.is-hidden {
  transform: translateX(calc(-100% - 32px));
  opacity: 0;
  pointer-events: none;
}

.sidebar-toggle {
  position: absolute;
  top: 50%;
  left: 370px;
  transform: translateY(-50%);
  z-index: 16;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 30, 37, .92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--paper);
  cursor: pointer;
  box-shadow: var(--shadow-lift);
  transition: left .35s cubic-bezier(.16, 1, .3, 1), background .15s ease;
}

.sidebar-toggle:hover {
  background: var(--ink-700);
}

.sidebar-toggle i {
  display: block;
  transition: transform .3s ease;
}

.sidebar.is-hidden~.sidebar-toggle {
  left: 16px;
}

.sidebar.is-hidden~.sidebar-toggle i {
  transform: rotate(180deg);
}

.sidebar-head {
  flex: 0 0 auto;
  padding: .9rem 1rem .7rem;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1;
  margin-bottom: .25rem;
}

.search-wrap {
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ash-soft);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--ink-700);
  border: 1px solid var(--line);
  color: var(--paper);
  border-radius: var(--radius-md);
  padding: .5rem .75rem .5rem 2rem;
  font-size: .85rem;
  font-family: var(--font-body);
  transition: border-color .15s ease, background .15s ease;
}

.search-input::placeholder {
  color: var(--ash-soft);
}

.search-input:focus {
  outline: none;
  border-color: var(--ember);
  background: var(--ink-600);
}

.filter-row {
  display: flex;
  gap: .4rem;
  margin-top: .65rem;
  flex-wrap: wrap;
}

.filter-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ash);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  padding: .32rem .65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.filter-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chip-color, var(--ash));
}

.filter-chip:hover {
  border-color: var(--ash-soft);
  color: var(--paper);
}

.filter-chip.active {
  background: var(--chip-color, var(--ember));
  border-color: var(--chip-color, var(--ember));
  color: var(--ink-900);
}

.filter-chip.active .dot {
  background: var(--ink-900);
}

.sidebar-sub {
  flex: 0 0 auto;
  padding: .55rem 1rem;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ash-soft);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
}

.fire-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: .5rem;
}

.fire-card {
  position: relative;
  display: flex;
  gap: .75rem;
  padding: .7rem .75rem .7rem .9rem;
  border-radius: var(--radius-md);
  margin-bottom: .4rem;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .05);
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}

.fire-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55rem;
  bottom: .55rem;
  width: 3px;
  border-radius: 3px;
  background: var(--sev-color, var(--ash));
}

.fire-card:hover {
  background: var(--ink-700);
}

.fire-card.selected {
  background: var(--ink-700);
  border-color: var(--sev-color, var(--ember));
}

.fire-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.fire-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
}

.fire-name {
  font-weight: 600;
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fire-dept {
  font-size: .72rem;
  color: var(--ash);
  margin-top: 1px;
}

.fire-badge {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: .14rem .45rem;
  border-radius: 4px;
  color: var(--sev-color, var(--ash));
  background: color-mix(in srgb, var(--sev-color, var(--ash)) 14%, transparent);
  white-space: nowrap;
}

.fire-meta-row {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-top: .4rem;
  font-size: .72rem;
  color: var(--ash);
}

.fire-meta-row .val {
  font-family: var(--font-mono);
  color: var(--paper);
  font-weight: 500;
}

.fire-meta-row svg {
  width: 12px;
  height: 12px;
  margin-right: 2px;
  vertical-align: -1px;
}

.intensity-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--ink-600);
  margin-top: .5rem;
  overflow: hidden;
}

.intensity-bar span {
  display: block;
  height: 100%;
  background: var(--sev-color, var(--ember));
  width: var(--intensity, 40%);
}

.empty-state {
  text-align: center;
  color: var(--ash-soft);
  padding: 2.5rem 1rem;
  font-size: .85rem;
}

/* Map */
.map-wrap {
  flex: 1 1 auto;
  position: relative;
  min-width: 0;
}

#map {
  position: absolute;
  inset: 0;
}

#signal-map {
  width: 100%;
  height: 240px;
}

.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: var(--ink-700) !important;
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
}

.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: var(--ink-700) !important;
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
}

.maplibregl-popup-content {
  background: linear-gradient(180deg, #222724 0%, #151b17 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
  color: var(--paper) !important;
  box-shadow: var(--shadow-lift);
  padding: 0 !important;
  font-family: var(--font-body);

}

.maplibregl-popup {
  will-change: auto !important;
  width: 260px !important;
}

.maplibregl-popup-content {
  width: 100% !important;
  animation: popupPop 0.15s ease-out;
}

@keyframes popupPop {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }

  60% {
    opacity: 1;
    transform: scale(1.03);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

.maplibregl-popup-tip {
  border-top-color: var(--ink-700) !important;
  border-bottom-color: var(--ink-700) !important;
}

.maplibregl-popup-close-button {
  color: var(--ash);
  font-size: 1.3rem;
  padding: 8px 10px;
}

.maplibregl-popup-close-button:hover {
  background: transparent;
  color: var(--paper);
}

.maplibregl-ctrl-top-right {
  top: auto;
}

.maplibregl-ctrl-group {
  background: var(--ink-700) !important;
  border: 1px solid var(--line) !important;
}

.maplibregl-ctrl-group button {
  background: transparent !important;
}

.maplibregl-ctrl-group button+button {
  border-top: 1px solid var(--line) !important;
}

.maplibregl-ctrl-icon {
  filter: invert(1) brightness(1.6);
}

.maplibregl-ctrl {
  border-radius: var(--radius-md) !important;
}

.popup-card {
  min-width: 230px;
}

.popup-head {
  padding: .7rem .85rem .55rem;
  border-bottom: 1px solid var(--line);
}


.popup-head .popup-dept {
  font-size: .72rem;
  color: var(--ash);
}

.popup-body {
  padding: .65rem .85rem .8rem;
}

.popup-button {
  margin-top: .65rem;
  text-align: center;
  width: 100%;
}

.popup-button .btn {
  width: 100%;
}

.popup-row {
  display: flex;
  justify-content: space-between;
  font-size: .76rem;
  color: var(--ash);
  padding: .2rem 0;
}

.popup-row .v {
  font-family: var(--font-mono);
  color: var(--paper);
  font-weight: 500;
}

.popup-sev {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--sev-color);
}

.popup-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 2px;
  display: flex;
  align-items: center;
}

.popup-sev .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sev-color);
}

/* marker */
.fire-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sev-color, var(--ember));
  border: 2px solid rgba(255, 255, 255, 0.4);
  /* border: 2px solid rgba(255, 255, 255, 0.2); */
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--sev-color, var(--ember)) 55%, transparent);
  cursor: grab;
}

.fire-marker i {
  color: var(--paper);
  font-size: 1rem;
}

.fire-marker.is-active {
  animation: emberPulse 1.8s ease-out infinite;
}

@keyframes emberPulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--sev-color, var(--ember)) 55%, transparent);
  }

  70% {
    box-shadow: 0 0 0 14px color-mix(in srgb, var(--sev-color, var(--ember)) 0%, transparent);
  }

  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--sev-color, var(--ember)) 0%, transparent);
  }
}

/* legend */

.legend-wrapper {
  position: absolute !important;
  left: 370px !important;
  bottom: 16px !important;
  z-index: 1000 !important;
  display: block !important;
}

.info-wrapper {
  position: absolute !important;
  right: 24px !important;
  bottom: 16px !important;
  z-index: 1000 !important;
  display: none !important;
}

/* Sur Mobile : on l'affiche et on le place au-dessus de la bottom nav */
@media (max-width: 991.98px) {

  .legend-wrapper,
  .info-wrapper {
    position: fixed !important;
    /* Contourne le bug Safari iOS */
    bottom: calc(85px + env(safe-area-inset-bottom)) !important;
    display: block !important;
    z-index: 1000 !important;
  }

  .legend-wrapper {
    left: 12px !important;
  }

  .info-wrapper {
    right: 12px !important;
  }

  .info-wrapper .btn-info-toggle {
    display: flex !important;
  }
}

.loader {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1050 !important;
  background: var(--ink-900) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  transition: opacity 0.35s ease, visibility 0.35s ease !important;
}

.loader.is-hiding {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Forcer la couleur et la taille de la roue de chargement */
.spinner-border.text-ember {
  color: var(--ember) !important;
  width: 3rem;
  height: 3rem;
  border-width: 0.25em;
}

.sidebar.is-hidden~.legend-wrapper {
  left: 16px;
}

.btn-legend-toggle {
  background: rgba(27, 30, 37, 0.92);
  backdrop-filter: blur(2px);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: var(--shadow-lift);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-info-toggle {
  width: 33px;
  height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 30, 37, 0.92);
  backdrop-filter: blur(2px);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: var(--shadow-lift);
  gap: 0.5rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-legend-toggle:hover {
  background: var(--ink-700);
}

.btn-info-toggle:hover {
  background: var(--ink-700);
}

.map-legend {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 190px;

  backdrop-filter: blur(2px);
  background: rgba(27, 30, 37, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  box-shadow: var(--shadow-lift);
  font-size: 0.72rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(15px) scale(0.95);
  transform-origin: bottom left;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.map-legend.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.map-legend .legend-title {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.62rem;
  color: var(--ash);
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0;
  color: var(--ash);
}

.legend-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.btn-report {
  font-size: .80rem;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: .32rem .65rem;
  border-radius: 999px;
  color: var(--paper);
  background: var(--danger);
  border: 1px solid var(--danger);
  transition: all .15s ease;
}

.btn-report:hover {
  background: var(--danger-dim);
  border-color: var(--danger-dim);
}

.map-toast {
  position: absolute;
  top: 16px;
  left: 370px;
  z-index: 10;
  border-radius: var(--radius-md);
  font-size: .72rem;
  color: var(--ash);
  max-width: 280px;
  transition: left .35s cubic-bezier(.16, 1, .3, 1);
}

.map-toast .btn {
  text-transform: uppercase;
}

.sidebar.is-hidden~.map-toast {
  left: 16px;
}

.map-toast strong {
  color: var(--danger);
}

/* footer */
.footer-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: .45rem 1.25rem;
  background: var(--ink-900);
  border-top: 1px solid var(--line);
  font-size: .68rem;
  color: var(--ash-soft);
}

.footer-bar a {
  color: var(--ember);
  font-weight: 600;
}

.footer-bar a:hover {
  text-decoration: underline;
}

.footer-sep {
  opacity: .5;
}

/* responsive */
@media (max-width: 991.98px) {
  .sidebar {
    width: 300px;
  }

  .topbar-meta {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .maplibregl-ctrl {
    display: none;
  }

  .sidebar {
    left: 12px;
    right: 12px;
    top: 12px;
    bottom: auto;
    width: auto;
    max-height: 45vh;
  }

  .sidebar.is-hidden {
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .sidebar.is-hidden .fire-list {
    display: none !important;
  }

  .sidebar.is-hidden .sidebar-head {
    border-bottom: none;
  }

  .sidebar-toggle {
    top: 21px !important;
    bottom: auto !important;
    left: auto !important;
    right: 18px !important;
    transform: none !important;
    width: 34px;
    height: 34px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .sidebar-toggle i {
    transform: rotate(90deg) !important;
    font-size: 1.1rem;
    color: var(--ash);
  }

  .sidebar.is-hidden~.sidebar-toggle i {
    transform: rotate(-90deg) !important;
  }

  .legend-wrapper {
    bottom: calc(90px + env(safe-area-inset-bottom)) !important;
    left: 12px !important;
  }

  .info-wrapper {
    bottom: calc(90px + env(safe-area-inset-bottom)) !important;
    right: 12px !important;
  }
}

@media (max-width: 575.98px) {
  .kpi {
    padding: .65rem .85rem;
  }

  .kpi-num {
    font-size: 1.2rem;
  }

  .brand-text {
    font-size: 1.05rem;
  }
}


.alert-danger {
  color: var(--danger);
  background-color: rgba(230, 57, 70, 0.12);
  border: 1px solid rgba(230, 57, 70, 0.35);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.80rem;
}

.alert-success {
  color: var(--success);
  background-color: rgba(40, 180, 99, 0.12);
  border: 1px solid rgba(40, 180, 99, 0.35);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.80rem;
}

.alert-loading {
  color: var(--ash);
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.80rem;
}

.text-ember {
  color: var(--ember);
}

.alert-info {
  color: var(--info);
  background-color: rgba(79, 168, 216, 0.12);
  border: 1px solid rgba(79, 168, 216, 0.35);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.80rem;
}


/* BUTTONS */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .85rem;
  border-radius: var(--radius-md);
  padding: .55rem 1.1rem;
  border: 1px solid transparent;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  letter-spacing: .2px;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus {
  box-shadow: none;
}

.btn-sm {
  padding: .35rem .75rem;
  font-size: .76rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: .75rem 1.5rem;
  font-size: .95rem;
}

.btn-primary {
  background: var(--ember-dim);
  border-color: var(--ember-dim);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  background: var(--ember);
  border-color: var(--ember);
}

.btn-primary:active {
  background: var(--ember) !important;
  border-color: var(--ember-dim);
}

.btn-secondary {
  background: var(--ink-700);
  border-color: var(--line);
  color: var(--paper);
}

.btn-secondary:hover {
  background: var(--ink-600);
  color: var(--paper);
  border-color: var(--ash-soft);
}

.btn-outline-light {
  background: transparent;
  border-color: var(--line);
  color: var(--paper);
}

.btn-outline-light:hover {
  background: var(--ink-700);
  color: var(--paper);
  border-color: var(--ash-soft);
}

.btn-danger {
  background: linear-gradient(180deg, var(--danger), #b6222f);
  border-color: #d03c48;
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(230, 57, 70, .6);
}

.btn-danger:hover {
  filter: brightness(1.1);
  color: #fff;
}

.btn-success {
  background: var(--ember);
  border-color: var(--controlled);
  color: #0d1a14;
}

.btn-success:hover {
  filter: brightness(1.1);
  color: #0d1a14;
  background: var(--success);
  border-color: var(--success);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ash);
}

.btn-ghost:hover {
  color: var(--paper);
  background: var(--ink-700);
}

.btn:disabled,
.btn.disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}


/* INPUTS */
label,
.form-label {
  font-size: .76rem;
  font-weight: 600;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: .4rem;
  display: block;
}

.form-control,
.form-select {
  background: var(--ink-700);
  border: 1px solid var(--line);
  color: var(--paper);
  border-radius: var(--radius-md);
  padding: .55rem .8rem;
  font-size: .86rem;
  font-family: var(--font-body);
  transition: border-color .15s ease, background .15s ease;
}

.form-control::placeholder {
  color: var(--ash-soft);
}

.form-control:focus,
.form-select:focus {
  outline: none;
  box-shadow: none;
  border-color: var(--ember);
  background: var(--ink-600);
  color: var(--paper);
}

.form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%238b92a0' d='M8 11 3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 12px;
  padding-right: 2.25rem;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.form-control.is-invalid {
  border-color: var(--danger);
}

.form-control.is-valid {
  border-color: var(--controlled);
}

.form-feedback {
  font-size: .72rem;
  margin-top: .35rem;
}

.form-feedback.invalid {
  color: var(--danger);
}

.form-feedback.valid {
  color: var(--controlled);
}

.input-group-text {
  background: var(--ink-600);
  border: 1px solid var(--line);
  color: var(--ash);
  border-radius: var(--radius-md);
}





/* NAVBAR */

.navbar-pro {
  position: relative;
  width: 100%;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--ink-800);
  padding: 1rem 1.5rem;
  padding-top: calc(1rem + env(safe-area-inset-top)) !important;
  pointer-events: none;
  border-bottom: 1px solid var(--line);
}

.navbar-pro>* {
  pointer-events: auto;
}

.navbar-left {
  justify-self: start;
  display: flex;
  align-items: center;
}

.navbar-center {
  justify-self: center;
}

.navbar-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 991.98px) {
  .navbar-pro {
    display: flex;
    justify-content: space-between;
  }
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.90rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.nav-links svg {
  width: 18px;
  height: 18px;
}

.nav-links a:hover {
  color: var(--paper);
  text-decoration: none;
  opacity: 0.8;
}

.nav-links a.active {
  color: var(--ember);
  border-bottom-color: var(--ember);
}


.badge-status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--status-color);
  background: color-mix(in srgb, var(--status-color) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--status-color) 40%, transparent);
  padding: .3rem .7rem;
  border-radius: 999px;
}

.badge-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-color);
}

.page-hero {
  background:
    radial-gradient(ellipse 900px 260px at 50% -60px, var(--color-accent), transparent 65%),
    linear-gradient(180deg, var(--ink-800), var(--ink-900));
  border-bottom: 1px solid var(--line);
  padding: 2.25rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem 1.25rem;
  color: var(--ash);
  font-size: .85rem;
  margin-top: .35rem;
}


.page-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
}

.page-hero-inner .page-hero-date {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  margin: 0;
  padding: 0;
  color: var(--ash);
}

.page-hero-inner h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0;
  color: var(--ash);
}

.page-hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  margin: 0;
  color: var(--paper);
}

.page-hero-emergency {
  max-width: 600px;
  margin: 1.25rem auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  background: rgba(230, 57, 70, .1);
  border: 1px solid rgba(230, 57, 70, .32);
  color: var(--danger);
  border-radius: var(--radius-md);
  padding: .65rem .95rem;
  font-size: .82rem;
}

.page-hero-emergency i {
  font-size: 1.15rem;
  flex: 0 0 auto;
}



/* navbar mobile */

.bottom-nav-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, var(--ink-900), var(--ink-800));
  border-top: 1px solid var(--line);
  display: none;
  justify-content: space-around;
  gap: 0.5rem;
  align-items: center;
  z-index: 1500 !important;

  padding-top: 0.3rem;
  padding-bottom: calc(0.3rem + env(safe-area-inset-bottom));
}


.bottom-nav-mobile .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ash);
  font-size: 0.75rem;
  font-weight: 600;
  gap: 0.3rem;
  position: relative;
  flex: 1;
  transition: color 0.2s ease;
  text-align: center;
  font-family: var(--font-display);
}


.bottom-nav-mobile .nav-item.signaler {
  background: rgba(230, 57, 70, 0.2);
  color: var(--danger);
  border-radius: 10px;
  font-weight: bold;
  padding: 0.15rem 0.35rem;
  border: 1px solid rgba(230, 57, 70, 0.35);
}

.bottom-nav-mobile .nav-item i {
  font-size: 1.3rem;
}

.bottom-nav-mobile .nav-item:hover,
.bottom-nav-mobile .nav-item:active {
  color: var(--paper);
}

.bottom-nav-mobile .nav-item.active {
  color: var(--ember);
}

.bottom-nav-mobile .nav-item .nav-badge {
  position: absolute;
  top: -2px;
  right: 25%;
  font-size: 0.55rem;
  font-weight: bold;
  padding: 0.15rem 0.35rem;
  background: var(--ember-dim);
  color: #fff;
  border-radius: 50rem;
}

@media (max-width: 991.98px) {
  .bottom-nav-mobile {
    display: flex;
  }
}

.offcanvas {
  background-color: var(--ink-800);
  color: var(--paper);
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
}


.login-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--ink-900);
}

.login-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lift);
  width: 100%;
  max-width: 400px;
}

.login-card h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--paper);
}

.dropdown-custom {
  background: var(--ink-800);
  border-color: var(--line);
  border-radius: var(--radius-md);
  min-width: 220px;
}

.dropdown-custom .dropdown-item {
  color: var(--paper);
  transition: background .15s ease, color .15s ease;
}

.dropdown-custom .dropdown-item:active,
.dropdown-custom .dropdown-item:hover {
  background: var(--ink-700) !important;
  color: var(--paper);
}




/* PAGE FICHE */
.detail-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.composer-body {
  padding: 1rem 1.1rem .25rem;
}

.composer-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--paper);
  resize: none;
  font-size: .92rem;
  font-family: var(--font-body);
  padding: 0;
}

.composer-textarea::placeholder {
  color: var(--ash-soft);
}

.composer-textarea:focus {
  outline: none;
}

.composer-footer {
  background: var(--ink-900);
  border-top: 1px solid var(--line);
  padding: .7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex: 1 1 auto;
  min-width: 0;
}

.btn-action-icon {
  flex: 0 0 auto;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background:  rgba(255, 255, 255, 0.05);

  border: 1px solid var(--line);
  color: var(--ash);
  cursor: pointer;
  transition: all .15s ease;
}

.btn-action-icon:hover {
  background: var(--ink-700);
  color: var(--paper);
}

.composer-link {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .4rem .8rem;
  color: var(--ash-soft);
  font-size: .8rem;
}

.composer-link input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--paper);
  font-size: .8rem;
}

.composer-link input::placeholder {
  color: var(--ash-soft);
}

.composer-link input:focus {
  outline: none;
}

.preview-container {
  position: relative;
  display: inline-block;
  margin: 0 0 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  padding: 4px;
  background: var(--ink-900);
}

.preview-container img {
  max-height: 120px;
  border-radius: 4px;
  display: block;
}

.btn-remove-preview {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .85rem;
}

/* Fil d'actualité */
.timeline-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--paper);
  margin-bottom: 1rem;
}

.updates-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


/* UPDATE CARD COMMUNITY */
.update-card.is-community {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
}

.update-card.is-community .update-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .50rem;
  color: var(--ash);
}

.update-card.is-community .update-card-body p {
  margin: 0;
  font-size: .9rem;
  color: var(--paper);
  line-height: 1.6;
  white-space: pre-line;
}

/* FIN UPDATE CARD COMMUNITY */

/* UPDATE CARD ADMIN */
.update-card.is-admin {
  border: 1px solid rgba(4, 107, 88, 0.4);
  background: linear-gradient(180deg, rgba(4, 107, 88, 0.08) 0%, var(--ink-800) 100%);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
}

.update-card.is-admin .update-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
  color: var(--ember);
  font-size: 1rem;
  font-weight: 600;
}

.update-card.is-admin .update-card-body p {
  margin: 0;
  font-size: .9rem;
  color: var(--paper);
  line-height: 1.6;
  white-space: pre-line;
}

/* FIN UPDATE CARD ADMIN */

/* UPDATE CARD SYSTEM */
.update-card.is-system {
  flex-direction: row;
  align-items: center;
  padding: 1rem 1.25rem;
  background: linear-gradient(-90deg, rgba(255, 255, 255, 0.03) 0%, rgba(var(--sys-color), 0.05) 100%);
  border: 1px solid rgba(var(--sys-color), 0.2);
  border-top: 1px solid rgba(var(--sys-color), 0.4);
  border-radius: var(--radius-lg);

}

.update-card.is-system .system-icon {
  color: rgb(var(--sys-color));
  font-size: 1.2rem;
}

.update-card.is-system .system-content b {
  color: var(--paper);
}

.update-card.is-system .update-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
  color: var(--amber);
  font-size: 1rem;
  font-weight: 600;
}

.update-card.is-system .update-card-body p {
  margin: 0;
  font-size: .9rem;
  color: var(--paper);
  line-height: 1.6;
  white-space: pre-line;
}


.avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink-600);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-size: .75rem;
}

.update-date {
  font-size: .72rem;
  color: var(--ash-soft);
  font-family: var(--font-mono);
}




.update-card-attachments {
  margin-top: .9rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.attached-photo {
  position: relative;
  display: inline-block;
  width: 130px;
  height: 100px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
}

.attached-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.attached-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  opacity: 0;
  transition: opacity .2s ease;
}

.attached-photo:hover .attached-photo-overlay {
  opacity: 1;
}

.attached-link {
  display: flex;
  align-items: center;
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--paper);
  overflow: hidden;
  max-width: 320px;
}

.attached-link:hover {
  background: var(--ink-600);
  color: var(--paper);
}

.link-icon {
  background: var(--ink-900);
  padding: .5rem .7rem;
  color: var(--ash);
}

.link-text {
  padding: .5rem .7rem;
  font-size: .8rem;
}

/*  Responsive  */
@media (max-width: 991.98px) {
  .fiche-layout {
    grid-template-columns: 1fr;
  }

  .fiche-sidebar {
    position: static;
  }

  .fiche-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .page-hero-title {
    font-size: 1.5rem;
  }

  #detail-map {
    height: 260px;
  }
}


.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ink-800);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table th,
.table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-size: 0.82rem;
  color: var(--paper);
  border: none;
}

.table th {
  background: var(--ink-700);
  font-weight: 600;
}

.title-mention {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--ember);
}

.timeline-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--paper);
  margin-bottom: 1rem;
}

#detail-map {
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
}

#detail-map .maplibregl-canvas {
  border-radius: var(--radius-md) !important;
}

/*BANNIÈRE COOKIES */
@media (max-width: 991.98px) {
  .cookie-banner {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }
}

.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 10px;
  width: calc(100% - 32px);
  max-width: 400px;
  background: var(--ink-700);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--ember);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


.cookie-content {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.cookie-icon {
  flex: 0 0 auto;
  font-size: 1.25rem;
  color: white;
  margin-top: -2px;
}

.cookie-text p {
  font-size: 0.8rem;
  color: var(--paper);
  margin: 0;
  line-height: 1.45;
}

.cookie-actions {
  display: flex;
  justify-content: flex-end;
}

.cookie-actions .btn {
  width: 100%;
}

@media (max-width: 991.98px) {
  .cookie-banner {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
}


/* CUSTOM SWITCH*/

.dropdown-custom .switch-item {
  padding: 0.6rem 0.85rem !important;
  cursor: default;
}

.dropdown-custom .switch-item:hover {
  background: transparent !important;
}

.switch-label {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: none;
  color: var(--paper);
  cursor: pointer;
  margin: 0;
}

.dropdown-custom .form-switch {
  padding-left: 0;
  margin: 0;
}

.form-checkbox input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  width: 1.3em;
  height: 1.3em;
  margin: 0;
  display: inline-block;
  vertical-align: middle;

  background-color: var(--ink-600, #ffffff);
  border: 2px solid var(--line, #cbd5e1);
  border-radius: 6px;
  cursor: pointer;

  transition: all 0.2s ease-in-out;
}

.form-checkbox input[type="checkbox"]:hover {
  border-color: var(--ember, #ff4757);
}

.form-checkbox input[type="checkbox"]:checked {
  background-color: var(--ember, #ff4757);
  border-color: var(--ember, #ff4757);

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 70%;
  background-position: center;
  background-repeat: no-repeat;
}

.form-checkbox input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.25);
  border-color: var(--ember, #ff4757);
}

.form-checkbox input[type="checkbox"]:disabled {
  cursor: not-allowed;
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  opacity: 0.6;
}

.form-checkbox input[type="checkbox"]:disabled:checked {
  background-color: #cbd5e1;
  border-color: #cbd5e1;
}

.form-checkbox input[type="checkbox"]:focus {
  box-shadow: none;
}

.dropdown-custom .form-check-input {
  margin: 0;
  width: 2.6em;
  height: 1.3em;
  background-color: var(--ink-600);
  border-color: var(--line);
  cursor: pointer;
}

.dropdown-custom .form-check-input:checked {
  background-color: var(--ember);
  border-color: var(--ember);
}

.dropdown-custom .form-check-input:focus {
  box-shadow: none;
  border-color: var(--ash-soft);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.75%29'/%3e%3c/svg%3e");
}

.dropdown-custom .form-check-input:checked:focus {
  border-color: var(--ember);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check {
  min-height: 0 !important;
}

.offcanvas-header {
  padding-top: calc(1rem + env(safe-area-inset-top)) !important;
}


@media (max-width: 575.98px) {
  .modal {
    padding-top: calc(0.5rem + env(safe-area-inset-top));
    padding-bottom: calc(5rem + env(safe-area-inset-top));
  }

  .offcanvas-footer {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom)) !important;
  }

  #map {
    bottom: calc(4rem + env(safe-area-inset-bottom));
  }

  .container {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom)) !important;
  }
}

.green-link {
  color: var(--ember);
}



.signal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.75rem 1rem 3rem;
}

.signal-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  align-items: center;
}

.signal-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Cartes d'étape */
.step-card {
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.step-head {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.step-num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--step-accent) 18%, transparent);
  color: var(--step-accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .95rem;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  color: var(--paper);
}

.step-title i {
  color: var(--step-accent);
}

.step-optional {
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ash-soft);
  font-family: var(--font-body);
  font-weight: 600;
  margin-left: .55rem;
  border: 1px solid var(--line);
  padding: .12rem .45rem;
  border-radius: 999px;
}

.step-desc {
  font-size: .78rem;
  color: var(--ash);
  margin: .25rem 0 0;
}

.step-body {
  padding: 1.15rem 1.25rem 1.3rem;
}

/* Carte de positionnement */
#signal-map {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  overflow: hidden;
}

.map-hint {
  font-size: .74rem;
  color: var(--ash);
}

/* Zone de dépôt des photos */
.upload-zone {
  position: relative;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--ink-700);
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--ember);
  background: var(--ink-600);
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  color: var(--ash);
  font-size: .85rem;
  pointer-events: none;
}

.upload-placeholder i {
  font-size: 1.8rem;
  color: var(--ember);
}

.upload-placeholder small {
  color: var(--ash-soft);
  font-size: .72rem;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: .6rem;
  margin-top: .9rem;
}

.photo-preview-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--ink-700);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-preview-item .remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(20, 22, 27, .85);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  cursor: pointer;
  padding: 0;
}

.photo-preview-item .watermark-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(20, 22, 27, .75);
  color: var(--amber);
  font-size: .55rem;
  text-align: center;
  padding: 2px 0;
  font-family: var(--font-mono);
  letter-spacing: .3px;
}

/* Récapitulatif */
.signal-recap {
  width: 100%;
  padding: 1.15rem 0rem 1.3rem;
}

.recap-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  font-size: .76rem;
  padding: .3rem 0;
}


.recap-value {
  font-family: var(--font-mono);
  color: var(--paper);
  font-weight: 500;
  text-align: right;
}

.recap-privacy {
  font-size: .68rem;
  color: var(--ash-soft);
  line-height: 1.5;
}

/* Responsive  */
@media (max-width: 991.98px) {
  .signal-layout {
    grid-template-columns: 1fr;
  }

  .signal-recap {
    position: static;
  }
}

@media (max-width: 575.98px) {
  .signal-hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .signal-hero-title {
    font-size: 1.5rem;
  }

  .signal-hero-emergency {
    flex-direction: column;
    text-align: center;
  }
}

.install-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: rgb(19, 104, 49);
  font-size: .80rem;
}

.install-app-header .install-app {
  background: white;
  color: rgb(10, 74, 33);
  border: 1px solid rgb(22, 118, 56);
  padding: .1rem .6rem;
  border-radius: var(--radius-md);
}

#install-app-close {
  position: relative;
  z-index: 9999;
  cursor: pointer;
  padding: 5px;
  font-size: 1.5rem;
  background: transparent;
  border: none;
  color: inherit;
}


#risque-dropdown {
  animation: all 1s ease-in-out;
}


#pwa-smart-banner {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bs-dark);
  /* Utilise la couleur sombre de Bootstrap */
  border-bottom: 1px solid #333;
  z-index: 1050;
  padding: 10px 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease-in-out;
}

.pwa-close-btn {
  background: none;
  border: none;
  color: #b2b2b2;
  font-size: 1.5rem;
  padding: 0 10px 0 0;
  line-height: 1;
}

.pwa-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  margin-right: 12px;
  object-fit: cover;
}

.pwa-app-info {
  display: flex;
  flex-direction: column;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.2;
}

.pwa-app-info span {
  font-size: 0.75rem;
  color: #adb5bd;
  margin-top: 2px;
}


.weather-main-icon {
  font-size: 4.5rem;
  line-height: 1;
}

.weather-temp {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--paper);
}

.weather-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}

.hourly-grid {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding-bottom: 1rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.hourly-grid:active {
  cursor: grabbing;
}

.hourly-grid::-webkit-scrollbar {
  display: none;
}

.hourly-card {
  flex: 0 0 auto;
  width: 100px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.2s ease;
  user-select: none;
}

.hourly-card:hover {
  background: var(--ink-700);
}

.search-input-group {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.search-input-group:focus-within {
  border-color: var(--ember);
  background: var(--ink-600);
}

.search-input-group input {
  border: none;
  background: transparent;
  color: var(--paper);
  box-shadow: none !important;
}

.last-search {
  margin-top: 1rem;
  text-align: center;
}

.card-last-search {
  display: inline-block;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  color: var(--paper);
  font-size: 0.85rem;
}

.last-search h5 {
  font-size: 0.9rem;
  color: var(--ash);
  margin-bottom: 0.5rem;
}

.card-last-search:hover {
  background: var(--ink-600);
}









.map-widget {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    background: rgba(8, 15, 10, 0.8);
    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
    border-radius: var(--radius-lg);
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lift);
    color: var(--paper);
    min-width: 280px;
}

.map-widget-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-toggle {
    display: flex;
    background: var(--ink-900);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--line);
}

.map-toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--ash);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-toggle-btn.active {
    background: rgba(62, 62, 62, 0.8);
    color: var(--paper);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.map-content {
    max-width: 300px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--ash);
}

.badge.bg-secondary {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

@media (max-width: 991.98px) {
    .map-widget {
        top: 16px;
        left: 16px;
        right: 16px;
        min-width: auto;
    }
    .map-content {
        max-width: 100%;
    }
}




.weather-main-icon svg {
    width: 70px;
    height: 70px;
}
.hourly-card svg {
    width: 32px;
    height: 32px;
}




  .reports-container { 
    max-width: 650px; 
    margin: 0 auto;
  }

  .report-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
  }
  
  .report-card-body {
    padding: 1.25rem;
  }

  .report-card.is-active {
    border: 1px solid var(--line);
  }

  .report-card.is-waiting {
    border: 1px solid var(--ember-dim);
    box-shadow: 0 4px 20px rgba(255, 102, 7, 0.1);
  }

  .alert-ribbon {
    background: var(--ember-dim);
    color: white;
    font-weight: 500;
    font-family: var(--font-display);
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    padding: 0.4rem 1.25rem;
    text-align: center;
  }

  .report-name { 
    font-family: var(--font-display); 
    font-weight: 600; 
    font-size: 1.35rem; 
    color: var(--paper); 
  }
  
  .report-quote { 
    font-size: 0.9rem; 
    color: var(--paper); 
    line-height: 1.6; 
    background: var(--ink-900);
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--line);
    border-radius: 4px;
  }

  .report-photos { 
    display: flex; 
    gap: .5rem; 
  }
  
  .report-photo-thumb {
    width: 70px; 
    height: 70px; 
    border-radius: var(--radius-sm); 
    overflow: hidden;
    border: 1px solid var(--line); 
  }
  
  .report-photo-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform .2s ease;
  }
  
  .report-photo-thumb:hover img {
    transform: scale(1.1);
  }

  .report-card-footer form {
    display: flex;
    flex-grow: 1;
  }

  .btn.btn-secondary {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
  }
  .btn.btn-secondary:hover {
    background: var(--ink-700);
    color: var(--paper);
  }


  .footer-modal-custom a {
    color: var(--ember);
    transition: all 0.2s ease;
  }

  .footer-modal-custom a:hover {
    color: white;
  }

  .footer-modal-custom-separator {
    color: var(--ash-soft);
    cursor: default;
  }

  @media (max-width: 767px) {
            .press-link img {
              filter: none !important;
              opacity: 1 !important;
            }
          }
          .press-link img {
            filter: grayscale(100%) opacity(0.8);
            transition: all 0.3s ease;
            border-radius: 6px;
          }

          .press-link:hover img {
            filter: grayscale(0%) opacity(1);
            transform: scale(1.05);
          }