/* ===== Fenêtre « parlons de votre projet » — composant partagé =====
 *
 * Même parti pris que menu.css : ce fichier est VOLONTAIREMENT AUTONOME. Il
 * n'emprunte aucune variable de palette, chaque monde ayant la sienne. Un
 * monde qui veut sa propre couleur d'accent n'a qu'à poser `--ask-accent`
 * (et éventuellement `--ask-accent-2`) sur `.ask-modal`.
 *
 * Le balisage des CHAMPS vit dans chaque page : sport demande un projet en
 * deux lignes, l'immobilier demande une superficie et une commune. Seuls le
 * comportement (ask.js) et l'habillage (ce fichier) sont communs.
 */

.ask-modal {
  --ask-accent:   #ff7a3d;
  --ask-accent-2: #ef8f6e;
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 16, 18, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overscroll-behavior: contain;
}
.ask-modal[hidden] { display: none; }

.ask-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100svh - 36px);
  overflow-y: auto;
  padding: clamp(20px, 4vw, 30px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 250, 247, 0.94);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 30px 80px rgba(10, 16, 18, 0.45);
  color: #26393c;
  font-family: "Geist", -apple-system, "Helvetica Neue", sans-serif;
  animation: ask-in 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes ask-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
}
@media (prefers-reduced-motion: reduce) {
  .ask-panel { animation: none; }
}

.ask-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.ask-eyebrow {
  margin: 0;
  flex: 1;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #2e7377;
}
.ask-close {
  flex: none;
  width: 34px; height: 34px;
  margin: -6px -6px 0 0;
  border: none;
  border-radius: 50%;
  background: rgba(38, 57, 60, 0.08);
  color: #26393c;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease;
}
.ask-close:hover { background: rgba(38, 57, 60, 0.16); }

.ask-title {
  margin: 0 0 0.2rem;
  font-size: clamp(1.3rem, 3.6vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
/* rappel du service choisi — rempli par ask.js */
.ask-context {
  margin: 0 0 1.1rem;
  font-size: 0.86rem;
  color: #5d7275;
}
.ask-context b { color: #26393c; }

/* ---------- champs ---------- */
.ask-field { display: block; margin-bottom: 0.85rem; }
.ask-field > span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.32rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5d7275;
}
/* ⚠️ `box-sizing: border-box` EXPLICITE, et il est indispensable.
   `width: 100%` + 28 px de marge intérieure + 2 px de bordure : en
   `content-box`, le champ mesure 30 px de PLUS que la colonne qui le
   contient. Les autres mondes ne le voyaient pas — leur feuille pose un
   `* { box-sizing: border-box }` global. `creation-site.css` n'en a pas,
   et les champs y débordaient de 11 px à droite de l'écran sur téléphone
   (relevé par Lino le 10/08/2026 : mesuré 368 px de champ pour 337 px de
   colonne, sur 375 px d'écran). La règle est posée ICI et non dans la
   feuille du monde : c'est le composant qui doit se tenir dans sa boîte,
   quelle que soit la page qui l'accueille. Sans effet ailleurs, le
   `*` global y disant déjà la même chose. */
.ask-field input,
.ask-field select,
.ask-field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(38, 57, 60, 0.18);
  border-radius: 13px;
  background: #fff;
  color: #26393c;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.ask-field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.ask-field input:focus,
.ask-field select:focus,
.ask-field textarea:focus {
  outline: none;
  border-color: var(--ask-accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.16);
}
.ask-field.is-bad input,
.ask-field.is-bad select,
.ask-field.is-bad textarea { border-color: #d9534f; }

.ask-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.7rem; }
@media (max-width: 460px) { .ask-row { grid-template-columns: 1fr; } }

/* ---------- bulle d'aide « i » ---------- */
.ask-info { position: relative; flex: none; display: inline-flex; }
.ask-info-btn {
  width: 17px; height: 17px;
  border: none;
  border-radius: 50%;
  background: rgba(38, 57, 60, 0.22);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  font-style: italic;
  line-height: 17px;
  text-align: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease;
}
.ask-info-btn:hover,
.ask-info.is-open .ask-info-btn { background: #26393c; }
.ask-info-bulle {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 3;
  width: max-content;
  max-width: 230px;
  transform: translateX(-50%);
  padding: 9px 12px;
  border-radius: 11px;
  background: #16191b;
  color: #ece7db;
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.ask-info-bulle[hidden] { display: none; }
/* la petite pointe sous la bulle */
.ask-info-bulle::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: #16191b;
}

/* ---------- envoi ---------- */
.ask-send {
  width: 100%;
  margin-top: 0.5rem;
  padding: 15px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--ask-accent), var(--ask-accent-2));
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(255, 122, 61, 0.32);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.ask-send:hover:not(:disabled) { transform: translateY(-2px); }
.ask-send:disabled { opacity: 0.45; cursor: default; box-shadow: none; }

.ask-msg {
  margin: 0.7rem 0 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  text-align: center;
  color: #d9534f;
}
.ask-msg.is-ok { color: #2e7377; }

/* ---------- état « envoyé » ---------- */
.ask-done { text-align: center; padding: 0.6rem 0 0.2rem; }
.ask-done[hidden] { display: none; }
.ask-done-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--ask-accent), var(--ask-accent-2));
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 12px 28px rgba(255, 122, 61, 0.34);
}
.ask-done h3 { margin: 0 0 0.4rem; font-size: 1.2rem; font-weight: 700; }
.ask-done p { margin: 0 0 1.3rem; color: #5d7275; font-size: 0.92rem; line-height: 1.5; }
