/* Prof241 — espace administration */
body.admin { background: var(--bg); }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(1000px 500px at 80% 0%, var(--navy-3), var(--navy) 65%); }
.login form { width: 100%; max-width: 420px; background: var(--white); border-radius: 24px; padding: 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 16px; }
.login .logo { background: var(--navy); border-radius: 16px; padding: 14px 18px; display: flex; justify-content: center; }
.login .logo img { height: 52px; width: auto; }
.login h1 { font-size: 26px; text-align: center; }

.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 250px; max-width: 100%; background: var(--navy); color: #C9D2E3; padding: 22px 14px; display: flex; flex-direction: column; gap: 20px; }
.side .brand { padding: 0 6px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.side .brand img { height: 50px; width: auto; align-self: flex-start; }
.side .brand span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--gold); padding-left: 6px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: #C9D2E3; font: 500 15px var(--font-body); text-align: left; cursor: pointer; transition: background-color .18s, color .18s; }
.side nav button:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.side nav button[aria-current="page"] { background: rgba(212, 165, 55, .16); color: #F2D58A; }
.side nav .count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--gold); color: var(--navy); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.side .who { margin-top: auto; border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 12px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.side .who b { color: var(--white); font-weight: 500; word-break: break-all; }
.side .who button { align-self: flex-start; min-height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: #C9D2E3; font: 500 13px var(--font-body); cursor: pointer; }

.main { flex: 999 1 680px; min-width: 0; padding: 28px 32px 80px; display: flex; flex-direction: column; gap: 22px; }
.main > header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.main h1 { font-size: 32px; }
.main header p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.panel h2 { font-size: 20px; margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.stat-card span { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-card b { font-family: var(--font-title); font-size: 32px; color: var(--navy); line-height: 1.1; }
.stat-card.alert { border-color: var(--gold); background: #FFFBF0; }

.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid #EEF1F6; vertical-align: middle; }
.tbl tr:hover td { background: #FBF7EC; }
.tbl .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.scroll { overflow-x: auto; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 14px; }
.sm { min-height: 38px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.muted { color: var(--muted); font-size: 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; min-width: 200px; }
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.low { background: var(--low-bg); color: var(--low); }
.pill.ko { background: var(--full-bg); color: var(--full); }
.pill.info { background: var(--wait-bg); color: var(--wait); }
.pill.mute { background: var(--soon-bg); color: var(--soon); }

.cand { border: 1px solid var(--line); border-radius: 18px; background: var(--white); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.cand + .cand { margin-top: 16px; }
.cand-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; font: 700 18px var(--font-title); overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.prop { border: 1px solid #E0E6F0; border-radius: 14px; padding: 14px; background: #FBFCFE; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
.prop.off { opacity: .55; }
.prop .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.boxes { display: flex; flex-wrap: wrap; gap: 6px; }
.boxes label { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid #D5DBE7; border-radius: 9px; font-size: 13px; cursor: pointer; background: var(--white); }
.boxes label:has(input:checked) { border-color: var(--navy); background: #EEF2F9; }
.boxes input { accent-color: var(--navy); }

.modal-bg { position: fixed; inset: 0; background: rgba(11, 27, 51, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 80; }
.modal { width: 100%; max-width: 520px; background: var(--white); border-radius: 22px; padding: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 32px); overflow: auto; }
.modal h2 { font-size: 24px; }
.cred { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #F3FAF6; border: 1px solid #BFE3CF; }
.cred span { font-size: 12px; color: var(--ok); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; display: block; }
.cred b { font-family: ui-monospace, Menlo, monospace; font-size: 16px; color: var(--navy); word-break: break-all; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.cfg { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.cfg .field label { font-size: 13px; }
.cfg h3 { grid-column: 1 / -1; font-size: 16px; margin: 10px 0 0; }
.cfg .full { grid-column: 1 / -1; }
.lien { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lien code { flex: 1 1 260px; min-width: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; word-break: break-all; }
details.jr summary { cursor: pointer; }
details.jr pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; background: var(--bg); padding: 10px; border-radius: 10px; max-height: 280px; overflow: auto; }
/* ---------- Espace élève ---------- */
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--wait-bg); border-color: #CBD8EE; color: var(--wait); font-size: 15px; }
.notice.low { background: var(--low-bg); border-color: #F1D3A1; color: var(--low); }
.notice.ko { background: var(--full-bg); border-color: #F0C2C2; color: var(--full); }
.next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.next b { display: block; font-family: var(--font-title); font-size: 22px; color: var(--navy); }
.next span { color: var(--muted); font-size: 15px; }
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.day h3 { font-size: 15px; margin: 0 0 8px; color: var(--muted); font-family: var(--font-body); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.slot { border-radius: 12px; padding: 10px 12px; background: #F1F4FA; border-left: 4px solid var(--gold); margin-bottom: 8px; transition: transform .18s, box-shadow .18s; }
.slot:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(11, 27, 51, .08); }
.slot b { display: block; color: var(--navy); font-size: 15px; }
.slot span { font-size: 13px; color: var(--muted); }
.aff { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.slot.pending { border-left-color: #E0A43B; background: #FFF8EA; }
.slot.school { border-left-color: #9AA6BD; background: var(--bg); }
.cert { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid #EEF1F6; }
.cert b { display: block; color: var(--navy); }
.cert span { font-size: 14px; color: var(--muted); }
.crow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.crow select { width: auto; min-width: 140px; }
.crow input[type=time] { width: auto; min-height: 44px; padding: 8px 10px; border-radius: 12px; border: 1px solid #D5DBE7; font: 400 16px var(--font-body); }
.mobile-only { display: none; }
@media (max-width: 720px) {
  .mobile-only { display: inline-flex; }
  .main { padding: 20px 16px 72px; }
  .side { flex-basis: 100%; }
  .side nav { flex-direction: row; overflow-x: auto; }
  .side nav button { white-space: nowrap; }
  .side .who { display: none; }
}
