/* ChronoBiz planning : système de design (une seule source) */
:root {
  --fond: 40 14% 97%;        /* page */
  --surface: 0 0% 100%;      /* cartes, colonnes */
  --surface-2: 40 10% 94%;   /* zones creuses */
  --encre: 30 8% 6%;         /* noir mat ChronoBiz, texte fort */
  --encre-2: 30 4% 32%;      /* texte courant secondaire */
  --sourdine: 30 3% 50%;     /* petit texte */
  --trait: 30 8% 88%;
  --trait-fort: 30 8% 78%;
  --or: 40 50% 57%;          /* l'accent, rare */
  --or-fonce: 38 52% 38%;
  --alerte: 4 78% 50%;
  --ambre: 34 92% 46%;

  --yt: 350 100% 50%;
  --ig: 288 62% 50%;
  --fb: 214 89% 52%;
  --tt: 180 3% 10%;

  --f-choc: "Lupio", "Lupio Black", "Inter", sans-serif;
  --f-titre: "Nyght Serif", "Times New Roman", serif;
  --f-texte: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --r: 10px; --r-s: 7px; --r-l: 16px;
  --ombre: 0 1px 2px hsl(30 20% 10% / .05), 0 4px 14px hsl(30 20% 10% / .05);
  --ombre-haute: 0 2px 6px hsl(30 20% 10% / .06), 0 18px 48px hsl(30 20% 10% / .14);
  --ease: cubic-bezier(.2,.8,.3,1);
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--f-texte); font-size: 14px; line-height: 20px;
  color: hsl(var(--encre)); background: hsl(var(--fond));
  display: grid; grid-template-columns: 232px 1fr; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Barre de gauche */
.nav { position: sticky; top: 0; height: 100vh; padding: 24px 16px; display: flex; flex-direction: column; gap: 28px;
  background: hsl(var(--encre)); color: hsl(var(--fond)); }
.marque { padding: 4px 10px; }
.marque__nom { display: block; font-family: var(--f-choc); font-size: 22px; line-height: 24px; letter-spacing: .01em; }
.marque__sous { display: block; font-family: var(--f-titre); font-style: italic; font-size: 15px; color: hsl(var(--or)); margin-top: 2px; }
.nav__liens { display: grid; gap: 2px; }
.nav__lien { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-s); color: hsl(0 0% 100% / .62); font-weight: 500; transition: background .14s, color .14s; }
.nav__lien:hover { background: hsl(0 0% 100% / .06); color: hsl(0 0% 100%); }
.nav__lien.is-on { background: hsl(0 0% 100% / .1); color: hsl(0 0% 100%); }
.nav__compte { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 99px; background: hsl(var(--or)); color: hsl(var(--encre)); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.nav__compte:empty { display: none; }
.legende { margin-top: auto; padding: 14px 10px; border-top: 1px solid hsl(0 0% 100% / .1); display: grid; gap: 7px; font-size: 12.5px; color: hsl(0 0% 100% / .7); }
.legende p { margin: 0; display: flex; align-items: center; gap: 9px; }
.legende__titre { color: hsl(0 0% 100% / .45); font-size: 12px; }
.legende .pt { --c: hsl(var(--or)); }
.nav__maj { margin: 0; padding: 0 10px; font-size: 11.5px; color: hsl(0 0% 100% / .4); }

/* Ronds d'état d'un réseau */
.pt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--c); flex: none; }
.pt--publie { background: var(--c); }
.pt--programme { background: transparent; }
.pt--envoye { background: linear-gradient(90deg, var(--c) 50%, transparent 50%); }
.pt--a_faire { border-style: dashed; border-color: hsl(var(--alerte)); }
.pt--retard { background: transparent; border-color: hsl(var(--ambre)); box-shadow: 0 0 0 2px hsl(var(--ambre) / .25); }
.pt--non { border-color: hsl(var(--trait-fort)); background: linear-gradient(135deg, transparent 45%, hsl(var(--trait-fort)) 45% 55%, transparent 55%); }

