/* Piste C « Panneaux » : sombre d'abord, clair en version propre. */
:root {
  --bg: #0b0e13; --surf: #141922; --surf2: #1c2331; --bord: rgba(255,255,255,.11); --bord-l: rgba(140,170,255,.3);
  --tx: #e9edf3; --tx2: #a6b0c0; --accent: #7aa2ff; --sur-accent: #0a1230; --accent-d: rgba(122,162,255,.16);
  --rouge: #ff8f8f; --rouge-d: rgba(255,110,110,.14); --vert: #5be3a0; --ia: #3dd9c9; --etoile: #ffc857; --ombre: rgba(0,0,0,.45);
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f1f4f9; --surf: #ffffff; --surf2: #e9eef6; --bord: rgba(15,25,45,.15); --bord-l: rgba(31,79,216,.35);
    --tx: #121926; --tx2: #4a5465; --accent: #1f4fd8; --sur-accent: #ffffff; --accent-d: rgba(31,79,216,.1);
    --rouge: #b42318; --rouge-d: rgba(180,35,24,.09); --vert: #12794a; --ia: #0b7a70; --etoile: #a86400; --ombre: rgba(20,30,60,.25);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f1f4f9; --surf: #ffffff; --surf2: #e9eef6; --bord: rgba(15,25,45,.15); --bord-l: rgba(31,79,216,.35);
  --tx: #121926; --tx2: #4a5465; --accent: #1f4fd8; --sur-accent: #ffffff; --accent-d: rgba(31,79,216,.1);
  --rouge: #b42318; --rouge-d: rgba(180,35,24,.09); --vert: #12794a; --ia: #0b7a70; --etoile: #a86400; --ombre: rgba(20,30,60,.25);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--tx); font: 15px/1.4 var(--sans); overflow: hidden; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
.ic { flex: none; }

/* ───── cadre ───── */
#app { height: 100dvh; display: flex; flex-direction: column; }
.entete { flex: none; height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; }
.sp { flex: 1; }
.h-titre { font-size: 20px; font-weight: 600; }
.h-auj { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 22px; background: var(--surf); border: 1px solid var(--bord-l); font-weight: 500; }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--sur-accent); font-size: 12px; font-weight: 500; }
.tour { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tx2); }
.tour i { width: 8px; height: 8px; border-radius: 50%; background: var(--vert); }
.tour.ko { color: var(--rouge); font-weight: 500; } .tour.ko i { background: var(--rouge); }
.ic-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; background: none; border: 0; border-radius: 22px; color: var(--tx); }
.ic-btn:disabled { opacity: .35; }
.vue { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; position: relative; }
body:not(.sur-fil) .vue { padding-bottom: 64px; }
body.tiroir-ouvert .vue { padding-bottom: 64px; }
#nav { flex: none; height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: flex; background: var(--surf); border-top: 1px solid var(--bord); z-index: 40; }
#nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: none; border: 0; font-size: 12px; color: var(--tx2); position: relative; }
#nav button[aria-current="page"] { color: var(--accent); font-weight: 600; }
#nav button[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
body.saisie:not(.pc) #nav, body.saisie:not(.pc) #tiroir { display: none; }
body.saisie:not(.pc) .vue { padding-bottom: 0; }

