/* Police Nunito embarquée (licence OFL) : pas d'appel à Google, marche hors connexion et dans l'app iPhone */

/* Keep Clown : styles. Une seule grande surface vive par écran, le reste en pastel. */
:root {
  --bg: #EFEDF5; --surface: #FFFFFF; --ink: #25233A; --muted: #6B6690; --line: #F1EFF8; --soft: #F4F2FA;
  --violet: #5E52C4; --violet-2: #6F64CC; --violet-ink: #463BA3; --violet-tint: #ECEAFB;
  --corail: #EC6A5E; --corail-tint: #FCE8E5;
  --jaune: #EFB55A; --jaune-tint: #FBF1E2; --jaune-ink: #91601A;
  --vert: #4AB39C; --vert-tint: #E5F3EE; --vert-ink: #2A7563;
  --rose: #EA97B0; --rose-tint: #F9E7EC; --rose-ink: #9A3A60;
  --bleu: #5E9EDE; --bleu-tint: #E8F0FA; --bleu-ink: #2E6AA6;
  --brun: #C29D78; --brun-tint: #F6EEE6; --brun-ink: #7A5532;
  --nuit: #25233A; --nuit-2: #302D4E; --nuit-3: #3D3960; --nuit-text: #C9C4E8;
  --r-lg: 24px; --r-md: 18px; --r-sm: 12px;
  --font: 'Nunito', 'Arial Rounded MT Bold', 'Helvetica Rounded', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--violet-ink); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Structure */