/* Page */
.page { min-width: 0; padding: 28px 36px 60px; }
.haut { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.haut h1 { margin: 0; font-family: var(--f-titre); font-weight: 500; font-size: 44px; line-height: 48px; letter-spacing: -.02em; }
.haut__sous { margin: 6px 0 0; color: hsl(var(--encre-2)); font-size: 15px; }
.haut__outils { display: flex; gap: 12px; align-items: center; }
.bascule { display: flex; padding: 3px; border-radius: 99px; background: hsl(var(--surface-2)); }
.bascule button { padding: 6px 14px; border-radius: 99px; font-weight: 500; color: hsl(var(--encre-2)); transition: background .14s; }
.bascule button.is-on { background: hsl(var(--surface)); color: hsl(var(--encre)); box-shadow: var(--ombre); }
.fleches { display: flex; gap: 6px; align-items: center; }
.rond { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid hsl(var(--trait)); background: hsl(var(--surface)); }
.rond:hover, .btn-clair:hover { border-color: hsl(var(--trait-fort)); }
.btn-clair { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid hsl(var(--trait)); background: hsl(var(--surface)); font-weight: 500; }

.filtres { display: flex; gap: 10px 22px; flex-wrap: wrap; margin: 22px 0 14px; }
.filtres__groupe { display: flex; gap: 6px; flex-wrap: wrap; }
.puce { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid hsl(var(--trait)); background: hsl(var(--surface)); font-weight: 500; color: hsl(var(--encre-2)); transition: all .14s; }
.puce svg { width: 15px; height: 15px; }
.puce.is-off { opacity: .45; background: transparent; }
.puce:hover { border-color: hsl(var(--trait-fort)); }

.resume { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chiffre { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px; border-radius: var(--r); background: hsl(var(--surface)); border: 1px solid hsl(var(--trait)); }
.chiffre b { font-family: var(--f-titre); font-weight: 500; font-size: 24px; line-height: 24px; }
.chiffre span { color: hsl(var(--encre-2)); }
.chiffre--alerte b { color: hsl(var(--alerte)); }

/* Icônes réseau */
.res { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: hsl(0 0% 100%); }
.res svg { width: 13px; height: 13px; stroke-width: 2; }
.res--youtube { background: hsl(var(--yt)); } .res--instagram { background: hsl(var(--ig)); }
.res--facebook { background: hsl(var(--fb)); } .res--tiktok { background: hsl(var(--tt)); }
.c-youtube { --c: hsl(var(--yt)); } .c-instagram { --c: hsl(var(--ig)); } .c-facebook { --c: hsl(var(--fb)); } .c-tiktok { --c: hsl(var(--tt)); }

/* Calendrier semaine */
.semaine { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.jour { display: flex; flex-direction: column; gap: 8px; min-height: 420px; padding: 10px; border-radius: var(--r-l); background: hsl(var(--surface-2) / .6); }
.jour__tete { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 4px 6px; }
.jour__nom { color: hsl(var(--encre-2)); font-weight: 500; }
.jour__num { font-family: var(--f-titre); font-size: 26px; line-height: 28px; }
.jour.is-auj { background: hsl(var(--encre)); }
.jour.is-auj .jour__nom { color: hsl(var(--or)); }
.jour.is-auj .jour__num { color: hsl(var(--fond)); }
.jour.is-passe .jour__num, .jour.is-passe .jour__nom { opacity: .55; }
.jour__vide { margin: auto 0; text-align: center; font-size: 12.5px; color: hsl(var(--sourdine)); padding: 18px 6px; border: 1.5px dashed hsl(var(--trait-fort)); border-radius: var(--r); }
.jour__vide--trou { color: hsl(var(--alerte)); border-color: hsl(var(--alerte) / .45); }
.jour.is-auj .jour__vide { color: hsl(0 0% 100% / .6); border-color: hsl(0 0% 100% / .25); }

.carte { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 8px; text-align: left; border-radius: var(--r); background: hsl(var(--surface)); border: 1px solid hsl(var(--trait)); box-shadow: var(--ombre); transition: transform .16s var(--ease), box-shadow .16s var(--ease); width: 100%; }
.carte:hover { transform: translateY(-1px); box-shadow: var(--ombre-haute); }
.carte .carte__titre { grid-column: 1 / -1; }
.carte .carte__corps { justify-content: space-between; padding: 2px 0; }
.carte .carte__ronds { margin-top: 0; flex-wrap: wrap; }
.vignette { width: 44px; height: 66px; border-radius: 6px; background: hsl(var(--surface-2)); overflow: hidden; display: grid; place-items: center; color: hsl(var(--sourdine)); }
.vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette svg { width: 18px; height: 18px; }
.vignette--carrousel { height: 55px; }
.carte__corps { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.carte__heure { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: hsl(var(--encre-2)); }
.carte__heure svg { width: 13px; height: 13px; }
.carte__titre { font-size: 12.5px; line-height: 16px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-transform: lowercase; }
.carte__titre::first-letter { text-transform: uppercase; }
.carte__ronds { display: flex; gap: 6px; margin-top: auto; padding-top: 2px; }

/* Mois */
.mois { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid hsl(var(--trait)); border-radius: var(--r-l); overflow: hidden; background: hsl(var(--trait)); gap: 1px; }
.mois__tete { padding: 10px 12px; background: hsl(var(--surface-2)); color: hsl(var(--encre-2)); font-weight: 500; font-size: 12.5px; }
.case { min-height: 128px; padding: 8px; background: hsl(var(--surface)); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.case.is-hors { background: hsl(var(--fond)); }
.case.is-hors .case__num { opacity: .35; }
.case__num { font-family: var(--f-titre); font-size: 17px; line-height: 20px; margin-bottom: 2px; align-self: flex-start; }
.case.is-auj .case__num { background: hsl(var(--encre)); color: hsl(var(--fond)); border-radius: 99px; padding: 1px 9px; }
.ligne { display: flex; align-items: center; gap: 6px; width: 100%; padding: 3px 6px; border-radius: 6px; text-align: left; font-size: 12px; line-height: 16px; background: hsl(var(--surface-2) / .7); }
.ligne:hover { background: hsl(var(--surface-2)); }
.ligne__h { color: hsl(var(--sourdine)); font-variant-numeric: tabular-nums; flex: none; }
.ligne__t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; text-transform: lowercase; }
.ligne__t::first-letter { text-transform: uppercase; }
.ligne .pt { width: 8px; height: 8px; border-width: 2px; }
.ligne__ronds { display: flex; gap: 3px; margin-left: auto; flex: none; }

/* Pipeline */
.pipeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(248px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.colonne { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: var(--r-l); background: hsl(var(--surface-2) / .6); max-height: calc(100vh - 260px); }
.colonne__tete { display: flex; align-items: center; gap: 8px; padding: 4px 4px 6px; font-weight: 600; }
.colonne__tete i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, hsl(var(--sourdine))); }
.colonne__tete span { margin-left: auto; color: hsl(var(--sourdine)); font-weight: 500; }
.colonne__liste { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding: 2px; }
.colonne__plus { color: hsl(var(--sourdine)); font-size: 12.5px; padding: 6px; text-align: center; }

/* À faire */
.afaire { display: grid; gap: 26px; max-width: 920px; }
.bloc h2 { margin: 0 0 4px; font-family: var(--f-titre); font-weight: 500; font-size: 26px; line-height: 30px; }
.bloc > p { margin: 0 0 12px; color: hsl(var(--encre-2)); }
.liste { background: hsl(var(--surface)); border: 1px solid hsl(var(--trait)); border-radius: var(--r-l); overflow: hidden; }
.tache { display: grid; grid-template-columns: 22px 92px 1fr auto; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; text-align: left; border-top: 1px solid hsl(var(--trait)); }
.tache:first-child { border-top: 0; }
.tache:hover { background: hsl(var(--fond)); }
.tache__date { color: hsl(var(--encre-2)); font-variant-numeric: tabular-nums; font-size: 13px; }
.tache__titre { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: lowercase; }
.tache__titre::first-letter { text-transform: uppercase; }
.tache__quoi { color: hsl(var(--encre-2)); font-size: 13px; white-space: nowrap; }
.rien { padding: 18px; color: hsl(var(--sourdine)); }

/* Tiroir de détail */
.voile { position: fixed; inset: 0; background: hsl(var(--encre) / .28); z-index: 10; animation: fondu .2s var(--ease); }
.tiroir { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); background: hsl(var(--surface)); box-shadow: var(--ombre-haute); z-index: 11; transform: translateX(104%); transition: transform .32s var(--ease); overflow-y: auto; }
.tiroir.is-open { transform: none; }
.tiroir__haut { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; color: hsl(var(--encre-2)); }
.tiroir__corps { padding: 14px 22px 28px; display: grid; gap: 18px; }
.tiroir__image { display: flex; gap: 14px; align-items: flex-start; }
.tiroir__image .vignette { width: 110px; height: 165px; border-radius: var(--r); }
.tiroir__image .vignette--carrousel { height: 137px; }
.tiroir h3 { margin: 0; font-family: var(--f-titre); font-weight: 500; font-size: 22px; line-height: 27px; text-transform: lowercase; }
.tiroir h3::first-letter { text-transform: uppercase; }
.tiroir__quand { margin: 8px 0 0; color: hsl(var(--encre-2)); }
.etapes { display: grid; gap: 1px; background: hsl(var(--trait)); border: 1px solid hsl(var(--trait)); border-radius: var(--r); overflow: hidden; }
.etape { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 11px 14px; background: hsl(var(--surface)); }
.etape__etat { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.etape a { color: hsl(var(--encre)); font-weight: 500; text-decoration: underline; text-decoration-color: hsl(var(--trait-fort)); text-underline-offset: 3px; }
.sous { margin: 0 0 6px; font-weight: 600; }
.texte-brut { margin: 0; padding: 12px 14px; border-radius: var(--r); background: hsl(var(--fond)); color: hsl(var(--encre-2)); font-size: 13px; line-height: 19px; white-space: pre-wrap; word-break: break-word; }
.btn-noir { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 99px; background: hsl(var(--encre)); color: hsl(var(--fond)); font-weight: 600; text-decoration: none; justify-self: start; }
.btn-noir:hover { background: hsl(var(--encre) / .86); }

@keyframes fondu { from { opacity: 0; } }
@keyframes monte { from { opacity: 0; transform: translateY(8px); } }
.vue.entre > * { animation: monte .38s var(--ease) both; }

/* Mobile */
@media (max-width: 860px) {
  body { grid-template-columns: 1fr; }
  .nav { position: static; height: auto; flex-direction: row; align-items: center; padding: 12px 14px; gap: 12px; overflow-x: auto; }
  .marque__sous, .legende, .nav__maj { display: none; }
  .nav__liens { display: flex; }
  .nav__lien { white-space: nowrap; padding: 7px 10px; }
  .page { padding: 20px 16px 40px; }
  .haut h1 { font-size: 34px; line-height: 38px; }
  .semaine { grid-template-columns: 1fr; overflow: visible; }
  .jour { min-height: 0; }
  .jour__vide { margin: 0; }
  .mois { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .case { min-height: 74px; padding: 4px; }
  .ligne__t, .ligne__h { display: none; }
  .ligne { padding: 3px; justify-content: center; }
  .ligne__ronds { margin: 0; }
  .tache { grid-template-columns: 22px 1fr; }
  .tache__date, .tache__quoi { grid-column: 2; }
  .colonne { max-height: none; }
}

/* Jours sans short : pastilles */
.trous { display: flex; flex-wrap: wrap; gap: 6px; }
.trou { display: grid; place-items: center; width: 56px; padding: 8px 0 7px; border-radius: var(--r); border: 1.5px dashed hsl(var(--alerte) / .45); background: hsl(var(--surface)); color: hsl(var(--alerte)); font-size: 12px; line-height: 14px; }
.trou b { font-family: var(--f-titre); font-weight: 500; font-size: 22px; line-height: 24px; color: hsl(var(--encre)); }
.carte--mini { grid-template-columns: 1fr; gap: 6px; padding: 10px 12px; }
.carte--mini .carte__ronds { margin-left: auto; }

/* Édition */
.haut__actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.haut__actions .btn-noir { height: 36px; }
.haut__actions .btn-noir svg { width: 16px; height: 16px; }
#actualiser.is-tourne svg { animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.plus { margin-left: auto; margin-right: 8px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: hsl(var(--sourdine)); opacity: 0; transition: opacity .14s, background .14s; }
.plus svg { width: 15px; height: 15px; }
.jour:hover .plus, .plus:focus-visible { opacity: 1; }
.plus:hover { background: hsl(var(--surface)); color: hsl(var(--encre)); }
.jour.is-auj .plus { color: hsl(0 0% 100% / .7); }
.jour.is-auj .plus:hover { background: hsl(0 0% 100% / .12); color: hsl(0 0% 100%); }
.jour__tete { align-items: center; }
[draggable="true"] { cursor: grab; }
.is-tire { opacity: .4; }
.is-cible { outline: 2px dashed hsl(var(--or)); outline-offset: -2px; }
.case.is-cible, .colonne.is-cible { background: hsl(var(--or) / .12); }
.form { display: grid; gap: 12px; padding: 16px; border-radius: var(--r); background: hsl(var(--fond)); border: 1px solid hsl(var(--trait)); }
.form__ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.champ { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: hsl(var(--encre-2)); }
.champ input, .champ select, .champ textarea { font: inherit; font-size: 14px; font-weight: 500; color: hsl(var(--encre)); padding: 9px 11px; border-radius: var(--r-s); border: 1px solid hsl(var(--trait-fort)); background: hsl(var(--surface)); resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 2px solid hsl(var(--or)); outline-offset: 0; border-color: transparent; }
.avis { margin: 0; padding: 10px 12px; border-radius: var(--r-s); background: hsl(var(--ambre) / .12); color: hsl(var(--or-fonce)); font-size: 13px; }
.form .btn-noir { border: 0; justify-self: stretch; justify-content: center; }
.form .btn-noir:disabled { opacity: .6; cursor: wait; }
.btn-lien { display: inline-flex; align-items: center; gap: 8px; justify-self: start; text-decoration: none; color: hsl(var(--encre)); }
.btn-lien svg { width: 15px; height: 15px; }
.tiroir__couv { margin: 6px 0 0; font-size: 12.5px; color: hsl(var(--or-fonce)); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 20; padding: 11px 18px; border-radius: 99px; background: hsl(var(--encre)); color: hsl(var(--fond)); font-weight: 500; box-shadow: var(--ombre-haute); animation: monte .3s var(--ease); transition: opacity .4s; }
.toast--mal { background: hsl(var(--alerte)); color: hsl(0 0% 100%); }
.toast.is-out { opacity: 0; }
@media (max-width: 860px) { .haut__actions { margin-left: 0; } .plus { opacity: 1; } }
[hidden] { display: none !important; }

/* Vérifié, vues */
.pt--attente { background: transparent; }
.carte__vues { margin-left: auto; font-size: 11.5px; font-weight: 700; color: hsl(var(--encre-2)); font-variant-numeric: tabular-nums; }
.etape { grid-template-columns: 22px 1fr auto; }
.etape__auto { margin-left: 8px; font-style: normal; font-size: 11.5px; color: hsl(var(--or-fonce)); background: hsl(var(--or) / .15); padding: 1px 7px; border-radius: 99px; }
.etape__stats { grid-column: 2 / -1; margin-top: -4px; font-size: 12.5px; color: hsl(var(--encre-2)); }
.etape__stats b { color: hsl(var(--encre)); font-variant-numeric: tabular-nums; }

/* Contenu d'une carte, façon Notion */
.contenu { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r); border: 1px solid hsl(var(--trait)); font-size: 14px; line-height: 21px; }
.b-texte { padding: 2px 4px; margin: 0 -4px; border-radius: 4px; outline: none; white-space: pre-wrap; word-break: break-word; }
.b-texte[contenteditable]:hover { background: hsl(var(--fond)); }
.b-texte[contenteditable]:focus { background: hsl(var(--or) / .1); box-shadow: 0 0 0 1.5px hsl(var(--or)); }
.b-texte.is-gras { font-weight: 700; }
.b-texte.is-envoi { opacity: .5; }
.b-titre { margin: 8px 0 0; font-family: var(--f-titre); font-weight: 500; font-size: 18px; line-height: 24px; }
blockquote.b-titre { font-family: var(--f-texte); font-size: 14px; border-left: 3px solid hsl(var(--trait-fort)); padding-left: 10px; }
.b-toggle summary { display: flex; gap: 6px; align-items: baseline; cursor: pointer; list-style: none; }
.b-toggle summary::before { content: "▸"; color: hsl(var(--sourdine)); transition: transform .15s; }
.b-toggle[open] summary::before { transform: rotate(90deg); }
.b-toggle summary .b-texte { flex: 1; }
.b-enfants { display: grid; gap: 6px; padding: 6px 0 4px 18px; }
.b-callout { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r-s); background: hsl(var(--surface-2) / .7); }
.b-callout > div { flex: 1; min-width: 0; }
.b-puce { position: relative; padding-left: 16px; }
.b-puce::before { content: ""; position: absolute; left: 3px; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: hsl(var(--encre-2)); }
.b-todo { display: flex; gap: 8px; align-items: flex-start; }
.b-trait { border: 0; border-top: 1px solid hsl(var(--trait)); margin: 6px 0; }
.b-ajout { min-height: 24px; padding: 4px 6px; border-radius: 4px; outline: none; color: hsl(var(--encre)); }
.b-ajout:empty::before { content: attr(data-vide); color: hsl(var(--sourdine)); }
.b-ajout:focus { box-shadow: 0 0 0 1.5px hsl(var(--or)); }
.contenu__aide { margin: 2px 0 0; font-size: 12px; color: hsl(var(--sourdine)); }

/* Vue Stats */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 22px; }
.tuile { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 16px; border-radius: var(--r-l); background: hsl(var(--surface)); border: 1px solid hsl(var(--trait)); }
.tuile b { font-family: var(--f-titre); font-weight: 500; font-size: 30px; line-height: 34px; }
.tuile > span:not(.res) { grid-column: 1 / -1; color: hsl(var(--encre-2)); margin-top: 6px; }
.tuile em { grid-column: 1 / -1; font-style: normal; font-weight: 600; font-size: 12.5px; color: hsl(152 60% 32%); }
.tuile em.is-bas { color: hsl(var(--alerte)); }
.st-table { background: hsl(var(--surface)); border: 1px solid hsl(var(--trait)); border-radius: var(--r-l); overflow: hidden; }
.st-tete, .st-ligne { display: grid; grid-template-columns: 44px minmax(0, 1fr) repeat(4, 74px) 150px; gap: 12px; align-items: center; padding: 10px 16px; width: 100%; text-align: left; }
.st-tete { font-size: 12.5px; font-weight: 600; color: hsl(var(--encre-2)); border-bottom: 1px solid hsl(var(--trait)); }
.st-ligne { border-top: 1px solid hsl(var(--trait)); }
.st-ligne:first-of-type { border-top: 0; }
.st-ligne:hover { background: hsl(var(--fond)); }
.st-ligne .vignette { width: 36px; height: 54px; }
.st-titre { min-width: 0; display: grid; }
.st-titre b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: lowercase; }
.st-titre b::first-letter { text-transform: uppercase; }
.st-titre small { color: hsl(var(--sourdine)); font-size: 12px; }
.st-res { text-align: right; font-variant-numeric: tabular-nums; }
.st-res i { color: hsl(var(--trait-fort)); font-style: normal; }
.st-tete .st-res { display: flex; justify-content: flex-end; }
.st-total { display: grid; gap: 4px; text-align: right; font-variant-numeric: tabular-nums; }
.st-total i { justify-self: end; height: 4px; border-radius: 99px; background: hsl(var(--or)); }
@media (max-width: 860px) {
  .st-tete { display: none; }
  .st-ligne { grid-template-columns: 36px 1fr auto; }
  .st-ligne .st-res { display: none; }
  .st-total { width: 90px; }
}
.nav__sortir { margin: -16px 10px 0; padding: 0; text-align: left; font-size: 12px; color: hsl(0 0% 100% / .5); text-decoration: underline; text-underline-offset: 3px; }
.nav__sortir:hover { color: hsl(0 0% 100%); }

