:root {
  --navy: #2a4f94; --navy-2: #3464ac; --ink: #1b2330; --muted: #5d6b7e; --line: #dde3ea; --bg: #f4f6f9; --card: #ffffff;
  --accent: #b5832a; --accent-soft: #fbf3e2; --ok: #1f7a4d; --ok-soft: #e4f4ec; --warn: #9a5b00; --warn-soft: #fff1d6;
  --danger: #b3261e; --danger-soft: #fde9e7; --info: #1f5fa8; --info-soft: #e5effa;
  --ac: #2563a8; --rem: #2e7d5b; --rpms: #7a4aa0;
  --radius: 10px; --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 2px 8px rgba(20, 30, 50, .05);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); }
body.noscroll { overflow: hidden; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; color: var(--navy); }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; } h4 { font-size: .95rem; margin-top: 1rem; }
a { color: var(--info); } code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
code { background: #eef1f5; padding: .1em .35em; border-radius: 4px; }
.code { font-weight: 600; color: var(--navy); background: #eaeff6; padding: .05em .4em; border-radius: 4px; white-space: nowrap; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .03em; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .center { text-align: center; } .prewrap { white-space: pre-wrap; }
p { margin: 0 0 .75rem; }
.boot { padding: 2rem; text-align: center; color: var(--muted); }
:focus-visible { outline: 3px solid #f2b84b; outline-offset: 2px; }

/* ---------- Boutons, champs ---------- */
.btn { font: inherit; font-weight: 600; font-size: .92rem; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 8px; padding: .5rem .9rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 40px; }
.btn:hover { background: #f1f4f8; } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; } .btn.primary:hover { background: var(--navy-2); }
.btn.danger { color: var(--danger); border-color: #e7b8b4; } .btn.danger:hover { background: var(--danger-soft); }
.btn.small { padding: .25rem .65rem; font-size: .84rem; min-height: 32px; } .btn.block { width: 100%; }
.icon-btn { border: 0; background: transparent; font-size: 1.25rem; cursor: pointer; color: inherit; width: 44px; height: 44px; border-radius: 8px; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); }
.linklike { border: 0; background: none; color: var(--info); text-decoration: underline; cursor: pointer; font: inherit; }
input, select, textarea { font: inherit; color: inherit; border: 1px solid #c5ceda; border-radius: 8px; padding: .5rem .65rem; background: #fff; min-height: 40px; max-width: 100%; }
textarea { width: 100%; resize: vertical; } input[type=checkbox] { min-height: 0; width: 18px; height: 18px; accent-color: var(--navy); flex: none; }
input:focus, select:focus, textarea:focus { border-color: var(--navy-2); outline: 2px solid rgba(44, 79, 124, .25); }
.field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .85rem; } .field input, .field select { width: 100%; }
.lbl { font-weight: 600; font-size: .9rem; } .hint { color: var(--muted); font-size: .82rem; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem .8rem; margin: 0 0 .85rem; } legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.check { display: inline-flex; gap: .45rem; align-items: center; font-size: .94rem; cursor: pointer; margin-right: .75rem; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem .5rem; } .checks.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.presets { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; } .row.wrap, .actions.wrap { flex-wrap: wrap; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; } .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; align-items: center; flex-wrap: wrap; }
.form-error { color: var(--danger); min-height: 1.2em; font-weight: 600; margin: 0 0 .5rem; }
details > summary { cursor: pointer; font-weight: 600; color: var(--navy); padding: .3rem 0; }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; background: #e9edf2; color: #3a4658; white-space: nowrap; letter-spacing: .01em; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); } .badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.muted { background: #eceff3; color: #6b7686; } .badge.soft { background: #f0f3f7; color: #46536a; font-weight: 600; }
.badge.mine { background: var(--accent); color: #fff; }
.scope { display: inline-flex; gap: .25rem; } .chip { font-size: .7rem; font-weight: 800; color: #fff; padding: .08rem .42rem; border-radius: 5px; }
.chip.p-ac { background: var(--ac); } .chip.p-rem { background: var(--rem); } .chip.p-rpms { background: var(--rpms); }

/* ---------- Connexion ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(160deg, #264c8c 0%, #3464ac 45%, #eef2f7 45%); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 14px; padding: 1.5rem 1.4rem 1.2rem; box-shadow: 0 10px 40px rgba(10, 20, 40, .25); }
.brand { display: flex; align-items: center; gap: .65rem; } .brand div { display: flex; flex-direction: column; line-height: 1.15; } .brand span:not(.logo) { font-size: .75rem; opacity: .8; }
.brand.big { margin-bottom: 1rem; flex-direction: column; align-items: flex-start; gap: .3rem; } .brand.big .logo-img { height: 110px; } .tagline { font-size: .85rem; color: var(--muted); }
.logo-img { height: 50px; width: auto; display: block; } .brand-txt strong { color: var(--navy); font-size: .98rem; } .brand-txt span { color: var(--muted); }
.logo { width: 38px; height: 38px; border-radius: 9px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: none; }
.brand.big .logo { background: var(--accent); }

/* ---------- Coque ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .6rem; background: #fff; color: var(--ink); border-bottom: 3px solid var(--navy-2); padding: .3rem .8rem; min-height: 60px; }
.topbar .menu { display: none; color: var(--navy); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; } .top-right .btn { background: #fff; color: var(--navy); border-color: #b9c8e3; }
.top-right .btn:hover { background: #eef3fb; }
.who { display: flex; flex-direction: column; text-align: right; font-size: .88rem; line-height: 1.15; color: var(--ink); } .who em { font-style: normal; font-size: .72rem; color: var(--muted); }
.year-sel { min-height: 34px; padding: .2rem .5rem; font-size: .85rem; }
.body { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 60px); }
#nav { background: #fff; border-right: 1px solid var(--line); padding: .75rem .5rem; position: sticky; top: 60px; align-self: start; height: calc(100vh - 60px); overflow-y: auto; }
#nav a { display: flex; align-items: center; gap: .65rem; padding: .6rem .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
#nav a:hover { background: #f1f4f8; } #nav a.on { background: var(--navy); color: #fff; } #nav .ic { width: 1.3em; text-align: center; opacity: .85; }
main#main { min-width: 0; padding: 1.25rem; max-width: 1180px; width: 100%; outline: none; }
.scrim { display: none; }
.page-head { margin-bottom: 1rem; } .page-head.split { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.page-head p { margin: 0; } section { margin-bottom: 1.6rem; } .sec-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; } .sec-head h2 { margin: 0; }
.count { color: var(--muted); font-size: .88rem; margin: 0 0 .5rem; }
.note-line { font-size: .84rem; color: var(--muted); margin-top: .75rem; } .empty { padding: 1.2rem; text-align: center; color: var(--muted); background: #fff; border: 1px dashed #c9d2de; border-radius: var(--radius); }

/* ---------- Cartes, listes ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card.inner { box-shadow: none; background: #fafbfd; } .card header { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: space-between; margin-bottom: .5rem; }
.card header h3 { margin: 0; } .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; } .cards .card { margin: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; } .grid3 .card { margin: 0; }
.list { display: flex; flex-direction: column; gap: .5rem; }
.item { display: grid; grid-template-columns: 58px 1fr auto; gap: .8rem; align-items: center; text-align: left; width: 100%; background: #fff; border: 1px solid var(--line); border-left: 4px solid #c3cddb; border-radius: var(--radius); padding: .6rem .8rem; cursor: pointer; font: inherit; color: inherit; text-decoration: none; }
.item:hover { border-color: #aab7c9; box-shadow: var(--shadow); } .item.mine { border-left-color: var(--accent); background: var(--accent-soft); } .item.cancelled { opacity: .6; } .item.link { grid-template-columns: 1fr auto; }
.item.conflict { cursor: default; border-left-color: var(--danger); grid-template-columns: 1fr; }
.dateblock { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; background: #eef2f7; border-radius: 8px; padding: .35rem 0; min-height: 56px; }
.dateblock .dow, .dateblock .mon { font-size: .7rem; text-transform: uppercase; color: var(--muted); font-weight: 700; } .dateblock .dnum { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.dateblock.nodate { background: var(--warn-soft); } .dateblock.nodate .dow { color: var(--warn); text-align: center; }
.item .ttl, .prow .ttl { font-weight: 650; color: var(--ink); } .item .sub { font-size: .8rem; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: .25rem .65rem; align-items: center; font-size: .82rem; color: var(--muted); margin-top: .15rem; }
.item .right { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; } .who { }
.item .right .who { font-size: .82rem; font-weight: 600; color: var(--navy); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1.4rem; }
.tile { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border-top: 4px solid #c3cddb; }
.tile .n { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--navy); } .tile .l { font-size: .85rem; color: var(--muted); }
.tile.attn { border-top-color: var(--info); } .tile.warn { border-top-color: #d9902b; } .tile.danger { border-top-color: var(--danger); } .tile.danger .n { color: var(--danger); } .tile.zero { opacity: .7; border-top-color: var(--ok); }
.counter header { align-items: baseline; } .goal { font-size: .82rem; color: var(--muted); font-weight: 600; }
.bars { display: grid; gap: .35rem; margin: .4rem 0 .75rem; } .bl { display: grid; grid-template-columns: 120px 1fr; gap: .5rem; align-items: center; font-size: .78rem; color: var(--muted); }
.bar { display: block; height: 9px; background: #e8edf3; border-radius: 99px; overflow: hidden; } .bar-fill { display: block; height: 100%; border-radius: 99px; background: var(--navy-2); }
.bar-fill.sched { background: var(--info); } .bar-fill.done { background: var(--ok); } .bar-fill.over { background: var(--accent); }
.crows { display: grid; gap: .1rem; font-size: .88rem; } .crow { display: flex; justify-content: space-between; gap: .5rem; padding: .22rem 0; border-bottom: 1px dashed #e4e9ef; } .crow:last-child { border: 0; }
.cval { font-weight: 650; text-align: right; } .cval em { font-style: normal; font-weight: 400; color: var(--muted); } .crow.gap { font-weight: 700; color: var(--navy); } .crow.gap.over { color: var(--warn); }
.card footer { margin-top: .6rem; font-size: .8rem; color: var(--muted); }
.stat { display: flex; flex-direction: column; gap: .2rem; } .stat strong { font-size: 1.6rem; color: var(--navy); } .stat .l { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; } th, td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; } th { background: #f3f6fa; color: var(--navy); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.num { text-align: right; } tr.off { opacity: .55; } tbody tr:last-child td { border-bottom: 0; }
.alert { padding: .7rem .9rem; border-radius: 8px; border: 1px solid; } .alert.danger { background: var(--danger-soft); border-color: #efb9b4; } .alert.warn { background: var(--warn-soft); border-color: #ecce93; }
.alert h3 { color: var(--danger); } .alert ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.note { background: var(--accent-soft); border: 1px solid #ecd9a8; padding: .7rem .9rem; border-radius: 8px; }
.secret { background: #f3f6fa; border: 1px dashed #9fb0c7; padding: .8rem 1rem; border-radius: 8px; margin: .6rem 0; line-height: 1.9; } .secret strong { font-size: 1.15rem; }
.person.off { opacity: .7; } .kvs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .5rem 1rem; margin: .5rem 0 1rem; } .kvs.compact { grid-template-columns: 1fr; gap: .2rem; }
.kv { margin: 0; } .kv dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; } .kv dd { margin: 0; font-weight: 500; }
.kvs.compact .kv { display: flex; gap: .6rem; } .kvs.compact dt { min-width: 130px; }
.fiche-head { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .8rem; } .comp { margin-bottom: .6rem; } .comp strong { color: var(--navy); }
.cands, .plines { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .5rem; } .cands li { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .75rem; background: #fafbfd; }
.plines li { padding: .3rem 0; border-bottom: 1px dashed #e4e9ef; font-size: .92rem; } .cands .row { margin-top: .4rem; }
.hist ul { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .88rem; }
.prop h3 { margin: 0; } .pblock header { margin-bottom: .3rem; } .prow { display: grid; grid-template-columns: auto 1fr auto; gap: .65rem; align-items: center; padding: .55rem 0; border-top: 1px solid #edf0f4; cursor: pointer; }
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 1.2rem; align-items: start; } .sticky { position: sticky; top: 72px; }

/* ---------- Filtres, onglets ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; background: #fff; border: 1px solid var(--line); padding: .6rem; border-radius: var(--radius); }
.filters input[type=search] { flex: 1 1 220px; } .filters select { flex: 0 1 auto; } .filters .inline { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; } .seg button { font: inherit; font-weight: 600; font-size: .9rem; border: 0; background: transparent; padding: .5rem .95rem; cursor: pointer; color: var(--navy); min-height: 40px; }
.seg button.on { background: var(--navy); color: #fff; } .export { margin-top: 1.2rem; justify-content: flex-start; }

/* ---------- Modules ---------- */
.module { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; } .module > summary { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .75rem 1rem; list-style: none; }
.module > summary::-webkit-details-marker { display: none; } .module > summary::before { content: "▸"; margin-right: .5rem; color: var(--muted); } .module[open] > summary::before { content: "▾"; }
.module > summary { display: flex; align-items: center; } .module .ttl { flex: 1 1 260px; } .module .sum { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--muted); font-weight: 500; }
.mod-body { padding: 0 1rem 1rem; } .module.archived { opacity: .7; } .subject h2 { margin: 1.2rem 0 .6rem; display: flex; align-items: center; gap: .5rem; }

/* ---------- Calendrier ---------- */
.cal-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; } .cal-head h2 { margin: 0; flex: 1; text-transform: capitalize; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-dow { background: #f3f6fa; text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: .35rem 0; text-transform: uppercase; }
.cal-cell { background: #fff; min-height: 96px; padding: .25rem .3rem; display: flex; flex-direction: column; gap: 2px; overflow: hidden; } .cal-cell.has { cursor: pointer; } .cal-cell.has:hover { background: #f6f9fd; } .cal-cell.out { background: #fafbfc; opacity: .6; }
.cal-cell.today .cal-n { background: var(--navy); color: #fff; border-radius: 99px; } .cal-n { font-size: .8rem; font-weight: 700; width: 22px; height: 22px; display: grid; place-items: center; }
.cal-chip { font-size: .7rem; font-weight: 700; color: #fff; padding: 1px 5px; border-radius: 4px; background: var(--navy-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.p-ac { background: var(--ac); } .cal-chip.p-rem { background: var(--rem); } .cal-chip.p-rpms { background: var(--rpms); } .cal-chip.p-rem.p-rpms { background: linear-gradient(90deg, var(--rem) 50%, var(--rpms) 50%); }
.cal-chip.p-ac.p-rem, .cal-chip.p-ac.p-rpms { background: linear-gradient(90deg, var(--ac) 50%, var(--rem) 50%); } .cal-chip.mine { box-shadow: 0 0 0 2px var(--accent); }
.cal-more { font-size: .7rem; color: var(--muted); font-weight: 700; }

/* ---------- Fenêtres ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 25, 40, .5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 3vh 1rem; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); } .modal.wide { max-width: 800px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .7rem .6rem .7rem 1.1rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; border-radius: 14px 14px 0 0; z-index: 1; } .modal-head h2 { margin: 0; font-size: 1.1rem; }
.modal-body { padding: 1rem 1.1rem 1.2rem; }
#toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 30px); background: #243246; color: #fff; padding: .7rem 1.1rem; border-radius: 10px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: min(92vw, 560px); box-shadow: 0 6px 24px rgba(0, 0, 0, .3); font-size: .93rem; }
#toast.show { opacity: 1; transform: translate(-50%, 0); } #toast.error { background: var(--danger); }

/* ---------- Téléphone ---------- */
@media (max-width: 900px) {
  .body { grid-template-columns: minmax(0, 1fr); } .topbar .menu { display: block; } .who { display: none; }
  #nav { position: fixed; z-index: 60; top: 60px; left: 0; width: 270px; max-width: 85vw; transform: translateX(-102%); transition: transform .2s; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
  body.menu-open #nav { transform: none; } body.menu-open .scrim { display: block; position: fixed; inset: 60px 0 0 0; background: rgba(0, 0, 0, .35); z-index: 50; }
  main#main { padding: .9rem; } .grid3, .tiles { grid-template-columns: 1fr 1fr; } .two-col { grid-template-columns: 1fr; } .sticky { position: static; }
}
@media (max-width: 640px) {
  .brand-txt strong { font-size: .85rem; } .logo-img { height: 42px; }
  h1 { font-size: 1.35rem; } .grid3 { grid-template-columns: 1fr; } .tiles { gap: .5rem; } .row2, .row3 { grid-template-columns: 1fr; }
  .item { grid-template-columns: 48px 1fr; } .item .right { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; } .item.link { grid-template-columns: 1fr; }
  .cal-cell { min-height: 56px; padding: 2px; } .cal-chip { font-size: 0; width: 8px; height: 8px; padding: 0; border-radius: 99px; display: inline-block; } .cal-cell { flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
  .cal-n { width: 100%; justify-content: start; } .cal-n { display: block; text-align: left; height: auto; } .cal-more { font-size: .65rem; }
  .bl { grid-template-columns: 96px 1fr; } .overlay { padding: 0; } .modal, .modal.wide { max-width: none; border-radius: 0; min-height: 100vh; } .modal-head { border-radius: 0; }
  .filters select, .filters input[type=date] { flex: 1 1 140px; } .actions { justify-content: stretch; } .actions .btn { flex: 1 1 auto; } .top-right .btn { padding: .25rem .5rem; }
  .prow { grid-template-columns: auto 1fr; } .prow > .btn, .prow > .badge { grid-column: 2; justify-self: start; } .kvs.compact dt { min-width: 100px; }
}
@media print { .topbar, #nav, .actions, .filters { display: none !important; } .body { display: block; } }

.view { min-width: 0; } .page-head.split > * { min-width: 0; } .seg { max-width: 100%; } .seg button { flex: 1 1 auto; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; } .grid1 { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 560px; } .grid2 .card, .grid1 .card { margin: 0; }
details.mod { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: .5rem; } details.mod > summary { cursor: pointer; padding: .7rem .9rem; min-height: 44px; } details.mod[open] > summary { border-bottom: 1px solid var(--line); } details.mod > .list, details.mod > .empty { padding: .5rem; }
@media (max-width: 760px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.chrono { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.4rem; max-width: 640px; } .chrono-main { font-size: 1.5rem; margin-bottom: .4rem; } .chrono-main span { font-size: 1rem; color: var(--muted); } .chrono-sub { color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.bloc { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--navy-2); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.1rem; } .bloc-head { margin-bottom: .6rem; } .bloc-head h2 { margin: .1rem 0 0; font-size: 1.15rem; } .bloc-n { font-size: .8rem; font-weight: 700; text-transform: uppercase; color: var(--navy-2); letter-spacing: .04em; }
.cps { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; } .cps > li { display: block; padding: .55rem .7rem; background: #f4f7fc; border-radius: 8px; } .cp-n { font-weight: 700; color: var(--navy-2); min-width: 3rem; }
.docs { display: grid; gap: 1rem; max-width: 760px; } .doc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; } .doc h2 { margin: 0 0 .2rem; font-size: 1.1rem; } .doc p { margin: 0; }
.class-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } .class-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; } .class-card h2 { margin: 0; font-size: 1.6rem; color: var(--navy-2); } .class-card .chrono { border: 0; padding: .6rem 0; margin: 0; } .class-card .actions { justify-content: flex-start; }
@media (max-width: 760px) { .class-cards { grid-template-columns: minmax(0, 1fr); } .doc { flex-direction: column; align-items: flex-start; } }

/* Fiches intervenants : lecture plus aérée */
.cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } .person { padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .6rem; } .person header { margin: 0; align-items: center; } .person header h3 { font-size: 1.2rem; margin: 0; }
.p-user { margin: -.2rem 0 0; color: var(--muted); font-size: .9rem; } .chips { display: flex; flex-wrap: wrap; gap: .35rem; } .tag { background: #e8eefa; color: var(--navy); border-radius: 99px; font-size: .82rem; font-weight: 600; padding: .2rem .7rem; }
.p-info { list-style: none; margin: .2rem 0 .4rem; padding: 0; display: grid; gap: .45rem; font-size: .95rem; } .p-info li { display: grid; grid-template-columns: 6.2rem 1fr; gap: .6rem; align-items: baseline; word-break: break-word; } .p-info li > span { color: var(--muted); font-size: .82rem; } .p-info em { color: var(--muted); font-style: normal; }
.person .actions { margin-top: auto; justify-content: flex-start; gap: .4rem; }
.addr { margin: .2rem 0 0; font-weight: 600; color: var(--navy); } .row.between { justify-content: space-between; align-items: center; } .sub-h { margin-top: 2rem; }
.cal-cell.cday { background: #eef4ff; } .cal-cell.cday .cal-n { color: var(--navy-2); } .cal-lab { font-size: .68rem; line-height: 1.15; color: var(--navy); font-weight: 600; }
.cal-cell.cday.today .cal-n { color: #fff; } .p-info li { grid-template-columns: 5.2rem minmax(0, 1fr); word-break: normal; overflow-wrap: anywhere; font-size: .9rem; }

/* Palette EDE : bleu, framboise, or */
:root { --fram: #c4235f; --fram-soft: #fbe7ef; --or: #c9962b; --or-soft: #fbf1d8; --blue-soft: #e6eefa; --ac: #3464ac; --rem: #c4235f; --rpms: #c9962b; --accent: #c9962b; }
.topbar { border-bottom: 0; position: sticky; } .topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--navy-2) 0 55%, var(--fram) 55% 80%, var(--or) 80% 100%); }
#nav a.on { box-shadow: inset 4px 0 0 var(--fram); } #nav a:hover { background: var(--fram-soft); } #nav a.on:hover { background: var(--navy); }
#nav a[data-k="ac"] .ic { color: var(--navy-2); } #nav a[data-k="rem"] .ic { color: var(--fram); } #nav a[data-k="rpms"] .ic { color: var(--or); } #nav a:nth-child(5) .ic, #nav a:nth-child(6) .ic { color: var(--fram); } #nav a.on .ic { color: #fff; }
.btn.primary:hover { background: var(--fram); border-color: var(--fram); }
.k-ac { --c: var(--navy-2); --cs: var(--blue-soft); } .k-rem { --c: var(--fram); --cs: var(--fram-soft); } .k-rpms { --c: var(--or); --cs: var(--or-soft); }
.k-r { --c: var(--fram); --cs: linear-gradient(90deg, var(--fram-soft), var(--or-soft)); } .k-rac { --c: var(--or); --cs: linear-gradient(90deg, var(--blue-soft), var(--fram-soft), var(--or-soft)); }
.k-ac h1, .k-rem h1, .k-rpms h1, .k-r h1, .k-rac h1 { color: var(--c); }
.bloc { border-left-color: var(--c, var(--navy-2)); } .bloc-n { color: var(--c, var(--navy-2)); } .cps > li { background: var(--cs, #f4f7fc); } .cp-n { color: var(--c, var(--navy-2)); }
.chrono { border-top: 4px solid var(--c, var(--navy-2)); } .chrono .bar-fill { background: var(--c, var(--navy-2)); }
.class-card { border-top: 5px solid var(--c); } .class-card h2 { color: var(--c); } .class-card .btn.primary { background: var(--c); border-color: var(--c); } .class-card .chrono { border-top: 0; }
.cal-cell.cday { background: var(--cs, #eef4ff); } .cal-cell.cday .cal-n { color: var(--c, var(--navy-2)); } .cal-lab { color: var(--c, var(--navy)); } .cal-cell.today .cal-n { background: var(--c, var(--navy)); color: #fff; }
.cal-chip { background: var(--c, var(--navy-2)); } .cal-dow { background: var(--cs, #f3f6fa); }
.tag { background: var(--blue-soft); color: var(--navy); } .tag:nth-child(3n+2) { background: var(--fram-soft); color: #8e1a45; } .tag:nth-child(3n) { background: var(--or-soft); color: #7a5a10; }
.person { border-top: 4px solid var(--navy-2); } .person:nth-child(3n+2) { border-top-color: var(--fram); } .person:nth-child(3n) { border-top-color: var(--or); }
.doc { border-left: 5px solid var(--fram); } .docs .doc:nth-child(2) { border-left-color: var(--or); } .docs .doc:nth-child(3) { border-left-color: var(--navy-2); }
.page-head h1::after { content: ""; display: block; width: 48px; height: 4px; border-radius: 2px; margin-top: .3rem; background: linear-gradient(90deg, var(--fram) 0 50%, var(--or) 50%); }
.k-rpms .btn.primary { color: #2f2200; } .k-rpms .cal-chip { color: #2f2200; }

.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; background: #e2eefa; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--navy-2); } .avatar.ph { display: grid; place-items: center; font-weight: 700; color: var(--navy); }
.person:nth-child(3n+2) .avatar { box-shadow: 0 0 0 2px var(--fram); } .person:nth-child(3n) .avatar { box-shadow: 0 0 0 2px var(--or); }
.person header { display: flex; flex-wrap: wrap; gap: .5rem .8rem; } .person header h3 { flex: 1 1 8rem; } .person header .badge { flex-basis: 100%; width: fit-content; }
.common { margin-top: 1.6rem; } .common h2 { color: var(--c, var(--navy)); }
.cp-line { display: flex; gap: .7rem; align-items: baseline; } .cp-t { flex: 1; } .cp-h { font-weight: 700; color: var(--c, var(--navy-2)); white-space: nowrap; }
.hlines { list-style: none; margin: .5rem 0 .4rem 3.7rem; padding: 0; display: grid; gap: .3rem; }
.hlines li { display: flex; gap: .6rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .3rem .6rem; }
.hl-t { flex: 1; } .hl-h { font-weight: 600; white-space: nowrap; }
.btn.ghost { background: transparent; border-style: dashed; margin-left: 3.7rem; }
@media (max-width: 640px) { .hlines, .btn.ghost { margin-left: 0; } .hlines li { flex-wrap: wrap; } }
.chip.p-rac { background: linear-gradient(90deg, var(--ac) 33%, var(--rem) 33% 66%, var(--rpms) 66%); } .chip.p-r { background: linear-gradient(90deg, var(--rem) 50%, var(--rpms) 50%); }
.picker { display: grid; gap: .6rem; } .picker-grp { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .3rem .8rem; } .picker-grp strong { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }
.hl-code { font-family: ui-monospace, monospace; font-size: .8rem; background: #eef2fa; border-radius: 6px; padding: .1rem .45rem; color: var(--navy-2); white-space: nowrap; }
.wk-n { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--fram); color: #fff; font-size: .95rem; margin-right: .55rem; }
.rncp { margin: .1rem 0 .4rem; font-size: .9rem; } .chip.eval { background: var(--or, #b8963e); color: #fff; } section.eval { background: #fbf6e9; border: 1px solid #e8d9a8; border-radius: var(--radius); padding: .6rem 1rem; margin: 1rem 0; }
.picker label.check { display: flex; align-items: center; gap: .5rem; min-width: 0; margin: 0; } .picker input[type=checkbox] { width: 1.15rem; height: 1.15rem; flex: none; margin: 0; }
.month-nav { display: flex; align-items: center; gap: .8rem; margin: .2rem 0 1rem; font-size: 1.1rem; text-transform: capitalize; }
tr.total td { border-top: 2px solid var(--line); } .bill-det { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .9rem; margin-top: .6rem; } .bill-det summary { cursor: pointer; font-weight: 600; }
.bill-list { list-style: none; padding: 0; margin: .6rem 0 .2rem; display: grid; gap: .35rem; } .bill-list li { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; border-bottom: 1px dashed #e4e9ef; padding-bottom: .3rem; } .bl-t { flex: 1; min-width: 12rem; } .bl-h { font-weight: 600; } .bl-h em { font-weight: 400; color: var(--muted); }
.actuals { margin: 1rem 0; } .actual-row { display: grid; grid-template-columns: 11rem 9rem 1fr auto; gap: .5rem; align-items: center; margin-bottom: .4rem; } @media (max-width: 700px) { .actual-row { grid-template-columns: 1fr; } }
.bill-h2{margin:1.6rem 0 .6rem;font-size:1.1rem}.bill-year th,.bill-year td{white-space:nowrap}

.hl-who{color:var(--muted);font-size:.9em}.hl-s{margin-left:.5rem;border:1px solid var(--line);background:#fff;border-radius:999px;padding:.1rem .6rem;font-size:.82rem;cursor:pointer;color:var(--blue,#2a4d9b)}.hl-s.st-realise{background:#e6f4ea;border-color:#b9dcc3;color:#1f6b3a}

.hl-s.st-programme{background:#fdeceb;border-color:#f3c3c0;color:#b3261e}.hl-done{display:inline-flex;align-items:center;gap:.3rem;font-size:.85rem;color:var(--muted);white-space:nowrap}.hl-done input{width:1.1rem;height:1.1rem}

.hl-s.st-none{background:#f0f3f7;border-color:#d7dde6;color:#5b6677}

.bl-in{width:4.2rem;text-align:right}.bl-note{min-width:14rem;font-size:.85rem}.bl-edit{display:flex;flex-wrap:wrap;gap:.3rem;align-items:center;font-weight:400}
.nda-inline{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.nda-num{max-width:14rem}
.hlines li{flex-wrap:wrap}.hl-slots{flex-basis:100%;display:grid;gap:.3rem;padding:.2rem 0 .1rem 1rem;border-top:1px dashed var(--line)}.hl-slot{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}.hl-sn{color:var(--muted);font-size:.85rem;min-width:8rem}
.chip.cp-tag{background:#eaf0fb;color:#2a4d9b;border:1px solid #c9d7f2;font-weight:600;border-radius:999px;padding:.05rem .55rem;font-size:.82rem}
.hl-who{color:var(--muted);font-size:.8rem;margin-left:.5rem;font-weight:400}
.chk{margin:1.2rem 0}.chk h2{font-size:1.05rem;display:flex;gap:.5rem;align-items:center}.chk-list{list-style:none;padding:0;display:grid;gap:.6rem}
.chk-item{border:1px solid var(--line);border-left:4px solid var(--gold,#c9a227);border-radius:8px;padding:.6rem .8rem;background:#fff}.chk-item.error{border-left-color:#b4234a}
.chk-seances{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.4rem}.chk-s{border:1px solid var(--line);background:#f7f8fc;border-radius:6px;padding:.3rem .5rem;cursor:pointer;font:inherit;text-align:left}

.hl-slots{display:flex!important;flex-wrap:wrap;gap:.3rem .6rem!important;padding:.15rem 0 0 0!important;border-top:0!important}.hl-slot{gap:.25rem!important;font-size:.78rem}.hl-slot .hl-s{font-size:.75rem;padding:.1rem .5rem}.hl-sn{min-width:0!important;font-size:.75rem!important}
.nav-badge{margin-left:auto;background:#d62839;color:#fff;border-radius:999px;min-width:1.25rem;height:1.25rem;padding:0 .35rem;font-size:.75rem;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
#nav a{display:flex;align-items:center}
.chk-date{display:flex;gap:.6rem;align-items:center;margin:.4rem 0}.chk-cols{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.chk-col h3{margin:.2rem 0;font-size:.95rem;color:var(--muted)}.chk-s.block{display:block;width:100%;margin-bottom:.4rem}
@media (max-width:700px){.chk-cols{grid-template-columns:1fr}}
.chk-cols3{display:grid;grid-template-columns:repeat(3,1fr);gap:.8rem}.chk-card{border:1px solid var(--line);border-radius:8px;background:#fff;padding:.6rem .8rem}.chk-card h3{margin:.1rem 0 .3rem}.chk-card p{margin:.2rem 0}.chk-dates{list-style:none;padding:0;display:grid;gap:.25rem;max-height:14rem;overflow:auto}
@media (max-width:800px){.chk-cols3{grid-template-columns:1fr}}
.grp-head td { padding-bottom: 2px; border-bottom: 0; }
.grp-sub td { padding-top: 2px; padding-bottom: 2px; }
.grp-sub .sub-name { padding-left: 1.6rem; color: var(--muted, #666); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; }
.next-box { border: 2px solid var(--gold, #c9a227); border-radius: 8px; padding: .6rem; margin-bottom: 1rem; }
.chk-hours table { width: 100%; margin: .4rem 0 1rem; }
.chk-hours td.num { text-align: right; white-space: nowrap; }
.chk-hours .grp td { padding-top: .5rem; }
.cal-ferie { display: block; font-size: .65rem; font-weight: 700; color: #8a5a00; background: #fdf0c8; border-radius: 3px; padding: 0 3px; margin: 1px 0; width: fit-content; }
.pct-sec { margin-top: 2rem; }
.pct-list { list-style: none; padding: 0; margin: .5rem 0; }
.pct { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem .2rem; border-bottom: 1px solid var(--line, #e3e6ee); flex-wrap: wrap; }
.pct.off { opacity: .55; }
.pct-a { display: flex; gap: .4rem; }
