/* Mon QG — mobile d'abord, sombre par défaut, clair si l'iPhone est en clair. */
:root {
  --bg: #0a0b0f;
  --bg-2: #12141b;
  --carte: rgba(255, 255, 255, .045);
  --carte-forte: rgba(255, 255, 255, .08);
  --bord: rgba(255, 255, 255, .08);
  --txt: #f4f5f8;
  --doux: #8e94a3;
  --tres-doux: #5b6170;
  --acc: #8b7bff;
  --acc-2: #5ec8ff;
  --ok: #34d399;
  --ko: #fb7185;
  --attente: #fbbf24;
  --oubli: #94a3b8;
  --t-cours: #5ec8ff;
  --t-salle: #fb923c;
  --t-prospection: #8b7bff;
  --t-tournage: #f43f5e;
  --t-contenu: #ec4899;
  --t-anglais: #34d399;
  --t-sommeil: #64748b;
  --t-perso: #fbbf24;
  --dls: #8b7bff;
  --nex: #5ec8ff;
  --ombre: 0 10px 30px rgba(0, 0, 0, .35);
  --rayon: 20px;
  --haut: env(safe-area-inset-top, 0px);
  --bas: env(safe-area-inset-bottom, 0px);
  --ressort: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5f9; --bg-2: #ffffff; --carte: #ffffff; --carte-forte: #eef0f6; --bord: rgba(15, 18, 30, .08);
    --txt: #12141b; --doux: #636a7b; --tres-doux: #9aa1b1; --ombre: 0 8px 24px rgba(20, 24, 40, .08);
    color-scheme: light;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--txt); }
body {
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100dvh; overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.doux { color: var(--doux); }
[hidden] { display: none !important; }

/* Fond animé : trois halos qui dérivent lentement */
.fond { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fond i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: .22; animation: derive 26s ease-in-out infinite alternate; }
.fond i:nth-child(1) { background: var(--acc); top: -30vmax; left: -20vmax; }
.fond i:nth-child(2) { background: var(--acc-2); top: 10vmax; right: -35vmax; animation-duration: 32s; opacity: .14; }
.fond i:nth-child(3) { background: #f43f5e; bottom: -40vmax; left: 10vmax; animation-duration: 38s; opacity: .08; }
@media (prefers-color-scheme: light) { .fond i { opacity: .12; } }
@keyframes derive { to { transform: translate(8vmax, 6vmax) scale(1.15); } }

/* ---------------- Connexion ---------------- */
.connexion { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.connexion-carte { width: 100%; max-width: 360px; text-align: center; animation: monte .7s var(--ressort) both; }
.connexion-logo { border-radius: 20px; box-shadow: 0 12px 40px rgba(139, 123, 255, .45); animation: flotte 5s ease-in-out infinite; }
.connexion h1 { font-size: 34px; letter-spacing: -.02em; margin: 18px 0 4px; }
.connexion input[type=password] {
  width: 100%; margin-top: 28px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--bord);
  background: var(--carte); font-size: 17px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.connexion input:focus { border-color: var(--acc); box-shadow: 0 0 0 4px rgba(139, 123, 255, .18); }
.erreur { color: var(--ko); min-height: 1.4em; margin: 12px 0 0; font-size: 14px; }
.secoue { animation: secoue .4s; }
@keyframes secoue { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes flotte { 50% { transform: translateY(-6px); } }

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 14px;
  background: var(--carte-forte); font-weight: 600; transition: transform .15s var(--ressort), filter .2s;
}
.bouton:active { transform: scale(.96); }
.bouton.plein { width: 100%; margin-top: 12px; color: #fff; background: linear-gradient(135deg, var(--acc), var(--acc-2)); box-shadow: 0 8px 24px rgba(139, 123, 255, .35); padding: 16px; font-size: 17px; }
a.bouton { color: var(--txt); }
.bouton.petit { padding: 8px 12px; border-radius: 11px; font-size: 14px; }

/* ---------------- Entête et onglets ---------------- */
.entete {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: space-between;
  padding: calc(var(--haut) + 14px) 16px 12px; backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}
.entete-sur { margin: 0; color: var(--doux); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.entete-titre { margin: 0; font-size: 30px; letter-spacing: -.025em; line-height: 1.1; }
.entete-actions { display: flex; align-items: center; gap: 10px; }
.rond { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--carte); border: 1px solid var(--bord); color: var(--doux); }
.rond:active { transform: scale(.92); }
.pastille-synchro { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); transition: background .3s; }
.pastille-synchro.attente { background: var(--attente); animation: pulse 1.2s infinite; }
.pastille-synchro.hors { background: var(--ko); }
@keyframes pulse { 50% { opacity: .3; } }

main { padding: 4px 16px calc(var(--bas) + 110px); max-width: 720px; margin: 0 auto; }
.onglets {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bas) + 10px); z-index: 20;
  display: flex; gap: 2px; padding: 6px; border-radius: 26px; width: min(calc(100% - 24px), 460px);
  background: color-mix(in srgb, var(--bg-2) 78%, transparent); border: 1px solid var(--bord);
  backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); box-shadow: var(--ombre);
}
.onglets a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 20px;
  color: var(--tres-doux); text-decoration: none; font-size: 11px; font-weight: 600; transition: color .25s, background .25s;
}
.onglets a svg { transition: transform .35s var(--ressort); }
.onglets a.actif { color: var(--txt); background: var(--carte-forte); }
.onglets a.actif svg { transform: translateY(-1px) scale(1.08); color: var(--acc); }

