/* BEQ — Bulletins de la section EQ */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --primary: #1e40af;
  --primary-600: #1d4ed8;
  --primary-50: #eff4ff;
  --primary-100: #dbe6fe;
  --sidebar: #0f1e3d;
  --sidebar-2: #172a52;
  --sidebar-text: #c7d2fe;
  --green: #15803d; --green-50: #ecfdf3;
  --amber: #b45309; --amber-50: #fffbeb;
  --red: #b91c1c; --red-50: #fef2f2;
  --gray-50: #f1f5f9;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .15);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
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-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; }
h1 { font-size: 1.55rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
code { background: var(--gray-50); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.icon { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }
.flex { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.grow { flex: 1; }

/* ---------- Sidebar ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 252px; background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2)); color: var(--sidebar-text); display: flex; flex-direction: column; z-index: 40; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.1rem 1rem; color: #fff; text-decoration: none !important; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.brand-logo { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #3b82f6, #1e40af); color: #fff; font-weight: 800; font-size: .85rem; letter-spacing: .03em; box-shadow: 0 4px 12px rgba(59, 130, 246, .35); }
.brand-logo.lg { width: 56px; height: 56px; font-size: 1.1rem; border-radius: 14px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: .98rem; }
.brand-text small { color: #94a3b8; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.sidebar nav { padding: .6rem .6rem 1rem; flex: 1; }
.nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: #7c8db5; margin: 1rem .7rem .35rem; font-weight: 600; }
.nav-link { display: flex; align-items: center; gap: .7rem; padding: .52rem .7rem; border-radius: 8px; color: var(--sidebar-text); font-size: .9rem; text-decoration: none !important; transition: background .15s, color .15s; }
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link.active { background: rgba(96, 140, 255, .2); color: #fff; box-shadow: inset 3px 0 0 #60a5fa; }
.sidebar-foot { padding: .8rem 1.1rem; font-size: .72rem; color: #64748b; }

.main-wrap { margin-left: 252px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 60px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 1.5rem; gap: 1rem; }
.topbar-title { flex: 1; color: var(--muted); font-size: .9rem; }
.topbar-right { display: flex; align-items: center; gap: .9rem; }
.year-switch { display: flex; align-items: center; gap: .35rem; background: var(--primary-50); color: var(--primary); border-radius: 999px; padding: 0 .3rem 0 .75rem; border: 1px solid var(--primary-100); }
.year-switch.past { background: var(--amber-50); color: var(--amber); border-color: #fde68a; }
.year-switch select { border: 0; background: transparent; font-weight: 600; color: inherit; padding: .38rem .4rem; font-size: .85rem; cursor: pointer; }
.banner-past { background: var(--amber-50); color: var(--amber); border-bottom: 1px solid #fde68a; padding: .5rem 1.5rem; font-size: .88rem; display: flex; gap: .5rem; align-items: center; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: .55rem; cursor: pointer; padding: .25rem .4rem; border-radius: 8px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--gray-50); }
.user-name { display: flex; flex-direction: column; line-height: 1.15; font-size: .88rem; font-weight: 600; }
.user-name small { color: var(--muted); font-weight: 400; font-size: .75rem; }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 200px; padding: .35rem; z-index: 50; }
.user-menu .menu a, .user-menu .menu button { display: flex; gap: .55rem; align-items: center; width: 100%; padding: .55rem .7rem; border: 0; background: none; color: var(--text); font: inherit; font-size: .9rem; border-radius: 6px; cursor: pointer; text-decoration: none; }
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--gray-50); }
.content { padding: 1.6rem 1.8rem 3rem; max-width: 1500px; width: 100%; }
.icon-btn { border: 0; background: none; padding: .4rem; border-radius: 8px; cursor: pointer; color: var(--text-2); display: inline-flex; }
.icon-btn:hover { background: var(--gray-50); }
.only-mobile { display: none; }

/* ---------- En-têtes ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.subtitle { color: var(--muted); margin: .3rem 0 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: .2rem; color: var(--muted); font-size: .85rem; margin-bottom: .35rem; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem 1.2rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
.card-body { padding: 1.2rem; }
.card-body.tight { padding: 0; }
.card-foot { padding: .85rem 1.2rem; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.cols-rev { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.25rem; align-items: start; }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); display: flex; gap: .9rem; align-items: center; color: inherit; text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
a.stat:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.stat-icon.green { background: var(--green-50); color: var(--green); }
.stat-icon.amber { background: var(--amber-50); color: var(--amber); }
.stat-icon.red { background: var(--red-50); color: var(--red); }
.stat-value { font-size: 1.45rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .82rem; }

.tile { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; color: inherit; text-decoration: none !important; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s, transform .15s; }
.tile:hover { border-color: var(--primary-100); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.tile-title { font-weight: 650; font-size: 1rem; display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.tile-sub { color: var(--muted); font-size: .85rem; margin-top: .15rem; }
.tile-foot { margin-top: .8rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: #fff; color: var(--text); font: inherit; font-weight: 550; font-size: .9rem; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; line-height: 1.2; }
.btn:hover { background: var(--gray-50); border-color: #94a3b8; }
.btn:focus-visible { outline: 3px solid var(--primary-100); outline-offset: 1px; }
.btn-primary { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.btn-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #166534; }
.btn-danger { color: var(--red); border-color: #fecaca; background: #fff; }
.btn-danger:hover { background: var(--red-50); border-color: #f87171; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--gray-50); border-color: transparent; }
.btn-sm { padding: .32rem .62rem; font-size: .82rem; border-radius: 6px; }
.btn-xs { padding: .2rem .45rem; font-size: .76rem; border-radius: 5px; gap: .25rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-icon { padding: .38rem; }
.inline-form { display: inline; margin: 0; }
.btn-group { display: inline-flex; gap: .35rem; flex-wrap: wrap; }

/* ---------- Formulaires ---------- */
.form label, label.field { display: block; font-weight: 550; font-size: .86rem; color: var(--text-2); margin-bottom: .9rem; }
.form label > input, .form label > select, .form label > textarea, label.field > input, label.field > select, label.field > textarea { margin-top: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], input:not([type]), select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: inherit; font-size: .92rem; color: var(--text); background: #fff; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, .25); }
input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--primary-600); vertical-align: middle; }
input[type=file] { font-size: .88rem; }
textarea { resize: vertical; min-height: 70px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem .3rem; margin: 0 0 1.1rem; }
legend { font-weight: 650; padding: 0 .4rem; color: var(--text); }
.hint { color: var(--muted); font-size: .82rem; font-weight: 400; margin-top: .25rem; }
.check { display: flex !important; align-items: center; gap: .5rem; font-weight: 450 !important; color: var(--text) !important; cursor: pointer; }
.check input { margin: 0; }
.form-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; margin-top: .5rem; }
.input-inline { display: flex; gap: .5rem; align-items: center; }
.input-inline > * { margin: 0 !important; }
.toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .search { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.toolbar .search .icon { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search input { padding-left: 2.2rem; }
.toolbar select { width: auto; }

.switch { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; font-weight: 500; color: var(--text); font-size: .88rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider { width: 38px; height: 22px; background: var(--border-strong); border-radius: 999px; position: relative; transition: background .2s; flex-shrink: 0; }
.switch .slider::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::after { transform: translateX(16px); }
.switch input:focus-visible + .slider { outline: 3px solid var(--primary-100); }

.seg { display: inline-flex; background: var(--gray-50); border: 1px solid var(--border); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: .32rem .62rem; border-radius: 6px; font: inherit; font-size: .8rem; font-weight: 550; color: var(--text-2); cursor: pointer; display: inline-flex; gap: .3rem; align-items: center; white-space: nowrap; }
.seg button:hover { background: #fff; }
.seg button.on { background: #fff; box-shadow: var(--shadow); color: var(--text); }
.seg button.on.s-prepa { color: #475569; }
.seg button.on.s-ouvert { color: var(--green); }
.seg button.on.s-verrouille { color: var(--amber); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 600; color: var(--text-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); padding: .6rem .8rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .6rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafbff; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { margin-left: .2rem; }
.table tr.row-muted td { color: var(--muted); }
.table td.cell-name { display: flex; align-items: center; gap: .65rem; }
.table .group-row td { background: var(--surface-2); font-weight: 650; color: var(--text-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.person { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.person-name { font-weight: 600; color: var(--text); }
.person small { display: block; color: var(--muted); font-weight: 400; }

/* Grilles d'encodage */
.grid-table { border-collapse: separate; border-spacing: 0; font-size: .88rem; width: 100%; }
.grid-table th, .grid-table td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: .4rem .5rem; background: #fff; }
.grid-table thead th { position: sticky; top: 60px; z-index: 3; background: var(--surface-2); font-size: .78rem; font-weight: 600; color: var(--text-2); vertical-align: bottom; text-align: center; }
.grid-table th:first-child, .grid-table td:first-child { position: sticky; left: 0; z-index: 2; text-align: left; min-width: 220px; }
.grid-table thead th:first-child { z-index: 4; }
.grid-table td.saving { background: #fffbeb; }
.grid-table td.saved { background: #f0fdf4; transition: background 1.2s; }
.grid-table td.error { background: #fef2f2; }
.grid-table .col-head { display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 96px; }
.grid-table .col-head small { color: var(--muted); font-weight: 400; text-transform: none; }
.grid-table .col-tools { display: flex; gap: .15rem; justify-content: center; margin-top: .2rem; }
.grid-table tr:hover td { background: #fafbff; }
.grid-table td.center { text-align: center; }
.grid-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.grid-wrap .grid-table th:last-child, .grid-wrap .grid-table td:last-child { border-right: 0; }
.grid-wrap .grid-table tbody tr:last-child td { border-bottom: 0; }

select.mention-select { width: auto; min-width: 92px; padding: .32rem .45rem; font-weight: 650; font-size: .85rem; border-radius: 6px; cursor: pointer; }
select.mention-select:disabled { cursor: default; opacity: .85; }
select.sips-select { width: auto; min-width: 150px; padding: .32rem .45rem; font-size: .84rem; font-weight: 600; border-radius: 6px; }
textarea.comment { min-height: 38px; padding: .4rem .55rem; font-size: .88rem; width: 100%; min-width: 260px; }
.save-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: .3rem; }

/* ---------- Badges, puces ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--gray-50); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.badge-green { background: var(--green-50); color: var(--green); border-color: #bbf7d0; }
.badge-amber { background: var(--amber-50); color: var(--amber); border-color: #fde68a; }
.badge-red { background: var(--red-50); color: var(--red); border-color: #fecaca; }
.badge-blue { background: var(--primary-50); color: var(--primary); border-color: var(--primary-100); }
.badge-gray { background: var(--gray-50); color: #475569; }
.chip { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; padding: .12rem .45rem; border-radius: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.chip-empty { background: var(--gray-50); color: #94a3b8; }
.chips { display: inline-flex; gap: .25rem; flex-wrap: wrap; }

/* ---------- Avatars ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #c7d2fe, #a5b4fc); color: #312e81; display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; object-fit: cover; flex-shrink: 0; }
.avatar.sm { width: 30px; height: 30px; font-size: .72rem; }
.avatar.xs { width: 26px; height: 26px; font-size: .66rem; }
.avatar.lg { width: 96px; height: 96px; font-size: 1.6rem; }
.avatar.xl { width: 140px; height: 140px; font-size: 2.2rem; border-radius: 16px; }

/* ---------- Progression ---------- */
.progress { display: inline-block; width: 110px; height: 8px; background: var(--gray-50); border-radius: 999px; overflow: hidden; vertical-align: middle; border: 1px solid var(--border); }
.progress-bar { height: 100%; background: var(--primary-600); border-radius: 999px; }
.progress.full .progress-bar { background: var(--green); }
.progress.low .progress-bar { background: #f59e0b; }
.progress-label { font-size: .78rem; color: var(--muted); margin-left: .45rem; font-variant-numeric: tabular-nums; }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--border); margin-bottom: 1.2rem; overflow-x: auto; }
.tab { padding: .65rem 1rem; color: var(--text-2); font-weight: 550; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; display: inline-flex; gap: .4rem; align-items: center; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary-600); border-bottom-color: var(--primary-600); }
.pills { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pill { padding: .35rem .8rem; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--text-2); font-size: .85rem; font-weight: 550; text-decoration: none !important; display: inline-flex; gap: .4rem; align-items: center; }
.pill:hover { border-color: var(--border-strong); }
.pill.active { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }

/* ---------- Alertes ---------- */
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid; font-size: .92rem; }
.alert > .icon { margin-top: 2px; }
.alert > div { flex: 1; }
.alert-success { background: var(--green-50); border-color: #bbf7d0; color: #14532d; }
.alert-error { background: var(--red-50); border-color: #fecaca; color: #7f1d1d; }
.alert-warning { background: var(--amber-50); border-color: #fde68a; color: #78350f; }
.alert-info { background: var(--primary-50); border-color: var(--primary-100); color: #1e3a8a; }
.alert-close { border: 0; background: none; cursor: pointer; color: inherit; opacity: .6; padding: 2px; }
.alert-close:hover { opacity: 1; }
.note { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: .75rem 1rem; color: var(--text-2); font-size: .88rem; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state .icon { color: #94a3b8; margin-bottom: .5rem; }
.empty-state h3 { color: var(--text); margin-bottom: .3rem; }
.empty-state.big { padding: 4rem 1rem; }
.empty-state.big h2 { color: var(--text); }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 1.25rem; right: 1.25rem; background: #0f172a; color: #fff; padding: .65rem 1rem; border-radius: 8px; font-size: .88rem; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; pointer-events: none; z-index: 100; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--red); }

/* ---------- Dialogues ---------- */
dialog { border: 0; border-radius: 14px; padding: 0; box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 2rem)); }
dialog::backdrop { background: rgba(15, 23, 42, .45); }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
dialog .dlg-head h3 { margin: 0; }
dialog .dlg-body { padding: 1.2rem; }
dialog .dlg-foot { padding: .9rem 1.2rem; border-top: 1px solid var(--border); background: var(--surface-2); display: flex; justify-content: flex-end; gap: .5rem; }

/* ---------- Auth ---------- */
.no-sidebar { background: radial-gradient(1200px 600px at 10% -10%, #dbe6fe 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #e0e7ff 0, transparent 60%), var(--bg); }
.content-public { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 2rem; }
.auth-card.wide { max-width: 640px; }
.auth-brand { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.auth-brand h1 { margin: 0; font-size: 1.35rem; }
.auth-brand p { margin: 0; }
.auth-foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 1.2rem; }
.error-page { max-width: 560px; margin: 15vh auto; text-align: center; padding: 1rem; font-family: var(--font); }
.pw-field { position: relative; }
.pw-field input { padding-right: 2.6rem; }
.pw-field button { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); }
label > .pw-field { margin-top: .3rem; }

/* ---------- Fiche élève ---------- */
.profile-head { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.profile-head h2 { margin: 0 0 .2rem; font-size: 1.35rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: .55rem 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.list-plain li:last-child { border-bottom: 0; }
.eval-card { border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .6rem; background: #fff; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.eval-card h4 { margin: 0; font-size: .95rem; }
.eval-card p { margin: .2rem 0 0; color: var(--text-2); font-size: .85rem; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .35rem 1rem; }
.check-grid label { display: flex; align-items: center; gap: .5rem; font-size: .88rem; padding: .3rem .4rem; border-radius: 6px; cursor: pointer; }
.check-grid label:hover { background: var(--gray-50); }
.level-picks { display: flex; flex-wrap: wrap; gap: .3rem; }
.level-picks label { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border: 1px solid var(--border); border-radius: 999px; font-size: .82rem; font-weight: 500; cursor: pointer; user-select: none; }
.level-picks label:hover { border-color: var(--border-strong); }
.level-picks label:has(input:checked) { background: var(--primary-50); border-color: var(--primary-600); color: var(--primary-600); }
.level-picks input { width: 14px; height: 14px; margin: 0; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 1.5rem; text-align: center; background: var(--surface-2); color: var(--text-2); }
.dropzone.drag { border-color: var(--primary-600); background: var(--primary-50); }
.steps { display: flex; gap: .5rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--muted); }
.step b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-50); border: 1px solid var(--border); font-size: .78rem; }
.step.on { color: var(--text); font-weight: 600; }
.step.on b { background: var(--primary-600); color: #fff; border-color: var(--primary-600); }
.step + .step::before { content: ""; width: 24px; height: 1px; background: var(--border-strong); margin-right: .3rem; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: middle; }
.sticky-save { position: sticky; bottom: 0; background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px); border-top: 1px solid var(--border); padding: .8rem 0; margin-top: 1rem; display: flex; justify-content: flex-end; gap: .5rem; z-index: 5; }
.bulletin-screen { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; max-width: 900px; }
.remark-row { display: grid; grid-template-columns: 260px 1fr; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.remark-row:last-child { border-bottom: 0; }
.remark-row textarea { min-height: 90px; }
.saved-flag { font-size: .75rem; color: var(--muted); min-height: 1em; }
.saved-flag.ok { color: var(--green); }
.saved-flag.err { color: var(--red); }

@media (max-width: 1100px) {
  .cols, .cols-rev { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  .main-wrap { margin-left: 0; }
  .only-mobile { display: inline-flex; }
  .content { padding: 1rem 1rem 3rem; }
  .topbar { padding: 0 1rem; }
  .user-name { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .remark-row { grid-template-columns: 1fr; }
  .grid-table thead th { top: 0; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .year-switch select { max-width: 120px; }
}
@media print {
  .sidebar, .topbar, .page-actions, .no-print, .tabs, .banner-past, .toast { display: none !important; }
  .main-wrap { margin: 0; }
  .content { padding: 0; }
  body { background: #fff; }
  .bulletin-screen { border: 0; box-shadow: none; padding: 0; }
}
.default-submit { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.seg button.on.s-prepa { background: #fff; color: #334155; box-shadow: inset 0 0 0 1px var(--border-strong); }
.seg button.on.s-ouvert { background: var(--green-50); color: var(--green); box-shadow: inset 0 0 0 1px #86efac; }
.seg button.on.s-verrouille { background: var(--amber-50); color: var(--amber); box-shadow: inset 0 0 0 1px #fcd34d; }
.grid-wrap { max-height: calc(100vh - 210px); overflow: auto; }
.grid-wrap .grid-table thead th { top: 0; }
select.mention-select { width: 8.2rem; text-overflow: ellipsis; }
@media (max-width: 860px) { .bulletin-screen { padding: 1rem .8rem; } .bdoc-table .c-comment { font-size: .85em; } }
.btn.vis-on { background: var(--green-50); border-color: #86efac; color: var(--green); }
.btn.vis-off { color: var(--muted); border-style: dashed; }
.col-head .inline-form { margin-top: .15rem; }
textarea.required-missing { border-color: #f87171; background: #fff7f7; }
.brand-img { width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.brand-img.lg { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 6px 18px rgba(30, 64, 175, .18); }
.impersonation-bar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: flex; gap: .8rem; align-items: center; justify-content: center; flex-wrap: wrap; padding: .55rem 1rem; background: #fde047; color: #422006; font-size: .88rem; box-shadow: 0 -4px 16px rgba(0, 0, 0, .15); }
.impersonation-bar form { margin: 0; }
body:has(.impersonation-bar) .content { padding-bottom: 5rem; }
#grid-ov select.mention-select { width: 5.2rem; min-width: 0; font-size: .78rem; padding: .25rem .3rem; }
.chip { white-space: nowrap; }
.sortable { list-style: none; margin: 0; padding: 0; min-height: 60px; border-radius: var(--radius); transition: background .15s; }
.sortable.drag-over { background: var(--primary-50); }
.sortable-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; margin-bottom: .4rem; background: #fff; border: 1px solid var(--border); border-radius: 8px; cursor: grab; box-shadow: var(--shadow); transition: box-shadow .15s, background .4s; }
.sortable-item:hover { border-color: var(--border-strong); }
.sortable-item.dragging { opacity: .45; cursor: grabbing; }
.sortable-item.moved { background: #fffbeb; }
.drag-handle { color: #94a3b8; font-weight: 700; letter-spacing: -2px; user-select: none; }
.sortable-empty { display: none; padding: 1rem; text-align: center; border: 2px dashed var(--border-strong); border-radius: 8px; }
.sortable.is-empty .sortable-empty, .sortable.drag-over .sortable-empty { display: block; }

/* ---------- Page de connexion : logo mis en valeur ---------- */
.login-page { background: radial-gradient(1000px 520px at 0% 0%, #dbe6fe 0, transparent 60%), radial-gradient(900px 500px at 100% 100%, #fde9b0 0, transparent 55%), #eef2fb; }
.login-shell { width: 100%; max-width: 940px; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px rgba(15, 30, 61, .22), 0 2px 6px rgba(15, 30, 61, .06); }
.login-hero { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .4rem; padding: 3rem 2rem; color: #fff; background: linear-gradient(155deg, #0f1e3d 0%, #172a52 45%, #1e3a8a 100%); overflow: hidden; }
.login-logo-wrap { position: relative; display: grid; place-items: center; width: 240px; height: 240px; }
.login-logo-wrap::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(252, 196, 25, .28) 0, rgba(96, 165, 250, .16) 40%, transparent 68%); pointer-events: none; }
.login-logo-wrap::after { content: ""; position: absolute; width: 318px; height: 318px; border-radius: 50%; border: 2px solid rgba(252, 196, 25, .38); pointer-events: none; }
.login-logo { position: relative; z-index: 1; width: 240px; height: 240px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); animation: login-float 6s ease-in-out infinite; }
.login-title { position: relative; z-index: 1; margin-top: 1.1rem; font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; }
.login-school { position: relative; z-index: 1; color: #c7d2fe; font-size: .98rem; }
.login-panel { padding: 3rem 2.6rem; display: flex; flex-direction: column; justify-content: center; }
.login-panel h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
.login-panel > .muted { margin-bottom: 1.6rem; }
.login-logo-mobile { display: none; }
.btn-lg { padding: .78rem 1.2rem; font-size: 1rem; border-radius: 9px; }
@keyframes login-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .login-logo { animation: none; } }
@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; max-width: 440px; }
  .login-hero { display: none; }
  .login-panel { padding: 2rem 1.5rem 2.2rem; text-align: left; }
  .login-logo-mobile { display: block; width: 120px; height: 120px; margin: 0 auto 1rem; filter: drop-shadow(0 10px 18px rgba(15, 30, 61, .25)); }
  .login-panel h1, .login-panel > .muted { text-align: center; }
}

/* Logo dans le menu : coins transparents, pas de fond blanc */
.brand-img { width: 46px; height: 46px; background: none; border-radius: 0; box-shadow: none; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .35)); }
.brand-img.lg { width: 88px; height: 88px; background: none; box-shadow: none; filter: drop-shadow(0 6px 14px rgba(30, 64, 175, .25)); }
.login-shell { min-height: 540px; }
.login-hero { padding: 4rem 2rem 3.2rem; }
.login-title { margin-top: 2.9rem; }

/* ---------- Menu : groupes dépliables ---------- */
.nav-group { margin-top: .35rem; }
.nav-group > summary.nav-section { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; margin: .5rem 0 .2rem; padding: .45rem .7rem; border-radius: 8px; user-select: none; transition: background .15s, color .15s; }
.nav-group > summary.nav-section::-webkit-details-marker { display: none; }
.nav-group > summary.nav-section:hover { background: rgba(255, 255, 255, .06); color: #c7d2fe; }
.nav-group > summary .icon { transition: transform .2s; opacity: .8; }
.nav-group[open] > summary .icon { transform: rotate(180deg); }
.nav-group[open] > summary.nav-section { color: #dbe4ff; }
.nav-group-links { padding-bottom: .2rem; }

/* ---------- Bulletins (élève / parents) : année en cours vs années précédentes ---------- */
.year-block { margin-bottom: 1.6rem; }
.year-block.current { background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.3rem; }
.year-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .9rem; }
.year-head h2 { margin: 0; display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; }
.year-sub { margin: 1.1rem 0 .6rem; font-size: .98rem; color: var(--text-2); border-bottom: 1px solid var(--border); padding-bottom: .35rem; }
.tile-past { background: var(--surface-2); }
.tile-past .tile-title { color: var(--text-2); }

/* =====================================================================
 * Smartphone et petites tablettes (n'affecte pas l'affichage ordinateur)
 * ===================================================================== */
@media (max-width: 1100px) {
  .cols, .cols-rev { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .content { padding: .9rem .8rem 4rem; }
  h1 { font-size: 1.3rem; }
  .page-head { margin-bottom: 1rem; align-items: flex-start; }
  .page-head > div:first-child { min-width: 0; }
  .page-actions { width: 100%; }
  .page-actions .btn, .page-actions .inline-form { flex: 1 1 auto; }
  .page-actions .inline-form .btn { width: 100%; }

  /* Barre du haut */
  .topbar { height: 56px; gap: .5rem; }
  .year-switch { padding-left: .55rem; }
  .year-switch .icon { display: none; }
  .year-switch select { max-width: 132px; font-size: .8rem; }

  /* Cartes et en-têtes */
  .card { border-radius: 12px; margin-bottom: 1rem; }
  .card-head { padding: .8rem .9rem; gap: .6rem; }
  .card-head > .btn-group, .card-head > .flex { width: 100%; }
  .card-body { padding: .9rem; }
  .card-foot { padding: .75rem .9rem; }
  .card-foot .btn { flex: 1 1 auto; }

  /* Outils, filtres, onglets */
  .toolbar { gap: .5rem; }
  .toolbar .search { max-width: none; min-width: 0; flex: 1 1 100%; }
  .toolbar select { flex: 1 1 auto; }
  .tabs { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: .6rem .75rem; font-size: .86rem; }
  .pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: none; }
  .pills::-webkit-scrollbar { display: none; }
  .pill { white-space: nowrap; }

  /* Listes : lignes empilées en fiches */
  .table.stack-sm thead { display: none; }
  .table.stack-sm, .table.stack-sm tbody { display: block; }
  .table.stack-sm tr { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .7rem; padding: .75rem .9rem; border-bottom: 1px solid var(--border); }
  .table.stack-sm tbody tr:last-child { border-bottom: 0; }
  .table.stack-sm td { display: block; padding: 0; border: 0; }
  .table.stack-sm td:empty { display: none; }
  .table.stack-sm td.actions { width: 100%; text-align: left; white-space: normal; display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }
  .table.stack-sm td.actions > * { margin-left: 0; }
  .table.stack-sm tr.group-row td { width: 100%; }
  .table.stack-sm tr:hover td { background: none; }
  .table.stack-sm .seg { flex-wrap: wrap; }

  /* Grilles d'encodage : défilement horizontal, colonne élève plus étroite */
  .grid-wrap { max-height: none; border-radius: 10px; }
  .grid-table th:first-child, .grid-table td:first-child { min-width: 138px; max-width: 160px; }
  .grid-table .person { gap: .4rem; }
  .grid-table .avatar.xs { display: none; }
  textarea.comment { min-width: 220px; }

  /* Fiche élève */
  .profile-head { gap: .9rem; }
  .avatar.xl { width: 84px; height: 84px; font-size: 1.5rem; border-radius: 14px; }
  .avatar.lg { width: 72px; height: 72px; font-size: 1.2rem; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dd { margin-bottom: .45rem; }

  /* Formulaires & dialogues */
  dialog { width: calc(100vw - 1rem); max-height: calc(100vh - 1rem); }
  dialog .dlg-body { max-height: calc(100vh - 11rem); overflow: auto; }
  .sticky-save { flex-wrap: wrap; }
  .sticky-save .btn { flex: 1 1 auto; }
  .eval-card { flex-wrap: wrap; }
  .bulletin-screen { padding: .9rem .7rem; border-radius: 10px; }
  .impersonation-bar { font-size: .78rem; padding: .45rem .7rem; gap: .4rem; }
  .year-block.current { padding: .9rem; }
}
@media (max-width: 520px) {
  /* Compteurs du tableau de bord : 2 colonnes compactes */
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .stat { padding: .7rem .75rem; gap: .6rem; }
  .stat-icon { width: 34px; height: 34px; border-radius: 9px; }
  .stat-icon .icon { width: 18px; height: 18px; }
  .stat-value { font-size: 1.15rem; }
  .stat-label { font-size: .74rem; }
  .btn { padding: .55rem .85rem; }
  .user-menu summary > .icon { display: none; }
}
.sm-label { display: none; }
@media (max-width: 860px) { .sm-label { display: inline; color: var(--muted); font-size: .85em; } }
@media (max-width: 860px) {
  .hide-sm { display: none; }
  .grid-2.stats-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .stats-pair .stat { padding: .7rem; gap: .55rem; align-items: flex-start; }
  .stats-pair .stat-icon { width: 34px; height: 34px; }
  .stats-pair .stat-value { font-size: 1.1rem; }
  .stats-pair .progress { width: 100%; }
}

/* ---------- Délibération : tout sur un écran ---------- */
.delib-page .content { padding-top: 1rem; padding-bottom: 1rem; }
.delib-bar { display: flex; align-items: flex-end; gap: .8rem 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.delib-title { margin-right: auto; }
.delib-title h1 { margin: 0; font-size: 1.35rem; }
.delib-title .back-link { margin-bottom: .1rem; }
.delib-select { width: auto; padding: .45rem .6rem; font-size: .9rem; }
.delib-student { min-width: 240px; font-weight: 600; }
.delib-nav { display: flex; align-items: center; gap: .4rem; }
.btn.disabled { opacity: .4; pointer-events: none; }
.delib-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: .9rem; align-items: start; }
.delib-courses { padding: .8rem 1rem; margin: 0; }
.delib-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.delib-cols h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 0 0 .35rem; padding-bottom: .3rem; border-bottom: 2px solid var(--primary-100); }
.delib-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.delib-table td { padding: .3rem .2rem; border-bottom: 1px solid var(--border); line-height: 1.25; }
.delib-table tr:last-child td { border-bottom: 0; }
.delib-table td.right { text-align: right; white-space: nowrap; }
.delib-table .chip { min-width: 0; font-size: .76rem; padding: .14rem .5rem; }
.delib-table tr.is-failure td:first-child { color: var(--red); font-weight: 600; }
.delib-side { display: grid; gap: .9rem; }
.delib-side .card { margin: 0; padding: .8rem .9rem; }
.delib-name { font-weight: 700; font-size: 1.05rem; }
.delib-counts { display: flex; flex-wrap: wrap; gap: .35rem .7rem; margin: .7rem 0 .55rem; font-size: .88rem; }
.delib-count.fail { font-weight: 700; color: var(--red); }
.delib-alert { font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: .35rem; padding: .4rem .55rem; border-radius: 7px; }
.delib-alert.good { background: var(--green-50); color: var(--green); }
.delib-alert.bad { background: var(--red-50); color: var(--red); }
.delib-fhead { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.delib-fhead h3 { margin: 0; font-size: .92rem; display: flex; gap: .35rem; align-items: center; }
.delib-formation .progress { width: 100%; margin-bottom: .35rem; }
.delib-list { list-style: none; margin: 0 0 .2rem; padding: 0; font-size: .82rem; }
.delib-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .18rem 0; border-bottom: 1px dashed var(--border); }
.delib-list li:last-child { border-bottom: 0; }
.delib-item { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delib-list .badge, .delib-list .chip { font-size: .7rem; padding: .08rem .4rem; }
@media (max-width: 1100px) { .delib-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .delib-cols { grid-template-columns: minmax(0, 1fr); }
  .delib-nav { width: 100%; }
  .delib-student { min-width: 0; flex: 1; }
  .delib-nav .btn span { display: none; }
}
/* Délibération : portrait de l'élève */
.delib-id { display: flex; gap: .9rem; align-items: flex-start; }
.delib-photo { width: 104px; height: 130px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); flex-shrink: 0; background: var(--surface-2); }
.delib-photo.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #312e81; }
.delib-photo.empty span { font-size: 1.8rem; font-weight: 700; }
.delib-photo.empty small { font-size: .68rem; color: #4f46e5; }
@media (max-width: 760px) { .delib-photo { width: 84px; height: 105px; } }
/* Délibération : décision finale */
.delib-decision { border-left: 4px solid var(--primary-600) !important; }
.delib-decision-select { font-weight: 600; font-size: .95rem; }
.delib-decision-value { font-weight: 700; color: var(--primary); }
.delib-decision .saved-flag { min-height: 0; }

/* ---------- Tableau de bord « Formation » ---------- */
.text-red { color: var(--red); }
.fm-table .col-head { min-width: 38px; }
.fm-table .col-head span { font-size: .78rem; }
.fm-table .col-head small { font-size: .66rem; }
.fm-table td.center { padding: .3rem .25rem; }
.fm-table th.fm-sep, .fm-table td.fm-sep { border-left: 2px solid var(--border-strong); }
.fm-table tr.group-row td { background: var(--surface-2); font-weight: 650; font-size: .82rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.fm-table .person small { display: block; font-size: .72rem; }
.fcell { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 4px; border-radius: 5px; font-size: .74rem; font-weight: 700; line-height: 1; background: var(--gray-50); color: var(--text-2); cursor: default; vertical-align: middle; }
.fcell.ok { background: var(--green-50); color: var(--green); }
.fcell.prog { background: var(--amber-50); color: var(--amber); }
.fcell.todo { background: var(--gray-50); }
.fcell.future { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--gray-50) 4px 7px); border: 1px dashed var(--border); }
.fcell.late { box-shadow: inset 0 0 0 2px var(--red); color: var(--red); }
.fcell.todo.late { background: var(--red-50); }
.fm-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: .9rem; font-size: .8rem; color: var(--text-2); }
.fm-legend > span { display: inline-flex; align-items: center; gap: .4rem; }
.fm-tile-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: .5rem; margin-top: .45rem; font-size: .82rem; color: var(--text-2); }
.fm-tile-row .progress { width: 100%; }
/* Délibération : SIPS (gauche) et stages (droite) sous le tableau des cours */
.delib-main { display: grid; gap: .9rem; min-width: 0; }
.delib-formation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; align-items: start; }
.delib-formation-grid .card { margin: 0; padding: .8rem .9rem; }
@media (max-width: 760px) { .delib-formation-grid { grid-template-columns: minmax(0, 1fr); } }
.select-sm { width: auto; padding: .3rem .5rem; font-size: .82rem; }
/* Délibération : décompte des mentions par groupe de cours, résultats globaux */
.delib-count-table { display: grid; gap: .3rem; margin: .7rem 0 .55rem; }
.delib-count-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: .5rem; align-items: center; padding: .2rem 0; border-bottom: 1px dashed var(--border); }
.delib-count-row:last-child { border-bottom: 0; }
.delib-count-row.total .delib-count-lbl { color: var(--text); }
.delib-count-lbl { font-size: .74rem; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); }
.delib-count-row .delib-counts { margin: 0; font-size: .84rem; gap: .25rem .55rem; }
.delib-gm-field { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: .5rem; margin: .35rem 0 0; font-weight: 600; font-size: .88rem; }
.delib-gm-field .mention-select { width: 100%; }
/* Type de bulletin : badge + bouton (gestion d'un bulletin), choix dans un dialogue */
.btype-cell { display: flex; align-items: center; gap: .25rem; margin-top: .35rem; flex-wrap: wrap; }
.btype-cell .badge { white-space: nowrap; }
.radio-card { display: flex !important; gap: .7rem; align-items: flex-start; padding: .65rem .8rem; border: 1px solid var(--border); border-radius: 10px; margin-bottom: .5rem; cursor: pointer; font-weight: 400 !important; }
.radio-card:hover { border-color: var(--border-strong); }
.radio-card:has(input:checked) { border-color: var(--primary-600); background: var(--primary-50); }
.radio-card input { margin-top: .2rem; }
.radio-card span { display: flex; flex-direction: column; gap: .1rem; }
.radio-card small { color: var(--text-2); font-size: .8rem; }
/* Gestion d'un bulletin : avancement (mentions + remarques) dans une seule colonne */
.bprog { display: grid; grid-template-columns: 74px auto; align-items: center; gap: .4rem; font-size: .78rem; color: var(--text-2); }
.bprog + .bprog { margin-top: .35rem; }
.bprog { grid-template-columns: 70px 64px auto; }
.bprog .progress { width: 64px; }
.bprog .progress-label { white-space: nowrap; }
#classes .seg button { padding: .32rem .5rem; }
