/* =====================================================================
   Thème amU — charte graphique Aix-Marseille Université (Studio Plastac, 19/03/2025)
   Chargé après app.css quand le thème « amu » est actif (Admin → Réglages).
   - Gamme principale : bleu #1F63DE, jaune #FFFF85, noir, blanc
   - Secteur économie et gestion (FEG) : orange #FF7900, orange clair #FFDEBF
   - Typographie : AMU Monument Grotesk (themes/amu/fonts/, déclarée par theme_fonts())
   - Logo : themes/amu/logo.svg (couleur, en-tête blanc) ou logo-blanc.svg (en-tête noir)
   - Formes : rectangles assemblés (cartouche), angles droits, aplats sans ombre
   Règles de couleur : bleu avec blanc, jaune/orange avec noir (pas de jaune + bleu).
   ===================================================================== */
:root {
  --amu-blue: #1F63DE; --amu-yellow: #FFFF85; --amu-black: #000; --amu-white: #fff;
  --feg: #FF7900; --feg-soft: #FFDEBF; --amu-blue-soft: #CDEAFC;

  --ink: #000; --ink-2: #1c1c1c; --mute: #575757; --line: #d4d4d4; --line-2: #ededed;
  --bg: #fff; --card: #fff;
  --brand: var(--feg); --brand-2: var(--amu-blue); --brand-soft: var(--feg-soft);
  --teal: #0a7040; --ok: #0a7040; --ok-soft: #dff7ea; --warn: #8f4700; --warn-soft: var(--feg-soft);
  --bad: #c8231a; --bad-soft: #FFD4CC;
  --r: 0; --r-sm: 0; --shadow: none; --shadow-lg: 0 18px 50px rgba(0,0,0,.18);
  --font: "AMU Monument Grotesk", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --serif: var(--font);
  /* couleurs des cours (gamme secondaire amU), lues par shared.js */
  --course-palette: #FF7900, #1F63DE, #2bb673, #9966FF, #FF8B7C, #0aa5d8, #d9a800, #000000, #c2185b, #5c6bc0, #8d6e63, #607d8b;
}

body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15.5px; }
h1, h2, h3 { font-family: var(--font); letter-spacing: -.02em; }
h1 { font-weight: 500; font-size: clamp(32px, 4vw, 48px); line-height: 1.02; }
h2 { font-weight: 500; font-size: 23px; }
h3 { font-weight: 700; text-transform: none; letter-spacing: 0; font-size: 15px; }
a { color: var(--amu-blue); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amu-blue); outline-offset: 2px; }
code { background: var(--line-2); }