/* ---------------- Vues et cartes ---------------- */
.vue.anime > * { animation: monte .55s var(--ressort) both; animation-delay: calc(min(var(--i, 0), 10) * 55ms); }
@keyframes monte { from { opacity: 0; transform: translateY(14px); } }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; margin-bottom: 14px; box-shadow: var(--ombre); }
.titre-bloc { display: flex; align-items: center; justify-content: space-between; margin: 22px 4px 10px; }
.titre-bloc h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.titre-bloc .doux { font-size: 14px; }
.vide { color: var(--doux); text-align: center; padding: 22px 8px; font-size: 15px; }
.bandeau { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(251, 191, 36, .1); color: var(--attente); font-size: 14px; margin-bottom: 14px; }

/* Héros du jour */
.heros { display: flex; gap: 16px; align-items: center; position: relative; overflow: hidden; }
.heros::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(var(--acc), transparent 70%); opacity: .18; }
.heros-txt { flex: 1; min-width: 0; }
.heros-txt h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.heros-txt p { margin: 0; color: var(--doux); font-size: 14px; }
.anneau { position: relative; width: 84px; height: 84px; flex: none; }
.anneau svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.anneau circle { stroke-width: 8; }
.anneau .piste { stroke: var(--carte-forte); }
.anneau .barre { stroke: url(#degrade); transition: stroke-dashoffset 1s var(--ressort); }
.anneau b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; letter-spacing: -.02em; }
.anneau b small { display: block; font-size: 11px; color: var(--doux); font-weight: 600; margin-top: -6px; }

/* Maintenant / ensuite */
.maintenant { display: flex; align-items: center; gap: 12px; }
.maintenant .barre-type { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c, var(--acc)); }
.maintenant .quand { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c, var(--acc)); }
.maintenant .quoi { font-weight: 600; font-size: 17px; }
.maintenant .doux { font-size: 13px; }

/* Priorités */
.prios { display: grid; gap: 10px; counter-reset: p; }
.prio { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.prio::before { counter-increment: p; content: counter(p); flex: none; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--acc), var(--acc-2)); }

