/* Maison — charte visuelle (voir CLAUDE.md). Thèmes portés par [data-theme], clair/sombre par prefers-color-scheme.
   Les tokens sont posés sur [data-theme] (pas seulement :root) pour que l'aperçu d'un thème puisse s'afficher n'importe où.
   Esprit : épuré « à la Apple » — beaucoup d'air, cartes sans bordure aux ombres diffuses, matériaux translucides,
   mouvements à ressort courts. Beige dominant ; noyer = signature ; vert / lavande = actif, sélection, progression. */

/* ---------- Tokens : clair ----------
   Contrastes texte vérifiés ≥ 4.5:1 (texte, muted, wood, accent, ok, warn, danger sur --bg, --surface et --surface-2). */
:root, [data-theme] {
  --bg: #f1e9db;          /* beige lin */
  --surface: #fbf7f0;     /* crème (cartes, feuilles) */
  --surface-2: #ebe1cf;   /* sable (champs secondaires, boutons doux) */
  --text: #2b1f16;        /* noyer très foncé */
  --muted: #66513f;
  --line: #e0d4bf;        /* séparateurs fins */
  --wood: #5a3a25;        /* noyer */
  --wood-2: #7d5639;
  --primary: #5a3a25;     /* bouton principal : noyer */
  --primary-text: #fbf7f0;
  --accent: #43654a;      /* vert sauge (foncé pour le contraste en clair) */
  --accent-soft: #dfe6d2;
  --accent-text: #fbf7f0;
  --ok: #3a663f;
  --warn: #835406;
  --danger: #a03927;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 1px rgb(70 44 22 / .04), 0 2px 6px rgb(70 44 22 / .04), 0 12px 32px -12px rgb(70 44 22 / .12);
  --shadow-lg: 0 24px 60px -12px rgb(60 34 18 / .28), 0 4px 12px rgb(60 34 18 / .08);
  --ease: cubic-bezier(.32, .72, 0, 1);      /* ressort amorti (iOS) */
  --spring: cubic-bezier(.34, 1.3, .64, 1); /* ressort avec un vrai léger dépassement */
  --bounce: cubic-bezier(.2, .9, .3, 1.2);   /* léger dépassement : apparitions, retour d'appui */
  --material: color-mix(in srgb, var(--surface) 74%, transparent);
  --scrim: rgb(30 18 10 / .38);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Noto Serif", serif;
  --tabbar-h: 66px;
  --sidebar-w: 248px;
  --gutter: 16px;
  --content-w: 760px;
  color-scheme: light;
}
[data-theme="noyer-lavande"] {
  --accent: #5f5192;      /* lavande (foncée pour le contraste en clair) */
  --accent-soft: #e6e0ef;
  --accent-text: #fbf7f0;
}

/* ---------- Tokens : sombre (brun noyer chaud, texte et surfaces sablés) ---------- */
@media (prefers-color-scheme: dark) {
  :root, [data-theme] {
    --bg: #19140f;
    --surface: #251e18;
    --surface-2: #322920;
    --text: #f0e6d6;      /* beige clair */
    --muted: #bfae97;
    --line: #3b3128;
    --wood: #dcb089;      /* noyer éclairci pour être lisible sur fond sombre */
    --wood-2: #b8875f;
    --primary: #d6a87f;
    --primary-text: #1f1710;
    --accent: #a5c8a5;    /* sauge */
    --accent-soft: #2f3b2c;
    --accent-text: #172016;
    --ok: #98ca9c;
    --warn: #e3b566;
    --danger: #ef8d77;
    --shadow: 0 0 0 1px rgb(255 240 220 / .04), 0 2px 6px rgb(0 0 0 / .25), 0 14px 34px -14px rgb(0 0 0 / .5);
    --shadow-lg: 0 0 0 1px rgb(255 240 220 / .05), 0 28px 64px -12px rgb(0 0 0 / .7);
    --material: color-mix(in srgb, var(--surface) 70%, transparent);
    --scrim: rgb(0 0 0 / .55);
    color-scheme: dark;
  }
  [data-theme="noyer-lavande"] {
    --accent: #c4b6e7;
    --accent-soft: #373047;
    --accent-text: #1d172d;
  }
}

