/* =============================================================
   estimation-v2.css  —  ILEHYA · Page d'estimation (v2)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,600;0,700;1,400&family=DM+Sans:wght@400;500;600&display=swap');

/* ── Variables ───────────────────────────────────────────────── */
:root {
  --navy:        #0b3351;
  --blue:        #3454d1;
  --sky:         #009fff;
  --green:       #2a7d4f;
  --green-hover: #1e6b3e;
  --green-tint:  #eaf4ef;
  --text:        #1c3452;
  --muted:       #7a8fa6;
  --border:      #dce8f5;
  --bg-light:    #f2f6fb;
  --white:       #ffffff;
  --shadow-card: 0 24px 64px rgba(11,51,81,.18), 0 4px 16px rgba(11,51,81,.10);
  --radius-lg:   18px;
  --radius-sm:   10px;
  --ease:        cubic-bezier(.4,0,.2,1);
}

/* ═══════════════════════════════════════════════════════════════
   HERO — Image plein-écran + overlay + carte flottante
   ═══════════════════════════════════════════════════════════════ */
.est-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--navy);
  overflow: hidden;
}

/* Image de fond */
.est-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('/images/app/estimation-biens-ilehya.jpg');
  background-size: cover;
  background-position: center 30%;
  opacity: .38;
}

/* Overlay gradient diagonal */
.est-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    rgba(11,51,81,.95)  0%,
    rgba(11,51,81,.75) 45%,
    rgba(52,84,209,.30) 100%
  );
  z-index: 1;
}

.est-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 5rem 0 4rem;
}

/* ── Headline gauche ─────────────────────────────────────────── */
.est-hero__headline {
  color: var(--white);
  padding-right: 2rem;
}

.est-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7ecfff;
  margin-bottom: 1.5rem;
}

.est-hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: #7ecfff;
  border-radius: 2px;
}

.est-hero__h1 {
  font-family: 'Lora', serif;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.est-hero__h1 em {
  font-style: italic;
  color: #7ecfff;
}

.est-hero__sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,.70);
  max-width: 400px;
}

/* Indicateurs d'étapes */
.est-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 2.5rem;
}

.est-step-dot {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
}

.est-step-dot__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 600;
  flex-shrink: 0;
}

.est-step-dot--active {
  color: var(--white);
}

.est-step-dot--active .est-step-dot__num {
  background: var(--green);
  border-color: var(--green);
}

.est-step-connector {
  width: 36px;
  height: 1.5px;
  background: rgba(255,255,255,.18);
  margin: 0 .5rem;
}

/* ── Carte formulaire ────────────────────────────────────────── */
.est-form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Header de la carte */
.est-form-card__header {
  background: linear-gradient(135deg, var(--navy) 0%, #1a4d7a 100%);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.est-form-card__header-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7ecfff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.est-form-card__header-text h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 .15rem;
}

.est-form-card__header-text p {
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem;
  color: rgba(255,255,255,.58);
  margin: 0;
}

/* Body de la carte */
.est-form-card__body {
  padding: 2rem;
}

/* ── Champ Arrondissement ────────────────────────────────────── */
.est-field-group {
  margin-bottom: 1.75rem;
}

.est-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .6rem;
}

.est-label i {
  color: var(--blue);
  font-size: .85rem;
}

.est-input-wrap {
  position: relative;
}

#autoComplete {
  width: 100%;
  height: 3.2rem;
  padding: 0 1.2rem 0 3rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  color: var(--text);
  background: var(--bg-light);
  outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s;
  box-sizing: border-box;
}

#autoComplete::placeholder { color: var(--muted); }

#autoComplete:focus {
  background: var(--white);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(52,84,209,.12);
}

.est-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: .95rem;
  transition: color .2s;
}

#autoComplete:focus ~ .est-input-icon { color: var(--blue); }

/* Dropdown autocomplete (implementation maison en JS natif, sans
   dependance au widget "menu" de jQuery UI). Positionnee dynamiquement en
   JS et rattachee au <body> (comme le faisait jQuery UI par defaut) pour
   echapper a l'overflow:hidden de .est-form-card (coins arrondis). */
.ui-autocomplete {
  position: absolute;
  margin: 0;
  padding: .4rem 0;
  list-style: none;
  background: var(--white, #fff);
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 12px 32px rgba(11,51,81,.14) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: .9rem !important;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
  z-index: 9999;
}

.ui-autocomplete[hidden] { display: none; }

.ui-menu-item-wrapper {
  padding: .7rem 1.1rem !important;
  color: var(--text) !important;
  cursor: pointer;
}

.ui-menu-item-wrapper.ui-state-active,
.ui-menu-item-wrapper:hover {
  background: var(--bg-light) !important;
  color: var(--navy) !important;
  border: none !important;
  font-weight: 500;
}

/* ── Radio cards ─────────────────────────────────────────────── */
.est-type-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
}

.est-type-label i { color: var(--blue); font-size: .85rem; }

#typeBiens {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}

.form-check {
  width: 100% !important;
  height: auto !important;
}

.form-check-input { display: none !important; }

