/* G-VAD Devis — Form styles, scoped to avoid conflicts with main stylesheet */

/* ── Form-specific variables scoped to .devis-wrap ── */
/* CSS custom properties inherit, so descendants of .devis-wrap use these values */
.devis-wrap {
  --navy:       #1F3864;
  --navy-deep:  #162D50;
  --mid:        #2968B0;
  --sky:        #9FC5E8;
  --sky-light:  #C8DFF4;
  --white:      #FFFFFF;
  --off:        #F5F8FC;
  --border:     rgba(31,56,100,0.12);
  --border-hov: rgba(41,104,176,0.35);
  --text:       #1a2b45;
  --text-2:     #5a6e88;
  --text-3:     #8fa3bb;
  --err:        #dc3545;
  --ok:         #1a9e6e;
  --wa:         #25D366;
  --radius:     10px;
  --radius-lg:  16px;
  --shadow:     0 2px 16px rgba(31,56,100,0.08);

  font-family: 'DM Sans', 'Inter', sans-serif;
  background: var(--off);
  color: var(--text);
  padding: 160px 1rem 4rem;
}

/* ── Page layout ── */
.page-wrap {
  max-width: 760px;
  margin: 0 auto;
}

/* ── Page header ── */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeUp .45s ease both;
}
.page-title {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.page-title span { color: var(--mid); }
.page-desc {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 8px;
  line-height: 1.65;
}
.badges {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 8px;
  margin-top: 14px;
}
.badge {
  font-size: 11.5px; font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--white);
}
.badge.green { border-color: rgba(26,158,110,.3); color: var(--ok); background: rgba(26,158,110,.06); }

/* ── Tab nav ── */
.tab-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  animation: fadeUp .5s ease .08s both;
}
.tab-btn {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  padding: 16px 8px;
  cursor: pointer;
  border: none; background: transparent;
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-2);
  border-bottom: 2.5px solid transparent;
  transition: all .22s;
  line-height: 1.3;
}
.tab-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab-btn:hover { background: var(--off); color: var(--navy); }
.tab-btn.active {
  color: var(--mid);
  border-bottom-color: var(--mid);
  background: rgba(41,104,176,.05);
}

/* ── Card ── */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 1.8rem 2rem 2rem;
  box-shadow: var(--shadow);
  animation: fadeUp .5s ease .14s both;
}

/* ── Panel visibility ── */
.panel { display: none; }
.panel.active { display: block; }

/* ── Section tag ── */
.devis-wrap .section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--mid);
  background: rgba(41,104,176,.08);
  border: 1px solid rgba(41,104,176,.18);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 1.3rem;
}
.devis-wrap .section-tag svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── Form grid ── */
.devis-wrap .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.devis-wrap .row.full { grid-template-columns: 1fr; }
@media (max-width: 520px) { .devis-wrap .row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 5px; }
.devis-wrap label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.devis-wrap label .req { color: var(--err); margin-left: 2px; }

.devis-wrap input[type=text],
.devis-wrap input[type=email],
.devis-wrap input[type=tel],
.devis-wrap input[type=number],
.devis-wrap input[type=date],
.devis-wrap select,
.devis-wrap textarea {
  width: 100%;
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 13.5px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--off);
  color: var(--text);
  outline: none;
  transition: border-color .2s, background .2s;
  -webkit-appearance: none;
  appearance: none;
}
.devis-wrap input:focus,
.devis-wrap select:focus,
.devis-wrap textarea:focus {
  border-color: var(--mid);
  background: var(--white);
}
.devis-wrap input.error,
.devis-wrap select.error,
.devis-wrap textarea.error {
  border-color: var(--err);
  background: rgba(220,53,69,.04);
}
.err-msg { font-size: 11px; color: var(--err); margin-top: 2px; display: none; }
.err-msg.show { display: block; }
.devis-wrap textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
.devis-wrap select {
  cursor: pointer;
  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='%235a6e88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.2rem 0; }

/* ── Pills ── */
.pills-wrap { margin-bottom: 12px; }
.pills-label { font-size: 12.5px; font-weight: 500; color: var(--text-2); margin-bottom: 7px; }
.pills-label .req { color: var(--err); }
.pills-group { display: flex; flex-wrap: wrap; gap: 7px; }
.pill {
  font-size: 12px; font-weight: 500;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--off);
  color: var(--text-2);
  cursor: pointer;
  transition: all .18s;
  user-select: none;
  white-space: nowrap;
}
.pill:hover { border-color: var(--border-hov); color: var(--navy); background: var(--white); }
.pill.sel { background: var(--navy); color: var(--sky-light); border-color: var(--navy); }
.pills-err { font-size: 11px; color: var(--err); margin-top: 4px; display: none; }
.pills-err.show { display: block; }