/* ---------- Icônes (Lucide, au trait fin, couleur = texte courant) ---------- */
.ic {
  width: 1.25em; height: 1.25em; flex: none; vertical-align: -.22em;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.ic.sm { width: 1em; height: 1em; stroke-width: 1.8; }
.ic.lg { width: 1.6em; height: 1.6em; }
.ic.xl { width: 2.4em; height: 2.4em; stroke-width: 1.3; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-padding-top: 72px; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
  accent-color: var(--accent);
  overflow-wrap: break-word;
}
a { color: var(--wood); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; overflow-wrap: break-word; }
h1 {
  font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 1.45rem + 1.6vw, 2.35rem);
  letter-spacing: -.02em; color: var(--wood); margin: 4px 0 20px;
}
h2 { font-size: 1.12rem; font-weight: 650; letter-spacing: -.01em; margin: 28px 0 12px; }
h3 { font-size: 1rem; font-weight: 650; margin: 0 0 8px; }
p { margin: 0 0 12px; }
img, svg, video, canvas { max-width: 100%; }
table { max-width: 100%; }
pre, code { overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small, small { font-size: .85rem; }
.error { color: var(--danger); min-height: 1.2em; margin: 0; font-size: .92rem; }
.error:empty { min-height: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--accent-soft); }

/* ---------- Coquille : barre du haut (mobile), matériau translucide ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: calc(10px + env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 10px max(var(--gutter), env(safe-area-inset-left));
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow .3s var(--ease);
  view-transition-name: topbar;
}
.topbar.titled { box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; color: var(--wood); text-decoration: none; }
.brand-text { transition: opacity .3s var(--ease), transform .4s var(--ease); }
.topbar.titled .brand-text { opacity: 0; transform: translateY(-4px); }
.brand-mark {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 11px; font-size: 1rem;
  background: var(--primary); color: var(--primary-text); box-shadow: inset 0 1px 0 rgb(255 255 255 / .15), var(--shadow);
}
/* grand titre de la page repris dans la barre au défilement */
.topbar-title {
  position: absolute; left: 50%; bottom: 0; max-width: calc(100% - 2 * 64px); height: 58px;
  display: flex; align-items: center; pointer-events: none;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-weight: 650; font-size: 1.02rem; letter-spacing: -.01em; color: var(--text);
  opacity: 0; transform: translate(-50%, 6px);
  transition: opacity .3s var(--ease), transform .45s var(--ease);
}
.topbar-title > span { overflow: hidden; text-overflow: ellipsis; }
.topbar.titled .topbar-title { opacity: 1; transform: translate(-50%, 0); }
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary); color: var(--primary-text); font-weight: 700; text-decoration: none; text-transform: uppercase;
  transition: transform .45s var(--bounce);
}
.avatar:active { transform: scale(.92); transition-duration: .12s; }
.topbar .avatar { margin-left: auto; }

.offline-pill {
  position: fixed; z-index: 60; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  box-shadow: var(--shadow-lg); animation: drop-in .45s var(--bounce) both;
}

