/* =================================================================
   AEEPS FORMS — Frontend stylesheet
   All rules scoped under .aef-wrapper to avoid theme conflicts.
   ================================================================= */

.aef-wrapper {
  --aef-green-deep: #0D3B2E;
  --aef-green-mid:  #1A5C44;
  --aef-green-soft: rgba(26,92,68,.07);
  --aef-gold:       #F5A623;
  --aef-gold-soft:  rgba(245,166,35,.15);
  --aef-sand:       #F4F1EC;
  --aef-white:      #FFFFFF;
  --aef-text:       #1C2B25;
  --aef-muted:      #6B7C74;
  --aef-border:     rgba(13,59,46,.12);
  --aef-border-strong: rgba(13,59,46,.2);
  --aef-error:      #C0392B;

  font-family: 'DM Sans', Arial, sans-serif;
  color: var(--aef-text);
  -webkit-font-smoothing: antialiased;
  max-width: 1100px;
  margin: 2rem auto;
  box-sizing: border-box;
}
.aef-wrapper *, .aef-wrapper *::before, .aef-wrapper *::after { box-sizing: border-box; }

/* ── Layouts ─────────────────────────────────────────────────────── */
.aef-wrapper.aef-with-sidebar {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */
.aef-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.aef-side-card {
  background: var(--aef-white);
  border-radius: 16px;
  border: 1px solid var(--aef-border);
  padding: 1.5rem 1.6rem;
  transition: box-shadow .25s;
}
.aef-side-card:hover { box-shadow: 0 4px 24px rgba(13,59,46,.1); }
.aef-side-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  color: var(--aef-green-deep);
  margin: 0 0 1rem;
  display: flex; align-items: center; gap: .6rem;
}
.aef-side-card h3 svg { width: 18px; height: 18px; color: var(--aef-gold); }

.aef-contact-items { display: flex; flex-direction: column; gap: .65rem; }
.aef-contact-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem .9rem;
  background: var(--aef-sand);
  border-radius: 8px;
}
.aef-contact-item svg { width: 16px; height: 16px; color: var(--aef-green-mid); min-width: 16px; }
.aef-contact-item span { font-size: .85rem; color: var(--aef-text); }
.aef-contact-item a { color: var(--aef-green-mid); text-decoration: none; font-weight: 500; }
.aef-contact-item a:hover { color: var(--aef-gold); }

.aef-process { display: flex; flex-direction: column; }
.aef-process-item {
  display: flex; align-items: flex-start; gap: .9rem;
  padding: .7rem 0; position: relative;
}
.aef-process-item:not(:last-child)::after {
  content: ''; position: absolute; left: 16px; top: 44px;
  width: 2px; height: calc(100% - 18px);
  background: rgba(13,59,46,.1);
}
.aef-process-num {
  width: 34px; height: 34px; min-width: 34px;
  border-radius: 50%; background: var(--aef-green-deep); color: var(--aef-gold);
  font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.aef-process-content h4 { font-size: .88rem; font-weight: 600; color: var(--aef-green-deep); margin: 0 0 .15rem; }
.aef-process-content p  { font-size: .82rem; color: var(--aef-muted); line-height: 1.5; margin: 0; }

.aef-trust { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.aef-trust-item {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: .4rem;
  padding: .85rem .5rem;
  background: var(--aef-sand);
  border-radius: 10px;
}
.aef-trust-item svg { width: 20px; height: 20px; color: var(--aef-green-mid); }
.aef-trust-item span { font-size: .76rem; font-weight: 500; color: var(--aef-text); line-height: 1.3; }

/* ── Card ────────────────────────────────────────────────────────── */
.aef-card {
  background: var(--aef-white);
  border-radius: 20px;
  border: 1px solid var(--aef-border);
  padding: 2.5rem;
  box-shadow: 0 2px 32px rgba(13,59,46,.07);
}
.aef-card-header { margin-bottom: 1.75rem; }
.aef-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  color: var(--aef-green-deep);
  margin: 0 0 .4rem;
}
.aef-subtitle { font-size: .92rem; color: var(--aef-muted); margin: 0; }

/* ── Progress bar ───────────────────────────────────────────────── */
.aef-progress { display: flex; align-items: center; gap: .5rem; margin-bottom: 2rem; }
.aef-progress-step {
  display: flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 600; color: var(--aef-muted);
  transition: color .2s;
}
.aef-progress-step.aef-active { color: var(--aef-green-deep); }
.aef-progress-step.aef-done { color: var(--aef-green-mid); }
.aef-p-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--aef-border);
  display: flex; align-items: center; justify-content: center;
  font-size: .76rem; font-weight: 700;
  transition: all .25s;
}
.aef-progress-step.aef-active .aef-p-dot {
  background: var(--aef-green-deep); border-color: var(--aef-green-deep); color: var(--aef-gold);
}
.aef-progress-step.aef-done .aef-p-dot {
  background: var(--aef-green-mid); border-color: var(--aef-green-mid); color: #fff;
}
.aef-p-line { flex: 1; height: 2px; background: var(--aef-border); border-radius: 2px; transition: background .3s; }
.aef-p-line.aef-done { background: var(--aef-green-mid); }

