/* =========================================================================
   Surveillo — feuille de style
   ========================================================================= */
:root {
  --bg: #f1f6fd;
  --surface: #ffffff;
  --surface-2: #f6f9fe;
  --text: #0f2442;
  --text-2: #3f5372;
  --muted: #62728c;
  --line: #e1e9f5;
  --line-2: #cdd9ea;
  --primary: #1976d2;
  --primary-2: #0d5bb5;
  --primary-soft: #e6f1fe;
  --primary-line: #b8d6fa;
  --ok: #2e7d32;
  --ok-soft: #e8f6ea;
  --warn: #9a5b00;
  --warn-soft: #fff5e0;
  --err: #b42318;
  --err-soft: #fdeceb;
  --side: #0d47a1;
  --side-2: #1458b8;
  --side-text: #d3e4ff;
  --radius: 14px;
  --vert: #43a047;
  --vert-2: #388e3c;
  --ambre: #b26a00;
  --ambre-soft: #fff3dc;
  --violet: #6a3fc0;
  --violet-soft: #f0eafd;
  --shadow: 0 1px 2px rgba(13, 71, 161, .05), 0 2px 6px rgba(13, 71, 161, .05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* les éléments masqués restent masqués, même avec un display défini */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.5 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .8rem; }
h3 { font-size: .95rem; margin: 1.4rem 0 .5rem; }
code { background: #eef1f6; padding: .05em .35em; border-radius: 4px; font-size: .9em; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- Structure : menu latéral + contenu ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex: none; background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: .7rem; padding: 1.15rem 1.1rem 1rem; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(135deg, #3d8bff, #1f5fd6); color: #fff;
}
.brand strong { display: block; font-size: 1rem; line-height: 1.1; }
.brand small { color: #a9c6f0; font-size: .75rem; }
.sidebar nav { flex: 1; padding: .3rem .6rem 1rem; }
.nav-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8fb5ea; padding: 1rem .6rem .35rem; font-weight: 600; }
.sidebar nav a {
  display: flex; align-items: center; gap: .65rem; padding: .48rem .6rem; border-radius: 8px;
  color: var(--side-text); font-size: .9rem;
}
.sidebar nav a:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.sidebar nav a.on { background: #fff; color: var(--side); font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.sidebar nav a.on .ico { color: #1e88e5; }
.sidebar nav a.sub { padding: .32rem .6rem .32rem 2.45rem; font-size: .83rem; color: #a9c6f0; }
.sidebar nav a.sub span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar nav a.sub.on { background: none; color: #fff; font-weight: 600; }
.sidebar-user { display: flex; align-items: center; gap: .3rem; border-top: 1px solid rgba(255, 255, 255, .14); padding: .7rem .6rem; }
.sidebar-user .user { flex: 1; display: flex; align-items: center; gap: .6rem; padding: .35rem .4rem; border-radius: 8px; color: #fff; min-width: 0; }
.sidebar-user .user:hover, .sidebar-user .user.on { background: var(--side-2); text-decoration: none; }
.sidebar-user strong { display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user small { color: #a9c6f0; font-size: .74rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #43a047; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.sidebar-user .logout { color: #a9c6f0; padding: .45rem; border-radius: 8px; display: grid; }
.sidebar-user .logout:hover { background: var(--side-2); color: #fff; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 54px; display: flex; align-items: center; gap: .8rem; padding: 0 1.75rem;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.crumbs { display: flex; gap: .45rem; align-items: center; font-size: .88rem; color: var(--muted); min-width: 0; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs strong { color: var(--text); font-weight: 600; }
.menu-btn { display: none; background: none; border: 0; padding: .3rem; color: var(--text); cursor: pointer; }
.nav-backdrop { display: none; }

main { width: 100%; max-width: 1320px; padding: 1.6rem 1.75rem 4rem; }
.page-title { font-size: 1.45rem; margin: 0 0 1.2rem; font-weight: 700; }

/* ---------- En-tête de session (étapes) ---------- */
.session-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 1rem 1.75rem .9rem; }
.session-title { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: .8rem; }
.session-title h2 { margin: 0; font-size: 1.1rem; }
.steps-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.step { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem .6rem; background: var(--surface-2); }
.step.on { border-color: var(--primary-line); background: var(--primary-soft); }
.step-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: .45rem; margin-bottom: .35rem; }
.step.on .step-label { color: var(--primary); }
.step-num { width: 19px; height: 19px; border-radius: 50%; background: var(--line-2); color: #fff; display: grid; place-items: center; font-size: .7rem; }
.step.on .step-num { background: var(--primary); }
.step-links { display: flex; flex-wrap: wrap; gap: .25rem; }
.step-links a { font-size: .86rem; padding: .2rem .55rem; border-radius: 6px; color: var(--text-2); }
.step-links a:hover { background: #fff; text-decoration: none; color: var(--primary); }
.step-links a.on { background: var(--primary); color: #fff; font-weight: 600; }

/* ---------- Cartes, grilles ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.3rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.card > h2:first-child { padding-bottom: .65rem; border-bottom: 1px solid var(--line); margin-bottom: .9rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 1.2rem; align-items: start; margin-bottom: 1.2rem; }
.cols > .card { margin-bottom: 0; }
.intro { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius); padding: .9rem 1.2rem; margin-bottom: 1.2rem; color: var(--text-2); box-shadow: var(--shadow); }
.intro p { margin: .3rem 0; }
.intro ul { margin: .4rem 0; padding-left: 1.1rem; }
.intro li { margin: .25rem 0; }
.empty { color: var(--muted); text-align: center; padding: 1.5rem .5rem; margin: 0; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.actions { display: flex; gap: .8rem; align-items: center; margin-top: 1rem; }

.muted { color: var(--muted); }
.small { font-size: .84em; }
.right { text-align: right; }
.center { text-align: center; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); font-weight: 600; }
.err-text { color: var(--err); font-weight: 600; }
.scroll { overflow-x: auto; }

/* ---------- Tableaux ---------- */
table { border-collapse: separate; border-spacing: 0; width: 100%; }
th, td { padding: .55rem .65rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
th { font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
table:not(.edt):not(.calendrier):not(.postes) tr:hover td { background: #f3f8ff; }
table.compact th, table.compact td { padding: .38rem .55rem; }
tfoot th { color: var(--text); border-top: 2px solid var(--line-2); background: var(--surface-2); text-transform: none; font-size: .88rem; letter-spacing: 0; }
tr.dim td { color: #a2a9b9; }
.sortable thead th, .sortable tr:first-child th { cursor: pointer; user-select: none; }
.sortable th:hover { color: var(--primary); }
.sortable th[data-sens=asc]::after { content: " ▲"; font-size: .7em; }
.sortable th[data-sens=desc]::after { content: " ▼"; font-size: .7em; }

/* ---------- Formulaires ---------- */
label { display: block; margin-bottom: .75rem; font-size: .85rem; color: var(--text-2); font-weight: 500; }
.row label, label.check { display: inline-flex; align-items: center; gap: .45rem; margin: 0; }
input, select, button, textarea { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  padding: .45rem .6rem; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(25, 118, 210, .2); }
label > input:not([type=checkbox]):not([type=radio]):not([type=date]):not([type=number]):not([type=time]), label > select { display: block; width: 100%; margin-top: .25rem; }
.row label > input, .row label > select { width: auto !important; display: inline-block !important; margin: 0 !important; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 16px; height: 16px; }
input[type=file] { font-size: .88rem; }
.row { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin: .7rem 0; }
form.inline { display: inline; }
details { margin-top: .4rem; }
details summary { cursor: pointer; color: var(--primary); font-weight: 500; font-size: .9rem; }
details[open] summary { margin-bottom: .4rem; }

.btn {
  display: inline-flex; align-items: center; gap: .4rem; padding: .48rem .95rem; border: 1px solid var(--line-2);
  border-radius: 8px; background: #fff; color: var(--text); cursor: pointer; font-weight: 500; font-size: .9rem;
  box-shadow: 0 1px 1px rgba(16, 24, 40, .04); white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: #c3cad9; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-2); }
.btn.danger { color: var(--err); border-color: #efc2bd; }
.btn.danger:hover { background: var(--err-soft); }
.btn.small { padding: .26rem .65rem; font-size: .82rem; }
.btn:disabled { opacity: .6; cursor: wait; }
.link { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font-size: inherit; }
.link.danger, a.danger { color: var(--err); }
.link:hover { text-decoration: underline; }

/* Contrôles segmentés */
.seg { display: inline-flex; background: #e9edf5; border-radius: 9px; padding: 3px; }
.seg a { padding: .32rem .8rem; border-radius: 7px; color: var(--text-2); font-size: .86rem; font-weight: 500; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.radio-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.radio-seg label { margin: 0; cursor: pointer; }
.radio-seg input { position: absolute; opacity: 0; pointer-events: none; }
.radio-seg span { display: block; padding: .28rem .7rem; font-size: .83rem; border-left: 1px solid var(--line-2); color: var(--text-2); }
.radio-seg label:first-child span { border-left: 0; }
.radio-seg input:checked + span { background: #eef0f5; color: var(--text); font-weight: 600; }
.radio-seg label.oui input:checked + span { background: var(--ok-soft); color: var(--ok); }
.radio-seg label.non input:checked + span { background: var(--err-soft); color: var(--err); }
.radio-seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }

/* ---------- Messages, badges ---------- */
.flash { padding: .7rem 1rem; border-radius: 10px; margin-bottom: 1rem; background: var(--ok-soft); color: var(--ok); border: 1px solid #c3e7d3; }
.flash.err { background: var(--err-soft); color: var(--err); border-color: #f4c7c2; }
.flash.warn { background: var(--warn-soft); color: var(--warn); border-color: #f3dca8; }
.tag, .pill { display: inline-block; font-size: .73rem; padding: .08rem .5rem; border-radius: 99px; background: #eef0f5; color: var(--text-2); font-weight: 600; vertical-align: 1px; }
.tag.ok, .pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-err { background: var(--err-soft); color: var(--err); }
.tag.own { background: #fff4d6; color: #8a5a00; }

/* ---------- Indicateurs ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.05rem; color: var(--muted); font-size: .82rem; box-shadow: var(--shadow); }
.stat span { display: block; font-size: 1.6rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.25; margin-bottom: .1rem; }
.stat.accent { background: var(--primary-soft); border-color: var(--primary-line); }
.stat.accent span { color: var(--primary); }
.stat.warn { background: var(--warn-soft); border-color: #f1d9a6; }
.stat.warn span { color: var(--warn); }
.stat.bad { background: var(--err-soft); border-color: #f2c4bf; }
.stat.bad span { color: var(--err); }
.kpis { display: flex; gap: 1.6rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.kpis div { font-size: .8rem; color: var(--muted); }
.kpis span { display: block; font-size: 1.3rem; font-weight: 700; color: var(--text); }
ol.steps { padding-left: 1.2rem; margin: 0; }
ol.steps li { margin-bottom: .45rem; }

/* ---------- Sélecteur de classes ---------- */
.picker { border: 1px solid var(--line); border-radius: 10px; padding: .4rem .8rem; margin: .7rem 0 1rem; max-height: 340px; overflow-y: auto; background: var(--surface-2); }
.picker-niv { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .4rem 0; border-bottom: 1px dashed var(--line-2); }
.picker-niv:last-child { border-bottom: 0; }
.picker .niv { display: inline-flex; gap: .35rem; align-items: center; margin: 0 .6rem 0 0; font-weight: 600; min-width: 7.5em; color: var(--text); }
.picker .chip { display: inline-flex; gap: .3rem; align-items: center; margin: 0; padding: .18rem .6rem; border: 1px solid var(--line-2); border-radius: 99px; font-size: .83rem; cursor: pointer; background: #fff; font-weight: 500; }
.picker .chip:has(input:checked) { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-2); }
.picker .chip input { width: 13px; height: 13px; }

/* ---------- Horaires ---------- */
table.edt td { width: 19%; padding: .25rem; height: 2.5rem; }
table.edt th { width: 5%; text-align: center; }
.slot { background: var(--primary-soft); border-left: 3px solid var(--primary); border-radius: 5px; padding: .18rem .4rem; font-size: .78rem; margin-bottom: 2px; }
.slot.suite { opacity: .5; }
table.calendrier td.full { background: #ffe6c7; font-size: .78rem; color: #8a4b00; font-weight: 600; }
table.calendrier td.part { background: #fff3e2; font-size: .78rem; color: #8a4b00; }

/* ---------- Attributions ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.tabs a { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: .4rem .75rem; font-size: .86rem; color: var(--text); box-shadow: var(--shadow); }
.tabs a.on { border-color: var(--primary); box-shadow: inset 0 -3px 0 var(--primary); font-weight: 600; }
.tabs a:hover { text-decoration: none; border-color: var(--primary-line); }
table.postes tr.groupe td { border-top: 2px solid var(--line-2); }
table.postes tr.vide td { background: #fffbf2; }
table.postes tr.conflit td { background: var(--err-soft); }
table.postes .sel-prof { max-width: 28rem; width: 100%; }
.legende { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin: .4rem 0 .8rem; }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: .3rem; border: 1px solid var(--line-2); }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(rgba(255,255,255,0), #fff 40%); padding: 1.1rem 0 .2rem; display: flex; gap: .8rem; align-items: center; }
.ecart-pos { color: var(--warn); font-weight: 600; }
.ecart-neg { color: var(--primary); font-weight: 600; }
ul.liste-postes { margin: 0; padding-left: 1rem; font-size: .83em; }
ul.liste-postes li.oral { color: #6b3fb5; }

/* ---------- Connexion ---------- */
body.login { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(1000px 520px at 15% -10%, #cfe4ff, transparent), radial-gradient(800px 500px at 100% 110%, #dcf3df, transparent), var(--bg); }
.login-card { width: min(400px, 92vw); padding: 2rem; }
.login-card h1 { font-size: 1.3rem; margin-top: 0; }
.login-card .btn { width: 100%; justify-content: center; margin-top: .4rem; }

/* ---------- Impression ---------- */
body.print { background: #fff; }
body.print main { max-width: none; padding: 1.5rem; }
.fiche { page-break-after: always; break-after: page; padding: .5rem 0 1rem; }
.fiche:last-child { page-break-after: auto; break-after: auto; }
.fiche h2 { font-size: 1.15rem; border-bottom: 2px solid var(--text); padding-bottom: .25rem; }
.noprint { margin-bottom: 1rem; }
@media print {
  .sidebar, .topbar, .session-head, .noprint, .nav-backdrop { display: none !important; }
  body { font-size: 10.5pt; background: #fff; }
  .card { border: 0; padding: 0; box-shadow: none; }
  th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Petits écrans ---------- */
@media (max-width: 1000px) {
  .steps-nav { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 15, 30, .4); z-index: 40; }
  .menu-btn { display: grid; }
  .topbar, .session-head { padding-left: 1rem; padding-right: 1rem; }
  main { padding: 1.1rem 1rem 3rem; }
  .cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
select { max-width: 100%; }
.row label { max-width: 100%; flex-wrap: wrap; }
.row label > select { max-width: 100% !important; }

/* ---------- Page Impressions et documents ---------- */
.print-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 1.2rem; margin-bottom: 1rem; }
.print-grid .card { margin: 0; display: flex; flex-direction: column; }
.print-card p { margin: 0; }
.print-card .actions { margin-top: auto; padding-top: 1rem; flex-wrap: wrap; }
.print-card select { flex: 1; min-width: 12rem; }
.fiche-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 2px solid var(--text); margin-bottom: .6rem; flex-wrap: wrap; }
.fiche-tete h2 { border: 0; margin: 0; padding: 0 0 .25rem; }
.fiche-tete span { color: var(--muted); font-size: .85rem; }
table.imp td, table.imp th { border-bottom: 1px solid #dde2ea; }
table.imp tr.sep td { border-top: 1.5px solid #9aa3b5; }
table.imp tr.oral td { color: #6b3fb5; }
table.imp .sign { width: 7rem; }
.exam-bloc { break-inside: avoid; page-break-inside: avoid; margin-bottom: 1rem; }
.exam-bloc h3 { margin: .9rem 0 .35rem; }
.pied { color: var(--muted); font-size: .75rem; margin-top: 1rem; text-align: right; }

/* ---------- Échanges ---------- */
.echange-profs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: start; }
.echange-profs select { width: 100%; margin: .2rem 0 .3rem; }
.echange-profs .lettre { font-size: .72rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .08em; }
.echange-profs .fleche { font-size: 1.6rem; color: var(--muted); padding-top: 1rem; }
label.choix { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; margin-bottom: .4rem; cursor: pointer; font-weight: 400; color: var(--text); }
label.choix:hover { border-color: var(--primary-line); background: #fafbff; }
label.choix:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
label.choix input { margin-top: .2rem; }
label.choix em { display: block; font-style: normal; font-size: .8rem; color: var(--ok); }
label.choix.ko em { color: var(--err); }
@media (max-width: 640px) { .echange-profs { grid-template-columns: 1fr; } .echange-profs .fleche { padding: 0; text-align: center; } }

/* ---------- Identité Surveillo ---------- */
.brand-logo { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
.brand small { font-size: .72rem; }
.login-logo { text-align: center; margin: -.4rem 0 .4rem; }
.login-logo img { filter: drop-shadow(0 6px 14px rgba(25, 118, 210, .3)); }
.login-card h1 { text-align: center; font-size: 1.6rem; margin: 0; color: var(--side); letter-spacing: -.02em; }
.login-sub { text-align: center; color: var(--muted); margin: .1rem 0 1.4rem; }
.pied img { vertical-align: -2px; }

/* ---------- Thème « Bleu Surveillo » : icônes et accents ---------- */
.sidebar { background: linear-gradient(180deg, #0d47a1 0%, #0b3d8c 100%); }
.btn.primary { background: var(--primary); border-color: var(--primary); box-shadow: 0 2px 6px rgba(25, 118, 210, .25); }
.btn.success, .btn.go { background: var(--vert); border-color: var(--vert); color: #fff; box-shadow: 0 2px 6px rgba(67, 160, 71, .25); }
.btn.success:hover, .btn.go:hover { background: var(--vert-2); }
th { background: #f2f7fe; color: #4f6a8f; }

/* Titres de cartes : petite pastille d'accent */
.card > h2:first-child { display: flex; align-items: center; gap: .55rem; }
.card > h2:first-child::before { content: ""; width: 6px; height: 1.05em; border-radius: 3px; background: linear-gradient(#1e88e5, #43a047); flex: none; }
.card > h2:first-child.h-ic::before { display: none; }
.h-ic .pastille { width: 28px; height: 28px; }
.h-ic .pastille .ico { width: 16px; height: 16px; }

/* Pastilles d'icônes colorées */
.pastille { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--primary); }
.pastille .ico { width: 22px; height: 22px; }
.t-bleu { background: #e3f0ff; color: #1565c0; }
.t-vert { background: #e3f6e5; color: #2e7d32; }
.t-ambre { background: var(--ambre-soft); color: var(--ambre); }
.t-rouge { background: var(--err-soft); color: var(--err); }
.t-violet { background: var(--violet-soft); color: var(--violet); }
.t-cyan { background: #e0f5fa; color: #00788f; }

/* Indicateurs avec icône */
.stat.ic { display: flex; align-items: center; gap: .8rem; }
.stat.ic > div { min-width: 0; }
.stat.ic.accent { background: var(--surface); border-color: var(--primary-line); }
.stat.ic.warn { background: var(--surface); }
.stat.ic.bad { background: var(--surface); }

/* Messages avec icône */
.flash { display: flex; gap: .6rem; align-items: flex-start; }
.flash > .ico { margin-top: .1rem; }
.flash > div { flex: 1; min-width: 0; }

/* Pastilles d'état */
.etat { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; padding: .15rem .6rem; border-radius: 99px; white-space: nowrap; }
.etat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.etat.prep { background: #eef2f8; color: #5a6b85; }
.etat.cours { background: var(--ambre-soft); color: var(--ambre); }
.etat.fini { background: #e3f6e5; color: #2e7d32; }

/* Barre de progression */
.progress { height: 7px; border-radius: 99px; background: #e5edf8; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1e88e5, #43a047); }

/* Cartes de session du tableau de bord */
.sessions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 1rem; }
.session-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .7rem; transition: border-color .15s, transform .15s; }
.session-card:hover { border-color: var(--primary-line); transform: translateY(-1px); }
.session-card .haut { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.session-card .haut > div { min-width: 10rem !important; }
.session-card .haut a { font-weight: 600; color: var(--text); font-size: 1rem; }
.session-card .haut small { display: block; color: var(--muted); }
.session-card .chiffres { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.session-card .liens { display: flex; gap: .4rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: .7rem; }
.section-tete { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.6rem 0 .8rem; flex-wrap: wrap; }
.section-tete h2 { margin: 0; display: flex; gap: .55rem; align-items: center; font-size: 1.1rem; }

/* Étapes de session avec icône */
.step-label .pastille { width: 22px; height: 22px; border-radius: 7px; }
.step-label .pastille .ico { width: 13px; height: 13px; }
.step.on { background: linear-gradient(180deg, #eef6ff, #e6f1fe); }
.step-links a.on { box-shadow: 0 2px 6px rgba(25, 118, 210, .3); }
.tabs a.on { color: var(--primary-2); }

/* ---------- Boutons-icônes ---------- */
.btn-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; color: var(--text-2); cursor: pointer; padding: 0; vertical-align: middle; transition: background .15s, color .15s, border-color .15s; }
.btn-ic .ico { width: 17px; height: 17px; }
.btn-ic:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-line); text-decoration: none; }
.btn-ic.danger { color: var(--err); }
.btn-ic.danger:hover { background: var(--err-soft); border-color: #f2c4bf; color: var(--err); }
.btn-ic.vert { color: var(--ok); }
.btn-ic.vert:hover { background: #e3f6e5; border-color: #bfe3c3; }
.btn-ic.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-ic.sm { width: 27px; height: 27px; border-radius: 7px; }
.btn-ic.sm .ico { width: 15px; height: 15px; }
.ic-group { display: inline-flex; gap: .3rem; align-items: center; justify-content: flex-end; }
td .ic-group { white-space: nowrap; }
.btn .ico { width: 16px; height: 16px; }

/* Menu masquable */
.toggle-nav { border: 0; background: transparent; }
html.nav-cache .sidebar { display: none; }
@media (max-width: 860px) { .toggle-nav { display: none; } html.nav-cache .sidebar { display: flex; } }

/* ---------- Fenêtres de modification ---------- */
dialog.modal { border: 0; padding: 0; border-radius: 16px; width: min(560px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); box-shadow: 0 24px 60px rgba(13, 40, 90, .3); color: var(--text); overflow: visible; }
dialog.modal.large { width: min(820px, calc(100vw - 2rem)); }
dialog.modal::backdrop { background: rgba(10, 30, 70, .45); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: modal-in .16s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-form { display: flex; flex-direction: column; max-height: calc(100vh - 3rem); }
.modal-form > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); }
.modal-form > header h2 { margin: 0; font-size: 1.08rem; }
.modal-form > header .btn-ic { border: 0; }
.modal-corps { padding: 1.1rem 1.3rem; overflow-y: auto; }
.modal-form > footer { display: flex; justify-content: flex-end; gap: .6rem; padding: .85rem 1.3rem; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 16px 16px; }
.modal-corps label > input:not([type=checkbox]):not([type=radio]), .modal-corps label > select, .modal-corps label > .liste-btn, .modal-corps label > textarea { display: block; width: 100% !important; margin-top: .25rem; }
.modal-corps .grille-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 0 1rem; }
.modal-corps .aide { font-size: .82rem; color: var(--muted); margin: -.4rem 0 .8rem; font-weight: 400; }
.modal-corps label.check { margin-bottom: .75rem; }

/* ---------- Listes déroulantes améliorées ---------- */
select.liste-cachee { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; }
.liste-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .6rem; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font: inherit; font-size: .9rem; color: var(--text); cursor: pointer; max-width: 100%; min-width: 9rem; text-align: left; }
.liste-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste-btn svg { flex: none; color: var(--muted); }
.liste-btn:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(25, 118, 210, .2); }
.liste-pop { position: absolute; z-index: 1000; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 32px rgba(13, 40, 90, .2); max-width: min(480px, 92vw); display: flex; flex-direction: column; overflow: hidden; }
.liste-pop input[type=search] { margin: .45rem; border-radius: 7px; }
.liste-items { max-height: 280px; overflow-y: auto; padding: .25rem; }
.liste-item { padding: .38rem .6rem; border-radius: 6px; cursor: pointer; font-size: .88rem; }
.liste-item.indent { padding-left: 1.2rem; }
.liste-item:hover { background: var(--primary-soft); }
.liste-item.on { background: var(--primary); color: #fff; }
.liste-item.off { color: #a2a9b9; cursor: not-allowed; }
.liste-item.off:hover { background: none; }
.liste-groupe { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: .55rem .6rem .2rem; }

/* ---------- Recherche ---------- */
.recherche { display: inline-flex !important; align-items: center; gap: .4rem; margin: 0 !important; border: 1px solid var(--line-2); border-radius: 9px; padding: 0 .6rem; background: #fff; }
.recherche .ico { color: var(--muted); width: 16px; height: 16px; }
.recherche input { border: 0 !important; box-shadow: none !important; padding: .42rem 0 !important; min-width: 13rem; background: transparent !important; }
.recherche:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(25, 118, 210, .2); }

/* Fiches en lecture seule */
dl.fiche-info { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; }
dl.fiche-info dt { color: var(--muted); font-size: .85rem; }
dl.fiche-info dd { margin: 0; font-weight: 500; }
.card-tete { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding-bottom: .65rem; border-bottom: 1px solid var(--line); margin-bottom: .9rem; }
.card-tete h2 { margin: 0; display: flex; align-items: center; gap: .55rem; }
.card-tete h2::before { content: ""; width: 6px; height: 1.05em; border-radius: 3px; background: linear-gradient(#1e88e5, #43a047); }
.card-tete .outils { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.oui-non { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; }

/* ---------- Synthèse de session ---------- */
.etapes-liste { display: flex; flex-direction: column; gap: .45rem; }
.etapes-groupe { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin: .5rem 0 .1rem; }
.etapes-groupe:first-child { margin-top: 0; }
.etape-carte { display: flex; align-items: center; gap: .8rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); transition: border-color .15s, background .15s; }
.etape-carte:hover { border-color: var(--primary-line); background: #f6faff; text-decoration: none; }
.etape-carte .pastille { width: 36px; height: 36px; border-radius: 10px; }
.etape-carte .pastille .ico { width: 19px; height: 19px; }
.etape-txt { flex: 1; min-width: 0; }
.etape-txt strong { display: block; font-size: .92rem; }
.etape-txt small { color: var(--muted); font-size: .8rem; }
.barre-jour { display: flex; height: 8px; border-radius: 99px; background: #edf2f9; overflow: hidden; margin-bottom: .15rem; }
.barre-jour span { background: #1e88e5; }
.barre-jour span.res { background: #9fc8f3; }

/* ---------- En-tête de session : étapes ---------- */
.session-head { background: linear-gradient(180deg, #fff, #f7fbff); }
.session-title { align-items: center; }
.synthese-lien { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: 99px; border: 1px solid var(--primary-line); background: var(--primary-soft); color: var(--primary-2); font-weight: 600; font-size: .85rem; }
.synthese-lien .ico { width: 15px; height: 15px; }
.synthese-lien:hover { text-decoration: none; background: #d8e9fd; }
.synthese-lien.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.step { --c: #1565c0; --c-soft: #e3f0ff; position: relative; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 12px; padding: .6rem .75rem .65rem; transition: box-shadow .15s; }
.step-violet { --c: #6a3fc0; --c-soft: #f0eafd; }
.step-vert { --c: #2e7d32; --c-soft: #e3f6e5; }
.step.on { background: var(--c-soft); border-color: color-mix(in srgb, var(--c) 35%, #fff); border-top-color: var(--c); box-shadow: 0 4px 14px color-mix(in srgb, var(--c) 18%, transparent); }
.step-label { color: var(--c) !important; gap: .4rem; text-transform: none; letter-spacing: 0; font-size: .9rem; }
.step-label .ico { width: 16px; height: 16px; }
.step-num { background: var(--c) !important; width: 20px; height: 20px; }
.step-links a { border: 1px solid transparent; }
.step-links a:hover { background: #fff; color: var(--c); border-color: color-mix(in srgb, var(--c) 30%, #fff); }
.step-links a.on { background: var(--c); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--c) 35%, transparent); }
.stat.ic span:not(.pastille) { white-space: nowrap; }
fieldset.regle { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem .2rem; margin: .4rem 0 0; }
fieldset.regle legend { font-size: .85rem; font-weight: 600; color: var(--text-2); padding: 0 .3rem; }
fieldset.regle label.check { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-weight: 400; color: var(--text); }

/* ---------- Choix de la méthode ---------- */
.methodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: .8rem; margin-bottom: .6rem; }
.methode { display: flex; flex-direction: column; gap: .35rem; text-align: left; padding: .85rem 1rem; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.methode:hover { border-color: var(--primary-line); }
.methode.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 4px 14px rgba(25, 118, 210, .15); }
.methode-tete { display: flex; align-items: center; gap: .5rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.methode.on .methode-tete { color: var(--primary); }
.methode .radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.methode.on .radio { border-color: var(--primary); background: radial-gradient(var(--primary) 45%, #fff 50%); }
.methode .small { color: var(--text-2); }
.methode-ex { font-size: .78rem; color: var(--muted); border-top: 1px dashed var(--line-2); padding-top: .3rem; }

/* Correctif : pastilles d'icônes bien centrées dans les indicateurs */
.stat .pastille { display: grid; place-items: center; margin: 0; font-size: inherit; line-height: 1; color: inherit; }
.stat .pastille.t-bleu { color: #1565c0; } .stat .pastille.t-vert { color: #2e7d32; } .stat .pastille.t-ambre { color: var(--ambre); }
.stat .pastille.t-rouge { color: var(--err); } .stat .pastille.t-violet { color: var(--violet); } .stat .pastille.t-cyan { color: #00788f; }
.t-gris, .stat .pastille.t-gris { background: #eef1f6; color: #8a94a8; }
.stat.ic > div > span { margin-bottom: 0; }

/* Légende des attributions */
.legende { gap: .5rem; }
.legende .lg { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 99px; font-size: .78rem; font-weight: 600; }
.legende .lg .ico { width: 14px; height: 14px; }
.lg-vide { background: #fff4dc; color: #8a5a00; }
.lg-pb { background: var(--err-soft); color: var(--err); }
.lg-own { background: #fff0c2; color: #8a6d00; }
.lg-lock { background: var(--violet-soft); color: var(--violet); }
table.postes tr.vide td { background: #fffaf0; }
.err-text .ico, .warn-text .ico { width: 14px; height: 14px; vertical-align: -2px; }

/* Verrou cliquable */
label.verrou { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; margin: 0; border: 1px solid var(--line-2); background: #fff; color: #9aa4b8; }
label.verrou input { position: absolute; opacity: 0; pointer-events: none; }
label.verrou .ico { width: 16px; height: 16px; }
label.verrou .ferme { display: none; }
label.verrou:has(input:checked) { background: var(--violet-soft); border-color: #d6c8f7; color: var(--violet); }
label.verrou:has(input:checked) .ferme { display: block; }
label.verrou:has(input:checked) .ouvert { display: none; }
label.verrou:has(input:focus-visible) { outline: 2px solid var(--primary); }

/* Aide en trois colonnes */
.aide-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: .8rem; }
.aide-grille > div { display: flex; gap: .7rem; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; }
.aide-grille p { margin: 0; font-size: .84rem; color: var(--text-2); }
.aide-grille .pastille { width: 34px; height: 34px; border-radius: 10px; }
.aide-grille .pastille .ico { width: 18px; height: 18px; }
.btn.danger .ico { color: var(--err); }

/* ---------- Plannings (échanges) ---------- */
table.planning { border-collapse: separate; border-spacing: 2px; width: 100%; font-size: .72rem; }
table.planning th { background: none; padding: .15rem .25rem; font-size: .7rem; text-align: center; }
table.planning td { height: 22px; min-width: 52px; padding: 0 .25rem; border: 0; border-radius: 4px; background: #f3f6fb; white-space: nowrap; overflow: hidden; }
table.planning tr.pause td { box-shadow: 0 2px 0 #f0c36d; }
table.planning tr:hover td { background-color: inherit; }
.g-cours { background: #dfe6f1 !important; }
.g-oral { background: var(--violet-soft) !important; box-shadow: inset 0 0 0 1px #cdb9f3; }
.g-indispo { background: repeating-linear-gradient(45deg, #fde0dd, #fde0dd 4px, #fff 4px, #fff 8px) !important; }
.g-surv { cursor: pointer; font-weight: 600; color: #fff; }
.g-surv.ok { background: #1e88e5 !important; }
.g-surv.ko { background: #e57373 !important; }
.g-surv.sel { outline: 3px solid #0d47a1; outline-offset: -1px; }
.g-surv:hover { filter: brightness(1.08); }
.lg-surv-ok { background: #e3f0ff; color: #1565c0; }
.lg-surv-ko { background: var(--err-soft); color: var(--err); }
.lg-cours { background: #e9eef6; color: #4f6a8f; }
.lg-oral { background: var(--violet-soft); color: var(--violet); }
.lg-indispo { background: #fde0dd; color: var(--err); }
.echange-profs .fleche .ico { width: 26px; height: 26px; }

/* ---------- Page Impressions ---------- */
.print-card { border-top: 3px solid var(--primary); }
.print-tete { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
.print-tete h2 { margin: 0; flex: 1; }
.print-tete h2::before { display: none; }
.print-card .actions .btn .ico { width: 16px; height: 16px; }
p.small .ico, .muted .ico { width: 14px; height: 14px; vertical-align: -2px; }

/* Titre de la page : une seule fois, dans le bandeau du haut */
.topbar { height: 60px; }
.crumbs h1.titre-page { margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
main { padding-top: 1.3rem; }
@media print { .topbar { display: none !important; } }
.card.attention { border-color: #f1d9a6; border-top: 3px solid var(--ambre); }

/* Exemple visuel des méthodes */
.methode-intro p { margin: .2rem 0 .5rem; color: var(--text-2); }
.methode-intro ul { margin: 0 0 .9rem; padding-left: 1.1rem; color: var(--text-2); }
.methode-idee { font-weight: 600; color: var(--primary-2); font-size: .88rem; }
.methode-barres { display: flex; flex-direction: column; gap: .35rem; margin: .3rem 0 .1rem; }
.ligne-ex { display: grid; grid-template-columns: 3.4rem 1fr 3.6rem; align-items: center; gap: .4rem; font-size: .75rem; }
.nom-ex { font-weight: 700; color: var(--text-2); }
.q-ex { text-align: right; font-weight: 700; color: #1565c0; }
.barre-ex { position: relative; display: flex; height: 16px; background: #f1f4f9; border-radius: 4px; }
.barre-ex span { height: 100%; }
.b-cours { background: #b9c4d6; border-radius: 4px 0 0 4px; }
.b-surv { background: #1e88e5; color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; overflow: hidden; }
.b-repere { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #0f2442; border-radius: 1px; }
.cle { display: inline-block; width: 14px; height: 10px; border-radius: 2px; vertical-align: 0; }
.cle.b-repere { position: static; width: 2px; height: 12px; }

/* Charges & quotas : principe */
.principe p { margin: .3rem 0 .7rem; color: var(--text-2); }
.exemple-ab { display: flex; flex-direction: column; gap: .45rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; margin: .4rem 0 .9rem; max-width: 760px; font-size: .9rem; }
.exemple-ab .ligne-ex { grid-template-columns: 3.4rem 1fr 5rem; font-size: .8rem; }
.exemple-ab .barre-ex { height: 22px; }
.exemple-ab .b-cours { color: #24324a; font-size: .7rem; font-weight: 700; display: grid; place-items: center; white-space: nowrap; overflow: hidden; }
.exemple-ab .b-surv { font-size: .72rem; white-space: nowrap; }

/* ---------- Zones de dépôt de fichiers ---------- */
label.depot { display: flex !important; align-items: center; gap: .9rem; flex: 1; min-width: min(320px, 100%); margin: 0 !important; padding: .8rem 1.1rem; border: 2px dashed var(--primary-line); border-radius: 12px; background: #f7fbff; color: var(--primary); cursor: pointer; transition: background .15s, border-color .15s; }
label.depot:hover, label.depot.survol { background: var(--primary-soft); border-color: var(--primary); }
label.depot.plein { border-style: solid; border-color: #9fd3a4; background: #f1faf2; color: var(--ok); }
label.depot input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.depot-txt { display: flex; flex-direction: column; color: var(--text-2); font-weight: 400; font-size: .9rem; }
.depot-txt strong { color: var(--text); }
.depot-txt small { color: var(--muted); font-size: .78rem; }
form:has(> label.depot) { align-items: stretch; }
table.etroit { width: auto; min-width: min(420px, 100%); }

/* Hors classe : types en bandeau */
.types-bande { padding: .8rem 1.1rem; }
.types-ligne { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.types-titre { margin-right: .3rem; }
.type-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .3rem .22rem .7rem; border-radius: 99px; background: #eef1f6; color: #4a556b; font-size: .84rem; font-weight: 600; border: 1px solid #dde3ec; }
.type-chip.compte { background: #e6f5e8; color: #2e7d32; border-color: #c4e5c8; }
.type-chip small { font-weight: 400; color: inherit; opacity: .75; }
td .type-chip { padding-right: .7rem; }
.mini-chip { padding: .05rem .5rem; font-size: .72rem; }
.btn-ic.mini { width: 22px; height: 22px; border-radius: 6px; border: 0; background: transparent; color: inherit; }
.btn-ic.mini .ico { width: 13px; height: 13px; }
.type-chip form .btn-ic { width: 22px; height: 22px; border: 0; background: transparent; }
.type-chip form .btn-ic .ico { width: 13px; height: 13px; }

/* ---------- Horaire type d'un professeur ---------- */
table.horaire { border-collapse: separate; border-spacing: 4px; width: 100%; table-layout: fixed; min-width: 640px; }
table.horaire th { background: none; text-align: center; color: var(--muted); font-size: .72rem; padding: .2rem; }
table.horaire th.h-heure { width: 3.6rem; text-align: right; vertical-align: top; padding-top: .45rem; }
table.horaire th.h-heure span { display: block; color: var(--text); font-size: .8rem; }
table.horaire th.h-heure small { font-weight: 500; }
table.horaire td { border: 0; padding: 0; height: 46px; border-radius: 8px; vertical-align: top; }
table.horaire td.vide { background: #f5f7fb; }
table.horaire tr.pause td, table.horaire tr.pause th { border-bottom: 0; }
table.horaire tr.pause + tr td.vide, table.horaire tr.pause + tr th { box-shadow: 0 -3px 0 #fff, 0 -5px 0 #f3d38a; }
table.horaire td.occupe { display: table-cell; }
.h-cours { display: flex; flex-direction: column; justify-content: flex-start; gap: .05rem; height: 100%; min-height: 46px; padding: .35rem .55rem; border-radius: 8px; background: var(--bg); color: var(--fg); border-left: 4px solid var(--fg); font-size: .78rem; line-height: 1.25; box-sizing: border-box; }
.h-cours + .h-cours { margin-top: 3px; }
.h-cours strong { font-size: .86rem; }
.h-cours span { color: #24324a; font-weight: 500; }
.h-cours small { color: #5b6b85; }
table.horaire td.occupe { height: 1px; }
table.horaire td.occupe .h-cours:only-child { height: 100%; }

/* Contenu centré (évite le grand vide à droite, surtout menu masqué) */
main { margin-inline: auto; }
html.nav-cache main { max-width: 1500px; }

/* Sous-étapes de session : vrais boutons */
.step-links { gap: .35rem; }
.step-links a { background: #fff; border: 1px solid color-mix(in srgb, var(--c) 25%, #dfe5ee); color: var(--text); padding: .28rem .7rem; border-radius: 8px; font-weight: 500; box-shadow: 0 1px 2px rgba(13, 40, 90, .06); }
.step-links a:hover { background: var(--c-soft); color: var(--c); border-color: var(--c); }
.step-links a.on { background: var(--c); border-color: var(--c); color: #fff; }
.etape-carte { padding: 0; gap: 0; }
.etape-carte .etape-lien { display: flex; align-items: center; gap: .8rem; flex: 1; min-width: 0; padding: .6rem .75rem; color: var(--text); }
.etape-carte .etape-lien:hover { text-decoration: none; }
.etape-carte form { padding-right: .7rem; }
.etape-carte.ok { border-color: #c4e5c8; background: #fbfefb; }
.btn-ic.on-vert { background: var(--vert); border-color: var(--vert); color: #fff; }
.btn-ic.on-vert:hover { background: var(--vert-2); color: #fff; }
form:has(> label.depot) { align-items: center; }
form:has(> label.depot) > .btn { align-self: center; }

/* Sélecteur de classes : niveau à gauche, classes alignées à droite */
.picker-niv { display: grid !important; grid-template-columns: 8.5rem minmax(0, 1fr); align-items: start; gap: .5rem; }
.picker .niv { margin: .2rem 0 0 !important; min-width: 0 !important; }
.picker-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
@media (max-width: 560px) { .picker-niv { grid-template-columns: 1fr; } }
.jumelage { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .4rem; }
.jumelage .aide { margin: .2rem 0 .6rem; }
.jumelage .chip { display: inline-flex; gap: .3rem; align-items: center; margin: 0; padding: .18rem .6rem; border: 1px solid var(--line-2); border-radius: 99px; font-size: .83rem; cursor: pointer; background: #fff; font-weight: 500; }
.jumelage .chip:has(input:checked) { background: #fff4d6; border-color: #f1d9a6; color: #8a5a00; }
.jumelage .chip input { width: 13px; height: 13px; }
.suggs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.sugg { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--text); }
.sugg small { font-weight: 400; color: var(--muted); }
.sugg .ico { width: 14px; height: 14px; color: #d49b00; }
.sugg.premier { border-color: #f1d9a6; background: #fffaf0; }
.sugg:hover, .sugg.choisi { border-color: var(--primary); background: var(--primary-soft); }
.sugg.off { cursor: default; opacity: .6; }
/* Horaire type : les pauses ne sont marquées que dans la colonne des heures */
table.horaire tr.pause + tr td.vide { box-shadow: none; }
.h-cours { position: relative; }
.h-cours .h-modif { position: absolute; top: 4px; right: 4px; background: rgba(255,255,255,.75); color: var(--fg); }
.h-cours .h-modif:hover { background: #fff; }
.h-corrige { font-style: normal; font-size: .68rem; font-weight: 700; color: var(--violet); }
.zone-admin { border-top: 3px solid var(--violet); }
details.avance { margin: .2rem 0 .9rem; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .8rem; background: var(--surface-2); }
details.avance summary { font-size: .88rem; }
.choix-cours .chip { display: inline-flex; gap: .35rem; align-items: center; margin: 0; padding: .3rem .7rem; border: 1px solid var(--line-2); border-radius: 10px; font-size: .85rem; cursor: pointer; background: #fff; font-weight: 400; }
.choix-cours .chip:has(input:checked) { background: #e6f5e8; border-color: #c4e5c8; }
.tag.atelier { background: var(--violet-soft); color: var(--violet); }
.picker-niv[hidden], .picker .chip[hidden], label.chip[hidden] { display: none !important; }
td.col-classes { width: 34%; min-width: 14rem; max-width: 26rem; }
.type-chip.a-placer { background: #fff4d6; color: #8a5a00; border-color: #f1d9a6; }
.type-chip .ico { width: 13px; height: 13px; }
.type-chip .compteur { font-size: .72rem; font-weight: 700; }

/* Fenêtre d'examen : groupes de cours */
.zone-groupes { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: .6rem .8rem; margin-bottom: .9rem; }
.zone-groupes-tete { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; margin-bottom: .5rem; }
.outils-groupes { margin-left: auto; font-size: .82rem; }
.liste-groupes { display: flex; flex-direction: column; gap: .3rem; max-height: 300px; overflow-y: auto; }
label.groupe-ligne { display: grid !important; grid-template-columns: 18px minmax(9rem, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr) 4rem; gap: .6rem; align-items: center;
  margin: 0 !important; padding: .4rem .6rem; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; font-weight: 400; font-size: .85rem; color: var(--text); cursor: pointer; }
label.groupe-ligne:has(input:checked) { border-color: var(--primary-line); background: var(--primary-soft); }
.g-nom { font-weight: 600; }
.g-classes em { font-style: normal; color: var(--ok); font-size: .78rem; }
.g-profs { color: var(--text-2); }
.g-eleves { text-align: right; color: var(--muted); }
@media (max-width: 700px) { label.groupe-ligne { grid-template-columns: 18px 1fr; } .g-classes, .g-profs, .g-eleves { grid-column: 2; text-align: left; } }
.nav-prof { padding: .7rem 1rem; }
.nav-prof-form { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.nav-prof-form .liste-btn { min-width: 20rem; }
.btn-ic.suivant .ico { transform: scaleX(-1); }
.h-cours .h-coupe { position: absolute; top: 4px; right: 30px; }
.h-cours .h-coupe .btn-ic { background: rgba(255,255,255,.75); color: var(--fg); }
[id] { scroll-margin-top: 76px; }   /* les ancres ne passent pas sous le bandeau du haut */
.zone-danger { border-top: 3px solid var(--err); }
#m-reset footer .btn.primary { background: var(--err); border-color: var(--err); }
a.verif-stat { color: inherit; text-decoration: none; transition: border-color .15s; }
a.verif-stat:hover, a.verif-stat.choisie { border-color: var(--primary); text-decoration: none; }
a.bandeau-verif { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; margin-bottom: 1rem; border-radius: 12px; background: var(--ambre-soft); border: 1px solid #f1d9a6; color: var(--text); text-decoration: none; }
a.bandeau-verif.erreur { background: var(--err-soft); border-color: #f2c4bf; }
a.bandeau-verif > span:nth-child(2) { flex: 1; }
a.bandeau-verif:hover { text-decoration: none; filter: brightness(.98); }
.h-cours .h-actions { display: flex; gap: 2px; margin-top: .25rem; flex-wrap: wrap; }
.h-cours .h-actions .btn-ic { background: rgba(255,255,255,.8); color: var(--fg); width: 22px; height: 22px; }
.h-cours .h-actions .btn-ic.danger { color: var(--err); }
.h-cours .h-modif, .h-cours .h-coupe { position: static; }
.card-tete-outils { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: -.4rem 0 .8rem; }
h3.fiche-titre { font-size: .95rem; margin: 1.1rem 0 .5rem; color: var(--primary-2); }
h3.fiche-titre:first-of-type { margin-top: .2rem; }
tr.a-verifier td:first-child { box-shadow: inset 3px 0 0 var(--ambre); }
.etapes-import .aide-grille a { display: flex; gap: .7rem; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; color: var(--text); text-decoration: none; }
.etapes-import .aide-grille a:hover { border-color: var(--primary-line); background: var(--primary-soft); text-decoration: none; }
.liste-items { position: relative; }