/* Colonne de contenu centrée, largeur maîtrisée ; plus large pour les pages en grille */
main {
  width: 100%; max-width: calc(var(--content-w) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 8px max(var(--gutter), env(safe-area-inset-right)) 32px max(var(--gutter), env(safe-area-inset-left));
}
body:is([data-page="home"], [data-page="agenda"], [data-page="budget"], [data-page="chauffage"], [data-page="papiers"]) { --content-w: 1040px; }
@media (min-width: 600px) { :root, [data-theme] { --gutter: 24px; } }

/* Apparition des pages : fondu (sans transform : un transform ferait de la page le repère des éléments
   position:fixed, .fab et écran mural). Les navigateurs à View Transitions ont le fondu + glissement plus bas. */
#view > * { animation: fade-in .3s var(--ease) both; }
@supports (view-transition-name: none) { #view > * { animation: none; } }
/* Cascade des cartes à l'ouverture d'une page (classe posée par app.js puis retirée) */
.reveal { animation: rise .55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }

/* View Transitions entre pages : l'ancienne page s'efface, la nouvelle monte légèrement ;
   barres de navigation exclues (elles restent en place, leur indicateur glisse). */
::view-transition-old(root) { animation: .22s var(--ease) both fade-out; }
::view-transition-new(root) { animation: .42s var(--ease) both rise-sm; }
::view-transition-old(topbar), ::view-transition-old(tabs), ::view-transition-old(sidebar) { display: none; }
::view-transition-new(topbar), ::view-transition-new(tabs), ::view-transition-new(sidebar) { animation: none; }

/* ---------- Coquille : onglets du bas (mobile), matériau translucide ---------- */
.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 5;
  display: flex; justify-content: space-around; gap: 2px;
  min-height: var(--tabbar-h);
  padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: var(--surface);
  background: var(--material);
  -webkit-backdrop-filter: saturate(1.8) blur(24px); backdrop-filter: saturate(1.8) blur(24px);
  box-shadow: 0 -1px 0 color-mix(in srgb, var(--line) 80%, transparent);
  view-transition-name: tabs;
}
.tabs .tab {
  position: relative; z-index: 1;
  flex: 1; min-width: 0; display: grid; justify-items: center; align-content: center; gap: 2px;
  padding: 4px 2px; margin: 0; border: 0; border-radius: 14px; background: none; box-shadow: none; min-height: 0;
  font-family: inherit; font-size: .68rem; font-weight: 600; line-height: 1.2; letter-spacing: 0; color: var(--muted); text-decoration: none; cursor: pointer;
  transition: color .25s var(--ease);
}
.tabs .tab > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs .tab .icon {
  display: grid; place-items: center; width: 52px; max-width: 100%; height: 30px; border-radius: 99px; font-size: 1.05rem;
  transition: background-color .25s var(--ease), transform .45s var(--bounce);
}
.tabs .tab:active .icon { transform: scale(.86); transition-duration: .12s; }
.tabs .tab:hover { filter: none; }
.tabs .tab[aria-current="page"] { color: var(--accent); }
.tabs:not(.has-ink) .tab[aria-current="page"] .icon { background: var(--accent-soft); }
/* indicateur d'onglet actif qui glisse (positionné par app.js) */
.tab-ink {
  position: absolute; z-index: 0; left: 0; top: 0; width: 52px; height: 30px; border-radius: 99px;
  background: var(--accent-soft); pointer-events: none; opacity: 0;
  transition: transform .5s var(--bounce), width .4s var(--ease), opacity .2s var(--ease);
}
.has-ink > :is(.tab-ink, .nav-ink).on { opacity: 1; }

/* ---------- Coquille : barre latérale (≥ 900 px) ---------- */
.sidebar { display: none; }
@media (min-width: 900px) {
  body { padding-bottom: 0; padding-left: var(--sidebar-w); }
  .topbar, .tabs { display: none !important; }
  main { padding-top: 44px; padding-bottom: 64px; }
  :root, [data-theme] { --gutter: 40px; }
  .sidebar:not([hidden]) {
    position: fixed; inset: 0 auto 0 0; z-index: 5; width: var(--sidebar-w);
    display: flex; flex-direction: column; gap: 2px; padding: 24px 14px 18px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--surface);
    background: var(--material);
    -webkit-backdrop-filter: saturate(1.8) blur(24px); backdrop-filter: saturate(1.8) blur(24px);
    box-shadow: 1px 0 0 color-mix(in srgb, var(--line) 80%, transparent);
    view-transition-name: sidebar;
  }
  .sidebar .brand { padding: 4px 10px 20px; }
  .sidebar .section { margin: 16px 12px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .sidebar a.nav {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 12px; min-width: 0; padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--text); text-decoration: none; font-weight: 500;
    transition: background-color .2s var(--ease), color .2s var(--ease), transform .45s var(--bounce);
  }
  .sidebar a.nav > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar a.nav:active { transform: scale(.98); transition-duration: .12s; }
  .sidebar a.nav .icon { display: inline-grid; place-items: center; flex: none; width: 1.6rem; color: var(--muted); transition: color .2s var(--ease); }
  .sidebar a.nav:hover:not([aria-current]) { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
  .sidebar a.nav[aria-current="page"] { color: var(--accent); font-weight: 650; }
  .sidebar:not(.has-ink) a.nav[aria-current="page"] { background: var(--accent-soft); }
  .sidebar a.nav[aria-current="page"] .icon { color: inherit; }
  .sidebar .spacer { flex: 1; }
  .sidebar a.nav.me { margin-top: 8px; padding-top: 12px; }
  .sidebar a.nav.me::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--line); }
  .sidebar a.nav.me .avatar { width: 30px; height: 30px; font-size: .85rem; }
  .nav-ink {
    position: absolute; z-index: 0; left: 14px; right: 14px; top: 0; height: 42px; border-radius: var(--radius-sm);
    background: var(--accent-soft); pointer-events: none; opacity: 0;
    transition: transform .5s var(--bounce), height .4s var(--ease), opacity .2s var(--ease);
  }
  .fab { right: 36px; bottom: 36px; }
  .toasts { left: var(--sidebar-w) !important; bottom: 28px !important; }
}

/* Écran mural : plein écran, aucune navigation */
body[data-page="mural"] { padding: 0; }
body[data-page="mural"] main { max-width: none; padding: 0; }
body[data-page="mural"] :is(.topbar, .tabs, .sidebar, .toasts) { display: none !important; }