/* ───── tiroir ───── */
.tiroir { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); height: 64px; z-index: 35; display: flex; flex-direction: column; overflow: hidden; background: var(--surf); border-top: 1px solid var(--bord-l); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 28px var(--ombre); transition: height .25s cubic-bezier(.2,.8,.2,1); }
.tiroir.ouvert { height: min(70dvh, calc(100dvh - 120px)); }
.t-barre { flex: none; height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 4px; touch-action: none; position: relative; }
.t-resume { flex: 1; min-width: 0; height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 14px; background: none; border: 0; text-align: left; font-size: 14px; }
.t-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.t-txt b { font-size: 16px; }
.grip { position: absolute; top: 6px; left: 50%; margin-left: -18px; width: 36px; height: 4px; border-radius: 2px; background: var(--bord-l); }
.chev { display: inline-grid; transition: transform .2s; color: var(--tx2); } .chev.o { transform: rotate(180deg); }
.micro { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--accent); color: var(--sur-accent); box-shadow: 0 0 0 4px var(--accent-d); }
.micro.gros { width: 60px; height: 60px; }
.micro.ecoute { background: var(--rouge); color: #1a0505; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,100,100,.5); } 100% { box-shadow: 0 0 0 14px rgba(255,100,100,0); } }
.t-corps { flex: 1; min-height: 0; overflow-y: auto; padding: 0 14px 18px; overscroll-behavior: contain; }
.scrim-t { position: fixed; inset: 0 0 calc(60px + env(safe-area-inset-bottom)) 0; z-index: 34; background: rgba(0,0,0,.4); }
.dictee { position: fixed; top: 60px; left: 12px; right: 12px; z-index: 60; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--surf2); border: 1px solid var(--rouge); box-shadow: 0 8px 24px var(--ombre); max-width: 560px; margin: 0 auto; }
.dictee .pt { width: 10px; height: 10px; border-radius: 50%; background: var(--rouge); animation: pulse 1.2s infinite; flex: none; }
.dictee #dictee-txt { color: var(--tx2); font-size: 13px; min-height: 18px; }

/* ───── Aujourd'hui (E01) ───── */
.a-tete { display: flex; align-items: center; gap: 14px; padding: 4px 0 10px; }
.a-date { color: var(--tx2); text-transform: capitalize; } .a-imp { color: var(--tx2); font-size: 13px; }
.a-tete h2 { font-size: 20px; }
.anneau .a-fond { stroke: var(--surf2); } .anneau .a-val { stroke: var(--accent); } .anneau.ia .a-val { stroke: var(--ia); } .anneau.fini .a-val { stroke: var(--vert); }
.anneau.gros .a-fond { stroke: var(--bord); }
.module { margin-top: 10px; background: var(--bg); border: 1px solid var(--bord); border-radius: 12px; padding: 4px 10px 8px; }
.module.retard { background: transparent; border-style: dashed; }
.m-tete { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; background: none; border: 0; text-align: left; padding: 0; }
.m-tete h3 { font-size: 15px; font-weight: 600; }
.m-tete.rouge h3, .fait-t.rouge { color: var(--rouge); }
.m-tete.fixe { cursor: default; }
.calme { color: var(--tx2); padding: 14px 4px; text-align: center; }
.vide-t { color: var(--tx2); padding: 12px 4px; }
.carte-p { background: var(--surf); border: 1px solid var(--bord); border-radius: 10px; padding: 10px 12px; margin: 6px 0; }
.cp-titre { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; overflow-wrap: break-word; }
.cp-resume, .cp-q { margin-top: 4px; color: var(--tx2); overflow-wrap: break-word; }
.cp-q { color: var(--tx); }
.cp-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .cp-btns.bas { margin-top: 18px; }
.pave { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pastille { padding: 1px 8px; border-radius: 10px; background: var(--accent-d); color: var(--accent); font-size: 12px; font-weight: 500; }
.chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; background: var(--surf2); }
.chip.ok { color: var(--vert); } .chip.ko { color: var(--rouge); background: var(--rouge-d); } .chip.envoi { color: var(--accent); } .chip.garde { color: var(--tx); border: 1px dashed var(--bord-l); }

