/* FEG Course Registration – design system */
:root {
  --ink: #0b1324; --ink-2: #334155; --mute: #64748b; --line: #e5e9f0; --line-2: #eef1f6;
  --bg: #f6f7fb; --card: #ffffff;
  --brand: #1e3a8a; --brand-2: #2f4fd6; --brand-soft: #eef2ff;
  --ok: #059669; --ok-soft: #ecfdf5; --warn: #b45309; --warn-soft: #fffbeb; --bad: #dc2626; --bad-soft: #fef2f2;
  --r: 14px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(11,19,36,.04), 0 4px 16px rgba(11,19,36,.06);
  --shadow-lg: 0 10px 40px rgba(11,19,36,.14);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 750; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 650; }
small { display: block; color: var(--mute); font-size: 12.5px; }
code { background: var(--line-2); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.muted { color: var(--mute); } .small { font-size: 13.5px; } .tiny { font-size: 12px; margin: 10px 0 0; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-2); margin-bottom: 8px; }

/* layout */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px); background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand b { display: block; font-size: 15px; } .brand small { margin: 0; }
.logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; font-weight: 800; font-size: 12px; letter-spacing: .04em;
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 4px 12px rgba(47,79,214,.35); }
.topbar nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.topbar nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 9px; font-weight: 550; font-size: 14px; }
.topbar nav a:hover, .topbar nav a.on { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.topbar nav a.ghost { border: 1px solid var(--line); }
.who { color: var(--mute); font-size: 13.5px; padding: 0 6px; }
main.wrap { width: min(1080px, 100%); margin: 0 auto; padding: 32px clamp(16px, 4vw, 32px) 64px; flex: 1; }
main.wide { width: min(1400px, 100%); margin: 0 auto; padding: 28px clamp(16px, 3vw, 32px) 64px; flex: 1; }
body.narrow main { display: grid; place-items: start center; }
.foot { text-align: center; color: var(--mute); font-size: 12.5px; padding: 24px; border-top: 1px solid var(--line); }

/* components */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; color: var(--ink); transition: .15s; white-space: nowrap; }
.btn:hover { border-color: #cbd5e1; background: #f8fafc; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(30,58,138,.25); }
.btn.primary:hover { background: #1b347d; }
.btn.danger { color: var(--bad); border-color: #fecaca; }
.btn.lg { padding: 14px 22px; font-size: 15px; border-radius: 12px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.icon { width: 38px; padding: 8px 0; font-size: 18px; }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { padding: 12px 16px; border-radius: var(--r-sm); margin: 0 0 16px; font-size: 14px; border: 1px solid; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert.error { background: var(--bad-soft); border-color: #fecaca; color: #991b1b; }
.alert.success { background: var(--ok-soft); border-color: #a7f3d0; color: #065f46; }
.alert.warn { background: var(--warn-soft); border-color: #fde68a; color: #92400e; }
.alert.info { background: var(--brand-soft); border-color: #c7d2fe; color: var(--brand); }
.pill, .tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.tag { padding: 1px 8px; font-size: 11px; margin-left: 6px; }
.tag.warn { background: var(--warn-soft); color: var(--warn); } .tag.ok { background: var(--ok-soft); color: var(--ok); }

/* forms */
.form { display: grid; gap: 14px; margin-top: 18px; }
label, .field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input, select { font: inherit; font-size: 15px; padding: 11px 13px; border: 1px solid #d6dce6; border-radius: var(--r-sm); background: #fff; color: var(--ink); width: 100%; transition: .15s; }
input:focus, select:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(47,79,214,.14); }
input[type=checkbox] { width: auto; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--line-2); border-radius: 12px; }
.seg button { font: inherit; font-size: 13.5px; font-weight: 600; border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; cursor: pointer; color: var(--ink-2); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(11,19,36,.12); }
.seg.small button { padding: 5px 11px; font-size: 13px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 550; cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.toggle input { width: 16px; height: 16px; accent-color: var(--brand-2); }
.auth { width: min(440px, 100%); margin-top: 6vh; padding: 32px; }
.auth .links { font-size: 13.5px; text-align: center; margin: 18px 0 0; }

/* home */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; padding: 24px 0 40px; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -.035em; }
.lead { font-size: 17px; color: var(--ink-2); max-width: 52ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 14px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 16px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.steps li > b { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.steps h3 { margin: 4px 0 2px; } .steps p { margin: 0; color: var(--mute); font-size: 14px; }
.rules ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--ink-2); }

/* picker */
.select-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.identity { margin-bottom: 18px; }
.identity-title { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.identity-title h2 { margin: 0; } .identity-title p { margin: 0; font-size: 13.5px; }
.num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }
.grid-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-form .field { grid-column: span 2; }
.identity.locked { padding: 16px 20px; }
.who-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.who-line > div:nth-child(2) { margin-right: auto; } .who-line .muted { display: block; font-size: 13px; }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #c7d2fe, #a5b4fc); color: var(--brand); font-weight: 800; }
.picker { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.toolbar { position: sticky; top: 64px; z-index: 10; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px; margin-bottom: 14px;
  background: rgba(246,247,251,.9); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--r); }
.toolbar .search { flex: 1 1 260px; } .toolbar select { flex: 0 1 320px; width: 320px; max-width: 100%; }
.empty { padding: 48px 20px; text-align: center; color: var(--mute); background: #fff; border: 1px dashed #cfd6e2; border-radius: var(--r); }
.group { margin-bottom: 22px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 4px 8px; }
.group-head h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin: 0; }
.group-head span { font-size: 12px; color: var(--mute); white-space: nowrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.course { display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%;
  padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: .15s; }
.course:hover { border-color: #b9c4f5; box-shadow: 0 4px 14px rgba(47,79,214,.1); transform: translateY(-1px); }
.course.sel { border-color: var(--brand-2); background: linear-gradient(0deg, #f5f7ff, #fff); box-shadow: 0 0 0 3px rgba(47,79,214,.12); }
.course.disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.tick { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid #cbd5e1; display: grid; place-items: center; transition: .15s; }
.course.sel .tick { background: var(--brand-2); border-color: var(--brand-2); }
.course.sel .tick::after { content: "✓"; color: #fff; font-size: 13px; font-weight: 800; }
.c-main { flex: 1; min-width: 0; } .c-main b { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.c-side { display: grid; justify-items: end; gap: 4px; flex: none; }
.cred { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.seats { font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; }
.seats.free { color: var(--mute); background: var(--line-2); } .seats.ok { color: var(--ok); background: var(--ok-soft); }
.seats.low { color: var(--warn); background: var(--warn-soft); } .seats.full { color: var(--bad); background: var(--bad-soft); }
.fit { font-size: 11.5px; font-weight: 600; } .fit.ok { color: var(--ok); } .fit.ok::before { content: "● "; }
.fit.ko { color: var(--bad); } .fit.ko::before { content: "● "; } .fit.none, .fit.wait { color: #94a3b8; }

.cart { position: sticky; top: 80px; }
.cart-inner { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.meter { margin: 6px 0 12px; } .meter-top { display: flex; align-items: baseline; gap: 6px; }
.meter-top b { font-size: 36px; letter-spacing: -.03em; } .meter-top span { color: var(--mute); font-weight: 600; }
.bar { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--brand-2); border-radius: 99px; transition: width .3s; }
.bar i.ok { background: var(--ok); } .bar i.over { background: var(--bad); }
.rule { font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.rule .ok, .rule .warn { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; margin-right: 4px; }
.rule .ok { background: var(--ok); } .rule .warn { background: var(--warn); }
.chosen { list-style: none; margin: 0 0 14px; padding: 0; max-height: 42vh; overflow: auto; border-top: 1px solid var(--line-2); }
.chosen li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.chosen li i { flex: none; width: 8px; height: 30px; border-radius: 4px; }
.chosen li span { flex: 1; min-width: 0; line-height: 1.3; }
.chosen li button { border: 0; background: none; font-size: 20px; line-height: 1; color: #94a3b8; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.chosen li button:hover { color: var(--bad); background: var(--bad-soft); }
.chosen .empty-li { justify-content: center; padding: 22px 0; }
.clash { font-size: 13px; color: var(--warn); background: var(--warn-soft); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 12px; }
.mobile-bar { display: none; }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(11,19,36,.45); backdrop-filter: blur(4px); padding: 20px; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 20px; padding: 36px; max-width: 460px; text-align: center; box-shadow: var(--shadow-lg); animation: pop .25s ease; }
.check { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; color: #fff; background: var(--ok); box-shadow: 0 8px 24px rgba(5,150,105,.35); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }

/* timetable */
.me-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.me-head p { margin: 0; } .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dropdown { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 290px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; color: var(--ink); font: inherit; font-size: 14px; border: 0; background: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--brand-soft); text-decoration: none; }
.tt-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.tt-side { position: sticky; top: 80px; padding: 20px; }
.legend { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.legend li { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #fafbfd; border: 1px solid var(--line-2); border-left: 4px solid var(--c); font-size: 14px; }
.legend li b { display: block; font-weight: 600; line-height: 1.3; }
.grp { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--mute); }
.grp select { padding: 4px 8px; font-size: 12.5px; width: auto; }
.warn-t { color: var(--warn) !important; }
.tt-main { padding: 16px; overflow: hidden; }
.tt-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tt-nav h2 { margin: 0 auto 0 10px; font-size: 17px; }
.cal-grid { display: grid; grid-template-columns: 52px repeat(var(--days), minmax(0, 1fr)); grid-template-rows: auto 780px; }
.cal-corner { border-bottom: 1px solid var(--line); }
.cal-day-h { display: flex; flex-direction: column; align-items: center; padding: 6px 0 10px; border-bottom: 1px solid var(--line); }
.cal-day-h span { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.cal-day-h b { font-size: 20px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; }
.cal-day-h.today b { background: var(--brand-2); color: #fff; }
.cal-hours { position: relative; }
.cal-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: #94a3b8; }
.cal-col { position: relative; border-left: 1px solid var(--line-2);
  background-image: linear-gradient(to bottom, var(--line-2) 1px, transparent 1px); background-size: 100% calc(100% / 12.5); }
.ev { position: absolute; padding: 5px 7px; border-radius: 8px; overflow: hidden; font-size: 12px; line-height: 1.25; cursor: default;
  background: color-mix(in srgb, var(--c) 13%, #fff); border-left: 3px solid var(--c); color: var(--ink); box-shadow: 0 1px 2px rgba(11,19,36,.06); margin: 0 2px; }
.ev b { display: block; font-weight: 650; color: color-mix(in srgb, var(--c) 70%, #000); }
.ev small { font-size: 11px; color: var(--ink-2); }
.ev.clash { background: repeating-linear-gradient(135deg, #fee2e2, #fee2e2 6px, #fff1f2 6px, #fff1f2 12px); border-left-color: var(--bad); outline: 1px solid #fca5a5; }
.agenda h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }
.agenda ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.agenda li { display: flex; gap: 14px; padding: 10px 12px; border-radius: 10px; border-left: 4px solid var(--c); background: #fafbfd; }
.agenda li.clash { background: var(--bad-soft); }
.agenda time { font-variant-numeric: tabular-nums; font-weight: 600; width: 96px; flex: none; }
.empty-state { text-align: center; padding: 48px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 60; box-shadow: var(--shadow-lg); }

/* admin */
.admin-tabs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.admin-tabs a:not(.btn) { padding: 8px 14px; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.admin-tabs a.on { background: var(--brand); color: #fff; } .admin-tabs .btn { margin-left: auto; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.kpi span { font-size: 13px; color: var(--mute); } .kpi b { display: block; font-size: 30px; letter-spacing: -.02em; }
.ok-t { color: var(--ok); } .ko-t { color: var(--bad); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; } .two .card { display: grid; gap: 12px; align-content: start; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); padding: 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr.off td { opacity: .5; }
.tbl .fill { min-width: 160px; } .tbl .fill .bar { margin-bottom: 4px; }
.cap { width: 90px; padding: 6px 8px; }
.filter { margin: 8px 0 12px; max-width: 360px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* responsive */
@media (max-width: 1100px) {
  .picker { grid-template-columns: 1fr; }
  .cart { position: static; }
  .mobile-bar { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 35; align-items: center; justify-content: space-between;
    background: var(--ink); color: #fff; padding: 10px 10px 10px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); }
  .tt-layout { grid-template-columns: 1fr; } .tt-side { position: static; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .grid-form { grid-template-columns: 1fr 1fr; } .grid-form .field { grid-column: span 2; }
  .kpis { grid-template-columns: 1fr 1fr; } .two { grid-template-columns: 1fr; }
  .toolbar { position: static; }
  .cal-grid { grid-template-rows: auto 680px; }
  .ev small { display: none; }
}
@media (max-width: 560px) {
  .grid-form { grid-template-columns: 1fr; } .grid-form .field { grid-column: auto; }
  .topbar .who { display: none; }
  .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* =====================================================================
   Thème FEG — éditorial, carré (remplace le thème arrondi ci-dessus)
   Orange FEG : changer --brand ici seulement.
   ===================================================================== */
:root {
  --ink: #111111; --ink-2: #2b2b2b; --mute: #6b6b6b; --line: #d9d6d0; --line-2: #ece9e3;
  --bg: #f4f2ee; --card: #ffffff;
  --brand: #e2571e; --brand-2: #c2410c; --brand-soft: #fdeee6;
  --teal: #0b5d63; --ok: #0b5d63; --ok-soft: #e6f1f1; --warn: #a15c00; --warn-soft: #fff4e0; --bad: #c5221f; --bad-soft: #fcebea;
  --r: 0; --r-sm: 0; --shadow: none; --shadow-lg: 0 18px 50px rgba(0,0,0,.18);
  --serif: "Libre Caslon Text", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
}
body { background: var(--bg); font-size: 15px; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 3.6vw, 44px); }
h2 { font-size: 22px; }
h3 { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; }
.eyebrow { color: var(--brand); letter-spacing: .14em; font-size: 11px; font-weight: 700; }
.eyebrow::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--brand); vertical-align: middle; margin-right: 10px; }

/* barre du haut : noire, filet orange */
.topbar { background: var(--ink); border-bottom: 4px solid var(--brand); backdrop-filter: none; padding-top: 0; padding-bottom: 0; min-height: 64px; }
.brand, .brand b { color: #fff; } .brand small { color: #b8b8b8; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.logo { width: 44px; height: 44px; border-radius: 0; background: var(--brand); box-shadow: none; font-size: 13px; letter-spacing: .06em; }
.topbar nav a { color: #e9e9e9; border-radius: 0; padding: 22px 14px; font-weight: 500; }
.topbar nav a:hover, .topbar nav a.on { background: transparent; color: #fff; box-shadow: inset 0 -4px 0 var(--brand); }
.topbar nav a.ghost { border: 1px solid #555; padding: 8px 14px; margin-left: 8px; }
.topbar nav a.ghost:hover { border-color: #fff; box-shadow: none; }
.who { color: #9c9c9c; }
.foot { background: var(--ink); color: #9c9c9c; border: 0; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }

/* éléments carrés */
.card, .cart-inner, .steps li, .kpi, .menu, .modal-box, .toolbar, .empty, .course, .legend li, .agenda li, .alert, .btn, input, select, .seg, .seg button, .tick, .pill, .tag, .seats, .bar, .bar i, .ev, .chosen li i, .avatar, .num, .check, .toast, .cal-day-h b, .admin-tabs a, .steps li > b, .logo { border-radius: 0 !important; }
.card, .cart-inner, .kpi { border: 1px solid var(--line); box-shadow: none; }
.btn { font-weight: 600; letter-spacing: .02em; border-color: var(--ink); color: var(--ink); background: transparent; }
.btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: none; }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); }
.btn.lg { padding: 15px 26px; text-transform: uppercase; font-size: 13px; letter-spacing: .1em; }
input:focus, select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(226,87,30,.25); }
input, select { border-color: #c9c5bd; }
.seg { background: transparent; padding: 0; gap: 0; border: 1px solid var(--ink); }
.seg button { border-right: 1px solid var(--ink); padding: 10px 16px; color: var(--ink); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: #fff; box-shadow: none; }
.toggle input { accent-color: var(--brand); }
a { color: var(--brand-2); }
.alert { border-width: 0 0 0 4px; }
.alert.info { background: var(--brand-soft); border-color: var(--brand); color: #7a2d0a; }
.alert.success { border-color: var(--teal); background: var(--ok-soft); color: var(--teal); }

/* accueil */
.hero { border-bottom: 1px solid var(--ink); padding-bottom: 48px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6vw, 72px); letter-spacing: -.02em; line-height: 1.02; }
.lead { font-size: 18px; }
.steps { gap: 0; border-top: 1px solid var(--ink); }
.steps li { background: transparent; border: 0; border-bottom: 1px solid var(--line); box-shadow: none; padding: 20px 0; }
.steps li > b { background: transparent; color: var(--brand); font-family: var(--serif); font-size: 30px; font-weight: 400; width: 46px; height: auto; place-items: start; }
.steps h3 { margin: 6px 0 4px; }
.rules { margin-top: 40px; background: transparent; border: 0; border-left: 4px solid var(--brand); padding: 4px 0 4px 24px; }

/* sélection */
.num { background: var(--brand); }
.identity-title h2 { font-size: 24px; }
.toolbar { background: var(--bg); border: 0; border-bottom: 1px solid var(--ink); padding: 12px 0; top: 68px; }
.group-head { border-bottom: 2px solid var(--ink); padding: 0 0 8px; margin-bottom: 0; }
.group-head h3 { color: var(--ink); }
.cards { gap: 0; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); border-left: 1px solid var(--line); }
.course { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; padding: 16px; }
.course:hover { transform: none; box-shadow: inset 4px 0 0 var(--ink); border-color: var(--line); }
.course.sel { background: #fff8f4; box-shadow: inset 4px 0 0 var(--brand); border-color: var(--line); }
.tick { border: 1.5px solid var(--ink); width: 20px; height: 20px; }
.course.sel .tick { background: var(--brand); border-color: var(--brand); }
.seats { padding: 1px 6px; text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; }
.seats.ok { color: var(--teal); background: var(--ok-soft); }
.fit.ok { color: var(--teal); }
.cart { top: 84px; }
.cart-inner { border-top: 4px solid var(--ink); }
.cart h2 { font-size: 26px; }
.meter-top b { font-family: var(--serif); font-weight: 400; font-size: 56px; line-height: 1; }
.bar { height: 4px; } .bar i { background: var(--brand); } .bar i.ok { background: var(--teal); }
.rule .ok { background: var(--teal); }
.chosen li i { width: 4px; }
.mobile-bar { border-radius: 0; left: 0; right: 0; bottom: 0; border-top: 4px solid var(--brand); }
.check { background: var(--teal); box-shadow: none; }
.modal-box { border-top: 6px solid var(--brand); text-align: left; } .modal-box .check { margin: 0 0 16px; }

/* calendrier */
.tt-main { padding: 0; } .tt-nav { padding: 14px 16px; border-bottom: 1px solid var(--ink); margin: 0; }
.tt-nav h2 { font-size: 22px; }
.cal { padding: 0 16px 16px; }
.cal-day-h { border-bottom: 1px solid var(--ink); }
.cal-day-h span { color: var(--ink); }
.cal-day-h b { font-family: var(--serif); font-weight: 400; font-size: 24px; }
.cal-day-h.today b { background: var(--brand); }
.ev { margin: 0 1px; box-shadow: none; border-left-width: 4px; }
.tt-side h2, .tt-side { border-top: 4px solid var(--ink); }
.tt-side h2 { border: 0; }
.legend { gap: 0; } .legend li { background: #fff; border: 0; border-bottom: 1px solid var(--line); border-left: 4px solid var(--c); }
.menu { border: 1px solid var(--ink); padding: 0; } .menu a, .menu button { border-radius: 0; border-bottom: 1px solid var(--line); }
.menu a:hover, .menu button:hover { background: var(--brand-soft); }

/* admin */
.admin-tabs { border-bottom: 2px solid var(--ink); padding-bottom: 0; gap: 0; }
.admin-tabs a:not(.btn) { padding: 12px 18px; } .admin-tabs a.on { background: var(--ink); }
.admin-tabs .btn { margin-bottom: 6px; }
.kpi { border-top: 4px solid var(--brand); } .kpi b { font-family: var(--serif); font-weight: 400; font-size: 40px; }
.tbl th { color: var(--ink); border-bottom: 2px solid var(--ink); }
.ok-t { color: var(--teal); }
/* sélecteur de langue */
.langs { display: inline-flex; margin-left: 10px; border: 1px solid #555; }
.topbar nav .langs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: #9c9c9c; box-shadow: none; }
.topbar nav .langs a + a { border-left: 1px solid #555; }
.topbar nav .langs a svg { display: block; opacity: .55; filter: grayscale(.6); transition: .15s; }
.topbar nav .langs a.on { background: #fff; color: var(--ink); }
.topbar nav .langs a.on svg, .topbar nav .langs a:hover svg { opacity: 1; filter: none; }
.topbar nav .langs a:hover { color: #fff; box-shadow: none; }
.topbar nav .langs a.on:hover { color: var(--ink); }
@media (max-width: 560px) { .langs a span { display: none; } }

/* Orange FEG exact (logo) + barre de navigation blanche, sans marron ni rouge */
:root { --brand: #ff7a00; --brand-2: #e66e00; --brand-soft: #fff2e5; }
a { color: #e66e00; }
.btn.primary:hover { background: #e66e00; border-color: #e66e00; }
.topbar { background: #fff; border-bottom: 4px solid var(--brand); }
.brand, .brand b { color: var(--ink); } .brand small { color: var(--mute); }
.logo-img { display: block; width: 44px; height: 44px; }
.topbar nav a { color: var(--ink); }
.topbar nav a:hover, .topbar nav a.on { color: var(--ink); box-shadow: inset 0 -4px 0 var(--brand); }
.topbar nav a.ghost { border-color: var(--ink); color: var(--ink); }
.topbar nav a.ghost:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.who { color: var(--mute); }
.langs { border-color: var(--line); }
.topbar nav .langs a { color: var(--mute); }
.topbar nav .langs a + a { border-left-color: var(--line); }
.topbar nav .langs a.on { background: var(--brand); color: #fff; }
.topbar nav .langs a.on:hover { color: #fff; }
.topbar nav .langs a:hover { color: var(--ink); }
.alert.info { color: #8a4300; }
.course.sel { background: #fff7ef; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
/* admin : dépôt ADE, MCP, journal */
pre.log { background:#111; color:#eee; padding:12px; font-size:12px; overflow:auto; max-height:320px; white-space:pre-wrap; }
code.tok { display:block; background:#fff2e5; border:1px solid var(--brand); padding:8px; word-break:break-all; font-size:13px; margin:6px 0; }
.badge { display:inline-block; padding:2px 8px; font-size:12px; border:1px solid #999; }
.badge.ok { background:#ff7a00; color:#fff; border-color:#ff7a00; } .badge.warn { background:#fff2e5; border-color:#ff7a00; color:#a34d00; }
tr.warnrow td { background:#fff4ec; } .nowrap { white-space:nowrap; } fieldset.checks { border:0; padding:0; margin:0 0 12px; }
.admin-tabs { flex-wrap: wrap; }

/* =====================================================================
   Lot A (PLAN.md) : règles « À savoir », date limite, mention indicative
   ===================================================================== */
.rules-jump { margin: 0 0 6px; font-weight: 600; }
.rules { margin-top: 24px; padding: 28px; background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--brand); }
.rules h2 { font-size: 28px; margin-bottom: 4px; }
.rules-lead { margin: 0 0 18px; color: var(--ink-2); }
.rules-grid { list-style: none; margin: 0; padding: 0 !important; display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px !important; }
.rules-grid li { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--bg); border-top: 3px solid var(--ink); }
.rules-grid h3 { margin: 0; font-size: 13px; }
.rules-grid p { margin: 0; font-size: 14px; color: var(--ink-2); }
.rules-grid p.does { margin-top: auto; padding: 10px 12px; background: var(--brand-soft); color: var(--ink); font-weight: 600; font-size: 13.5px; }
.rules-grid p.does::before { content: "✓ "; color: var(--brand-2); }
.rules-reminder { margin: -6px 0 16px; font-size: 14px; color: var(--ink-2); }
.deadline-notice { margin: 14px 0 16px; }
.tt-disclaimer { margin: 0 0 18px; padding: 12px 16px; border-left: 4px solid var(--brand); background: var(--brand-soft); color: var(--ink); font-size: 14px; line-height: 1.5; }
.cart .tt-disclaimer { margin: 14px 0 0; font-size: 12.5px; }
.rule.met, .rule.unmet { padding: 10px 12px; line-height: 1.45; }
.rule.met { background: var(--ok-soft); } .rule.unmet { background: var(--warn-soft); }
.deadline-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 18px; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--brand); }
.deadline-bar span { display: block; font-size: 13px; color: var(--mute); }
.deadline-bar b { display: block; font-size: 22px; margin: 2px 0; }
.deadline-bar.none { border-left-color: var(--warn); background: var(--warn-soft); }
@media (max-width: 1000px) { .rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rules-grid { grid-template-columns: 1fr; } .rules { padding: 20px 16px; } }

/* Lot C (PLAN.md) : fiche étudiant admin */
.pending-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 18px; padding: 16px 20px; background: var(--warn-soft); border-left: 6px solid var(--brand); }
.pending-bar ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.grp-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.grp-form .grp { margin: 0; }
.enr-forms { margin-top: 20px; }
.enr-forms form { display: grid; gap: 12px; align-content: start; padding: 16px; background: var(--bg); }
.enr-forms h3 { margin: 0; }
.tbl .badge { margin-left: 6px; }
#courses .rule { margin: 0 0 14px; }

/* Lot D (PLAN.md) : retirer / remplacer un cours depuis l'emploi du temps */
.swap-hint { margin: -8px 0 16px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.clickable [data-cid] { cursor: pointer; }
.clickable .legend li[data-cid]:hover, .clickable .agenda li[data-cid]:hover { background: var(--brand-soft); }
.clickable .ev:hover { filter: brightness(.96); outline: 2px solid var(--c); }
.modal-box.sheet-box, .modal-box.picker-box { text-align: left; }
.sheet-box { width: min(480px, 100%); }
.sheet-box .row-gap { margin-top: 18px; }
.picker-box { width: min(820px, 100%); max-width: 820px; max-height: min(90vh, 900px); display: flex; flex-direction: column; padding: 24px; }
.picker-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.picker-head h2 { margin: 0; }
.picker-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 12px; }
.picker-tools input[type=search] { flex: 1 1 240px; }
.picker-tools select { flex: 0 1 260px; width: 260px; max-width: 100%; }
.pk-list { flex: 1; overflow: auto; display: grid; gap: 6px; align-content: start; min-height: 160px; }
.pk-item .c-main small { display: block; }
.pk-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--brand-soft); border-left: 4px solid var(--brand); }
.pk-confirm .row-gap { margin: 0; }
.pk-confirm .pk-msg { flex-basis: 100%; }
.pk-confirm .pk-msg:empty { display: none; }
.picker-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
#add-course { white-space: nowrap; }
@media (max-width: 560px) {
  .picker-box { padding: 16px; max-height: 94vh; }
  .modal { padding: 8px; }
}

/* Lot G (PLAN.md) : drapeau de langue des cours */
.lang-cell { white-space: nowrap; }
.lang-cell select { width: auto; padding: 4px 6px; font-size: 13px; }

/* Lot F (PLAN.md) : comptes sur invitation */
.invite-note { margin: 4px 0 10px; padding: 12px 14px; background: var(--brand-soft); font-size: 14px; line-height: 1.5; }
.activate { width: min(560px, 100%); }
fieldset.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
fieldset.choice legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
fieldset.choice small { flex-basis: 100%; }
.accounts-tools { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 18px; margin-bottom: 18px; align-items: start; }
.accounts-tools .card { display: grid; gap: 12px; align-content: start; }
.accounts-tools h2 { margin: 0; }
.accounts-tools .grid-form { grid-template-columns: 1fr 1fr; }
.accounts-tools .grid-form label { grid-column: auto; }
.st { display: inline-block; padding: 1px 8px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); }
.st-new { background: var(--line-2); } .st-invited { background: var(--brand-soft); } .st-expired { background: var(--bad-soft); color: var(--bad); } .st-active { background: var(--ok-soft); color: var(--ok); }
.st-filter { font-size: 14px; } .st-filter a.on { font-weight: 700; text-decoration: underline; }
.tbl-scroll { max-height: 420px; overflow: auto; }
@media (max-width: 1100px) { .accounts-tools { grid-template-columns: 1fr; } }

/* Langue des cours : pastille de code (FR bleu de France, EN rouge britannique), sans drapeau */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lang-pill { display: inline-grid; place-items: center; min-width: 30px; height: 20px; padding: 0 6px; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .09em; line-height: 1; vertical-align: 1px; }
.lang-pill.fr { background: #0055A4; } .lang-pill.en { background: #C8102E; }
.course .c-main .lang-pill { margin-bottom: 7px; }
.legend .lang-pill, .tbl .lang-pill { margin-right: 7px; min-width: 26px; height: 18px; font-size: 10px; }
.lang-seg button { display: inline-flex; align-items: center; gap: 7px; }
.lang-seg .lang-pill { min-width: 26px; height: 18px; font-size: 10px; }
.toolbar .lang-seg { flex: none; }

/* Mot de passe défini par l'admin */
.force-pw summary { cursor: pointer; list-style-position: inside; }
.force-pw[open] summary { margin-bottom: 12px; }
.force-pw .mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .04em; }

/* Liste des étudiants : sélection multiple et suppression confirmée */
.bulk-bar { position: sticky; top: 64px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; background: var(--card); border-bottom: 1px solid var(--line); }
.bulk-bar #sel-count { margin-right: auto; font-size: 14px; font-weight: 600; }
.sel-col { width: 36px; }
.sel-col input { width: 18px; height: 18px; accent-color: var(--brand); }
#stab tr.selected td { background: var(--brand-soft); }
.confirm-delete { border: 2px solid var(--bad); margin-bottom: 18px; display: grid; gap: 12px; }
.confirm-delete .confirm-form input[name=confirm_text] { max-width: 260px; font-weight: 700; letter-spacing: .08em; }
