/* Victoria — design system v4 « bleu souris » (mission 17).
   Principes : police Urbanist partout (titres 500, texte 400, jamais de gras lourd), fond bleu très pâle, cartes blanches de 22 px sans bordure avec une ombre très douce,
   un seul accent bleu souris-ciel #52729C, halo pêche + bleu ciel autour de Victoria (seule animation permanente), barre du bas flottante. Aucun noir, aucun bleu vif.
   Toutes les couleurs, tailles et espacements passent par les variables ci-dessous (voir CLAUDE.md, « Design system v4 »). Maquettes de référence : dossier maquettes-v4. */

/* ---------- 1. Police (hébergée sur le serveur : mise en cache par l'appli, aucune requête vers Google) ---------- */
@font-face { font-family: 'Urbanist'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/urbanist-latin.woff2) format('woff2'); }

/* ---------- 2. Variables ---------- */
:root {
  /* Surfaces */
  --bg: #F3F6FA;             /* fond de page */
  --card: #FFFFFF;           /* cartes, barre, champs */
  --tint: #E6ECF4;           /* aplat discret (filtres, champs désactivés, retour au toucher) */
  --line: #ECEFF3;           /* filets */
  --line-btn: #DCDDE2;       /* contour des boutons secondaires et des champs */
  --check: #C7D0DC;          /* rond à cocher */
  --scrim: rgba(44, 53, 70, .38);
  /* Textes */
  --ink: #2C3546;            /* titres et texte */
  --t-soft: #5C5F6B;         /* texte secondaire */
  --t-nav: #7C7F8A;          /* onglets inactifs */
  --t-past: #B4B6BE;         /* phrases passées (karaoké) */
  --t-next: #D3D4D9;         /* phrase suivante (karaoké) */
  --chev: #9A9CA6;
  /* Accent unique : bleu souris-ciel */
  --accent: #52729C;
  --on-accent: #FFFFFF;
  --on-accent-soft: rgba(255, 255, 255, .6);
  --ring: #DDE8F6;           /* anneau du micro */
  --accent-bg: #E6EFFA;      /* pastille d'accent (jour, icône) */
  --accent-ink: #3F6496;
  /* Halo de Victoria */
  --halo-1: #FFC4A8; --halo-2: #BCD7F5; --halo-op: 1;
  /* États */
  --warn-bg: #FFEDE4; --warn-ink: #B4380B;          /* à regarder / alerte */
  --ok: #12805C; --ok-bg: #E3F3EC; --ok-ink: #0E6B4D;
  --bad: #B4380B;
  /* Types de rappels */
  --k-urgent: #E0603F; --k-pro: #52729C; --k-perso: #4E9A7A; --k-idee: #D69A2D;
  /* Ombres */
  --shadow: 0 1px 2px rgba(44, 53, 70, .04), 0 8px 24px rgba(44, 53, 70, .05);
  --shadow-bar: 0 12px 34px rgba(44, 53, 70, .10);
  --shadow-top: 0 14px 40px rgba(44, 53, 70, .18);
  --shadow-photo: 0 10px 30px rgba(44, 53, 70, .12);
  --bar-bg: rgba(255, 255, 255, .96);
  --bar-line: #E3E8EF;
  --track: #D5DEEA;
  /* Typographie */
  --font: 'Urbanist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-h1: 30px;             /* « Bonsoir Raphaël » */
  --fs-title: 34px;          /* titre d'écran (Rappels, Pubs…) */
  --fs-lead: 21px;           /* phrase-résumé */
  --fs-num: 32px;            /* chiffres clés */
  --fs-h2: 18px;
  --fs-row: 17px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-cap: 13px;
  --fs-nav: 13px;
  /* Espacements (système 4/8) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --gut: 20px;
  /* Rayons */
  --r-card: 22px; --r-s: 14px; --r-pill: 999px; --r-sheet: 28px;
  /* Mouvement (toujours < 300 ms) */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --bar-h: 64px; --bar-gap: 0px; --mini-h: 0px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151A23; --card: #1E2532; --tint: #263044; --line: #2A3342; --line-btn: #3A4558; --check: #4A5568; --scrim: rgba(8, 11, 16, .62);
    --ink: #E8EDF5; --t-soft: #A9B3C4; --t-nav: #8D97A8; --t-past: #6B7587; --t-next: #46505F; --chev: #6F7A8C;
    --accent: #8FAAD0; --on-accent: #151A23; --on-accent-soft: rgba(21, 26, 35, .62); --ring: #2A3750; --accent-bg: #2A3750; --accent-ink: #BFD0EA;
    --halo-1: #B5694A; --halo-2: #3E6397; --halo-op: .55;
    --warn-bg: #3A2A24; --warn-ink: #FFB59A; --ok: #3FBF8F; --ok-bg: #173127; --ok-ink: #7FD9B6; --bad: #FFA58A;
    --k-urgent: #F07B5A; --k-pro: #8FAAD0; --k-perso: #6DBF9C; --k-idee: #E6B452;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 0, 0, .22); --shadow-bar: 0 12px 34px rgba(0, 0, 0, .40); --shadow-top: 0 14px 40px rgba(0, 0, 0, .5); --shadow-photo: 0 10px 30px rgba(0, 0, 0, .4);
    --bar-bg: #1E2532; --bar-line: #2A3343; --track: #3A4558;
  }
}

/* ---------- 3. Base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { color-scheme: light dark; -webkit-text-size-adjust: 100%; background: var(--bg); overflow-x: hidden; overflow-x: clip; max-width: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--fs-body); font-weight: 400; line-height: 1.45; min-height: 100vh; overflow-x: hidden; overflow-x: clip; max-width: 100%; font-feature-settings: 'tnum' 1; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--ink); letter-spacing: -.02em; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ink); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.eyebrow { font-size: var(--fs-body); color: var(--t-soft); font-weight: 400; letter-spacing: 0; }
input, select, textarea, .field { font-size: 16px; } /* en dessous de 16 px, iOS zoome sur le champ */
#app, main.wrap, .view { max-width: 100%; min-width: 0; }

