/* 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 */
.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; }

/* ---------- 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); }
.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; } }
/* 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; transition: width .3s ease, height .3s ease, margin-top .3s ease; } /* mission 36 : se réduit en douceur (~300 ms) dès que la conversation démarre */
.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: -26.8%; top: -17.4%; width: 101%; height: 101%; filter: blur(44px); transition: filter .3s ease; }
.vportrait .b2 { right: -29.5%; bottom: -21.6%; width: 105.3%; height: 105.3%; filter: blur(46px); transition: filter .3s ease; }
.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: 100%; height: 100%; transition: border-width .3s ease, box-shadow .3s ease; 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; transition: margin-top .3s ease; }
.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; transition: margin-top .3s ease; overflow-anchor: none; 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 { animation: bub-in .22s ease both; }
.bub.ek { position: relative; align-self: stretch; min-height: 34px; padding-right: 40px; font-size: 22px; line-height: 1.32; font-weight: 500; letter-spacing: -.015em; color: var(--ink); transition: color .4s ease; } /* mission 36 : même taille et même graisse avant/après → jamais de reflux du texte déjà affiché */
.bub.ek.old { color: var(--t-past); }
.bub .w.in { animation: w-in .26s ease-out both; }
@keyframes bub-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes w-in { from { opacity: 0; } to { opacity: 1; } }
.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; }
/* conversation en cours : la photo devient un petit rond en haut (halo et pulsation conservés), le texte prend toute la hauteur */
#voice.live .vportrait { width: 68px; height: 68px; margin-top: 8px; }
#voice.live .vportrait img, #voice.live .vportrait .fallback { border-width: 2px; box-shadow: 0 4px 14px rgba(44, 53, 70, .14); }
#voice.live .vportrait .b1 { filter: blur(16px); } #voice.live .vportrait .b2 { filter: blur(17px); }
#voice.live .eq { margin-top: 10px; } #voice.live .convo { margin-top: 10px; }
@media (max-height: 700px) { .vportrait { margin-top: 14px; width: 143px; height: 143px; } .eq { margin-top: 14px; } #voice.live .vportrait { width: 64px; height: 64px; margin-top: 6px; } #voice.live .eq { margin-top: 8px; } #voice.live .convo { margin-top: 8px; } .bub.ek { font-size: 20px; } }
.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-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; }
.rt-row { display: flex; align-items: center; gap: 2px; min-height: 48px; }
.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; }
/* 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); }
#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; }
.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; }
.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; }
.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 { position: absolute; right: -6px; bottom: -8px; margin: 0; }
@media (prefers-reduced-motion: reduce) { .vportrait, .vportrait .blob, .vportrait img, .eq, .convo { transition: none; } .bub, .bub .w.in { animation: none; } }
.pl-spk { align-self: flex-start; margin: 2px 0 0 -10px; }
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 {
  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 { 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 { width: 18px; height: 18px; }
.btn-face svg { stroke-width: 1.75; }
.vbtn { padding: 0 12px; }
.vbtns { gap: 10px; bottom: calc(34px + var(--safe-b)); }
.pl-talk { margin-top: auto; }
.pl-talk svg { stroke-width: 1.75; }
/* discret : texte seul, zone tactile 44 px */
.link-quiet, .link-mini { 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); }
/* 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; }

/* 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; }
.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); }

/* 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; } }

/* Mission 41 : page Leads (onglets Nouveaux / Lus, lignes cliquables) et fiche complète d'un lead */
.seg.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.seg button b { font-weight: 600; margin-left: 4px; }
#leads-page .lp-tabs { max-width: 560px; margin: 0 auto var(--s3); }
.lrow.lp-open { width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; min-height: 64px; }
.lrow.lp-open:last-child { border-bottom: 0; }
.lrow.is-test .lname, .lrow.is-test .l2 { opacity: .7; }
.tbadge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink); font-size: var(--fs-cap); font-weight: 600; letter-spacing: .04em; vertical-align: 3px; }
.lf-list { margin: 0; }
.lf-row { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.lf-row:last-child { border-bottom: 0; }
.lf-row dt { font-size: var(--fs-cap); letter-spacing: .06em; text-transform: uppercase; color: var(--t-soft); margin-bottom: 2px; }
.lf-row dd { margin: 0; font-size: var(--fs-row); color: var(--ink); overflow-wrap: anywhere; }
.lf-row dd.none { color: var(--t-soft); }
#lf-body .lf-call { width: 100%; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; margin: 0 0 var(--s2); }
/* Mission 42 : un message d'erreur vide n'affiche plus son « ! » seul (fiches Agenda, rappel par téléphone) */
.err:empty::before { content: none; }

/* Mission 43 : fiches et clavier mobile. Le fond de fiche suit la fenêtre VISIBLE (--vvh / --vvt posées par app.js depuis visualViewport) : avec le clavier ouvert, la fiche reste au-dessus du clavier.
   Le défilement n'est jamais transmis à la page derrière ; les boutons des formulaires restent collés en bas de la fiche et se partagent la largeur. */
.sheet-bg { inset: auto; top: var(--vvt, 0px); left: 0; right: 0; height: var(--vvh, 100%); overscroll-behavior: none; touch-action: none; }
.sheet { max-height: min(90vh, calc(var(--vvh, 100vh) - 12px)); overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
#sheet-rapide .btns, #sheet-rappel .btns, #sheet-appel-new .btns { display: flex; 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-rapide .btns .btn, #sheet-rappel .btns .btn, #sheet-appel-new .btns .btn { flex: 1 1 0; min-width: 0; }
.rp-fields .rq-daily { flex-direction: row; align-items: center; gap: 12px; }

/* Mission 43 : page Appels (Me rappeler / Appeler quelqu'un / Historique), barre du bas à 6 cases, case Appels de l'accueil */
#appels-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, 16px) + var(--safe-b) + 40px); }
#appels-page:not([hidden]) { animation: ek-page .26s var(--ease); }
#appels-page > * { max-width: 560px; margin-left: auto; margin-right: auto; }
#appels-page .apl-tabs { margin-bottom: var(--s3); }
#appels-page .seg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#appels-page .seg button { line-height: 1.15; padding: 6px 4px; }
.apl-filters { margin-bottom: var(--s3); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.apl-filters .rf-tab { font-size: 14px; gap: 4px; }
.apl-st { margin-left: 0; font-size: var(--fs-cap); }
.apl-st-avenir { background: var(--accent-bg); color: var(--accent-ink); }
.apl-st-fait { background: var(--ok-bg); color: var(--ok-ink); }
.apl-st-manque { background: var(--warn-bg); color: var(--warn-ink); }
.apl-st-annule { background: var(--tint); color: var(--t-soft); }
.lrow.apl-row .l2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lrow.apl-row.is-annule .lname, .lrow.apl-row.is-annule .l2 span:not(.tbadge) { opacity: .65; }
.apt-msg { margin: 0 0 var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-m, 16px); background: var(--card); box-shadow: var(--shadow); }
.apt-msg.moi { background: var(--accent-bg); }
.apt-msg small { display: block; font-size: var(--fs-cap); letter-spacing: .06em; text-transform: uppercase; color: var(--t-soft); margin-bottom: 4px; }
.apt-msg p { margin: 0; font-size: var(--fs-body); line-height: 1.45; overflow-wrap: anywhere; }
.rtop-appels { margin-top: var(--s2); }
/* barre du bas : 5 onglets + micro. 3 onglets à gauche, 2 à droite plus larges : le micro reste exactement au centre */
#tabbar .in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 66px minmax(0, 1.5fr) minmax(0, 1.5fr); }
#tabbar button.tab span:not(.badge) { max-width: 100%; white-space: nowrap; overflow: visible; }
#appels-page .rp-title { margin-bottom: var(--s3); }

/* ===== Mission 43b : barre du bas (maquette validée), Réglages en ⚙, barre Appels sauge, fiches qui ne débordent jamais ===== */
:root { --bar-h: 64px; --tb-bg: rgba(255, 255, 255, .96); --tb-line: #E3E9F1; --tb-off: #5F6B80; --tb-on: #52729C; --tb-ring: #FFFFFF; --tb-mic-shadow: rgba(82, 114, 156, .35); }
@media (prefers-color-scheme: dark) { :root { --tb-bg: rgba(30, 37, 50, .96); --tb-line: #2A3343; --tb-off: #8D97A8; --tb-on: #8FAAD0; --tb-ring: #1E2532; --tb-mic-shadow: rgba(0, 0, 0, .45); } }
#tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--tb-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--tb-line); padding-bottom: env(safe-area-inset-bottom); }
#tabbar .in { max-width: 560px; margin: 0 auto; height: 64px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
#tabbar button.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 100%; min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--tb-off); font-family: inherit; font-size: 11px; font-weight: 500; letter-spacing: .01em; line-height: 1.1; }
#tabbar button.tab svg { width: 23px; height: 23px; stroke-width: 1.6; flex: none; }
#tabbar button.tab[aria-current="page"] { color: var(--tb-on); font-weight: 500; }
#tabbar button.tab[aria-current="page"]::before { content: ""; position: absolute; top: 6px; left: 50%; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px; background: var(--tb-on); }
#tabbar .badge { top: 9px; left: calc(50% + 7px); }
#tabbar .center { display: flex; justify-content: center; align-items: center; height: 100%; padding: 0; background: none; border: 0; }
#tabbar .center .mic { margin: 0; width: 54px; height: 54px; transform: translateY(-22px); border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #FFFFFF; background: linear-gradient(145deg, #8DB3DE, #52729C); box-shadow: 0 0 0 5px var(--tb-ring), 0 8px 18px var(--tb-mic-shadow); }
#tabbar .center .mic svg { width: 24px; height: 24px; stroke-width: 1.6; }
/* Réglages : icône ⚙ en haut à droite de l'accueil, sur la ligne de la date */
.topline .tl-r { display: flex; align-items: center; gap: 10px; }
.gear { flex: none; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border-radius: 12px; border: 1px solid #E3E9F1; background: #FFFFFF; color: #52729C; }
.gear svg { width: 20px; height: 20px; stroke-width: 1.6; }
@media (prefers-color-scheme: dark) { .gear { background: #1E2532; border-color: #2A3343; color: #8FAAD0; } }
/* Barres de l'accueil : 46 px, coins 14 px, « + » dans un carré blanc translucide de 34 px ; Appels en vert sauge */
.rbar { height: 46px; border-radius: 14px; }
.rbar.rbar-appels { background: #5E8C80; color: #FFFFFF; }
.rbar .rb-p { position: relative; flex: 0 0 46px; width: 46px; padding: 0; }
.rbar .rb-p::before { content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 10px; background: rgba(255, 255, 255, .22); }
.rbar .rb-p svg { position: relative; width: 20px; height: 20px; }
/* Fiches : rien ne dépasse de l'écran, champ date/heure compris (iOS donne à datetime-local une largeur propre) */
.sheet, .sheet .rp-fields, .sheet .rp-fields label, .sheet .ag-grid, .sheet .ag-grid label, .sheet .ag-two { min-width: 0; }
.rp-fields { grid-template-columns: minmax(0, 1fr); }
.sheet .field, .sheet select.field, .sheet input[type="datetime-local"], .sheet input[type="date"], .sheet input[type="time"] { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
.sheet input[type="datetime-local"]::-webkit-date-and-time-value, .sheet input[type="date"]::-webkit-date-and-time-value { text-align: left; min-width: 0; }
.sheet input[type="datetime-local"]::-webkit-datetime-edit, .sheet input[type="date"]::-webkit-datetime-edit { padding: 0; min-width: 0; overflow: hidden; }
#tabbar { border-top: 0; box-shadow: inset 0 1px 0 var(--tb-line); } /* le filet de 1 px est dessiné DANS la hauteur : la barre fait exactement 64 px + zone de sécurité */

/* ===== Mission 43c : barre Leads (terre cuite), Appels plus foncé, pastilles à l'intérieur des cartes, barre d'état ===== */
.rbar.rbar-appels { background: #4F7A6F; }
.rbar.rbar-leads { background: #A0643A; color: #FFFFFF; }
.rtop-leads { margin-bottom: var(--s2); }
.rbar .rb-p svg { stroke-width: 2.2; }
/* pastilles de couleur (statuts) : jamais collées au bord de la carte, alignées avec la première ligne de texte */
.camp { padding: 14px var(--s4); }
.camp .dotk { margin-top: 7px !important; }
.dev .dotk, .row .dotk { margin-left: 0; }
.dev { padding-left: 0; padding-right: 0; }
/* haut de page : rien ne passe sous la barre d'état de l'iPhone (zone de sécurité haute) */
#statusbar-cover { position: fixed; top: 0; left: 0; right: 0; height: var(--safe-t); background: var(--bg); z-index: 60; pointer-events: none; }

/* Mission 41b : la pastille de rappel d'un lead ne colle pas au métier et passe à la ligne si besoin */
.lrow.lp-open .l2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }

/* Mission 44 : Appeler quelqu'un (carnet, formulaire, récapitulatif avant l'appel) */
.field.ta { height: auto; min-height: 96px; padding: 12px var(--s4); line-height: 1.4; resize: none; font-family: inherit; }
select.field { appearance: none; -webkit-appearance: none; background-image: none; }
.tc-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin: 0 0 var(--s4); }
.tc-top small { color: var(--t-soft); font-size: var(--fs-small); }
.tc-h { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-h2, 20px); font-weight: 500; margin: var(--s5) 0 var(--s2); }
.tc-add { min-height: 44px; padding: 0 var(--s2); border: 0; background: none; color: var(--accent-text, var(--accent)); font: inherit; font-size: 15px; font-weight: 500; }
.tc-card { padding: var(--s3) var(--s4); margin: 0 0 var(--s3); border-radius: var(--r-s); background: var(--card); border: 1px solid var(--line); }
.tc-card small { display: block; font-size: var(--fs-small); color: var(--t-soft); margin-bottom: 2px; }
.tc-card b { display: block; font-size: 20px; font-weight: 500; }
.tc-card p { margin: 0; font-size: var(--fs-body); overflow-wrap: anywhere; }
.tc-save { display: flex; align-items: center; gap: var(--s2); min-height: 44px; margin: 0 0 var(--s3); font-size: var(--fs-body); }
.tc-save input { width: 22px; height: 22px; }
.apl-resume { margin-top: 2px; color: var(--t-soft); font-size: var(--fs-small); overflow-wrap: anywhere; }
.lf-victoria { width: 100%; margin: 0 0 var(--s3); }

/* Mission 45 : choix du « + » des appels (Appeler quelqu'un / Me rappeler) : deux grands boutons bien espacés */
.ac-list { display: grid; gap: var(--s4); margin: var(--s3) 0 var(--s2); }
.ac-btn { display: block; width: 100%; min-height: 84px; padding: var(--s4); text-align: left; border-radius: var(--r-m, 16px); border: 1px solid var(--line-btn, var(--line)); background: var(--card); color: var(--ink); font: inherit; }
.ac-btn b { display: block; font-size: 19px; font-weight: 500; margin-bottom: 4px; }
.ac-btn span { display: block; font-size: var(--fs-small); color: var(--t-soft); line-height: 1.35; overflow-wrap: anywhere; }
.ac-btn.pref { background: var(--accent-fill, var(--accent)); border-color: transparent; color: #fff; }
.ac-btn.pref span { color: rgba(255, 255, 255, .88); }

/* Mission 47 : espacement de l'accueil. Barres de 52 px (texte centré), 16 px minimum entre le texte et le bord, 12 px minimum entre icône, texte, compteur et « + », 12 px entre les barres, 16 px autour des tuiles. */
.rbar { height: 52px; min-height: 52px; border-radius: 16px; align-items: center; }
.rbar button { height: 100%; min-height: 44px; }
.rbar .rb-t { padding: 0 16px; }
.rbar .rb-n { padding: 0 12px; }
.rbar .rb-p { position: relative; flex: 0 0 68px; width: 68px; padding: 0; }
.rbar .rb-p::before { width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 11px; }
.rb-sep { height: 24px; }
.rtop { margin-top: 12px; }
.rtop-leads { margin-top: 18px; margin-bottom: 0; }
.rtop-appels { margin-top: 12px; }
.tiles { margin-top: 16px; }
.tile { padding: 16px; gap: 8px; }
.btn-main, .btn-alt { padding: 0 16px; }
.btn-main { gap: 12px; }
@media (max-width: 359px) { .btn-main { gap: 12px; } }

/* Mission 48 : barres de filtres (Rappels, Appels, Leads) = cases égales sur 2 lignes (chiffre 18 px gras au-dessus, mot 13 px dessous), 60 px de haut, ≥ 8 px de marge intérieure, 6 px entre les cases et 6 px au bord du fond ;
   case choisie blanche avec ombre. Onglets du haut des Appels : une seule ligne, 3 cases égales. */
.rf, .lp-tabs .seg { display: grid; gap: 6px; padding: 6px; border-radius: 18px; background: var(--tint); }
.rf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apl-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lp-tabs .seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rf-tab, .lp-tabs .seg button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 60px; min-height: 60px; padding: 0 8px; border: 0; border-radius: 14px; background: transparent; color: var(--t-soft); font-size: 13px; font-weight: 400; line-height: 1.15; white-space: nowrap; text-align: center; }
.rf-tab span { font-size: 13px; font-weight: 400; line-height: 1.15; }
.rf-tab .rf-n, .lp-tabs .seg button b { order: -1; margin: 0; min-width: 0; font-size: 18px; font-weight: 600; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.apl-filters .rf-tab { font-size: 13px; gap: 2px; }
.rf-tab[aria-selected="true"], .lp-tabs .seg button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(44, 53, 70, .12); }
.rf-tab[aria-selected="true"] .rf-n { color: var(--ink); }
#appels-page .seg { gap: 6px; padding: 6px; }
#appels-page .seg button { white-space: nowrap; padding: 0 4px; min-height: 44px; font-size: 14px; line-height: 1.2; text-align: center; }
/* Petit écran (320 px) : la largeur ne permet pas 16 px de marge autour de « Me rappeler » / « Manqués » : onglets en 13 px, mots des filtres en 12 px, barre de filtres élargie de 12 px de chaque côté, onglets plus serrés (gap et fond de 4 px) */
@media (max-width: 359px) { #appels-page .seg button { font-size: 13px; } #appels-page > .apl-filters { max-width: none; width: calc(100% + 24px); margin-left: -12px; margin-right: -12px; } #appels-page .seg { gap: 4px; padding: 4px; } .apl-filters .rf-tab span { font-size: 12px; } }

/* Mission 55 : bandeau de rappel — Quotidien / Une fois, 3 boutons pour un rappel répété, confirmation d'arrêt */
.rbn .k { flex-wrap: wrap; }
.rbn-rep { margin-left: auto; padding: 2px 9px; border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 1.4; background: var(--tint); color: var(--accent-text, var(--accent)); }
.rbn-rep.one { color: var(--t-soft); }
.rbn-btns[hidden], .rbn-stop[hidden], .rbn-conf[hidden] { display: none; }
.rbn-btns button.go { flex: 1.4 1 0; }
.rbn-stop { display: flex; justify-content: center; margin-top: 4px; }
.rbn-stop-b { min-height: 44px; border: 0; background: none; color: #B3342A; font-size: 15px; font-weight: 500; padding: 0 12px; }
.rbn-conf p { margin: 10px 0 0; font-size: var(--fs-body); font-weight: 500; color: var(--ink); }
.rbn-btns button.danger { border: 0; background: #B3342A; color: #fff; }
.rbn { background: var(--card); } /* opaque : le bandeau, plus haut avec 3 boutons, ne laisse plus transparaître la page */

/* Mission 56 : les 3 cases Leads / Pub / Mails sont strictement identiques (largeur, hauteur, marge, étiquette / chiffre / sous-titre sur les mêmes lignes) quel que soit le contenu */
.tiles { grid-auto-rows: 1fr; align-items: stretch; }
.tile { box-sizing: border-box; display: grid; grid-template-rows: auto 44px auto; align-content: start; row-gap: 8px; min-height: 124px; padding: 16px; }
.tile .lbl { line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .val { height: 44px; display: flex; align-items: center; line-height: 1; }
.tile .sub { min-height: calc(2 * 1.3em); align-self: start; overflow-wrap: anywhere; }

/* Mission 61 : bandeau de rappel répété = « Fait pour aujourd'hui » seul sur toute la largeur, puis « Dans 10 min » et « Arrêter ce rappel » côte à côte ; aucun texte ne déborde */
.rbn-rows[hidden] { display: none; }
.rbn-btns.rbn-full button.go { flex: 1 1 100%; white-space: normal; line-height: 1.2; }
.rbn-btns button { min-width: 0; white-space: normal; line-height: 1.2; overflow-wrap: anywhere; }
.rbn-rows .rbn-btns button { height: auto; min-height: 44px; padding: 6px 8px; }
.rbn-btns button.rbn-stop-b { color: #B3342A; font-size: 14px; border: 1px solid var(--btn-line); background: var(--card); }

/* Mission 62 : appel du matin, heure et jours sous le titre */
#am-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.am-sub { font-size: var(--fs-small, 14px); color: var(--t-soft); font-weight: 400; overflow-wrap: anywhere; }


/* ===== Mission 65 : mails sur l'accueil (bouton Effacer) + onglet SMS ===== */
#mails-home { margin-top: var(--s5, 24px); }
#mails-home .mails-head { margin-bottom: 4px; }
.mwrap { display: flex; align-items: stretch; overflow: visible; max-height: none; }
.mwrap::after { content: none; display: none; }
.mwrap .mrow { flex: 1 1 auto; min-width: 0; padding-right: 8px; }
.meff { flex: 0 0 auto; align-self: center; min-width: 64px; min-height: 44px; margin-right: 8px; padding: 0 12px; border: 1px solid var(--line-btn, var(--line)); border-radius: 12px; background: var(--card); color: var(--t-soft); font-size: 13px; font-weight: 500; font-family: inherit; }
.meff:active { transform: scale(.96); }
#tabbar .tab .badge { z-index: 2; }
.sms-card { background: var(--card); border-radius: var(--r-card, 22px); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 8px; min-width: 0; }
.sms-card .field { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; font-size: 16px; appearance: none; }
.sms-txt { min-height: 120px; resize: vertical; line-height: 1.4; padding-top: 12px; }
.sms-lbl { font-size: 13px; font-weight: 500; color: var(--t-soft); margin-top: 4px; }
.sms-senders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sms-sender { min-height: 48px; border: 1px solid var(--line-btn, var(--line)); border-radius: 14px; background: var(--card); color: var(--ink); font-size: 15px; font-weight: 500; font-family: inherit; padding: 0 6px; }
.sms-sender.sel { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.sms-count { font-size: 13px; color: var(--t-soft); }
.sms-hint { font-size: 13px; color: var(--t-soft); }
.sms-warn { font-size: 14px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 10px 12px; }
.sms-err { font-size: 14px; color: var(--bad, #B3342A); min-height: 0; }
.sms-err:empty { display: none; }
.sms-go { width: 100%; min-height: 48px; margin-top: 4px; }
.sms-go:disabled { opacity: .45; }
.sms-h2 { font-size: 20px; margin: 24px 0 8px; }
.sms-prev { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--tint, var(--bg)); border-radius: 12px; padding: 10px 12px; font-size: 15px; }
.sms-row .sms-body { white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sms-meta { font-size: 13px; }
.sms-st.envoye { color: var(--ok-text, #187A52); } .sms-st.refuse { color: var(--bad, #B3342A); } .sms-st.simule { color: var(--t-soft); }
#sheet-sms-envoi .rbn-btns, #sheet-mail-effacer .rbn-btns { gap: 10px; margin-top: 12px; }
#sheet-sms-envoi .rbn-btns button, #sheet-mail-effacer .rbn-btns button { height: 48px; min-height: 48px; border-radius: 14px; font-size: 15px; }

/* ===== Mission 66 : SMS — menu Expéditeur, Destinataire avec recherche dans le carnet ===== */
.sms-from { width: 100%; min-height: 52px; font-size: 16px; }
.sms-sugg { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.sms-sugg[hidden], .sms-pick[hidden] { display: none; }
.sms-opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; border: 0; border-top: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 16px; text-align: left; }
.sms-opt:first-child { border-top: 0; }
.sms-opt .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sms-opt .p { flex: 0 0 auto; color: var(--t-soft); font-size: 14px; }
.sms-none { padding: 12px 14px; font-size: 14px; color: var(--t-soft); }
.sms-pick { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--tint, var(--bg)); font-size: 15px; }
.sms-pk-t { min-width: 0; overflow-wrap: anywhere; }
.sms-pk-x { flex: 0 0 auto; min-height: 44px; min-width: 64px; padding: 0 12px; border: 1px solid var(--line-btn, var(--line)); border-radius: 12px; background: var(--card); color: var(--t-soft); font: inherit; font-size: 14px; font-weight: 500; }

/* ===== Mission 67 : SMS — précision « * » et historique complet ===== */
.sms-star { font-size: 13px; color: var(--t-soft); margin-top: -2px; }
.sms-when { font-size: 13px; }
.sms-row .sms-body { -webkit-line-clamp: 2; }

/* Mission 69c — les 3 barres de l'Accueil en pastel (Leads / Rappels / Appels), identiques en clair et en sombre */
#leads-top .rbar { background: #CFDDF5; color: #1F3A6B; }
#rappels-top .rbar { background: #FFFFFF; color: #1F3A6B; box-shadow: inset 0 0 0 1.5px #CFDDF5; }
#appels-top .rbar { background: #F7D0D3; color: #8E1F2A; }
#leads-top .rbar .rb-n, #rappels-top .rbar .rb-n { color: #1F3A6B; }
#appels-top .rbar .rb-n { color: #8E1F2A; }
#leads-top .rbar .rb-p::before, #rappels-top .rbar .rb-p::before { background: rgba(31, 58, 107, .12); }
#appels-top .rbar .rb-p::before { background: rgba(142, 31, 42, .12); }
#leads-top .rbar .rb-p svg, #rappels-top .rbar .rb-p svg, #leads-top .rbar .rb-t, #rappels-top .rbar .rb-t, #leads-top .rbar .rb-sep, #rappels-top .rbar .rb-sep { color: #1F3A6B; stroke: currentColor; }
#appels-top .rbar .rb-p svg, #appels-top .rbar .rb-t, #appels-top .rbar .rb-sep { color: #8E1F2A; stroke: currentColor; }

/* Mission 71 : la page Appels s'ouvre comme les autres onglets : barre du bas visible (la page s'arrête au-dessus d'elle, sous le mini-lecteur éventuel), onglet Appels surligné ; la flèche retour n'existe que si on arrive depuis une autre page (barre « Appels » de l'Accueil). */
#appels-page { z-index: 15; bottom: calc(var(--bar-h) + var(--mini-h) + var(--safe-b) + 16px); padding-bottom: 20px; } /* +16 px : le micro dépasse de 14 px au-dessus de la barre */
#appels-page:not(.from-page) #apl-back { display: none; }
#appels-page:not(.from-page) .rp-title { margin-top: 8px; }
body.appels-on main { visibility: hidden; }

/* Mission 73 : aucune pastille sur les icônes de la barre du bas */
#tabbar .badge { display: none !important; }

/* Mission 82 — écran Conversation : UN gros bouton rond « Maintenir pour parler » au centre ; Stop à gauche ; plus de Pause ni de « Lui répondre » */
#voice .vbtns { display: grid; grid-template-columns: 1fr 104px 1fr; align-items: center; gap: 0; max-width: 520px; bottom: calc(26px + var(--safe-b)); }
#voice .vbtns .vbtn.stop { justify-self: start; flex: none; min-width: 60px; height: 52px; padding: 0 12px; }
#voice .vbtns .vbtn.stop span { font-size: 14px; }
.ptt { grid-column: 2; justify-self: center; width: 104px; height: 104px; min-width: 72px; min-height: 72px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; font-size: 13px; font-weight: 500; line-height: 1.15; text-align: center; cursor: pointer;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; -webkit-tap-highlight-color: transparent; box-shadow: 0 0 0 8px var(--ring, rgba(82,114,156,.18)); transition: transform .12s, box-shadow .12s, background .12s; }
.ptt svg { width: 26px; height: 26px; }
.ptt span { display: block; max-width: 88px; }
.ptt.on { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(82,114,156,.28); }
.ptt[aria-disabled="true"] { opacity: .45; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .ptt { transition: none; } }
/* Mission 82 : zone du gros bouton (88 px + halo 8 px) : on réserve la place sous le texte sans manger l'espace de lecture */
#voice .vbtns { grid-template-columns: 1fr 88px 1fr; bottom: calc(18px + var(--safe-b)); }
.ptt { width: 88px; height: 88px; box-shadow: 0 0 0 8px var(--ring, rgba(82,114,156,.18)); padding: 4px; }
.ptt span { max-width: 76px; font-size: 12px; }
.ptt svg { width: 24px; height: 24px; }
.ptt.on { box-shadow: 0 0 0 12px rgba(82,114,156,.28); }
.vhint { bottom: calc(112px + var(--safe-b)); }
.convo { padding-bottom: 150px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px, #000 calc(100% - 130px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 16px, #000 calc(100% - 130px), transparent 100%); }
body.spk-on .convo { padding-bottom: 190px; }

/* Mission 85 : rappels clairs (maquette-rappels-85) — sections Récurrents / Une seule fois, titre + une ligne « quand », boutons étiquetés */
.rx-sec { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 20px 4px 8px; font-size: 15px; font-weight: 600; color: var(--accent-text, var(--accent)); text-transform: uppercase; letter-spacing: .06em; }
.rx-sec small { font-size: 14px; font-weight: 400; color: var(--t-soft); text-transform: none; letter-spacing: 0; }
.rt-list { padding: 0 0 4px; background: none; box-shadow: none; margin-top: 4px; }
.rt-list .rx-sec:first-child { margin-top: 14px; }
.rx-card { border-radius: 20px; background: var(--card); box-shadow: var(--shadow); padding: 4px 0; overflow: hidden; }
.rg.rx-card { box-shadow: var(--shadow); }
.rx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 16px; min-height: 0; }
.rx-card .rx-row + .rx-row { border-top: 1px solid var(--line); }
.rx-row .rt-t { flex: 1 1 110px; min-width: 0; display: block; white-space: normal; overflow: visible; text-overflow: clip; font-size: 18px; font-weight: 500; line-height: 1.25; padding: 4px 0; min-height: 44px; }
.rx-row .rt-t b { display: block; font-weight: 500; overflow-wrap: anywhere; }
.rx-row .s.q { display: block; margin-top: 3px; font-size: 14px; font-weight: 400; color: var(--t-soft); }
.rx-row.rec .s.q { color: var(--accent-text, var(--accent)); font-weight: 500; }
.rx-row .s.q.late { color: var(--k-urgent); }
.rr.rx-row { display: block; padding: 0; }
.rr.rx-row .rr-fg { flex-wrap: wrap; gap: 4px 12px; padding: 12px 16px; min-height: 0; }
.rr.rx-row .rr-fg::before { display: none; }
.rx-card .rr.rx-row + .rr.rx-row { border-top: 1px solid var(--line); }
.rr.rx-row .rr-tx { flex: 1 1 110px; min-width: 0; }
.rr.rx-row .rr-tx .t { font-size: 18px; font-weight: 500; }
.rr.rx-row .rr-tx .s.q { font-size: 14px; }
.rp-acts { gap: 10px; margin-left: auto; align-items: stretch; }
.rp-ok.rp-lab, .rp-no.rp-lab { width: auto; height: auto; min-width: 58px; border-radius: 12px; background: none; color: var(--t-soft); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 0 2px; }
.rp-lab .rp-c { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-style: normal; }
.rp-ok .rp-c { background: var(--ok-bg); color: var(--ok-ink); }
.rp-no .rp-c { background: var(--warn-bg); color: var(--warn-ink); }
.rp-lab .rp-l { font-size: 12px; font-weight: 500; line-height: 1.2; text-align: center; max-width: 72px; color: var(--t-soft); }
/* Création : choix « Une seule fois » / « Récurrent », récapitulatif avant d'enregistrer */
.rq-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.rq-seg button { min-height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 16px; font-weight: 500; }
.rq-seg button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.rq-recap { background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.rq-recap p { margin: 0 0 10px; font-size: 16px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.rq-rb { display: flex; gap: 10px; }
.rq-rb .btn { flex: 1; }

/* Mission 87 : UN seul composant de choix. Sélecteur segmenté (fond #E4E9F2, case choisie blanche, 40 px, une ligne, icônes fines) pour Une fois/Récurrent, Réglages (voix), onglets Appels, filtres Rappels/Appels, onglets Leads ; pastilles (36 px, choisie en bleu) pour la fréquence. Apparence seulement. */
:root { --seg-track: #E4E9F2; --seg-on: #FFFFFF; --seg-mute: #7A879C; --chip-line: #DDE3EC; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --seg-track: var(--tint); --seg-on: #364258; --seg-mute: var(--t-soft); --chip-line: var(--line-btn); } }
:root[data-theme="dark"] { --seg-track: var(--tint); --seg-on: #364258; --seg-mute: var(--t-soft); --chip-line: var(--line-btn); }
.seg, .rf, .lp-tabs .seg, #appels-page .seg, .rq-seg { display: flex; gap: 0; padding: 0 4px; border-radius: 14px; background: var(--seg-track); }
.seg.two, .lp-tabs .seg, .rf, .apl-filters, #appels-page .seg { grid-template-columns: none; }
.seg button, .rf-tab, .lp-tabs .seg button, #appels-page .seg button, .rq-seg button { flex: 1 1 0; min-width: 0; height: 48px; min-height: 48px; padding: 0 4px; border: 0; border-radius: 11px; background: transparent; color: var(--seg-mute); position: relative; isolation: isolate; font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1; letter-spacing: 0; white-space: nowrap; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; box-shadow: none; text-align: center; }
.seg button::before, .rf-tab::before { content: ""; position: absolute; inset: 4px 0; border-radius: 11px; z-index: -1; pointer-events: none; }
.seg button[aria-checked="true"], .seg button[aria-selected="true"], .rf-tab[aria-selected="true"], .lp-tabs .seg button[aria-selected="true"], #appels-page .seg button[aria-selected="true"], .rq-seg button.on, .rq-seg button[aria-pressed="true"] { background: transparent; color: var(--ink); box-shadow: none; }
.seg button[aria-checked="true"]::before, .seg button[aria-selected="true"]::before, .rf-tab[aria-selected="true"]::before, .rq-seg button.on::before, .rq-seg button[aria-pressed="true"]::before { background: var(--seg-on); box-shadow: 0 1px 3px rgba(43, 58, 85, .12); }
.rf-tab span, .rf-tab .rf-n, .lp-tabs .seg button b, .seg button b { order: 0; margin: 0; font-size: inherit; font-weight: 500; line-height: 1; color: inherit; }
.rf-tab .rf-n, .lp-tabs .seg button b { font-size: 13px; color: var(--seg-mute); font-variant-numeric: tabular-nums; }
.rf-tab[aria-selected="true"] .rf-n, .lp-tabs .seg button[aria-selected="true"] b { color: var(--ink); }
.apl-filters .rf-tab, .apl-filters .rf-tab span { font-size: 14px; }
.ico { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.rx-sec .ico { margin-right: 6px; vertical-align: -3px; }
.rq-recap .ico { margin-right: 4px; }
.rq-seg { margin: 6px 0 16px; }
.rq-grp { display: grid; gap: 8px; }
.rq-lab { font-size: 14px; color: var(--seg-mute); margin-left: 4px; }
.rq-chips { display: flex; flex-wrap: wrap; gap: 0 8px; margin-top: -6px; }
.chip-c { height: 44px; min-height: 44px; padding: 0 14px; border: 0; background: transparent; position: relative; isolation: isolate; color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 400; line-height: 1; white-space: nowrap; display: inline-flex; align-items: center; }
.chip-c::before { content: ""; position: absolute; inset: 4px 0; border-radius: 18px; border: 1px solid var(--chip-line); background: var(--card); z-index: -1; pointer-events: none; }
.chip-c[aria-pressed="true"] { color: var(--on-accent); }
.chip-c[aria-pressed="true"]::before { background: var(--accent); border-color: var(--accent); }
@media (max-width: 359px) { .seg button, .rf-tab, .rq-seg button { font-size: 14px; } .apl-filters .rf-tab, .apl-filters .rf-tab span { font-size: 13px; } .rf-tab { gap: 4px; } }
/* Fiche d'un rappel : « Annuler ce rappel » tient sur une ligne (rangée du bas pleine largeur) */
#sheet-rappel .btns { flex-wrap: wrap; }
#sheet-rappel .btns .btn { white-space: nowrap; }
#sheet-rappel #rpe-save, #sheet-rappel #rpe-close { flex: 1 1 0; }
#sheet-rappel #rpe-del { order: 3; flex: 1 1 100%; }
.rq-chips { margin-bottom: 12px; }
@media (max-width: 359px) { #appels-page > .apl-filters { width: auto; margin-left: 0; margin-right: 0; max-width: none; } .apl-filters .rf-tab { gap: 3px; padding: 0 2px; } .apl-filters .rf-tab, .apl-filters .rf-tab span { font-size: 13px; } .apl-filters .rf-tab .rf-n { font-size: 12px; } }

/* Mission 88 : bandeau des relances HARII (dans #rbanners, avant les rappels) */
.rln .rbn-rows[hidden] { display: none; }
.rln .rbn-btns { margin-top: 8px; }
.rln .rbn-btns.rbn-full button { flex: 1 1 100%; white-space: nowrap; }
.rln .rbn-conf .rbn-btns button { flex: 1 1 0; }