/* ---------- Mise en page ---------- */
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin: 4px 0 22px; }
.page-header > :first-child { min-width: 0; flex: 1 1 14rem; }
.page-header h1 { margin: 0; }
.page-header h1 .ic { color: var(--wood); }
.page-header .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
/* Téléphone : titre et actions sur une seule ligne, actions en icône seule (texte dans .btn-label, aria-label sur le bouton) */
@media (max-width: 599px) {
  .page-header { flex-wrap: nowrap; }
  .page-header > :first-child { flex: 1 1 auto; }
  .page-header .actions { flex: none; flex-wrap: nowrap; gap: 6px; }
  .page-header .actions :where(button, .btn):has(.btn-label) { padding-inline: 12px; }
  .btn-label { display: none; }
}

.card {
  background: var(--surface); border: 0; border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
  min-width: 0; max-width: 100%;
}
.card.flat { background: var(--surface-2); box-shadow: none; }
.card > :last-child { margin-bottom: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
a.card { display: block; color: inherit; text-decoration: none; transition: transform .5s var(--bounce), box-shadow .35s var(--ease); }
@media (hover: hover) { a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); } }
a.card:active { transform: scale(.97); transition-duration: .12s; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); margin-bottom: 16px; }
.grid > .card { margin: 0; }
.grid:has(> .tile) { grid-template-columns: repeat(auto-fill, minmax(min(124px, 100%), 1fr)); }
@media (min-width: 600px) { .grid:has(> .tile) { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.stack > * { margin: 0; }
.row { display: flex; gap: 10px; align-items: center; min-width: 0; }
.row > input, .row > select { flex: 1; min-width: 0; }
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }

/* ---------- Listes ---------- */
ul.list { list-style: none; margin: 0; padding: 0; min-width: 0; }
ul.list > li { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 13px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent); }
ul.list > li:last-child { border-bottom: 0; }
ul.list > li:first-child { padding-top: 2px; }
ul.list > li > :not(.thumb, .icon-btn, button, input, .badge, .list-meta, .ic) { min-width: 0; }
ul.list.card > li:first-child { padding-top: 13px; }
ul.list.card { padding-block: 4px; }
ul.list strong { overflow-wrap: anywhere; }
.list-meta { margin-left: auto; color: var(--muted); font-size: .9rem; white-space: nowrap; flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Boutons : léger enfoncement à l'appui, retour élastique ---------- */
:where(button, .btn) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%;
  padding: 11px 18px; min-height: 44px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--primary); color: var(--primary-text);
  font: inherit; font-weight: 600; line-height: 1.2; letter-spacing: -.005em; text-decoration: none; cursor: pointer; user-select: none;
  box-shadow: 0 1px 2px rgb(0 0 0 / .08), inset 0 1px 0 rgb(255 255 255 / .08);
  transition: transform .5s var(--bounce), filter .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease), opacity .2s var(--ease);
}
:where(button, .btn):hover { filter: brightness(1.06); }
:where(button, .btn):active { transform: scale(.97); transition-duration: .12s; }
:where(button, .btn):disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.secondary { background: var(--surface-2); color: var(--wood); box-shadow: none; }
.secondary:hover { filter: none; background: color-mix(in srgb, var(--surface-2) 70%, var(--line)); }
.ghost { background: transparent; color: var(--text); box-shadow: none; }
.ghost:hover { filter: none; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.danger { background: var(--surface-2); color: var(--danger); box-shadow: none; }
.danger { background: color-mix(in srgb, var(--danger) 11%, var(--surface)); }
button.danger:hover { filter: none; background: color-mix(in srgb, var(--danger) 18%, var(--surface)); }
.icon-btn {
  width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  background: var(--surface-2); color: var(--text); font-size: 1.15rem; box-shadow: none; text-decoration: none; cursor: pointer;
  transition: transform .5s var(--bounce), background-color .2s var(--ease);
}
.icon-btn:hover { filter: none; background: color-mix(in srgb, var(--surface-2) 70%, var(--line)); }
.icon-btn:active { transform: scale(.9); transition-duration: .12s; }
.icon-btn.ghost { background: transparent; }
.icon-btn.ghost:hover { background: var(--surface-2); }
.fab {
  position: fixed; z-index: 4; right: max(18px, env(safe-area-inset-right)); bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; padding: 0; border-radius: 20px; font-size: 1.6rem; font-weight: 500;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgb(255 255 255 / .12);
  animation: pop .55s var(--bounce) .15s backwards;
}
.fab:active { transform: scale(.92); }
main:has(.fab) { padding-bottom: 112px; }

/* ---------- Formulaires ---------- */
form { display: grid; gap: 14px; min-width: 0; }
label { display: grid; gap: 6px; align-content: start; min-width: 0; font-size: .86rem; font-weight: 550; color: var(--muted); }
:where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), select, textarea) {
  width: 100%; min-width: 0; max-width: 100%; min-height: 46px; padding: 11px 14px;
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), box-shadow .25s var(--ease), background-color .2s var(--ease);
}
.card :where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), select, textarea),
dialog.sheet :where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), select, textarea) {
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
}
:where(input, select, textarea)::placeholder { color: var(--muted); opacity: .8; }
:where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file]), select, textarea):focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
input[type=file] { max-width: 100%; font: inherit; font-size: .9rem; color: var(--muted); }
textarea { resize: vertical; min-height: 96px; }
/* Chevron au trait dessiné en dégradés avec la couleur du thème : un select n'a pas de pseudo-élément où poser
   un mask-image, et une image SVG en data: ne peut pas lire var(--muted). Deux traits « \ » + « / » = « v ». */