/* boutons */
.btn { min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; background: none; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.btn.plein { background: var(--accent); color: var(--sur-accent); }
.btn.contour { border-color: var(--bord-l); background: var(--surf); }
.btn.lien { color: var(--accent); padding: 0 8px; }
.btn.danger { color: var(--rouge); border-color: var(--rouge); background: var(--rouge-d); }
.btn.pavet { background: var(--surf2); border-color: var(--bord-l); flex: 1 1 auto; }
.btn.rond { padding: 0; width: 48px; border-radius: 24px; }
.btn.gros { min-height: 52px; padding: 0 24px; }
.btn.arret { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: 150px; background: var(--rouge); color: #1a0505; box-shadow: 0 6px 20px var(--ombre); }

/* ───── ligne de tâche ───── */
.ligne { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; min-height: 52px; border-bottom: 1px solid var(--bord); }
.ligne.neuve { animation: flash 1.2s; }
@keyframes flash { from { background: var(--accent-d); } to { background: transparent; } }
.ligne:last-child { border-bottom: 0; }
.case { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; padding: 0; }
.case-rond { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--tx2); display: grid; place-items: center; color: transparent; transition: background .15s; }
.case[aria-pressed="true"] .case-rond { background: var(--vert); border-color: var(--vert); color: var(--bg); }
.corps { background: none; border: 0; text-align: left; padding: 8px 2px; min-width: 0; min-height: 44px; display: flex; flex-direction: column; gap: 4px; }
.titre { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; hyphens: auto; overflow-wrap: break-word; word-break: normal; }
.ligne.fait .titre { text-decoration: line-through; color: var(--tx2); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.puce { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--surf2); color: var(--tx2); max-width: 100%; }
.puce.proj { color: var(--tx); }
.puce.rap { color: var(--accent); background: var(--accent-d); }
.puce.rap.passe { color: var(--rouge); background: var(--rouge-d); }
.etoile { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--tx2); padding: 0; }
.etoile svg { fill: none; } .etoile.on { color: var(--etoile); } .etoile.on svg { fill: var(--etoile); }
.l-extra { grid-column: 2 / 4; padding: 0 0 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.puce-btn { min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--bord-l); background: none; color: var(--accent); font-size: 13px; }
.fait-sec { margin-top: 6px; }
.fait-t { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; background: none; border: 0; padding: 0 4px; color: var(--tx2); font-weight: 500; text-align: left; }

