/* =========================================================
   Bailleur — direction « crème, bleu nuit et or » (décembre 2026)
   Fond crème avec de fines arches dorées, encre bleu nuit,
   l'or pour les accents, titres en Fraunces (fin en italique doré),
   texte en Urbanist. Couche posée APRÈS glass.css : pour revenir
   à l'ancien style, retirer la ligne css/or.css de index.html.
   ========================================================= */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../assets/fonts/fraunces.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url("../assets/fonts/fraunces-italic.woff2") format("woff2"); }

:root {
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  /* action = bleu nuit ; accents = or */
  --accent: #A07F3F;
  --accent-fill: #1C2442;
  --accent-fill-h: #10162E;
  --accent-text: #7D6128;
  --accent-soft: rgba(160, 127, 63, .13);
  --on-fill: #FFFFFF;
  --gold: #A07F3F; --gold-light: #C9A96A; --gold-line: rgba(160, 127, 63, .32);
  --navy-soft: rgba(28, 36, 66, .07);

  --canvas: #F7F4EE;
  --surface: #FFFFFF;
  --paper-2: #FCFAF6;
  --subtle: rgba(20, 26, 46, .05);
  --subtle-2: rgba(20, 26, 46, .08);
  --ink: #141A2E;
  --ink-2: #2A3150;
  --muted: #5A6074;
  --faint: #767B8C;
  --line: rgba(20, 26, 46, .09);
  --line-2: rgba(20, 26, 46, .17);

  --forest: #2A3150;
  --forest-h: #10162E;
  --forest-ink: #FFFFFF;
  --forest-soft: var(--navy-soft);
  --champ: var(--gold-light);
  --champ-bg: rgba(160, 127, 63, .12);
  --champ-ink: #6B5222;
  --ok: #1F7A45;  --ok-bg: rgba(108, 198, 141, .2);  --ok-fill: #6CC68D;
  --warn: #85560A; --warn-bg: rgba(237, 192, 103, .26); --warn-fill: #E2B866;
  --bad: #A93D24;  --bad-bg: rgba(238, 156, 128, .24); --bad-fill: #C9533A;
  --info: #2A3150; --info-bg: var(--navy-soft); --info-fill: #1C2442;
  --neutral: #5A6074; --neutral-bg: rgba(20, 26, 46, .06); --neutral-fill: rgba(20, 26, 46, .18);
  --focus: #7D6128;
  /* pastilles d'état (devant les chiffres) */
  --dot-ok: #6CC68D; --dot-warn: #E2B866; --dot-bad: #E38B6E;

  /* plus de verre sur la photo : le papier sur le crème */
  --window: transparent;
  --chrome: rgba(255, 255, 255, .8);
  --card-glass: #FFFFFF;
  --card-2: #FFFFFF;
  --well: rgba(20, 26, 46, .05);
  --hover-glass: rgba(20, 26, 46, .05);
  --edge: rgba(255, 255, 255, .9);
  --pane-bg: #FFFFFF;

  --sh1: 0 1px 2px rgba(40, 34, 24, .06), 0 10px 26px -16px rgba(40, 34, 24, .3);
  --sh2: 0 1px 2px rgba(40, 34, 24, .06), 0 24px 54px -30px rgba(40, 34, 24, .36);
  --sh3: 0 2px 6px rgba(40, 34, 24, .06), 0 50px 110px -44px rgba(40, 34, 24, .42);
  --press: 0 8px 18px -10px rgba(16, 22, 46, .55);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* sombre : bleu nuit profond, l'or prend la place de l'action */
:root[data-theme="dark"] {
  --accent: #C9A96A;
  --accent-fill: #C9A96A;
  --accent-fill-h: #D7BC85;
  --accent-text: #D8BC82;
  --accent-soft: rgba(201, 169, 106, .18);
  --on-fill: #141A2E;
  --gold: #C9A96A; --gold-line: rgba(201, 169, 106, .3);
  --navy-soft: rgba(255, 255, 255, .06);
  --canvas: #0E1220;
  --surface: #171C2E;
  --paper-2: #1B2134;
  --subtle: rgba(255, 255, 255, .05);
  --subtle-2: rgba(255, 255, 255, .08);
  --ink: #F3EFE6;
  --ink-2: #E2DDD2;
  --muted: #A8ACBA;
  --faint: #8A8FA0;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .17);
  --forest: #E2DDD2;
  --forest-h: #FFFFFF;
  --forest-ink: #141A2E;
  --champ-bg: rgba(201, 169, 106, .16);
  --champ-ink: #E6CC97;
  --ok: #8FD9AA; --ok-bg: rgba(108, 198, 141, .16);
  --warn: #F0D08E; --warn-bg: rgba(237, 192, 103, .16);
  --bad: #F2AE97; --bad-bg: rgba(238, 156, 128, .18);
  --info: #E2DDD2; --info-bg: rgba(255, 255, 255, .07); --info-fill: #C9A96A;
  --neutral: #A8ACBA; --neutral-bg: rgba(255, 255, 255, .07);
  --focus: #D8BC82;
  --chrome: rgba(23, 28, 46, .82);
  --card-glass: #161B2C;
  --card-2: #1E2438;
  --well: rgba(0, 0, 0, .24);
  --hover-glass: rgba(255, 255, 255, .06);
  --edge: rgba(255, 255, 255, .1);
  --pane-bg: #161B2C;
  --sh1: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px -16px rgba(0, 0, 0, .7);
  --sh2: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 54px -30px rgba(0, 0, 0, .8);
  --sh3: 0 2px 6px rgba(0, 0, 0, .35), 0 50px 110px -44px rgba(0, 0, 0, .9);
  --press: 0 8px 18px -10px rgba(0, 0, 0, .7);
}

/* ---------- surfaces du navigateur ---------- */
body { background: var(--canvas); }
::selection { background: color-mix(in srgb, var(--gold) 26%, transparent); }
a { color: var(--accent-text); text-decoration-color: var(--gold-line); }
a:hover { color: var(--ink); }

/* ---------- le fond : crème et arches dorées (plus de photo floutée) ---------- */
.room { display: none; }
.or-arches { position: fixed; z-index: 0; pointer-events: none; color: var(--gold); opacity: .32;
  width: 900px; height: 900px; right: -340px; top: -360px; }
.or-arches path { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
:root[data-theme="dark"] .or-arches { opacity: .18; }
@media (max-width: 900px) { .or-arches { width: 560px; height: 560px; right: -300px; top: -260px; opacity: .16; } }
@media print { .or-arches { display: none; } }

/* ---------- la page : posée sur le crème, sans fenêtre de verre ---------- */
.main { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; z-index: 1; }

/* ---------- titres : Fraunces léger ---------- */
.large-title { font: 380 44px/1.06 var(--serif); letter-spacing: -.025em; font-optical-sizing: auto; }
.title { font: 400 32px/1.12 var(--serif); letter-spacing: -.02em; }
.h2 { font: 420 24px/1.2 var(--serif); letter-spacing: -.015em; }
.large-title em, .title em, .h2 em { font-style: italic; color: var(--accent-text); font-weight: 340; }
.hero-amount, .money.big { font-family: var(--serif); }
@media (max-width: 560px) { .large-title { font-size: 34px; } .title { font-size: 27px; } }

/* ---------- navigation ---------- */
.gnav .logo span { font: 420 23px/1 var(--serif); letter-spacing: -.02em; }
.gnav .logo, .gnav .vols, .gnav .tools, .lnav .links { background: var(--chrome); }
.gnav .vol { color: var(--muted); }
.gnav .vol:hover { color: var(--ink); background: var(--navy-soft); }
.gnav .vol.on, .snav .sv.on, .tabbar .tb.on { background: var(--accent-fill) !important; color: var(--on-fill) !important; box-shadow: var(--press); }
.gnav .tool:hover { background: var(--navy-soft); }
.gnav .vol .count, .gnav .tool .count { background: #E38B6E; color: #3B150A; }
.lnav .links a.on { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), 0 2px 8px -4px rgba(40, 34, 24, .25); }
@media (max-width: 900px) { .tabbar .tb-dot { background: #E38B6E; } }

/* ---------- cartes : du papier sur le crème ---------- */
.card, .pane { background: var(--surface) !important; border-radius: 24px; box-shadow: inset 0 0 0 1px var(--line), var(--sh2) !important; }
.card .card, .pane .card, .card .list.card, .pane .list.card { box-shadow: none !important; background: transparent !important; }
.card.interactive:hover { box-shadow: inset 0 0 0 1px var(--line-2), var(--sh2) !important; transform: translateY(-2px); }
.card.interactive { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.row.click:hover { background: var(--navy-soft); }
.bld-group { background: color-mix(in srgb, var(--surface) 55%, transparent); border-radius: 30px; }

/* ---------- boutons ---------- */
.btn { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh1); }
.btn:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), var(--sh1); }
.btn.primary, .act-next .act-go { background: var(--accent-fill); color: var(--on-fill); box-shadow: var(--press); }
.btn.primary:hover, .act-next .act-go:hover { background: var(--accent-fill-h); color: var(--on-fill); }
.btn.champ { background: var(--gold-light); color: #141A2E; box-shadow: none; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--navy-soft); box-shadow: none; }
.chip.on { background: var(--accent-fill); color: var(--on-fill); }
.seg button.on, .seg.light button.on { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), 0 2px 8px -4px rgba(40, 34, 24, .25); }
.switch input:checked + span { background: var(--accent-fill); }
.check input, :root { accent-color: var(--accent-fill); }

/* ---------- formulaires ---------- */
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { box-shadow: inset 0 0 0 1.5px var(--gold), 0 0 0 4px var(--accent-soft); background: var(--surface); }

/* ---------- fenêtres, tiroirs, messages ---------- */
.modal, .drawer, .sheet { background: color-mix(in srgb, var(--surface) 96%, transparent) !important; }
.overlay { background: color-mix(in srgb, var(--ink) 28%, transparent) !important; }
.toast { background: var(--surface) !important; }
.demo-banner { background: var(--champ-bg); color: var(--champ-ink); border-color: transparent; }

/* ---------- carte « Loyers du mois » : voile bleu nuit, chiffre en Fraunces ---------- */
.hero-card::before { background:
  linear-gradient(105deg, rgba(14, 18, 36, .86) 0%, rgba(14, 18, 36, .55) 50%, rgba(14, 18, 36, .2) 100%),
  linear-gradient(180deg, rgba(14, 18, 36, .25) 0%, rgba(14, 18, 36, 0) 40%, rgba(14, 18, 36, .35) 100%); }
.hero-card .hero-amount { font-family: var(--serif); font-weight: 340; font-size: 56px; letter-spacing: -.03em; text-shadow: none; }
.hero-card .hero-label { text-shadow: none; }
.hero-card { box-shadow: var(--sh2); }

/* tuiles : du verre ; l'état est dit par une pastille douce devant le chiffre */
.glass-tile, .glass-tile[class*="tone-"] { background: var(--surface); color: var(--ink); border-color: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.glass-tile[class*="tone-"] span { opacity: .8; }
.glass-tile b { display: flex; align-items: center; gap: 8px; }
.glass-tile.tone-green b::before, .glass-tile.tone-amber b::before, .glass-tile.tone-coral b::before {
  content: ""; width: 8px; height: 8px; border-radius: 999px; flex: none; }
.glass-tile.tone-green b::before { background: var(--dot-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot-ok) 25%, transparent); }
.glass-tile.tone-amber b::before { background: var(--dot-warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot-warn) 25%, transparent); }
.glass-tile.tone-coral b::before { background: var(--dot-bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot-bad) 25%, transparent); }
.hero-card .glass-tile, .hero-card .glass-tile[class*="tone-"], .hero-card .glass-tile:not([class*="tone-"]) {
  background: rgba(255, 255, 255, .13); color: #fff; border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24), inset 0 1px 0 rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.hero-card .glass-tile span, .hero-card .glass-tile:not([class*="tone-"]) span { color: rgba(255, 255, 255, .8); opacity: 1; }

/* ---------- mouvements fluides (js/fluide.js) ---------- */
.glide-on > *:not(.glide-hl) { position: relative; z-index: 1; }
.glide-hl { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; opacity: 0; will-change: transform;
  border-radius: var(--glide-r, 14px); background: var(--glide-bg, var(--navy-soft));
  transition: transform .16s cubic-bezier(.2, .8, .2, 1), width .16s cubic-bezier(.2, .8, .2, 1), height .16s cubic-bezier(.2, .8, .2, 1), opacity .1s ease; }
.glide-hl.snap { transition: opacity .1s ease !important; }
.gnav .vols.glide-on, .gnav .tools.glide-on, .lnav .links.glide-on, .tabbar.glide-on { --glide-r: 999px; }
.gnav .vols.glide-on .vol:hover, .gnav .tools.glide-on .tool:hover, .lnav .links.glide-on a:hover, .glide-on > .row.click:hover { background: transparent; }
.list.card.glide-on { --glide-r: 14px; }

/* ---------- petits écrans ---------- */
/* une grille ne doit jamais s'élargir plus que l'écran (section « Cette semaine » sur téléphone) */
.main .grid > *, .main [class*="grid"] > * { min-width: 0; }
@media (max-width: 560px) { .gnav .logo span { font-size: 19px; } }
@media (max-width: 400px) { .gnav .logo span { display: none; } .gnav .logo { padding-right: 6px; } }

/* Entre téléphone et grand écran (iPad à l'horizontale, petit portable) : la barre du haut manquait de place.
   On garde seulement l'icône du logo, et les rubriques se resserrent un peu. */
@media (min-width: 901px) and (max-width: 1180px) {
  .gnav .logo span { display: none; }
  .gnav .logo { padding-right: 6px; }
  .gnav .vol { padding: 0 10px; font-size: 14px; }
}