/* ---------- v2 : filtres en solo, chiffres cliquables, tâches, stats poussées ---------- */
.puce.is-on { background: hsl(var(--encre)); border-color: hsl(var(--encre)); color: hsl(var(--fond)); }
.puce.is-on .res { color: inherit; }
.resume { display: block; }
.chiffres { display: flex; gap: 8px; flex-wrap: wrap; }
button.chiffre { cursor: pointer; transition: border-color .14s, box-shadow .14s; }
button.chiffre:hover { border-color: hsl(var(--trait-fort)); }
button.chiffre.is-on { border-color: hsl(var(--encre)); box-shadow: 0 0 0 1px hsl(var(--encre)); }
.focus { margin-top: 10px; padding: 14px 16px; border-radius: var(--r-l); background: hsl(var(--surface)); border: 1px solid hsl(var(--trait)); display: grid; gap: 6px; }
.focus__titre { margin: 0 0 4px; font-weight: 600; }
.focus__titre em { font-style: normal; font-weight: 400; color: hsl(var(--encre-2)); margin-left: 8px; }
.focus__ligne { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--r); text-align: left; }
.focus__ligne:hover { background: hsl(var(--fond)); }
.focus__ligne span { color: hsl(var(--encre-2)); font-size: 13px; }
.focus__ligne b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus__ligne em { font-style: normal; font-size: 13px; color: hsl(var(--alerte)); }
.is-pale { opacity: .28; }