/* ---------- 4. Mouvement ---------- */
@keyframes ek-spin { to { transform: rotate(360deg); } }
@keyframes ek-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes ek-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ek-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ek-slide { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ek-page { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes ek-skel { to { background-position: -200% 0; } }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(10px, -8px) scale(1.12); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) scale(1.08); } 50% { transform: translate(-12px, 8px) scale(.96); } }
@keyframes drift1v { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(16px, -12px) scale(1.15); } }
@keyframes drift2v { 0%, 100% { transform: translate(0, 0) scale(1.1); } 50% { transform: translate(-18px, 10px) scale(.92); } }
@keyframes wave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.ek-dot-pulse { animation: ek-pulse 2.4s ease-in-out infinite; }
.view:not([hidden]) > * { animation: ek-rise .2s var(--ease) both; }
.view:not([hidden]) > :nth-child(2) { animation-delay: .015s; } .view:not([hidden]) > :nth-child(3) { animation-delay: .03s; }
.view:not([hidden]) > :nth-child(4) { animation-delay: .045s; } .view:not([hidden]) > :nth-child(5) { animation-delay: .06s; }
.view:not([hidden]) > :nth-child(n+6) { animation-delay: .075s; }
.sheet-bg:not([hidden]) { animation: ek-fade .2s ease-out; }
.sheet-bg:not([hidden]) .sheet { animation: ek-slide .28s var(--ease); }
#voice:not([hidden]) { animation: ek-fade .22s ease-out; }
#agenda-page:not([hidden]), #leads-page:not([hidden]), #rappels-page:not([hidden]) { animation: ek-page .26s var(--ease); }
.skel, .skel-block i, .skel-row { background: linear-gradient(90deg, var(--line) 25%, var(--tint) 50%, var(--line) 75%); background-size: 200% 100%; animation: ek-skel 1.2s ease-in-out infinite; border-radius: 8px; }
.skel-block { display: grid; gap: 10px; padding: 4px 0; }
.skel-block i { display: block; height: 18px; }
.skel-block i:nth-child(odd) { width: 92%; } .skel-block i:nth-child(even) { width: 68%; }
.skel-row { height: 56px; margin: 0 0 8px; border-radius: var(--r-s); }
.btn, .tab, .vchip, .info-btn, .ag-mic, .btn-main, .btn-alt, .btn-face, .center, .back, .ic-btn, .link-mini, .link-quiet, .swt, .chip.pe, .rc-check, .rf-tab, .rc-send { transition: transform .1s ease, opacity .1s ease, background-color .15s ease; touch-action: manipulation; }
.btn:active, .tab:active, .vchip:active, .btn-main:active, .btn-alt:active, .btn-face:active, .center:active, .back:active, .ic-btn:active, .chip.pe:active, .rc-check:active { transform: scale(.96); opacity: .88; }
.tile:active, .mrow:active, .pcard:active, .ev-row:active, .watch:active, .nextcard:active, .today-title:active { background: var(--tint); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- 5. Composants ---------- */
.btn { min-height: 48px; padding: 0 var(--s5); border-radius: 24px; border: 1px solid var(--line-btn); background: var(--card); color: var(--ink); font-size: 17px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); text-decoration: none; }
.btn.primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.btn.danger { border-color: transparent; background: var(--warn-bg); color: var(--warn-ink); }
.btn:disabled { opacity: .5; }
.btns { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.link-quiet { margin: var(--s4) 0 var(--s6); min-height: 44px; display: inline-flex; align-items: center; background: none; border: 0; color: var(--t-soft); font-size: var(--fs-body); padding: 0 var(--s3); }
.link-mini { border: 0; background: none; min-height: 44px; padding: 0 var(--s2); color: var(--t-soft); font-size: var(--fs-small); font-weight: 500; }
.ic-btn { flex: none; width: 44px; height: 44px; border: 0; background: none; color: var(--t-soft); display: inline-grid; place-items: center; border-radius: var(--r-s); }
.ic-btn svg { width: 20px; height: 20px; }
.ic-btn.spin svg, .foot button.spin svg, .mails-bar .btn.spin svg { animation: ek-spin .9s linear infinite; }
.back { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); box-shadow: 0 1px 2px rgba(44, 53, 70, .06); color: var(--ink); display: grid; place-items: center; }
.back svg { width: 20px; height: 20px; }
.field { width: 100%; height: 52px; border-radius: 16px; border: 1px solid var(--line-btn); background: var(--card); color: var(--ink); padding: 0 var(--s4); }
.field::placeholder { color: var(--t-soft); opacity: .85; }
textarea.field { height: auto; min-height: 110px; padding: var(--s3) var(--s4); resize: vertical; line-height: 1.4; }
select.field { appearance: auto; padding: 0 10px; }
.vchips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0; }
.vchip { min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-pill); border: 1px solid var(--line-btn); background: var(--card); color: var(--t-soft); font-size: var(--fs-small); font-weight: 500; }
.vchip.sel { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.chip { border-radius: var(--r-pill); padding: 4px 12px; font-size: var(--fs-small); color: var(--t-soft); background: var(--tint); }
.chip.pe { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 500; border: 1px solid transparent; }
.chip.pe.on { border-color: var(--accent); background: var(--accent-bg); color: var(--accent-ink); }
.dotk { width: 9px; height: 9px; border-radius: 50%; background: var(--t-nav); flex: none; }
.dotk.ok { background: var(--ok); } .dotk.warn { background: var(--k-idee); } .dotk.bad { background: var(--k-urgent); }
.swrow { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 56px; border-top: 1px solid var(--line); font-size: var(--fs-body); color: var(--ink); }
.swrow:first-of-type { border-top: 0; }
.swt { flex: none; width: 60px; height: 44px; border: 0; background: transparent; position: relative; padding: 0; }
.swt::before { content: ""; position: absolute; left: 0; top: 7px; width: 60px; height: 30px; border-radius: 999px; background: var(--check); transition: background-color .18s ease; }
.swt::after { content: ""; position: absolute; top: 10px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(44, 53, 70, .25); transition: transform .18s var(--ease); }
.swt[aria-checked="true"]::before { background: var(--accent); }
.swt[aria-checked="true"]::after { transform: translateX(30px); }
.swt:disabled { opacity: .5; }
.note { font-size: var(--fs-small); color: var(--t-soft); }
.status-line { margin-top: var(--s3); font-size: var(--fs-small); color: var(--t-soft); min-height: 20px; }
.status-line.ok { color: var(--ok-ink); font-weight: 500; }
.err { color: var(--warn-ink); font-size: var(--fs-small); margin-top: var(--s2); }
.err::before { content: "! "; font-weight: 600; }
.empty { padding: var(--s4); font-size: var(--fs-body); color: var(--t-soft); }
/* Titres de section */
.sec-head { margin-top: 28px; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.sec-head h2 { font-size: var(--fs-h2); font-weight: 500; letter-spacing: -.01em; }
.sec-head span { font-size: var(--fs-small); color: var(--t-soft); }
.sec-head .tot { display: inline-flex; align-items: center; gap: 2px; }
.today-head { align-items: center; }
.today-title { border: 0; background: none; padding: 0; min-height: 44px; display: inline-flex; align-items: center; color: inherit; font: inherit; border-radius: var(--r-s); }
.today-tools { display: inline-flex; align-items: center; gap: 2px; }
.today-at { font-size: var(--fs-cap); color: var(--t-soft); padding: 0 0 var(--s2); min-height: 16px; }
/* Cartes : blanches, 22 px, ombre douce, sans bordure */
.card, .panel, .list, .pgrid, .mbox { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); }
.list { display: flex; flex-direction: column; overflow: hidden; margin-top: 10px; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); min-height: 60px; margin-left: 0; }
.row:last-child { border-bottom: 0; }
.row .when { font-size: var(--fs-row); font-weight: 500; color: var(--ink); width: 64px; flex: none; display: flex; font-variant-numeric: tabular-nums; }
.row .tx { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.row .t { font-size: var(--fs-row); font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.row .s { font-size: var(--fs-small); color: var(--t-soft); overflow-wrap: anywhere; }
.more { display: block; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); color: var(--t-soft); font-size: var(--fs-body); text-align: left; min-height: 48px; padding: 0 16px; }
.panel { margin-top: var(--s3); padding: var(--s4); }
.panel h3 { font-size: var(--fs-h2); font-weight: 500; letter-spacing: -.01em; margin-bottom: var(--s3); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; }
.panel h3 > :first-child { white-space: nowrap; }
.panel h3 small { font-weight: 400; font-size: var(--fs-small); color: var(--t-soft); letter-spacing: 0; }
.panel .sec-head { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.panel .list { box-shadow: none; border-radius: 0; margin-top: var(--s2); background: transparent; }
.panel .list .row { padding-left: 0; padding-right: 0; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.kpi { padding: var(--s3) 0 var(--s3); display: flex; flex-direction: column; gap: 6px; }
.kpi:nth-child(even) { border-left: 1px solid var(--line); padding-left: var(--s4); }
.kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
.kpi .lbl { font-size: var(--fs-small); color: var(--t-soft); }
.kpi .val { font-size: var(--fs-num); font-weight: 500; color: var(--ink); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: 18px; font-weight: 400; color: var(--ink); letter-spacing: 0; }
.kpi .sub { font-size: var(--fs-cap); color: var(--t-soft); }
.camp { padding: 14px 0; border-top: 1px solid var(--line); display: flex; gap: var(--s3); align-items: flex-start; }
.camp:first-child { border-top: 0; }
.camp .n { font-size: var(--fs-row); color: var(--ink); font-weight: 500; }
.camp .d { font-size: var(--fs-small); color: var(--t-soft); margin-top: 3px; }
.group { font-size: var(--fs-small); color: var(--t-soft); padding: var(--s4) 0 var(--s1); font-weight: 500; }
.tobe { margin-top: var(--s2); font-size: var(--fs-small); color: var(--t-soft); }
.tobe details { margin-top: 6px; }
.tobe summary { cursor: pointer; color: var(--t-soft); min-height: 44px; display: flex; align-items: center; text-decoration: underline; text-underline-offset: 4px; }
.tobe ol { margin: 4px 0 8px; padding-left: 20px; color: var(--t-soft); }
.tobe code { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--tint); color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.dev { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.dev:first-of-type { border-top: 0; }
.dev .tx { flex: 1; min-width: 0; } .dev .t { font-size: var(--fs-body); font-weight: 500; color: var(--ink); } .dev .s { font-size: var(--fs-small); color: var(--t-soft); }
.faceid-state { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-s); background: var(--tint); }
.faceid-state .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--accent); flex: none; }
.faceid-state.on { background: var(--ok-bg); }
.faceid-state.on .ic { color: var(--ok-ink); }
.faceid-state .t { font-size: var(--fs-body); font-weight: 500; color: var(--ink); } .faceid-state .s { font-size: var(--fs-small); color: var(--t-soft); }
.push-btn { width: 100%; min-height: 52px; font-size: 17px; font-weight: 500; gap: var(--s2); border-radius: 26px; }
.push-btn svg { width: 20px; height: 20px; }
.push-btn.push-ok { background: var(--ok); border-color: var(--ok); color: #FFFFFF; }
.push-btn.push-off { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.push-btn:disabled { background: transparent; border-color: var(--line-btn); color: var(--t-soft); }
/* À regarder : cartes d'alerte et de rappel du jour */
#alerts:empty { display: none; }
.watch { width: 100%; margin-top: 10px; text-decoration: none; padding: var(--s4); border: 0; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; text-align: left; color: inherit; min-height: 76px; }
.watch .ic { width: 44px; height: 44px; flex: none; border-radius: var(--r-s); background: var(--warn-bg); color: var(--warn-ink); display: flex; align-items: center; justify-content: center; }
.watch .tx { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.watch .t1 { font-size: var(--fs-body); font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.watch .t2 { font-size: var(--fs-small); line-height: 1.35; color: var(--t-soft); overflow-wrap: anywhere; }
.watch .chev { color: var(--chev); flex: none; }
.watch .chev svg { width: 20px; height: 20px; }
.watch.late .ic { background: var(--warn-bg); color: var(--warn-ink); }
.rdot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.k-urgent { background: var(--k-urgent); } .k-pro { background: var(--k-pro); } .k-perso { background: var(--k-perso); } .k-idee { background: var(--k-idee); }
/* Bandeau « Maintenant » (agenda) */
#now:empty { display: none; }
.now { margin-top: var(--s3); padding: var(--s4); border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.now-k { font-size: var(--fs-small); color: var(--t-soft); font-weight: 500; }
.now-t { font-size: 22px; font-weight: 500; letter-spacing: -.02em; color: var(--ink); line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-c { font-size: 32px; font-weight: 500; color: var(--accent-ink); line-height: 1.1; letter-spacing: -.03em; }
.now-l { font-size: var(--fs-body); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-l.warn { color: var(--warn-ink); font-weight: 500; }
.now-cta { margin-top: var(--s2); width: 100%; }
.now-link { align-self: flex-start; border: 0; background: none; color: var(--accent-ink); font-size: var(--fs-body); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; padding: 0; }
.now.avant .now-k { color: var(--accent-ink); }
.now.pendant .now-t { font-size: 19px; } .now.pendant .now-l { color: var(--t-soft); }

/* ---------- 6. Connexion ---------- */
#login { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: calc(40px + var(--safe-t)) var(--gut) 0; overflow: hidden; z-index: 1; }
.brand { font-size: var(--fs-small); font-weight: 500; letter-spacing: .3em; padding-left: .3em; text-transform: uppercase; color: var(--t-soft); }
.medal { position: relative; flex: none; }
.medal .blob { position: absolute; border-radius: 50%; opacity: var(--halo-op); }
.medal .blob i { display: block; width: 100%; height: 100%; border-radius: 50%; }
.medal .b1 i { background: var(--halo-1); animation: drift1 9s ease-in-out infinite; }
.medal .b2 i { background: var(--halo-2); animation: drift2 11s ease-in-out infinite; }
.medal picture, .medal .fallback { position: absolute; inset: 0; display: block; }
.medal img, .medal .fallback { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 22%; border: 3px solid var(--card); box-sizing: border-box; box-shadow: var(--shadow-photo); background: var(--tint); }
.medal .fallback { display: grid; place-items: center; font-weight: 500; color: var(--accent); font-size: 34px; }
.medal .state { position: absolute; right: 4px; bottom: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok); border: 3px solid var(--card); box-sizing: border-box; z-index: 2; }
.medal .state.warn { background: var(--k-idee); }
#login .medal { width: 148px; height: 148px; margin-top: clamp(36px, 9vh, 80px); }
#login .medal .b1 { left: -40px; top: -26px; width: 150px; height: 150px; filter: blur(34px); }
#login .medal .b2 { right: -44px; bottom: -32px; width: 156px; height: 156px; filter: blur(36px); }
#login .medal img { border-width: 4px; box-shadow: 0 14px 40px rgba(44, 53, 70, .14); }
#login h1 { margin-top: clamp(32px, 7vh, 52px); font-size: var(--fs-h1); line-height: 1.12; text-align: center; letter-spacing: -.03em; }
#login .sub { margin-top: var(--s3); font-size: var(--fs-body); color: var(--t-soft); text-align: center; }
#login .spacer { flex: 1; min-height: var(--s5); }
#login .actions { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; padding-bottom: max(22px, var(--safe-b)); }
.btn-face { width: 100%; height: 58px; border-radius: 29px; border: 0; background: var(--accent); color: var(--on-accent); font-size: 17px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: var(--s3); }
.btn-face svg { width: 24px; height: 24px; }
.pw-form { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-bottom: var(--s2); }
.login-err { min-height: 22px; font-size: var(--fs-small); color: var(--warn-ink); text-align: center; margin: 4px 0; }

/* ---------- 7. Application : l'accueil ---------- */
#app { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: calc(18px + var(--safe-t)) var(--gut) calc(var(--bar-h) + var(--mini-h) + var(--safe-b) + 28px); }
.topline { display: flex; justify-content: space-between; align-items: center; min-height: 24px; font-size: 15px; color: var(--t-soft); }
.topline span:last-child { font-variant-numeric: tabular-nums; }
.hello { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.hello .medal { width: 96px; height: 96px; }
.hello .medal .b1 { left: -22px; top: -14px; width: 92px; height: 92px; filter: blur(26px); opacity: calc(.9 * var(--halo-op)); }
.hello .medal .b2 { right: -24px; bottom: -18px; width: 96px; height: 96px; filter: blur(28px); opacity: calc(.95 * var(--halo-op)); }
.hello-tx { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.headline { font-size: var(--fs-h1); line-height: 1.08; font-weight: 500; letter-spacing: -.03em; }
.status { font-size: 15px; color: var(--t-soft); }
.summary { margin: 22px 0 0; font-size: var(--fs-lead); line-height: 1.35; font-weight: 400; letter-spacing: -.015em; color: var(--ink); }
.cta { display: flex; gap: 10px; margin-top: 20px; }
.btn-main { flex: 1 1 auto; min-width: 0; height: 56px; border: 0; border-radius: 28px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 17px; font-weight: 500; }
.btn-main .dur { font-size: 15px; font-weight: 400; color: var(--on-accent-soft); font-variant-numeric: tabular-nums; }
.btn-alt { width: 96px; height: 56px; flex: none; border-radius: 28px; border: 1px solid var(--line-btn); background: var(--card); color: var(--ink); font-size: 17px; font-weight: 500; }
@media (max-width: 359px) { .btn-main { gap: 8px; } .btn-main svg { display: none; } .btn-alt { width: 84px; } }
.sec-watch { margin-top: 28px; }
.cnt-btn { border: 0; background: none; color: var(--t-soft); font-size: var(--fs-small); min-height: 44px; margin: -14px -10px; padding: 0 10px; }
/* Chiffres clés : un panneau, trois colonnes */
.tiles { margin-top: 12px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; }
.tile { text-align: left; background: none; border: 0; border-left: 1px solid var(--line); padding: var(--s4); display: flex; flex-direction: column; gap: 6px; min-height: 112px; color: inherit; min-width: 0; }
.tile:first-child { border-left: 0; }
.tile .lbl { font-size: var(--fs-small); color: var(--t-soft); }
.tile .val { font-size: var(--fs-num); line-height: 1; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; overflow: hidden; display: block; }
.tile .val small { font-size: 18px; font-weight: 400; letter-spacing: 0; color: var(--ink); }
.tile .val.none { color: var(--t-soft); }
.tile .sub { font-size: var(--fs-cap); color: var(--t-soft); line-height: 1.3; }
/* Demain, Rappels : cartes à une ligne */
.nextcard { display: flex; align-items: center; gap: 14px; margin-top: 12px; width: 100%; padding: 14px var(--s4); border: 0; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); text-align: left; text-decoration: none; color: inherit; min-height: 72px; }
.nextcard .daytile { width: 44px; height: 44px; flex: none; border-radius: var(--r-s); background: var(--accent-bg); color: var(--accent-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.nextcard .daytile span:first-child { font-size: 13px; font-weight: 500; }
.nextcard .daytile span:last-child { font-size: 18px; font-weight: 600; }
.nextcard .daytile svg { width: 22px; height: 22px; }
.nextcard .tx { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.nextcard .t1 { font-size: var(--fs-body); font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.nextcard .t2 { font-size: var(--fs-small); color: var(--t-soft); display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.nextcard .t2 .rdot { width: 10px; height: 10px; }
.nextcard .chev { color: var(--chev); flex: none; }
.nextcard .chev svg { width: 20px; height: 20px; }
/* Projets */
.pgrid { display: flex; flex-direction: column; margin-top: 10px; overflow: hidden; }
.pcard { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; padding: var(--s4); border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); min-width: 0; }
.pcard:last-child { border-bottom: 0; }
.p1 { display: flex; align-items: center; gap: var(--s2); }
.pdot { flex: none; width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--t-nav); }
.pdot.vert { background: var(--ok); } .pdot.orange { background: var(--k-idee); } .pdot.gris { background: var(--t-nav); }
.pname { font-size: 18px; font-weight: 500; color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; }
.pstate { flex: none; font-size: var(--fs-small); color: var(--t-soft); }
.p2 { font-size: var(--fs-small); color: var(--t-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p2 b { font-weight: 500; color: var(--ink); }
.p3 { font-size: var(--fs-body); font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3.none { font-weight: 400; color: var(--t-soft); }
.p4 { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: 4px; }
.p4 i { font-style: normal; font-size: var(--fs-small); font-weight: 500; color: var(--accent-ink); background: var(--accent-bg); border-radius: 999px; padding: 3px 10px; }
/* Heures du monde */
.clocks { margin-top: var(--s6); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); min-height: 64px; }
.clock { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.clock .city { font-size: var(--fs-cap); color: var(--t-soft); white-space: nowrap; }
.clock .time { font-size: 20px; font-weight: 500; color: var(--t-soft); font-variant-numeric: tabular-nums; }
.clock.paris .time { color: var(--ink); }
#stale { font-size: var(--fs-cap); color: var(--t-soft); text-align: center; margin: var(--s2) 0 0; min-height: 16px; }
.foot { padding: var(--s3) 0 0; display: flex; justify-content: center; }
.foot button { min-height: 44px; background: none; border: 0; color: var(--t-soft); font-size: var(--fs-small); padding: 0 14px; display: inline-flex; align-items: center; gap: var(--s2); }
.foot button svg { width: 16px; height: 16px; }
#ptr { text-align: center; color: var(--t-soft); font-size: var(--fs-cap); height: 0; overflow: hidden; transition: height .15s; }
.page-title { margin-top: var(--s2); font-size: var(--fs-title); line-height: 1; letter-spacing: -.03em; padding-bottom: var(--s2); }
.eyebrow + .page-title { margin-top: var(--s2); }
.view > .eyebrow:first-child { margin-top: 24px; }
.ag-ask { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s5); }
.ag-in { position: relative; width: 100%; }
.ag-in .field { width: 100%; height: 52px; padding-right: 56px; text-overflow: clip; }
.ag-ask .btn { width: 100%; height: 52px; }
@media (min-width: 431px) { .ag-ask { flex-direction: row; } .ag-ask .ag-in { flex: 1; width: auto; } .ag-ask .btn { width: auto; white-space: nowrap; } }
.ag-mic { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--accent); }
.ag-mic svg { width: 22px; height: 22px; }
.ag-mic.rec { background: var(--warn-bg); color: var(--warn-ink); animation: ek-pulse 1.2s ease-in-out infinite; }
.ag-help { margin-top: var(--s2); font-size: var(--fs-small); color: var(--t-soft); }

/* ---------- 8. Barre du bas : flottante, 5 colonnes égales, micro central rond ---------- */
#tabbar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: var(--bar-bg); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-top: 1px solid var(--bar-line); padding-bottom: var(--safe-b); }
#tabbar .in { max-width: 560px; margin: 0 auto; height: var(--bar-h); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; }
#tabbar button.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: none; border: 0; color: var(--t-nav); font-size: var(--fs-nav); font-weight: 400; height: 100%; min-height: 48px; position: relative; padding: 0; border-radius: 0; }
#tabbar button.tab svg { width: 22px; height: 22px; }
#tabbar button.tab[aria-current="page"] { color: var(--accent); font-weight: 500; }
#tabbar .badge { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--k-urgent); color: #FFFFFF; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
#tabbar .center { display: flex; justify-content: center; align-items: center; background: none; border: 0; height: 100%; padding: 0; }
#tabbar .center .mic { margin-top: -14px; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 5px var(--ring); }
#tabbar .center .mic svg { width: 22px; height: 22px; }

/* ---------- 9. Écran de Victoria : halo, onde, texte façon karaoké ---------- */
#voice { --lvl: 0; position: fixed; inset: 0; z-index: 49; background: var(--bg); display: flex; flex-direction: column; align-items: center; padding: calc(18px + var(--safe-t)) var(--gut) 0; overflow: hidden; height: 100dvh; box-sizing: border-box; }
#voice .vtop { align-self: stretch; display: flex; justify-content: space-between; align-items: center; height: 44px; flex: none; }
#voice .vtitle { font-size: 15px; font-weight: 500; }
#voice .vtime { width: 44px; font-size: var(--fs-small); color: var(--t-soft); text-align: right; font-variant-numeric: tabular-nums; }
.vportrait { position: relative; width: 190px; height: 190px; margin-top: 36px; flex: none; }
.vportrait .blob { position: absolute; border-radius: 50%; transform: scale(calc(1 + var(--lvl) * .3)); opacity: calc(var(--halo-op) * (.8 + var(--lvl) * .2)); }
.vportrait .blob i { display: block; width: 100%; height: 100%; border-radius: 50%; }
.vportrait .b1 { left: -51px; top: -33px; width: 192px; height: 192px; filter: blur(44px); }
.vportrait .b2 { right: -56px; bottom: -41px; width: 200px; height: 200px; filter: blur(46px); }
.vportrait .b1 i { background: var(--halo-1); animation: drift1v 6s ease-in-out infinite; }
.vportrait .b2 i { background: var(--halo-2); animation: drift2v 7s ease-in-out infinite; }
.vportrait picture, .vportrait .fallback { position: absolute; inset: 0; display: block; }
.vportrait img, .vportrait .fallback { position: absolute; inset: 0; width: 190px; height: 190px; border-radius: 50%; object-fit: cover; object-position: center 22%; border: 4px solid var(--card); box-sizing: border-box; box-shadow: 0 14px 40px rgba(44, 53, 70, .14); background: var(--tint); }
.vportrait .fallback { display: grid; place-items: center; font-weight: 500; color: var(--accent); font-size: 56px; }
.eq { display: flex; align-items: center; gap: 4px; height: 28px; margin-top: 22px; flex: none; }
.eq i { width: 4px; height: 28px; border-radius: 2px; background: var(--accent); display: block; transform-origin: center; transform: scaleY(.25); }
.eq span { margin-left: 10px; font-size: var(--fs-small); color: var(--t-soft); }
#voice.idle .eq i { opacity: .55; }
.convo { align-self: stretch; margin-top: 24px; display: flex; flex-direction: column; gap: 14px; flex: 1 1 0; min-height: 90px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 6px 0 140px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px, #000 calc(100% - 120px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 16px, #000 calc(100% - 120px), transparent 100%); }
.bub { flex: none; overflow-wrap: anywhere; margin: 0; }
.bub.ek { align-self: stretch; font-size: 26px; line-height: 1.3; font-weight: 500; letter-spacing: -.02em; color: var(--ink); transition: color .3s ease, font-size .2s ease; }
.bub.ek.old { font-size: 20px; line-height: 1.4; font-weight: 400; letter-spacing: 0; color: var(--t-past); }
.bub.next { align-self: stretch; font-size: 20px; line-height: 1.4; font-weight: 400; color: var(--t-next); }
.bub.me { align-self: flex-end; max-width: 86%; text-align: right; font-size: var(--fs-body); line-height: 1.4; color: var(--t-soft); }
.bub.me::before { content: "Toi"; display: block; font-size: var(--fs-cap); color: var(--t-soft); margin-bottom: 2px; opacity: .8; }
#voice.live .vportrait { margin-top: 24px; }
@media (max-height: 700px) { .vportrait { margin-top: 14px; width: 143px; height: 143px; } .vportrait img, .vportrait .fallback { width: 143px; height: 143px; } .eq { margin-top: 14px; } #voice.live .vportrait { margin-top: 12px; } .bub.ek { font-size: 23px; } .bub.ek.old, .bub.next { font-size: 18px; } }
.vhint { position: absolute; left: var(--gut); right: var(--gut); bottom: calc(100px + var(--safe-b)); font-size: var(--fs-small); color: var(--t-soft); text-align: center; min-height: 18px; }
.vbtns { position: absolute; left: var(--gut); right: var(--gut); bottom: calc(30px + var(--safe-b)); display: flex; gap: 10px; max-width: 520px; margin: 0 auto; }
.vbtn { flex: 1 1 0; height: 60px; border-radius: 30px; border: 1px solid var(--line-btn); background: var(--card); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 500; }
.vbtn.main { border: 0; background: var(--accent); color: var(--on-accent); }
.vbtn { white-space: nowrap; padding: 0 8px; gap: 8px; }
.vbtn svg { width: 20px; height: 20px; }
.vbtn .fill { fill: currentColor; stroke: none; }

/* ---------- 10. Rappels ---------- */
#rappels-page { position: fixed; inset: 0; z-index: 45; background: var(--bg); overflow-y: auto; overflow-x: hidden; padding: calc(18px + var(--safe-t)) var(--gut) calc(var(--bar-gap) + var(--safe-b) + 120px); }
#rappels-page > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.rp-back { position: absolute; left: var(--gut); top: calc(24px + var(--safe-t)); }
.rp-title { margin-top: 92px; display: flex; justify-content: space-between; align-items: flex-end; }
.rp-title h1 { font-size: var(--fs-title); line-height: 1; font-weight: 500; letter-spacing: -.03em; }
.rp-title span { font-size: 15px; color: var(--t-soft); }
.rf { margin-top: 18px; padding: 4px; border-radius: 18px; background: var(--tint); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rf-tab { height: 44px; border: 0; border-radius: 14px; background: transparent; color: var(--t-soft); font-size: 15px; font-weight: 400; }
.rf-tab[aria-selected="true"] { background: var(--card); color: var(--ink); font-weight: 500; box-shadow: 0 2px 8px rgba(44, 53, 70, .08); }
.rg-title { margin: 22px 0 10px; font-size: var(--fs-body); font-weight: 500; color: var(--t-soft); letter-spacing: 0; }
.rg-title.late { color: var(--warn-ink); }
.rg + .rg-title { margin-top: 20px; }
.rg { position: relative; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.rr { position: relative; background: var(--warn-bg); }
.rr-del { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 22px; color: var(--warn-ink); font-size: var(--fs-body); font-weight: 500; }
.rr-fg { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 8px 14px 16px; background: var(--card); touch-action: pan-y; transition: transform .2s var(--ease); min-height: 68px; }
.rr-fg.drag { transition: none; }
.rr + .rr .rr-fg::before { content: ""; position: absolute; left: 42px; right: 0; top: 0; height: 1px; background: var(--line); }
.rr .rdot { width: 12px; height: 12px; }
.rr-tx { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; background: none; border: 0; text-align: left; padding: 0; color: inherit; min-height: 44px; justify-content: center; }
.rr-tx .t { font-size: var(--fs-row); font-weight: 500; overflow-wrap: anywhere; }
.rr-tx .s { font-size: var(--fs-small); color: var(--t-soft); }
.rr-tx .s.late { color: var(--warn-ink); font-weight: 500; }
.rc-check { flex: none; width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; padding: 0; }
.rc-check i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--check); box-sizing: border-box; display: grid; place-items: center; color: var(--on-accent); transition: background-color .15s ease, border-color .15s ease; }
.rc-check.on i { background: var(--accent); border-color: var(--accent); }
.rc-check i svg { width: 14px; height: 14px; stroke-width: 3; }
.rr.done .t { color: var(--t-soft); text-decoration: line-through; }
.r-empty { margin-top: 28px; padding: var(--s5) var(--s4); border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); color: var(--t-soft); font-size: var(--fs-body); text-align: center; }
.rcomposer { position: fixed; z-index: 46; left: 16px; right: 16px; bottom: calc(var(--bar-gap) + var(--safe-b)); max-width: 528px; margin: 0 auto; height: 64px; padding: 0 8px 0 18px; border-radius: 26px; background: var(--bar-bg); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-bar); display: flex; align-items: center; gap: 10px; }
.rcomposer input { flex: 1 1 auto; min-width: 0; border: 0; outline-offset: 4px; background: transparent; font-size: var(--fs-row); color: var(--ink); height: 48px; }
.rcomposer input::placeholder { color: var(--t-soft); opacity: .9; }
.rc-send { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }
.rc-send svg { width: 22px; height: 22px; }
.rc-send.rec { animation: ek-pulse 1.2s ease-in-out infinite; }
.rc-msg { max-width: 528px; margin: 12px auto 0; font-size: var(--fs-small); color: var(--t-soft); min-height: 20px; }
.rc-msg.ok { color: var(--ok-ink); font-weight: 500; }
/* Alerte de rappel : bannières empilées tout en haut de l'écran, au-dessus de tout, jusqu'à ce qu'on les traite */
#rbanners { position: fixed; z-index: 2147483600; left: 12px; right: 12px; top: calc(10px + var(--safe-t)); max-width: 536px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
#rbanners > * { pointer-events: auto; }
.rbn { padding: 12px 14px 12px; border-radius: var(--r-card); background: var(--bar-bg); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-top); animation: drop .5s ease-out both; }
.rbn-top { display: flex; align-items: center; gap: 12px; }
.rbn img, .rbn .fallback { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center 22%; flex: none; }
.rbn .fallback { display: grid; place-items: center; background: var(--tint); color: var(--accent); font-weight: 500; }
.rbn .tx { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; border: 0; background: none; text-align: left; padding: 0; color: inherit; min-height: 44px; justify-content: center; }
.rbn .k { display: flex; align-items: center; gap: 6px; font-size: var(--fs-cap); color: var(--t-soft); }
.rbn .k i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rbn .t { font-size: var(--fs-body); font-weight: 500; overflow-wrap: anywhere; }
.rbn .x { width: 44px; height: 44px; flex: none; border: 0; background: none; color: var(--t-soft); display: grid; place-items: center; border-radius: 50%; margin-right: -8px; }
.rbn .x svg { width: 18px; height: 18px; }
.rbn-btns { display: flex; gap: 8px; margin-top: 8px; }
.rbn-btns button { flex: 1 1 0; height: 44px; border-radius: 22px; border: 1px solid var(--line-btn); background: var(--card); color: var(--ink); font-size: 15px; font-weight: 500; }
.rbn-btns button.go { border: 0; background: var(--accent); color: var(--on-accent); }
.rbn-more { align-self: center; height: 44px; padding: 0 18px; border-radius: 22px; border: 0; background: var(--bar-bg); box-shadow: var(--shadow-top); color: var(--ink); font-size: 15px; font-weight: 500; }
/* Rappels du jour : tout en haut de l'accueil */
.rtop { margin-top: 18px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); padding: 12px 8px 6px 16px; }
.rtop-head { display: flex; justify-content: space-between; align-items: center; padding-right: 8px; min-height: 44px; }
.rtop-head button { border: 0; background: none; padding: 0; color: inherit; font: inherit; display: flex; width: 100%; justify-content: space-between; align-items: center; min-height: 44px; }
.rtop-head h2 { font-size: 16px; font-weight: 500; letter-spacing: -.01em; }
.rtop-head span { font-size: var(--fs-small); color: var(--t-soft); }
.rt-row { display: flex; align-items: center; gap: 2px; min-height: 48px; }
.rt-check { flex: none; width: 44px; height: 44px; margin-left: -12px; border: 0; background: none; display: grid; place-items: center; padding: 0; }
.rt-check .rdot { width: 10px; height: 10px; }
.rt-t { flex: 1 1 auto; min-width: 0; font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: none; text-align: left; padding: 0; min-height: 44px; }
.rt-h { flex: none; font-size: var(--fs-small); color: var(--t-soft); font-variant-numeric: tabular-nums; padding: 0 8px 0 10px; }
.rt-h.late { color: var(--k-urgent); font-weight: 500; }
.rt-empty { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding-right: 8px; }
.rt-empty span { font-size: 15px; color: var(--t-soft); }
.rt-empty button { height: 44px; padding: 0 14px; border-radius: 22px; border: 0; background: var(--accent-bg); color: var(--accent-ink); font-size: 15px; font-weight: 500; }
/* Lecteur du brief + mini-lecteur */
#player { position: fixed; inset: 0; z-index: 60; background: rgba(44, 53, 70, .35); display: flex; align-items: flex-end; justify-content: center; }
#player:not([hidden]) { animation: ek-fade .2s ease-out; }
#player:not([hidden]) .pl { animation: ek-slide .28s var(--ease); }
.pl { width: 100%; max-width: 560px; height: calc(100dvh - 54px - var(--safe-t)); max-height: 790px; box-sizing: border-box; padding: 10px 24px calc(22px + var(--safe-b)); border-radius: 32px 32px 0 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.pl-grab { width: 100%; height: 22px; display: flex; justify-content: center; align-items: flex-start; touch-action: none; flex: none; }
.pl-grab span { width: 40px; height: 5px; border-radius: 3px; background: var(--check); }
.pl-top { align-self: stretch; display: flex; justify-content: space-between; align-items: center; height: 44px; flex: none; }
.pl-top .back { box-shadow: none; }
.pl-title { font-size: 15px; font-weight: 500; }
.pl-speed { min-width: 52px; height: 44px; padding: 0 12px; border-radius: 22px; border: 0; background: var(--card); font-size: var(--fs-small); font-weight: 500; color: var(--ink); }
.pl-medal { position: relative; width: 200px; height: 200px; margin-top: 22px; flex: none; }
.pl-medal .blob { position: absolute; border-radius: 50%; }
.pl-medal .blob i { display: block; width: 100%; height: 100%; border-radius: 50%; }
.pl-medal .b1 { left: -40px; top: -24px; width: 190px; height: 190px; filter: blur(40px); opacity: calc(.9 * var(--halo-op)); }
.pl-medal .b2 { right: -44px; bottom: -30px; width: 200px; height: 200px; filter: blur(42px); opacity: var(--halo-op); }
.pl-medal .b1 i { background: var(--halo-1); animation: drift1v 7s ease-in-out infinite; }
.pl-medal .b2 i { background: var(--halo-2); animation: drift2v 8s ease-in-out infinite; }
.pl-medal picture, .pl-medal .fallback { position: absolute; inset: 0; display: block; }
.pl-medal img, .pl-medal .fallback { position: absolute; inset: 0; width: 200px; height: 200px; border-radius: 50%; object-fit: cover; object-position: center 22%; border: 5px solid var(--card); box-sizing: border-box; box-shadow: 0 16px 44px rgba(44, 53, 70, .16); background: var(--tint); }
.pl-medal .fallback { display: grid; place-items: center; font-weight: 500; font-size: 54px; color: var(--accent); }
.pl-text { align-self: stretch; margin-top: 26px; display: flex; flex-direction: column; gap: 4px; flex: 0 1 auto; min-height: 84px; overflow-y: auto; }
.pl-part { font-size: var(--fs-small); color: var(--accent); font-weight: 500; }
.pl-sentence { margin: 0; font-size: 21px; line-height: 1.35; font-weight: 500; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pl-status { margin: 0; font-size: var(--fs-small); color: var(--t-soft); }
.pl-prog { align-self: stretch; margin-top: 14px; flex: none; }
.pl-chaps { display: grid; gap: 4px; }
.pl-chap { height: 44px; border: 0; background: none; padding: 0; display: flex; align-items: center; min-width: 0; }
.pl-chap i { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--track); }
.pl-times { display: flex; justify-content: space-between; gap: 8px; margin-top: 0; font-size: var(--fs-cap); color: var(--t-soft); font-variant-numeric: tabular-nums; }
.pl-times .names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; text-align: center; }
.pl-ctl { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 22px; margin-bottom: 14px; flex: none; }
.pl-ctl button { width: 52px; height: 52px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.pl-ctl svg { fill: currentColor; stroke: none; width: 28px; height: 28px; }
.pl-ctl .play { width: 76px; height: 76px; background: var(--accent); color: var(--on-accent); box-shadow: 0 12px 30px rgba(82, 114, 156, .35); }
.pl-ctl .play svg { width: 30px; height: 30px; }
.pl-ctl .play.busy svg { display: none; }
.pl-ctl .play.busy::after { content: ""; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--on-accent-soft); border-top-color: var(--on-accent); animation: ek-spin .8s linear infinite; }
.pl-talk { align-self: stretch; margin-top: auto; height: 60px; flex: none; border-radius: 30px; border: 1px solid var(--track); background: var(--card); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 500; }
.pl-talk svg { stroke: var(--accent); width: 22px; height: 22px; }
.pl-talk.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pl-talk.on svg { stroke: var(--on-accent); }
@media (max-height: 720px) { .pl-text { min-height: 0; } .pl-ctl { margin-top: 10px; margin-bottom: 14px; } .pl-medal { width: 128px; height: 128px; margin-top: 12px; } .pl-medal img, .pl-medal .fallback { width: 128px; height: 128px; border-width: 4px; } .pl-medal .b1 { width: 120px; height: 120px; } .pl-medal .b2 { width: 128px; height: 128px; } .pl-text { margin-top: 16px; } .pl-sentence { font-size: 19px; } .pl-ctl { margin-top: 4px; gap: 22px; } .pl-ctl .play { width: 64px; height: 64px; } .pl-talk { height: 52px; margin-top: 8px; } }
#miniplayer { position: fixed; z-index: 19; left: 8px; right: 8px; bottom: calc(var(--bar-h) + var(--safe-b) + 8px); max-width: 544px; margin: 0 auto; height: 60px; padding: 0 4px 0 8px; border-radius: 18px; background: var(--bar-bg); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-bar); display: flex; align-items: center; gap: 8px; }
#miniplayer:not([hidden]) { animation: ek-rise .2s var(--ease); }
#miniplayer .open { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; color: inherit; height: 60px; }
#miniplayer img, #miniplayer .fallback { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center 22%; flex: none; }
#miniplayer .fallback { display: grid; place-items: center; background: var(--tint); color: var(--accent); font-weight: 500; }
#miniplayer .mt { display: flex; flex-direction: column; min-width: 0; }
#miniplayer .mt b { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#miniplayer .mt span { font-size: var(--fs-cap); color: var(--t-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#miniplayer .mp, #miniplayer .mx { width: 44px; height: 44px; flex: none; border: 0; background: none; color: var(--ink); display: grid; place-items: center; border-radius: 50%; }
#miniplayer .mp { background: var(--accent); color: var(--on-accent); }
#miniplayer svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
#miniplayer .mx svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; width: 18px; height: 18px; }
body.has-mini { --mini-h: 68px; }
/* Fiche d'un rappel */
.kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.kinds button { min-height: 52px; border-radius: var(--r-s); border: 1px solid var(--line-btn); background: var(--card); color: var(--ink); font-size: var(--fs-small); font-weight: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 2px; }
.kinds button[aria-pressed="true"] { border: 2px solid var(--accent); padding: 5px 1px; }
.kinds .rdot { width: 12px; height: 12px; }

/* ---------- 11. Fiches du bas ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg.top { z-index: 80; }
.sheet { box-sizing: border-box; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; overflow-x: hidden; position: relative; background: var(--bg); border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 26px var(--gut) calc(24px + var(--safe-b)); }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--check); margin: -14px auto 16px; }
.sheet *, .sheet *::before, .sheet *::after { box-sizing: border-box; }
.sheet .field, .sheet select, .sheet textarea { min-width: 0; max-width: 100%; }
.sheet h2 { font-size: 26px; line-height: 1.12; letter-spacing: -.03em; margin-bottom: var(--s3); }
.sheet .sub { font-size: var(--fs-small); color: var(--t-soft); font-weight: 400; letter-spacing: 0; margin-left: var(--s2); }
.al-body { font-size: 18px; line-height: 1.45; color: var(--ink); margin: 0 0 var(--s2); }
.bsec { margin: 0 0 var(--s4); padding: var(--s4); border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); }
.bsec h3 { font-size: var(--fs-h2); font-weight: 500; margin-bottom: var(--s2); letter-spacing: -.01em; }
.bline { display: flex; gap: var(--s3); align-items: flex-start; padding: 10px 0; font-size: var(--fs-row); line-height: 1.4; color: var(--ink); border-top: 1px solid var(--line); }
.bline:first-of-type { border-top: 0; }
.bsub { font-size: var(--fs-small); color: var(--t-soft); font-weight: 500; margin: var(--s3) 0 2px; }
.bsec .bsub:first-of-type { margin-top: 0; }
.bconf { font-size: var(--fs-small); color: var(--accent-ink); background: var(--accent-bg); border-radius: var(--r-s); padding: 10px 12px; margin: 0 0 var(--s3); overflow-wrap: anywhere; }
.bchips { margin: 4px 0 var(--s3); }
.bchips .vchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bchips .vchip[aria-pressed="true"]::before { content: "\2713\00a0"; }
#sheet-brief .btns { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: var(--s2); position: sticky; bottom: calc(-24px - var(--safe-b)); margin: var(--s2) calc(-1 * var(--gut)) calc(-24px - var(--safe-b)); padding: var(--s3) var(--gut) calc(14px + var(--safe-b)); background: var(--bg); border-top: 1px solid var(--line); }
#sheet-brief .btns .btn { min-width: 0; padding-left: var(--s2); padding-right: var(--s2); }
.orb-rec { width: 68px; height: 68px; border-radius: 50%; margin: 6px auto var(--s3); display: grid; place-items: center; background: var(--warn-bg); color: var(--warn-ink); animation: ek-pulse 1.3s ease-in-out infinite; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bar-h) + var(--mini-h) + var(--safe-b) + 14px); z-index: 2147483000; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 22px; font-size: var(--fs-body); max-width: min(92vw, 520px); text-align: center; animation: ek-rise .2s var(--ease); display: flex; align-items: center; gap: 12px; }
#toast button { border: 0; background: none; color: inherit; font-weight: 600; text-decoration: underline; min-height: 44px; padding: 0 6px; font-size: var(--fs-body); }
#offline { position: fixed; top: 0; left: 0; right: 0; z-index: 95; padding: calc(8px + var(--safe-t)) var(--gut) 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: var(--fs-small); text-align: center; }
html.has-session #app[hidden] { display: block; }
html.has-session #login:not([hidden]) ~ #app { display: none; }

/* ---------- 12. Agenda : récapitulatif avant envoi, pages Agenda et Leads ---------- */
.ag-say { font-size: 22px; line-height: 1.3; letter-spacing: -.02em; color: var(--ink); margin: 0 0 var(--s3); }
.ag-warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--r-s); padding: 10px 12px; font-size: var(--fs-small); margin-bottom: 10px; }
.ag-mail { background: var(--ok-bg); color: var(--ok-ink); border-radius: var(--r-s); padding: 10px 12px; font-size: var(--fs-small); margin-bottom: 10px; }
.ag-grid { display: grid; gap: var(--s3); margin-bottom: var(--s3); min-width: 0; max-width: 100%; }
.ag-grid label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-small); color: var(--t-soft); font-weight: 500; min-width: 0; max-width: 100%; }
.ag-grid .field { height: 48px; font-size: 16px; color: var(--ink); font-weight: 400; min-width: 0; max-width: 100%; width: 100%; -webkit-appearance: none; appearance: none; text-align: left; }
.ag-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; max-width: 100%; }
.ag-check { flex-direction: row !important; align-items: center; gap: var(--s2) !important; font-size: var(--fs-body) !important; color: var(--ink) !important; font-weight: 400 !important; min-height: 44px; }
.ag-check input { width: 22px; height: 22px; accent-color: var(--accent); }
.ag-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; max-width: 100%; }
.ag-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--tint); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: var(--fs-small); }
.ag-chip button { border: 0; background: none; color: var(--t-soft); font-size: 18px; line-height: 1; min-width: 28px; min-height: 28px; padding: 0 2px; }
.ag-add { display: flex; gap: 6px; margin-top: 6px; min-width: 0; max-width: 100%; }
.ag-add select { flex: 1; min-width: 0; height: 44px; font-size: 16px; max-width: 100%; width: 100%; -webkit-appearance: none; appearance: none; }
.ag-add .btn { flex: none; }
.ag-slots { display: flex; flex-direction: column; gap: var(--s2); margin: 10px 0; }
.ag-fix { display: flex; gap: var(--s2); margin-top: 4px; min-width: 0; max-width: 100%; }
.ag-fix .field { flex: 1 1 auto; height: 48px; font-size: 16px; min-width: 0; }
.ag-fix .btn { flex: none; height: 48px; }
.ag-grid input[type="datetime-local"], .ag-grid input[type="date"], .rp-fields input[type="datetime-local"] { display: block; line-height: 48px; padding-top: 0; padding-bottom: 0; }
.ag-grid select.field, .ag-add select, .rp-fields select.field { background-image: linear-gradient(45deg, transparent 50%, var(--t-soft) 50%), linear-gradient(135deg, var(--t-soft) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; -webkit-appearance: none; appearance: none; }
.rp-fields { display: grid; gap: var(--s3); margin-bottom: var(--s3); }
.rp-fields label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-small); color: var(--t-soft); font-weight: 500; }
.rp-fields .field { font-size: 16px; color: var(--ink); font-weight: 400; }
#sheet-agenda .sheet .btns#ag-btns { position: sticky; bottom: calc(-24px - var(--safe-b)); margin: var(--s3) calc(-1 * var(--gut)) calc(-24px - var(--safe-b)); padding: var(--s3) var(--gut) calc(14px + var(--safe-b)); background: var(--bg); border-top: 1px solid var(--line); flex-wrap: wrap; }
#sheet-agenda .sheet .btns#ag-btns:empty { display: none; }
#sheet-agenda .sheet .btns#ag-btns .btn { flex: 1 1 auto; }
@media (max-width: 430px) {
  .ag-two { grid-template-columns: minmax(0, 1fr); }
  .ag-add { flex-direction: column; }
  .ag-add select, .ag-add .btn { width: 100%; }
  .ag-fix { flex-direction: column; align-items: stretch; }
  .ag-fix .field, .ag-fix .btn { flex: none; width: 100%; }
  #sheet-agenda .sheet .btns#ag-btns .btn { flex: 1 1 42%; }
}
.capa { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.capa:last-child { border-bottom: 0; }
.capa h4 { font-size: 18px; margin-bottom: 3px; }
.capa p { font-size: var(--fs-body); color: var(--ink); margin: 0 0 4px; }
.capa em { font-size: var(--fs-small); color: var(--accent-ink); font-style: normal; }
.ag-lim { background: var(--warn-bg); border-radius: var(--r-s); padding: 10px 12px; font-size: var(--fs-small); color: var(--warn-ink); margin-top: 10px; }
#agenda-page, #leads-page { position: fixed; inset: 0; z-index: 45; background: var(--bg); overflow-y: auto; overflow-x: hidden; padding: calc(18px + var(--safe-t)) var(--gut) calc(32px + var(--safe-b)); }
#agenda-page .ap-top, #leads-page .ap-top { display: flex; align-items: center; gap: var(--s3); max-width: 560px; margin: 0 auto; }
#agenda-page .ap-top h1, #leads-page .ap-top h1 { flex: 1; font-size: var(--fs-title); letter-spacing: -.03em; line-height: 1; }
#agenda-page .ap-tools { display: inline-flex; align-items: center; }
#agenda-page .today-at, #agenda-page .ap-body, #leads-page .today-at, #leads-page .ap-body { max-width: 560px; margin-left: auto; margin-right: auto; }
.ap-day { padding: var(--s5) 0 var(--s2); font-size: 18px; font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
.ap-day small { font-weight: 400; font-size: var(--fs-small); color: var(--t-soft); margin-left: var(--s2); }
.ev-row { display: flex; align-items: stretch; gap: var(--s3); width: 100%; min-height: 60px; padding: 12px var(--s4); border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: inherit; }
.ev-row:last-child { border-bottom: 0; }
.ev-row .bar { width: 4px; border-radius: 4px; flex: none; background: var(--accent); }
.ev-row .hh { width: 56px; flex: none; font-size: var(--fs-row); font-weight: 500; color: var(--ink); }
.ev-row .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ev-row .t { font-size: var(--fs-row); font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.ev-row .s { font-size: var(--fs-small); color: var(--t-soft); overflow-wrap: anywhere; }
.ev-row svg.meet { width: 20px; height: 20px; stroke: var(--accent); flex: none; align-self: center; }
.ap-list { margin-top: 10px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.ap-hist { margin-top: var(--s6); }
.ap-hist h2 { font-size: var(--fs-h2); font-weight: 500; margin-bottom: 4px; }
.ev-d { font-size: var(--fs-body); color: var(--ink); margin-bottom: var(--s2); display: flex; gap: var(--s2); }
.ev-d b { font-weight: 500; color: var(--t-soft); min-width: 74px; flex: none; }
.agenda-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: var(--s4) 0 4px; padding-top: var(--s4); border-top: 1px solid var(--line); }
.agenda-links .link-quiet { margin: 0; }
.point { padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.point:last-child { border-bottom: 0; }
.point .t { font-size: 19px; font-weight: 500; color: var(--ink); margin-bottom: 4px; letter-spacing: -.01em; }
.point .s { font-size: var(--fs-small); color: var(--t-soft); margin-bottom: 4px; }
.lp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: var(--s4); background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 0 var(--s4); }
.lp-kpis .kpi { padding: var(--s4) 0; }
.lp-kpis .kpi:nth-child(n) { border-top: 0; border-left: 1px solid var(--line); padding-left: var(--s3); }
.lp-kpis .kpi:first-child { border-left: 0; padding-left: 0; }
.lp-kpis .kpi .val.lp-small, .lp-small { font-size: 22px !important; padding-top: 10px; }
.lp-warn { margin: var(--s3) 0; padding: var(--s3) var(--s4); border-radius: var(--r-s); background: var(--warn-bg); color: var(--warn-ink); font-size: var(--fs-body); }
.lrows { margin-top: var(--s3); border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.lrow { padding: var(--s4); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.lrow:last-child { border-bottom: 0; }
.l1 { display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline; }
.lname { font-size: 19px; font-weight: 500; color: var(--ink); min-width: 0; overflow-wrap: anywhere; letter-spacing: -.01em; }
.lwhen { flex: none; font-size: var(--fs-small); color: var(--t-soft); white-space: nowrap; }
.l2 { font-size: var(--fs-body); color: var(--ink); overflow-wrap: anywhere; }
.l3 { display: flex; align-items: center; gap: var(--s2); margin-top: 6px; }
.steps { display: inline-flex; gap: 4px; }
.steps i { width: 20px; height: 6px; border-radius: 3px; background: var(--line-btn); }
.steps i.on { background: var(--accent); }
.stage { font-size: var(--fs-small); font-weight: 500; color: var(--accent-ink); }
.stage.off { color: var(--t-soft); }
.lp-note { margin-top: var(--s4); }

/* ---------- 13. Mails ---------- */
.mails-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: var(--s2) 0 var(--s3); }
.mails-at { font-size: var(--fs-small); color: var(--t-soft); display: inline-flex; align-items: center; gap: 2px; }
.info-btn { flex: none; width: 44px; height: 44px; margin: -10px -8px -10px 0; border: 0; background: none; color: var(--t-soft); font-size: 20px; display: inline-grid; place-items: center; }
.mbox { margin-bottom: var(--s4); overflow: hidden; }
.mb-head { padding: var(--s4) var(--s4) var(--s2); }
.mb-name { font-size: var(--fs-h2); font-weight: 500; color: var(--ink); overflow-wrap: anywhere; letter-spacing: -.01em; }
.mb-meta { font-size: var(--fs-small); color: var(--t-soft); margin-top: 2px; }
.mb-meta b { color: var(--ink); font-weight: 500; }
.mb-bad { color: var(--warn-ink); font-weight: 500; }
.mrow { display: flex; gap: var(--s3); align-items: flex-start; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: none; padding: 14px var(--s4); min-height: 72px; color: var(--ink); font: inherit; }
.mdot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 8px; background: transparent; }
.mrow.unread .mdot { background: var(--accent); }
.mtx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.m1 { display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline; }
.mfrom { font-size: var(--fs-row); color: var(--ink); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mrow.unread .mfrom, .mrow.unread .msub { font-weight: 500; }
.mwhen { flex: none; font-size: var(--fs-small); color: var(--t-soft); white-space: nowrap; }
.msub { font-size: var(--fs-body); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mex { font-size: var(--fs-small); color: var(--t-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mmore { width: 100%; min-height: 48px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--t-soft); font-size: var(--fs-body); font-weight: 500; }
.mail-ex { margin: var(--s3) 0 var(--s2); padding: var(--s3) var(--s4); border-radius: var(--r-s); background: var(--card); box-shadow: var(--shadow); font-size: var(--fs-body); line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; max-height: 40vh; overflow: auto; }
.mail-ro { font-size: var(--fs-small); color: var(--t-soft); }
#sheet-mail h2 { overflow-wrap: anywhere; font-size: 22px; }
.mi p { font-size: var(--fs-body); color: var(--ink); margin: 0 0 10px; line-height: 1.5; }
.mi h4 { font-size: var(--fs-body); color: var(--t-soft); font-weight: 500; margin: var(--s4) 0 4px; letter-spacing: 0; }
.proj-st { display: flex; align-items: center; gap: var(--s2); margin-bottom: 4px; font-size: var(--fs-body); }
.proj-man { font-size: var(--fs-small); color: var(--t-soft); margin-left: auto; }
.proj-l { font-size: var(--fs-small); color: var(--t-soft); margin: var(--s4) 0 6px; display: block; font-weight: 500; }
#sheet-projet .ag-in .field { padding-right: 56px; }
.proj-notes { display: grid; gap: var(--s2); }
.pn { display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; border-radius: var(--r-s); background: var(--card); box-shadow: var(--shadow); }
.pn-d { font-size: var(--fs-cap); color: var(--t-soft); }
.pn-t { font-size: var(--fs-body); color: var(--ink); overflow-wrap: anywhere; }

/* Ordinateur : même contenu dans une colonne centrée */
@media (min-width: 900px) { .wrap { padding-top: 32px; } }

/* ---------- Réponses vocales de Victoria (mission 19) ---------- */
.spk { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; margin: -6px -4px -6px 4px; padding: 0; }
.spk svg { width: 22px; height: 22px; }
.spk .s2, body.spk-on .spk .s1 { display: none; }
body.spk-on .spk .s2 { display: block; fill: currentColor; stroke: none; }
.bub.ek .spk { margin-top: -10px; }
.pl-spk { align-self: flex-start; margin: 2px 0 0 -10px; }
.vstop { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(98px + var(--safe-b)); height: 44px; min-width: 110px; padding: 0 22px; border-radius: 22px; border: 1px solid var(--line-btn); background: var(--card); color: var(--ink); font-size: var(--fs-body); font-weight: 500; display: none; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 6px 18px rgba(44, 53, 70, .12); }
.vstop svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
body.spk-on .vstop { display: inline-flex; }
body.spk-on #voice-hint { visibility: hidden; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--tint); }
.seg button { min-height: 44px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); font-size: var(--fs-small); font-weight: 500; padding: 4px 6px; line-height: 1.2; }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); }
.spk[hidden] { display: none; }
body.spk-on .convo { padding-bottom: 196px; }
/* lecteur en conversation : sur petit écran, médaillon réduit et chapitres masqués pour laisser la place à la réponse */
.pl.talking .pl-part { display: none; }
@media (max-height: 720px) { .pl.talking .pl-medal { width: 92px; height: 92px; margin-top: 2px; } .pl.talking .pl-medal img, .pl.talking .pl-medal .fallback { width: 92px; height: 92px; border-width: 3px; } .pl.talking .pl-medal .b1 { width: 88px; height: 88px; } .pl.talking .pl-medal .b2 { width: 92px; height: 92px; } .pl.talking .pl-prog { display: none; } .pl.talking .pl-text { flex: 1 1 auto; margin-top: 10px; } }
.pl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; }
.pl-row .pl-status { flex: 1 1 auto; min-width: 0; }
.pl-row .pl-spk { margin: 0 -10px 0 0; align-self: center; }
@media (max-height: 720px) { .pl.talking .pl-sentence { font-size: 19px; line-height: 1.3; } .pl.talking .pl-text { margin-top: 6px; } }

/* ======================================================================
   Système de boutons v4.1 (mission 20) — plus fins, accordés à l'Urbanist
   Principal 48 px · Secondaire 48 px · Discret (texte) · Petit 34 px · Rond (micro 52, lecture 64)
   Rayons : 14 px (grands), 10 px (petits). Texte 16 px / 500 / interlettrage .01em. Icônes 18 px, trait 1.75.
   ====================================================================== */
:root { --btn-h: 48px; --btn-r: 14px; --btn-line: #DCE3EC; --btn-px: 20px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --btn-line: #3A4558; } }
:root[data-theme="dark"] { --btn-line: #3A4558; }
svg.i { stroke-width: 1.75; }
/* grands boutons : principal et secondaire */
.btn, .btn-face, .btn-main, .btn-alt, .vbtn, .pl-talk, .vstop {
  height: var(--btn-h); min-height: var(--btn-h); border-radius: var(--btn-r); padding: 0 var(--btn-px); gap: 8px;
  font-size: 16px; font-weight: 500; letter-spacing: .01em; box-shadow: none;
}
.btn, .btn-alt, .vbtn, .pl-talk, .vstop { border: 1px solid var(--btn-line); background: var(--card); color: var(--ink); }
.btn.primary, .btn-face, .btn-main, .vbtn.main, .pl-talk.on { border: 0; background: var(--accent); color: var(--on-accent); }
.btn.primary { border: 1px solid var(--accent); }
.btn.danger { border-color: transparent; background: var(--warn-bg); color: var(--warn-ink); }
.btn-alt { width: 88px; padding: 0; }
.btn-main { gap: 8px; }
.btn-main .dur { font-size: 15px; font-weight: 400; letter-spacing: 0; }
.btn svg.i, .btn-face svg, .btn-main svg, .vbtn svg, .pl-talk svg, .vstop svg { width: 18px; height: 18px; }
.btn-face svg { stroke-width: 1.75; }
.vbtn { padding: 0 12px; }
.vbtns { gap: 10px; bottom: calc(34px + var(--safe-b)); }
.vstop { bottom: calc(92px + var(--safe-b)); min-width: 104px; }
.pl-talk { margin-top: auto; }
.pl-talk svg { stroke-width: 1.75; }
/* discret : texte seul, zone tactile 44 px */
.link-quiet, .link-mini, .now-link, .mmore { background: none; border: 0; color: var(--accent); font-size: 15px; font-weight: 500; letter-spacing: .01em; min-height: 44px; }
/* petits boutons (bannières) : 34 px visibles, zone tactile 44 px */
.rbn-btns { gap: 10px; margin-top: 10px; }
.rbn-btns button { position: relative; height: 34px; border-radius: 10px; border: 1px solid var(--btn-line); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; letter-spacing: .01em; padding: 0 14px; }
.rbn-btns button.go { border: 0; background: var(--accent); color: var(--on-accent); }
.rbn-btns button::after { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }
.rbn-more { height: 34px; border-radius: 10px; font-size: 14px; position: relative; }
.rbn-more::after { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }
.seg button { border-radius: 10px; font-weight: 500; letter-spacing: .01em; }
/* boutons ronds */
#tabbar .center .mic { width: 52px; height: 52px; box-shadow: 0 0 0 4px var(--ring); }
#tabbar .center .mic svg { width: 22px; height: 22px; stroke-width: 1.75; }
.pl-ctl .play { width: 64px; height: 64px; box-shadow: 0 6px 16px rgba(82, 114, 156, .22); }
.pl-ctl .play svg { width: 26px; height: 26px; }
.pl-ctl button svg { width: 24px; height: 24px; }
.pl-ctl button { width: 48px; height: 48px; }
.pl-ctl { gap: 30px; }
@media (max-height: 720px) { .pl-ctl .play { width: 60px; height: 60px; } .pl-talk { height: var(--btn-h); margin-top: 8px; } .pl-ctl { gap: 24px; } }
.pl-speed { height: 44px; font-weight: 500; letter-spacing: .01em; }

/* ======================================================================
   Mission 27 : finitions (centrage, Stop, croix de fermeture, mails effaçables)
   ====================================================================== */
/* groupes de boutons des fenêtres : centrés (jamais collés à gauche) */
.btns { justify-content: center; }
/* écran Victoria : Stop | Pause | Lui répondre sur une seule ligne, centrée */
.vbtns { justify-content: center; gap: 8px; }
.vbtn.stop, #v-pause { flex: 0 0 auto; }
.vbtn.main { flex: 1 1 0; min-width: 0; }
.vbtn.stop svg { color: #E0603F; }
@media (max-width: 360px) { #v-pause span { display: none; } #v-pause { padding: 0 14px; } .vbtns .vbtn { font-size: 15px; } }
/* croix en haut à droite des feuilles : collante, zone tactile 44 × 44 */
.sheet-bar { position: sticky; top: 22px; z-index: 6; height: 0; }
.sheet-x { position: absolute; top: -20px; right: -6px; width: 44px; height: 44px; border: 0; background: none; padding: 0; display: grid; place-items: center; color: var(--t-soft); -webkit-tap-highlight-color: transparent; }
.sheet-x i, .v5-x::before { width: 32px; height: 32px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; }
.sheet-x svg { width: 16px; height: 16px; stroke-width: 2; }
.sheet h2 { padding-right: 40px; }
/* croix des écrans plein cadre (Lead, Matin, Mail à valider) */
.v5-x { position: fixed; z-index: 47; right: calc(8px + env(safe-area-inset-right, 0px)); width: 44px; height: 44px; border: 0; background: none; padding: 0; display: none; place-items: center; color: var(--t-soft); -webkit-tap-highlight-color: transparent; }
.v5-screen:not([hidden]) + .v5-x { display: grid; }
.v5-x::before { content: ""; position: absolute; background: var(--card); box-shadow: 0 1px 5px rgba(44, 53, 70, .14); }
.v5-x svg { position: relative; width: 16px; height: 16px; stroke-width: 2; }
.v5-x[data-for="lead-page"] { top: calc(env(safe-area-inset-top, 0px) + 0px); }
.v5-x[data-for="matin-page"] { top: calc(env(safe-area-inset-top, 0px) + 8px); }
.v5-x[data-for="mail-page"] { top: calc(env(safe-area-inset-top, 0px) + 18px); }
#matin-page .v5-top { padding-right: 40px; }
/* mails : 5 par boîte, effaçables de l'interface (balayage vers la gauche ; croix sur ordinateur) */
.mwrap { position: relative; overflow: hidden; border-top: 1px solid var(--line); transition: max-height .17s ease, opacity .17s ease; max-height: 260px; }
.mwrap::after { content: "Effacer"; position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 120px; display: flex; align-items: center; justify-content: center; background: var(--warn-bg); color: var(--warn-ink); font-size: var(--fs-small); font-weight: 500; }
.mwrap .mrow { position: relative; z-index: 1; border-top: 0; background: var(--card); touch-action: pan-y; transition: transform .17s ease; padding-top: 16px; padding-bottom: 16px; }
.mwrap.gone { max-height: 0; opacity: 0; border-top-width: 0; }
.mwrap.gone .mrow { transform: translateX(-100%); }
.mdel { display: none; position: absolute; z-index: 2; right: 6px; top: 6px; width: 44px; height: 44px; border: 0; background: none; color: var(--t-faint, var(--t-soft)); place-items: center; border-radius: 50%; }
.mdel svg { width: 16px; height: 16px; stroke-width: 2; }
@media (hover: hover) and (pointer: fine) { .mdel { display: grid; } .mdel:hover { background: var(--tint); color: var(--ink); } .mwrap .mrow { padding-right: 52px; } .mwrap .mrow .mwhen { margin-right: 0; } }
.mails-unmask { display: flex; justify-content: center; margin: 0 0 var(--s4); }
.mails-unmask .link-quiet { margin: 0; }
#lead-page { padding-top: calc(44px + env(safe-area-inset-top, 0px)); } /* bande de 26 px en plus pour la croix ✕ (aucun recouvrement du bandeau ni du bouton Appeler) */

/* Mission 28 : source + date sous chaque info, « à confirmer », journal de cohérence */
.p5 { display: block; font-size: var(--fs-cap); color: var(--t-soft); margin-top: 2px; }
.p5.conf, .proj-src.conf b { color: var(--warn-ink, #8A5F2B); font-weight: 600; }
.proj-src { margin: 8px 0; padding: 10px 12px; border-radius: var(--r-s); background: var(--tint, rgba(0,0,0,.03)); font-size: var(--fs-small); color: var(--t-text); }
.proj-src i { color: var(--t-soft); font-style: normal; }
.proj-src.conf { background: var(--warn-bg, #FFF5E9); }
.proj-src.ecart { color: var(--t-soft); }
.conf-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: var(--fs-small); }
.conf-row .btn { flex: none; }

/* Mission 30 : le rond « fait » des rappels devient une croix (×), même zone de toucher de 44 px */
.rc-check:not(.on) i { border: 0; background: none; color: var(--t-soft); }
.rc-check:not(.on) i svg { width: 22px; height: 22px; stroke-width: 2; }
.rt-check .rx { display: grid; place-items: center; width: 26px; height: 26px; color: var(--t-soft); }
.rt-check .rx svg { width: 22px; height: 22px; stroke-width: 2; }

/* Mission 31 : Rappels en trois états (En cours / Faits / Annulés), compteurs, dates, « Remettre en cours » */
.rf-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 4px; white-space: nowrap; }
.rf-n { font-weight: 500; font-size: 13px; color: var(--t-soft); min-width: 1ch; }
.rf-tab[aria-selected="true"] .rf-n { color: var(--accent-text, var(--accent)); }
.rr-tx .s.d { font-size: 13px; color: var(--t-soft); }
.rr.cancelled .rr-tx .t { color: var(--t-soft); text-decoration: line-through; text-decoration-thickness: 1px; }
.rr-act { padding: 0 8px 6px 42px; background: var(--card); display: flex; }
.rr-act .link-quiet { margin: 0; min-height: 44px; }

/* Mission 33 : coche verte (fait) + croix rouge (annulé) + bouton + */
.rp-acts { flex: none; display: flex; align-items: center; gap: 12px; margin-left: auto; }
.rp-ok, .rp-no { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; padding: 0; }
.rp-ok { background: var(--ok-bg); color: var(--ok-ink); }
.rp-no { background: var(--warn-bg); color: var(--warn-ink); }
.rp-ok svg, .rp-no svg { width: 22px; height: 22px; stroke-width: 2.25; }
.rp-ok:active, .rp-no:active { transform: scale(.94); }
.rp-ok:disabled, .rp-no:disabled { opacity: .5; }
.rp-plus { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent-bg); color: var(--accent-ink); display: grid; place-items: center; padding: 0; }
.rp-plus svg { width: 22px; height: 22px; stroke-width: 2.25; }
.rtop-head { gap: 8px; padding-right: 0; }
.rtop-head #rt-open { flex: 1 1 auto; }
.rp-title { display: flex; align-items: center; gap: 12px; }
.rp-title .rp-plus { margin-left: auto; }
.rr-fg { gap: 10px; }
.rq-daily { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: var(--fs-body); }
.rq-daily input { width: 24px; height: 24px; accent-color: var(--accent); }
.rtop-head .rp-plus { width: 44px; min-width: 44px; height: 44px; justify-content: center; }

/* Mission 34 : bandeau en pilule + bouton Rappels de l'accueil (même style que « Écouter le brief ») */
.rtop { margin-top: 18px; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.rbar { display: flex; align-items: stretch; height: var(--btn-h); border-radius: var(--btn-r); background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 500; letter-spacing: .01em; overflow: hidden; }
.rbar button { border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; display: flex; align-items: center; justify-content: center; min-height: 44px; height: 100%; padding: 0 var(--btn-px); width: auto; }
.rbar button:active { opacity: .85; }
.rbar .rb-t { flex: 0 0 auto; }
.rbar .rb-n { flex: 1 1 auto; min-width: 0; white-space: nowrap; color: var(--on-accent-soft); font-weight: 400; }
.rbar .rb-p { flex: 0 0 auto; width: 56px; padding: 0; }
.rbar .rb-p svg { width: 20px; height: 20px; stroke-width: 2; }
.rb-sep { flex: none; align-self: center; width: 1px; height: 22px; background: currentColor; opacity: .28; }
.rt-list { margin-top: 10px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); padding: 4px 8px 4px 16px; }
#toast { left: 50%; right: auto; width: max-content; max-width: min(92vw, 440px); min-height: 44px; padding: 0 6px 0 8px; border-radius: 999px; overflow: hidden; position: fixed; text-align: left; font-size: 15px; font-weight: 500; gap: 8px;
  background: rgba(255, 255, 255, .78); color: var(--ink); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 6px 24px rgba(44, 53, 70, .16), 0 1px 3px rgba(44, 53, 70, .08); border: 1px solid rgba(44, 53, 70, .06); animation: toast-in .22s var(--ease) both; }
#toast.out { animation: toast-out .2s var(--ease) both; }
#toast .tm { flex: 1 1 auto; min-width: 0; padding: 0 4px; }
#toast .ti { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
#toast .ti svg { width: 16px; height: 16px; stroke-width: 2.5; }
#toast .ti.ok { background: var(--ok-bg); color: var(--ok-ink); }
#toast .ti.no { background: var(--warn-bg); color: var(--warn-ink); }
#toast button { flex: none; margin-left: 4px; padding: 0 14px; min-height: 44px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--accent-ink); opacity: .9; }
#toast .tbar { position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); opacity: .35; transform-origin: left; animation: toast-bar linear forwards; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-out { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-color-scheme: dark) { #toast { background: rgba(30, 37, 50, .8); color: var(--ink); border-color: rgba(232, 237, 245, .1); box-shadow: 0 8px 28px rgba(0, 0, 0, .45); } }
@media (prefers-reduced-motion: reduce) { #toast, #toast.out { animation: none; } #toast .tbar { animation: none; display: none; } #toast.out { opacity: 0; } }
