/* Variables CSS */
:root {
  --error-red: #d83e3c;
  --border-color: #dee2e6;
  --hover-bg: #f7f7f7;
  --highlight-bg: oklch(97% 0 0);
}

/* === POPUP FORM === */
#popupForm {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#popupForm.active {
  opacity: 1;
  pointer-events: auto;
}

/* Titre */
#popupForm h2 {
  font-family: "neue-haas-grotesk-display", sans-serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #2d2e2c;
  margin: 0;
}

/* Formulaire */
#popupForm form {
  margin: 2rem 0 0 0;
}

/* Champs de saisie */
#popupForm #identite,
#popupForm #telephone,
#popupForm #choixBoutique {
  font-size: 1rem;
  padding: 0.75rem 1rem;
  margin: 0;
  color: #000;
  border-radius: 0.25rem;
  border: 1px solid var(--border-color);
}

#popupForm #choixBoutique {
  color: var(--color-neutral-500) !important;
}

#popupForm #choixBoutique.textBlack {
  color: #000 !important;
}

/* Labels */
#popupForm label {
  display: inherit;;
}

#popupForm #labelSms {
  font-weight: 400 !important;
  color: var(--color-neutral-500);
}

/* Bouton de fermeture */
#popupForm #closeModal {
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  box-shadow: none !important;
  cursor: pointer;
}

/* Bouton de soumission */
#popupForm #submitRdv {
  font-size: 1.125rem;
  line-height: calc(1.75 / 1.125);
  font-weight: 500;
  text-transform: none;
  padding: 0.75rem 2rem;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#popupForm #submitRdv:hover:not(:disabled) {
  background-color: var(--color-neutral-900) !important;
  box-shadow: none;
}

#popupForm #submitRdv:disabled {
  background: #000 !important;
  opacity: 0.6;
  cursor: not-allowed;
}

/* Messages d'erreur */
#popupForm .feedback-error {
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

.text-error {
  color: var(--error-red);
}

.is-invalid {
  border-color: var(--error-red) !important;
}

/* === INTERNATIONAL TELEPHONE INPUT (ITI) === */
.iti {
  display: block !important;
  width: 100%;
}

/* Pays sélectionné */
.iti__selected-country-primary {
  padding: 0 0.5rem 0 1rem !important;
    border-radius: 0.25rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.iti__selected-country-primary:hover {
  background-color: var(--highlight-bg)!important
}

.iti__selected-country:focus-visible {
  outline: none;
}

/* Code de pays (caché) */
.iti__selected-dial-code {
  display: none;
  padding-left: 0.25rem;
}

/* === DROPDOWN PAYS === */
.iti__dropdown-content {
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important;
  margin-top: 0.75rem !important;
  border-radius: 0.25rem;
  background: #fff;
}

/* Liste des pays */
.iti__country-list {
  padding: 0.5rem !important;
}

.iti__country {
  cursor: pointer;
  padding: 1rem 0.75rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
}

.iti__country:hover,
.iti__country.iti__highlight {
  background-color: var(--highlight-bg);
  box-shadow: none !important;
}

.iti__country-list .iti__flag {
  margin-right: 0.75rem;
  border-radius: 0.115rem;
}

/* Champ de recherche */
.iti__search-input {
  padding: 1.25rem;
  border: none;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0.25rem 0.25rem 0 0;
  width: 100%;
  box-sizing: border-box;
}

.iti__search-input:focus-visible {
  outline: none;
  border-bottom-color: #000;
}