/* étiquette (eyebrow) : noir + jaune, comme les dates des affiches amU */
.eyebrow { display: inline-block; background: #000; color: var(--amu-yellow); padding: 4px 10px; font-size: 12px; font-weight: 500; letter-spacing: .02em; text-transform: none; }
.eyebrow::before { content: none; }

/* ---------- en-tête : logo en haut à gauche (charte §1.F) ---------- */
.topbar { background: #fff; border-bottom: 1px solid #000; min-height: 76px; padding-top: 10px; padding-bottom: 10px; }
.brand { gap: 22px; color: #000; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 48px; width: auto; }
.brand-unit { display: block; font-size: 13px; line-height: 1.15; color: #000; padding-left: 12px; border-left: 4px solid var(--feg); }
.brand-unit span { display: block; color: #000; font-weight: 500; font-size: 15px; margin-bottom: 2px; }
.brand-app { display: block; padding-left: 22px; border-left: 1px solid var(--line); }
.brand-app b { font-weight: 500; font-size: 15px; color: #000; }
.brand-app small { color: var(--mute); text-transform: none; letter-spacing: 0; font-size: 12.5px; margin: 0; }
.topbar nav a { color: #000; padding: 10px 14px; font-weight: 400; text-decoration: none; }
.topbar nav a:hover, .topbar nav a.on { color: #000; background: transparent; box-shadow: inset 0 -3px 0 var(--feg); }
.topbar nav a.ghost { border: 1px solid #000; margin-left: 8px; padding: 8px 14px; }
.topbar nav a.ghost:hover { background: #000; color: #fff; box-shadow: none; }
.who { color: var(--mute); }
.langs { border: 1px solid #000; }
.topbar nav .langs a, .topbar nav .langs a.on, .topbar nav .langs a:hover { color: #000; padding: 7px 10px; font-weight: 500; box-shadow: none; text-decoration: none; }
.topbar nav .langs a + a { border-left: 1px solid #000; }
.topbar nav .langs a.on, .topbar nav .langs a.on:hover { background: #000; color: #fff; }
.topbar nav .langs a:hover { color: #000; background: var(--feg-soft); }

/* ---------- en-tête foncé : logo blanc (Logo_Blanc, « à utiliser sur fond foncé ») ---------- */
.topbar.dark { background: #000; border-bottom: 6px solid var(--feg); }
.topbar.dark .brand-logo { height: 44px; }
.topbar.dark .brand-app { border-left-color: #444; }
.topbar.dark .brand-app b { color: #fff; } .topbar.dark .brand-app small { color: #bdbdbd; }
.topbar.dark nav a { color: #fff; }
.topbar.dark nav a:hover, .topbar.dark nav a.on { color: #fff; box-shadow: inset 0 -3px 0 var(--feg); }
.topbar.dark nav a.ghost { border-color: #fff; }
.topbar.dark nav a.ghost:hover { background: var(--feg); border-color: var(--feg); color: #000; }
.topbar.dark .who { color: #bdbdbd; }
.topbar.dark .langs { border-color: #fff; }
.topbar.dark nav .langs a, .topbar.dark nav .langs a:hover, .topbar.dark nav .langs a.on { color: #fff; background: transparent; box-shadow: none; }
.topbar.dark nav .langs a + a { border-left-color: #fff; }
.topbar.dark nav .langs a.on, .topbar.dark nav .langs a.on:hover { background: #fff; color: #000; }
.topbar.dark nav .langs a:not(.on):hover { background: #222; }
.topbar.dark :focus-visible { outline-color: var(--amu-yellow); }

/* ---------- pied de page ---------- */
.foot { background: #000; color: #fff; text-transform: none; letter-spacing: 0; font-size: 13px; padding: 28px 24px; text-align: left; border-top: 6px solid var(--feg); }

/* ---------- boutons et champs ---------- */
.btn { font-weight: 500; letter-spacing: 0; text-transform: none; text-decoration: none; background: #fff; color: #000; border: 1px solid #000; }
.btn:hover { background: #000; color: #fff; border-color: #000; text-decoration: none; }
.btn.primary { background: var(--feg); border-color: var(--feg); color: #000; }
.btn.primary:hover { background: #000; border-color: #000; color: #fff; }
.btn.lg { text-transform: none; letter-spacing: 0; font-size: 16px; padding: 15px 26px; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: #fff; }
.btn.loading::after { border-color: rgba(0,0,0,.35); border-top-color: #000; }
input, select { border-color: #8a8a8a; }
input:focus, select:focus { border-color: var(--amu-blue); box-shadow: 0 0 0 3px rgba(31,99,222,.25); }
label, .field { color: #000; font-weight: 500; }
.seg { border-color: #000; }
.seg button { color: #000; border-right-color: #000; font-weight: 500; }
.seg button.on { background: #000; color: #fff; }
.toggle input { accent-color: var(--amu-blue); }

/* ---------- alertes : bleu + blanc pour l'info, gamme tertiaire pour le reste ---------- */
.alert { border-width: 0 0 0 6px; }
.alert.info { background: var(--amu-blue-soft); border-color: var(--amu-blue); color: #0b2f6e; }
.alert.success { background: var(--ok-soft); border-color: var(--ok); color: #064428; }
.alert.warn { background: var(--feg-soft); border-color: var(--feg); color: #5c2e00; }
.alert.error { background: var(--bad-soft); border-color: var(--bad); color: #7a130d; }

/* ---------- accueil : titre en cartouche (rectangles assemblés, charte §5) ---------- */
.hero { border-bottom: 0; padding: 32px 0 56px; gap: 56px; }
.hero h1 { position: relative; width: fit-content; max-width: 100%; margin: 18px 0 calc(.55em + 28px);
  background: var(--feg); color: #000; font-weight: 500; font-size: clamp(38px, 5.6vw, 68px); line-height: 1; letter-spacing: -.03em;
  padding: .18em .3em .26em; }
.hero h1::after { content: ""; position: absolute; right: 0; top: 100%; width: 34%; height: .55em; background: var(--feg); }
.lead { font-size: 19px; color: #000; line-height: 1.45; }
.steps { border-top: 1px solid #000; gap: 0; }
.steps li { background: transparent; border: 0; border-bottom: 1px solid #000; padding: 20px 0; }
.steps li > b { width: 46px; height: 46px; place-items: center; background: var(--feg); color: #000; font-family: var(--font); font-size: 22px; font-weight: 500; }
.steps h3 { font-size: 17px; font-weight: 500; margin: 2px 0 4px; }
.steps p { color: var(--ink-2); }
.rules, .rules.card { position: relative; margin-top: 56px; background: var(--feg-soft); border: 0; padding: 28px 32px; }
.rules::before { content: ""; position: absolute; left: 0; top: -14px; width: 120px; height: 14px; background: var(--feg-soft); }
.rules h2 { font-size: 26px; }
.rules ul { color: #000; }

/* ---------- cartes, KPI, onglets admin ---------- */
.card, .cart-inner, .kpi { border: 1px solid #000; }
.kpi { border-top: 8px solid var(--feg); }
.kpi span { color: #000; }
.kpi b { font-family: var(--font); font-weight: 500; font-size: 42px; }
.admin-tabs { border-bottom: 1px solid #000; }
.admin-tabs a:not(.btn) { color: #000; font-weight: 500; text-decoration: none; }
.admin-tabs a.on { background: #000; color: #fff; }
.admin-tabs a:not(.btn):not(.on):hover { background: var(--feg-soft); }
.tbl th { color: #000; border-bottom: 1px solid #000; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 700; }
.badge.ok { background: var(--feg); border-color: var(--feg); color: #000; }
.badge.warn { background: var(--feg-soft); border-color: var(--feg); color: #5c2e00; }
code.tok { background: var(--feg-soft); border-color: var(--feg); }
tr.warnrow td { background: #fff3e8; }
.auth h1 { font-size: 34px; }

/* ---------- choix des cours ---------- */
.num { background: var(--feg); color: #000; font-weight: 500; }
.avatar { background: var(--feg-soft); color: #000; }
.identity-title h2 { font-size: 26px; }
.toolbar { background: #fff; border-bottom: 1px solid #000; }
.group-head { border-bottom: 1px solid #000; }
.group-head h3 { color: #000; text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 500; }
.cards { border-left: 1px solid var(--line); }
.course:hover { box-shadow: inset 4px 0 0 #000; }
.course.sel { background: #fff3e8; box-shadow: inset 6px 0 0 var(--feg); }
.tick { border-color: #000; }
.course.sel .tick { background: var(--feg); border-color: #000; }
.course.sel .tick::after { color: #000; }
.cred { color: #000; }
.seats { text-transform: none; letter-spacing: 0; font-size: 11.5px; font-weight: 500; }
.cart-inner { border-top: 8px solid var(--feg); }
.cart h2 { font-size: 26px; }
.meter-top b { font-family: var(--font); font-weight: 500; font-size: 58px; letter-spacing: -.04em; }
.bar { height: 6px; background: var(--line-2); }
.bar i { background: var(--feg); } .bar i.ok { background: var(--ok); } .bar i.over { background: var(--bad); }
.mobile-bar { background: #000; border-top: 6px solid var(--feg); }
.modal-box { border-top: 8px solid var(--feg); }
.check { background: var(--feg); color: #000; }
.empty { border-color: #000; }

/* ---------- emploi du temps ---------- */
.tt-nav { border-bottom: 1px solid #000; }
.tt-nav h2 { font-weight: 500; }
.tt-side { border-top: 8px solid var(--feg); }
.cal-day-h { border-bottom: 1px solid #000; }
.cal-day-h span { color: #000; text-transform: none; letter-spacing: 0; font-weight: 500; }
.cal-day-h b { font-family: var(--font); font-weight: 500; font-size: 22px; }
.cal-day-h.today b { background: var(--feg); color: #000; }
.agenda h4 { color: #000; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 500; border-bottom: 1px solid #000; padding-bottom: 6px; }
.menu { border-color: #000; }
.menu a, .menu button { text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--feg-soft); }
.toast { background: #000; border-left: 6px solid var(--feg); }

/* ---------- petits écrans ---------- */
.foot-logo { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding: 32px clamp(16px, 4vw, 40px); }
.foot-logo img { display: block; height: 40px; width: auto; }
.foot-logo span { color: #bdbdbd; }

@media (max-width: 860px) {
  .brand-app { display: none; }
  .hero h1::after { width: 40%; }
}
@media (max-width: 560px) {
  .brand-unit { font-size: 11.5px; } .brand-unit span { font-size: 13px; }
  .brand-logo, .topbar.dark .brand-logo { height: 34px; }
  .rules { padding: 22px 18px; }
}

/* ---------- Lot A : règles, date limite, mention indicative ---------- */
.rules, .rules.card { border: 0; border-top: 0; }
.rules-grid li { background: #fff; border-top: 6px solid #000; }
.rules-grid h3 { font-size: 17px; font-weight: 500; }
.rules-grid p { color: #000; }
.rules-grid p.does { background: #000; color: #fff; font-weight: 400; }
.rules-grid p.does::before { color: var(--feg); }
.rules-jump a { color: #000; }
.tt-disclaimer { border-left-color: var(--amu-blue); background: var(--amu-blue-soft); color: #0b2f6e; }
.deadline-bar { border: 1px solid #000; border-left: 8px solid var(--feg); }
.deadline-bar b { font-weight: 500; font-size: 26px; }
.deadline-bar span { color: #000; }
.deadline-bar.none { background: var(--feg-soft); border-left-color: #000; }

/* ---------- Lot C : fiche étudiant admin ---------- */
.pending-bar { background: var(--feg-soft); border: 1px solid #000; border-left: 8px solid var(--feg); }
.enr-forms form { background: #f4f4f4; }

/* ---------- Lot D : retirer / remplacer un cours ---------- */
.swap-hint { color: #000; font-weight: 500; }
.pk-confirm { background: var(--feg-soft); border-left: 6px solid var(--feg); }
.clickable .legend li[data-cid]:hover, .clickable .agenda li[data-cid]:hover { background: var(--feg-soft); }

/* ---------- Étiquette de langue (thème amU) ---------- */
.lang-seg { border-color: #000; }
