:root {
  /* charte Flavio : crème, marine, bordeaux */
  --ink: #1c2a44; --muted: #6b7384; --line: #e6e0d4; --soft: #f4efe4; --soft2: #ebe4d6;
  --bg: #faf6ee; --card: #fffdf8;
  --accent: #1f3a5f; --accent-soft: #e6ebf2;
  --bordeaux: #7a2e3b; --bordeaux-soft: #f3e4e6;
  --vert: #2f7d5b; --orange: #c8862a; --rouge: #9c3744; --gris: #a19a90;
  --radius: 12px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: normal; font-size: 30px; margin: 0 0 4px; color: var(--accent); }
h2 { font-family: Georgia, serif; font-weight: normal; font-size: 21px; margin: 28px 0 10px; color: var(--accent); }
h3 { font-size: 15px; margin: 0 0 6px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.serif { font-family: Georgia, serif; }

#app { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
#nav { border-right: 1px solid var(--line); padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--card); }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 18px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--bordeaux); color: #fff; display: grid; place-items: center; font-family: Georgia, serif; font-size: 16px; letter-spacing: .02em; }
.brand-name { font-weight: 600; }
.brand-sub { font-size: 12px; color: var(--muted); }
#menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink); font-size: 15px; }
#menu a:hover { background: var(--soft); }
#menu a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
#menu a .ico { width: 20px; text-align: center; font-size: 15px; opacity: .85; }
.nav-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 0 10px; }
#view { padding: 32px 44px 90px; max-width: 1640px; width: 100%; }
#tabbar { display: none; }

/* cartes et grilles */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 12px 0; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--card); }
.card.soft { background: var(--soft); border-color: transparent; }
.card.accent { background: var(--accent-soft); border-color: transparent; }
.card h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi { font-size: 26px; font-family: Georgia, serif; margin: 2px 0; }
.kpi small { font-size: 13px; color: var(--muted); font-family: -apple-system, Helvetica, sans-serif; margin-left: 6px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 8px; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.dot.vert { background: var(--vert); } .dot.orange { background: var(--orange); } .dot.rouge { background: var(--rouge); } .dot.gris { background: var(--gris); }
.tag { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--soft2); color: var(--muted); white-space: nowrap; }
.tag.vert { background: #e3f3ea; color: #246b45; } .tag.orange { background: #fbefd9; color: #8a5a12; } .tag.rouge { background: #f9e3e1; color: #8f2f27; } .tag.accent { background: var(--accent-soft); color: var(--accent); }

/* listes et tableaux */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--soft); }
.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list .item { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.list .item:last-child { border-bottom: 0; }
.list .item .grow { flex: 1; min-width: 0; }
.list .item .title { font-weight: 500; }
.list .item .sub { font-size: 13px; color: var(--muted); }
.empty { padding: 22px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); font-size: 14px; }

/* progression */
.bar { height: 8px; background: var(--soft2); border-radius: 99px; overflow: hidden; margin: 6px 0; }
.bar > i { display: block; height: 100%; background: var(--bordeaux); border-radius: 99px; }