/* Tâches */
.taches { display: grid; gap: 10px; }
.tache { background: var(--carte); border: 1px solid var(--bord); border-radius: 18px; overflow: hidden; transition: border-color .3s, background .3s; }
.tache-haut { display: flex; gap: 12px; align-items: flex-start; padding: 14px; width: 100%; text-align: left; }
.tache .etat { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--tres-doux); display: grid; place-items: center; transition: all .35s var(--ressort); }
.tache .etat svg { width: 16px; height: 16px; stroke-width: 3; color: #fff; }
.tache .t { flex: 1; min-width: 0; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tache.ouverte .t { -webkit-line-clamp: unset; }
.tache .puce { font-size: 11px; font-weight: 700; color: var(--doux); background: var(--carte-forte); padding: 3px 8px; border-radius: 99px; flex: none; margin-top: 3px; }
.tache-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 10px; max-height: 0; opacity: 0; transition: max-height .35s var(--ressort), opacity .25s, padding .35s; }
.tache.ouverte .tache-actions { max-height: 90px; opacity: 1; padding: 0 10px 12px; }
.tache-actions button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px; border-radius: 13px; background: var(--carte-forte); font-size: 12px; font-weight: 600; color: var(--doux); transition: transform .15s, background .2s, color .2s; }
.tache-actions button:active { transform: scale(.93); }
.tache-actions button svg { width: 19px; height: 19px; }
.tache-actions button.choisi { color: #fff; background: var(--c); }
.tache[data-statut="fait"] { --c: var(--ok); }
.tache[data-statut="pas_fait"] { --c: var(--ko); }
.tache[data-statut="oublie"] { --c: var(--oubli); }
.tache[data-statut="reporte"] { --c: var(--attente); }
.tache[data-statut] .etat { border-color: var(--c); background: var(--c); }
.tache.vient .etat { animation: pop .45s var(--ressort); }
.tache[data-statut="fait"] .t { color: var(--doux); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.tache[data-statut] { border-color: color-mix(in srgb, var(--c) 30%, transparent); }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } }
.compteurs { display: flex; gap: 8px; flex-wrap: wrap; margin: -2px 4px 12px; }
.compteurs span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }

/* Listes simples */
.liste { display: grid; gap: 2px; }
.ligne { display: flex; gap: 12px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--bord); font-size: 15px; }
.ligne:last-child { border-bottom: 0; }
.ligne .g { flex: 1; min-width: 0; }
.ligne .d { color: var(--doux); font-size: 13px; }
.ligne .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.pastille { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c, var(--acc)); }
details.carte summary { list-style: none; display: flex; justify-content: space-between; align-items: center; font-weight: 600; cursor: pointer; }
details.carte summary::-webkit-details-marker { display: none; }
details.carte summary::after { content: "›"; font-size: 22px; color: var(--doux); transition: transform .3s; }
details.carte[open] summary::after { transform: rotate(90deg); }
details.carte[open] .liste { margin-top: 8px; animation: monte .35s var(--ressort); }

