/* Direction artistique Eclair (CLAUDE.md section 11). Polices hebergees ici, aucun appel externe. */
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 800; font-display: swap; src: url(/fonts/barlow-condensed-latin-800-italic.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(/fonts/inter-latin-700-normal.woff2) format("woff2"); }
:root {
  --encre: #14122B; --nuit: #1F1C3D; --violet: #6C2BD9; --citron: #C6F432; --corail: #FF5A4D; --ambre: #FFB020;
  --brume: #F1EFFF; --lavande: #B9A8F5; --ligne: rgba(185,168,245,.18);
  --z1: #9AA3C7; --z2: #2BD4B5; --z3: #FFD84D; --z4: #FF9A3D; --z5: #FF5A4D; --z6: #D6246E;
  --titre: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--encre); color: var(--brume); font: 16px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
#app { max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 14px) 16px calc(env(safe-area-inset-bottom) + 96px); }
h1 { font: italic 800 30px/1.05 var(--titre); text-transform: uppercase; letter-spacing: .5px; margin: 4px 0 4px; }
h2 { font: italic 800 17px/1.1 var(--titre); text-transform: uppercase; letter-spacing: .6px; color: var(--lavande); margin: 24px 0 8px; }
.sub { color: var(--lavande); font-size: 14px; margin: 0 0 14px; }
.card { background: var(--nuit); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.muted { color: var(--lavande); font-size: 14px; }
.small { font-size: 13px; }
.warn { color: var(--ambre); font-size: 13px; }
.err { color: var(--corail); font-size: 14px; margin: 8px 0; }
/* Verdict : toujours ecrit en toutes lettres, la couleur ne porte jamais seule le sens. */
.verdict { font: italic 800 64px/1 var(--titre); text-transform: uppercase; letter-spacing: 1px; margin: 6px 0 8px; }
.verdict.GO { color: var(--citron); } .verdict.ADAPTER { color: var(--ambre); } .verdict.REPOS { color: var(--corail); } .verdict.RIEN { color: var(--lavande); font-size: 40px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 8px; background: var(--lavande); }
.dot.ok { background: var(--z2); } .dot.orange { background: var(--ambre); } .dot.red { background: var(--corail); }
.sess .t { font-weight: 700; font-size: 18px; } .sess .tag { font-size: 12px; color: var(--lavande); text-transform: uppercase; letter-spacing: .05em; }
.sess.adapted { outline: 1px solid var(--ambre); } .sess.past { opacity: .5; }
.btn { width: 100%; background: var(--violet); color: #fff; border: 0; border-radius: 12px; padding: 14px; font: 600 16px Inter, system-ui, sans-serif; cursor: pointer; }
.btn.citron { background: var(--citron); color: var(--encre); }
.btn.ghost { background: transparent; border: 1px solid var(--ligne); color: var(--brume); }
.btn.sm { width: auto; padding: 8px 12px; font-size: 14px; }
.btn + .btn { margin-top: 8px; }
.btn:disabled { opacity: .45; }
input, textarea { width: 100%; background: var(--nuit); border: 1px solid var(--ligne); color: var(--brume); border-radius: 12px; padding: 14px; font: 16px Inter, system-ui, sans-serif; margin: 6px 0 10px; }
input:focus, textarea:focus { outline: 2px solid var(--violet); }
label { display: block; color: var(--lavande); font-size: 13px; margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.chip { background: var(--nuit); border: 1px solid var(--ligne); color: var(--brume); border-radius: 999px; padding: 10px 14px; font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; }
.chip.on { background: var(--violet); border-color: var(--violet); color: #fff; }
.demo { background: rgba(255,176,32,.12); border-left: 3px solid var(--ambre); color: var(--ambre); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
nav { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(20,18,43,.96); border-top: 1px solid var(--ligne); display: flex; padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(10px); }
nav button { flex: 1; background: none; border: 0; color: var(--lavande); padding: 14px 4px; font: 600 13px Inter, system-ui, sans-serif; cursor: pointer; }
nav button.on { color: var(--brume); box-shadow: inset 0 2px 0 var(--violet); }
.kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi div { background: var(--nuit); border-radius: 12px; padding: 10px; text-align: center; }
.kpi b { display: block; font-size: 21px; } .kpi span { color: var(--lavande); font-size: 12px; }
.kpi .flash b { color: var(--citron); }
svg.spark { width: 100%; height: 64px; display: block; }
.week { padding: 0; overflow: hidden; }
.week summary { list-style: none; padding: 14px 16px; cursor: pointer; }
.week summary::-webkit-details-marker { display: none; }
.week .days { border-top: 1px solid var(--ligne); padding: 4px 16px 12px; }
.day { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ligne); }
.day:last-child { border-bottom: 0; }
.day .d { width: 48px; color: var(--lavande); font-size: 13px; flex: none; }
.day.past { opacity: .45; } .day.today .d { color: var(--brume); font-weight: 700; }
.day .s { cursor: pointer; padding: 2px 0; } .day.past .s { cursor: default; }
.modal { position: fixed; inset: 0; background: rgba(8,7,20,.7); display: flex; align-items: flex-end; z-index: 10; }
.modal .sheet { background: var(--encre); border-top: 1px solid var(--ligne); width: 100%; max-width: 560px; margin: 0 auto; border-radius: 18px 18px 0 0; padding: 18px 16px calc(env(safe-area-inset-bottom) + 18px); max-height: 86vh; overflow: auto; }
pre.wk { background: #0E0C22; border-radius: 10px; padding: 10px; font-size: 12px; white-space: pre-wrap; color: var(--lavande); margin: 6px 0 10px; }
.prog { height: 5px; background: var(--nuit); border-radius: 3px; overflow: hidden; margin: 10px 0 22px; }
.prog i { display: block; height: 100%; background: var(--violet); }
.q h1 { font-size: 28px; margin-top: 10px; }
.logo { font: italic 800 44px/.86 var(--titre); letter-spacing: 1px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { color: var(--lavande); font-weight: 400; text-align: right; padding: 6px 4px; font-size: 12px; }
td { padding: 8px 4px; border-top: 1px solid var(--ligne); text-align: right; }
th:first-child, td:first-child { text-align: left; }
td.flash { color: var(--citron); font-weight: 700; }

/* Analyse d'une seance */
.note-seance { font: italic 800 64px/1 var(--titre); color: var(--citron); margin: 6px 0 4px; }
.ligne { align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--ligne); }
.ligne:last-child { border-bottom: 0; }
.droite { text-align: right; }
.zbar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin: 10px 0 6px; background: var(--ligne); }
.zbar i { display: block; height: 100%; }
.zbar .z1 { background: var(--z1); } .zbar .z2 { background: var(--z2); } .zbar .z3 { background: var(--z3); }
.zbar .z4 { background: var(--z4); } .zbar .z5 { background: var(--z5); } .zbar .z6 { background: var(--z6); }

.barre { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.barre .n { width: 110px; font-size: 13px; color: var(--lavande); }
.barre .t { flex: 1; height: 7px; background: var(--ligne); border-radius: 4px; overflow: hidden; }
.barre .t i { display: block; height: 100%; border-radius: 4px; background: var(--violet); }
.barre .x { width: 34px; text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.grille2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.outil { display: block; width: 100%; text-align: left; border: 0; color: var(--brume); font: inherit; cursor: pointer; }
.outil b { display: block; font-size: 17px; margin-bottom: 2px; }
.card.avant { border: 1px solid var(--violet); }
b.flash { color: var(--citron); }
.squelette { height: 84px; border-radius: 14px; margin: 10px 0; background: linear-gradient(90deg, var(--nuit) 25%, #2a2650 50%, var(--nuit) 75%); background-size: 200% 100%; animation: balayage 1.2s linear infinite; }
@keyframes balayage { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .squelette { animation: none; } }
.puce { padding: 6px 0 6px 14px; position: relative; border-bottom: 1px solid var(--ligne); }
.puce:last-child { border-bottom: 0; }
.puce::before { content: ''; position: absolute; left: 0; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: var(--violet); }

/* ---------- Micro-animations (courtes, discretes, coupees si le telephone demande moins d'animations) ---------- */
@keyframes entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
@keyframes montee { from { transform: translateY(28px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes impact { 0% { opacity: 0; transform: scale(.9) skewX(-4deg); } 60% { opacity: 1; transform: scale(1.03) skewX(0); } 100% { transform: none; } }
@keyframes remplir { from { transform: scaleX(0); } to { transform: none; } }
@keyframes tracer { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
/* Arrivee d'un ecran : les blocs montent l'un apres l'autre. */
#app > :not(nav) { animation: entree .26s cubic-bezier(.2,.7,.2,1) both; }
#app > :nth-child(2) { animation-delay: .03s; } #app > :nth-child(3) { animation-delay: .06s; } #app > :nth-child(4) { animation-delay: .09s; }
#app > :nth-child(5) { animation-delay: .12s; } #app > :nth-child(6) { animation-delay: .15s; } #app > :nth-child(n+7):not(nav) { animation-delay: .18s; }
/* Fenetre du bas : le fond apparait, la feuille monte. */
.modal { animation: fondu .18s ease-out both; }
.modal .sheet { animation: montee .28s cubic-bezier(.2,.8,.2,1) both; }
/* Le verdict et les notes : un seul impact, comme un chrono qui s'arrete. */
.verdict, .note-seance, #app > .verdict { animation: impact .42s cubic-bezier(.2,.8,.2,1) both; transform-origin: left center; }
/* Appui : le bouton repond tout de suite. */
.btn, .chip, .outil, nav button, summary { transition: transform .12s ease, background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease; }
.btn:active, .chip:active, .outil:active { transform: scale(.97); }
nav button:active { opacity: .6; }
.btn:focus-visible, .chip:focus-visible, .outil:focus-visible, nav button:focus-visible, summary:focus-visible { outline: 2px solid var(--brume); outline-offset: 2px; }
nav button { position: relative; }
nav button::after { content: ''; position: absolute; left: 50%; top: 0; width: 0; height: 2px; background: var(--violet); transition: width .22s cubic-bezier(.2,.8,.2,1), left .22s cubic-bezier(.2,.8,.2,1); }
nav button.on { box-shadow: none; }
nav button.on::after { left: 22%; width: 56%; }
/* Barres et courbes : elles se remplissent une fois. */
.barre .t i, .zbar i { transform-origin: left center; animation: remplir .5s cubic-bezier(.2,.7,.2,1) both; }
.barre:nth-child(2) .t i { animation-delay: .04s; } .barre:nth-child(3) .t i { animation-delay: .08s; } .barre:nth-child(4) .t i { animation-delay: .12s; }
.barre:nth-child(5) .t i { animation-delay: .16s; } .barre:nth-child(n+6) .t i { animation-delay: .2s; }
.spark polyline { stroke-dasharray: 1; animation: tracer .7s ease-out both; }
.spark circle { animation: fondu .3s ease-out .6s both; }
/* Details : le contenu apparait, le repere pivote. */
details > :not(summary) { animation: entree .2s ease-out both; }
details.card > summary { list-style: none; cursor: pointer; }
details.card > summary::-webkit-details-marker { display: none; }
.dot { transition: background-color .2s ease; }
input, textarea { transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(108,43,217,.18); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.toile { width: 100%; display: block; background: var(--nuit); border-radius: 14px; margin: 10px 0 6px; touch-action: none; cursor: grab; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--lavande); margin: 6px 0 4px; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
input[type=range] { padding: 0; height: 28px; accent-color: var(--violet); background: transparent; border: 0; }
input[type=range]:focus { outline: none; box-shadow: none; }
