/* =========================================================
   ESTIMATEUR ÉLYA — styles spécifiques
   Réutilise les tokens de styles.css (couleurs, ombres, typo).
   ========================================================= */

/* ===================== HERO ===================== */
.est-hero { padding: 56px 0 28px; text-align: center; }
.est-hero-inner { max-width: 720px; margin: 0 auto; }
.est-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02; margin: 18px 0 16px;
}
.est-hero-sub { font-size: 1.12rem; color: var(--muted); max-width: 600px; margin: 0 auto 28px; }

/* ===================== EXPLICATION ===================== */
.est-explain { padding: 8px 0 24px; }
.est-explain p { text-align: center; font-size: 1.05rem; color: var(--ink-soft); }
.est-explain strong { color: var(--ink); }

/* ===================== CONFIGURATEUR ===================== */
.est-config { padding: 24px 0 80px; }
.config-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 32px; align-items: start; }

.config-main { display: flex; flex-direction: column; gap: 22px; }
.config-step {
  background: rgba(255,255,255,0.7); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 26px 28px; box-shadow: var(--shadow-sm);
}
.config-step legend {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-size: 1.35rem; color: var(--ink); padding: 0; margin-bottom: 4px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent-grad); color: #fff;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 700; flex-shrink: 0;
}
.step-help { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
/* Encadré d'information (ex. connexion incluse) */
.step-note {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 0.86rem; color: var(--ink-soft); line-height: 1.45;
  background: rgba(109,92,246,0.06); border: 1px solid rgba(109,92,246,0.18);
  border-radius: 12px; padding: 12px 14px; margin: -6px 0 18px;
}
.step-note::before { content: '✓'; color: var(--violet-600); font-weight: 700; }
/* Badge "Inclus" */
.opt-price.opt-included {
  background: rgba(60,180,120,0.12); color: #1f9d63; border: 1px solid rgba(60,180,120,0.3);
  padding: 2px 9px; border-radius: 999px; font-size: 0.78rem;
}

/* ---- Cartes de sélection (radio / checkbox) ---- */
.opt-grid { display: grid; gap: 14px; }
.opt-grid-2 { grid-template-columns: repeat(2, 1fr); }
.opt-grid-3 { grid-template-columns: repeat(3, 1fr); }

.opt-card { position: relative; cursor: pointer; display: block; }
.opt-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt-inner {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 18px; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.opt-card:hover .opt-inner { transform: translateY(-3px); box-shadow: var(--shadow); }
.opt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.opt-head strong { font-size: 1.02rem; }
.opt-price { font-size: 0.85rem; font-weight: 600; color: var(--violet-600); white-space: nowrap; }
.opt-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.45; }
.opt-card-sm .opt-inner { padding: 14px 16px; }

/* État sélectionné */
.opt-card input:checked + .opt-inner {
  border-color: var(--violet); background: linear-gradient(180deg, #f7f6ff, #fff);
  box-shadow: 0 0 0 3px rgba(109,92,246,0.14), var(--shadow);
}
.opt-card input:focus-visible + .opt-inner { outline: 2px solid var(--violet); outline-offset: 2px; }
/* Pastille de sélection */
.opt-inner::after {
  content: ''; position: absolute; top: 14px; right: 14px; width: 18px; height: 18px;
  border-radius: 50%; border: 2px solid var(--line); background: #fff; transition: .2s; opacity: 0;
}
.opt-head { padding-right: 26px; }
.opt-card input:checked + .opt-inner::after {
  opacity: 1; border-color: var(--violet);
  background: var(--violet) radial-gradient(circle, #fff 32%, transparent 36%);
}
.opt-check input:checked + .opt-inner::after { border-radius: 6px; }

/* Carte large (perso visuelle) */
.opt-card-wide .opt-inner { padding: 18px 18px 20px; }

/* ===================== CARTES D'OFFRE (ÉTAPE 1) — en lignes ===================== */
.offer-grid { display: flex; flex-direction: column; gap: 14px; }
.offer-card { position: relative; display: block; min-width: 0; }
.offer-card > input { position: absolute; opacity: 0; width: 0; height: 0; }
.offer-inner {
  display: flex; flex-direction: row; align-items: center; gap: 24px; cursor: pointer; min-width: 0;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}
.offer-card:hover .offer-inner { transform: translateY(-2px); box-shadow: var(--shadow); }
.offer-card > input:checked + .offer-inner {
  border-color: var(--violet); background: linear-gradient(180deg, #f7f6ff, #fff);
  box-shadow: 0 0 0 3px rgba(109,92,246,0.16), var(--shadow);
}
.offer-card > input:focus-visible + .offer-inner { outline: 2px solid var(--violet); outline-offset: 2px; }

.offer-featured .offer-inner { border-color: rgba(109,92,246,0.4); }
.offer-flag {
  position: absolute; top: -10px; left: 24px; z-index: 1;
  background: var(--accent-grad); color: #fff; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(109,92,246,0.35);
}

/* Zone gauche : titre + prix + description */
.offer-head { flex: 0 1 224px; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.offer-top { display: flex; flex-direction: column; gap: 4px; }
.offer-name { font-family: var(--serif); font-size: 1.28rem; color: var(--ink); line-height: 1.1; }
.offer-price { display: flex; align-items: baseline; gap: 6px; line-height: 1; }
.offer-price strong { font-family: var(--serif); font-size: 1.8rem; font-weight: 500; color: var(--violet-600); }
.offer-price-unit { font-size: 0.78rem; color: var(--muted); }
.offer-desc { font-size: 0.84rem; color: var(--muted); line-height: 1.4; }

/* Zone centrale : inclus en liste (argument de vente, toujours visibles) */
.offer-feats {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px;
  justify-content: center; padding-left: 22px; border-left: 1px solid var(--line);
}
.offer-feat {
  position: relative; padding-left: 20px; font-size: 0.82rem; color: var(--ink-soft); line-height: 1.3;
}
.offer-feat::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: var(--violet-600); font-weight: 700; font-size: 0.8rem;
}
.offer-feat-head {
  grid-column: 1 / -1; padding-left: 0; font-size: 0.76rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.offer-feat-head::before { content: ''; }

/* Zone droite : CTA */
.offer-cta {
  flex: 0 0 auto; align-self: center; width: 140px; text-align: center;
  font-size: 0.86rem; font-weight: 600; color: var(--violet-600);
  border: 1.5px solid #dcdcf6; border-radius: 12px; padding: 11px 14px; transition: .2s ease;
}
.offer-card:hover .offer-cta { background: var(--bg-soft); }
.offer-card > input:checked + .offer-inner .offer-cta { background: var(--accent-grad); color: #fff; border-color: transparent; }

/* ===================== PILLS NOMBRE DE JOURS (ÉTAPE 5) ===================== */
.days-pills { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 4px; }
.day-pill { position: relative; cursor: pointer; }
.day-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.day-pill span {
  display: flex; align-items: center; justify-content: center; white-space: nowrap;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 12px; font-size: 0.92rem; font-weight: 600; color: var(--ink-soft);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.day-pill:hover span { border-color: #cfd0ec; box-shadow: var(--shadow-sm); }
.day-pill input:checked + span {
  background: var(--accent-grad); border-color: transparent; color: #fff;
  box-shadow: 0 8px 20px rgba(109,92,246,0.28);
}
.day-pill input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
/* Info importante : remise -50 % (encadré bleu, entre "choix unique" et les pills) */
.step-note[data-note="days"] { margin: -6px 0 16px; }
/* Info secondaire : ">5 jours sur devis" (texte discret, sous les pills, sans encadré) */
.days-fineprint { margin-top: 12px; font-size: 0.78rem; color: var(--muted); line-height: 1.4; }

/* Sous-choix Hologram */
.sub-choice { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.sub-choice[hidden] { display: none; }
.sub-choice-label { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 12px; }

/* ---- Liste d'options (checkbox lignes) ---- */
.check-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 22px; }
.check-row {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.check-row:hover { box-shadow: var(--shadow-sm); }
.check-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-mark {
  width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line);
  flex-shrink: 0; transition: .2s; position: relative;
}
.check-mark::after {
  content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.75rem; opacity: 0; transition: .15s;
}
.check-row input:checked ~ .check-mark { background: var(--violet); border-color: var(--violet); }
.check-row input:checked ~ .check-mark::after { opacity: 1; }
.check-row input:checked ~ .check-text { color: var(--ink); font-weight: 600; }
.check-row:has(input:checked) { border-color: var(--violet); }
.check-row input:focus-visible ~ .check-mark { outline: 2px solid var(--violet); outline-offset: 2px; }
.check-text { font-size: 0.92rem; color: var(--ink-soft); flex: 1; }
.check-row .opt-price { font-size: 0.8rem; }

/* ---- Champs (selects / inputs) ---- */
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.field select, .field input, .field textarea {
  font-family: var(--sans); font-size: 0.95rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
  width: 100%; transition: border-color .2s ease, box-shadow .2s ease;
}
.field select:focus, .field input:focus, .field textarea:focus {
  outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109,92,246,0.12);
}
.field textarea { resize: vertical; }

/* ===================== RÉSUMÉ STICKY ===================== */
.config-summary { position: sticky; top: 96px; }
.summary-card {
  background: rgba(255,255,255,0.8); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 26px;
}
.summary-title { font-size: 1.3rem; margin-bottom: 16px; }
.summary-list { list-style: none; margin-bottom: 20px; }
.summary-list li {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.summary-list li span { color: var(--muted); font-size: 0.78rem; }
.summary-list li strong { font-weight: 600; color: var(--ink); font-size: 0.92rem; line-height: 1.35; overflow-wrap: break-word; }

/* Sous-totaux (prestation / options) */
.summary-subtotals { list-style: none; margin-bottom: 16px; }
.summary-subtotals li {
  display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  padding: 9px 0; font-size: 0.9rem; color: var(--ink-soft);
}
.summary-subtotals li span { color: var(--ink-soft); }
.summary-subtotals li span em { color: var(--muted); font-style: normal; font-size: 0.78rem; }
.summary-subtotals li strong { font-weight: 600; color: var(--ink); white-space: nowrap; }

.summary-price {
  background: linear-gradient(135deg, #4a3fb0 0%, #5b8def 100%); color: #fff;
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px;
  box-shadow: 0 14px 30px rgba(91,73,238,0.28);
}
.price-label { display: block; font-size: 0.8rem; opacity: 0.9; margin-bottom: 4px; }
.price-value { font-family: var(--serif); font-size: 2.2rem; line-height: 1; font-weight: 500; }
.price-cur { font-size: 1.4rem; }
.price-value.bump { animation: pricePulse .45s ease; }
@keyframes pricePulse { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }

.price-disclaimer { font-size: 0.74rem; color: var(--muted); margin-top: 14px; line-height: 1.45; }

/* ===================== MODALE DEVIS ===================== */
.devis-modal {
  position: fixed; inset: 0; z-index: 210; background: rgba(20,22,40,0.5);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.devis-modal[hidden] { display: none; }
.devis-card {
  position: relative; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 600px; max-height: 92vh; overflow: auto; padding: 34px;
}
.devis-card h2 { font-size: 1.6rem; margin-bottom: 8px; }
.devis-intro { color: var(--muted); font-size: 0.92rem; margin-bottom: 22px; }
.devis-close {
  position: absolute; top: 16px; right: 18px; background: none; border: none;
  font-size: 1.8rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px;
}
.devis-close:hover { color: var(--ink); }
.devis-form { display: flex; flex-direction: column; gap: 16px; }
.devis-form #recapField { font-size: 0.85rem; color: var(--ink-soft); background: var(--bg-soft); line-height: 1.5; }
.devis-success {
  text-align: center; color: var(--violet-600); font-weight: 600; font-size: 0.95rem;
  background: rgba(109,92,246,0.08); border-radius: 12px; padding: 14px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
  .config-grid { grid-template-columns: 1fr; gap: 24px; }
  .config-summary { position: static; }
}
/* Offres : la zone gauche se resserre sur écran intermédiaire */
@media (max-width: 920px) {
  .offer-head { flex-basis: 210px; max-width: 210px; }
  .offer-inner { gap: 20px; }
  .offer-feats { padding-left: 18px; gap: 7px 16px; }
}

@media (max-width: 720px) {
  .opt-grid-2, .opt-grid-3, .check-list, .field-grid { grid-template-columns: 1fr; }
  .est-config { padding: 16px 0 60px; }
  .config-step { padding: 20px; }
  .devis-card { padding: 24px; }
  .days-pills { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .day-pill span { padding: 12px 8px; }

  /* Offres : chaque ligne repasse en colonne empilée */
  .offer-inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .offer-head { flex-basis: auto; max-width: none; }
  .offer-feats {
    grid-template-columns: 1fr; gap: 7px;
    padding-left: 0; border-left: none; padding-top: 14px; border-top: 1px solid var(--line);
  }
  .offer-cta { width: 100%; }

  /* Récapitulatif complet, en flux normal sous le configurateur (pas de barre flottante) */
  .config-summary { position: static; }
  .summary-card { padding: 22px; }
}