/* Tuiles chiffres */
.tuiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.tuile { background: var(--carte); border: 1px solid var(--bord); border-radius: 18px; padding: 14px; }
.tuile .n { font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tuile .l { font-size: 13px; color: var(--doux); }

/* ---------------- Semaine ---------------- */
.sem-nav { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 12px; }
.sem-nav b { font-size: 15px; }
.sem-nav .ab { font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 8px; background: var(--carte-forte); margin-right: 6px; }
.jours { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
.jour-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; border-radius: 14px; background: var(--carte); border: 1px solid var(--bord); transition: all .3s var(--ressort); }
.jour-btn .l { font-size: 11px; color: var(--doux); font-weight: 700; text-transform: uppercase; }
.jour-btn .n { font-size: 17px; font-weight: 700; }
.jour-btn .pts { display: flex; gap: 2px; height: 5px; }
.jour-btn .pts i { width: 5px; height: 5px; border-radius: 50%; background: var(--c); }
.jour-btn.auj .n { color: var(--acc); }
.jour-btn.choisi { background: linear-gradient(160deg, var(--acc), var(--acc-2)); border-color: transparent; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(139, 123, 255, .35); }
.jour-btn.choisi .l, .jour-btn.choisi .n { color: #fff; }
.jour-btn.choisi .pts i { background: #fff; }
.bascule { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--carte-forte); }
.bascule button { padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--doux); transition: all .25s; }
.bascule button.actif { background: var(--bg-2); color: var(--txt); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }

.grille { position: relative; margin-left: 44px; border-left: 1px solid var(--bord); }
.grille .h { position: absolute; left: -44px; width: calc(100% + 44px); border-top: 1px dashed var(--bord); font-size: 11px; color: var(--tres-doux); font-variant-numeric: tabular-nums; }
.grille .h span { position: absolute; top: -8px; left: 0; width: 38px; text-align: right; }
.bloc {
  position: absolute; left: 6px; right: 4px; border-radius: 12px; padding: 6px 10px; overflow: hidden; text-align: left;
  background: color-mix(in srgb, var(--c) 18%, var(--bg-2)); border-left: 3px solid var(--c); font-size: 13px; line-height: 1.25;
  animation: apparait .5s var(--ressort) both; animation-delay: calc(var(--i, 0) * 40ms);
}
.bloc b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bloc span { color: var(--doux); font-size: 12px; }
.bloc.estime { border-left-style: dashed; background: color-mix(in srgb, var(--c) 10%, var(--bg-2)); }
.bloc.libre { --c: var(--tres-doux); background: transparent; border: 1.5px dashed var(--bord); border-left: 1.5px dashed var(--bord); color: var(--doux); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 12px; }
.bloc.libre:active { background: var(--carte); }
.bloc.perso-cale { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 50%, transparent); }
@keyframes apparait { from { opacity: 0; transform: scale(.96) translateY(6px); } }
.ligne-maintenant { position: absolute; left: -5px; right: 0; height: 2px; background: var(--ko); z-index: 3; pointer-events: none; }
.ligne-maintenant::before { content: ""; position: absolute; left: -1px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ko); box-shadow: 0 0 0 4px rgba(251, 113, 133, .25); animation: pulse 2s infinite; }

.sem-grille { display: grid; grid-template-columns: 30px repeat(7, 1fr); gap: 3px; }
.sem-col { position: relative; background: var(--carte); border-radius: 10px; border: 1px solid var(--bord); }
.sem-col.auj { border-color: color-mix(in srgb, var(--acc) 60%, transparent); }
.sem-col .mini { font-style: normal; position: absolute; left: 2px; right: 2px; border-radius: 5px; background: var(--c); opacity: .9; font-size: 9px; color: #fff; padding: 1px 3px; overflow: hidden; line-height: 1.1; font-weight: 700; }
.sem-col .mini.estime { opacity: .55; }
.sem-heures { position: relative; font-size: 10px; color: var(--tres-doux); }
.sem-heures span { position: absolute; right: 2px; transform: translateY(-50%); }
.sem-tete { text-align: center; font-size: 11px; font-weight: 700; color: var(--doux); padding-bottom: 4px; }
.sem-tete.auj { color: var(--acc); }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--bas) + 92px); z-index: 15; display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; border-radius: 99px; color: #fff; font-weight: 700; font-size: 15px;
  background: linear-gradient(135deg, var(--acc), var(--acc-2)); box-shadow: 0 12px 30px rgba(139, 123, 255, .45);
  animation: monte .6s var(--ressort) .2s both; transition: transform .2s var(--ressort);
}
.fab:active { transform: scale(.94); }
.fab svg { width: 20px; height: 20px; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 2px 0; font-size: 12px; color: var(--doux); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------- Feuille du bas ---------------- */
.voile { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fondu .25s both; }
.voile.part { animation: fondu .25s reverse both; }
.feuille {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-2); border-radius: 26px 26px 0 0; padding: 8px 18px calc(var(--bas) + 22px); box-shadow: 0 -10px 40px rgba(0, 0, 0, .35);
  animation: glisse .45s var(--ressort) both; max-width: 720px; margin: 0 auto;
}
.feuille.part { animation: glisse .3s ease-in reverse both; }
.feuille-poignee { width: 40px; height: 5px; border-radius: 9px; background: var(--bord); margin: 0 auto 14px; }
.feuille h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; }
.feuille h3 { margin: 18px 0 8px; font-size: 13px; color: var(--doux); text-transform: uppercase; letter-spacing: .06em; }
@keyframes glisse { from { transform: translateY(100%); } }
@keyframes fondu { from { opacity: 0; } }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puces button { padding: 10px 14px; border-radius: 12px; background: var(--carte-forte); font-weight: 600; font-size: 14px; transition: all .2s; }
.puces button.actif { background: var(--acc); color: #fff; }
.idee { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--carte); border: 1px solid var(--bord); margin-bottom: 8px; animation: monte .45s var(--ressort) both; animation-delay: calc(var(--i, 0) * 60ms); }
.idee .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; font-size: 20px; background: color-mix(in srgb, var(--c) 20%, transparent); }
.idee .g { flex: 1; min-width: 0; }
.idee b { display: block; font-size: 15px; }
.idee span { color: var(--doux); font-size: 13px; }

