/* EVS SIMULATOR PLATE-FORME — interface étudiants / professeurs */
:root { --bg: #0b1220; --bg2: #101a2b; --bg3: #16233a; --line: rgba(255, 255, 255, 0.10); --txt: #e8eef8; --mut: #8aa0bd; --brand: #ff5a1f; --brand2: #ff8a4c; --ok: #34d399; --bad: #f87171; --warn: #fbbf24; --blue: #60a5fa; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--txt); font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; line-height: 1.45; }
body.in-sim { overflow: hidden; }
a { color: var(--brand2); } button { font-family: inherit; }
h1, h2, h3 { margin: 0 0 8px; } h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 16px; }
.muted { color: var(--mut); } .small { font-size: 12.5px; } .right { text-align: right; } .center { text-align: center; }

/* ---- Logo ---- */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.04em; } .logo svg { width: 36px; height: 36px; } .logo small { display: block; font-size: 10px; letter-spacing: 0.28em; color: var(--brand2); font-weight: 700; margin-top: -2px; }

/* ---- Connexion ---- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login .hero { padding: 48px 56px; background: radial-gradient(1200px 600px at 20% 10%, #1b3a6b 0%, #0b1220 60%), #0b1220; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login .hero::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 2px dashed rgba(255, 138, 76, 0.35); }
.hero h1 { font-size: 40px; line-height: 1.1; margin-top: 40px; max-width: 560px; } .hero h1 span { color: var(--brand2); }
.hero ul { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 12px; max-width: 520px; } .hero li { display: flex; gap: 12px; align-items: flex-start; color: #c9d6ea; } .hero li b { color: #fff; } .hero li i { font-style: normal; font-size: 22px; }
.login .formwrap { display: flex; align-items: center; justify-content: center; padding: 28px; background: var(--bg2); }
.login form { width: min(400px, 100%); }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login .hero { padding: 28px; } .hero h1 { font-size: 28px; margin-top: 20px; } .hero ul { display: none; } }

/* ---- Formulaires & boutons ---- */
label.f { display: block; margin: 12px 0; font-size: 13px; color: var(--mut); } label.f input, label.f select, label.f textarea { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; background: var(--bg); color: var(--txt); border: 1px solid #2a3b57; border-radius: 10px; font-size: 15px; font-family: inherit; }
label.f input:focus, label.f select:focus, label.f textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #1c2a42; color: #fff; border: 1px solid #2f4468; border-radius: 10px; padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; } .btn:hover { filter: brightness(1.18); }
.btn.primary { background: var(--brand); border-color: var(--brand); } .btn.danger { background: #7f1d1d; border-color: #b91c1c; } .btn.sm { padding: 5px 10px; font-size: 12.5px; } .btn.block { width: 100%; padding: 12px; font-size: 15px; } .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.err { background: rgba(248, 113, 113, 0.12); border: 1px solid var(--bad); color: #fecaca; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; margin: 10px 0; }

/* ---- Coque ---- */
.shell { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; }
.topbar { display: flex; align-items: center; gap: 18px; padding: 10px 22px; background: rgba(16, 26, 43, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; } .nav a { color: var(--mut); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; } .nav a:hover { background: var(--bg3); color: #fff; } .nav a.on { background: var(--brand); color: #fff; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 13px; } .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.role { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; background: var(--bg3); padding: 2px 8px; border-radius: 999px; color: var(--brand2); }
main { padding: 26px 22px 60px; max-width: 1240px; width: 100%; margin: 0 auto; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }

/* ---- Cartes ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; } .card.hl { border-color: var(--brand); background: linear-gradient(180deg, #1c1a24, var(--bg2)); }
.stat { display: flex; flex-direction: column; gap: 2px; } .stat b { font-size: 30px; } .stat span { color: var(--mut); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } @media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
.progress { height: 10px; background: var(--bg3); border-radius: 999px; overflow: hidden; } .progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand2)); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--bg3); color: var(--mut); } .badge.lv0 { background: #0f3d2e; color: #6ee7b7; } .badge.lv1 { background: #3b2f0b; color: #fde68a; } .badge.lv2 { background: #471418; color: #fca5a5; } .badge.lv3 { background: #2a1950; color: #c4b5fd; } .badge.assign { background: #1e3a5f; color: #bfdbfe; } .badge.ok { background: #0f3d2e; color: #6ee7b7; }
.stars { color: var(--warn); letter-spacing: 2px; } .stars.off { color: #3b4a63; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; } .tabs button { background: var(--bg2); color: var(--mut); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; } .tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.mcard { display: flex; flex-direction: column; gap: 8px; } .mcard h3 { font-size: 17px; } .mcard p { margin: 0; color: #b8c6dc; font-size: 13.5px; flex: 1; } .mcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---- Tables ---- */
.tablewrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; } table.t th, table.t td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; } table.t th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mut); background: #0e1727; position: sticky; top: 0; } table.t tr:hover td { background: rgba(255, 255, 255, 0.025); } table.t td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.matrix td, table.matrix th { text-align: center; padding: 6px 8px; font-size: 12.5px; } table.matrix td:first-child, table.matrix th:first-child { text-align: left; position: sticky; left: 0; background: var(--bg2); }
.cell { display: inline-block; min-width: 34px; padding: 2px 6px; border-radius: 6px; font-weight: 700; } .cell.none { color: #3b4a63; } .cell.s0 { background: #471418; color: #fca5a5; } .cell.s1 { background: #3b2f0b; color: #fde68a; } .cell.s2 { background: #0f3d2e; color: #6ee7b7; } .cell.s3 { background: #0b4f3a; color: #a7f3d0; box-shadow: inset 0 0 0 1px var(--ok); }

/* ---- Lanceur ---- */
.modal { position: fixed; inset: 0; background: rgba(4, 8, 16, 0.78); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 60; overflow: auto; } .modal .box { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(920px, 100%); max-height: 94vh; overflow: auto; }
.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 10px 0 16px; } .model { background: var(--bg); border: 2px solid #22314a; border-radius: 12px; padding: 12px; cursor: pointer; } .model:hover { border-color: #46608f; } .model.on { border-color: var(--brand); background: #1a1620; } .model.disabled { opacity: 0.35; pointer-events: none; }
.model b { display: block; } .model .cat { font-size: 11px; color: var(--brand2); text-transform: uppercase; letter-spacing: 0.1em; } .model .spec { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--mut); margin-top: 6px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; } .row > * { flex: 1; min-width: 160px; }
.gal { position: fixed; inset: 0; }
#toasts-global { position: fixed; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 200; } .gt { background: #16233a; border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4); max-width: 360px; animation: tin 0.2s; } .gt.ok { border-color: var(--ok); } .gt.bad { border-color: var(--bad); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
pre.code { background: #060b14; border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow: auto; font-size: 12.5px; color: #cfe0ff; }
.rank { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg3); font-weight: 800; } .rank.r1 { background: #b8860b; } .rank.r2 { background: #7f8c8d; } .rank.r3 { background: #8c5a2b; }

/* ---- Certificat ---- */
.certificate { background: #fffdf6; color: #1a1a1a; border: 10px double #b8860b; padding: 40px 48px; text-align: center; max-width: 900px; margin: 0 auto; border-radius: 6px; font-family: Georgia, 'Times New Roman', serif; }
.certificate h1 { font-size: 40px; letter-spacing: 0.14em; color: #8a5a00; margin: 8px 0; } .certificate .name { font-size: 36px; border-bottom: 2px solid #b8860b; display: inline-block; padding: 4px 30px; margin: 16px 0; } .certificate p { font-size: 17px; } .certificate .sig { display: flex; justify-content: space-around; margin-top: 36px; font-size: 14px; } .certificate .sig div { border-top: 1px solid #333; padding-top: 6px; min-width: 200px; }
@media print { body * { visibility: hidden; } .certificate, .certificate * { visibility: visible; } .certificate { position: absolute; left: 0; top: 0; width: 100%; } }
