/* Pages with a URL of their own: /rendement-locatif, /acheter-ou-louer.
   ────────────────────────────────────────────────────────────────────────────
   Written to look like the rest of the site rather than like an article bolted onto it,
   so it borrows the application's own devices instead of inventing new ones:

     · the centred hero with its radial wash, and the same clamped, tight-tracked title
     · the card carrying the hero form's two-layer shadow
     · the stat tile - bg-2, hairline border, small grey label over a large figure
     · justified prose with French hyphenation, exactly as the legal pages set it

   Only the measure is new: a page meant to be read wants about 68 characters a line,
   where the tool pages want width for inputs and tables. */

.art-page{max-width:760px; padding-bottom:80px}

/* ── hero ───────────────────────────────────────────────────────────────────── */
.art-hero{padding:44px 0 4px; text-align:center; position:relative}
.art-hero::before{content:""; position:absolute; inset:-30px 0 auto; height:360px;
  background:radial-gradient(60% 72% at 50% 0%, rgba(31,111,235,.07), transparent 70%);
  pointer-events:none; z-index:-1}
.art-hero h1{font-size:clamp(27px, 4.4vw, 44px); line-height:1.08; margin:0 auto;
  letter-spacing:-.035em; font-weight:680; text-wrap:balance; max-width:19ch}
.art-hero .lede{margin:16px auto 0; max-width:52ch; font-size:17.5px; line-height:1.5;
  color:var(--ink-3); text-wrap:pretty}

/* ── prose ──────────────────────────────────────────────────────────────────── */
/* The legal pages' setting, which is this site's answer to running text. */
.art{max-width:68ch; margin:0 auto}
.art p, .art li{color:var(--ink-2); line-height:1.65;
  text-align:justify; text-justify:inter-word; hyphens:auto; text-wrap:pretty}
.art p:lang(fr), .art li:lang(fr){hyphenate-limit-chars:7 3 3}
.art p{margin:0 0 12px}

.art h2{font-size:21px; letter-spacing:-.02em; line-height:1.25; margin:46px 0 12px;
  text-align:left; text-wrap:balance; display:flex; align-items:center; gap:10px}
/* The icon is a marker, not an illustration: one size, one weight, tinted to the colour
   of what the section is about, and never carrying meaning the heading does not. */
.art h2 svg{flex:none; width:18px; height:18px; padding:6px; border-radius:9px;
  box-sizing:content-box; background:var(--bg-3); color:var(--ink-3)}
.art h2 svg.buy{background:var(--buy-soft); color:var(--buy)}
.art h2 svg.rent{background:var(--rent-soft); color:var(--rent)}
.art h2 svg.pos{background:rgba(15,122,79,.10); color:var(--pos)}
.art h3{font-size:16px; margin:24px 0 6px; text-align:left}
.art ul, .art ol{padding-left:20px; margin:0 0 14px}
.art li{margin-bottom:7px}

.art .note{font-size:13.5px; color:var(--ink-3); background:var(--bg-2);
  border-radius:10px; padding:12px 15px; line-height:1.6; text-align:left}

/* A formula reads as a figure, not a sentence: centred, never justified. */
.art .formula{background:var(--bg-2); border-radius:10px; padding:13px 16px;
  font-size:15.5px; color:var(--ink-2); margin:0 0 16px; text-align:center;
  overflow-x:auto; white-space:nowrap}

/* ── the calculator, carrying the hero form's weight ────────────────────────── */
.calc{margin:30px 0 8px; padding:22px;
  box-shadow:0 1px 2px rgba(13,13,13,.04), 0 12px 32px -12px rgba(13,13,13,.10)}
.calc:focus-within{box-shadow:0 1px 2px rgba(13,13,13,.05),
  0 16px 40px -14px rgba(13,13,13,.16)}
.calc-grid{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px;
  align-items:end}
.calc-grid label{display:block; font-size:12.5px; color:var(--ink-3); margin-bottom:5px}
.calc-grid .unit{color:var(--ink-4)}
.calc-grid input, .calc-grid select{width:100%; height:44px; padding:0 12px; font:inherit;
  font-size:15px; border:1px solid var(--line-2); border-radius:var(--r-sm);
  background:var(--bg); color:var(--ink)}
.calc-note{font-size:12px; color:var(--ink-4); line-height:1.5; margin:12px 0 0;
  text-align:left}

/* The commune decides both charge figures, so it reads as the question the rest of the
   form answers rather than as one field among seven. */
.calc-wide{grid-column:1 / -1}
/* What the commune resolved to: darker than the notes around it, because it is a number
   the calculation used and not a remark about it. */
#src:not(:empty){color:var(--ink-3); background:var(--bg-2); border-radius:8px;
  padding:9px 12px; margin-top:14px}
#src b{color:var(--ink); font-variant-numeric:tabular-nums}

/* ── results: the site's stat tile ──────────────────────────────────────────── */
.res{margin-top:20px; padding-top:20px; border-top:1px solid var(--line)}
.tiles{display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px}
.tile{background:var(--bg-2); border:1px solid var(--line); border-radius:var(--r);
  padding:14px 16px}
.tile .k{font-size:12.5px; color:var(--ink-3); margin-bottom:4px}
.tile .v{font-size:25px; letter-spacing:-.025em; font-weight:600;
  font-variant-numeric:tabular-nums; line-height:1.1}