/* ── Sections / steps ──────────────────────────────────────────── */
.aef-section { display: none; }
.aef-section.aef-active { display: block; animation: aef-fade .3s ease; }
@keyframes aef-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.aef-section-title {
  display: flex; align-items: center; gap: .6rem;
  font-size: .76rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--aef-muted);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--aef-border);
}
.aef-section-title svg { width: 14px; height: 14px; }
.aef-divider { height: 1px; background: var(--aef-border); margin: 1.5rem 0; }

/* ── Rows + groups ─────────────────────────────────────────────── */
.aef-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.aef-row.aef-full { grid-template-columns: 1fr; }
.aef-group { display: flex; flex-direction: column; gap: .45rem; }
.aef-group label {
  font-size: .82rem; font-weight: 600; color: var(--aef-green-deep);
  letter-spacing: .02em;
}
.aef-req { color: var(--aef-gold); margin-left: 2px; }
.aef-opt { color: var(--aef-muted); font-weight: 400; font-size: .75rem; margin-left: 4px; }

/* ── Inputs ────────────────────────────────────────────────────── */
.aef-wrapper input[type="text"],
.aef-wrapper input[type="email"],
.aef-wrapper input[type="tel"],
.aef-wrapper textarea,
.aef-wrapper select {
  width: 100%;
  padding: .78rem 1rem;
  border: 1.5px solid var(--aef-border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: .92rem;
  color: var(--aef-text);
  background: var(--aef-sand);
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
  -webkit-appearance: none; appearance: none;
}
.aef-wrapper input:focus, .aef-wrapper textarea:focus, .aef-wrapper select:focus {
  border-color: var(--aef-green-mid);
  background: var(--aef-white);
  box-shadow: 0 0 0 3px rgba(26,92,68,.1);
}
.aef-wrapper input.aef-error-input,
.aef-wrapper textarea.aef-error-input,
.aef-wrapper select.aef-error-input {
  border-color: var(--aef-error);
  box-shadow: 0 0 0 3px rgba(192,57,43,.08);
}
.aef-wrapper textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.aef-error { font-size: .76rem; color: var(--aef-error); display: none; }
.aef-error.aef-show { display: block; }
.aef-counter { font-size: .76rem; color: var(--aef-muted); text-align: right; margin-top: .25rem; }
.aef-counter.aef-warn { color: #C4873A; }
.aef-counter.aef-full { color: var(--aef-error); }

/* Select wrapper */
.aef-select-wrap { position: relative; }
.aef-select-wrap svg {
  position: absolute; right: .9rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--aef-muted);
  pointer-events: none;
}
.aef-select-wrap select { padding-right: 2.5rem; cursor: pointer; }

/* ── Choices ───────────────────────────────────────────────────── */
.aef-choices { display: flex; flex-direction: column; gap: .6rem; }
.aef-choices.aef-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.aef-choices.aef-grid.aef-grid-3 { grid-template-columns: repeat(3, 1fr); }
.aef-choice { position: relative; cursor: pointer; }
.aef-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.aef-choice-label {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .9rem 1rem;
  border: 1.5px solid var(--aef-border);
  border-radius: 10px;
  background: var(--aef-sand);
  cursor: pointer;
  transition: all .2s;
  height: 100%;
}
.aef-choice-label:hover { border-color: var(--aef-green-mid); }
.aef-choice input:checked + .aef-choice-label {
  border-color: var(--aef-green-mid);
  background: var(--aef-green-soft);
  box-shadow: 0 0 0 3px rgba(26,92,68,.08);
}
.aef-choice-text { display: flex; flex-direction: column; gap: .15rem; }
.aef-choice-text strong { font-size: .85rem; font-weight: 600; color: var(--aef-green-deep); line-height: 1.3; }
.aef-choice-text small  { font-size: .74rem; color: var(--aef-muted); line-height: 1.4; }

/* Budget cards */
.aef-budget .aef-choice-label { flex-direction: column; align-items: center; text-align: center; padding: .85rem .5rem; }
.aef-budget-amount { font-size: .9rem; font-weight: 700; color: var(--aef-green-deep); }
.aef-budget-desc   { font-size: .72rem; color: var(--aef-muted); }

/* ── Checkboxes ────────────────────────────────────────────────── */
.aef-checks { display: flex; flex-direction: column; gap: .5rem; }
.aef-check {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .8rem 1rem;
  border: 1.5px solid var(--aef-border);
  border-radius: 10px;
  background: var(--aef-sand);
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.aef-check:hover { border-color: var(--aef-green-mid); }
.aef-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.aef-check-box {
  width: 20px; height: 20px; min-width: 20px;
  border: 2px solid var(--aef-border-strong);
  border-radius: 5px;
  background: var(--aef-white);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.aef-check-box svg { width: 12px; height: 12px; color: var(--aef-white); opacity: 0; transition: opacity .15s; }
.aef-check input:checked ~ .aef-check-box { background: var(--aef-green-mid); border-color: var(--aef-green-mid); }
.aef-check input:checked ~ .aef-check-box svg { opacity: 1; }
.aef-check:has(input:checked) { border-color: var(--aef-green-mid); background: var(--aef-green-soft); }
.aef-check-content strong { display: block; font-size: .88rem; font-weight: 600; color: var(--aef-green-deep); margin-bottom: .15rem; }
.aef-check-content small  { display: block; font-size: .78rem; color: var(--aef-muted); line-height: 1.4; }
.aef-check.aef-rgpd { background: var(--aef-white); }

/* Honeypot - visible to bots, hidden to humans */
.aef-honeypot { position: absolute !important; left: -9999px !important; opacity: 0 !important; pointer-events: none; }

/* ── Navigation buttons ────────────────────────────────────────── */
.aef-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--aef-border); gap: 1rem;
}
.aef-nav.aef-single { justify-content: flex-end; }
.aef-btn-back, .aef-btn-next, .aef-btn-submit {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  transition: all .2s; border: none;
}
.aef-btn-back {
  background: none; border: 1.5px solid var(--aef-border);
  color: var(--aef-muted);
  font-size: .88rem; font-weight: 600;
  padding: .65rem 1.25rem; border-radius: 8px;
}
.aef-btn-back:hover { border-color: var(--aef-green-mid); color: var(--aef-green-deep); }
.aef-btn-back svg { width: 15px; height: 15px; }

.aef-btn-next {
  background: var(--aef-green-deep); color: var(--aef-white);
  font-size: .9rem; font-weight: 600;
  padding: .75rem 1.75rem; border-radius: 8px;
}
.aef-btn-next:hover { background: var(--aef-green-mid); transform: translateY(-1px); }
.aef-btn-next:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.aef-btn-next svg { width: 15px; height: 15px; }

.aef-btn-submit {
  background: var(--aef-gold); color: var(--aef-green-deep);
  font-size: .95rem; font-weight: 700;
  padding: .85rem 2rem; border-radius: 10px;
  box-shadow: 0 4px 16px rgba(245,166,35,.3);
}
.aef-btn-submit:hover { background: #e09510; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,166,35,.4); }
.aef-btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.aef-btn-submit svg { width: 16px; height: 16px; }

/* ── Recap (devis) ─────────────────────────────────────────────── */
.aef-recap-intro {
  display: flex; align-items: center; gap: .85rem;
  padding: 1rem 1.25rem;
  background: var(--aef-green-soft);
  border-left: 3px solid var(--aef-green-mid);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
.aef-recap-intro svg { width: 22px; height: 22px; color: var(--aef-green-mid); min-width: 22px; }
.aef-recap-intro p { font-size: .88rem; color: var(--aef-green-deep); line-height: 1.5; margin: 0; }
.aef-recap-card {
  background: var(--aef-sand); border-radius: 12px;
  border: 1px solid var(--aef-border);
  padding: 1.25rem 1.4rem;
  margin-bottom: .85rem;
}
.aef-recap-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .85rem; padding-bottom: .65rem;
  border-bottom: 1px solid var(--aef-border);
}
.aef-recap-header h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem; color: var(--aef-green-deep);
  display: flex; align-items: center; gap: .5rem;
  margin: 0;
}
.aef-recap-header h4 svg { width: 16px; height: 16px; color: var(--aef-gold); }
.aef-recap-edit {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--aef-white); border: 1px solid var(--aef-border);
  color: var(--aef-green-mid);
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem; font-weight: 600;
  padding: .4rem .85rem; border-radius: 6px;
  cursor: pointer; transition: all .2s;
}
.aef-recap-edit:hover { background: var(--aef-green-mid); color: var(--aef-white); border-color: var(--aef-green-mid); }
.aef-recap-edit svg { width: 12px; height: 12px; }
.aef-recap-list { display: flex; flex-direction: column; gap: .5rem; }
.aef-recap-line {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; padding: .35rem 0;
  font-size: .85rem;
}
.aef-recap-line span { color: var(--aef-muted); }
.aef-recap-line strong { color: var(--aef-green-deep); font-weight: 600; text-align: right; }
.aef-recap-msg { max-width: 60%; font-weight: 400 !important; font-style: italic; color: var(--aef-muted) !important; }

