:root {
  --ink: #12302d;
  --ink-2: #4b6360;
  --muted: #7d908d;
  --bg: #f5f2ea;
  --card: #ffffff;
  --line: #e4dfd2;
  --brand: #1f8a70;
  --brand-d: #146452;
  --brand-l: #dff1ea;
  --deep: #0f2f2c;
  --cours: #1f8a70;
  --stage: #d58a14;
  --examen: #6757d1;
  --autre: #6d7d7a;
  --danger: #d2463f;
  --danger-l: #fbe6e4;
  --warn-l: #fdf0d5;
  --ok-l: #dff1ea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18,48,45,.06), 0 8px 24px -12px rgba(18,48,45,.18);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-d); }
.hidden { display: none !important; }

/* ---------- boutons & champs ---------- */
.btn { border: 1px solid var(--line); background: #fff; padding: .5rem .9rem; border-radius: 10px; font-weight: 600; font-size: .9rem; transition: .15s; display: inline-flex; align-items: center; gap: .4rem; }
.btn:hover { border-color: var(--brand); color: var(--brand-d); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-d); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-l); }
.btn.sm { padding: .3rem .6rem; font-size: .8rem; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.field { display: grid; gap: .3rem; margin-bottom: .8rem; }
.field > span { font-size: .78rem; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select, .field textarea { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: .6rem .75rem; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand-l); border-color: var(--brand); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.check { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; font-size: .9rem; }
.error { color: var(--danger); font-size: .88rem; min-height: 1.2em; margin: .2rem 0 .6rem; }

/* ---------- connexion ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 10% 0%, #1b6b5b 0%, var(--deep) 60%); color: #e9f5f1; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.login-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.login-art > * { position: relative; }
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 700; letter-spacing: .02em; }
.brand i { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; }
.login-art h1 { font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1.08; max-width: 14ch; }
.login-art p { max-width: 38ch; color: #b9d6cf; margin: 1rem 0 0; }
.login-pane { display: grid; place-items: center; padding: 2rem; }
.login-card { width: min(380px, 100%); }
.login-card h2 { font-size: 1.8rem; margin-bottom: .3rem; }
.login-card .sub { color: var(--ink-2); margin: 0 0 1.6rem; }
.login-card .btn { width: 100%; justify-content: center; padding: .75rem; font-size: 1rem; }
.pw { position: relative; }
.pw button { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font-size: .8rem; padding: .3rem .5rem; }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; } .login-art { min-height: 200px; padding: 1.6rem; } .login-art p { display: none; } }

/* ---------- coque ---------- */
.topbar { background: var(--deep); color: #e9f5f1; position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: .7rem 1.2rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.topbar .brand { font-size: 1rem; }
.tabs { display: flex; gap: .2rem; flex: 1; flex-wrap: wrap; }
.tab { background: none; border: 0; color: #b9d6cf; padding: .55rem .95rem; border-radius: 10px; font-weight: 600; }
.tab:hover { color: #fff; background: rgba(255,255,255,.08); }
.tab.active { background: var(--brand); color: #fff; }
.userbox { display: flex; align-items: center; gap: .6rem; font-size: .88rem; }
.userbox .role { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; background: rgba(255,255,255,.12); padding: .15rem .5rem; border-radius: 99px; }
.userbox .btn { background: transparent; border-color: rgba(255,255,255,.25); color: #e9f5f1; }
.userbox .btn:hover { background: rgba(255,255,255,.1); color: #fff; }
main { max-width: 1180px; margin: 0 auto; padding: 1.6rem 1.2rem 4rem; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.page-head h2 { font-size: 1.7rem; }
.page-head .sub { color: var(--ink-2); font-size: .92rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.empty { padding: 2rem; text-align: center; color: var(--muted); }
.picker { display: flex; align-items: center; gap: .6rem; }
.picker select { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: .5rem .7rem; min-width: 220px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 99px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.badge.ok { background: var(--ok-l); color: var(--brand-d); }
.badge.ko { background: var(--danger-l); color: var(--danger); }
.badge.wait { background: var(--warn-l); color: #8a5a06; }
.badge.neutral { background: #eceae2; color: var(--ink-2); }

/* ---------- notes ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; margin-bottom: 1.4rem; }
.stat { padding: 1rem 1.1rem; }
.stat b { display: block; font-family: var(--serif); font-size: 2rem; line-height: 1.1; margin-top: .2rem; }
.stat small { color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; font-weight: 700; }
.block { margin-bottom: 1.2rem; overflow: hidden; }
.block-head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.2rem; background: linear-gradient(90deg, var(--brand-l), #fff 70%); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.block-head .code { font-family: var(--serif); font-weight: 700; color: var(--brand-d); font-size: 1.1rem; }
.block-head h3 { flex: 1; font-size: 1.02rem; min-width: 200px; }
.module { padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); }
.module:last-child { border-bottom: 0; }
.module-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.chip { font-weight: 700; font-size: .75rem; background: #eef4f2; color: var(--ink-2); padding: .15rem .5rem; border-radius: 6px; }
.module-head .t { flex: 1; font-weight: 600; min-width: 180px; }
.avg { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; min-width: 3.2rem; text-align: right; }
.avg.low { color: var(--danger); }
table.grades { width: 100%; border-collapse: collapse; margin-top: .6rem; font-size: .9rem; }
table.grades td { padding: .35rem .4rem; border-top: 1px dashed var(--line); }
table.grades td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sel-status { border: 1px solid var(--line); border-radius: 8px; padding: .25rem .4rem; font-size: .8rem; background: #fff; }

/* ---------- calendrier ---------- */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.cal-bar .title { font-family: var(--serif); font-size: 1.35rem; min-width: 12ch; text-transform: capitalize; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: .45rem .9rem; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.seg button.on { background: var(--deep); color: #fff; }
.spacer { flex: 1; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); margin-bottom: .8rem; }
.legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.t-cours { --c: var(--cours); } .t-stage { --c: var(--stage); } .t-examen { --c: var(--examen); } .t-autre { --c: var(--autre); }
.ev { background: color-mix(in srgb, var(--c, var(--autre)) 14%, white); border-left: 3px solid var(--c, var(--autre)); color: var(--ink); border-radius: 6px; padding: .12rem .4rem; font-size: .76rem; text-align: left; border-top: 0; border-right: 0; border-bottom: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ev:hover { background: color-mix(in srgb, var(--c, var(--autre)) 26%, white); }
.ev.abs { --c: var(--danger) !important; background: repeating-linear-gradient(135deg, #fbe6e4, #fbe6e4 6px, #fff3f2 6px, #fff3f2 12px); }
.month { display: grid; grid-template-columns: repeat(7, 1fr); overflow: hidden; }
.month .dow { padding: .55rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--ink-2); background: #faf8f2; border-bottom: 1px solid var(--line); text-align: center; }
.cell { min-height: 112px; padding: .3rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; cursor: default; }
.cell:nth-child(7n+14) { border-right: 0; }
.cell.out { background: #faf8f2; color: var(--muted); }
.cell .d { font-size: .8rem; font-weight: 700; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; }
.cell.today .d { background: var(--brand); color: #fff; }
.cell .more { font-size: .72rem; color: var(--muted); padding-left: .3rem; }
.cell.can-add:hover { background: #f4faf7; cursor: pointer; }
.week { display: grid; grid-template-columns: 54px repeat(7, 1fr); overflow: hidden; }
.week .head { padding: .5rem .3rem; text-align: center; font-size: .78rem; border-bottom: 1px solid var(--line); background: #faf8f2; }
.week .head b { display: block; font-family: var(--serif); font-size: 1.15rem; }
.week .head.today b { color: var(--brand); }
.week .allday { padding: 3px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-height: 28px; }
.week .gutter { position: relative; }
.week .gutter span { position: absolute; right: 6px; font-size: .68rem; color: var(--muted); transform: translateY(-50%); }
.week .gutter span:first-child { transform: none; top: 2px !important; }
.week .gutter span:last-child { transform: translateY(-100%); }
.week .col { position: relative; border-left: 1px solid var(--line); }
.week .col .hr { position: absolute; left: 0; right: 0; border-top: 1px solid #efece3; }
.week .col .ev { position: absolute; white-space: normal; padding: .2rem .35rem; }
.week .col .ev small { display: block; opacity: .7; }
.year { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.mini { padding: .8rem; cursor: pointer; transition: .15s; }
.mini:hover { border-color: var(--brand); transform: translateY(-1px); }
.mini h4 { margin: 0 0 .4rem; font-family: var(--serif); text-transform: capitalize; }
.mini .g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-size: .68rem; text-align: center; }
.mini .g span { padding: .18rem 0; border-radius: 5px; position: relative; color: var(--ink-2); }
.mini .g .dw { color: var(--muted); font-weight: 700; }
.mini .g .has { background: color-mix(in srgb, var(--c) 22%, white); color: var(--ink); font-weight: 700; }
.mini .g .has.t-cours { --c: var(--cours); } .mini .g .has.t-stage { --c: var(--stage); } .mini .g .has.t-examen { --c: var(--examen); }
.mini .g .absd { box-shadow: inset 0 -3px 0 var(--danger); }
.mini .g .tod { outline: 2px solid var(--brand); }

/* ---------- absences ---------- */
.abs-wrap { margin-top: 1.6rem; }
.abs-stats { display: flex; gap: .8rem; flex-wrap: wrap; margin: .8rem 0 1rem; }
.abs-stats .pill { padding: .6rem 1rem; }
.abs-stats .pill b { font-family: var(--serif); font-size: 1.4rem; margin-right: .3rem; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); padding: .7rem 1rem; background: #faf8f2; border-bottom: 1px solid var(--line); }
table.list td { padding: .65rem 1rem; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }

/* ---------- cours ---------- */
details.mod { border-bottom: 1px solid var(--line); }
details.mod:last-child { border-bottom: 0; }
details.mod > summary { list-style: none; cursor: pointer; padding: .85rem 1.2rem; display: flex; align-items: center; gap: .7rem; }
details.mod > summary::-webkit-details-marker { display: none; }
details.mod > summary::before { content: "›"; font-size: 1.3rem; color: var(--brand); transition: .15s; width: 1ch; }
details.mod[open] > summary::before { transform: rotate(90deg); }
details.mod > summary .t { flex: 1; font-weight: 600; }
.res { display: flex; align-items: center; gap: .8rem; padding: .55rem 1.2rem .55rem 2.6rem; border-top: 1px dashed var(--line); }
.res .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-l); color: var(--brand-d); display: grid; place-items: center; font-size: .72rem; font-weight: 800; flex: none; }
.res .nm { flex: 1; min-width: 0; }
.res .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res .nm small { color: var(--muted); }
.mod-tools { padding: .5rem 1.2rem .9rem 2.6rem; display: flex; gap: .5rem; }

/* ---------- modale & toasts ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15,47,44,.45); backdrop-filter: blur(3px); z-index: 50; display: grid; place-items: center; padding: 1rem; animation: fade .15s; }
.modal { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 18px; padding: 1.4rem 1.5rem; box-shadow: 0 30px 80px -20px rgba(0,0,0,.4); animation: pop .18s; }
.modal h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.modal .actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .6rem; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: .35rem .8rem; font-size: .92rem; margin-bottom: 1rem; }
.kv dt { color: var(--ink-2); font-weight: 600; }
.kv dd { margin: 0; }
#toasts { position: fixed; bottom: 1rem; right: 1rem; display: grid; gap: .5rem; z-index: 80; }
.toast { background: var(--deep); color: #fff; padding: .7rem 1rem; border-radius: 10px; box-shadow: var(--shadow); animation: pop .2s; max-width: 340px; }
.toast.err { background: var(--danger); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

@media (max-width: 720px) {
  .cell { min-height: 78px; }
  .cell .ev { font-size: .62rem; padding: .05rem .25rem; }
  .week { font-size: .8rem; }
  main { padding: 1rem .7rem 3rem; }
  .userbox .nm { display: none; }
}

/* ---------- conformité, export, administration ---------- */
.subnav { margin-bottom: 1.2rem; overflow-x: auto; }
.bar { height: 8px; border-radius: 99px; background: #eceae2; overflow: hidden; margin-top: .5rem; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar.wait i { background: var(--stage); } .bar.ko i { background: var(--danger); }
.franchise { padding: .9rem 1.1rem; margin: .8rem 0 1rem; display: grid; gap: .1rem; }
.franchise small { color: var(--ink-2); }
.hint { background: var(--warn-l); color: #6b4a06; border-radius: 10px; padding: .6rem .8rem; font-size: .85rem; margin-bottom: .8rem; }
.footer { max-width: 1180px; margin: 0 auto; padding: 0 1.2rem 2rem; font-size: .8rem; color: var(--muted); }
.modal.wide { width: min(820px, 100%); }
.modal .scroll { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.tag { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; background: #eef4f2; padding: .1rem .4rem; border-radius: 5px; }
.form-grid { padding: 1rem 1.2rem; }
.form-grid h4 { margin: 1rem 0 .5rem; font-family: var(--serif); font-size: 1.05rem; }
.form-grid h4:first-child { margin-top: 0; }
.checklist { display: grid; gap: .3rem; margin-bottom: .8rem; max-height: 40vh; overflow: auto; }
.checklist label { display: flex; align-items: center; gap: .6rem; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 8px; }
.checklist label.locked { opacity: .6; }
.login-card .legal { margin-top: 1.2rem; font-size: .82rem; text-align: center; color: var(--ink-2); }
.row-actions { display: flex; gap: .3rem; justify-content: flex-end; flex-wrap: wrap; }
.over { color: var(--danger); font-weight: 700; }

/* formations multiples */
.oblig { padding: .8rem 1.1rem; margin-bottom: 1rem; }
.oblig summary { cursor: pointer; }
.oblig ul, .oblig-list { margin: .6rem 0 .4rem 1.1rem; padding: 0; }
.oblig li, .oblig-list li { margin: .2rem 0; }
.oblig-list { margin-top: .8rem; }

/* barres de filtres */
.filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; margin: 0 0 1rem; }
.module .filters { margin: 0; }
.fsel { display: flex; flex-direction: column; gap: .25rem; min-width: 11rem; }
.fsel span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #4b6360); font-weight: 600; }
.fsel select { padding: .5rem .7rem; border: 1px solid var(--line, #e4dfd2); border-radius: 10px; background: #fff; font: inherit; color: inherit; }
@media (max-width: 600px) { .fsel { flex: 1 1 100%; } }

/* Solv'Campus : menu des outils */
.brand-wrap { position: relative; }
.brand .tool { margin-left: .55rem; padding: .12rem .55rem; border-radius: 999px; background: rgba(255,255,255,.14); font-size: .72rem; font-weight: 600; letter-spacing: .02em; }
.brand-btn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; display: flex; align-items: center; gap: .55rem; padding: .3rem .5rem; border-radius: 12px; }
.brand-btn:hover, .brand-btn[aria-expanded="true"] { background: rgba(255,255,255,.1); }
.brand-btn .chev { opacity: .75; margin-left: .15rem; }
.appmenu { position: absolute; left: 0; top: calc(100% + .5rem); z-index: 60; width: min(380px, 92vw); background: #fff; color: var(--ink, #12302d); border: 1px solid var(--line, #e4dfd2); border-radius: 16px; box-shadow: 0 18px 50px rgba(15,47,44,.22); padding: .5rem; max-height: calc(100vh - 5rem); max-height: calc(100dvh - 5rem); overflow-y: auto; }
.appmenu[hidden] { display: none; }
.appmenu-h { padding: .5rem .7rem .4rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #4b6360; font-weight: 700; }
.appitem { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .8rem; text-align: left; background: none; border: 0; padding: .6rem .7rem; border-radius: 12px; font: inherit; color: inherit; cursor: pointer; }
.appitem:hover:not(:disabled) { background: #eef6f3; }
.appitem:disabled { cursor: default; opacity: .62; }
.appitem.active { background: #e3f1ec; }
.appitem .t { display: flex; flex-direction: column; min-width: 0; }
.appitem small { color: #4b6360; font-size: .76rem; line-height: 1.3; }
.appitem.manage { justify-content: center; margin-top: .3rem; border-top: 1px solid var(--line, #e4dfd2); border-radius: 0 0 12px 12px; color: #146452; font-weight: 600; font-size: .85rem; }

/* Solv'Émargement */
.ecards { display: grid; gap: .6rem; }
.ecard { display: grid; grid-template-columns: 7rem 1fr auto auto; gap: .8rem; align-items: center; text-align: left; background: #fff; border: 1px solid var(--line, #e4dfd2); border-radius: 14px; padding: .8rem 1rem; font: inherit; color: inherit; cursor: pointer; }
.ecard:hover { border-color: #146452; }
.ecard .et { font-weight: 700; font-variant-numeric: tabular-nums; }
.ecard .en { display: flex; flex-direction: column; min-width: 0; } .ecard small { color: #4b6360; }
.ecard .ec { color: #4b6360; font-size: .85rem; white-space: nowrap; }
@media (max-width: 640px) { .ecard { grid-template-columns: 1fr auto; } .ecard .et { grid-column: 1 / -1; } }
.esess { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 760px) { .esess { grid-template-columns: 1fr; } }
.qrbox { background: #fff; border: 1px solid var(--line, #e4dfd2); border-radius: 16px; padding: .6rem; aspect-ratio: 1; display: grid; place-items: center; }
.qrbox svg { width: 100%; height: 100%; display: block; }
.qrbox.off { text-align: center; color: #4b6360; padding: 1.2rem; align-content: center; gap: .3rem; }
.qrnote { text-align: center; margin: .6rem 0 0; font-size: .85rem; }
.elist ul { list-style: none; margin: .5rem 0 0; padding: 0; max-height: 52vh; overflow: auto; display: grid; gap: .35rem; }
.elist li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .45rem .6rem; border: 1px solid var(--line, #e4dfd2); border-radius: 10px; }
.elist li.is-in { background: #eef6f3; }
.elist .ename { flex: 1 1 8rem; font-weight: 600; }
.sigimg { height: 34px; background: #fff; border: 1px solid var(--line, #e4dfd2); border-radius: 6px; }
.sigpad { width: 100%; max-width: 100%; height: auto; aspect-ratio: 640 / 260; background: #fff; border: 2px dashed #8aa6a0; border-radius: 12px; touch-action: none; display: block; }

.ehint { margin: .2rem 0 .3rem; font-size: .85rem; }
.elist .ename { display: flex; align-items: center; gap: .55rem; cursor: pointer; }
.elist .ename input { width: 1.2rem; height: 1.2rem; accent-color: #146452; }

/* Comptes et rôles */
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .8rem; padding: 0 1rem 1rem; }
.role { border: 1px solid var(--line, #e4dfd2); border-radius: 14px; padding: .9rem 1rem; background: #fff; display: flex; flex-direction: column; gap: .5rem; }
.role header { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.role p { margin: 0; font-size: .88rem; }
.role .chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.role .row-actions { margin-top: auto; }
.permgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .45rem; margin-top: .6rem; }
.perm { display: flex; gap: .55rem; align-items: flex-start; padding: .5rem .6rem; border: 1px solid var(--line, #e4dfd2); border-radius: 10px; cursor: pointer; }
.perm span { display: flex; flex-direction: column; } .perm small { color: #4b6360; font-size: .76rem; line-height: 1.25; }
.perm input { margin-top: .2rem; accent-color: #146452; }

/* Logo */
.brand .logo { height: 38px; width: auto; display: block; }
.login-art .brand .logo { height: 52px; }
.brand .logo { height: 44px; }
.login-art .brand .logo { height: 80px; }
.topbar-in { max-width: 1320px; gap: .8rem; }
.tabs { flex-wrap: nowrap; min-width: 0; }
.tab { white-space: nowrap; padding: .55rem .8rem; }
.userbox { flex-shrink: 0; }
@media (max-width: 1100px) { .userbox .nm { display: none; } }
@media (max-width: 900px) { .tabs { flex-wrap: wrap; } .topbar-in { flex-wrap: wrap; } }

/* Solv'Stage : page publique du tuteur */
.tutor { min-height: 100vh; background: var(--bg, #f5f2ea); }
.tutor header { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.2rem; background: #0f2f2c; color: #e9f5f1; }
.tutor header img { height: 40px; width: auto; filter: brightness(0) invert(1); }
.tutor header div { display: flex; flex-direction: column; } .tutor header small { opacity: .75; }
.tutor main { max-width: 760px; margin: 0 auto; padding: 1rem 16px 3rem; }
.tcard { padding: 1.2rem 1.4rem; }
.tcard h2 { margin-top: 0; }
.crit { border: 1px solid var(--line, #e4dfd2); border-radius: 12px; padding: .7rem .9rem .9rem; margin: .8rem 0; background: #fff; }
.crit legend { font-weight: 600; padding: 0 .3rem; }
.crit input[name^=cm] { width: 100%; margin-top: .5rem; }
.lvls { display: flex; flex-wrap: wrap; gap: .4rem; }
.lv input { position: absolute; opacity: 0; pointer-events: none; }
.lv span { display: inline-block; padding: .45rem .75rem; border: 1px solid #b8c9c4; border-radius: 99px; cursor: pointer; font-size: .86rem; background: #fff; }
.lv input:checked + span { background: #146452; color: #fff; border-color: #146452; }
.lv input:focus-visible + span { outline: 2px solid #3fbf9f; outline-offset: 2px; }
.btn.big { width: 100%; padding: .85rem; font-size: 1rem; margin-top: .6rem; }
.linkbox { width: 100%; padding: .6rem .7rem; font: inherit; font-size: .85rem; border: 1px solid var(--line, #e4dfd2); border-radius: 10px; background: #f7faf9; }

/* Solv'Docs */
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .35rem .9rem; }
.chk { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; }
.chk input { width: auto; margin: 0; }
.card.note { padding: .8rem 1.2rem; margin-bottom: 1rem; background: #fbf6e6; border-color: #ead9a0; font-size: .9rem; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 2rem; }
code { background: #eef3f1; padding: .05rem .3rem; border-radius: 4px; font-size: .78rem; }

.stampbox img { display: block; max-width: 260px; max-height: 110px; border: 1px solid var(--line, #c9d3d0); border-radius: 6px; background: #fff; padding: 4px; margin-bottom: .7rem; }
.stampbox .row-actions { margin-bottom: .5rem; }

/* Annonces / Planning */
.ann.unread { border-left: 4px solid var(--brand, #1f8a70); }
.annbody { line-height: 1.55; }
.fsel input[type=date] { padding: .45rem .6rem; border: 1px solid var(--line, #c9d3d0); border-radius: 8px; font: inherit; }

/* Salles */
.roomgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.roomgrid .card.block { margin: 0; }
.slot { padding: .4rem .6rem; margin-bottom: .35rem; border-radius: 8px; background: #eef3f1; border-left: 3px solid var(--brand, #1f8a70); font-size: .9rem; }
.slot.resa { background: #fbf1da; border-left-color: #d9a21b; }

/* Vue visuelle des salles */
.legend { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--ink-2, #4b6360); }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-left: .6rem; }
.lg.cours { background: #1f8a70; } .lg.resa { background: #e0a82e; } .lg.free { background: #fff; border: 1px solid #c9d3d0; }
.sg { padding: .6rem 1rem 1rem; overflow-x: auto; }
.sg-row { display: grid; grid-template-columns: 150px minmax(640px, 1fr); align-items: stretch; gap: .6rem; margin-top: .45rem; }
.sg-name { display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
.sg-track { position: relative; height: 54px; background: #fff; border: 1px solid #d5ddd9; border-radius: 8px; cursor: copy; overflow: hidden; }
.sg-head .sg-track { height: 20px; background: none; border: 0; cursor: default; overflow: visible; }
.sg-head span { position: absolute; transform: translateX(-50%); font-size: .72rem; color: #7d908d; }
.sg-track u { position: absolute; top: 0; bottom: 0; width: 1px; background: #e6ece9; }
.sg-blk { position: absolute; top: 4px; bottom: 4px; padding: .2rem .45rem; border-radius: 6px; color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: center; cursor: default; font-size: .78rem; line-height: 1.15; }
.sg-blk b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-blk small { opacity: .85; font-size: .7rem; }
.sg-blk.cours { background: #1f8a70; } .sg-blk.resa { background: #e0a82e; color: #3b2a00; }
.sg-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #d6453d; }
.sg-blk.clash { outline: 2px solid #d6453d; outline-offset: -2px; }

/* Vue visuelle semaine / mois */
.seg { display: inline-flex; border: 1px solid var(--line, #c9d3d0); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: .4rem .8rem; font: inherit; cursor: pointer; }
.seg button.on { background: var(--brand, #1f8a70); color: #fff; }
.mx { display: grid; gap: 3px; min-width: 700px; align-items: stretch; }
.mx-h { text-align: center; font-size: .74rem; font-weight: 700; color: #4b6360; padding: .25rem 0; }
.mx-h.today { color: #d6453d; } .mx-h.off { opacity: .45; }
.mx-n { display: flex; flex-direction: column; justify-content: center; line-height: 1.2; padding-right: .4rem; }
.mx-c { min-height: 44px; border-radius: 6px; border: 1px solid #e1e8e5; background: rgba(31,138,112, calc(var(--p, 0) * .85)); color: #fff; font-size: .78rem; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.mx-c[style*="--p:0.00"] { background: #fff; }
.mx-c.hasresa { box-shadow: inset 0 -4px 0 #e0a82e; }
.mx-c small { font-weight: 400; font-size: .66rem; opacity: .9; }
.mx-c:hover, .mc-d:hover { outline: 2px solid #12302d; }
.wk { display: grid; gap: 0 4px; min-width: 840px; }
.wk-axis { position: relative; } .wk-axis span { position: absolute; right: 4px; transform: translateY(-50%); font-size: .7rem; color: #7d908d; }
.wk-col { position: relative; border: 1px solid #e1e8e5; border-radius: 6px; background: #fff; cursor: copy; overflow: hidden; }
.wk-col.today { background: #fffdf6; }
.wk-col u { position: absolute; left: 0; right: 0; height: 1px; background: #edf1ef; }
.wk-col .sg-blk { padding: .15rem .35rem; }
.mc { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); gap: 4px; min-width: 780px; }
.mc-d { min-height: 104px; border: 1px solid #e1e8e5; border-radius: 6px; background: #fff; padding: .25rem .3rem; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.mc-d.today { background: #fffdf6; border-color: #d6453d; } .mc-d.off { opacity: .45; }
.mc-n { font-size: .75rem; font-weight: 700; color: #4b6360; }
.mc-pill { font-size: .7rem; padding: .1rem .3rem; border-radius: 4px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.mc-pill.cours { background: #1f8a70; } .mc-pill.resa { background: #e0a82e; color: #3b2a00; }

/* Qualité */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; margin: 1rem 0; }
.kpi { background: #fff; border: 1px solid var(--line, #d5ddd9); border-radius: 12px; padding: .8rem 1rem; display: flex; flex-direction: column; gap: .15rem; border-left: 5px solid #c9d3d0; }
.kpi small { color: #4b6360; font-weight: 600; } .kpi b { font-size: 1.55rem; color: #12302d; } .kpi span { font-size: .78rem; color: #7d908d; }
.kpi.good { border-left-color: #1f8a70; } .kpi.mid { border-left-color: #e0a82e; } .kpi.low { border-left-color: #d6453d; }
.qbars > div { display: grid; grid-template-columns: 1.2rem 1fr 2rem; align-items: center; gap: .4rem; font-size: .8rem; }
.qbars i { display: block; height: 10px; background: #1f8a70; border-radius: 5px; min-width: 2px; } .qbars em { font-style: normal; color: #7d908d; }
.qq { border: 1px solid #e1e8e5; border-radius: 10px; margin: .6rem 0; padding: .5rem .8rem .7rem; } .qq legend { font-weight: 600; padding: 0 .3rem; }

/* beaucoup d'onglets : ligne dédiée sous l'en-tête, défilement horizontal si besoin */
.tabs.tabs-many { order: 5; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: .1rem; }

/* Solv'Admission */
.adm-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.tutor .chk { display: flex; gap: .6rem; align-items: flex-start; margin: .9rem 0; line-height: 1.4; }

/* ---------- version téléphone ---------- */
.ic { display: none; }
.agenda { display: none; }
@media (max-width: 720px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  /* en-tête compact : logo + outil à gauche, compte à droite ; onglets en barre du bas */
  .topbar-in { padding: .5rem .8rem; gap: .5rem; flex-wrap: nowrap; justify-content: space-between; }
  .brand .logo { height: 34px; }
  .topbar .brand { font-size: .92rem; gap: .45rem; }
  .brand .tool { margin-left: .3rem; padding: .1rem .45rem; font-size: .66rem; }
  .brand-btn { padding: .25rem .3rem; }
  .brand-wrap { position: static; }
  .appmenu { left: .5rem; right: .5rem; width: auto; top: 3.4rem; position: fixed; }
  .userbox { gap: .35rem; }
  .userbox .role, .userbox .nm { display: none; }
  .userbox .btn { padding: 0; width: 40px; height: 40px; justify-content: center; border-radius: 12px; }
  .userbox .btn .lbl { display: none; }
  .userbox .btn .ic { display: block; }
  .tabs, .tabs.tabs-many { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; order: 0; flex: none; gap: 0; background: var(--deep); border-top: 1px solid rgba(255,255,255,.12); padding: .25rem .3rem calc(.25rem + env(safe-area-inset-bottom)); overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; box-shadow: 0 -8px 24px -12px rgba(0,0,0,.4); }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 1 0 auto; min-width: 4.6rem; padding: .65rem .6rem; font-size: .8rem; text-align: center; border-radius: 12px; min-height: 44px; }
  main { padding: 1rem .8rem calc(5.5rem + env(safe-area-inset-bottom)); }
  .footer { padding: 0 .8rem calc(5.5rem + env(safe-area-inset-bottom)); margin-top: -4rem; }
  h1, .page-head h1 { font-size: 1.55rem; }
  /* grilles et cartes */
  .stats { grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
  .stat { padding: .75rem .85rem; }
  .stat b { font-size: 1.5rem; }
  .stat small { font-size: .66rem; }
  .block-head { padding: .8rem .9rem; gap: .5rem; }
  .block-head h3 { min-width: 0; flex: 1 1 100%; font-size: .98rem; order: 3; }
  .module { padding: .75rem .9rem; }
  .module-head .t, .module-head { font-size: .92rem; }
  .avg { font-size: 1.05rem; }
  .module-head .t { min-width: 0; flex: 1 1 calc(100% - 7rem); }
  details.mod > summary { padding: .8rem .9rem; min-height: 48px; }
  .res { padding: .55rem .9rem .55rem 1.6rem; }
  .mod-tools { padding: .5rem .9rem .9rem 1.6rem; flex-wrap: wrap; }
  .row { grid-template-columns: 1fr; }
  /* boutons et champs adaptés au pouce, sans zoom automatique d'iOS */
  .btn { min-height: 42px; padding: .55rem .9rem; }
  .btn.sm { min-height: 36px; }
  input, select, textarea, .field input, .field select, .field textarea { font-size: 16px; }
  .field input, .field select, .field textarea { padding: .7rem .8rem; }
  .filters { gap: .5rem; }
  /* tableaux : défilement horizontal propre, première colonne lisible */
  .card:has(> table.list), .scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.list th, table.list td { padding: .55rem .7rem; white-space: nowrap; }
  table.list td:first-child { white-space: normal; min-width: 8rem; }
  /* fenêtres : feuille plein écran en bas */
  .overlay { padding: 0; place-items: end stretch; }
  .modal, .modal.wide { width: 100%; max-height: 94dvh; border-radius: 20px 20px 0 0; padding: 1.1rem 1rem calc(1.1rem + env(safe-area-inset-bottom)); animation: sheet .22s ease-out; }
  .modal .actions .btn { flex: 1 1 auto; justify-content: center; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dd { margin-bottom: .5rem; }
  #toasts { left: .8rem; right: .8rem; bottom: calc(4.8rem + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
  /* calendrier : points colorés + liste du mois */
  .cal-bar { gap: .4rem; }
  .cal-bar .title { flex: 1 1 100%; order: -1; font-size: 1.25rem; }
  .cal-bar .spacer { display: none; }
  .seg { flex: 1 1 100%; } .seg button { flex: 1; padding: .55rem .4rem; }
  .legend { gap: .6rem; font-size: .74rem; }
  .month .dow { padding: .4rem 0; font-size: .62rem; letter-spacing: 0; }
  .cell { min-height: 46px; padding: .2rem; flex-direction: row; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 3px; }
  .cell .d { flex: 1 1 100%; justify-self: center; margin: 0 auto; width: 1.6rem; height: 1.6rem; }
  .cell .ev { font-size: 0; width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--c, var(--autre)); flex: none; }
  .cell .ev.abs { background: var(--danger); }
  .cell .more { display: none; }
  .agenda { display: block; margin-top: .9rem; padding: .2rem .2rem .6rem; }
  .agenda h4 { font-family: var(--serif); font-size: 1.05rem; margin: .4rem .8rem; }
  .agempty { color: var(--muted); margin: .4rem .8rem; font-size: .9rem; }
  .ag { display: flex; width: 100%; gap: .8rem; align-items: center; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: .7rem .8rem; min-height: 56px; border-left: 4px solid var(--c, var(--autre)); }
  .ag.abs { --c: var(--danger); background: #fdf1f0; }
  .agd { display: flex; flex-direction: column; align-items: center; min-width: 2.6rem; font-size: .7rem; color: var(--ink-2); text-transform: uppercase; }
  .agd b { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); line-height: 1; }
  .agt { display: flex; flex-direction: column; min-width: 0; }
  .agt b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; }
  .agt small { color: var(--ink-2); font-size: .8rem; }
  .week, .year { min-width: 620px; }
  #calbody:has(.week), #calbody.year { overflow-x: auto; }
  .abs-stats .pill { padding: .5rem .8rem; flex: 1 1 calc(50% - .4rem); }
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 150px !important; padding: 1.2rem !important; }
  .login-art h2, .login-art h1 { font-size: 1.45rem; }
}
@media (max-width: 720px) {
  .tabs.tabs-one { display: none; }
  main { padding-bottom: 2rem; }
  .footer { margin-top: 0; padding-bottom: 2rem; }
  body:has(.tabs:not(.tabs-one)) main { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  body:has(.tabs:not(.tabs-one)) .footer { margin-top: -4rem; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  .filters .fsel { flex: 1 1 calc(50% - .5rem); min-width: 0; }
  .filters .fsel select { width: 100%; font-size: 16px; padding: .6rem .6rem; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: .6; } }

input.rate { width: 6rem; text-align: right; border: 1px solid var(--line); border-radius: 8px; padding: .3rem .4rem; background: #fff; }

/* dossier de preuves Qualiopi */
details.ind { border-bottom: 1px solid var(--line); }
details.ind:last-child { border-bottom: 0; }
details.ind > summary { list-style: none; cursor: pointer; padding: .8rem 1.2rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; min-height: 48px; }
details.ind > summary::-webkit-details-marker { display: none; }
details.ind > summary::before { content: "›"; font-size: 1.3rem; color: var(--brand); transition: .15s; width: 1ch; }
details.ind[open] > summary::before { transform: rotate(90deg); }
details.ind > summary .t { flex: 1 1 18rem; font-weight: 600; min-width: 0; }
.ind-body { padding: .2rem 1.2rem 1.2rem 2.6rem; }
.ind-body h4 { font-family: var(--serif); margin: .8rem 0 .3rem; font-size: 1rem; }
.plist { margin: 0 0 .6rem; padding-left: 1.1rem; display: grid; gap: .4rem; }
.plist li { line-height: 1.4; }
@media (max-width: 720px) { details.ind > summary { padding: .7rem .9rem; } .ind-body { padding: .2rem .9rem 1rem 1.2rem; } }

/* périmètre d'un intervenant */
.scope-block { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; margin: .5rem 0; }
.scope-mod { display: flex; flex-wrap: wrap; gap: .3rem .9rem; padding: .45rem 0; border-top: 1px solid var(--line); align-items: center; }
.scope-mod:first-of-type { border-top: 0; }
.scope-mod .mt { flex: 1 1 14rem; font-weight: 600; }
.ms { position: relative; flex: 0 1 17rem; min-width: 11rem; }
.ms > summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; padding: .55rem 2rem .55rem .8rem; background: #fff; min-height: 44px; display: flex; align-items: center; font-size: .92rem; position: relative; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ms > summary::-webkit-details-marker { display: none; }
.ms > summary::after { content: "▾"; position: absolute; right: .8rem; color: var(--brand); }
.ms[open] > summary { border-color: var(--brand); }
.ms-panel { position: absolute; z-index: 20; left: 0; right: 0; min-width: 14rem; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(15,47,44,.18); padding: .5rem .7rem; display: grid; gap: .1rem; max-height: 14rem; overflow-y: auto; }
.ms-panel .check { padding: .35rem 0; }

/* inscriptions en ligne */
.par-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .6rem; margin-bottom: .4rem; }
.par { display: flex; align-items: center; gap: .6rem; border: 1.5px solid var(--line); border-radius: 12px; padding: .8rem 1rem; cursor: pointer; font-weight: 600; background: #fff; min-height: 48px; }
.par:has(input:checked) { border-color: var(--brand); background: rgba(31,138,112,.08); }
.par input { width: 1.2rem; height: 1.2rem; accent-color: var(--brand); }
[data-par][hidden] { display: none !important; }

/* support */
.thread { display: grid; gap: .6rem; margin: .8rem 0; max-height: 45vh; overflow-y: auto; }
.msg { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; background: #fff; }
.msg.solvin { background: rgba(31,138,112,.08); border-color: rgba(31,138,112,.35); }
.msg-h { display: flex; gap: .6rem; align-items: baseline; margin-bottom: .2rem; }
.msg-b { line-height: 1.45; word-break: break-word; }