select {
  cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image:
    linear-gradient(to top right, transparent calc(50% - .9px), var(--muted) calc(50% - .9px) calc(50% + .9px), transparent calc(50% + .9px)),
    linear-gradient(to top left, transparent calc(50% - .9px), var(--muted) calc(50% - .9px) calc(50% + .9px), transparent calc(50% + .9px)) !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important; background-position: right 21px center, right 15px center !important;
  text-overflow: ellipsis;
}
input[type=radio] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
/* Case à cocher : coche dessinée qui apparaît avec un petit rebond */
input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 22px; height: 22px; min-width: 22px; min-height: 22px; margin: 0; padding: 0;
  display: inline-grid; place-items: center; vertical-align: middle; cursor: pointer;
  border: 1.5px solid color-mix(in srgb, var(--muted) 55%, transparent); border-radius: 50%; background: var(--surface);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .45s var(--bounce);
}
input[type=checkbox]::after {
  content: ""; width: 6px; height: 11px; margin-top: -2px;
  border: solid var(--accent-text); border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0); transition: transform .4s var(--bounce);
}
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::after { transform: rotate(45deg) scale(1); }
input[type=checkbox]:active { transform: scale(.86); transition-duration: .1s; }
input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }
.field-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); min-width: 0; }
details > summary { cursor: pointer; color: var(--muted); font-weight: 550; list-style-position: inside; border-radius: 8px; padding: 10px 0; min-height: 44px; }
/* Fil d'Ariane générique : chaque étape est une cible tactile de 44 px */
.crumbs :is(a, button) { display: inline-flex; align-items: center; min-height: 44px; }
fieldset { min-width: 0; }

/* .search : sur l'input lui-même ou sur un conteneur de l'input */
/* Loupe dessinée en dégradés (anneau + manche) avec la couleur du thème, comme le chevron des select */
input.search, .search input {
  padding-left: 42px; border-radius: 99px; border-color: transparent;
  background-color: var(--surface-2) !important;
  background-image:
    radial-gradient(circle at 7px 7px, transparent 4.7px, var(--muted) 5.1px 6.3px, transparent 6.7px),
    linear-gradient(to top right, transparent calc(50% - 1px), var(--muted) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) !important;
  background-size: 16px 16px, 6px 6px !important;
  background-position: 15px center, 26px calc(50% + 5.5px) !important;
  background-repeat: no-repeat !important;
}
input.search:focus, .search input:focus { border-color: var(--accent); }