/* ── Success ───────────────────────────────────────────────────── */
.aef-success { display: none; text-align: center; padding: 2.5rem 1rem; }
.aef-success.aef-show { display: block; animation: aef-fade .4s ease; }
.aef-success-icon {
  width: 80px; height: 80px;
  background: var(--aef-green-soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  animation: aef-pop .5s ease;
}
@keyframes aef-pop {
  0%   { transform: scale(.5); opacity: 0; }
  60%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
.aef-success-icon svg { width: 38px; height: 38px; color: var(--aef-green-mid); }
.aef-success h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem; color: var(--aef-green-deep);
  margin: 0 0 .6rem;
}
.aef-success p { font-size: .95rem; color: var(--aef-muted); max-width: 380px; margin: 0 auto; line-height: 1.6; }

/* ── Inline mode (newsletter) ─────────────────────────────────── */
.aef-mode-inline { margin: 0; max-width: 480px; }
.aef-form.aef-inline { display: flex; flex-direction: column; gap: .5rem; }
.aef-inline-row { display: flex; gap: .5rem; }
.aef-inline-row input { flex: 1; }
.aef-inline-msg { font-size: .8rem; color: var(--aef-green-mid); min-height: 1em; }
.aef-inline-msg.aef-error-msg { color: var(--aef-error); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .aef-wrapper.aef-with-sidebar { grid-template-columns: 1fr; }
  .aef-sidebar { order: 2; }
  .aef-card { order: 1; }
}
@media (max-width: 600px) {
  .aef-card { padding: 1.5rem 1.25rem; }
  .aef-row { grid-template-columns: 1fr; }
  .aef-choices.aef-grid, .aef-choices.aef-grid.aef-grid-3 { grid-template-columns: 1fr; }
  .aef-progress-step span { display: none; }
  .aef-nav { flex-wrap: wrap; }
  .aef-nav .aef-btn-back, .aef-nav .aef-btn-next, .aef-nav .aef-btn-submit { flex: 1; justify-content: center; }
  .aef-inline-row { flex-direction: column; }
}
