/* ═══════════════════════════════════════════════════════════════
   BCC · Collecte des prix IPC — système de design (v2.1)
   Typographie Inter (embarquée) · mouvement · thème clair/sombre
   Mobile d'abord · zones tactiles ≥ 48 px · reduced-motion respecté
   ═══════════════════════════════════════════════════════════════ */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/inter-latin-800-normal.woff2") format("woff2"); }

/* ── jetons ─────────────────────────────────────────────────── */
:root {
  --marine: #0b2e4f; --marine-2: #123f6b; --marine-3: #e8eff6; --marine-4: #071d33;
  --cyan: #1f8fc4; --cyan-2: #e3f2fb; --cyan-3: #5fb6e0;
  --vert: #178a5a; --vert-2: #e3f5ec; --vert-3: #46b884;
  --orange: #c9761b; --orange-2: #fff3e3;
  --rouge: #c0392b; --rouge-2: #fdecea;
  --violet: #5b4fc4; --violet-2: #ecebfa;
  --fond: #f2f5f9; --surface: #ffffff; --surface-2: #f7f9fc; --filet: #e1e7ee; --filet-2: #edf1f6;
  --texte: #101a26; --texte-2: #45546a; --muet: #7b8797;
  --sur-marine: #ffffff; --sur-marine-2: #c7d8e8;
  --r: 16px; --r-s: 12px; --r-xs: 8px; --r-pill: 999px;
  --ombre: 0 1px 2px rgba(16, 33, 52, .05), 0 6px 20px -8px rgba(16, 33, 52, .12);
  --ombre-2: 0 14px 44px -10px rgba(7, 29, 51, .35);
  --ombre-btn: 0 6px 16px -6px rgba(11, 46, 79, .55);
  --tap: 48px; --barre-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --police: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.4, .64, 1);
  --degrade-marine: linear-gradient(135deg, #0b2e4f 0%, #123f6b 60%, #175583 100%);
  --degrade-scene: radial-gradient(120% 90% at 100% 0%, rgba(31, 143, 196, .55) 0%, transparent 55%), radial-gradient(90% 70% at 0% 100%, rgba(23, 138, 90, .35) 0%, transparent 60%), linear-gradient(165deg, #0b2e4f 0%, #0d3660 50%, #123f6b 100%);
  color-scheme: light;
}
/* ── base ───────────────────────────────────────────────────── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; font-family: var(--police); font-size: 16px; line-height: 1.45; color: var(--texte); background: var(--fond); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01", "calt"; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--marine); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: 24px; } h2 { font-size: 18.5px; } h3 { font-size: 15.5px; letter-spacing: -.01em; }
p { margin: 0 0 10px; }
a { color: var(--cyan); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.btn, .segments label, .clavier button, .onglet, .item, .filtre, .compte, .photo-bouton, .nav-btn, .lab { user-select: none; -webkit-user-select: none; }
.num, .stat b, .calcul .val, .saisie-grande, .tuile b, .kv dd, .item .droite b { font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "cv11"; }
::selection { background: rgba(31, 143, 196, .25); }
:focus-visible { outline: 3px solid rgba(31, 143, 196, .45); outline-offset: 2px; border-radius: 6px; }

/* ── mouvement ──────────────────────────────────────────────── */
@keyframes apparition { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes surgir { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
@keyframes monter { from { transform: translateY(56px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes glisser-toast { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tour { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes secousse { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
@keyframes flotter { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulser { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes derive { 0% { transform: translate3d(0, 0, 0) rotate(0); } 50% { transform: translate3d(-4%, 3%, 0) rotate(3deg); } 100% { transform: translate3d(0, 0, 0) rotate(0); } }
@keyframes chatoiement { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes tracer { to { stroke-dashoffset: 0; } }
@keyframes halo { 0% { box-shadow: 0 0 0 0 rgba(23, 138, 90, .45); } 100% { box-shadow: 0 0 0 18px rgba(23, 138, 90, 0); } }
.vue { display: none; }
.vue.active { display: block; animation: apparition .32s var(--ease) both; }
.liste > * { animation: surgir .38s var(--ease) both; }
.liste > :nth-child(1) { animation-delay: 0ms; } .liste > :nth-child(2) { animation-delay: 30ms; } .liste > :nth-child(3) { animation-delay: 60ms; } .liste > :nth-child(4) { animation-delay: 90ms; } .liste > :nth-child(5) { animation-delay: 120ms; } .liste > :nth-child(6) { animation-delay: 150ms; } .liste > :nth-child(7) { animation-delay: 180ms; } .liste > :nth-child(8) { animation-delay: 210ms; } .liste > :nth-child(n+9) { animation-delay: 240ms; }
.carte { animation: surgir .4s var(--ease) both; }
.carte:nth-of-type(2) { animation-delay: 60ms; } .carte:nth-of-type(3) { animation-delay: 120ms; } .carte:nth-of-type(4) { animation-delay: 180ms; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ── écran de démarrage ─────────────────────────────────────── */
.splash { position: fixed; inset: 0; z-index: 100; background: var(--degrade-scene); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: #fff; }
.splash img { width: min(46vw, 220px); animation: pulser 1.6s ease-in-out infinite; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .35)); }
.splash small { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--sur-marine-2); font-weight: 600; }
.splash.sortie { animation: fondu .35s reverse both; pointer-events: none; }

/* ── coquille ───────────────────────────────────────────────── */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.barre-haut { position: sticky; top: 0; z-index: 30; background: var(--degrade-marine); color: var(--sur-marine); padding: calc(10px + var(--safe-t)) 16px 12px; display: flex; align-items: center; gap: 12px; box-shadow: 0 6px 24px -10px rgba(7, 29, 51, .6); }
.barre-haut::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); }
.barre-haut .logo { width: 56px; height: auto; flex: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }
.barre-haut .titre { min-width: 0; flex: 1; }
.barre-haut .titre b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre-haut .titre small { display: block; font-size: 12px; color: var(--sur-marine-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre-haut .actions { display: flex; gap: 8px; align-items: center; }
.pastille { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; line-height: 1; backdrop-filter: blur(6px); transition: background .3s, color .3s; }
.pastille::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; }
.pastille.on { background: rgba(70, 184, 132, .22); color: #b9f0d4; } .pastille.on::before { animation: halo 2.2s ease-out infinite; }
.pastille.off { background: rgba(201, 118, 27, .28); color: #ffd9a8; }
.contenu { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 18px 16px calc(var(--barre-h) + 26px + var(--safe-b)); }
.contenu.large { max-width: 1200px; }

/* ── barre d'onglets ────────────────────────────────────────── */
.onglets { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-top: 1px solid var(--filet); display: flex; justify-content: space-around; padding-bottom: var(--safe-b); box-shadow: 0 -8px 28px -14px rgba(16, 33, 52, .25); }
.onglet { flex: 1; min-height: var(--barre-h); border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muet); font-size: 11.5px; font-weight: 600; cursor: pointer; position: relative; transition: color .2s var(--ease); }
.onglet svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--spring); }
.onglet:active svg { transform: scale(.85); }
.onglet.active { color: var(--marine); font-weight: 700; }
.onglet.active svg { transform: translateY(-2px); }
.onglet.active::after { content: ""; position: absolute; top: 0; width: 36px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--cyan), var(--marine)); animation: surgir .3s var(--ease); }
.onglet .badge { position: absolute; top: 8px; right: calc(50% - 24px); animation: pop .4s var(--spring); }

/* ── cartes & sections ──────────────────────────────────────── */
.carte { background: var(--surface); border: 1px solid var(--filet); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: var(--ombre); }
.carte.compacte { padding: 12px 14px; }
.carte-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.carte-tete h2, .carte-tete h3 { flex: 1; }
.section-titre { font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muet); margin: 20px 0 8px; }
.grille { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .grille { grid-template-columns: 1fr; } .grille-3 { grid-template-columns: 1fr 1fr; } }
.ligne { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ligne.entre { justify-content: space-between; }
.espace { flex: 1; }
.muet { color: var(--muet); } .petit { font-size: 13px; } .mini { font-size: 12px; } .gras { font-weight: 700; }
.centre { text-align: center; }

/* ── formulaires ───────────────────────────────────────────── */
.champ { margin-bottom: 14px; }
.lab { display: block; font-size: 13px; font-weight: 600; color: var(--texte-2); margin-bottom: 6px; }
.lab .oblig { color: var(--rouge); }
.saisie, select.saisie, textarea.saisie { width: 100%; min-height: var(--tap); border: 1.5px solid var(--filet); border-radius: var(--r-s); background: var(--surface); padding: 11px 13px; color: var(--texte); outline: none; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s; }
select.saisie { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b8797' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
textarea.saisie { min-height: 84px; resize: vertical; }
.saisie:hover { border-color: #c3ceda; }
.saisie:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(31, 143, 196, .18); }
.saisie[readonly] { background: var(--filet-2); color: var(--texte-2); }
.saisie.erreur { border-color: var(--rouge); box-shadow: 0 0 0 4px rgba(192, 57, 43, .15); animation: secousse .5s; }
.champ.erreur .lab { color: var(--rouge); }
.aide { font-size: 12.5px; color: var(--muet); margin: 5px 0 0; }
.aide.erreur { color: var(--rouge); font-weight: 600; }
.saisie-grande { font-size: 28px; font-weight: 700; letter-spacing: .02em; text-align: center; min-height: 62px; }
.suffixe { position: relative; }
.suffixe .saisie { padding-right: 62px; }
.suffixe span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: var(--muet); }
.segments { display: flex; gap: 6px; flex-wrap: wrap; }
.segments label { flex: 1 1 auto; min-height: var(--tap); display: flex; align-items: center; justify-content: center; padding: 8px 12px; border: 1.5px solid var(--filet); border-radius: var(--r-s); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; text-align: center; transition: background .2s var(--ease), color .2s, border-color .2s, transform .2s var(--spring), box-shadow .2s; }
.segments label:active { transform: scale(.96); }
.segments input { position: absolute; opacity: 0; width: 0; height: 0; }
.segments label:has(input:checked) { background: var(--marine); color: #fff; border-color: var(--marine); box-shadow: var(--ombre-btn); }
.segments.compacts label { min-height: 40px; padding: 6px 10px; font-size: 13px; }
.segments label.ok:has(input:checked) { background: var(--vert); border-color: var(--vert); box-shadow: 0 6px 16px -6px rgba(23, 138, 90, .6); }
.segments label.att:has(input:checked) { background: var(--orange); border-color: var(--orange); box-shadow: 0 6px 16px -6px rgba(201, 118, 27, .6); }
.segments label.err:has(input:checked) { background: var(--rouge); border-color: var(--rouge); }
.segments.erreur label { border-color: var(--rouge); animation: secousse .5s; }

/* ── boutons ───────────────────────────────────────────────── */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 10px 18px; border: 1.5px solid transparent; border-radius: var(--r-s); background: var(--degrade-marine); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.005em; cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: var(--ombre-btn); transition: transform .25s var(--spring), box-shadow .25s var(--ease), filter .15s, opacity .2s; overflow: hidden; }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .14), transparent 55%); pointer-events: none; }
.btn:hover { filter: brightness(1.06); box-shadow: 0 10px 22px -8px rgba(11, 46, 79, .6); transform: translateY(-1px); }
.btn:active { transform: scale(.965); filter: brightness(.96); box-shadow: 0 2px 8px -4px rgba(11, 46, 79, .5); }
.btn:disabled { opacity: .42; cursor: not-allowed; filter: none; transform: none; box-shadow: none; }
.btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.vert { background: linear-gradient(135deg, #178a5a, #1fa06a); box-shadow: 0 6px 16px -6px rgba(23, 138, 90, .65); }
.btn.cyan { background: linear-gradient(135deg, #1f8fc4, #2aa3dc); box-shadow: 0 6px 16px -6px rgba(31, 143, 196, .65); }
.btn.rouge { background: linear-gradient(135deg, #c0392b, #d64b3c); box-shadow: 0 6px 16px -6px rgba(192, 57, 43, .6); }
.btn.contour { background: var(--surface); color: var(--marine); border-color: var(--filet); box-shadow: none; }
.btn.contour::after { display: none; }
.btn.contour:hover { border-color: #c3ceda; box-shadow: var(--ombre); }
.btn.contour.rouge { color: var(--rouge); border-color: rgba(192, 57, 43, .35); background: var(--surface); }
.btn.discret { background: transparent; border-color: transparent; color: var(--marine); box-shadow: none; }
.btn.discret::after { display: none; }
.btn.discret:hover { background: var(--marine-3); transform: none; box-shadow: none; }
.btn.large { width: 100%; }
.btn.petit { min-height: 40px; padding: 6px 12px; font-size: 13.5px; }
.btn.icone { padding: 0; width: var(--tap); }
.btn.blanc { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; backdrop-filter: blur(8px); }
.btn.blanc::after { display: none; }
.btn.blanc.petit { min-height: 38px; }
.actions-bas { display: flex; gap: 10px; margin-top: 16px; }
.actions-bas .btn { flex: 1; white-space: normal; padding-left: 10px; padding-right: 10px; }

/* ── badges, pastilles ─────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; letter-spacing: .01em; line-height: 1.35; white-space: nowrap; }
.badge.gris { background: var(--filet-2); color: var(--texte-2); }
.badge.bleu { background: var(--cyan-2); color: #12618a; }
.badge.vert { background: var(--vert-2); color: #0f6b43; }
.badge.orange { background: var(--orange-2); color: #8d5210; }
.badge.rouge { background: var(--rouge-2); color: #9a2a1f; }
.badge.violet { background: var(--violet-2); color: #3f3596; }
.badge.nombre { min-width: 18px; height: 18px; padding: 0 5px; justify-content: center; background: var(--rouge); color: #fff; font-size: 11px; box-shadow: 0 2px 6px rgba(192, 57, 43, .5); }
.puce { width: 10px; height: 10px; border-radius: 50%; background: var(--filet); flex: none; transition: transform .3s var(--spring); }
.puce.ok { background: var(--vert); box-shadow: 0 0 0 3px var(--vert-2); } .puce.att { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-2); } .puce.err { background: var(--rouge); box-shadow: 0 0 0 3px var(--rouge-2); } .puce.info { background: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-2); }

/* ── messages ──────────────────────────────────────────────── */
.note { display: block; padding: 12px 14px; border-radius: var(--r-s); border-left: 4px solid var(--cyan); background: var(--cyan-2); font-size: 14px; color: #123d5a; margin: 0 0 14px; animation: surgir .35s var(--ease); }
.note.ok { border-color: var(--vert); background: var(--vert-2); color: #0f5d3b; }
.note.att { border-color: var(--orange); background: var(--orange-2); color: #7a4408; }
.note.err { border-color: var(--rouge); background: var(--rouge-2); color: #8e2519; }
.note.neutre { border-color: var(--muet); background: var(--filet-2); color: var(--texte-2); }

/* ── listes ────────────────────────────────────────────────── */
.liste { display: flex; flex-direction: column; gap: 8px; }
.item { position: relative; width: 100%; text-align: left; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; min-height: 62px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--filet); border-radius: 14px; cursor: pointer; transition: transform .25s var(--spring), box-shadow .25s var(--ease), border-color .2s; }
.item:hover, .item:focus-visible { border-color: var(--cyan-3); box-shadow: 0 8px 22px -12px rgba(16, 33, 52, .35); transform: translateY(-1px); outline: none; }
.item:active { transform: scale(.985); }
.item .nom { display: block; font-weight: 600; color: var(--texte); letter-spacing: -.005em; }
.item .sous { display: block; font-size: 12.5px; color: var(--muet); margin-top: 2px; }
.item > span:nth-child(2) { min-width: 0; }
.item .droite { text-align: right; font-size: 13px; }
.item .droite b { display: block; color: var(--marine); font-size: 15px; font-weight: 700; }
.item.fait::before, .item.indispo::before, .item.alerte::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; }
.item.fait::before { background: var(--vert); } .item.indispo::before { background: var(--orange); } .item.alerte::before { background: var(--rouge); }
.groupe { position: sticky; top: calc(62px + var(--safe-t)); z-index: 5; margin: 16px 0 6px; padding: 7px 12px; border-radius: var(--r-xs); background: color-mix(in srgb, var(--marine-3) 85%, transparent); backdrop-filter: blur(8px); color: var(--marine); font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.recherche { position: relative; margin-bottom: 10px; }
.recherche .saisie { padding-left: 42px; border-radius: var(--r-pill); }
.recherche svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; stroke: var(--muet); fill: none; stroke-width: 2; }
.filtres { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; margin-bottom: 8px; scrollbar-width: none; }
.filtres::-webkit-scrollbar { display: none; }
.filtre { flex: none; min-height: 38px; padding: 6px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--filet); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--texte-2); cursor: pointer; transition: all .2s var(--ease); }
.filtre.active { background: var(--marine); border-color: var(--marine); color: #fff; box-shadow: var(--ombre-btn); }

/* ── statistiques ──────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 420px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface-2); border: 1px solid var(--filet-2); border-radius: var(--r-s); padding: 10px 12px; }
.stat b { display: block; font-size: 24px; line-height: 1.1; color: var(--marine); font-weight: 800; letter-spacing: -.03em; }
.stat span { font-size: 11.5px; color: var(--muet); font-weight: 600; }
.stat.vert b { color: var(--vert); } .stat.orange b { color: var(--orange); } .stat.rouge b { color: var(--rouge); }
.progression { position: relative; height: 8px; border-radius: 8px; background: var(--filet); overflow: hidden; margin: 12px 0 4px; }
.progression > i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--cyan), var(--vert-3)); transition: width .6s var(--ease); position: relative; overflow: hidden; }
.progression > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); background-size: 200% 100%; animation: chatoiement 2.2s linear infinite; }
.calcul { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r-s); background: var(--marine-3); border: 1px solid #d3deea; margin: 10px 0; }
.calcul .val { font-size: 24px; font-weight: 800; letter-spacing: -.03em; color: var(--marine); transition: color .3s; }
.calcul .val.hausse { color: var(--rouge); } .calcul .val.baisse { color: var(--vert); } .calcul .val.stable { color: var(--texte-2); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muet); font-weight: 500; } .kv dd { margin: 0; font-weight: 600; color: var(--texte); }

/* ── étapes (parcours d'un relevé) ─────────────────────────── */
.etapes { display: flex; align-items: flex-start; margin: 4px 0 18px; }
.etape { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 11.5px; font-weight: 600; color: var(--muet); text-align: center; }
.etape i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--filet); background: var(--surface); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 800; z-index: 1; transition: all .35s var(--spring); }
.etape:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: 50%; width: 100%; height: 2px; background: var(--filet); }
.etape.fait i { background: var(--vert); border-color: var(--vert); color: #fff; }
.etape.fait::after { background: var(--vert); }
.etape.fait { color: var(--vert); }
.etape.courant i { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 0 5px var(--cyan-2); animation: pop .5s var(--spring); }
.etape.courant { color: var(--marine); font-weight: 700; }
.etape.erreur i { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.etape.erreur { color: var(--rouge); }
.succes { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 0 6px; }
.succes svg { width: 74px; height: 74px; }
.succes circle { fill: none; stroke: var(--vert); stroke-width: 2.5; stroke-dasharray: 220; stroke-dashoffset: 220; animation: tracer .7s var(--ease) forwards; }
.succes path { fill: none; stroke: var(--vert); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: tracer .45s .45s var(--ease) forwards; }
.succes b { color: var(--vert); font-size: 17px; letter-spacing: -.01em; }

/* ── feuilles & dialogues ──────────────────────────────────── */
.voile { position: fixed; inset: 0; z-index: 60; background: rgba(6, 22, 38, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fondu .2s; }
.feuille { position: relative; width: 100%; max-width: 720px; max-height: calc(100vh - 24px - var(--safe-t)); background: var(--surface); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: monter .42s var(--spring); box-shadow: var(--ombre-2); }
.feuille-tete { position: relative; padding: 18px 18px 12px; border-bottom: 1px solid var(--filet); display: flex; align-items: center; gap: 10px; }
.feuille-tete::before { content: ""; position: absolute; left: 50%; top: 7px; width: 40px; height: 4px; border-radius: 4px; background: var(--filet); transform: translateX(-50%); }
.feuille-tete h3 { flex: 1; font-size: 17px; }
.feuille-corps { padding: 16px 18px; overflow: auto; -webkit-overflow-scrolling: touch; min-height: 0; flex: 1; overscroll-behavior: contain; }
.feuille-pied { padding: 12px 18px calc(12px + var(--safe-b)); border-top: 1px solid var(--filet); display: flex; gap: 10px; background: var(--surface); }
.feuille-pied .btn { flex: 1; }
@media (min-width: 720px) { .voile { align-items: center; } .feuille { border-radius: 22px; max-height: calc(100vh - 60px); } .feuille-pied { border-radius: 0 0 22px 22px; } }
.dialogue { width: min(92vw, 420px); background: var(--surface); border-radius: 20px; padding: 24px 22px 18px; box-shadow: var(--ombre-2); animation: surgir .35s var(--spring); }
.dialogue h3 { margin-bottom: 8px; font-size: 17px; } .dialogue p { color: var(--texte-2); font-size: 14.5px; }
.voile.centre { align-items: center; }

/* ── toasts ────────────────────────────────────────────────── */
.toasts { position: fixed; left: 50%; bottom: calc(var(--barre-h) + 14px + var(--safe-b)); transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(94vw, 480px); pointer-events: none; }
.toasts.haut { top: calc(14px + var(--safe-t)); bottom: auto; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px 12px 18px; border-radius: 14px; background: rgba(16, 26, 38, .92); color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--ombre-2); animation: glisser-toast .35s var(--spring); backdrop-filter: blur(10px); border-left: 4px solid var(--cyan-3); }
.toast.ok { border-left-color: var(--vert-3); } .toast.err { border-left-color: #ff7b6b; background: rgba(120, 30, 22, .94); } .toast.att { border-left-color: #ffc078; background: rgba(120, 70, 15, .94); }

/* ── connexion ─────────────────────────────────────────────── */
.connexion { position: relative; min-height: 100vh; display: flex; flex-direction: column; background: var(--degrade-scene); color: #fff; padding: calc(28px + var(--safe-t)) 20px calc(24px + var(--safe-b)); overflow: hidden; }
.connexion::before { content: ""; position: absolute; inset: -30% -25% auto auto; width: 80vw; height: 80vw; max-width: 620px; max-height: 620px; background: url("logo-bcc-blanc.png") center/contain no-repeat; opacity: .07; pointer-events: none; animation: derive 26s ease-in-out infinite; }
.connexion::after { content: ""; position: absolute; left: -20%; bottom: -30%; width: 70vw; height: 70vw; max-width: 560px; max-height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(70, 184, 132, .28), transparent 65%); pointer-events: none; animation: derive 32s ease-in-out infinite reverse; }
.connexion > * { position: relative; z-index: 1; }
.connexion .marque { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; animation: apparition .6s var(--ease) both; }
.connexion .marque img { width: 96px; height: auto; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .45)); animation: flotter 6s ease-in-out infinite; }
.connexion .marque b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.01em; } .connexion .marque small { color: var(--sur-marine-2); font-size: 13px; }
.connexion .panneau { background: var(--surface); color: var(--texte); border-radius: 22px; padding: 24px 22px; box-shadow: var(--ombre-2); max-width: 440px; width: 100%; margin: auto; animation: surgir .55s .1s var(--spring) both; }
.connexion h1 { font-size: 22px; margin-bottom: 4px; }
.connexion .panneau p.muet { margin-bottom: 18px; }
.clavier { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 4px; }
.clavier button { min-height: 56px; border-radius: 14px; border: 1.5px solid var(--filet); background: var(--surface-2); font-size: 22px; font-weight: 600; color: var(--marine); cursor: pointer; transition: transform .2s var(--spring), background .15s, box-shadow .2s; }
.clavier button:hover { background: var(--marine-3); }
.clavier button:active { transform: scale(.9); background: var(--marine-3); box-shadow: inset 0 2px 6px rgba(11, 46, 79, .15); }
.clavier button.fonction { font-size: 14px; color: var(--texte-2); font-weight: 600; }
.pin-points { display: flex; justify-content: center; gap: 14px; margin: 12px 0 14px; }
.pin-points i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--marine); transition: background .15s, transform .3s var(--spring); }
.pin-points i.plein { background: var(--marine); animation: pop .35s var(--spring); }
.pin-points.secousse { animation: secousse .55s; }
.pin-points.secousse i { border-color: var(--rouge); } .pin-points.secousse i.plein { background: var(--rouge); }
.comptes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.compte { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--filet); border-radius: 14px; background: var(--surface); cursor: pointer; text-align: left; min-height: 56px; width: 100%; transition: all .2s var(--ease); }
.compte:hover { border-color: #c3ceda; } .compte:active { transform: scale(.985); }
.compte.active { border-color: var(--marine); background: var(--marine-3); box-shadow: 0 0 0 3px rgba(11, 46, 79, .08); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--degrade-marine); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; letter-spacing: .02em; }
.avatar.vert { background: linear-gradient(135deg, #178a5a, #46b884); } .avatar.violet { background: linear-gradient(135deg, #5b4fc4, #8a80e8); } .avatar.cyan { background: linear-gradient(135deg, #1f8fc4, #5fb6e0); } .avatar.orange { background: linear-gradient(135deg, #c9761b, #e9a04a); }

/* ── divers ────────────────────────────────────────────────── */
.vide { text-align: center; color: var(--muet); padding: 38px 16px; }
.vide svg { width: 64px; height: 64px; stroke: var(--cyan-3); fill: none; stroke-width: 1.4; margin-bottom: 10px; padding: 12px; box-sizing: content-box; border-radius: 50%; background: var(--cyan-2); }
.photo-apercu { width: 100%; max-height: 240px; object-fit: cover; border-radius: var(--r-s); border: 1px solid var(--filet); margin-top: 8px; animation: surgir .4s var(--ease); }
.photo-bouton { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; border: 1.5px dashed var(--cyan-3); border-radius: var(--r-s); background: var(--cyan-2); color: #12618a; font-weight: 700; cursor: pointer; transition: all .2s var(--ease); }
.photo-bouton:active { transform: scale(.985); }
.photo-bouton input { display: none; }
.photo-bouton svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }
.tableau { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tableau th, .tableau td { text-align: left; padding: 10px 11px; border-bottom: 1px solid var(--filet); vertical-align: middle; }
.tableau th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muet); font-weight: 700; background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
.tableau tbody tr { transition: background .15s; }
.tableau tr:hover td { background: var(--surface-2); }
.defilant { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chargement { display: inline-block; width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: tour .7s linear infinite; }
.contour .chargement, .discret .chargement { border-color: var(--filet); border-top-color: var(--marine); }
.squelette { position: relative; overflow: hidden; background: var(--filet-2); border-radius: 8px; color: transparent !important; }
.squelette::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); background-size: 200% 100%; animation: chatoiement 1.4s linear infinite; }
.hors-ligne-bandeau { background: linear-gradient(90deg, #c9761b, #e09a3a); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 7px 12px; animation: apparition .3s var(--ease); }
.verrou { position: fixed; inset: 0; z-index: 90; background: var(--degrade-scene); color: #fff; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fondu .25s; }
.verrou .panneau { animation: surgir .45s var(--spring); }

/* ── thème sombre : automatique (réglage du système) sauf si l’utilisateur a choisi « clair » ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #0e1621; --surface: #16202d; --surface-2: #1b2635; --filet: #263243; --filet-2: #1f2a39;
    --texte: #e8eef5; --texte-2: #b3bfcd; --muet: #7f8da0;
    --marine-3: #1d2f45; --cyan-2: #143349; --vert-2: #12362a; --orange-2: #3b2a14; --rouge-2: #3b1d1b; --violet-2: #262346;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
    --ombre-2: 0 16px 48px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) h1, :root:not([data-theme="light"]) h2, :root:not([data-theme="light"]) h3, :root:not([data-theme="light"]) h4, :root:not([data-theme="light"]) .item .droite b, :root:not([data-theme="light"]) .stat b, :root:not([data-theme="light"]) .calcul .val, :root:not([data-theme="light"]) .avatar-titre { color: #dfe9f5; }
  :root:not([data-theme="light"]) .groupe { color: #9ad4f5; background: rgba(29, 47, 69, .85); }
  :root:not([data-theme="light"]) .segments label { background: var(--surface-2); }
  :root:not([data-theme="light"]) .saisie, :root:not([data-theme="light"]) select.saisie, :root:not([data-theme="light"]) textarea.saisie { background: var(--surface-2); }
  :root:not([data-theme="light"]) .connexion .panneau, :root:not([data-theme="light"]) .dialogue, :root:not([data-theme="light"]) .feuille { background: var(--surface); }
  :root:not([data-theme="light"]) .toast:not(.ok):not(.err):not(.att) { background: rgba(38, 50, 67, .95); }
  :root:not([data-theme="light"]) .stat { background: var(--surface-2); }
  :root:not([data-theme="light"]) .calcul { background: var(--surface-2); }
  :root:not([data-theme="light"]) .tuile b { color: #dfe9f5; }
  :root:not([data-theme="light"]) .badge.nombre { color: #fff; }
  :root:not([data-theme="light"]) .badge.bleu { color: #9ad4f5; }
  :root:not([data-theme="light"]) .badge.vert { color: #8fe0b8; }
  :root:not([data-theme="light"]) .badge.orange { color: #ffc98a; }
  :root:not([data-theme="light"]) .badge.rouge { color: #ff9f95; }
  :root:not([data-theme="light"]) .badge.violet { color: #c3bdff; }
  :root:not([data-theme="light"]) .note { color: #b9dcf2; }
  :root:not([data-theme="light"]) .note.ok { color: #a9e6c8; }
  :root:not([data-theme="light"]) .note.att { color: #ffd39c; }
  :root:not([data-theme="light"]) .note.err { color: #ffb3aa; }
  :root:not([data-theme="light"]) .calcul { border-color: #2c3f57; }
  :root:not([data-theme="light"]) .calcul .val { color: #dfe9f5; }
  :root:not([data-theme="light"]) .item .droite b, :root:not([data-theme="light"]) .stat b, :root:not([data-theme="light"]) .kv dd, :root:not([data-theme="light"]) .item .nom { color: #e8eef5; }
  :root:not([data-theme="light"]) .btn.contour { color: #dfe9f5; border-color: #3a4a60; }
  :root:not([data-theme="light"]) .btn.discret { color: #dfe9f5; }
  :root:not([data-theme="light"]) .clavier button { color: #e8eef5; }
  :root:not([data-theme="light"]) .pin-points i { border-color: #9ad4f5; }
  :root:not([data-theme="light"]) .pin-points i.plein { background: #9ad4f5; }
  :root:not([data-theme="light"]) .compte.active { background: #1d2f45; border-color: #5fb6e0; }
  :root:not([data-theme="light"]) .groupe { color: #9ad4f5; }
  :root:not([data-theme="light"]) .photo-bouton { color: #9ad4f5; }
  :root:not([data-theme="light"]) .tableau tr:hover td { background: #1b2635; }
  :root:not([data-theme="light"]) .segments label:has(input:checked) { background: #1f8fc4; border-color: #1f8fc4; }
  :root:not([data-theme="light"]) .filtre.active { background: #1f8fc4; border-color: #1f8fc4; }
  :root:not([data-theme="light"]) .onglet.active { color: #9ad4f5; }
  :root:not([data-theme="light"]) .onglet.active::after { background: #5fb6e0; }
}
/* ── thème sombre choisi par l’utilisateur ── */
  :root[data-theme="dark"] {
    --fond: #0e1621; --surface: #16202d; --surface-2: #1b2635; --filet: #263243; --filet-2: #1f2a39;
    --texte: #e8eef5; --texte-2: #b3bfcd; --muet: #7f8da0;
    --marine-3: #1d2f45; --cyan-2: #143349; --vert-2: #12362a; --orange-2: #3b2a14; --rouge-2: #3b1d1b; --violet-2: #262346;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .5);
    --ombre-2: 0 16px 48px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
  :root[data-theme="dark"] h1, :root[data-theme="dark"] h2, :root[data-theme="dark"] h3, :root[data-theme="dark"] h4, :root[data-theme="dark"] .item .droite b, :root[data-theme="dark"] .stat b, :root[data-theme="dark"] .calcul .val, :root[data-theme="dark"] .avatar-titre { color: #dfe9f5; }
  :root[data-theme="dark"] .groupe { color: #9ad4f5; background: rgba(29, 47, 69, .85); }
  :root[data-theme="dark"] .segments label { background: var(--surface-2); }
  :root[data-theme="dark"] .saisie, :root[data-theme="dark"] select.saisie, :root[data-theme="dark"] textarea.saisie { background: var(--surface-2); }
  :root[data-theme="dark"] .connexion .panneau, :root[data-theme="dark"] .dialogue, :root[data-theme="dark"] .feuille { background: var(--surface); }
  :root[data-theme="dark"] .toast:not(.ok):not(.err):not(.att) { background: rgba(38, 50, 67, .95); }
  :root[data-theme="dark"] .stat { background: var(--surface-2); }
  :root[data-theme="dark"] .calcul { background: var(--surface-2); }
  :root[data-theme="dark"] .tuile b { color: #dfe9f5; }
  :root[data-theme="dark"] .badge.nombre { color: #fff; }
  :root[data-theme="dark"] .badge.bleu { color: #9ad4f5; }
  :root[data-theme="dark"] .badge.vert { color: #8fe0b8; }
  :root[data-theme="dark"] .badge.orange { color: #ffc98a; }
  :root[data-theme="dark"] .badge.rouge { color: #ff9f95; }
  :root[data-theme="dark"] .badge.violet { color: #c3bdff; }
  :root[data-theme="dark"] .note { color: #b9dcf2; }
  :root[data-theme="dark"] .note.ok { color: #a9e6c8; }
  :root[data-theme="dark"] .note.att { color: #ffd39c; }
  :root[data-theme="dark"] .note.err { color: #ffb3aa; }
  :root[data-theme="dark"] .calcul { border-color: #2c3f57; }
  :root[data-theme="dark"] .calcul .val { color: #dfe9f5; }
  :root[data-theme="dark"] .item .droite b, :root[data-theme="dark"] .stat b, :root[data-theme="dark"] .kv dd, :root[data-theme="dark"] .item .nom { color: #e8eef5; }
  :root[data-theme="dark"] .btn.contour { color: #dfe9f5; border-color: #3a4a60; }
  :root[data-theme="dark"] .btn.discret { color: #dfe9f5; }
  :root[data-theme="dark"] .clavier button { color: #e8eef5; }
  :root[data-theme="dark"] .pin-points i { border-color: #9ad4f5; }
  :root[data-theme="dark"] .pin-points i.plein { background: #9ad4f5; }
  :root[data-theme="dark"] .compte.active { background: #1d2f45; border-color: #5fb6e0; }
  :root[data-theme="dark"] .groupe { color: #9ad4f5; }
  :root[data-theme="dark"] .photo-bouton { color: #9ad4f5; }
  :root[data-theme="dark"] .tableau tr:hover td { background: #1b2635; }
  :root[data-theme="dark"] .segments label:has(input:checked) { background: #1f8fc4; border-color: #1f8fc4; }
  :root[data-theme="dark"] .filtre.active { background: #1f8fc4; border-color: #1f8fc4; }
  :root[data-theme="dark"] .onglet.active { color: #9ad4f5; }
  :root[data-theme="dark"] .onglet.active::after { background: #5fb6e0; }
/* ── bouton thème ── */
.btn-theme svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--spring); }
.btn-theme:active svg { transform: rotate(-30deg) scale(.85); }
.btn-theme .lune { display: none; } :root[data-theme="dark"] .btn-theme .lune { display: block; } :root[data-theme="dark"] .btn-theme .soleil { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-theme .lune { display: block; } :root:not([data-theme="light"]) .btn-theme .soleil { display: none; } }
html { transition: background .3s; } body { transition: background .3s, color .3s; }

/* ═════ v2.2 · circuit de validation, notifications, programme, messagerie ═════ */
.badge.marine { background: var(--marine); color: #fff; }
.btn.cloche { position: relative; overflow: visible; }
.btn.cloche .badge.nombre { position: absolute; top: -4px; right: -4px; pointer-events: none; animation: pop .5s var(--spring); }
.item.non-lu { border-color: var(--cyan-3); background: linear-gradient(90deg, var(--cyan-2), var(--surface) 40%); }
.carte.programme { border-left: 4px solid var(--orange); }
.carte-tete h3 svg, .btn.discret svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; margin-right: 4px; }
.chrono { position: relative; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.chrono::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--filet); border-radius: 2px; }
.chrono-item { position: relative; font-size: 13.5px; line-height: 1.45; animation: surgir .35s var(--ease) both; }
.chrono-item i { position: absolute; left: -22px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--cyan); box-sizing: border-box; }
.chrono-item.approuver i { border-color: var(--vert); background: var(--vert); }
.chrono-item.renvoyer i { border-color: var(--rouge); background: var(--rouge); }
.chrono-item.resoumettre i { border-color: var(--orange); background: var(--orange); }
.chrono-item.reouvrir i { border-color: var(--violet); }
.chrono-item em { color: var(--rouge); font-style: normal; font-weight: 600; }
.fil { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; padding-right: 2px; }
.msg { max-width: 88%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--filet-2); font-size: 13.5px; animation: surgir .3s var(--ease) both; }
.msg p { margin: 3px 0 0; white-space: pre-wrap; word-break: break-word; }
.msg.moi { align-self: flex-end; background: var(--cyan-2); border-radius: 14px 14px 4px 14px; }
.msg .mini { color: var(--muet); }
:root[data-theme="dark"] .item.non-lu { background: linear-gradient(90deg, rgba(31,143,196,.18), var(--surface) 40%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .item.non-lu { background: linear-gradient(90deg, rgba(31,143,196,.18), var(--surface) 40%); } }
/* v2.2.3 : en-tête compact sur téléphone — le thème se règle dans le menu ⋮, la pastille réseau devient un simple point */
@media (max-width: 520px) {
  .barre-haut { gap: 10px; padding-left: 12px; padding-right: 12px; }
  .barre-haut .logo { width: 46px; }
  .barre-haut .pastille { padding: 0; width: 12px; height: 12px; gap: 0; font-size: 0; background: transparent !important; backdrop-filter: none; }
  .barre-haut .pastille::before { width: 10px; height: 10px; }
  .barre-haut .actions { gap: 6px; }
}
