/* Fichier CSS de la vue v_carte.php */
.logo {
  position: absolute;
  width: 60px;
  height: 60px;
  top: 20px;
  right: 20px;
  background-color: var(--main-color-bg);
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.logo img {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;
  padding: 5px;
  margin: 0;
}

/* Styles pour le bouton scanBeer */
.scanBeer {
  position: absolute;
  width: 60px;
  height: 60px;
  top: 100px;
  right: 20px;
  background-color: var(--main-color-bg);
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border: none;
}

.scanBeer:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.scanBeer img {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;

  margin: 0;
}

.scanBeer:focus-visible {
  outline: 2px solid var(--main-color-link);
  outline-offset: 4px;
}


/* Styles pour le bouton rangeHunt */
.rangeHuntBar {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 300px;
  height: 60px;
  background-color: var(--main-color-bg);
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.8);
  border-radius: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  border: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(30px) scale(0.98);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease;
}

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

.rangeHuntBar.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(30px) scale(0.98);
}

.rangeHuntBar img {
  display: block;
  object-fit: contain;
  margin: 0;
}

.rangeHuntBar:focus-visible {
  outline: 2px solid var(--main-color-link);
  outline-offset: 4px;
}

/*Surcharge du style bootstrap*/
.form-range::-webkit-slider-thumb {
    background-color: var(--main-color-link);
}

.form-range::-moz-range-thumb {
    background-color: var(--main-color-link);
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 1px var(--main-color-link);
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 1px var(--main-color-link);
}


.form-range::-webkit-slider-thumb:active {
    background-color: var(--main-color-link);
    box-shadow: 0 0 0 0.25rem rgba(var(--main-color-link-rgb), .25);
}

.form-range::-moz-range-thumb:active {
    background-color: var(--main-color-link );
    box-shadow: 0 0 0 0.25rem rgba(var(--main-color-link-rgb), .25);
}

/* Styles pour le panneau de statistiques ScanBeer */
.scan-beer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1200;
}

.scan-beer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.scan-beer-stats-panel {
  position: fixed;
  right: 0px;
  bottom: 0px;
  width: min(520px, calc(100vw - 32px));
  max-height: min(78vh, 760px);
  overflow: auto;
  padding: 20px;
  border-radius: 24px 0 0 0;
  background: var(--main-color-bg);
  color: var(--main-color-bgtitle);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  z-index: 1201;
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.scan-beer-stats-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.scan-beer-stats-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.scan-beer-stats-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--main-color-link);
  margin-bottom: 6px;
}

.scan-beer-stats-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--main-color-bgtitle);
}

.scan-beer-stats-subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--main-color-label);
}

.scan-beer-stats-close {
  border: none;
  background: var(--main-color-bg);
  color: var(--main-color-bgtitle);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scan-beer-stats-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scan-beer-bhi-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.scan-beer-bhi-gauge {
  --bhi-progress: 0%;
  --bhi-accent: var(--main-color-link);
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(
    var(--bhi-accent) 0 var(--bhi-progress),
    rgba(255, 255, 255, 0.12) var(--bhi-progress) 100%
  );
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.04);
}

.scan-beer-bhi-gauge::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--main-color-bg);
}

.scan-beer-bhi-gauge-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

.scan-beer-bhi-score {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--main-color-bgtitle);
}

.scan-beer-bhi-score-label {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--main-color-label);
}

.scan-beer-bhi-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.scan-beer-bhi-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--main-color-light);
}

.scan-beer-bhi-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--main-color-bgtitle);
}

.scan-beer-bhi-level {
  font-size: 0.9rem;
  color: var(--main-color-textValue);
}

.scan-beer-bhi-icon-wrap {
  margin-top: 2px;
}

.scan-beer-bhi-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.scan-beer-bhi-cap,
.scan-beer-bhi-body,
.scan-beer-bhi-foam,
.scan-beer-bhi-crown {
  position: absolute;
  display: block;
}

.scan-beer-bhi-cap {
  width: 28px;
  height: 10px;
  top: 8px;
  border-radius: 999px;
  background: var(--main-color-bgtitle);
}

.scan-beer-bhi-body {
  width: 24px;
  height: 24px;
  top: 18px;
  border-radius: 6px;
  background: var(--main-color-bgtitle);
  opacity: 0.95;
}

.scan-beer-bhi-foam {
  width: 30px;
  height: 8px;
  bottom: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
}

.scan-beer-bhi-crown {
  width: 18px;
  height: 10px;
  bottom: 8px;
  border: 2px solid var(--main-color-light);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  opacity: 0;
}

.scan-beer-bhi-icon.bhi-low .scan-beer-bhi-body,
.scan-beer-bhi-icon.bhi-low .scan-beer-bhi-cap {
  background: var(--main-color-label);
}

.scan-beer-bhi-icon.bhi-low .scan-beer-bhi-body {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transform: rotate(-6deg);
}

.scan-beer-bhi-icon.bhi-mid .scan-beer-bhi-body,
.scan-beer-bhi-icon.bhi-mid .scan-beer-bhi-cap {
  background: var(--main-color-link);
}

.scan-beer-bhi-icon.bhi-foam .scan-beer-bhi-body,
.scan-beer-bhi-icon.bhi-foam .scan-beer-bhi-cap {
  background: var(--main-color-light);
}

.scan-beer-bhi-icon.bhi-foam .scan-beer-bhi-foam {
  opacity: 1;
}

.scan-beer-bhi-icon.bhi-chope .scan-beer-bhi-body,
.scan-beer-bhi-icon.bhi-chope .scan-beer-bhi-cap {
  background: var(--main-color-dark);
}