/* ---------- Éléments ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 100%; padding: 8px 16px;
  border: 0; border-radius: 99px; background: var(--surface-2);
  color: var(--text); font: inherit; font-size: .9rem; font-weight: 550; line-height: 1.25; text-decoration: none; box-shadow: none; cursor: pointer;
  overflow-wrap: anywhere;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .5s var(--bounce);
}
.chip:hover { filter: none; background: color-mix(in srgb, var(--surface-2) 70%, var(--line)); }
.chip:active { transform: scale(.94); transition-duration: .12s; }
.chip.active, .chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }

/* Sélecteur segmenté : la pastille glisse sous le choix actif (position calculée par app.js) */
.segmented {
  position: relative; isolation: isolate;
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 99px; background: var(--surface-2);
  max-width: 100%; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.segmented::-webkit-scrollbar { display: none; }
/* Débordement : fondu sur le bord qui cache encore des choix (data-fade posé par app.js) */
.segmented[data-fade="r"] { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.segmented[data-fade="l"] { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
.segmented[data-fade="lr"] { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.segmented::before {
  content: ""; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 0;
  width: var(--seg-w, 0); transform: translateX(var(--seg-x, 0)); opacity: var(--seg-o, 0);
  border-radius: 99px; background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 3px 10px -2px rgb(60 34 18 / .12);
}
.segmented.ink-anim::before { transition: transform .5s var(--bounce), width .4s var(--ease), opacity .2s var(--ease); }
.segmented button {
  flex: none; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 99px; background: transparent; box-shadow: none;
  color: var(--muted); font-size: .92rem; white-space: nowrap;
}
.segmented button:hover { filter: none; color: var(--text); }
.segmented button:active { transform: scale(.96); }
.segmented button[aria-pressed="true"] { color: var(--text); font-weight: 650; }
.segmented:not(.has-ink) button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 10px; border-radius: 99px;
  font-size: .78rem; font-weight: 650; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
  background: var(--accent-soft); color: var(--accent);
}
.badge.ok { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); }
.badge.warn { background: color-mix(in srgb, var(--warn) 15%, var(--surface)); color: var(--warn); }
.badge.danger { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.badge.neutral { background: var(--surface-2); color: var(--muted); }

/* Bloc de chargement (squelette) : léger reflet qui passe ; immobile si mouvement réduit */
.skeleton {
  display: block; min-height: 1em; border-radius: var(--radius-sm); color: transparent; user-select: none; pointer-events: none;
  background: linear-gradient(100deg, var(--surface-2) 40%, color-mix(in srgb, var(--surface-2) 55%, var(--surface)) 50%, var(--surface-2) 60%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* Titre de groupe dans une liste (petites majuscules, comme les rayons de Courses) */
.group-title { margin: 18px 4px 8px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.group-title:first-child { margin-top: 0; }
p.badge { white-space: normal; border-radius: var(--radius-sm); padding: 8px 12px; }

.stat { display: grid; gap: 2px; min-width: 0; }
.stat-value { font-family: var(--serif); font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--wood); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-label { font-size: .85rem; color: var(--muted); }

.empty { display: grid; justify-items: center; gap: 10px; padding: 40px 16px; text-align: center; color: var(--muted); }
.empty > :first-child:not(p, button) { font-size: 2.6rem; line-height: 1; color: color-mix(in srgb, var(--wood) 55%, var(--muted)); }
.empty .ic { width: 1em; height: 1em; stroke-width: 1.3; }
.empty > .ic.xl { width: 2.6rem; height: 2.6rem; color: color-mix(in srgb, var(--wood) 55%, var(--muted)); }
.empty p { margin: 0; max-width: 34ch; }

.thumb { width: 56px; height: 56px; aspect-ratio: 1; flex: none; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }

.progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .7s var(--ease), left .7s var(--ease); }

/* ---------- Feuille modale : monte du bas avec un ressort, fond assombri + flou, fermeture animée ---------- */
dialog.sheet {
  border: 0; padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
  width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; overflow-y: auto; overflow-x: hidden;
  background: var(--surface); color: var(--text);
  border-radius: 28px 28px 0 0; box-shadow: var(--shadow-lg);
  overscroll-behavior: contain;
  transform: translateY(100%);
  transition: transform .4s var(--ease), overlay .4s allow-discrete, display .4s allow-discrete;
}
dialog.sheet[open] { transform: none; animation: sheet-up .5s var(--ease); }
dialog.sheet::before { content: ""; display: block; width: 38px; height: 5px; margin: 0 auto 16px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 35%, transparent); }
dialog.sheet::backdrop {
  background: transparent; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0);
  transition: background-color .4s var(--ease), backdrop-filter .4s var(--ease), overlay .4s allow-discrete, display .4s allow-discrete;
}
dialog.sheet[open]::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(6px) saturate(1.2); backdrop-filter: blur(6px) saturate(1.2); animation: fade-in .4s var(--ease); }
/* Titres de feuille explicites : une feuille ouverte depuis un module n'hérite pas des h2 du module */
dialog.sheet h2 { font-family: inherit; font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; color: var(--text); margin: 4px 0 12px; }
dialog.sheet h2:first-child, dialog.sheet h1:first-child, dialog.sheet > :first-child h2:first-child { margin-top: 4px; }
/* En-tête de feuille : titre + bouton de fermeture alignés */
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -8px 12px 0; }
dialog.sheet .sheet-head h2 { margin: 0; min-width: 0; }
.sheet-head .icon-btn { margin-top: -4px; }
.sheet-msg { white-space: pre-line; }
/* Actions de feuille : Annuler (ghost) à gauche, action principale à droite ; empilées pleine largeur sur petit écran */
.sheet-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; }
.sheet-actions > :only-child { margin-left: auto; }
@media (max-width: 419px) {
  .sheet-actions { flex-direction: column-reverse; align-items: stretch; }
  .sheet-actions > * { width: 100%; }
}
dialog.sheet > * { max-width: 100%; }
dialog.sheet .card:not(.flat) { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); box-shadow: none; }
dialog.sheet .tile { padding: 14px; gap: 10px; }
dialog.sheet .tile .icon { background: var(--surface); }
@media (min-width: 768px) {
  dialog.sheet {
    margin: auto; width: min(560px, calc(100vw - 48px)); max-height: 86dvh; padding: 26px 28px; border-radius: var(--radius);
    transform: scale(.95); opacity: 0;
    transition: transform .3s var(--ease), opacity .25s var(--ease), overlay .3s allow-discrete, display .3s allow-discrete;
  }
  dialog.sheet[open] { transform: none; opacity: 1; animation: pop-in .45s var(--bounce); }
  dialog.sheet::before { display: none; }
}