/* ---------------- Contenus ---------------- */
.segments { display: flex; padding: 4px; border-radius: 14px; background: var(--carte-forte); margin-bottom: 14px; }
.segments button { flex: 1; padding: 8px 4px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--doux); transition: all .25s var(--ressort); }
.segments button.actif { background: var(--bg-2); color: var(--txt); box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.nav-jour { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.nav-jour b { flex: 1; text-align: center; font-size: 17px; }
.bande { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.bande::-webkit-scrollbar { display: none; }
.bande button { scroll-snap-align: start; flex: none; width: 58px; padding: 8px 0; border-radius: 14px; background: var(--carte); border: 1px solid var(--bord); display: flex; flex-direction: column; align-items: center; gap: 3px; transition: all .3s var(--ressort); }
.bande button .l { font-size: 11px; color: var(--doux); font-weight: 700; }
.bande button .n { font-size: 16px; font-weight: 700; }
.bande button .pts { display: flex; gap: 3px; height: 6px; }
.bande button .pts i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.bande button .pts i.fait { opacity: .35; }
.bande button.choisi { background: linear-gradient(160deg, var(--acc), var(--acc-2)); border-color: transparent; }
.bande button.choisi .l, .bande button.choisi .n { color: #fff; }
.item { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 14px; border-radius: 18px; background: var(--carte); border: 1px solid var(--bord); margin-bottom: 10px; transition: all .3s var(--ressort); }
.item:active { transform: scale(.985); }
.item .etat { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--c); display: grid; place-items: center; color: #fff; transition: all .3s var(--ressort); }
.item .etat svg { width: 15px; height: 15px; stroke-width: 3; }
.item.fait .etat { background: var(--c); }
.item.vient .etat { animation: pop .45s var(--ressort); }
.item.fait .titre { text-decoration: line-through; color: var(--doux); }
.item.saute { opacity: .5; }
.item .g { flex: 1; min-width: 0; }
.item .titre { font-weight: 600; font-size: 15px; }
.item .det { color: var(--doux); font-size: 13px; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; }
.chip { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c, var(--acc)) 16%, transparent); color: var(--c, var(--acc)); }
.chip.neutre { --c: var(--doux); }
.barre-pro { height: 7px; border-radius: 9px; background: var(--carte-forte); overflow: hidden; margin-top: 6px; }
.barre-pro i { display: block; height: 100%; width: 0; border-radius: 9px; background: linear-gradient(90deg, var(--c, var(--acc)), var(--acc-2)); transition: width 1.1s var(--ressort); }
.une { padding: 9px 0; }
.une-h { display: flex; justify-content: space-between; font-size: 14px; }
.une-h .d { color: var(--doux); font-size: 13px; }
.une-h .d.pret { color: var(--ok); font-weight: 700; }
.vues-chiffres { display: flex; gap: 14px; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }
.vues-chiffres span { display: inline-flex; gap: 4px; align-items: baseline; }
.vues-chiffres small { color: var(--doux); font-weight: 600; font-size: 11px; }

/* ---------------- Argent ---------------- */
.gros { font-size: 40px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.gros small { font-size: 18px; color: var(--doux); font-weight: 700; margin-left: 4px; }
.sous { color: var(--doux); font-size: 14px; margin-top: 6px; }
.etiquette { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 4px 9px; border-radius: 8px; background: rgba(251, 191, 36, .14); color: var(--attente); }
.donut-zone { display: flex; gap: 16px; align-items: center; }
.donut { width: 120px; height: 120px; flex: none; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 16; stroke-linecap: butt; transition: stroke-dasharray 1s var(--ressort); }
.legende-v { flex: 1; min-width: 0; display: grid; gap: 6px; font-size: 13px; }
.legende-v div { display: flex; align-items: center; gap: 8px; }
.legende-v .v { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.spark { width: 100%; height: 56px; display: block; margin-top: 10px; }
.spark path.l { stroke: var(--acc); stroke-width: 2.2; fill: none; }
.spark path.a { fill: url(#degrade-v); stroke: none; opacity: .35; }
.trade-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.trade-grille div { background: var(--carte-forte); border-radius: 14px; padding: 10px; }
.trade-grille b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.trade-grille span { font-size: 12px; color: var(--doux); }
.hausse { color: var(--ok); }
.baisse { color: var(--ko); }
.note-bas { font-size: 12px; color: var(--tres-doux); margin-top: 12px; }

/* ---------------- Objectifs ---------------- */
.points { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.points i { width: 30px; height: 30px; border-radius: 10px; background: var(--carte-forte); display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; color: var(--doux); animation: pop .5s var(--ressort) both; animation-delay: calc(var(--i, 0) * 50ms); }
.points i.fait { background: var(--c, var(--ok)); color: #fff; }
.habitude-h { display: flex; justify-content: space-between; align-items: baseline; }
.habitude-h b { font-size: 16px; }
.habitude-h span { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--c, var(--ok)); }
.barres { display: flex; align-items: flex-end; gap: 4px; height: 110px; margin-top: 8px; }
.barres .col { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; height: 100%; }
.barres .col i { display: block; border-radius: 4px; transform-origin: bottom; animation: pousse .8s var(--ressort) both; animation-delay: calc(var(--i, 0) * 35ms); }
.barres .col i.f { background: linear-gradient(var(--ok), color-mix(in srgb, var(--ok) 60%, transparent)); }
.barres .col i.r { background: var(--ko); opacity: .8; }
.barres .col i.o { background: var(--carte-forte); }
.barres-l { display: flex; gap: 4px; margin-top: 4px; font-size: 10px; color: var(--tres-doux); }
.barres-l span { flex: 1; text-align: center; }
@keyframes pousse { from { transform: scaleY(0); } }
.note10 { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.obj-item { display: flex; gap: 10px; padding: 8px 0; font-size: 15px; }
.obj-item::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; background: linear-gradient(135deg, var(--acc), var(--acc-2)); }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bas) + 150px); z-index: 60; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 14px; background: var(--txt); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--ombre);
  transition: all .35s var(--ressort); max-width: calc(100% - 32px); text-align: center;
}
.toast.vu { opacity: 1; transform: translate(-50%, 0); }

/* Confettis de fin de journée */
.confetti { position: fixed; top: 40%; left: 50%; width: 8px; height: 12px; border-radius: 2px; z-index: 70; pointer-events: none; animation: confetti 1.2s cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes confetti { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

@media (min-width: 720px) {
  .entete { padding-left: max(16px, calc(50% - 344px)); padding-right: max(16px, calc(50% - 344px)); }
  .tuiles { grid-template-columns: repeat(4, 1fr); }
  .fab { right: max(16px, calc(50% - 344px)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
