/* Locataire+ 2.1 — style commun aux applications de Kyllian Rigolt
   (Inter, cartes blanches très arrondies, boutons en pilule, ombres douces,
   pastille qui glisse, bouton soleil/lune, apparition en cascade), avec les couleurs de Locataire+. */

/* ---------- Base ---------- */
html { touch-action: manipulation; }
body { font-feature-settings: "cv11", "ss01"; letter-spacing: -.006em; }
body::before { /* halos flous très légers */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(40vmax 40vmax at 8% -6%, var(--halo), transparent 70%), radial-gradient(36vmax 36vmax at 100% 108%, var(--halo), transparent 70%);
}
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.025em; word-spacing: .06em; }

/* Fondu de toutes les couleurs au changement de thème */
:root.theme-fading, :root.theme-fading *, :root.theme-fading *::before, :root.theme-fading *::after {
  transition: background-color .45s ease, border-color .45s ease, color .45s ease, fill .45s ease, box-shadow .45s ease !important;
}

/* ---------- En-tête ---------- */
.top { padding-top: calc(14px + env(safe-area-inset-top)); top: 0; }
.brand__name { font: 800 1.25rem/1 var(--font-display); letter-spacing: -.025em; }
.brand__name b { color: var(--violet); font-weight: 900; }
.brand img { border-radius: 10px; }
.bubble-bar {
  display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.bubble-bar .icon-btn { width: 34px; height: 34px; flex-basis: 34px; }
.bubble-bar .icon-btn .ico { width: 19px; height: 19px; }
.bubble-bar .avatar { width: 32px; height: 32px; font-size: 12px; }
.bubble-bar { padding: 3px; }
.bubble-bar .icon-btn__dot { top: 7px; right: 8px; box-shadow: 0 0 0 2px var(--surface); }
.top__add { border-radius: 999px; min-height: 40px; padding: 0 16px; box-shadow: none; }

/* ---------- Barre d’onglets : bulle flottante ---------- */
.tabbar {
  left: 12px; right: 12px; bottom: calc(8px + env(safe-area-inset-bottom));
  height: var(--tabbar-h); padding: 0 6px; border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 4px 14px rgba(30, 31, 70, .07);
}
.tab { height: calc(var(--tabbar-h) - 2px); z-index: 1; font-weight: 650; }
.tab[aria-current="page"]::before { display: none; }
.tab[aria-current="page"] { color: var(--violet-ink); }
.tabbar__pill, .side__pill {
  position: absolute; left: 0; top: 0; z-index: 0; opacity: 0; pointer-events: none;
  background: var(--violet-wash); border-radius: 999px;
  transition: transform .42s cubic-bezier(.34, 1.36, .5, 1), width .42s cubic-bezier(.34, 1.36, .5, 1), opacity .2s;
}
.tabbar__pill { margin: 0; }
.tab--add .tab__plus { width: 46px; height: 46px; margin-top: -18px; box-shadow: 0 0 0 4px var(--paper); }
.tab--add .tab__plus .ico { width: 22px; height: 22px; }
.tab .ico { width: 20px; height: 20px; }
.tab { font-size: .6875rem; }
.view { padding-bottom: calc(var(--tabbar-h) + 56px + env(safe-area-inset-bottom)); }
.toast { box-shadow: 0 6px 18px rgba(0, 0, 0, .18); bottom: calc(var(--tabbar-h) + 26px + env(safe-area-inset-bottom)); border-radius: 999px; padding: 12px 20px; }
@media (min-width: 1024px) { .view { padding-bottom: var(--s12); } .toast { bottom: 28px; } }

/* Barre latérale (ordinateur) */
@media (min-width: 1024px) {
  .app { padding-top: 0; }
  .side { padding-top: var(--s5); border-right: 0; background: transparent; position: sticky; }
  .side::after { content: ""; position: absolute; top: 16px; bottom: 16px; right: 0; width: 1px; background: var(--line); }
  .top { top: 0; }
}
.nav__item { position: relative; z-index: 1; border-radius: 999px; padding: 9px 14px; font-weight: 550; }
.nav__item:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.nav__item[aria-current="page"] { background: transparent; font-weight: 700; }
.nav__title { padding-left: 14px; font-weight: 700; }
.side__me { border-radius: 18px; background: var(--surface); }
.side__fr { margin-bottom: var(--s3); }

/* ---------- Titres ---------- */
.page-title { font-size: 1.875rem; font-weight: 900; letter-spacing: -.04em; word-spacing: .08em; line-height: 1.05; text-wrap: balance; }
@media (min-width: 1024px) { .page-title { font-size: 2.375rem; } }
.page-lead { font-size: 1rem; }
.sec__title { font-size: 1.125rem; font-weight: 800; letter-spacing: -.025em; }
.panel__title, .ledger__title, .meter__head h2, .scan__text h2, .empty h2, .empty h3 { font-weight: 800; letter-spacing: -.025em; }
.dlg__title, .sheet__title { font-weight: 900; letter-spacing: -.035em; }
.lock h1 { font-weight: 900; letter-spacing: -.035em; }

/* Bouton retour : bulle ronde 46px + « Retour » */
.back { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 var(--s2); padding: 0 12px 0 0; border: 0; background: none; color: var(--ink); font: 650 var(--t-sm)/1 var(--font-text); }
.back__dot { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); transition: transform .2s var(--ease); }
.back:hover .back__dot { transform: translateX(-2px); }
@media (min-width: 1024px) { .back { display: none; } }