/* ---------- Notifications (ctx.toast) ---------- */
.toasts {
  position: fixed; z-index: 70; left: 0; right: 0; bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; pointer-events: none;
  top: auto; width: auto; height: auto; margin: 0; border: 0; background: transparent; overflow: visible; color: inherit; /* reset [popover] */
}
.toast {
  display: flex; align-items: center; gap: 10px; max-width: min(460px, 100%); min-width: 0; overflow-wrap: anywhere;
  padding: 12px 18px 12px 12px; border-radius: 18px; box-shadow: var(--shadow-lg);
  background: color-mix(in srgb, var(--text) 92%, transparent); color: var(--bg); font-weight: 550; font-size: .95rem;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  animation: toast-in .55s var(--bounce) both; pointer-events: auto;
}
.toast-ic {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; font-size: .8rem;
  background: var(--accent); color: var(--accent-text); animation: pop .5s var(--bounce) .1s both;
}
.toast-ic .ic { stroke-width: 2.5; }
.toast.ok .toast-ic { background: var(--ok); color: var(--bg); }
.toast.warn .toast-ic { background: var(--warn); color: var(--bg); }
.toast.danger .toast-ic { background: var(--danger); color: var(--bg); }
.toast.out { animation: toast-out .3s var(--ease) both; }
.toast-act { flex: none; min-height: 44px; margin: -10px -10px -10px 4px; padding: 0 12px; border: 0; border-radius: 14px;
  background: transparent; box-shadow: none; color: var(--accent-soft); font: inherit; font-weight: 700; cursor: pointer; }
.toast-act:hover { background: color-mix(in srgb, var(--bg) 14%, transparent); filter: none; transform: none; }
.toast-act:focus-visible { outline: 2px solid var(--bg); outline-offset: -2px; }

