/* Examens, barème, révision question par question */
.ex-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; margin: 22px 0; }
.ex-card h2 { margin: 0 0 14px; font-size: 1.15rem; }
.ex-new { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; align-items: end; }
.ex-new label, .ex-options label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.ex-new input[type=text], .ex-new input:not([type]), .ex-options input[type=text] { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.ex-file small { font-weight: 400; color: var(--muted); }
.ex-table td, .ex-table th { white-space: nowrap; }
.ex-scroll { overflow-x: auto; }
.ex-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.ex-kpis > div { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.ex-kpis b { display: block; font-size: 1.6rem; line-height: 1.1; }
.ex-kpis small { font-size: .9rem; color: var(--muted); }
.ex-kpis span { color: var(--muted); font-size: .85rem; }
.ex-kpis .ex-warn b { color: #b45309; }
.ex-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ex-actions .primary-button { width: auto; margin: 0; }
.ex-options { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin: 12px 0; }
.ex-options .ex-check { flex-direction: row; align-items: center; font-weight: 400; }
.ex-badge { display: inline-block; background: #fef3c7; color: #92400e; border-radius: 999px; padding: 1px 9px; font-size: .78rem; font-weight: 700; margin-left: 4px; }
.ex-ok { color: #15803d; font-size: .85rem; font-weight: 600; }
.ex-mat { color: var(--muted); margin-left: 6px; }
.ex-assoc { margin-left: 8px; font: inherit; font-size: .8rem; max-width: 220px; }
.res-row.ex-warn { background: #fffbeb; }
.res-row ul { margin: 6px 0 0; padding-left: 18px; }
.ex-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 22px; }
.ex-stat { display: grid; grid-template-columns: 90px 1fr 48px auto; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); padding: 4px 6px; border-radius: 8px; }
.ex-stat:hover { background: var(--paper); }
.ex-stat-id { font-weight: 600; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.ex-bar { height: 8px; background: var(--mint); border-radius: 99px; overflow: hidden; }
.ex-bar i { display: block; height: 100%; background: var(--brand-action); }
.ex-bar i.low { background: #d97706; }
.ex-stat-pct { font-size: .85rem; text-align: right; color: var(--ink-soft); }
.ex-extract { display: flex; gap: 12px; align-items: center; margin: 10px 0 14px; flex-wrap: wrap; }
.ex-extract .secondary-button { cursor: pointer; }
.bareme-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.bareme-table th { text-align: left; font-size: .8rem; color: var(--muted); padding: 6px; }
.bareme-table td { padding: 4px 4px; vertical-align: top; border-top: 1px solid var(--line); }
.bareme-table input, .bareme-table textarea { width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .88rem; }
.bareme-table input[type=checkbox] { width: auto; margin-top: 10px; }
.bareme-table textarea { resize: vertical; min-height: 36px; }
.ex-danger { margin: 30px 0 10px; text-align: right; }

/* Révision */
.rev-wrap { max-width: 1280px; }
.rev-layout { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.rev-items { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.rev-items h2 { font-size: .9rem; margin: 0 0 8px; color: var(--muted); }
.rev-item { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .88rem; }
.rev-item small { color: var(--muted); margin-left: auto; }
.rev-item.active { background: var(--mint); font-weight: 700; }
.rev-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.rev-head h1 { margin: 4px 0; font-size: 1.4rem; }
.rev-head h1 small { color: var(--muted); font-weight: 500; }
.rev-attendu { margin: 4px 0 0; background: #ecfdf5; border-left: 4px solid #16a34a; padding: 8px 12px; border-radius: 6px; }
.rev-nav { display: flex; gap: 8px; align-items: center; }
.rev-nav .primary-button { width: auto; margin: 0; padding: 10px 18px; }
.rev-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.rev-card.doute { border-color: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.rev-card.fait { border-color: #86efac; }
.rev-card header { display: flex; gap: 10px; align-items: center; }
.rev-note { margin-left: auto; font-weight: 700; color: var(--ink-soft); }
.rev-raison { margin: 6px 0; color: #92400e; font-size: .88rem; }
.rev-img { display: block; width: 100%; max-height: 520px; object-fit: contain; object-position: left top; background: #fafafa; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; }
.rev-edit { display: grid; grid-template-columns: auto auto 1fr auto; gap: 14px; align-items: end; }
.rev-pts { display: flex; flex-direction: column; font-size: .8rem; font-weight: 600; }
.rev-pts input { width: 5.5em; font-size: 1.2rem; font-weight: 700; padding: 6px 8px; border: 2px solid var(--brand-action); border-radius: 8px; }
.rev-pts span { font-weight: 400; color: var(--muted); }
.rev-quick { display: flex; gap: 4px; }
.rev-quick button { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; }
.rev-com { display: flex; flex-direction: column; font-size: .8rem; font-weight: 600; }
.rev-com textarea { font: inherit; font-weight: 400; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.rev-etat { font-size: .8rem; color: var(--muted); min-width: 90px; }
.mobile-login { max-width: 460px; text-align: center; }
.mobile-login .brand-logo-full { max-width: 240px; margin: 30px auto 10px; display: block; }
.mobile-login .oauth-options { display: grid; gap: 10px; margin: 20px 0; }
@media (max-width: 780px) {
  .rev-layout { grid-template-columns: 1fr; }
  .rev-items { position: static; display: flex; overflow-x: auto; max-height: none; gap: 4px; }
  .rev-items h2 { display: none; }
  .rev-item { flex: 0 0 auto; }
  .rev-edit { grid-template-columns: auto 1fr; }
  .rev-com { grid-column: 1 / -1; }
}

.page-wrap h1 { letter-spacing: -0.01em; }
details.ex-card > summary { cursor: pointer; list-style: none; }
details.ex-card > summary::-webkit-details-marker { display: none; }
details.ex-card > summary h2 { display: inline; }
details.ex-card > summary small { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: 8px; }
details.ex-card[open] > summary { margin-bottom: 14px; }

/* Station de numérisation */
.st-wrap { display: grid; grid-template-columns: 1fr 380px; gap: 18px; padding: 12px 18px 30px; max-width: 1600px; margin: 0 auto; }
.st-cadre { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; }
.st-cadre video { width: 100%; height: 100%; object-fit: contain; display: block; }
.st-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .25s; }
.st-flash.on { opacity: .7; transition: none; }
.st-bandeau { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px; font-size: 1.5rem; font-weight: 800; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.st-bandeau.erreur { background: rgba(185, 28, 28, .92); }
.st-bandeau.nouvel { background: rgba(0, 98, 214, .9); }
.st-barre { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; align-items: center; font-size: .9rem; }
.st-barre select { font: inherit; padding: 4px 6px; }
.st-panneau h1 { font-size: 1.3rem; margin: 6px 0; }
.st-panneau h2 { font-size: 1rem; margin: 18px 0 6px; }
.st-capture { width: 100%; font-size: 1.25rem; padding: 18px; margin: 8px 0; }
.st-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-boutons button { padding: 10px 6px; font-size: .85rem; }
kbd { font: inherit; font-size: .75em; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; opacity: .8; }
.st-etat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.st-etat > div { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.st-etat b { display: block; font-size: 1.6rem; }
.st-etat span { font-size: .72rem; color: var(--muted); }
.st-alerte { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.st-copies { max-height: 34vh; overflow: auto; padding-left: 0; list-style: none; margin: 0; }
.st-copies li { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: .85rem; }
.st-copies li b { width: 70px; }
.st-copies .pg { min-width: 22px; text-align: center; border-radius: 5px; background: var(--mint); padding: 1px 4px; }
.st-copies .pg.bad { background: #fee2e2; color: #991b1b; font-weight: 700; }
.st-copies .ok { color: #15803d; margin-left: auto; }
.st-fin { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.st-fin .primary-button { width: auto; margin: 0; }
.st-fin input { font: inherit; padding: 6px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 900px) { .st-wrap { grid-template-columns: 1fr; } }
.ex-station { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 14px; }
.st-panneau h1 { letter-spacing: -0.01em; }
.ex-file input[type=file], .ex-new input[type=file] { position: static; width: 100%; height: auto; opacity: 1; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; background: var(--paper); font: inherit; font-size: .85rem; }