.app { min-height: 100vh; display: flex; }
.side { display: none; }
.main {
  flex: 1; min-width: 0; padding: calc(env(safe-area-inset-top, 0px) + 20px) max(18px, env(safe-area-inset-right, 0px)) 120px max(18px, env(safe-area-inset-left, 0px));
  max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px;
}
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; text-decoration: none; color: var(--ink); }
.nose { width: 20px; height: 20px; border-radius: 50%; background: var(--corail); flex: none; }
.avatars { display: flex; }
.av { width: 32px; height: 32px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; border: 2px solid var(--bg); flex: none; }
.avatars .av + .av { margin-left: -8px; }
.av.sm { width: 24px; height: 24px; font-size: 11px; border: 0; }
h1 { font-size: clamp(24px, 6vw, 32px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
h2 { font-size: 17px; font-weight: 800; margin: 0; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.accent { color: var(--violet); }
.coral { color: var(--corail); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 900px) {
  .grid.two { grid-template-columns: 1.35fr 1fr; }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.cards-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* Surfaces */
.box { background: var(--surface); border-radius: var(--r-md); padding: 16px; min-width: 0; }
.hero { background: var(--violet); color: #fff; border-radius: var(--r-lg); padding: 20px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; min-height: 190px; }
.hero > * { position: relative; }
.hero .art { position: absolute; right: -18px; top: -20px; }
.hero .big { font-size: 40px; font-weight: 800; line-height: 1; }
.hero .title { font-size: 18px; font-weight: 700; }
.hero .chip { align-self: flex-start; font-size: 12px; font-weight: 700; background: rgba(255,255,255,0.16); border-radius: 999px; padding: 5px 10px; }
.hero .eyebrow { color: #D8D2FF; }
.hero-empty { color: #E3DEFF; font-size: 15px; max-width: 70%; }

/* Boutons */
.btn { height: 44px; padding: 0 16px; border-radius: var(--r-sm); border: 0; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--soft); color: var(--ink); }
.btn.primary { background: var(--nuit); color: #fff; }
.btn.violet { background: var(--violet); color: #fff; }
.btn.white { background: #fff; color: var(--violet-ink); }
.btn.ghost-w { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.45); }
.btn.danger { background: var(--corail-tint); color: #B23A2F; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns .btn { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; }
.linkish { background: none; border: 0; padding: 0; color: var(--violet-ink); font-weight: 700; font-size: 13px; }

/* Listes de tâches */
.list { background: var(--surface); border-radius: var(--r-md); padding: 2px 14px; }
.item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.item:last-child { border-bottom: 0; }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #C9C4E8; background: #fff; flex: none; padding: 0; display: grid; place-items: center; color: #fff; }
.tick:hover { border-color: var(--violet); }
.tick.done { background: var(--vert); border-color: var(--vert); }
.bar { width: 5px; height: 26px; border-radius: 3px; flex: none; }
.time:empty { display: none; }
.time { width: 44px; font-size: 12px; font-weight: 700; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.item .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
.item .txt b { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.item .txt small { font-size: 12px; color: var(--muted); }
.item .late { color: var(--corail); font-weight: 700; }
.empty { padding: 18px 4px; color: var(--muted); font-size: 14px; }

/* Cartes de domaine */
.dcard { border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); min-height: 150px; }
.dcard .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.dcard .t { font-size: 16px; font-weight: 700; line-height: 1.2; }
.dcard .meta { font-size: 12px; margin-top: auto; }
.track { height: 6px; border-radius: 3px; background: rgba(37,35,58,0.08); overflow: hidden; }
.track > i { display: block; height: 100%; border-radius: 3px; }
.dcard.add { background: transparent; border: 2px dashed #CFCAE6; align-items: center; justify-content: center; color: var(--violet-ink); font-weight: 700; }

/* Météo */
.weather { display: flex; flex-direction: column; gap: 12px; }
.weather .now { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.temp { font-size: 38px; font-weight: 800; line-height: 1; }
.tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tip { border-radius: 14px; padding: 10px 11px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tip span { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.tip b { font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }

/* Semaine */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.day { height: 64px; border-radius: 16px; background: #fff; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; }
.day span { font-size: 10px; font-weight: 700; color: var(--muted); }
.day b { font-size: 16px; font-weight: 800; }
.day i { width: 5px; height: 5px; border-radius: 50%; }
.day.sel { background: var(--violet); color: #fff; }
.day.sel span { color: #E3DEFF; }
.day.ferie { background: var(--jaune-tint); }
.day.ferie span { color: var(--jaune-ink); }
.day.sel.ferie { background: var(--violet); }
.pro { display: grid; grid-template-columns: 78px repeat(7, minmax(0, 1fr)); gap: 4px; align-items: center; }
.pro .name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro .h { font-size: 10px; font-weight: 800; color: var(--muted); text-align: center; }
.cell { height: 28px; border-radius: 9px; border: 0; background: var(--soft); font-size: 9px; font-weight: 800; padding: 0; }
.st-tele { background: var(--violet-tint); color: var(--violet-ink); }
.st-bureau { background: #EDEBF3; color: var(--muted); }
.st-off, .st-rtt, .st-conges { background: var(--jaune-tint); color: var(--jaune-ink); }
.st-tard { background: var(--rose-tint); color: var(--rose-ink); }
.load { border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 3px; border: 0; text-align: left; flex: 1; min-width: 0; }
.load span { font-size: 11px; font-weight: 800; }
.load b { font-size: 13px; font-weight: 700; }
.remind { background: var(--corail); color: #fff; border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.remind::after { content: ""; position: absolute; right: -26px; top: -26px; width: 100px; height: 100px; border-radius: 50%; background: #F08479; }
.remind > * { position: relative; z-index: 1; }
.remind .eyebrow { color: #FFE1DD; }

/* Carte détail */
.card-head { border-radius: 26px; padding: 18px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); position: relative; overflow: hidden; }
.card-head.dark { background: var(--nuit); color: #fff; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; text-decoration: none; color: inherit; }
.note { background: #fff; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.note .who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.note p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 14px; background: var(--soft); }

/* Nous */
.pills { display: flex; gap: 10px; align-items: flex-end; height: 160px; }
.pillbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.pillbar .tube { flex: 1; width: 100%; max-width: 64px; border-radius: 999px; background: var(--soft); display: flex; align-items: flex-end; overflow: hidden; }
.pillbar .tube i { display: flex; align-items: flex-end; justify-content: center; width: 100%; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 800; padding-bottom: 8px; min-height: 34px; }
.pillbar small { font-size: 12px; font-weight: 700; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.moods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mood { border-radius: 18px; border: 2px solid transparent; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.mood[aria-checked="true"] { border-color: var(--violet); }

/* Formulaires */
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 0; }
.in { height: 44px; border-radius: var(--r-sm); border: 1.5px solid #E4E1F0; background: #fff; padding: 0 12px; font-size: 15px; color: var(--ink); width: 100%; min-width: 0; }
textarea.in { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.in:focus { border-color: var(--violet); outline: none; }
.fields { display: grid; gap: 12px; }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { height: 36px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--soft); font-size: 13px; font-weight: 700; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--nuit); color: #fff; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #E4E1F0; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--nuit); }

/* Feuille (bottom sheet) */
.scrim { position: fixed; inset: 0; background: rgba(37,35,58,0.36); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 26px 26px 0 0;
  padding: 12px max(20px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 16px; }
.sheet .grab { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: #E1DEEA; }
@media (min-width: 900px) { .scrim { align-items: center; } .sheet { border-radius: 26px; } }

/* Navigation */
.tabbar { position: fixed; left: max(14px, env(safe-area-inset-left, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  height: 66px; background: var(--nuit); border-radius: 22px; display: flex; justify-content: space-around; align-items: center; z-index: 30; max-width: 560px; margin: 0 auto; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: #A9A3D6; text-decoration: none; min-width: 54px; }
.tabbar a[aria-current="page"] { color: #fff; }
.fab { width: 54px; height: 54px; margin-top: -26px; border-radius: 50%; border: 0; background: var(--corail); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(236,106,94,0.4); flex: none; }

@media (min-width: 900px) {
  .tabbar { display: none; }
  .side { display: flex; flex-direction: column; gap: 26px; width: 236px; flex: none; position: sticky; top: 0; height: 100vh; padding: 24px 16px; box-sizing: border-box; }
  .side-in { background: var(--nuit); color: #fff; border-radius: 24px; padding: 26px 14px; display: flex; flex-direction: column; gap: 26px; height: 100%; }
  .side .brand { color: #fff; padding: 0 10px; font-size: 19px; }
  .side nav { display: flex; flex-direction: column; gap: 4px; }
  .side nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--nuit-text); text-decoration: none; font-weight: 600; font-size: 14px; }
  .side nav a[aria-current="page"] { background: #fff; color: var(--ink); }
  .side .add { margin-top: auto; height: 46px; border-radius: 999px; border: 0; background: var(--corail); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .main { padding: 28px 32px 48px; }
  .top .brand { display: none; }
}

/* Toast */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); background: var(--nuit); color: #fff; border-radius: 14px; padding: 11px 16px; font-size: 14px; font-weight: 600; display: flex; gap: 14px; align-items: center; z-index: 60; max-width: calc(100% - 32px); }
.toast button { background: none; border: 0; color: var(--jaune); font-weight: 800; padding: 0; }
@media (min-width: 900px) { .toast { bottom: 28px; } }

/* Accueil (création du foyer) */
.welcome { max-width: 440px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 48px) 22px 40px; display: flex; flex-direction: column; gap: 20px; }

@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: up .22s ease-out; }
  @keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
}

.avatars, .brand { text-decoration: none; }
.top .avatars { margin-left: auto; }

/* ===== V1 complète : navigation, plus, courses, recettes, budget, messages, contacts, famille, météo, bilan ===== */
@media (min-width: 900px) {
  .side-in { gap: 18px; padding: 22px 12px; overflow-y: auto; }
  .side nav { gap: 2px; }
  .side nav a { padding: 8px 12px; font-size: 13.5px; }
}
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--corail); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.tabbar a { position: relative; }
.tabbar .badge { position: absolute; top: -6px; right: 6px; margin: 0; }
.av.xl { width: 64px; height: 64px; font-size: 26px; border: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qchip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; text-decoration: none; }
.qchip svg { width: 17px; height: 17px; }

/* Plus */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; border-radius: 22px; padding: 16px; min-height: 128px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.tile .ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; margin-bottom: auto; }
.tile b { font-size: 16px; font-weight: 800; margin-top: 12px; }
.tile small { font-size: 12px; font-weight: 700; }
.tile .badge { position: absolute; top: 14px; right: 14px; }

/* Courses */
.add-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 640px) { .add-row { grid-template-columns: minmax(0, 1fr) 200px auto; } }
.gchip { border: 0; background: var(--jaune-tint); color: var(--jaune-ink); font-weight: 700; font-size: 14px; padding: 9px 14px; border-radius: 999px; display: inline-flex; gap: 8px; align-items: center; }
.gchip.edit { background: var(--corail-tint); color: #B23A2F; }
.gchip.edit span { font-size: 17px; line-height: 1; }

/* Recettes */
.rgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.rtile { border-radius: 22px; padding: 12px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); min-height: 200px; border: 0; text-align: left; }
.rtile img, .rtile .rart { width: 100%; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 16px; object-fit: cover; }
.rtile .rart { display: grid; place-items: center; color: #fff; font-size: 40px; font-weight: 800; }
.rtile b { font-size: 15px; font-weight: 800; line-height: 1.2; }
.rtile small { font-size: 12px; font-weight: 700; }
.rtile.add { background: transparent; border: 2px dashed #CFCAE6; align-items: center; justify-content: center; color: var(--violet-ink); font-weight: 700; }
.rphoto { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--r-lg); }
.ings, .steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.ings li::marker { color: var(--jaune); }
.steps li::marker { color: var(--violet); font-weight: 800; }

/* Budget */
.item .num { font-variant-numeric: tabular-nums; }
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }

/* Graphiques */
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(70px, 34%) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar .lab { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .trk { height: 14px; background: var(--soft); border-radius: 999px; overflow: hidden; display: flex; }
.hbar .trk i { display: block; height: 100%; border-radius: 999px; }
.hbar .trk.stack i { border-radius: 0; }
.hbar b { font-variant-numeric: tabular-nums; font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.heat { display: grid; grid-template-columns: 34px repeat(12, minmax(14px, 1fr)); gap: 4px; min-width: 260px; }
.heat .hl { font-size: 11px; color: var(--muted); font-weight: 700; align-self: center; }
.heat i { aspect-ratio: 1; border-radius: 5px; display: block; }

/* Messages */
.chat { display: flex; flex-direction: column; gap: 8px; }
.daysep { align-self: center; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 10px 0 2px; }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 82%; }
.msg.me { align-self: flex-end; }
.bub { background: #fff; border-radius: 18px 18px 18px 6px; padding: 9px 13px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.msg.me .bub { background: var(--violet); color: #fff; border-radius: 18px 18px 6px 18px; }
.bub p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bub .who { font-size: 12px; font-weight: 800; color: var(--violet-ink); }
.bub time { font-size: 10.5px; opacity: .7; align-self: flex-end; }
.bub img { max-width: 240px; width: 100%; border-radius: 12px; display: block; }
.bub .file { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: inherit; }
.composer { position: sticky; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; align-items: flex-end; background: var(--surface); border-radius: 22px; padding: 8px; box-shadow: 0 6px 24px rgba(37,35,58,.12); z-index: 5; }
.composer textarea.in { min-height: 44px; height: 44px; resize: none; border: 0; background: var(--soft); }
@media (min-width: 900px) { .composer { bottom: 16px; } }

/* Contacts, famille */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); font-weight: 600; flex: none; }
.kv b { text-align: right; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.stat { background: var(--vert-tint); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; }
.stat span { font-size: 12px; font-weight: 700; color: var(--vert-ink); }
.stat b { font-size: 24px; font-weight: 800; }

/* Tableau d'idées */
.notes { display: flex; flex-direction: column; gap: 10px; }
.feed { columns: 1; column-gap: 12px; }
@media (min-width: 1100px) { .feed { columns: 2; } }
.feed .note { break-inside: avoid; margin-bottom: 12px; }
.note img { width: 100%; max-width: 100%; border-radius: 14px; display: block; }
.linkcard { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-decoration: none; color: var(--ink); background: var(--soft); border-radius: 14px; padding: 10px 12px; }
.linkcard b { font-size: 14px; overflow-wrap: anywhere; }

/* Météo */
.hours { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; }
.hour { flex: none; width: 58px; background: var(--soft); border-radius: 16px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; }
.hour small { font-size: 11px; font-weight: 700; color: var(--muted); }
.week { display: flex; flex-direction: column; margin-top: 6px; }
.wday { display: grid; grid-template-columns: 52px 34px 40px 32px minmax(40px, 1fr) 32px; gap: 8px; align-items: center; padding: 6px 8px; border: 0; background: none; border-radius: 14px; text-align: left; font-weight: 700; }
.wday.sel { background: var(--bleu-tint); }
.wday .rain { color: var(--bleu-ink); font-weight: 700; }
.wday .mn { color: var(--muted); text-align: right; }
.wday .rng { position: relative; height: 8px; background: var(--soft); border-radius: 999px; }
.wday .rng i { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #5E9EDE, #EFB55A); }
.note .who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; font-weight: 700; }
.note .who .muted { white-space: nowrap; }
.feed { columns: 1; }
@media (min-width: 700px) { .feed { columns: 2; } }
@media (min-width: 1150px) { .feed { columns: 3; } }
.main.is-chat { min-height: 100vh; }
.main.is-chat .chat { flex: 1; justify-content: flex-end; }

/* Saisie rapide */
.qout { display: flex; flex-direction: column; gap: 10px; min-height: 40px; }
.qtitle { font-size: 17px; font-weight: 800; }
.qtag { display: inline-flex; align-items: center; gap: 6px; background: var(--violet-tint); color: var(--violet-ink); border-radius: 999px; padding: 6px 6px 6px 12px; font-size: 13px; font-weight: 700; }
.qtag small { color: var(--muted); font-weight: 600; padding-right: 6px; }
.qtag button { border: 0; background: rgba(255,255,255,.7); color: var(--violet-ink); width: 24px; height: 24px; border-radius: 50%; font-size: 15px; line-height: 1; padding: 0; }
.qtag:not(:has(button)) { padding-right: 12px; }
.toast button + button { margin-left: -4px; }

/* ===== Agenda (iPhone d'abord) ===== */
.calhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; background: var(--bg); padding-block: 6px; margin-block: -6px; }
.caltitle { font-size: clamp(22px, 6vw, 30px); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calnav { display: flex; gap: 6px; flex: none; }
.cbtn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--surface); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.cbtn.txtb { width: auto; padding: 0 12px; }
.cbtn.plus { background: var(--corail); color: #fff; }
.segc { display: grid; grid-template-columns: repeat(4, 1fr); background: #E3E0EE; border-radius: 14px; padding: 3px; gap: 2px; }
.segc button { height: 38px; border: 0; background: transparent; border-radius: 11px; font-weight: 800; font-size: 14px; color: var(--muted); }
.segc button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(37,35,58,.12); }
.whofilter { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: -2px; padding: 2px; }
.whofilter::-webkit-scrollbar { display: none; }
.whofilter button { flex: none; height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 8px; border-radius: 999px; border: 0; background: var(--surface); font-weight: 700; font-size: 13px; color: var(--muted); }
.whofilter button:first-child { padding-left: 12px; }
.whofilter button[aria-pressed="true"] { background: var(--nuit); color: #fff; }
.calbody { display: flex; flex-direction: column; gap: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .calbody.anim-next { animation: calnext .22s ease-out; }
  .calbody.anim-prev { animation: calprev .22s ease-out; }
  @keyframes calnext { from { opacity: .3; transform: translateX(18px); } to { opacity: 1; transform: none; } }
  @keyframes calprev { from { opacity: .3; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
}

/* Mois */
.month { background: var(--surface); border-radius: var(--r-lg); padding: 10px 6px; touch-action: pan-y; }
.mhead, .mweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mhead span { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); padding-bottom: 4px; }
.mday { height: 54px; border: 0; background: none; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 6px; gap: 3px; position: relative; color: var(--ink); min-width: 0; }
.mday .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.mday.out { opacity: .35; }
.mday.school { background: #F0F8F5; }
.mday.ferie .n { color: var(--corail); }
.mday.today .n { box-shadow: inset 0 0 0 2px var(--corail); }
.mday.sel .n { background: var(--violet); color: #fff; box-shadow: none; }
.mday.insel { background: var(--corail-tint); }
.mday .dots { display: flex; gap: 3px; height: 6px; align-items: center; }
.mday .dots i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.mday .dots b { font-size: 9px; color: var(--muted); line-height: 1; }
.mday .band { position: absolute; left: 8px; right: 8px; bottom: 4px; display: flex; gap: 2px; }
.mday .band i { flex: 1; height: 4px; border-radius: 2px; display: block; }
.selbar { position: sticky; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 5; background: var(--corail); color: #fff; border-radius: 18px; padding: 10px 12px 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 14px; }
@media (min-width: 900px) { .selbar { bottom: 16px; } }
.soft-period { background: var(--surface); color: var(--violet-ink); }
.program { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 120px; }
.addday { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--violet-tint); color: var(--violet-ink); display: grid; place-items: center; flex: none; }
.empty-add { width: 100%; border: 0; background: none; padding: 16px 4px; text-align: left; color: var(--muted); font-weight: 600; font-size: 14px; }
.prochip { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 800; min-height: 34px; }
.prochip i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.item.ev .evtime { width: 46px; display: flex; flex-direction: column; line-height: 1.15; color: var(--ink); }
.item.ev .evtime small { color: var(--muted); font-weight: 600; }
.item .avs { display: flex; flex: none; }
.item .avs .av + .av { margin-left: -6px; box-shadow: 0 0 0 2px #fff; }
.item.warn { border-bottom: 0; }
.warnline { display: block; width: 100%; text-align: left; border: 0; background: var(--corail-tint); color: #B23A2F; font-weight: 700; font-size: 12.5px; border-radius: 10px; padding: 7px 10px; margin: 0 0 8px; }
.warnbox { background: var(--corail-tint); color: #B23A2F; font-weight: 700; font-size: 13.5px; border-radius: 14px; padding: 10px 12px; display: grid; gap: 4px; }

/* Semaine */
.wstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; touch-action: pan-y; }
.sday { height: 58px; border: 0; border-radius: 16px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink); }
.sday span { font-size: 11px; font-weight: 800; color: var(--muted); }
.sday b { font-size: 17px; }
.sday.today b { color: var(--corail); }
.sday.ferie span { color: var(--corail); }
.sday.sel { background: var(--violet); }
.sday.sel span, .sday.sel b { color: #fff; }
.loads { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.loads .load { width: 100%; }
.weeklist { display: flex; flex-direction: column; gap: 14px; touch-action: pan-y; }
.wday-sec { display: flex; flex-direction: column; gap: 6px; }
.wdh { display: flex; align-items: baseline; gap: 8px; border: 0; background: none; padding: 4px 2px; text-align: left; color: var(--ink); flex-wrap: wrap; }
.wdh b { font-size: 16px; font-weight: 800; }
.wdh span { color: var(--muted); font-weight: 600; font-size: 13px; }
.wday-sec.is-today .wdh b { color: var(--corail); }
.free { border: 1.5px dashed #D9D5EA; background: none; border-radius: 14px; height: 44px; color: var(--muted); font-weight: 700; }

/* Jour */
.dayhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.allday { display: flex; flex-direction: column; gap: 8px; }
.allday > .prochip { align-self: flex-start; }
.timeline { position: relative; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; touch-action: pan-y; }
.slot { position: absolute; left: 0; right: 0; height: 52px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; padding: 0; }
.slot span { position: absolute; left: 10px; top: -1px; transform: translateY(2px); font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.slot:active { background: var(--soft); }
.tblock { position: absolute; border: 0; border-left: 4px solid; border-radius: 10px; padding: 4px 8px; text-align: left; overflow: hidden; display: flex; flex-direction: column; gap: 1px; font-size: 13px; z-index: 2; }
.tblock b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tblock small { font-size: 11.5px; font-weight: 700; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tblock.warn { box-shadow: inset 0 0 0 2px var(--corail); }
.nowline { position: absolute; left: 48px; right: 0; height: 2px; background: var(--corail); z-index: 3; }
.nowline::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--corail); }

/* Année */
.yearsum { display: grid; gap: 8px; }
.ysum { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; background: var(--surface); border-radius: 16px; padding: 10px 12px; font-size: 14px; }
.years { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; touch-action: pan-y; }
@media (min-width: 700px) { .years { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mini { border: 0; background: var(--surface); border-radius: 16px; padding: 8px 7px 9px; display: flex; flex-direction: column; gap: 6px; text-align: left; color: var(--ink); min-width: 0; }
.mini b { font-size: 13px; font-weight: 800; padding-left: 2px; }
.mg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.mg i { aspect-ratio: 1; border-radius: 3px; background: var(--soft); display: block; }
.mg i.o { background: transparent; }
.mg i.w { background: #E9E6F2; }
.mg i.t { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* Feuilles agenda */
.choices { display: grid; gap: 10px; }
.choice { border: 0; border-radius: 20px; padding: 14px 16px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left; align-items: center; min-height: 72px; color: var(--ink); }
.choice .ico { grid-row: span 2; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.choice b { font-size: 16px; font-weight: 800; }
.choice small { color: var(--muted); font-weight: 600; }
.in.big { height: 52px; font-size: 18px; font-weight: 700; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-weight: 700; font-size: 15px; }
.toggle input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 999px; background: #DCD8EA; position: relative; flex: none; order: 2; cursor: pointer; transition: background .15s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.toggle input:checked { background: var(--vert); }
.toggle input:checked::after { left: 23px; }
.protiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 420px) { .protiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.protiles button { min-height: 46px; border: 0; border-radius: 14px; background: var(--soft); font-weight: 800; font-size: 13px; display: flex; align-items: center; gap: 7px; padding: 0 10px; color: var(--ink); }
.protiles button i { width: 10px; height: 10px; border-radius: 50%; display: block; flex: none; }
.protiles button[aria-pressed="true"] { background: var(--nuit); color: #fff; }
.qchip.small { padding: 7px 12px; font-size: 12.5px; background: var(--soft); color: var(--ink); border: 0; }
.procount { font-size: 13px; font-weight: 700; }
.seg.multi button[aria-pressed="true"] { background: var(--violet); color: #fff; }
.sheet input[type=date], .sheet input[type=time] { -webkit-appearance: none; appearance: none; min-height: 44px; }
.sheet { max-height: min(92vh, 92dvh); padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.calbody > .btn { width: auto; max-width: 100%; align-self: stretch; }
div.f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 0; }
@media (max-width: 480px) {
  .caltitle { font-size: 22px; }
  .cbtn { width: 38px; height: 40px; border-radius: 12px; }
  .cbtn.txtb { padding: 0 10px; }
  .calnav { gap: 4px; }
}
.scrim { padding-bottom: var(--kb, 0px); transition: padding-bottom .15s; }
.sheet { max-height: calc(min(92vh, 92dvh) - var(--kb, 0px)); }
.sheet .in:focus { scroll-margin-bottom: 90px; }
.protiles { display: flex; flex-wrap: wrap; gap: 6px; }
.protiles button { flex: 1 1 auto; min-width: calc(33% - 6px); justify-content: center; }
.wday-sec { scroll-margin-top: calc(70px + env(safe-area-inset-top, 0px)); }
.loads .load { padding: 10px 12px; gap: 2px; }
.loads .load span { font-size: 10.5px; letter-spacing: .02em; }
.loads .load b { font-size: 14px; }

/* Catégories ajoutées dans Plus */
.tile.add { border: 2px dashed #CFCAE6; background: transparent; color: var(--violet-ink); text-align: left; align-items: flex-start; justify-content: center; gap: 6px; }
.tile.add svg { width: 28px; height: 28px; }
.tile.add b { margin-top: 4px; font-size: 15px; }
.tile.add small { color: var(--muted); }
.tile.editing { position: relative; }
.tile-x { position: absolute; top: -8px; left: -8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--nuit); color: #fff; font-size: 18px; line-height: 1; display: grid; place-items: center; }
.tile-edit { margin-top: 8px; align-self: flex-start; border: 0; background: rgba(255,255,255,.75); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 12px; min-height: 32px; }
.iconpick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.iconpick button { aspect-ratio: 1; min-height: 44px; border: 0; border-radius: 14px; background: var(--soft); color: var(--ink); display: grid; place-items: center; }
.iconpick button[aria-pressed="true"] { background: var(--nuit); color: #fff; }

/* Recherche */
.searchbtn { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); display: grid; place-items: center; flex: none; }
.top .searchbtn + .avatars { margin-left: 0; }
@media (min-width: 900px) { .searchbtn { display: none; } }
.side-search { display: flex; align-items: center; gap: 10px; height: 42px; border-radius: 12px; border: 0; background: var(--nuit-2); color: var(--nuit-text); font-weight: 600; font-size: 14px; padding: 0 12px; }
.side-search kbd { margin-left: auto; font: 700 11px var(--font); color: #A9A3D6; }
.search-sheet { gap: 14px; }
.sheet:has(.search-sheet) { min-height: min(80vh, 80dvh); }
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 14px; padding-left: 12px; color: var(--muted); }
.searchbar .in { border: 0; background: transparent; height: 46px; padding-left: 4px; font-size: 16px; }
.searchbar .linkish { padding: 0 12px; min-height: 44px; }
.sresults { display: flex; flex-direction: column; gap: 14px; }
.sgroup { display: flex; flex-direction: column; gap: 6px; }
.sgroup .list { padding: 0 12px; background: var(--soft); }
.sres { width: 100%; background: none; border: 0; text-align: left; border-bottom: 1px solid #E9E6F2; min-height: 52px; }
.sres .txt b { font-weight: 700; }
@media (max-width: 480px) { .calnav .cbtn[data-act="search-open"] { width: 38px; } }
.caltitle .yr { font-weight: 600; color: var(--muted); font-size: .8em; }

/* Bande sous l'encoche : le contenu ne passe jamais sous l'heure et la Dynamic Island */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 20; pointer-events: none; }
.tblock.short { flex-direction: row; align-items: center; gap: 6px; padding-block: 2px; }
.tblock.short small { flex: none; }
@media (max-width: 400px) { .cbtn { width: 36px; } .calnav { gap: 3px; } .caltitle { font-size: 21px; } }

.demo-bar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding-block: 7px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: #25233A; color: #E4E0F6; font: 600 12px Nunito, system-ui, sans-serif; text-align: center; }
.demo-bar button { font: inherit; color: #EFB55A; background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 2px 4px; }