.ajout-tache { display: grid; grid-template-columns: 1fr 130px 150px auto; gap: 8px; padding: 10px; border-radius: var(--r-l); background: hsl(var(--surface)); border: 1px solid hsl(var(--trait)); }
.ajout-tache input, .ajout-tache select { height: 40px; padding: 0 12px; border-radius: var(--r); border: 1px solid hsl(var(--trait)); background: hsl(var(--fond)); font: inherit; color: hsl(var(--encre)); }
.ajout-tache .btn-noir { border: 0; }
.bloc__n { font-family: var(--f-texte, inherit); font-size: 14px; font-weight: 600; color: hsl(var(--encre-2)); margin-left: 6px; vertical-align: middle; }
.tache { grid-template-columns: 20px minmax(0, 1fr) auto 64px 28px; cursor: default; }
.tache input[type=checkbox] { width: 18px; height: 18px; accent-color: hsl(var(--encre)); cursor: pointer; }
.tache__texte { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tache__post { font-size: 12.5px; color: hsl(var(--encre-2)); text-decoration: underline; text-underline-offset: 2px; }
.tache__pour { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: hsl(var(--surface-2)); color: hsl(var(--encre-2)); }
.tache__pour--leo { background: hsl(var(--or) / .18); color: hsl(var(--encre)); }
.tache__pour--tom { background: hsl(var(--fb) / .15); color: hsl(var(--encre)); }
.tache__date.is-tard { color: hsl(var(--alerte)); font-weight: 600; }
.tache__suppr { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 99px; color: hsl(var(--sourdine)); opacity: 0; transition: opacity .14s; }
.tache:hover .tache__suppr { opacity: 1; }
.tache__suppr svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.tache.is-fait .tache__texte { color: hsl(var(--sourdine)); text-decoration: line-through; }
.bloc--fait summary { list-style: none; cursor: pointer; }
.bloc--fait summary::-webkit-details-marker { display: none; }
.bloc--fait[open] summary { margin-bottom: 12px; }

.st-outils { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.st-aide { margin: 0; color: hsl(var(--encre-2)); font-size: 13px; }
.tuile em.neutre { color: hsl(var(--encre-2)); font-weight: 400; }
.bloc-stats { margin-bottom: 22px; }
.bloc-stats h2 { margin: 0 0 10px; font-family: var(--f-titre); font-weight: 500; font-size: 24px; }
.bloc-stats h2 em { font-family: var(--f-texte, inherit); font-style: normal; font-size: 13px; color: hsl(var(--encre-2)); margin-left: 8px; }
.outliers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.outlier { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r-l); background: hsl(var(--surface)); border: 1px solid hsl(var(--trait)); text-align: left; }
.outlier:hover { border-color: hsl(var(--trait-fort)); }
.outlier .vignette { width: 48px; height: 72px; }
.outlier > span:last-child { display: grid; gap: 3px; min-width: 0; justify-items: start; }
.outlier b { font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.outlier small { color: hsl(var(--encre-2)); font-size: 12px; }
.fois { display: inline-block; padding: 2px 8px; border-radius: 99px; font-weight: 700; font-size: 12.5px; background: hsl(var(--surface-2)); color: hsl(var(--encre)); font-variant-numeric: tabular-nums; }
.fois--fort { background: hsl(152 55% 40% / .16); color: hsl(152 60% 26%); }
.fois--bas { background: hsl(var(--alerte) / .12); color: hsl(var(--alerte)); }
.st-table { overflow-x: auto; }
.st-tete button { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.st-tete button.st-res { text-align: right; }
.st-tete button.is-on { color: hsl(var(--encre)); text-decoration: underline; text-underline-offset: 4px; }
.st-tete, .st-ligne { min-width: 640px; }

.sp { display: grid; gap: 12px; }
.sp__res { padding: 14px; border-radius: var(--r-l); border: 1px solid hsl(var(--trait)); background: hsl(var(--surface)); display: grid; gap: 10px; }
.sp__tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp__tete b { font-family: var(--f-titre); font-weight: 500; font-size: 24px; }
.sp__tete small { color: hsl(var(--encre-2)); font-size: 12.5px; }
.sp__ret { margin: 0; }
.sp__ret span { color: hsl(var(--encre-2)); }
.sp__mets { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sp__mets span { display: grid; font-size: 12px; color: hsl(var(--encre-2)); }
.sp__mets b { font-size: 16px; color: hsl(var(--encre)); font-variant-numeric: tabular-nums; }
.sp__src { display: grid; gap: 5px; }
.sp__src div { display: grid; grid-template-columns: 150px 1fr 44px; align-items: center; gap: 10px; font-size: 12.5px; }
.sp__src i { height: 6px; border-radius: 99px; background: hsl(var(--or)); }
.sp__src em { font-style: normal; text-align: right; color: hsl(var(--encre-2)); font-variant-numeric: tabular-nums; }
.sp__courbe svg { width: 100%; height: 90px; display: block; }
.sp__aire { fill: hsl(var(--or) / .16); }
.sp__ligne { fill: none; stroke: hsl(var(--or)); stroke-width: 2; vector-effect: non-scaling-stroke; }
.sp__axe { display: flex; justify-content: space-between; font-size: 11.5px; color: hsl(var(--encre-2)); margin-top: 4px; }
.sp__courbe small { color: hsl(var(--sourdine)); }
@media (max-width: 700px) { .ajout-tache { grid-template-columns: 1fr 1fr; } .ajout-tache input[name=texte] { grid-column: 1 / -1; } }
.sp__aire { stroke: none; }
.sp__courbe svg { border-bottom: 1px solid hsl(var(--trait)); }
.outlier b, .focus__ligne b { text-transform: lowercase; }
.outlier b::first-letter, .focus__ligne b::first-letter { text-transform: uppercase; }
