/* ── MODAL OVERLAY ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 42, 38, 0.55);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ── MODAL BOX ── */
.modal {
  background: var(--warm-white);
  border-radius: 24px;
  padding: 48px;
  width: 100%;
  max-width: 580px;
  position: relative;
  border: 1px solid var(--sand);
  box-shadow: 0 40px 100px rgba(44,42,38,0.25);
  transform: translateY(30px) scale(0.97);
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
  max-height: 90vh;
  overflow-y: auto; /* Sécurité pour les petits écrans en hauteur */
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

/* ── CLOSE BUTTON ── */
.modal-close {
  position: absolute;
  top: 20px; right: 24px;
  background: var(--sand);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 0.9rem;
  color: var(--mid);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--taupe); color: var(--deep); }

/* ── MODAL CONTENT ── */
.modal-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.modal-eyebrow::before { content: ''; display: block; width: 20px; height: 1px; background: var(--clay); }

.modal-title {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--deep);
  margin-bottom: 8px;
  line-height: 1.15;
}
.modal-title em { font-style: italic; font-weight: 300; color: var(--sage); }

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--mid);
  margin-bottom: 36px;
  line-height: 1.6;
}

/* ── FORM ── */
.modal-form { display: flex; flex-direction: column; gap: 18px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 7px; }

.form-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--deep);
  letter-spacing: 0.02em;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: 12px;
  padding: 13px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--deep);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  appearance: none;
  width: 100%;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--light-text); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(139,168,154,0.15);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6560' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

/* ── BUDGET CHIPS ── */
.budget-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.budget-chip {
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--sand);
  font-size: 0.82rem;
  color: var(--mid);
  cursor: pointer;
  background: var(--cream);
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.budget-chip:hover { border-color: var(--taupe); }
.budget-chip.selected {
  background: var(--deep);
  color: var(--cream);
  border-color: var(--deep);
}

/* ── SUBMIT BUTTON ── */
.modal-submit {
  background: var(--deep);
  color: var(--cream);
  border: none;
  padding: 18px 36px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.modal-submit:hover { background: var(--clay); }
.modal-submit .arrow { transition: transform 0.25s; }
.modal-submit:hover .arrow { transform: translateX(4px); }

/* AJOUT OPTIMISATION : État désactivé / chargement Supabase */
.modal-submit:disabled {
  background: var(--taupe);
  color: var(--mid);
  cursor: not-allowed;
}
.modal-submit:disabled .arrow {
  display: none;
}

/* ── SUCCESS STATE ── */
.modal-success {
  text-align: center;
  padding: 20px 0;
}
.success-icon {
  width: 72px; height: 72px;
  background: var(--sage-muted);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto 28px;
  animation: popIn 0.5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.success-title {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--deep);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.success-text { font-size: 0.95rem; color: var(--mid); line-height: 1.7; }

/* ── BUY MODAL ── */
.buy-modal-preview {
  background: var(--cream);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 28px;
  border: 1px solid var(--sand);
  display: flex;
  align-items: center;
  gap: 16px;
}
.buy-modal-icon {
  width: 60px; height: 60px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.buy-modal-info { flex: 1; }
.buy-modal-name { font-family: 'Fraunces', serif; font-size: 1.2rem; font-weight: 600; color: var(--deep); margin-bottom: 4px; }
.buy-modal-type { font-size: 0.8rem; color: var(--mid); }
.buy-modal-price { font-family: 'Fraunces', serif; font-size: 1.5rem; color: var(--deep); font-weight: 600; white-space: nowrap; }

.whatsapp-btn {
  background: #25D366;
  color: white;
  border: none;
  padding: 5px 5px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.3s;
  width: 70%;
  margin-bottom: 5px;
  margin-right:auto;
  margin-left:auto;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.whatsapp-btn:hover { background: #1da851; }

.email-btn {
  background: transparent;
  color: var(--deep);
  border: 2px solid var(--sand);
  padding: 5px 5px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.3s;
  width: 70%;
  margin-right:auto;
  margin-left:auto;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.email-btn:hover { border-color: var(--deep); }

/* ── AJOUT OPTIMISATION : RESPONSIVE DESIGN ── */
@media (max-width: 640px) {
  .modal {
    padding: 32px 24px;
    border-radius: 20px;
  }
  .modal-title {
    font-size: 1.6rem;
  }
  .form-row {
    grid-template-columns: 1fr; /* Empilement vertical des champs Nom/Entreprise */
    gap: 18px;
  }
  .buy-modal-preview {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .buy-modal-price {
    margin-top: 4px;
  }
  
  
  /* AJOUT OPTIMISATION : État désactivé / chargement Supabase */
.modal-submit:disabled {
  background: var(--taupe);
  color: var(--mid);
  cursor: not-allowed;
}
.modal-submit:disabled .arrow { display: none; }

/* AJOUT OPTIMISATION RESPONSIVE MOBILE POUR MODALS */
@media (max-width: 640px) {
  .modal { padding: 32px 24px; border-radius: 20px; }
  .modal-title { font-size: 1.6rem; }
  .form-row { grid-template-columns: 1fr; gap: 18px; }
  .buy-modal-preview { flex-direction: column; text-align: center; gap: 12px; }
}
}












/* Conteneur principal */
.rappel-container {
  width: 70%;
  margin-right:auto;
  margin-left:auto;
  max-width: 480px; /* Aligné sur vos boutons existants */
  margin-top: 5px; /* Espace avec le bouton e-mail */
}

/* Le groupe qui fusionne l'input et le bouton */
.input-group {
  display: flex;
  align-items: center;
  position: relative;
  background-color: #FFFFFF;
  border: 1px solid #EAE3D5; /* Même couleur de bordure que votre bouton e-mail */
  border-radius: 28px; /* Effet pilule arrondi identique */
  padding: 4px 4px 4px 16px; /* Espace interne */
  box-sizing: border-box;
}

.input-group:focus-within {
  border-color: #1A1A1A; 
}

.input-icon {
  display: flex;
  align-items: center;
  margin-right: 10px;
}

.rappel-input {
  flex: 1;
  border: none;
  outline: none;
  color: #1A1A1A;
  background: transparent;
}

.rappel-input::placeholder {
  color: #A0A0A0;
}

.rappel-submit {
  background-color: #1A1A1A; 
  color: #FFFFFF;
  border: none;
  outline: none;
  border-radius: 24px;
  padding: 5px 5px;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.rappel-submit:hover {
  background-color: #333333; /* Un peu plus clair au survol */
}