/* ============================================================================
   Renov.lu — Widgets embarqués dans Wortimmo  (renov.css)
   Préfixe .rv- pour ne JAMAIS entrer en conflit avec le CSS de Wortimmo.
   ========================================================================== */
.rv-scope, [class^="rv-"], [class*=" rv-"] {
  --rv-brand:#0B6E4F; --rv-brand-dark:#085440; --rv-brand-bg:#E7F5F0;
  --rv-brand-border:#BCE3D6; --rv-brand-mid:#5DCAA5;
  --rv-ink:#1A1C21; --rv-muted:#667085; --rv-faint:#98A2B3;
  --rv-bg:#F4F5F7; --rv-border:#E4E7EC; --rv-border-soft:#F0F1F4;
}
.rv-sw1, .rv-rd, .rv-badge { font-family:'Inter', -apple-system, Segoe UI, Roboto, sans-serif; -webkit-font-smoothing:antialiased; box-sizing:border-box; }
.rv-sw1 *, .rv-rd *, .rv-badge * { box-sizing:border-box; }
.rv-sw1 svg, .rv-rd svg, .rv-badge svg { display:block; }

/* ─── SIDEBAR — bandeau compact (maison) ─────────────────────────────────── */
.rv-sw1 {
  display:flex; align-items:center; gap:13px; text-decoration:none;
  background:linear-gradient(135deg, var(--rv-brand-bg), #F0FAF6);
  border:1px solid var(--rv-brand-border); border-radius:13px;
  padding:13px 15px; cursor:pointer; transition:box-shadow .18s, transform .18s;
}
.rv-sw1:hover { box-shadow:0 6px 18px rgba(11,110,79,.15); transform:translateY(-1px); }
.rv-sw1-letter {
  width:42px; height:42px; border-radius:11px; flex-shrink:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
}
.rv-sw1-letter .l { font-size:19px; font-weight:800; line-height:1; }
.rv-sw1-letter .micro { font-size:7px; font-weight:700; letter-spacing:.04em; opacity:.75; margin-top:1px; }
.rv-sw1-txt { flex:1; min-width:0; }
.rv-sw1-txt .top { font-size:13px; font-weight:700; color:var(--rv-brand-dark); line-height:1.25; }
.rv-sw1-txt .bot { font-size:12px; color:var(--rv-brand); margin-top:1px; }
.rv-sw1-chev { color:var(--rv-brand); flex-shrink:0; opacity:.55; width:18px; height:18px; }

/* sidebar appartement — jauge confort à la place de la lettre */
.rv-sw1-apt { background:linear-gradient(135deg,#EAF6F1,#F1FBF7); }
.rv-sw1-gauge {
  width:42px; height:42px; border-radius:11px; flex-shrink:0; padding:6px;
  background:#fff; border:1px solid var(--rv-brand-border);
  display:flex; align-items:flex-end;
}
.rv-sw1-gauge span {
  display:block; width:100%; border-radius:4px;
  background:linear-gradient(180deg, var(--rv-brand-mid), var(--rv-brand));
  min-height:18%;
}

/* ─── WIDGET DÉTAIL RICHE (commun) ───────────────────────────────────────── */
.rv-rd {
  background:#fff; border:1px solid var(--rv-brand-border); border-radius:18px;
  overflow:hidden; box-shadow:0 4px 24px rgba(11,110,79,.06);
}
.rv-rd-head {
  display:flex; align-items:center; gap:12px; padding:18px 22px;
  background:var(--rv-brand-bg); border-bottom:1px solid var(--rv-brand-border);
}
.rv-rd-head-ico {
  width:38px; height:38px; border-radius:11px; background:var(--rv-brand);
  display:flex; align-items:center; justify-content:center; flex-shrink:0; color:#fff;
}
.rv-rd-head-ico svg { width:20px; height:20px; }
.rv-rd-head-txt { flex:1; }
.rv-rd-head-txt h3 { font-size:16px; font-weight:700; color:var(--rv-brand-dark); line-height:1.25; margin:0; }
.rv-rd-head-txt p { font-size:12.5px; color:var(--rv-brand); margin:2px 0 0; }
.rv-rd-head-badge {
  font-size:10.5px; font-weight:600; color:var(--rv-brand); background:#fff;
  border:1px solid var(--rv-brand-border); padding:4px 9px; border-radius:6px; white-space:nowrap;
}
.rv-rd-body { padding:22px; }

/* parcours classe (maison) */
.rv-journey { display:flex; align-items:center; gap:16px; margin-bottom:22px; }
.rv-state { flex:1; text-align:center; }
.rv-state-lbl { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.05em; color:var(--rv-faint); margin-bottom:8px; }
.rv-letter-lg {
  width:64px; height:64px; border-radius:14px; margin:0 auto;
  display:flex; align-items:center; justify-content:center; font-size:30px; font-weight:700;
}
.rv-letter-lg.current { background:var(--rv-border-soft); color:var(--rv-faint); border:2px dashed #D2D6DD; }
.rv-letter-lg.target { box-shadow:0 6px 18px rgba(161,211,68,.4); }
.rv-state-kwh { font-size:12px; color:var(--rv-muted); margin-top:8px; }
.rv-state-kwh strong { color:var(--rv-ink); font-weight:600; }
.rv-journey-arrow { display:flex; flex-direction:column; align-items:center; gap:4px; color:var(--rv-brand-mid); flex-shrink:0; }
.rv-journey-arrow svg { width:32px; height:32px; }
.rv-journey-arrow span { font-size:10px; font-weight:600; color:var(--rv-brand); text-transform:uppercase; letter-spacing:.05em; }

/* échelle CPE */
.rv-scale { display:flex; gap:2px; margin-bottom:24px; }
.rv-scale-seg { flex:1; height:8px; border-radius:2px; position:relative; }
.rv-scale-seg.rv-mark::after {
  content:''; position:absolute; top:-5px; left:50%; transform:translateX(-50%);
  width:0; height:0; border-left:5px solid transparent; border-right:5px solid transparent; border-top:6px solid var(--rv-ink);
}

/* aides */
.rv-aids { background:var(--rv-bg); border-radius:12px; padding:16px 18px; margin-bottom:20px; }
.rv-aids-head { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:14px; }
.rv-aids-head .k { font-size:13px; font-weight:600; color:var(--rv-ink); }
.rv-aids-head .tot { font-size:22px; font-weight:700; color:var(--rv-brand); letter-spacing:-.5px; }
.rv-aid-row { display:flex; align-items:center; gap:10px; padding:7px 0; font-size:13px; border-bottom:1px solid var(--rv-border-soft); }
.rv-aid-row:last-child { border:none; }
.rv-aid-ico { width:26px; height:26px; border-radius:7px; background:var(--rv-brand-bg); display:flex; align-items:center; justify-content:center; flex-shrink:0; color:var(--rv-brand); }
.rv-aid-ico svg { width:14px; height:14px; }
.rv-aid-name { flex:1; color:var(--rv-muted); }
.rv-aid-val { font-weight:600; color:var(--rv-brand); }

/* metrics */
.rv-metrics { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:22px; }
.rv-metric { background:var(--rv-bg); border-radius:10px; padding:13px 15px; }
.rv-metric .mv { font-size:18px; font-weight:700; letter-spacing:-.3px; }
.rv-metric .mv.green { color:var(--rv-brand); }
.rv-metric .ml { font-size:11.5px; color:var(--rv-muted); margin-top:2px; }

/* CTA */
.rv-cta {
  display:flex; align-items:center; justify-content:center; gap:9px; width:100%;
  background:var(--rv-brand); color:#fff; border:none; border-radius:12px;
  padding:15px; font-size:15px; font-weight:600; cursor:pointer; text-decoration:none; transition:background .18s;
}
.rv-cta:hover { background:var(--rv-brand-dark); }
.rv-cta svg { width:17px; height:17px; flex-shrink:0; }
.rv-cta-sub { text-align:center; font-size:11.5px; color:var(--rv-faint); margin-top:10px; line-height:1.5; }
.rv-rd-foot { padding:13px 22px; background:var(--rv-bg); border-top:1px solid var(--rv-border-soft); font-size:10.5px; color:var(--rv-faint); line-height:1.5; }

/* ─── VARIANTE APPARTEMENT (hero + jauge + split) ────────────────────────── */
.rv-hero { text-align:center; padding:6px 0 18px; }
.rv-hero-num { font-size:30px; font-weight:800; color:var(--rv-brand); letter-spacing:-1px; line-height:1.1; }
.rv-hero-lbl { font-size:13px; color:var(--rv-muted); margin-top:4px; }

.rv-gauge { margin-bottom:22px; }
.rv-gauge-track { display:flex; gap:5px; }
.rv-gauge-seg { flex:1; height:10px; border-radius:3px; background:var(--rv-border); }
.rv-gauge-seg.on:nth-child(1){ background:#F37121; }
.rv-gauge-seg.on:nth-child(2){ background:#F5A623; }
.rv-gauge-seg.on:nth-child(3){ background:#A1D344; }
.rv-gauge-seg.on:nth-child(4){ background:#51B747; }
.rv-gauge-seg.on:nth-child(5){ background:#1D9F4A; }
.rv-gauge-lbls { display:flex; justify-content:space-between; margin-top:7px; font-size:11px; color:var(--rv-faint); font-weight:500; }

.rv-split { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:20px; }
.rv-split-col { border:1px solid var(--rv-border); border-radius:12px; padding:14px; }
.rv-col-you { background:#F4FBF8; border-color:var(--rv-brand-border); }
.rv-col-co  { background:#F5F8FC; border-color:#CFE0F0; }
.rv-split-h { display:flex; align-items:center; gap:7px; font-size:13px; font-weight:700; color:var(--rv-ink); margin-bottom:2px; }
.rv-split-sum { margin-left:auto; font-weight:700; }
.rv-col-you .rv-split-sum { color:var(--rv-brand); }
.rv-col-co  .rv-split-sum { color:#2563A6; }
.rv-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.rv-dot.you { background:var(--rv-brand); }
.rv-dot.co  { background:#2563A6; }
.rv-split-sub { font-size:11px; color:var(--rv-faint); margin-bottom:10px; line-height:1.3; }
.rv-msr-row { display:flex; justify-content:space-between; gap:8px; font-size:12.5px; padding:5px 0; border-top:1px solid rgba(0,0,0,.05); }
.rv-msr-name { color:var(--rv-muted); }
.rv-msr-val { font-weight:600; color:var(--rv-ink); white-space:nowrap; }

/* ─── SIDEBAR — CTA « Estimez votre rénovation » (maison + appartement) ───── */
.rv-side {
  display:flex; align-items:center; gap:12px; text-decoration:none;
  background:linear-gradient(135deg,#E7F5F0,#F2FBF7); border:1px solid var(--rv-brand-border);
  border-radius:12px; padding:12px 14px; transition:box-shadow .18s, transform .18s;
}
.rv-side:hover { box-shadow:0 6px 18px rgba(11,110,79,.15); transform:translateY(-1px); }
.rv-side-ico { width:38px; height:38px; border-radius:10px; background:var(--rv-brand); color:#fff;
  display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.rv-side-ico svg { width:20px; height:20px; }
.rv-side-letter { width:38px; height:38px; border-radius:10px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:19px; font-weight:800; }
.rv-side-txt { flex:1; min-width:0; }
.rv-side-txt .top { font-size:14px; font-weight:700; color:var(--rv-brand-dark); line-height:1.2; }
.rv-side-txt .bot { font-size:12px; color:var(--rv-muted); margin-top:2px; line-height:1.35; }
.rv-side-txt .bot b { color:var(--rv-brand); font-weight:700; }
.rv-side-chev { color:var(--rv-brand); flex-shrink:0; opacity:.55; width:18px; height:18px; }

/* ─── BADGE LISTING — succinct : ↑ + classe cible + aides ─────────────────── */
.rv-badge { text-decoration:none; }
.rv-bdg {
  display:inline-flex; align-items:center; gap:7px; vertical-align:middle;
  background:transparent; border:none; border-radius:8px;
  padding:3px 2px; transition:opacity .15s;
}
.rv-bdg:hover { opacity:.78; }
.rv-bdg:hover .rv-bdg-txt { text-decoration:underline; text-underline-offset:2px; }
.rv-bdg-arrow { color:var(--rv-brand); display:flex; flex-shrink:0; }
.rv-bdg-arrow svg { width:17px; height:17px; }
.rv-bdg-c { width:20px; height:20px; border-radius:5px; display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:800; flex-shrink:0; }
.rv-bdg-txt { font-size:13px; font-weight:600; color:var(--rv-brand-dark); white-space:nowrap; }
.rv-bdg-txt b { font-weight:800; }

/* ligne "dont X € d'aides communales · Commune" (bonus communal, déjà inclus) */
.rv-communal { margin-top:8px; font-size:11.5px; color:var(--rv-brand-dark); background:var(--rv-brand-bg);
  border:1px solid var(--rv-brand-border); border-radius:8px; padding:7px 10px; line-height:1.35; }
.rv-communal b { font-weight:800; }
.rv-hero .rv-communal { display:inline-block; margin:8px auto 0; }

/* note "éq." (appartement) sous l'échelle */
.rv-eqnote { font-size:10.5px; color:var(--rv-faint); line-height:1.45; margin-top:9px; padding-left:2px; }
/* badge "éq. C" du side widget appartement (pilule au lieu d'un carré) */
.rv-side-eq { width:auto !important; min-width:0 !important; padding:0 9px; border-radius:9px;
  font-size:13px; letter-spacing:-.01em; white-space:nowrap; }
/* "éq." DANS la card de la lettre cible (appartement) : empilé au-dessus de la lettre */
.rv-letter-eq { flex-direction:column; line-height:1; gap:1px; }
.rv-eq-mini { font-size:11px; font-weight:800; letter-spacing:.02em; opacity:.82; }
/* badge "éq. C" sur le badge listing appartement (pilule auto au lieu du carré 20px) */
.rv-bdg-eq { width:auto; padding:0 6px; height:20px; font-size:11px; letter-spacing:-.01em; white-space:nowrap; }

/* side widget : deux CTA empilés dans la même carte blanche (aides + simulateur) */
.rv-side-stack { display:flex; flex-direction:column; gap:10px; }
.rv-side-sim { background:linear-gradient(135deg,#EAF6F1,#F4FBF8); }

/* side widget — promo du simulateur (complémentaire au widget aides) */
.rv-sim { display:flex; gap:13px; align-items:flex-start; text-decoration:none;
  background:linear-gradient(135deg,var(--rv-brand-bg) 0%,#fff 70%); border:1px solid var(--rv-brand-border);
  border-radius:16px; padding:15px 16px; transition:box-shadow .15s,transform .15s; }
.rv-sim:hover { box-shadow:0 8px 22px rgba(11,110,79,.12); transform:translateY(-1px); }
.rv-sim-ico { width:40px; height:40px; border-radius:11px; background:var(--rv-brand); color:#fff;
  display:flex; align-items:center; justify-content:center; flex:none; }
.rv-sim-ico svg { width:21px; height:21px; }
.rv-sim-txt { flex:1; min-width:0; }
.rv-sim-t { font-size:14px; font-weight:700; color:var(--rv-brand-dark); line-height:1.2; }
.rv-sim-d { font-size:12px; color:var(--rv-muted); margin-top:4px; line-height:1.45; }
.rv-sim-cta { display:inline-flex; align-items:center; gap:5px; margin-top:11px; font-size:12.5px; font-weight:700;
  color:#fff; background:var(--rv-brand); padding:8px 13px; border-radius:9px; }
.rv-sim-cta svg { width:13px; height:13px; }
.rv-sim-meta { font-size:10.5px; color:var(--rv-faint); margin-top:8px; }

@media (max-width:560px){
  .rv-split, .rv-metrics { grid-template-columns:1fr; }
}