/* ---------- Cartes ---------- */
.list, .panel, .ledger, .figures, .meter, .scan, .chat, .cal {
  border-radius: var(--r-panel); border-color: var(--line); box-shadow: var(--shadow-card);
}
.ledger { box-shadow: var(--shadow-card); }
.panel--wash { box-shadow: none; }
.doc, .photo, .topic, .template, .shortcut, .pick__opt { border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.shortcut, .template, .topic, .pick__opt, .doc, button.item, a.item { transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease), background-color .2s; }
@media (hover: hover) {
  .shortcut:hover, .template:hover, .topic:hover, .doc:hover { transform: translateY(-1px); }
}
.list > .item + .item::before, .list > * + .item::before { left: 66px; }
.item { padding: 13px 16px; }
.item__icon { width: 32px; height: 32px; }
.item__icon .ico { width: 16px; height: 16px; }
.list > .item + .item::before, .list > * + .item::before { left: 60px; }
.item__icon, .empty__icon { border-radius: 12px; }
.item__title { font-weight: 650; }
.note { border-radius: var(--r-card); padding: 14px 16px; }
.empty { border-radius: var(--r-panel); border-width: 1.5px; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.figure__num, .item__amount, .progress-num, .calc strong { font-weight: 900; letter-spacing: -.03em; }
.ledger__total strong { font-weight: 900; letter-spacing: -.035em; font-size: 1.75rem; }
.ledger__total { border-top-width: 1.5px; }
.contact__badge { border-radius: 50%; font-weight: 900; }
.meter__value strong { font-weight: 900; letter-spacing: -.04em; }

/* ---------- Boutons et pastilles en pilule ---------- */
.btn { border-radius: 999px; font-weight: 700; padding: 0 20px; transition: background-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn--sm { border-radius: 999px; padding: 0 14px; }
.btn--primary { box-shadow: none; }
.btn { min-height: 42px; font-size: .9375rem; }
.btn--sm { min-height: 34px; }
.btn--quiet { background: var(--surface); border-color: var(--line-strong); box-shadow: none; }
.chip { padding: 5px 11px; font-weight: 700; }
.pill { font-weight: 650; border-color: var(--line-strong); box-shadow: none; min-height: 34px; }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: none; }
.icon-btn { transition: background-color .15s; }

/* ---------- Plaque (adresse) : même violet, arrondi maison ---------- */
.plaque { border-radius: 22px; padding: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 16px -10px rgba(62, 63, 168, .6); }
.plaque__inner { min-height: 84px; padding: 10px 16px; }
.plaque__num { font-size: 2.75rem; }
.plaque__street { font-size: 1.3125rem; }
.plaque__inner { border-radius: 17px; border-width: 1.5px; }
.plaque__num { font-weight: 900; letter-spacing: -.05em; }
.plaque__street { font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.plaque--empty { border-width: 1.5px; }
.plaque--mini { border-radius: 18px; }
.plaque--mini .plaque__inner { border-radius: 13px; }
.plaque--mini .plaque__num { font-size: 1.6rem; }
.plaque--mini .plaque__street { font-size: .9375rem; }

/* ---------- Formulaires ---------- */
.input { border-radius: var(--r-ctl); font-size: 16px; border-color: var(--line-strong); }
.choice span { border-radius: var(--r-ctl); }
.file-drop { border-radius: var(--r-ctl); }
.dlg, .sheet, .confirm-dlg { border-radius: 28px; }
.dlg__foot { border-top-color: var(--line); }
.sheet__link { border-radius: var(--r-card); }
@media (max-width: 640px) {
  .dlg, .dlg--wide, .sheet { border-radius: 28px 28px 0 0; }
}
.lock__pin { border-radius: 999px; font-weight: 900; }
.lock__btn { border-radius: 999px; }

/* ---------- Agenda ---------- */
.cal__day { border-radius: 14px; }
.cal__day.is-selected { background: var(--violet); color: #fff; }
.cal__day.is-selected .dot { box-shadow: 0 0 0 1.5px #fff; }

/* ---------- Pastille « Conçu et développé en France » ---------- */
.fr-pill {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 12px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink); font: 700 var(--t-xs)/1.2 var(--font-text); overflow: hidden; background: var(--surface);
}
.fr-pill::before { /* nuage tricolore fixe et flou */
  content: ""; position: absolute; inset: -40%; z-index: -1; filter: blur(14px); opacity: .32;
  background: radial-gradient(42% 70% at 6% 50%, var(--flag-blue), transparent 70%), radial-gradient(42% 70% at 94% 50%, var(--flag-red), transparent 70%), radial-gradient(40% 60% at 50% 50%, #fff, transparent 75%);
}
:root.dark .fr-pill::before { opacity: .42; }
.flag { flex: 0 0 auto; color: var(--muted); }
.about { flex-direction: column; align-items: center; gap: var(--s3); padding-top: var(--s6); border-top: 1px solid var(--line); text-align: center; }
.about__app { display: flex; align-items: center; gap: var(--s3); }
.about__app img { border-radius: 8px; }
.about__by { font-size: var(--t-xs); }

/* ---------- Apparition en cascade au changement de page ---------- */
@keyframes lp-enter { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }
.enter { animation: lp-enter .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@media (prefers-reduced-motion: reduce) { .enter { animation: none; } .tabbar__pill, .side__pill { transition: none; } }
:root.reduce-motion .enter { animation: none; }
.shortcut .item__icon { flex-basis: 32px; } .empty__icon { width: 38px; height: 38px; } .shortcut { min-height: 54px; }