.scan-beer-bhi-icon.bhi-chope .scan-beer-bhi-body {
  height: 30px;
}

.scan-beer-bhi-icon.bhi-gold .scan-beer-bhi-body,
.scan-beer-bhi-icon.bhi-gold .scan-beer-bhi-cap {
  background: var(--main-color-light);
}

.scan-beer-bhi-icon.bhi-gold .scan-beer-bhi-crown {
  opacity: 1;
}

.scan-beer-bhi-message {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--main-color-label);
}

.scan-beer-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.scan-beer-metric-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.scan-beer-metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(235, 155, 62, 0.16);
  color: var(--main-color-light);
  flex-shrink: 0;
}

.scan-beer-metric-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--main-color-label);
}

.scan-beer-metric-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--main-color-bgtitle);
}

.scan-beer-section-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.scan-beer-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--main-color-light);
}

.scan-beer-detail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scan-beer-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--main-color-textValue);
}

.scan-beer-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scan-beer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--main-color-textValue);
  font-size: 0.84rem;
}

.scan-beer-highlight {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.scan-beer-highlight:first-child {
  padding-top: 0;
  border-top: none;
}

.scan-beer-highlight-label {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--main-color-label);
}

.scan-beer-highlight-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--main-color-bgtitle);
}

.scan-beer-empty-state {
  padding: 18px;
  text-align: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--main-color-label);
}

.resultSearchPlaces {
  display: block;
  overflow: auto;
  background-color: var(--main-color-bg);
  font-size: 14px;
  box-shadow: 5px 0 10px rgba(0, 0, 0, 0.24);
  position: relative;
  z-index: 3;
  min-width: 375px;
  max-width: 450px;
  anchor-name: --resultSearchPlaces;
}

.map-layout {
  position: relative;
}

.resultDetail {
  position: absolute;
  position-anchor: --resultSearchPlaces;
  top: 20px;
  /*left: calc(25% + 24px);*/
  left: anchor(right);
  margin-left:24px;
  width: min(420px, calc(100% - 24px));
  height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
  z-index: 4;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--main-color-bg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  padding-bottom: 12px;
}

.resultDetail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  /*border-bottom: 1px solid rgba(255, 255, 255, 0.12);*/
  color: var(--main-color-bgtitle);
  /*background: rgba(255, 255, 255, 0.06);*/
  font-size: 1.1rem;
}

.resultDetail__header a{
  color: var(--main-color-bgtitle);
}

.resultDetail__title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.resultDetail__content {
  display: flex;
  flex-direction: column;
  /*flex: 1 1 auto;*/
  min-height: 0;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.5;
}

#map_canvas {
  position: relative;
  z-index: 1;
}

#affResultPlaces {
  padding: 0px;
}



/* Bouton de basculement sur l'affichage des filtres */

.select-with-icon {
  position: relative;
}
.select-with-icon .select-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: none;
}
.select-with-icon .custom-select-wrapper {
  position: relative;
  min-width: 220px;
}
.select-with-icon .custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 52px;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
}
.select-with-icon .custom-select-value {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.select-with-icon .select-arrow {
  margin-left: 10px;
  font-size: 0.8rem;
}
.select-with-icon .custom-options {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--main-color-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-height: 320px;
  overflow-y: auto;
  z-index: 1100;
}
.select-with-icon.open .custom-options {
  display: block;
}
.select-with-icon .custom-option {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.95rem;
}
.select-with-icon .custom-option:hover,
.select-with-icon .custom-option.selected {
  background: rgba(255, 255, 255, 0.08);
}
.select-with-icon .custom-option-icon {
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 10px;
  flex-shrink: 0;
}
.select-with-icon .custom-select-hidden {
  display: none;
}

.filter-panel {
  position: fixed;
  right: -360px;
  width: 360px;
  /*height: calc(100vh - 156px);*/
  z-index: 1050;
  background-color: var(--main-color-bg);
  box-shadow: 0px 0 10px rgba(0, 0, 0, 0.24);
  border-radius: 0 0 0 24px;
  overflow-y: auto;
  transition:
    right 0.3s ease,
    background-color 0.2s ease;
  padding: 24px;
  box-sizing: border-box;
  color: var(--main-color-bgtitle);
}
.filter-panel.open {
  right: 0;
}

/* Spacing and presentation inside the filter panel */
.filter-panel .row {
  margin: 0;
}
.filter-panel .col-auto,
.filter-panel .col-12 {
  margin-bottom: 16px;
}
.filter-panel .form-check {
  margin-right: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-panel .form-check-input {
  width: 42px;
  height: 24px;
  padding: 0;
  /*border-radius: 999px;*/
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.filter-panel .form-check-input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;

  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.filter-panel .form-check-input:checked {
  background-color: #eb9b3e;
  border-color: rgba(235, 155, 62, 0.4);
}

.filter-panel .form-check-input:checked::before {
  transform: translateX(18px);
}

.filter-panel .form-check-input:focus-visible {
  box-shadow: 0 0 0 4px rgba(235, 155, 62, 0.18);
}

.filter-panel .form-check-label {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
}

.filter-panel label {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.filter-panel .section-title {
  font-weight: 700;
  margin-bottom: 12px;
}
.filter-panel .form-control {
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 10px 14px;
  min-width: 160px;
  border-radius: 8px;
  color: var(--main-color-bgtitle);
}
.filter-panel label {
  font-size: 0.92rem;
  margin-bottom: 4px;
  display: block;
}
.filter-panel .d-flex {
  gap: 12px;
}
.filter-panel .section-title {
  font-weight: 600;
  margin-bottom: 8px;
}
/* slightly separate logical groups */
.filter-panel .filter-group {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  margin-bottom: 12px;
}