.form-check-label {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center;
  gap: .5rem;
  padding: 1.4rem 1rem 1.2rem !important;
  border: 2px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--bg-light) !important;
  cursor: pointer;
  transition: all .22s var(--ease);
  height: auto !important;
  min-height: 120px;
  position: relative;
  overflow: hidden;
}

.form-check-label::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(52,84,209,.06), transparent);
  opacity: 0;
  transition: opacity .22s var(--ease);
}

.form-check-label:hover {
  border-color: var(--blue) !important;
  background: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(52,84,209,.12);
}

.form-check-label:hover::after { opacity: 1; }

.form-check input:checked + .form-check-label {
  border-color: var(--green) !important;
  background: var(--green-tint) !important;
  box-shadow: 0 4px 16px rgba(42,125,79,.15) !important;
}

/* Checkmark sur la carte sélectionnée */
.form-check input:checked + .form-check-label::before {
  content: '✓';
  position: absolute;
  top: .5rem;
  right: .65rem;
  font-size: .7rem;
  font-weight: 700;
  color: var(--white);
  background: var(--green);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 18px;
  text-align: center;
}

.input-radio-cards__card__label__icon { margin: 0 !important; }

.input-radio-cards__card__label__icon img {
  width: 2.6rem !important;
  height: 2.6rem !important;
  margin-bottom: 0 !important;
  transition: transform .22s var(--ease);
}

.form-check-label:hover .input-radio-cards__card__label__icon img {
  transform: scale(1.08);
}

.input-radio-cards__card__label__text {
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.form-check input:checked + .form-check-label .input-radio-cards__card__label__text {
  color: var(--green);
}

/* ── Bouton submit ───────────────────────────────────────────── */
.est-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  padding: .95rem 1.5rem;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-hover) 100%);
  color: var(--white) !important;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .25s var(--ease);
  box-shadow: 0 4px 16px rgba(42,125,79,.32);
  margin-top: 1.75rem;
  letter-spacing: .01em;
}

.est-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(42,125,79,.42);
}

.est-submit-btn svg {
  transition: transform .25s var(--ease);
  flex-shrink: 0;
}

.est-submit-btn:hover svg { transform: translateX(5px); }

/* Note de confidentialité */
.est-privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  color: var(--muted);
  margin-top: .9rem;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION JUSTE PRIX
   ═══════════════════════════════════════════════════════════════ */
.est-info {
  padding: 6rem 0;
  background: var(--white);
}

.est-section-tag {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-tint);
  padding: .3rem .9rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.est-section-title {
  font-family: 'Lora', serif;
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.est-section-lead {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 600px;
}

.est-accent-bar {
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  margin: 1.5rem 0;
}

/* ── Cards perspective ───────────────────────────────────────── */
.est-persp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}

.est-persp-card {
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  transition: all .25s var(--ease);
  position: relative;
  overflow: hidden;
}

.est-persp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}

.est-persp-card--vendeur::before { background: linear-gradient(90deg, var(--navy), var(--blue)); }
.est-persp-card--acheteur::before { background: linear-gradient(90deg, var(--blue), var(--sky)); }

.est-persp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(11,51,81,.10);
  border-color: transparent;
}

.est-persp-card__icon {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
  margin-bottom: 1.1rem;
}

.est-persp-card__title {
  font-family: 'Lora', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .7rem;
}

.est-persp-card__text {
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  line-height: 1.72;
  color: var(--text);
}

/* ── Bloc CTA final ──────────────────────────────────────────── */
.est-final {
  margin-top: 4rem;
  background: linear-gradient(135deg, var(--navy) 0%, #1b4a78 60%, var(--blue) 100%);
  border-radius: var(--radius-lg);
  padding: 3.5rem 3rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  position: relative;
  overflow: hidden;
}

.est-final::after {
  content: '';
  position: absolute;
  right: -80px; bottom: -80px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}

.est-final__icon-wrap {
  flex-shrink: 0;
  width: 72px; height: 72px;
  border-radius: 16px;
  background: rgba(255,255,255,.10);
  display: flex; align-items: center; justify-content: center;
}

.est-final__icon-wrap img {
  width: 42px; height: 42px;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(.85);
}

.est-final__content { flex: 1; }

.est-final__title {
  font-family: 'Lora', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.35;
  margin-bottom: .75rem;
}

.est-final__text {
  font-family: 'DM Sans', sans-serif;
  font-size: .92rem;
  line-height: 1.72;
  color: rgba(255,255,255,.72);
  margin-bottom: 0;
}

.est-final__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: var(--white);
  color: var(--navy) !important;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  padding: .85rem 1.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all .25s var(--ease);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  white-space: nowrap;
}

.est-final__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
  color: var(--navy) !important;
}

.est-final__btn svg { transition: transform .25s var(--ease); }
.est-final__btn:hover svg { transform: translateX(4px); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
  .est-hero__h1 { font-size: 1.8rem; }
  .est-final { flex-direction: column; gap: 1.75rem; text-align: center; }
  .est-final::after { display: none; }
}

@media (max-width: 767px) {
  .est-hero__inner { padding: 3rem 0; }
  .est-hero__headline { margin-bottom: 2.5rem; }
  .est-form-card__body { padding: 1.5rem; }
  .est-persp-grid { grid-template-columns: 1fr; }
  .est-info { padding: 4rem 0; }
}