/* ── Budget slider ── */
.budget-wrap { margin-bottom: 12px; }
.budget-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.budget-head span:first-child { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.budget-amount { font-size: 15px; font-weight: 700; color: var(--navy); font-family: 'Sora', 'Inter', sans-serif; }
.devis-wrap input[type=range] {
  width: 100%; height: 5px;
  border-radius: 9px;
  background: linear-gradient(to right, var(--mid) 0%, var(--mid) var(--pct, 20%), var(--border) var(--pct, 20%));
  border: none; padding: 0;
  outline: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.devis-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--navy);
  border: 2.5px solid var(--white);
  box-shadow: 0 0 0 1.5px var(--mid);
  cursor: pointer;
}
.devis-wrap input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--navy);
  border: 2.5px solid var(--white);
  cursor: pointer;
}

/* ── Urgency ── */
.urgency-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 12px; }
.urg-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 6px;
  cursor: pointer;
  text-align: center;
  font-size: 12px; font-weight: 500;
  color: var(--text-2);
  background: var(--off);
  transition: all .2s;
  line-height: 1.4;
}
.urg-card svg { display: block; margin: 0 auto 5px; width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.urg-card .sub { font-size: 10.5px; font-weight: 400; opacity: .7; display: block; margin-top: 2px; }
.urg-card:hover { background: var(--white); border-color: var(--border-hov); }
.urg-card.sel-g { background: rgba(26,158,110,.08); border-color: rgba(26,158,110,.4); color: #0f6e45; }
.urg-card.sel-a { background: rgba(210,130,0,.08); border-color: rgba(210,130,0,.4); color: #8a5300; }
.urg-card.sel-r { background: rgba(220,53,69,.08); border-color: rgba(220,53,69,.4); color: #911c28; }

/* ── Features checkboxes ── */
.checks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
@media (max-width: 420px) { .checks-grid { grid-template-columns: 1fr; } }
.check-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12.5px; color: var(--text-2);
  background: var(--off);
  transition: all .18s;
  user-select: none;
}
.check-item:hover { background: var(--white); border-color: var(--border-hov); }
.check-item input[type=checkbox] { display: none; }
.check-box {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px; flex-shrink: 0;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.check-item.checked { border-color: var(--mid); background: rgba(41,104,176,.05); color: var(--navy); }
.check-item.checked .check-box { background: var(--navy); border-color: var(--navy); }
.check-item.checked .check-box::after {
  content: '';
  display: block; width: 9px; height: 6px;
  border-left: 2px solid var(--sky-light);
  border-bottom: 2px solid var(--sky-light);
  transform: rotate(-45deg) translate(1px,-1px);
}

/* ── Footer actions ── */
.form-footer { margin-top: 1.6rem; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 440px) { .action-grid { grid-template-columns: 1fr; } }

/* ── Buttons (scoped to avoid G-VAD conflicts) ── */
.devis-wrap .btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: none; cursor: pointer;
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 14px; font-weight: 600;
  transition: transform .15s, opacity .15s;
  text-decoration: none;
}
.devis-wrap .btn:active { transform: scale(.97); }
.devis-wrap .btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.devis-wrap .btn-wa { background: var(--wa); color: var(--white); }
.devis-wrap .btn-wa:hover { opacity: .9; }
.devis-wrap .btn-wa svg { stroke: var(--white); }
.devis-wrap .btn-mail { background: var(--navy); color: var(--sky-light); }
.devis-wrap .btn-mail:hover { opacity: .9; }
.devis-wrap .btn-mail svg { stroke: var(--sky-light); }
.devis-wrap .btn-alt {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 10px;
  padding: 11px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-2);
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 13px; font-weight: 500;
  cursor: pointer; transition: border-color .2s, color .2s;
  text-decoration: none;
}
.devis-wrap .btn-alt:hover { border-color: var(--mid); color: var(--mid); }

/* ── Form note ── */
.form-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 12px;
  line-height: 1.6;
}
.form-note a { color: var(--mid); text-decoration: none; }

/* ── Success toast ── */
.toast {
  display: none;
  align-items: center; gap: 10px;
  background: rgba(26,158,110,.1);
  border: 1px solid rgba(26,158,110,.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 14px;
  font-size: 13.5px; font-weight: 500;
  color: var(--ok);
}
.toast.show { display: flex; animation: fadeUp .3s ease; }
.toast svg { width: 20px; height: 20px; stroke: var(--ok); fill: none; stroke-width: 2; flex-shrink: 0; }

/* ── Info strip ── */
.info-strip {
  display: flex; flex-wrap: wrap;
  gap: 12px; justify-content: center;
  margin-top: 1.6rem;
  animation: fadeUp .5s ease .24s both;
}
.info-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-2);
}
.info-item svg { width: 15px; height: 15px; stroke: var(--mid); fill: none; stroke-width: 2; }

/* ── Réponse sous 2h strip ── */
.response-strip {
  background: linear-gradient(135deg, #1F3864, #2968B0);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: center; align-items: center;
  animation: fadeUp .4s ease .05s both;
}
.rs-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: #fff;
  white-space: nowrap;
}
.rs-item svg { width: 16px; height: 16px; stroke: var(--sky); fill: none; stroke-width: 2; flex-shrink: 0; }

/* ── Keyframes ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
