:root {
  --recycle-bio-color: #804000;
  --recycle-plastic-color: #ffcc00;
  --recycle-glass-color: #009933;
  --recycle-cardb-color: #0099ff;
  --recycle-house-color: #000000;
}

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

    html, body {
      height: 100%;
      font-family: sans-serif;
    }

    body {
      display: flex;
      flex-direction: column;
    }

    header {
      display: flex;
      padding: 10px;
      background-color: #f5f5f5;
      align-items: center;
      gap: 10px;
    }

    .left {
      flex: 2;
    }

    .right {
      flex: 1;
      display: flex;
      justify-content: space-around;
      align-items: center;
    }

    select {
      width: 100%;
      padding: 8px;
      font-size: 1rem;
    }

    .icon-nav {
      width: 24px;
      height: 24px;
      background-color: #ccc;
      border-radius: 50%;
    }

    .map-section {
      flex: 1;
    }

    #map {
      width: 100%;
      height: 100%;
    }
    
/*
 * container styles in unhighlighted state.
 */
 
.container {
  align-items: center;
  background-color: #FFFFFF;
  border-radius: 50%;
  color: #263238;
  display: flex;
  font-size: 14px;
  gap: 15px;
  height: 30px;
  justify-content: center;
  padding: 4px;
  position: relative;
  position: relative;
  transition: all 0.3s ease-out;
  width: 30px;
}

.container::after {
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid #FFFFFF;
  content: "";
  height: 0;
  left: 50%;
  position: absolute;
  top: 90%;
  transform: translate(-50%, 0);
  transition: all 0.3s ease-out;
  width: 0;
  z-index: 1;
}

.container .icon {
  align-items: center;
  display: flex;
  justify-content: center;
  color: #FFFFFF;
}

.container .icon svg {
  height: 20px;
  width: auto;
}

.container .details {
  display: none;
  flex-direction: column;
  flex: 1;
}

.container .address {
  color: #9E9E9E;
  font-size: 10px;
  margin-bottom: 10px;
  margin-top: 5px;
}

.container .features {
  align-items: flex-end;
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.container .features > div {
  align-items: center;
  background: #F5F5F5;
  border-radius: 5px;
  border: 1px solid #ccc;
  display: flex;
  font-size: 10px;
  gap: 5px;
  padding: 5px;
}

/*
 * container styles in highlighted state.
 */
 
.container.highlight {
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.2);
  height: 80px;
  padding: 8px 15px;
  width: auto;
}
.container.highlight::after {
  border-top: 9px solid #FFFFFF;
}
.container.highlight .details {
  display: flex;
}
.container.highlight .icon svg {
  width: 50px;
  height: 50px;
}

/*
 * recycle bio icon colors.
 */

.container.highlight:has(.fa-recycle.bio) .icon {
  color: var(--recycle-bio-color);
}
.container:not(.highlight):has(.fa-recycle.bio) {
  background-color: var(--recycle-bio-color);
}
.container:not(.highlight):has(.fa-recycle.bio)::after {
  border-top: 9px solid var(--recycle-bio-color);
}

/*
 * recycle plastic icon colors.
 */
 
.container.highlight:has(.fa-recycle.plastic) .icon {
  color: var(--recycle-plastic-color);
}
.container:not(.highlight):has(.fa-recycle.plastic) {
  background-color: var(--recycle-plastic-color);
}
.container:not(.highlight):has(.fa-recycle.plastic)::after {
  border-top: 9px solid var(--recycle-plastic-color);
}

/*
 * recycle glass icon colors.
 */
 
.container.highlight:has(.fa-recycle.glass) .icon {
  color: var(--recycle-glass-color);
}
.container:not(.highlight):has(.fa-recycle.glass) {
  background-color: var(--recycle-glass-color);
}
.container:not(.highlight):has(.fa-recycle.glass)::after {
  border-top: 9px solid var(--recycle-glass-color);
}

/*
 * recycle cardb icon colors.
 */
 
.container.highlight:has(.fa-recycle.cardb) .icon {
  color: var(--recycle-cardb-color);
}
.container:not(.highlight):has(.fa-recycle.cardb) {
  background-color: var(--recycle-cardb-color);
}
.container:not(.highlight):has(.fa-recycle.cardb)::after {
  border-top: 9px solid var(--recycle-cardb-color);
}

/*
 * recycle house icon colors.
 */
 
.container.highlight:has(.fa-recycle.house) .icon {
  color: var(--recycle-house-color);
}
.container:not(.highlight):has(.fa-recycle.house) {
  background-color: var(--recycle-house-color);
}
.container:not(.highlight):has(.fa-recycle.house)::after {
  border-top: 9px solid var(--recycle-house-color);
}


.custom-map-control-button {
  background: white;
  border: 2px solid #ccc;
  border-radius: 3px;
  padding: 8px 12px;
  margin: 10px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.custom-map-control-button:hover {
  background: #f0f0f0;
}

    /* LOADER FULLSCREEN */
/* 
    #loader {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(255, 255, 255, 0.9);
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 1.2rem;
      z-index: 1000;
    }

    .spinner {
      border: 5px solid #f3f3f3;
      border-top: 5px solid #333;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }
 */
 
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;

  opacity: 1;
  visibility: visible;
  pointer-events: none;
  transition: none;
}

#loader.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

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

#spinnerIcon {
  font-size: 3rem;
  color: #0077cc;
  will-change: transform;
  transform: translateZ(0); /* GPU acceleration */
}

    
.submit-btn {
  display: inline-flex;                /* ne prend que l'espace nécessaire */
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.1rem 0.5rem;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.2s ease;
  max-width: 100%;                    /* ne dépasse jamais son conteneur */
  white-space: nowrap;               /* évite le retour à la ligne */
  box-sizing: border-box;
}

.submit-btn:hover {
  background-color: #005fa3;
}

.submit-btn i {
  font-size: 1rem;
}

    /* Overlay */
    .overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background-color: rgba(0, 0, 0, 0.6);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 999;
    }

    .overlay.active {
      display: flex;
    }

    /* Form modal */
    .form-modal {
      background: white;
      padding: 2rem;
      border-radius: 12px;
      max-width: 600px;
      width: 90%;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
      position: relative;
    }

    .form-modal .close {
      position: absolute;
      top: 1rem;
      right: 1rem;
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
    }

    .form-row {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .form-row input {
      flex: 1;
    }

    .overlay input, select, textarea {
      width: 100%;
      padding: 0.6rem;
      margin: 0.5rem 0;
      border: 1px solid #ccc;
      border-radius: 6px;
    }

    .form-contact {
      margin-top: 1rem;
      padding: 0.8rem 1.5rem;
      border: none;
      background: #0077cc;
      color: white;
      border-radius: 6px;
      cursor: pointer;
    }

    @media (max-width: 600px) {
      .form-row {
        flex-direction: column;
      }
    }

    .overlay-confirm {
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0,0,0,0.6);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 9999;
    }
    .overlay-confirm.active {
      display: flex;
    }
    .form-modal-confirm {
      background: #fff;
      padding: 2rem;
      border-radius: 10px;
      box-shadow: 0 5px 20px rgba(0,0,0,0.3);
      max-width: 90%;
      width: 400px;
      text-align: center;
    }
    .form-modal-confirm button {
      width: auto;
      margin: 10px 10px;
      background-color: #007BFF;
      color: white;
      border: none;
      padding: 12px 20px;
      border-radius: 5px;
      cursor: pointer;
    }