/* ---------- Accueil ---------- */
.hello { margin: 4px 0 26px; }
.hello h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 2.7rem); margin: 0 0 4px; }
.hello p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.hello p::first-letter { text-transform: uppercase; }
.section-title { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 30px 4px 12px; }
.brief { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.brief .card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-width: 0; }
/* Téléphone : toujours 2 colonnes, icône au-dessus du chiffre */
@media (max-width: 599px) {
  .brief { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .brief .card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .brief .brief-icon { width: 36px; height: 36px; border-radius: 11px; }
}
.brief .brief-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; font-size: 1.2rem; line-height: 1; color: var(--wood); background: var(--surface-2); }
.brief .stat { min-width: 0; }
.brief .stat-value { font-size: 1.6rem; }
.brief .stat-label { overflow-wrap: anywhere; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.tile .icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 1.15rem;
  background: var(--surface-2); color: var(--wood);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
@media (hover: hover) { .tile:hover .icon { background: var(--accent-soft); color: var(--accent); } }

/* ---------- Connexion / installation ---------- */
.auth { max-width: 400px; margin: 8vh auto 0; }
.auth .card { padding: 32px 26px; box-shadow: var(--shadow-lg); animation: pop-in .6s var(--bounce) both; }
.auth .brand-mark { width: 60px; height: 60px; border-radius: 19px; font-size: 1.5rem; margin-bottom: 16px; }
/* le logo est déjà dans la barre du haut (mobile) : pas de doublon dans la carte */
@media (max-width: 899px) { .auth .brand-mark.logo { display: none; } }
.auth h1 { margin: 0 0 6px; }
.auth button[type=submit], .auth button.block, .sheet button.block { width: 100%; margin-top: 4px; }

/* ---------- Double authentification ---------- */
.auth.wide { max-width: 520px; margin-top: 4vh; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; }
.auth-links .ghost { min-height: 40px; padding: 8px 10px; font-weight: 550; color: var(--wood); }
.auth .leave { display: flex; width: fit-content; margin: 14px auto 0; min-height: 40px; color: var(--muted); font-weight: 550; }
.code-input { font-size: 1.4rem; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.enroll-steps { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: etape; display: grid; gap: 20px; }
.enroll-steps > li { counter-increment: etape; display: grid; gap: 8px; padding-left: 40px; position: relative; min-width: 0; }
.enroll-steps > li::before {
  content: counter(etape); position: absolute; left: 0; top: -2px;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem;
}
.enroll-steps form { gap: 10px; }
/* QR : noir sur blanc dans le SVG lui-même (marge de 4 modules incluse), quel que soit le thème */
.qr { display: block; width: min(220px, 100%); height: auto; margin: 6px 0; border-radius: 10px; box-shadow: var(--shadow); }
.secret { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.secret code, .codes code { font: 600 1rem/1.4 ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace; color: var(--text); user-select: all; }
.secret code { flex: 1; min-width: 12ch; word-spacing: .3em; overflow-wrap: anywhere; }
.secret button { min-height: 38px; padding: 8px 14px; }
.codes { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.codes li { padding: 9px 8px; text-align: center; border-radius: var(--radius-sm); background: var(--surface-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
label.check { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: var(--text); font-size: .95rem; cursor: pointer; }
.sec-state { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sec-state > div { min-width: 0; }
.sec-state.ok > .ic { color: var(--ok); }
.sec-state.warn > .ic { color: var(--warn); }
/* Bandeau d'info discret, une ligne (texte tronqué) ; .notice.warn pour un avertissement */
.notice {
  display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--muted); font-size: .92rem; font-weight: 550;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notice.warn { white-space: normal; }
.notice.warn { background: color-mix(in srgb, var(--warn) 13%, var(--surface)); color: var(--warn); }
ul.list > li.member { flex-wrap: wrap; }
.member-who { flex: 1; min-width: 0; }

/* Mot de passe : bouton afficher / masquer dans le champ ; aide sous le champ */
.pw-field { position: relative; display: block; min-width: 0; }
.pw-field > input { padding-right: 52px; }
.pw-field > .pw-eye { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pw-field > .pw-eye:active { transform: translateY(-50%) scale(.9); }
.field-help { font-size: .8rem; font-weight: 450; color: var(--muted); }
.otp-link { justify-self: start; }

/* ---------- Mon compte ---------- */
.profile { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.profile .avatar { width: 56px; height: 56px; font-size: 1.4rem; }
.profile .who { flex: 1; min-width: 140px; overflow-wrap: anywhere; }
.themes { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.theme-option {
  display: grid; gap: 10px; min-width: 0; padding: 10px; border-radius: var(--radius); text-align: left;
  background: var(--surface); color: var(--text); border: 2px solid var(--line); box-shadow: none; font-weight: 600;
  transition: border-color .25s var(--ease), box-shadow .3s var(--ease), transform .5s var(--bounce);
}
.theme-option:hover { filter: none; border-color: var(--muted); }
.theme-option[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.theme-preview {
  display: grid; grid-template-columns: 22% 1fr; gap: 6px; height: 92px; padding: 8px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--line);
}
.theme-preview i { display: block; border-radius: 6px; }
.theme-preview .p-side { background: var(--wood); }
.theme-preview .p-main { display: grid; gap: 6px; align-content: start; min-width: 0; }
.theme-preview .p-card { height: 34px; background: var(--surface); border-radius: 8px; padding: 6px; display: flex; gap: 6px; align-items: center; box-shadow: var(--shadow); }
.theme-preview .p-dot { width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--accent); }
.theme-preview .p-bar { flex: 1; height: 7px; border-radius: 99px; background: var(--accent-soft); }
.theme-preview .p-btn { width: 50%; height: 16px; border-radius: 6px; background: var(--primary); }
.favs { display: flex; flex-wrap: wrap; gap: 8px; }
.account-end { display: flex; justify-content: center; margin: 28px 0 8px; }

/* ---------- Feuille « Plus » : grille compacte 3 colonnes ---------- */
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.more-item {
  display: grid; justify-items: center; align-content: start; gap: 6px; min-width: 0; min-height: 44px; padding: 10px 4px;
  border-radius: var(--radius-sm); color: var(--text); text-decoration: none; text-align: center;
  font-size: .8rem; font-weight: 600; line-height: 1.2;
  transition: background-color .2s var(--ease), transform .45s var(--bounce);
}
.more-item:hover { background: var(--surface-2); }
.more-item:active { transform: scale(.94); transition-duration: .12s; }
.more-item .icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2); color: var(--wood); font-size: 1.1rem; }
.more-item[aria-current="page"] .icon { background: var(--accent-soft); color: var(--accent); }
.more-label { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: break-word; }

/* ---------- Animations ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rise-sm { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes drop-in { from { opacity: 0; transform: translate(-50%, -16px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(18px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.94); } }
@keyframes tick { 0% { transform: translateY(.35em); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------- Accessibilité : mouvement réduit (tout ramené à un fondu quasi instantané) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Notifications (Mon compte) ---------- */
.push-cats { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); }
#notifs label.check { margin: 4px 0; min-height: 44px; }
.push-dev { display: grid; place-items: center; flex: none; color: var(--muted); }
