.review-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);

  display: flex;
  justify-content: center;
  align-items: center;

  overflow-y: auto; /* 🔥 clé */

  opacity: 0;
  pointer-events: none;
  transition: 0.3s;

  z-index: 3000;
}

.review-popup.active {
  opacity: 1;
  pointer-events: all;
}

/* BOX */
.review-box {
  display: flex;
  width: 90%;
  max-width: 800px;
  background: white;
  border-radius: 12px;
  overflow: hidden;

  max-height: 90vh; /* 🔥 limite hauteur */
}

/* LEFT */
.review-left {
  flex: 1;
  background: linear-gradient(135deg, #111, #222);
  color: white;
  padding: 30px;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* RIGHT */
.review-right {
  flex: 1;
  padding: 25px;

  overflow-y: auto; /* 🔥 scroll interne */
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.review-header span {
  cursor: pointer;
}

/* FORM */
.review-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-form input,
.review-form textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.review-form input:focus,
.review-form textarea:focus {
  border-color: #e60000;
  outline: none;
}

/* BUTTON */
.review-form button {
  margin-top: 10px;
  padding: 14px;
  background: linear-gradient(135deg, #ff1a1a, #b30000);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

/* ⭐ */
.stars-select span {
  font-size: 1.5rem;
  cursor: pointer;
  color: #ccc;
}

.stars-select span.active {
  color: #e60000;
}

.char-count {
  font-size: 0.75rem;
  color: #888;
  text-align: right;
  margin-top: -5px;
}

.review-help {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 10px;
}

.stars-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* EMOTION */
.emotion {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 10px;
}

#emoji {
  font-size: 1.8rem;
}

#emotionText {
  font-size: 0.7rem;
  color: #777;
}

.city-field {
  position: relative;
}

.city-suggestions {
  position: absolute;
  width: 100%;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  max-height: 150px;
  overflow-y: auto;

  display: none;
  z-index: 10;
}

.city-suggestions div {
  padding: 10px;
  cursor: pointer;
  font-size: 0.9rem;
}

.city-suggestions div:hover {
  background: #f5f5f5;
}

.city-row {
  display: flex;
  gap: 10px;
}

/* ville prend plus de place */
.city-field {
  flex: 2;
  position: relative;
}

/* code postal plus petit */
#postalCode {
  flex: 1;
  max-width: 100px;
}


@media (max-width: 768px) {

  .review-box {
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .review-left {
    display: none; /* comme devis */
  }

  .review-right {
    height: 100%;
    overflow-y: auto;
  }

  .review-popup {
    align-items: flex-end; /* effet slide bottom */
  }

}



#formMessage {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
  text-align: center;
  font-weight: 500;
}

/* succès */
#formMessage.success {
  background: #e6f9ed;
  color: #1e7e34;
  border: 1px solid #28a745;
}

/* erreur */
#formMessage.error {
  background: #fdecea;
  color: #c82333;
  border: 1px solid #dc3545;
}