/* boutons et formulaires */
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 9px; padding: 7px 13px; cursor: pointer; font-size: 14px; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--bordeaux); border-color: var(--bordeaux); color: #fff; }
.btn.primary:hover { background: #66252f; }
.btn.danger { color: var(--rouge); }
.btn.sm { padding: 4px 9px; font-size: 13px; }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check input { width: 20px; height: 20px; accent-color: var(--bordeaux); }
.check.done span { color: var(--muted); text-decoration: line-through; }
.form { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.form input, .form select, .form textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.form textarea { min-height: 80px; resize: vertical; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: var(--card); padding: 6px 12px; cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.quote { font-family: Georgia, serif; font-size: 17px; line-height: 1.6; color: var(--accent); }
pre.fiche { white-space: pre-wrap; font: 14px/1.5 -apple-system, Helvetica, sans-serif; background: var(--soft); padding: 14px; border-radius: 10px; margin: 0; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.bars .b { flex: 1; height: 100%; background: var(--soft2); border-radius: 6px 6px 0 0; position: relative; min-width: 14px; }
.bars .b > i { position: absolute; bottom: 0; left: 0; right: 0; background: var(--bordeaux); border-radius: 6px 6px 0 0; }
.bars .b span { position: absolute; top: 100%; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* modal */
#modal { position: fixed; inset: 0; background: rgba(31,35,40,.35); display: grid; place-items: center; padding: 16px; z-index: 50; }
#modal.hidden { display: none; }
.modal-card { background: var(--card); border-radius: 14px; padding: 22px; width: min(640px, 100%); max-height: 90vh; overflow: auto; }
.modal-card h2 { margin-top: 0; }

/* mobile */
@media (max-width: 820px) {
  #app { grid-template-columns: 1fr; }
  #nav { display: none; }
  #view { padding: 20px 16px 100px; }
  h1 { font-size: 26px; }
  #tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,253,248,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); overflow-x: auto; }
  #tabbar a { flex: 1; min-width: 62px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--muted); padding: 4px 2px; }
  #tabbar a .ico { font-size: 18px; }
  #tabbar a.active { color: var(--bordeaux); font-weight: 600; }
  .form { grid-template-columns: 1fr; }
  table { font-size: 13.5px; } th, td { padding: 8px 6px; }
}

/* accès privé */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--soft); }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px; width: min(440px, 100%); }
.auth-card .brand { padding: 0 0 18px; }
.auth-card h1 { font-size: 26px; margin-bottom: 10px; }
.auth-msg { background: #f9e3e1; color: #8f2f27; padding: 9px 12px; border-radius: 9px; font-size: 14px; }
.secret { font: 600 15px/1.6 ui-monospace, Menlo, monospace; letter-spacing: .06em; background: var(--soft); padding: 10px 12px; border-radius: 9px; word-break: break-all; user-select: all; }
#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 60; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%); }

.btn.big { width: 100%; padding: 13px 16px; font-size: 16px; border-radius: 11px; }
details.secours { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
details.secours summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-bottom: 10px; }

/* accueil */
.hero { padding: 26px 26px 22px; border-radius: 16px; background: linear-gradient(135deg, #1f3a5f 0%, #2a4a73 100%); color: #faf6ee; margin-bottom: 14px; }
.hero.soir, .hero.nuit { background: linear-gradient(135deg, #172a45 0%, #3d2533 100%); }
.hero.matin { background: linear-gradient(135deg, #1f3a5f 0%, #5a3b48 100%); }
.salut { font-family: Georgia, serif; font-size: 34px; line-height: 1.15; }
.hero-date { font-size: 14px; opacity: .8; margin-top: 4px; }
.hero-date::first-letter { text-transform: uppercase; }
.punchline { font-family: Georgia, serif; font-size: 20px; line-height: 1.5; margin: 18px 0 0; max-width: 760px; opacity: .95; cursor: pointer; }
.hero-phrase { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.pulse { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0; }
.tile { display: block; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); }
.tile:hover, a.card.proj:hover, a.card.horizon:hover { border-color: #cfc5b1; }
.t-label { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.t-val { font-family: Georgia, serif; font-size: 23px; margin: 4px 0 2px; color: var(--accent); }
.t-val small { font-family: -apple-system, Helvetica, sans-serif; font-size: 12px; color: var(--muted); }
.t-sub { font-size: 12.5px; color: var(--muted); }
ul.brief { margin: 4px 0 0; padding-left: 18px; } ul.brief li { margin: 6px 0; }
.routine-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 12px; font-size: 13.5px; cursor: pointer; }
.chip.on { background: var(--bordeaux); border-color: var(--bordeaux); color: #fff; }
a.card { display: block; color: var(--ink); }
.serif { font-family: Georgia, serif; }
/* vue d'ensemble */
.card.net { padding: 22px 24px; }
.net-val { font-family: Georgia, serif; font-size: 40px; color: var(--accent); margin: 4px 0 14px; }
.stack-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--soft2); }
.stack-bar i { display: block; height: 100%; }
.net-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 16px; }
.net-grid a { color: var(--ink); display: flex; flex-direction: column; gap: 3px; }
.net-grid b { font-weight: 600; font-variant-numeric: tabular-nums; }
.list a.item { color: var(--ink); }
@media (max-width: 820px) {
  .pulse { grid-template-columns: 1fr 1fr; }
  .salut { font-size: 28px; } .hero { padding: 22px 18px; }
  .net-grid { grid-template-columns: 1fr 1fr; } .net-val { font-size: 32px; }
  #tabbar { overflow-x: visible; }
}

/* navigation v2 */
@media (min-width: 821px) { #nav { display: flex; flex-direction: column; } }
#menu { display: flex; flex-direction: column; flex: 1; }
#menu a.sub { padding-left: 34px; font-size: 14px; color: var(--muted); }
#menu a.sub .ico { display: none; }
#menu a.sub.active { color: var(--accent); }
.nav-foot a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink); font-size: 15px; }
.nav-foot a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-foot a .ico { width: 20px; text-align: center; }
.badge { margin-left: auto; background: var(--bordeaux); color: #fff; font-size: 11px; font-weight: 600; border-radius: 99px; padding: 1px 7px; }
#tabbar a .ico { position: relative; }
.pastille { position: absolute; top: -1px; right: -6px; width: 7px; height: 7px; border-radius: 50%; background: var(--bordeaux); }
.hero { position: relative; }
.hero-gear { position: absolute; top: 18px; right: 20px; color: #faf6ee; opacity: .6; font-size: 18px; }
.hero-gear:hover { opacity: 1; }
a.card.attente { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; background: var(--bordeaux-soft); border-color: transparent; color: var(--bordeaux); font-weight: 500; }
.note-jour { width: 100%; margin-top: 14px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: #fff; }
.affaires { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.affaires a.card { display: flex; flex-direction: column; gap: 4px; }
a.card.affaire { display: block; color: var(--ink); }
.onglets { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 18px; border-bottom: 1px solid var(--line); }
.onglets a { padding: 8px 12px; color: var(--muted); font-size: 14.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.onglets a.on { color: var(--accent); border-bottom-color: var(--bordeaux); font-weight: 600; }
.boites { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 10px; }
.boite { border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.item.nonlu .title { font-weight: 700; }
details.journal { margin-top: 26px; }
details.journal summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
@media (max-width: 820px) {
  .affaires { grid-template-columns: 1fr; }
  .onglets { flex-wrap: nowrap; overflow-x: auto; }
  .onglets a { white-space: nowrap; }
  #tabbar a { min-width: 0; }
}
/* écran verrouillé */
.lock { text-align: center; }
.lock .brand-mark { width: 64px; height: 64px; font-size: 26px; border-radius: 16px; margin: 0 auto 14px; background: var(--accent); }

#view { min-width: 0; }
.onglets { max-width: 100%; }

/* objectifs v2 */
.jour-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.jour-titre { flex: 1; text-align: center; }
.jour-titre .muted::first-letter { text-transform: uppercase; }
.btn[disabled] { opacity: .35; cursor: default; }
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 16px; max-width: 320px; }
.heat i { aspect-ratio: 1; border-radius: 5px; background: var(--soft2); cursor: pointer; }
.heat i.h1 { background: #e9d9dc; } .heat i.h2 { background: #cfa7ae; } .heat i.h3 { background: #a8646f; } .heat i.h4 { background: var(--bordeaux); }
.heat i.auj { outline: 2px solid var(--accent); outline-offset: 1px; }
.lectures { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card.lecture p { font-family: Georgia, serif; font-size: 16.5px; line-height: 1.6; margin: 0 0 14px; color: var(--accent); }
.vision-img { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px; }
.vision-img img { display: block; width: 100%; height: auto; }
.doc-ico { width: 38px; height: 38px; border-radius: 9px; background: var(--bordeaux-soft); color: var(--bordeaux); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
@media (max-width: 820px) { .lectures { grid-template-columns: 1fr; } .heat { max-width: none; } }

.brand-logo { height: 30px; width: auto; display: block; }
.auth-card .brand-logo { height: 34px; }

.brand-mark { background: var(--accent) !important; font-family: "Times New Roman", Georgia, serif; font-size: 16px; }

.brand-logo { height: 38px !important; width: 38px; border-radius: 10px; }
.auth-card .brand-logo { height: 44px !important; width: 44px; }

/* Mails */
.seg { max-width: 100%; overflow-x: auto; }
.seg button { white-space: nowrap; }
.seg button b { font-size: 11px; background: var(--bordeaux); color: #fff; border-radius: 99px; padding: 0 6px; margin-left: 3px; font-weight: 600; }
.item.mail { cursor: pointer; align-items: flex-start; }
.item.mail .pt { flex: none; width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; background: transparent; }
.item.mail .pt.on { background: var(--bordeaux); }
.item.mail .grow { min-width: 0; }
.item .clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nowrap { white-space: nowrap; }
.rouge { color: #8f2f27; }
.groupe-t { margin: 16px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink); }
details.groupe { margin-top: 16px; }
details.groupe summary { cursor: pointer; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.mail-tete { padding: 10px 12px; background: var(--soft); border-radius: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.mail-corps { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.55; padding: 14px 2px; max-height: 52vh; overflow: auto; }
.mail-actions { flex-wrap: wrap; gap: 8px; }
.mail-actions select { margin-right: auto; }
.item.brouillon .apercu { margin: 6px 0 0; white-space: pre-wrap; max-height: 9.5em; overflow: hidden; }
.item.brouillon .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }

/* Bouton rafraîchir */
#rafraichir { position: fixed; top: calc(env(safe-area-inset-top) + 14px); right: 16px; z-index: 40; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,253,248,.94); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(28,42,68,.10); backdrop-filter: blur(8px); -webkit-tap-highlight-color: transparent; }
#rafraichir:hover { color: var(--bordeaux); }
#rafraichir.tourne svg { animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (max-width: 820px) { #rafraichir { top: calc(env(safe-area-inset-top) + 10px); right: 12px; width: 36px; height: 36px; } .hero-gear { top: auto; bottom: 14px; right: 18px; } }
@media (min-width: 821px) { #rafraichir { display: none; } }
.nav-refresh { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); padding: 8px 10px; border-radius: 9px; cursor: pointer; text-align: left; }
.nav-refresh:hover { background: var(--soft); }
.nav-refresh.tourne svg { animation: tourne .8s linear infinite; }

/* ===================== Identité pro v3 ===================== */
:root { --marine-nav: #142238; --marine-nav2: #1d2f4b; --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; }
body { background: #f6f2ea; }
.i { display: block; }
/* barre latérale marine */
#nav { background: var(--marine-nav); border-right: 0; color: #e9e4d8; padding: 22px 14px 16px; }
.brand { padding: 0 6px 22px; }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(250,246,238,.18); }
.brand-name { color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-sub { color: #8f9bb0; font-size: 12px; }
.nav-groupe { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7d899e; padding: 16px 10px 6px; }
.nav-groupe:first-child { padding-top: 4px; }
#menu a, .nav-foot a, .nav-refresh { color: #d7dbe3; font-size: 14.5px; font-weight: 500; padding: 9px 10px; gap: 11px; border-radius: 9px; }
#menu a .ico, .nav-foot a .ico, .nav-refresh .ico { width: 20px; display: grid; place-items: center; opacity: .9; }
#menu a:hover, .nav-foot a:hover, .nav-refresh:hover { background: rgba(255,255,255,.06); color: #fff; }
#menu a.active, .nav-foot a.active { background: var(--marine-nav2); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #b0475a; }
.nav-refresh { color: #d7dbe3; }
.nav-foot { padding: 0; color: #8f9bb0; }
.nav-foot #saveState { color: #7d899e !important; padding: 8px 10px 0 !important; }
.badge { background: #b0475a; }
.profil { display: flex !important; align-items: center; gap: 10px; margin-top: 10px; padding: 10px !important; background: rgba(255,255,255,.05); border-radius: 12px !important; box-shadow: none !important; }
.profil img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(250,246,238,.25); }
.profil b { display: block; color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.profil small { color: #8f9bb0; font-size: 12px; }
/* barre du haut */
#col { min-width: 0; display: flex; flex-direction: column; }
#topbar { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 44px; background: rgba(255,253,248,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tb-titre { font-size: 20px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
.tb-actions { display: flex; align-items: center; gap: 6px; }
.tb-date { font-size: 13px; color: var(--muted); margin-right: 10px; }
.tb-date::first-letter { text-transform: uppercase; }
.tb-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--ink); background: none; border: 1px solid transparent; cursor: pointer; }
.tb-btn:hover { background: var(--soft); border-color: var(--line); }
.tb-btn.tourne svg { animation: tourne .8s linear infinite; }
.tb-badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: #b0475a; color: #fff; font: 600 10px/16px var(--sans); font-style: normal; text-align: center; }
#view { padding-top: 26px; }
@media (min-width: 821px) { #view > h1:first-child { display: none; } #view > h1:first-child + .onglets { margin-top: 0; } }
/* typographie plus affirmée */
h1 { font-family: var(--sans); font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
h2 { font-family: var(--sans); font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--ink); margin: 30px 0 12px; }
h3 { font-weight: 650; }
.kpi, .t-val, .net-val { font-family: var(--sans); font-weight: 700; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.card { background: #fffefb; box-shadow: 0 1px 2px rgba(20,34,56,.04); }
.onglets a.on { color: var(--ink); }
/* accueil */
.hero { padding: 28px 30px; border-radius: 16px; background: linear-gradient(120deg, #142238 0%, #1f3557 60%, #2a4468 100%); box-shadow: 0 8px 30px rgba(20,34,56,.12); }
.hero.matin { background: linear-gradient(120deg, #142238 0%, #1f3557 55%, #4a3346 100%); }
.hero.soir, .hero.nuit { background: linear-gradient(120deg, #101b2e 0%, #1d2c48 55%, #3a2333 100%); }
.hero-in { display: flex; align-items: center; gap: 22px; }
.hero-avatar { flex: none; width: 92px; height: 92px; border-radius: 50%; padding: 4px; background: rgba(250,246,238,.9); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.hero-avatar img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.hero-over { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #a9b4c6; margin-bottom: 4px; }
.salut { font-family: var(--sans); font-weight: 750; font-size: 32px; letter-spacing: -.025em; line-height: 1.15; color: #fff; }
.hero-date { color: #c3cbd8; opacity: 1; font-size: 14px; }
.punchline { font-size: 17px; font-style: italic; margin: 20px 0 0; padding: 10px 0 0 0; border-top: 1px solid rgba(250,246,238,.12); color: #e6e0d2; }
.hero-gear { color: #c3cbd8; opacity: .7; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0 12px; }
.kpi-t { display: block; background: #fffefb; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; color: var(--ink); box-shadow: 0 1px 2px rgba(20,34,56,.04); transition: border-color .15s, transform .15s; }
.kpi-t:hover { border-color: #cdbfa6; transform: translateY(-1px); }
.kt-l { font-size: 13px; color: var(--muted); font-weight: 500; }
.kt-v { font-family: var(--sans); font-size: 34px; font-weight: 750; letter-spacing: -.03em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.1; }
.kt-v small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kt-v.chaud { color: #9c3744; } .kt-v.ok { color: #2f7d5b; }
.kt-s { font-size: 12.5px; color: var(--muted); }
.raccourcis { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.raccourcis .btn { font-weight: 600; padding: 9px 15px; background: #fffefb; }
.btn.fonce { background: var(--marine-nav); border-color: var(--marine-nav); color: #fff; }
.btn.fonce:hover { background: var(--marine-nav2); }
.affaires a.card b { font-size: 15.5px; }
@media (max-width: 820px) {
  #topbar { display: none; }
  #view { padding-top: 20px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kt-v { font-size: 28px; }
  .hero { padding: 22px 18px; }
  .hero-in { gap: 14px; }
  .hero-avatar { width: 62px; height: 62px; padding: 3px; }
  .salut { font-size: 25px; }
  .hero-over { font-size: 10px; }
  .raccourcis { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; }
  .raccourcis .btn { white-space: nowrap; }
  #tabbar a .ico svg { width: 21px; height: 21px; }
  #tabbar a .ico { display: grid; place-items: center; height: 24px; }
}
.hero .punchline { max-width: none; }
@media (min-width: 821px) { .hero-gear, .nav-refresh { display: none; } }
@media (max-width: 820px) { .kpi-t { padding: 13px 14px; border-radius: 12px; } .kt-v { font-size: 26px; margin: 4px 0 0; } }

/* bulle de notifications */
.tb-cloche { position: relative; }
.tb-btn.on { background: var(--soft); border-color: var(--line); }
.bulle { position: absolute; top: 46px; right: -8px; width: 360px; max-height: 70vh; overflow: auto; background: #fffefb; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(20,34,56,.16); padding: 10px; z-index: 45; }
.bulle-t { font-weight: 700; font-size: 15px; padding: 6px 8px 8px; }
.bulle-i { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.bulle-i:hover { background: var(--soft); }
.bulle-k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9c3744; }
.bulle-l { font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulle-vide { background: var(--soft); border-radius: 9px; padding: 10px 12px; font-size: 13.5px; color: var(--muted); }
.mail-corps a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }

/* ===== accueil vivant v4 ===== */
.punchline { font-family: var(--sans); font-style: normal; font-weight: 600; font-size: 15.5px; letter-spacing: .005em; color: #f1ebdd; border-top: 0; margin: 20px 0 0; padding: 2px 0 2px 14px; border-left: 3px solid #c0566a; line-height: 1.45; }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.hero-side { display: flex; align-items: center; gap: 22px; padding-left: 28px; border-left: 1px solid rgba(250,246,238,.12); }
.anneau { position: relative; width: 104px; height: 104px; }
.anneau svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anneau circle { fill: none; stroke-width: 9; }
.a-fond { stroke: rgba(250,246,238,.12); }
.a-val { stroke: #d9a95b; stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.a-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.a-txt b { color: #fff; font-size: 22px; font-weight: 750; letter-spacing: -.02em; line-height: 1; }
.a-txt span { color: #a9b4c6; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; }
.hero-mini { min-width: 170px; }
.hm-l { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #a9b4c6; }
.hm-bar { height: 6px; background: rgba(250,246,238,.12); border-radius: 99px; margin: 7px 0 4px; overflow: hidden; }
.hm-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c0566a, #d9a95b); border-radius: 99px; }
.hm-v { color: #e6e0d2; font-size: 13px; font-weight: 600; }
.hm-cap { color: #e6e0d2; font-size: 13.5px; margin-top: 4px; } .hm-cap b { color: #d9a95b; font-weight: 750; margin-right: 4px; }
.hero { overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -80px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(192,86,106,.22), transparent 65%); pointer-events: none; }
.hero > *:not(.hero-gear) { position: relative; z-index: 1; } .hero-gear { z-index: 2; }
.kpi-t { position: relative; }
.kt-i { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.kt-i.bordeaux { background: #f6e3e6; color: #9c3744; } .kt-i.marine { background: #e4eaf3; color: #1f3a5f; } .kt-i.vert { background: #e1f1e8; color: #2f7d5b; } .kt-i.or { background: #f8ecd6; color: #a8701f; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 26px; margin: 8px 0 4px; }
.spark i { flex: 1; background: #ece5d7; border-radius: 3px; min-height: 3px; }
.spark i.mi { background: #e3c48c; } .spark i.plein { background: #2f7d5b; }
.kpi-t:has(.spark) .kt-v { margin-bottom: 0; }
.affaires a.card.proj { display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 16px 18px; border-left: 4px solid var(--line); transition: transform .15s, border-color .15s; }
.affaires a.card.proj:hover { transform: translateY(-1px); }
.aff-i { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.aff-t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.aff-go { color: var(--muted); font-size: 20px; }
.aff-studio { border-left-color: #9c3744 !important; } .aff-studio .aff-i { background: #f6e3e6; color: #9c3744; }
.aff-moletech { border-left-color: #b8893d !important; } .aff-moletech .aff-i { background: #f8ecd6; color: #a8701f; }
.aff-trading { border-left-color: #1f3a5f !important; } .aff-trading .aff-i { background: #e4eaf3; color: #1f3a5f; }
.kpi-t, .affaires a.card, .hero { animation: monte .45s ease both; }
.kpis .kpi-t:nth-child(2) { animation-delay: .04s; } .kpis .kpi-t:nth-child(3) { animation-delay: .08s; } .kpis .kpi-t:nth-child(4) { animation-delay: .12s; }
@keyframes monte { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 1100px) { .hero-mini { display: none; } }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 16px; }
  .hero-side { padding: 14px 0 0; border-left: 0; border-top: 1px solid rgba(250,246,238,.12); gap: 16px; }
  .anneau { width: 70px; height: 70px; } .a-txt b { font-size: 16px; } .a-txt span { font-size: 9px; }
  .hero-mini { display: block; flex: 1; min-width: 0; }
  .punchline { font-size: 14.5px; }
  .kt-i { width: 28px; height: 28px; top: 11px; right: 11px; border-radius: 8px; } .kt-i svg { width: 14px; height: 14px; }
}
@media (prefers-reduced-motion: reduce) { .kpi-t, .affaires a.card, .hero { animation: none; } }