/* ───── onglet Tâches ───── */
.vues { flex: none; display: flex; gap: 6px; padding: 0 12px 8px; }
.vue-p { min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--bord); background: none; color: var(--tx2); font-weight: 500; }
.vue-p[aria-pressed="true"] { background: var(--accent); color: var(--sur-accent); border-color: var(--accent); }
.ecran { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.barre-outils { flex: none; padding: 0 12px 8px; display: flex; gap: 8px; }
.reperes { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: none; touch-action: pan-x; }
.reperes::-webkit-scrollbar { display: none; }
.rep { flex: none; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--bord); background: var(--surf); color: var(--tx); position: relative; user-select: none; -webkit-user-select: none; }
.rep.calme { color: var(--tx2); }
.rep[aria-current="true"] { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.rep.tout { background: var(--accent-d); }
.rep .pc-n { font-size: 12px; color: var(--tx2); }
.rep.drag { opacity: .6; transform: scale(1.06); } .rep.cible { outline: 3px dashed var(--accent); }
.carrousel { flex: 1; min-height: 0; display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding: 0 12px 10px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.panneau { flex: 0 0 84%; scroll-snap-align: start; min-height: 0; display: flex; flex-direction: column; background: var(--surf); border: 1px solid var(--bord-l); border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); overflow: hidden; }
.p-tete { flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border-bottom: 1px solid var(--bord); }
.p-titre { flex: 1; min-width: 0; min-height: 52px; display: flex; align-items: center; gap: 6px; text-align: left; background: none; border: 0; padding: 0 8px; }
.p-titre.sans-act { cursor: default; }
.p-noms { display: flex; flex-direction: column; min-width: 0; }
.p-nom { font-weight: 600; font-size: 16px; overflow-wrap: break-word; hyphens: auto; }
.p-compte { color: var(--tx2); font-size: 13px; }
.p-retour { color: var(--accent); display: grid; }
.p-pin { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--tx2); border-radius: 22px; }
.p-pin.on { color: var(--accent); background: var(--accent-d); }
.p-corps { flex: 1; min-height: 0; overflow-y: auto; padding: 0 4px 8px; overscroll-behavior: contain; cursor: pointer; }
.panneau.fini { opacity: 1; } .panneau.fini .p-nom, .panneau.fini .p-compte { color: var(--tx2); }
.panneau.vide { flex-basis: 78%; align-self: flex-start; max-height: 190px; }
.panneau.fini { align-self: flex-start; max-height: 230px; }
.invite { display: flex; align-items: center; gap: 8px; margin: 12px 8px; min-height: 44px; padding: 0 12px; border: 1px dashed var(--bord-l); border-radius: 10px; background: none; color: var(--accent); width: calc(100% - 16px); }
.echeances { flex: none; display: flex; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--bord); }
.ech { flex: 1; display: grid; grid-template-columns: auto 1fr; column-gap: 6px; row-gap: 2px; align-items: center; font-size: 11px; color: var(--tx2); }
.ech-n { font-size: 14px; color: var(--tx); } .ech-b { height: 5px; border-radius: 3px; background: var(--surf2); overflow: hidden; } .ech-b i { display: block; height: 100%; background: var(--accent); }
.ech.r .ech-b i { background: var(--rouge); } .ech.p .ech-b i { background: var(--tx2); } .ech-l { grid-column: 1 / 3; }
.verrou { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--tx2); }
.p-archiver { padding: 10px 8px; }
.p-pied { flex: none; display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--bord); background: var(--surf); }
.p-pied .btn { padding: 0 12px; } .p-pied { gap: 6px; } .p-pied .champ { padding: 0 10px; font-size: 14.5px; }
.champ { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--bord-l); background: var(--bg); color: var(--tx); }
.champ::placeholder { color: var(--tx2); }
.focus-wrap { flex-direction: row; position: relative; padding: 0 16px 8px; }
.focus-wrap .panneau { flex: 1; min-width: 0; scroll-snap-align: none; position: relative; z-index: 1; margin: 0 4px; }
.bord { position: absolute; top: 0; bottom: 8px; width: 44px; z-index: 0; border: 0; padding: 0; background: none; display: flex; align-items: center; justify-content: center; }
.bord.g { left: 0; background: linear-gradient(90deg, var(--surf2) 0 12px, transparent 12px); border-radius: 8px 0 0 8px; }
.bord.d { right: 0; background: linear-gradient(270deg, var(--surf2) 0 12px, transparent 12px); border-radius: 0 8px 8px 0; }
.vue-p { min-height: 44px; }
.bord-n { writing-mode: vertical-rl; font-size: 12px; color: var(--tx2); white-space: nowrap; overflow: hidden; max-height: 90%; }
.vide-box { margin: 40px 16px; text-align: center; color: var(--tx2); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.colonnes .panneau.col { flex-basis: 78%; } .colonnes .panneau.col-retard { flex: 0 0 64px; }
.cr-btn { width: 100%; height: 100%; min-height: 160px; background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 12px; color: var(--rouge); }
.cr-l { writing-mode: vertical-rl; font-weight: 600; } .cr-n { font-size: 18px; }
.colonnes .panneau.ret .p-nom { color: var(--rouge); }
.colonnes .p-corps { cursor: default; }
.colonnes .p-tete .p-titre { min-height: 48px; }

/* ───── Fil ───── */
.fil-e { min-height: 0; }
.fil-liste { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.sep-jour { text-align: center; margin: 8px 0 2px; font-size: 12px; color: var(--tx2); } .sep-jour span { padding: 0 10px; background: var(--bg); position: relative; }
.sep-jour { display: flex; align-items: center; gap: 10px; } .sep-jour::before, .sep-jour::after { content: ""; flex: 1; height: 1px; background: var(--bord); } .sep-jour span { order: 0; padding: 0; } .sep-jour::after { order: 1; } .sep-jour span { order: 0; }
.msg { max-width: 88%; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 4px; background: var(--surf); overflow-wrap: anywhere; }
.msg.michael { align-self: flex-end; background: var(--accent-d); border-color: var(--bord-l); }
.msg.dispatch { align-self: flex-start; border-left: 3px solid var(--accent); }
.msg-t p + p { margin-top: 8px; }
.msg .meta { margin-top: 6px; font-size: 12px; color: var(--tx2); display: block; }
.msg.attente { border-style: dashed; }
.msg.pense { color: var(--tx2); font-style: italic; }
.choix { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 92%; }
.bandeau { flex: none; margin: 0 12px 6px; padding: 10px 12px; border-radius: 8px; background: var(--rouge-d); border: 1px solid var(--rouge); color: var(--rouge); font-size: 14px; }
.composer { flex: none; padding: 6px 12px 10px; border-top: 1px solid var(--bord); background: var(--surf); }
.comp-row { display: flex; align-items: center; gap: 8px; }
.etat { min-height: 18px; font-size: 13px; color: var(--tx2); padding-bottom: 4px; } .etat.err { color: var(--rouge); }

/* ───── Heures ───── */
.heures-e { overflow-y: auto; padding: 0 12px 16px; gap: 12px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.heures-e > * { flex: none; }
.tuiles-h { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tuile-h { position: relative; display: block; padding: 12px; border-radius: 12px; border: 1px solid var(--bord-l); background: var(--surf); min-width: 0; }
.tuile-h.acc { background: linear-gradient(160deg, var(--accent-d), var(--surf)); }
.th-an { position: absolute; top: 10px; right: 10px; }
.th-lib { color: var(--tx2); font-size: 13px; padding-right: 50px; } .th-val { font-size: 24px; font-weight: 500; line-height: 1.25; white-space: nowrap; } .th-ia { font-size: 12px; color: var(--tx2); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; } .sw.moi { background: var(--accent); } .sw.ia { background: repeating-linear-gradient(45deg, var(--ia) 0 2px, var(--surf2) 2px 4px); border: 1px solid var(--ia); }
.carte-g { background: var(--surf); border: 1px solid var(--bord-l); border-radius: 12px; padding: 12px; }
.cg-t { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } .cg-t h3 { font-size: 14px; }
.legende { font-size: 12px; color: var(--tx2); display: inline-flex; align-items: center; gap: 6px; }
.graph { width: 100%; height: auto; display: block; max-width: 520px; margin: 0 auto; }
.b-moi { fill: var(--accent); } .b-ia { fill: url(#hach); stroke: var(--ia); stroke-width: 1; } .p-fond { fill: var(--surf); } .p-trait { stroke: var(--ia); }
.grille-l { stroke: var(--bord); stroke-width: 1; } .axe { fill: var(--tx2); font-size: 10px; }
.c-moi { stroke: var(--accent); } .c-ia { stroke: var(--ia); } .pt-moi { fill: var(--accent); } .pt-ia { fill: var(--ia); }
.frais { font-size: 12px; color: var(--tx2); }
.periodes { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.chip-b { flex: none; min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--bord); background: var(--surf); color: var(--tx); }
.chip-b[aria-pressed="true"], .chip-b.on { background: var(--accent); color: var(--sur-accent); border-color: var(--accent); }
.familles { display: grid; gap: 10px; }
.fam { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 10px; padding: 12px; text-align: left; border-radius: 12px; border: 1px solid var(--bord-l); background: var(--surf); }
.fam.calme { color: var(--tx2); border-color: var(--bord); }
.fam-t { display: flex; flex-direction: column; } .sous { color: var(--tx2); font-size: 12px; font-weight: 400; } .fam-d { font-size: 18px; }
.pile { grid-column: 1 / 3; display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surf2); gap: 2px; }
.seg { display: block; height: 100%; background: var(--accent); } .seg.s1 { background: color-mix(in srgb, var(--accent) 65%, var(--surf2)); } .seg.s2 { background: color-mix(in srgb, var(--accent) 42%, var(--surf2)); } .seg.s3 { background: color-mix(in srgb, var(--accent) 28%, var(--surf2)); }
.retour { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--accent); padding: 0 8px 0 0; font-weight: 500; }
.h2 { font-size: 22px; }
.barres-h { display: grid; gap: 8px; }
.bh { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px; text-align: left; border-radius: 12px; border: 1px solid var(--bord-l); background: var(--surf); }
.bh.calme { color: var(--tx2); } .bh-t { display: flex; flex-direction: column; } .bh-d { font-size: 16px; } .bh-b { grid-column: 1 / 3; height: 8px; border-radius: 4px; background: var(--surf2); overflow: hidden; } .bh-b i { display: block; height: 100%; }
.note, .note-ia { font-size: 13px; color: var(--tx2); } .note-ia { display: flex; align-items: center; gap: 8px; color: var(--tx); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .t3 { padding: 10px; border-radius: 12px; border: 1px solid var(--bord); background: var(--surf); display: flex; flex-direction: column; } .t3.acc { border-color: var(--accent); background: var(--accent-d); } .t3 span { font-size: 12px; color: var(--tx2); } .t3 b { font-size: 18px; font-weight: 500; }
.sous-t { font-size: 13px; text-transform: none; color: var(--tx2); font-weight: 600; margin: 14px 0 6px; letter-spacing: .02em; }
.heures-e .sous-t { margin: 4px 0 -4px; }
.releve { background: var(--surf); border: 1px solid var(--bord); border-radius: 12px; padding: 0 12px; }
.rl { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bord); } .rl:last-child { border-bottom: 0; } .rl.tot { font-weight: 600; } .rl.sub { color: var(--tx2); padding-left: 14px; }
.iaa { display: block; font-size: 12px; color: var(--ia); text-align: right; font-weight: 400; }
.jours { background: var(--surf); border: 1px solid var(--bord); border-radius: 12px; padding: 4px 12px; }
.jr { display: grid; grid-template-columns: 76px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--bord); } .jr:last-child { border-bottom: 0; }
.jr-b { height: 8px; border-radius: 4px; background: var(--surf2); overflow: hidden; } .jr-b i { display: block; height: 100%; background: var(--accent); } .jr-d { text-align: right; }

/* ───── calques ───── */
#calques .calque { position: fixed; inset: 0; z-index: 80; }
.scrim { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.feuille, .panneau-g, .cote, .dlg { position: absolute; background: var(--surf); border: 1px solid var(--bord-l); box-shadow: 0 -10px 40px var(--ombre); display: flex; flex-direction: column; overflow: hidden; }
.feuille, .panneau-g { left: 0; right: 0; bottom: 0; border-radius: 18px 18px 0 0; max-height: 92dvh; }
.panneau-g { height: 88dvh; } .feuille { max-height: 88dvh; }
.cote { top: 0; right: 0; bottom: 0; width: min(92%, 420px); border-radius: 18px 0 0 18px; }
.dlg { left: 16px; right: 16px; top: 50%; transform: translateY(-50%); max-width: 440px; margin: 0 auto; border-radius: 16px; max-height: 86dvh; }
.dlg.haute { max-height: 86dvh; } .dlg.petite { max-width: 400px; }
.entre.feuille, .entre.panneau-g { animation: monte .25s cubic-bezier(.2,.8,.2,1); } .entre.cote { animation: glisse .25s cubic-bezier(.2,.8,.2,1); } .entre.dlg { animation: fond .18s; }
@keyframes monte { from { transform: translateY(40px); opacity: 0; } } @keyframes glisse { from { transform: translateX(40px); opacity: 0; } } @keyframes fond { from { opacity: 0; } }
.f-tete { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 16px; border-bottom: 1px solid var(--bord); }
.f-titre { font-size: 17px; font-weight: 600; overflow-wrap: break-word; hyphens: auto; min-width: 0; padding: 6px 0; }
.f-corps { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px 20px; overscroll-behavior: contain; }
.f-pied { flex: none; padding: 8px 16px 12px; border-top: 1px solid var(--bord); } .f-pied .dlg-btns { margin-top: 0; }
.f-corps p { margin: 0 0 10px; }
.f-texte { color: var(--tx2); overflow-wrap: break-word; margin-bottom: 10px; } .f-dates { font-size: 12px; color: var(--tx2); margin: 8px 0 14px; }
.f-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tuile { min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; border: 1px solid var(--bord-l); background: var(--surf2); font-size: 13px; text-align: center; padding: 6px; }
.tuile.on { background: var(--accent-d); border-color: var(--accent); } .tuile.danger { color: var(--rouge); } .tuile.on .ic-etoile { color: var(--etoile); } .tuile.on svg { fill: var(--etoile); }
.rapide { grid-column: 1 / 4; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rapide .chip-b { min-height: 44px; }
.idee { font-size: 11px; padding: 1px 8px; border-radius: 10px; border: 1px dashed var(--bord-l); color: var(--tx2); }
.dlg-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.lib { display: block; margin-bottom: 6px; font-weight: 500; }
.cal-tete { display: flex; justify-content: space-between; align-items: center; text-transform: capitalize; }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-j { color: var(--tx2); font-size: 12px; padding: 4px 0; }
.cal-d { min-height: 44px; border-radius: 10px; border: 1px solid transparent; background: none; font-family: var(--mono); }
.cal-d.auj { border-color: var(--bord-l); } .cal-d.on { background: var(--accent); color: var(--sur-accent); } .cal-d:disabled { color: var(--tx2); opacity: .45; }
.heures-ch { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; } .min-ch { display: flex; gap: 6px; margin-top: 6px; }
.rap-choix { min-height: 24px; margin-top: 10px; font-size: 15px; color: var(--accent); }
.fich { margin: 0; padding-left: 20px; }
.ligne-d { width: 100%; min-height: 48px; display: flex; justify-content: space-between; align-items: center; padding: 0 8px; background: none; border: 0; border-bottom: 1px solid var(--bord); text-align: left; }
.segctl { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surf2); }
.segctl button { flex: 1; min-height: 44px; border: 0; border-radius: 9px; background: none; color: var(--tx); font-weight: 500; }
.segctl button[aria-pressed="true"] { background: var(--accent); color: var(--sur-accent); }
.r-liste { margin-top: 14px; border: 1px solid var(--bord); border-radius: 12px; overflow: hidden; }
.r-ligne { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: none; border: 0; border-bottom: 1px solid var(--bord); text-align: left; } .r-ligne:last-child { border-bottom: 0; } .r-ligne > span:first-child { flex: 1; } .r-val { color: var(--tx2); }
.inter { width: 46px; height: 28px; border-radius: 14px; background: var(--surf2); border: 1px solid var(--tx2); position: relative; flex: none; } .inter i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--tx2); transition: left .15s; } .inter.on { background: var(--accent); border-color: var(--accent); } .inter.on i { left: 21px; background: var(--sur-accent); }
.bientot { margin: 0; padding-left: 20px; color: var(--tx2); line-height: 2; }
.voix-l { display: flex; align-items: center; border-bottom: 1px solid var(--bord); } .voix-l.on { background: var(--accent-d); }
.vl-play { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--accent); } .vl-nom { flex: 1; min-height: 56px; text-align: left; background: none; border: 0; display: flex; flex-direction: column; justify-content: center; } .vl-nom span { color: var(--tx2); font-size: 12px; } .coche { color: var(--vert); padding-right: 12px; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 44px; }
.dlg-plein { position: absolute; inset: 0; background: var(--bg); display: grid; place-items: center; }
.porte { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px; } .porte h1 { font-size: 28px; } .porte p { color: var(--tx2); }
.frise-box { margin-bottom: 8px; } .frise { overflow-x: auto; padding-bottom: 6px; } .frise-in { position: relative; width: 960px; height: 118px; border-bottom: 2px solid var(--bord-l); margin: 0 16px; }
.tick { position: absolute; bottom: -22px; font-size: 11px; color: var(--tx2); transform: translateX(-50%); }
.frise-in { margin-bottom: 26px; }
.maintenant { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--accent); } .maintenant b { position: absolute; top: 0; left: 4px; font-size: 11px; color: var(--accent); font-weight: 500; }
.marque { position: absolute; top: 28px; } .marque.bas { top: 70px; } .marque button { min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent-d); font-size: 12px; white-space: nowrap; transform: translateX(-4px); } .marque.passe button { border-color: var(--rouge); background: var(--rouge-d); color: var(--rouge); }
.retard-bloc { margin-top: 14px; border-top: 1px dashed var(--bord-l); }