.tile.lead{background:var(--ink); border-color:var(--ink)}
.tile.lead .k{color:rgba(255,255,255,.62)}
.tile.lead .v{color:#fff}
.tile.lead.buy{background:var(--buy); border-color:var(--buy)}
.tile.lead.rent{background:var(--rent); border-color:var(--rent)}

.a-verdict{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap;
  border-radius:var(--r); padding:14px 16px; margin-bottom:12px}
.a-verdict b{font-size:18px; letter-spacing:-.015em}
.a-verdict span{font-size:14px; color:var(--ink-3)}
.a-verdict{border-left:3px solid transparent}
.a-verdict.buy{background:var(--buy-soft); border-left-color:var(--buy)}
.a-verdict.buy b{color:var(--buy)}
.a-verdict.rent{background:var(--rent-soft); border-left-color:var(--rent)}
.a-verdict.rent b{color:var(--rent)}
.a-verdict svg{flex:none; width:18px; height:18px; align-self:center}

.res details{margin-top:12px}
.res summary{cursor:pointer; font-size:13px; color:var(--ink-3); padding:5px 0}
.res-msg{font-size:14px; color:var(--ink-3); margin:0}

/* ── the premise, stated before anything is computed ────────────────────────── */
.premise{display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--line);
  border:1px solid var(--line); border-radius:var(--r); overflow:hidden; margin:22px 0 0}
.premise > div{background:var(--bg); padding:16px 18px; border-top:3px solid var(--line)}
.premise > div.buy{border-top-color:var(--buy)}
.premise > div.rent{border-top-color:var(--rent)}
.premise .who{font-size:12.5px; color:var(--ink-3); margin-bottom:5px;
  display:flex; align-items:center; gap:7px}
.premise .who svg{flex:none; width:15px; height:15px}
.premise > div.buy .who svg{color:var(--buy)}
.premise > div.rent .who svg{color:var(--rent)}
.premise .what{font-size:15px; line-height:1.5; color:var(--ink); text-align:left;
  margin:0}

/* ── tables ─────────────────────────────────────────────────────────────────── */
.a-tbl{width:100%; border-collapse:collapse; margin:0 0 18px; font-size:14.5px}
.a-tbl th, .a-tbl td{padding:10px 12px; border-bottom:1px solid var(--line); text-align:left}
.a-tbl th{font-size:11.5px; text-transform:uppercase; letter-spacing:.05em;
  color:var(--ink-4); border-bottom-color:var(--line-2); font-weight:500}
/* Right-aligned and tabular for every numeric cell; nowrap only for the data,
   because a column heading that cannot wrap sets a width the table must honour.
   `.a-tbl .num` (class+class) outranks `.a-tbl th` (class+type), so scoping has
   to happen here rather than being overridden later. */
.a-tbl .num{text-align:right; font-variant-numeric:tabular-nums}
.a-tbl td.num{white-space:nowrap}
.a-tbl tr.tot td{border-top:1px solid var(--line-2); font-weight:600}
.a-tbl tr.hi td{background:var(--bg-2); font-weight:600}
.a-tbl tr:last-child td{border-bottom:0}
.a-tbl .a-sub{display:block; color:var(--ink-4); font-size:12.5px; margin-top:2px}
/* The winning side of a row, in that side's colour - the same blue and amber as the
   verdict, so a reader who has seen one recognises the other. */
.a-tbl .w-buy{color:var(--buy)}
.a-tbl .w-rent{color:var(--rent)}

/* ── call to action ─────────────────────────────────────────────────────────── */
.a-cta{margin:46px 0 30px; padding:26px; background:var(--bg-2); text-align:center;
  border:1px solid var(--line)}
.a-cta h2{margin:0 0 8px; text-align:center; justify-content:center}
.a-cta .btn{background:var(--ink); color:#fff; border-color:var(--ink)}
.a-cta .btn:hover{background:#000}
.a-cta .btn svg{width:16px; height:16px; margin-right:9px; flex:none}
.a-cta p{margin:0 auto 18px; max-width:46ch; text-align:center}

/* ── phones ─────────────────────────────────────────────────────────────────── */
@media (max-width:700px){
  .art-hero{padding:28px 0 2px}
  .calc-grid{grid-template-columns:repeat(2, minmax(0,1fr))}
  .tiles{grid-template-columns:1fr}
  .premise{grid-template-columns:1fr}
  /* `table-layout:auto` sizes to content, so one long line in a cell sets a minimum
     width the page then has to honour - 549px inside 358px here. Fixed layout makes the
     columns obey the container and the text wrap instead. */
  .a-tbl{table-layout:fixed}
  /* Cells inherit `white-space:nowrap` from the application's own table styling, which
     defeats the fixed layout: the column obeys the container and the text walks out of
     it. Numbers keep nowrap - breaking "4 160 €" across lines is worse than anything. */
  .a-tbl td, .a-tbl th{overflow-wrap:anywhere; white-space:normal}
  /* A wide table is readable sideways; a page that scrolls sideways is not. */
  .a-tbl.scroll{display:block; overflow-x:auto; white-space:nowrap}
  .a-tbl.scroll td:last-child{white-space:normal; min-width:200px}
  /* Justification needs room: at this measure it opens rivers instead of closing them. */
  .art p, .art li{text-align:left}
}
@media (max-width:420px){
  .calc-grid{grid-template-columns:1fr}
}

/* ── the year-by-year table ─────────────────────────────────────────────────
   Eight columns of figures will not fit a phone and should not try: the table keeps
   its shape and scrolls inside its own box, which is readable, rather than stretching
   the page, which is not. */
.scroll-x{overflow-x:auto; margin:0 0 4px}
.year-tbl{font-size:13px; min-width:560px; margin:0}
.year-tbl th, .year-tbl td{padding:6px 9px; white-space:nowrap}
.year-tbl tbody tr.hi td{background:var(--bg-2)}