/* ───── toasts ───── */
#toasts { position: fixed; left: 12px; right: 12px; bottom: calc(60px + 64px + 12px); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--tx); color: var(--bg); box-shadow: 0 8px 24px var(--ombre); max-width: 420px; animation: fond .2s; }
.toast-a { min-height: 44px; padding: 0 10px; background: none; border: 0; color: var(--accent); font-weight: 600; filter: brightness(.7); }
.toast.notif { flex-direction: column; align-items: flex-start; gap: 0; }

/* ───── PC ───── */
@media (min-width: 900px) {
  #app { display: grid; grid-template-columns: 80px minmax(0, 1fr) 360px; grid-template-rows: 56px minmax(0, 1fr); grid-template-areas: "nav entete tiroir" "nav vue tiroir"; }
  #nav { grid-area: nav; flex-direction: column; height: auto; border-top: 0; border-right: 1px solid var(--bord); padding: 12px 0; gap: 8px; justify-content: flex-start; }
  #nav button { flex: none; height: 64px; }
  #nav button[aria-current="page"]::before { left: 0; top: 14px; width: 3px; height: 36px; border-radius: 0 3px 3px 0; }
  .entete { grid-area: entete; padding: 0 16px; }
  .vue, body:not(.sur-fil) .vue { grid-area: vue; padding-bottom: 0; }
  .tiroir { grid-area: tiroir; position: static; height: auto !important; border-radius: 0; border: 0; border-left: 1px solid var(--bord-l); box-shadow: none; transition: none; }
  .t-barre { height: 72px; touch-action: auto; }
  .t-corps { padding: 0 16px 24px; }
  .scrim-t { display: none; }
  .panneau { flex: 0 0 320px; } .panneau.vide { flex-basis: 300px; }
  .focus-wrap .panneau { flex: 0 1 560px; margin: 0 auto; } .focus-wrap { justify-content: center; }
  .bord { position: static; flex: 0 0 48px; width: 48px; background: var(--surf2) !important; border: 1px solid var(--bord); border-radius: 8px; opacity: .8; margin-bottom: 0; }
  .focus-wrap { padding: 0 16px 8px; } .focus-wrap .panneau { margin: 0 8px; }
  .colonnes .panneau.col { flex: 0 0 300px; } .carrousel { padding-left: 16px; } .reperes, .vues, .barre-outils { padding-left: 16px; }
  .heures-e { max-width: 860px; } .familles { grid-template-columns: 1fr 1fr; }
  .fil-liste, .composer { padding-left: 24px; padding-right: 24px; } .composer { max-width: none; }
  .feuille, .panneau-g, .cote { left: auto; right: 0; top: 0; bottom: 0; width: 360px; max-height: none; height: auto; border-radius: 0; border-top: 0; border-bottom: 0; border-right: 0; }
  .panneau-g { width: 460px; }
  .scrim { background: rgba(0,0,0,.35); }
  #toasts { bottom: 24px; right: 380px; left: 24px; align-items: flex-start; }
  .btn.arret { bottom: 24px; }
  .dictee { left: 100px; margin: 0; }
  .modules-pc .module { margin-top: 12px; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .panneau { flex-basis: 52%; } .focus-wrap .panneau { flex-basis: auto; }
  .tiroir.ouvert { max-width: 640px; left: 50%; right: auto; width: 100%; transform: translateX(-50%); }
  .dlg, .feuille, .panneau-g { max-width: 640px; margin-left: auto; margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; scroll-behavior: auto !important; }
}
