/* Espace élève Mission Prépa */

:root {
	--mpee-ink: #14110f;
	--mpee-ink-2: #2a2521;
	--mpee-cream: #f3eee9;
	--mpee-white: #ffffff;
	--mpee-red: #c8001d;
	--mpee-red-dark: #8f0015;
	--mpee-red-soft: #ffe1e5;
	--mpee-coral: #ff5757;
	--mpee-navy: #0f1d3d;
	--mpee-muted: #5c554f;
	--mpee-text-2: #3d3834;
	--mpee-sand: #c9c0b8;
	--mpee-line: #e6dfd8;
	--mpee-radius: 14px;
	--mpee-shadow: 0 1px 2px rgba(20, 17, 15, .06), 0 10px 28px rgba(20, 17, 15, .07);
	--mpee-font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mpee-display: "Archivo", "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
.mpee [hidden] { display: none !important; }

body.mpee {
	margin: 0;
	font-family: var(--mpee-font);
	font-size: 16px;
	line-height: 1.5;
	color: var(--mpee-ink);
	background: var(--mpee-cream);
	-webkit-font-smoothing: antialiased;
}

.mpee a { color: var(--mpee-red); text-underline-offset: 2px; }
.mpee a:hover { color: var(--mpee-red-dark); }
.mpee h1, .mpee h2, .mpee h3 { font-family: var(--mpee-display); margin: 0; line-height: 1.15; }
.mpee h1 { font-weight: 900; font-size: clamp(28px, 3.2vw, 40px); }
.mpee h2 { font-weight: 800; font-size: 21px; }
.mpee h3 { font-weight: 800; font-size: 16px; }
.mpee p { margin: 0 0 12px; }
.mpee :focus-visible { outline: 3px solid var(--mpee-red); outline-offset: 2px; border-radius: 6px; }
.mpee button { font: inherit; }
.mpee-icon { flex-shrink: 0; vertical-align: middle; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mpee-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--mpee-white); padding: 10px 14px; border-radius: 8px; }
.mpee-skip:focus { left: 8px; }

.mpee-muted { color: var(--mpee-muted); }
.mpee-small { font-size: 14px; }
.mpee-center { text-align: center; }
.mpee-eyebrow { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mpee-red); }
.mpee-eyebrow--light { color: var(--mpee-coral); }

/* ---------- Boutons ---------- */

.mpee-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
	font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background-color .15s, border-color .15s, color .15s;
}
.mpee .mpee-btn--primary { background: var(--mpee-red); color: var(--mpee-white); }
.mpee .mpee-btn--primary:hover { background: var(--mpee-red-dark); color: var(--mpee-white); }
.mpee .mpee-btn--ghost { background: var(--mpee-white); color: var(--mpee-ink); border-color: var(--mpee-sand); }
.mpee .mpee-btn--ghost:hover { border-color: var(--mpee-ink); color: var(--mpee-ink); }
.mpee-btn--block { width: 100%; }
.mpee-icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--mpee-sand);
	background: var(--mpee-white); color: var(--mpee-ink); cursor: pointer;
}
.mpee-icon-btn:hover { border-color: var(--mpee-ink); }

/* ---------- Messages ---------- */

.mpee-flash, .mpee-error, .mpee-notice {
	padding: 12px 16px; border-radius: 10px; margin: 0 0 18px; font-size: 15px;
}
.mpee-flash { background: #e7f3ea; color: #14532d; border: 1px solid #b7dcc1; }
.mpee-error { background: var(--mpee-red-soft); color: #7a0012; border: 1px solid #f4b3bd; }
.mpee-notice { background: #fff6dc; color: #5a4300; border: 1px solid #f0dc9a; }
.mpee-empty { color: var(--mpee-muted); background: rgba(255, 255, 255, .55); border: 1px dashed var(--mpee-sand); border-radius: 12px; padding: 18px; margin: 0; }

/* ---------- Structure de l'application ---------- */

.mpee-app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.mpee-side {
	flex: 0 0 256px; background: var(--mpee-ink); color: var(--mpee-cream);
	padding: 28px 18px; display: flex; flex-direction: column; gap: 28px;
	position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.mpee-side__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px; }
.mpee .mpee-brand { display: inline-block; line-height: 0; text-decoration: none; }
.mpee .mpee-brand img { display: block; height: 40px; width: auto; }
.mpee-auth__intro .mpee-brand img { height: 48px; }
.mpee-burger { display: none; background: transparent; border: 0; color: var(--mpee-cream); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.mpee-nav { display: flex; flex-direction: column; flex: 1; gap: 24px; }
.mpee-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mpee .mpee-nav a {
	display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
	border-radius: 10px; color: var(--mpee-sand); text-decoration: none; font-weight: 600; font-size: 15px;
}
.mpee .mpee-nav a:hover { color: var(--mpee-white); background: var(--mpee-ink-2); }
.mpee .mpee-nav a.is-active { background: var(--mpee-red); color: var(--mpee-white); font-weight: 700; }
.mpee-me { margin-top: auto; border-top: 1px solid #3d3834; padding-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.mpee-me__id { display: flex; align-items: center; gap: 12px; padding: 0 12px 8px; }
.mpee-me__id strong { display: block; color: var(--mpee-white); font-size: 14px; }
.mpee-me__id small { color: var(--mpee-sand); font-size: 13px; }
.mpee-avatar { width: 40px; height: 40px; border-radius: 50%; background: #3d3834; color: var(--mpee-cream); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.mpee .mpee-logout { font-size: 14px; }

.mpee-main { flex: 1 1 560px; min-width: 0; padding: 40px clamp(16px, 4vw, 48px) 64px; display: flex; flex-direction: column; gap: 28px; max-width: 1280px; outline: none; }
.mpee-main > .mpee-flash, .mpee-main > .mpee-notice { margin: 0; }

.mpee-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.mpee-head p { margin: 6px 0 0; }
.mpee-date { font-size: 14px; font-weight: 600; color: var(--mpee-muted); margin: 0 0 4px !important; }
.mpee-back { margin: 0; }
.mpee .mpee-back a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--mpee-text-2); text-decoration: none; }
.mpee .mpee-back a:hover { color: var(--mpee-ink); }
.mpee-lock { display: flex; align-items: center; gap: 6px; }

.mpee-card { background: var(--mpee-white); border-radius: var(--mpee-radius); box-shadow: var(--mpee-shadow); }
.mpee-section { display: flex; flex-direction: column; gap: 14px; }
.mpee-card.mpee-section { padding: 24px; }
.mpee-section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.mpee-section__head a { font-size: 14px; font-weight: 700; }
.mpee-columns { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.mpee-columns > * { flex: 1 1 340px; min-width: 0; }
.mpee-stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Recherche et filtres ---------- */

.mpee-search {
	display: flex; align-items: center; gap: 10px; height: 46px; width: 320px; max-width: 100%;
	padding: 0 14px; background: var(--mpee-white); border: 1px solid var(--mpee-sand); border-radius: 10px; color: var(--mpee-muted);
}
.mpee-search:focus-within { border-color: var(--mpee-ink); }
.mpee-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; flex: 1; min-width: 0; color: var(--mpee-ink); }
.mpee-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mpee-chip {
	min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--mpee-sand);
	background: var(--mpee-white); color: var(--mpee-ink); font-weight: 700; font-size: 14px; cursor: pointer;
}
.mpee-chip:hover { border-color: var(--mpee-ink); }
.mpee-chip[aria-pressed="true"] { background: var(--mpee-ink); border-color: var(--mpee-ink); color: var(--mpee-white); }
.mpee-chip--small { min-height: 34px; padding: 0 12px; font-size: 13px; }

/* ---------- Replays ---------- */

.mpee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.mpee .mpee-replay {
	display: flex; flex-direction: column; background: var(--mpee-white); border-radius: var(--mpee-radius);
	overflow: hidden; color: var(--mpee-ink); text-decoration: none; box-shadow: var(--mpee-shadow); transition: box-shadow .15s, transform .15s;
}
.mpee .mpee-replay:hover { color: var(--mpee-ink); box-shadow: 0 0 0 2px var(--mpee-red), var(--mpee-shadow); }
.mpee-thumb {
	position: relative; aspect-ratio: 16 / 8.5; background: var(--mpee-navy);
	background-image: radial-gradient(circle at 80% 20%, rgba(255, 87, 87, .22), transparent 55%);
	display: flex; align-items: center; justify-content: center;
}
.mpee-thumb__play { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: var(--mpee-white); display: flex; align-items: center; justify-content: center; }
.mpee-replay:hover .mpee-thumb__play { background: var(--mpee-red); }
.mpee-tag { position: absolute; left: 10px; top: 10px; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--mpee-cream); color: var(--mpee-ink); font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.mpee-duration { position: absolute; right: 10px; bottom: 12px; background: rgba(20, 17, 15, .85); color: var(--mpee-white); font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.mpee-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .25); }
.mpee-progress > span { display: block; height: 100%; background: var(--mpee-coral); }
.mpee-replay__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.mpee-replay__body strong { font-size: 15px; line-height: 1.35; }
.mpee-replay__body small { font-size: 13px; color: var(--mpee-muted); }
.mpee-seen { color: #14532d; font-weight: 700; }

.mpee .mpee-hero {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
	background: var(--mpee-ink); color: var(--mpee-cream); border-radius: 16px; padding: 24px 28px; text-decoration: none;
}
.mpee .mpee-hero:hover { color: var(--mpee-cream); box-shadow: 0 0 0 2px var(--mpee-red); }
.mpee-hero__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mpee-hero__text strong { font-family: var(--mpee-display); font-size: 22px; font-weight: 800; }
.mpee-hero__text > span:last-child { color: var(--mpee-sand); font-size: 15px; }

/* ---------- Lecteur ---------- */

.mpee-player-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.mpee-player-col { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.mpee-player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 16px; overflow: hidden; }
.mpee-player video { width: 100%; height: 100%; display: block; background: #000; }
.mpee-player__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: var(--mpee-navy); background-image: radial-gradient(circle at 75% 25%, rgba(255, 87, 87, .25), transparent 55%); }
.mpee-player__overlay[hidden] { display: none; }
.mpee-player__start { width: 80px; height: 80px; border-radius: 50%; border: 0; background: var(--mpee-red); color: var(--mpee-white); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mpee-player__start:hover { background: var(--mpee-red-dark); }
.mpee-player__msg { color: var(--mpee-white); margin: 0; padding: 0 24px; text-align: center; }
.mpee-player-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.mpee-speed { display: flex; flex-wrap: wrap; gap: 6px; }
.mpee-player-tools [data-player-resume] { display: inline-flex; align-items: center; gap: 6px; }
.mpee-player-tools [data-player-resume][hidden] { display: none; }
.mpee-player-info h1 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; margin-bottom: 6px; }
.mpee-player-side { flex: 2 1 320px; min-width: 0; background: var(--mpee-white); border-radius: var(--mpee-radius); box-shadow: var(--mpee-shadow); padding: 18px; }
.mpee-player-side h2 { font-size: 17px; margin-bottom: 12px; }
.mpee-playlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto; }
.mpee .mpee-playlist a { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; color: var(--mpee-ink); text-decoration: none; border: 2px solid transparent; }
.mpee .mpee-playlist a:hover { background: var(--mpee-cream); }
.mpee .mpee-playlist a.is-current { border-color: var(--mpee-red); }
.mpee-playlist strong { display: block; font-size: 14px; line-height: 1.35; }
.mpee-playlist small { font-size: 13px; color: var(--mpee-muted); }
.mpee-mini-thumb { position: relative; width: 88px; height: 50px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--mpee-navy); color: var(--mpee-white); display: flex; align-items: center; justify-content: center; }

/* ---------- Documents ---------- */

.mpee-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mpee-list.mpee-card { padding: 8px; }
.mpee .mpee-doc { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 10px; color: var(--mpee-ink); text-decoration: none; }
.mpee .mpee-doc:hover { color: var(--mpee-ink); background: var(--mpee-cream); }
.mpee-doc__icon { width: 40px; height: 48px; flex-shrink: 0; border-radius: 6px; background: var(--mpee-red-soft); color: var(--mpee-red); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.mpee-doc__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mpee-doc__body strong { font-size: 15px; }
.mpee-doc__body small { font-size: 13px; color: var(--mpee-muted); }
.mpee-badge { margin-left: auto; flex-shrink: 0; font-size: 12px; font-weight: 800; background: var(--mpee-cream); border-radius: 6px; padding: 4px 8px; }

.mpee-viewer-wrap { overflow: hidden; display: flex; flex-direction: column; }
.mpee-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--mpee-line); }
.mpee-viewer-title { min-width: 0; }
.mpee-viewer-title h1 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.mpee-viewer-title p { display: flex; align-items: center; gap: 6px; margin: 0; }
.mpee-viewer-actions { display: flex; align-items: center; gap: 8px; }
.mpee-zoom { font-size: 13px; font-weight: 700; min-width: 48px; text-align: center; }
.mpee-viewer-desc { padding: 12px 18px 0; color: var(--mpee-text-2); }
.mpee-viewer {
	background: #e6dfd8; padding: 24px 16px; height: min(78vh, 1100px); overflow: auto;
	display: flex; flex-direction: column; align-items: center; gap: 16px;
	-webkit-user-select: none; user-select: none;
}
.mpee-viewer canvas, .mpee-page { display: block; background: var(--mpee-white); box-shadow: 0 2px 12px rgba(20, 17, 15, .15); max-width: none; }
.mpee-page { position: relative; }
.mpee-viewer-loading { margin: auto; color: var(--mpee-text-2); }
.mpee-viewer-stage { position: relative; }
.mpee-viewer-stage.is-shielded .mpee-viewer { filter: blur(22px); }
.mpee-shield {
	position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	border: 0; background: rgba(243, 238, 233, .55); color: var(--mpee-ink); font: inherit; font-weight: 700; cursor: pointer;
}
.mpee-page-mark { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.mpee-page-mark span { position: absolute; left: -25%; width: 150%; transform: rotate(-32deg); white-space: pre; font: 700 11px var(--mpee-font); color: rgba(60, 55, 50, .045); }
.mpee-viewer-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--mpee-line); }

/* ---------- Fenêtre de téléchargement ---------- */

.mpee-dialog { border: 0; border-radius: 18px; padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: 0 24px 60px rgba(20, 17, 15, .35); color: var(--mpee-ink); }
.mpee-dialog::backdrop { background: rgba(20, 17, 15, .6); }
.mpee-dialog__close { position: absolute; right: 12px; top: 12px; margin: 0; }
.mpee-dialog__grid { display: flex; flex-wrap: wrap; gap: 28px; padding: 32px; }
.mpee-dialog__text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 12px; }
.mpee-dialog__text h2 { font-size: 24px; }
.mpee-dialog__text p { margin: 0; color: var(--mpee-text-2); }
.mpee-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.mpee-dialog__actions form { margin: 0; }
.mpee-wm-box { background: var(--mpee-cream); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.mpee-wm-preview { flex: 1 1 230px; display: flex; justify-content: center; }
.mpee-wm-page {
	position: relative; width: 100%; max-width: 260px; aspect-ratio: 1 / 1.414; background: var(--mpee-white);
	box-shadow: 0 2px 12px rgba(20, 17, 15, .18); overflow: hidden; padding: 24px 24px 30px; display: flex; flex-direction: column; gap: 9px; font-family: Georgia, serif;
}
.mpee-wm-page strong { font-size: 13px; line-height: 1.3; }
.mpee-wm-page i { display: block; height: 6px; border-radius: 3px; background: #ece7e2; }
.mpee-wm-page i.s { width: 65%; }
.mpee-wm-page small { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; font: 8px/1.3 var(--mpee-font); color: var(--mpee-muted); border-top: 1px solid #ece7e2; background: var(--mpee-white); }
.mpee-wm-text { position: absolute; left: -60%; top: -20%; width: 220%; height: 140%; transform: rotate(-32deg); display: flex; flex-direction: column; justify-content: space-around; pointer-events: none; }
.mpee-wm-text span { white-space: pre; font: 700 9px var(--mpee-font); color: rgba(60, 55, 50, .18); word-spacing: 30px; }
.mpee-wm-text { justify-content: space-between; padding: 10% 0; }

/* ---------- Présences ---------- */

.mpee {
	--st-good: #0ca30c; --st-good-bg: #e6f5e6; --st-good-ink: #0b4f0b;
	--st-warn: #fab219; --st-warn-bg: #fff4d6; --st-warn-ink: #5a3f00;
	--st-crit: #d03b3b; --st-crit-bg: #fde8e8; --st-crit-ink: #7d1515;
	--mpee-paper: #faf8f5;
	--st-exc: #7a869e; --st-exc-bg: #edf0f5; --st-exc-ink: #343d52;
}
.mpee-ev.is-excuse { background: var(--st-exc-bg); color: var(--st-exc-ink); border-left-color: var(--st-exc); }
.mpee-key.is-excuse { background: var(--st-exc); }
.mpee-tag-status.is-excuse { background: var(--st-exc-bg); color: var(--st-exc-ink); }
.mpee-tag-status.is-excuse b { background: var(--st-exc); }
.mpee-session.is-excuse .mpee-session__body { border-left-color: var(--st-exc); }
.mpee-subject__strip .is-excuse, .mpee-cal__dots .is-excuse { background: var(--st-exc); }

/* Bandeau de synthèse */
.mpee-att-hero {
	position: relative; overflow: hidden; border-radius: 20px; padding: 28px 32px;
	background: var(--mpee-ink); color: var(--mpee-cream);
	background-image: radial-gradient(120% 140% at 100% 0%, rgba(255, 87, 87, .22) 0%, rgba(255, 87, 87, 0) 55%), radial-gradient(80% 120% at 0% 100%, rgba(15, 29, 61, .9) 0%, rgba(15, 29, 61, 0) 60%);
	display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px;
}
.mpee-att-hero__ring { position: relative; width: 124px; height: 124px; flex-shrink: 0; }
.mpee-att-hero__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mpee-att-hero__ring circle { fill: none; stroke-width: 10; }
.mpee-att-hero__ring .track { stroke: rgba(243, 238, 233, .12); }
.mpee-att-hero__ring .value { stroke: var(--mpee-coral); stroke-linecap: round; animation: mpee-ring 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes mpee-ring { from { stroke-dashoffset: 326.73; } to { stroke-dashoffset: 0; } }
.mpee-att-hero__pct { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 38px; }
.mpee-att-hero__pct strong { font-family: var(--mpee-display); font-size: 38px; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.mpee-att-hero__pct small { font-size: 16px; font-weight: 800; margin-left: 2px; color: var(--mpee-sand); }
.mpee-att-hero__text { min-width: 0; }
.mpee-att-hero__text .mpee-eyebrow { margin-bottom: 8px; }
.mpee-att-hero__title { font-family: var(--mpee-display); font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; line-height: 1.2; margin: 0 0 8px !important; }
.mpee-att-hero__title strong { color: var(--mpee-white); }
.mpee-att-hero__msg { margin: 0 !important; color: var(--mpee-sand); font-size: 15px; }
.mpee-att-hero__stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(104px, 1fr)); gap: 10px; }
.mpee-att-hero__stats li { background: rgba(243, 238, 233, .07); border: 1px solid rgba(243, 238, 233, .1); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.mpee-att-hero__stats small { color: var(--mpee-sand); font-size: 12px; font-weight: 600; }
.mpee-pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mpee-display); font-size: 24px; font-weight: 900; line-height: 1.1; color: var(--mpee-white); }
.mpee-pill b, .mpee-pill .mpee-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font: 800 12px var(--mpee-font); color: #fff; }
.mpee-pill.is-present b { background: var(--st-good); }
.mpee-pill.is-partiel b { background: var(--st-warn); color: #3d2a00; }
.mpee-pill.is-absent b { background: var(--st-crit); }
.mpee-pill.is-streak .mpee-icon { padding: 3px; background: var(--mpee-coral); color: var(--mpee-ink); fill: currentColor; stroke: none; }

/* Calendrier + détail du jour */
.mpee-att-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.mpee-att-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.mpee-cal { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 16px; }
.mpee-cal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mpee-cal__head h2 { font-size: 28px; font-weight: 900; letter-spacing: -.01em; }
.mpee-cal__head h2 span { color: var(--mpee-sand); font-weight: 800; }
.mpee-cal__head p { margin: 4px 0 0; color: var(--mpee-muted); font-size: 14px; }
.mpee-cal__head p strong { color: var(--mpee-ink); }
.mpee-cal__nav { display: flex; align-items: center; gap: 8px; }
.mpee .mpee-round {
	display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%;
	border: 1px solid var(--mpee-line); background: var(--mpee-white); color: var(--mpee-ink); text-decoration: none; transition: border-color .15s, background-color .15s;
}
.mpee .mpee-round:hover { border-color: var(--mpee-ink); color: var(--mpee-ink); }
.mpee .mpee-round--text { width: auto; padding: 0 16px; border-radius: 21px; font-size: 14px; font-weight: 700; }
.mpee .mpee-round.is-disabled { opacity: .35; }
.mpee-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.mpee-cal__wd { text-align: left; padding: 0 8px 2px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mpee-muted); }
.mpee .mpee-cal__day {
	position: relative; min-height: 104px; min-width: 0; padding: 6px; border-radius: 12px;
	background: var(--mpee-paper); border: 1px solid transparent; color: var(--mpee-ink); text-align: left;
	display: flex; flex-direction: column; gap: 6px; font: inherit;
}
.mpee .mpee-cal__day.is-weekend { background: #f4efe9; }
.mpee .mpee-cal__day.is-out { background: transparent; }
.mpee .mpee-cal__day.is-future .mpee-cal__num { color: #b5aca4; }
.mpee .mpee-cal__day.has-sessions {
	background: var(--mpee-white); border-color: var(--mpee-line); cursor: pointer;
	box-shadow: 0 1px 2px rgba(20, 17, 15, .04); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.mpee .mpee-cal__day.has-sessions:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20, 17, 15, .09); border-color: var(--mpee-sand); }
.mpee .mpee-cal__day.is-selected { border: 2px solid var(--mpee-ink); padding: 5px; box-shadow: 0 8px 22px rgba(20, 17, 15, .12); }
.mpee-cal__num { font-size: 13px; font-weight: 800; color: var(--mpee-text-2); line-height: 22px; }
.mpee-cal__day.is-today .mpee-cal__num { align-self: flex-start; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--mpee-red); color: var(--mpee-white); text-align: center; line-height: 24px; }
.mpee-cal__events { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mpee-cal__num { padding-left: 2px; }
.mpee-ev { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 4px 6px 5px; border-radius: 8px; border-left: 3px solid transparent; line-height: 1.2; }
.mpee-ev__h { display: flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; opacity: .85; }
.mpee-ev__h b { font-size: 10px; }
.mpee-ev__t { font-size: 11.5px; font-weight: 800; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; hyphens: auto; -webkit-hyphens: auto; }
.mpee-ev.is-present { background: var(--st-good-bg); color: var(--st-good-ink); border-left-color: var(--st-good); }
.mpee-ev.is-partiel { background: var(--st-warn-bg); color: var(--st-warn-ink); border-left-color: var(--st-warn); }
.mpee-ev.is-absent { background: var(--st-crit-bg); color: var(--st-crit-ink); border-left-color: var(--st-crit); }
.mpee-key { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 11px; color: #fff; }
.mpee-key.is-present { background: var(--st-good); }
.mpee-key.is-partiel { background: var(--st-warn); color: #3d2a00; }
.mpee-key.is-absent { background: var(--st-crit); }
.mpee-ev__more { font-size: 11.5px; font-weight: 700; color: var(--mpee-muted); padding-left: 4px; }
.mpee-cal__dots { display: none; }
.mpee-cal__legend { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 4px; border-top: 1px solid var(--mpee-line); padding-top: 14px; font-size: 13px; color: var(--mpee-text-2); }
.mpee-cal__legend > span { display: inline-flex; align-items: center; gap: 8px; }
.mpee-legend-today { width: 16px; height: 16px; border-radius: 8px; background: var(--mpee-red); display: inline-block; }

.mpee-dayview { padding: 22px; min-height: 200px; }
.mpee-daypanel { display: block; }
.mpee-daypanel + .mpee-daypanel { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--mpee-line); }
.mpee-js .mpee-daypanel:not(.is-active) { display: none; }
.mpee-js .mpee-daypanel + .mpee-daypanel { margin-top: 0; padding-top: 0; border-top: 0; }
.mpee-daypanel.is-active { animation: mpee-fade .25s ease-out; }
@keyframes mpee-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.mpee-daypanel .mpee-eyebrow { color: var(--mpee-red); margin-bottom: 2px; }
.mpee-daypanel h3 { font-size: 22px; font-weight: 900; margin-bottom: 16px; }
.mpee-sessions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.mpee-session { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
.mpee-session__time { font-weight: 800; font-size: 14px; line-height: 1.2; padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.mpee-session__time small { color: var(--mpee-muted); font-weight: 600; font-size: 12px; }
.mpee-session__body { background: var(--mpee-paper); border-radius: 12px; padding: 12px 14px; border-left: 4px solid var(--mpee-sand); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mpee-session.is-present .mpee-session__body { border-left-color: var(--st-good); }
.mpee-session.is-partiel .mpee-session__body { border-left-color: var(--st-warn); }
.mpee-session.is-absent .mpee-session__body { border-left-color: var(--st-crit); }
.mpee-session__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mpee-session__top strong { font-size: 15px; line-height: 1.3; }
.mpee-tag-status { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 3px; border-radius: 7px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.mpee-tag-status b { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 5px; font-size: 10px; color: #fff; }
.mpee-tag-status.is-present { background: var(--st-good-bg); color: var(--st-good-ink); }
.mpee-tag-status.is-present b { background: var(--st-good); }
.mpee-tag-status.is-partiel { background: var(--st-warn-bg); color: var(--st-warn-ink); }
.mpee-tag-status.is-partiel b { background: var(--st-warn); color: #3d2a00; }
.mpee-tag-status.is-absent { background: var(--st-crit-bg); color: var(--st-crit-ink); }
.mpee-tag-status.is-absent b { background: var(--st-crit); }
.mpee-session__meter { height: 6px; border-radius: 0 3px 3px 0; background: #e9e3dd; overflow: hidden; }
.mpee-session__meter span { display: block; height: 100%; border-radius: 0 3px 3px 0; background: var(--mpee-ink); }
.mpee-session.is-present .mpee-session__meter span { background: var(--st-good); }
.mpee-session.is-partiel .mpee-session__meter span { background: var(--st-warn); }
.mpee-session__meta { margin: 0 !important; font-size: 13px; color: var(--mpee-text-2); }
.mpee .mpee-session__replay {
	align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 17px;
	background: var(--mpee-ink); color: var(--mpee-white); text-decoration: none; font-size: 13px; font-weight: 700;
}
.mpee .mpee-session__replay:hover { background: var(--mpee-red); color: var(--mpee-white); }
.mpee-dayview__empty, .mpee-catchup__none { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; min-height: 200px; color: var(--mpee-muted); }
.mpee-dayview__empty p, .mpee-catchup__none p { margin: 0; }
.mpee-att-empty__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--mpee-cream); color: var(--mpee-ink); }
.mpee-att-empty { padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mpee-att-empty p { margin: 0; color: var(--mpee-muted); }

/* Matières et rattrapages */
.mpee-att-bottom { display: block; }
.mpee-subjects ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); column-gap: 32px; }
.mpee-subject + .mpee-subject { border-top: 0; }
.mpee-subject { border-bottom: 1px solid var(--mpee-line); }
.mpee-block-head { margin-bottom: 16px; }
.mpee-block-head h2 { font-size: 20px; font-weight: 900; }
.mpee-block-head p { margin: 4px 0 0; color: var(--mpee-muted); font-size: 13px; }
.mpee-subjects, .mpee-catchup { padding: 22px; }
.mpee-subjects ul, .mpee-catchup ul { list-style: none; margin: 0; padding: 0; }
.mpee-subject { padding: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.mpee-subject__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mpee-subject__head strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpee-subject__pct { font-family: var(--mpee-display); font-size: 18px; font-weight: 900; }
.mpee-subject__pct.is-low { color: var(--st-crit); }
.mpee-subject__bar { height: 6px; border-radius: 0 3px 3px 0; background: #ece7e2; overflow: hidden; }
.mpee-subject__bar span { display: block; height: 100%; border-radius: 0 3px 3px 0; background: var(--mpee-ink); }
.mpee-subject__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mpee-subject__foot small { color: var(--mpee-muted); font-size: 12px; white-space: nowrap; }
.mpee-subject__strip { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.mpee-subject__strip i { width: 12px; height: 12px; border-radius: 3px; }
.mpee-subject__strip .is-present, .mpee-cal__dots .is-present { background: var(--st-good); }
.mpee-subject__strip .is-partiel, .mpee-cal__dots .is-partiel { background: var(--st-warn); }
.mpee-subject__strip .is-absent, .mpee-cal__dots .is-absent { background: var(--st-crit); }
.mpee-catchup li + li { border-top: 1px solid var(--mpee-line); }
.mpee .mpee-catchup__item { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: 12px; color: var(--mpee-ink); text-decoration: none; }
.mpee .mpee-catchup__item:hover { background: var(--mpee-paper); color: var(--mpee-ink); }
.mpee-catchup__play { flex-shrink: 0; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--mpee-red); color: var(--mpee-white); }
.mpee-catchup__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mpee-catchup__text strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpee-catchup__text small { color: var(--mpee-muted); font-size: 13px; }
.mpee-catchup__go { color: var(--mpee-muted); }
.mpee-catchup__item:hover .mpee-catchup__go { color: var(--mpee-red); }
.mpee-att-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
.mpee-att-note .mpee-icon { margin-top: 2px; }

@media (max-width: 1180px) {
	.mpee-att-main { grid-template-columns: minmax(0, 1fr); }
	.mpee-att-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
}
@media (max-width: 960px) {
	.mpee-att-hero { grid-template-columns: auto minmax(0, 1fr); }
	.mpee-att-hero__stats { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.mpee-att-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 24px 20px; gap: 18px; }
	.mpee-att-hero__text .mpee-eyebrow { justify-content: center; }
	.mpee-att-hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
	.mpee-att-hero__stats li { align-items: center; }
	.mpee-cal { padding: 16px 12px; }
	.mpee-cal__head h2 { font-size: 22px; }
	.mpee-cal__grid { gap: 4px; }
	.mpee-cal__wd { text-align: center; padding: 0; font-size: 11px; }
	.mpee .mpee-cal__day { min-height: 54px; padding: 5px 3px; align-items: center; gap: 4px; border-radius: 10px; }
	.mpee .mpee-cal__day.is-selected { padding: 4px 2px; }
	.mpee-cal__day.is-today .mpee-cal__num { align-self: center; }
	.mpee-cal__events { display: none; }
	.mpee-cal__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
	.mpee-cal__dots i { width: 7px; height: 7px; border-radius: 50%; }
	.mpee-dayview, .mpee-subjects, .mpee-catchup { padding: 18px 16px; }
	.mpee-session { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
	.mpee-session__top { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
	.mpee-att-hero__ring .value, .mpee-daypanel.is-active { animation: none; }
	.mpee .mpee-cal__day.has-sessions:hover { transform: none; }
}

/* ---------- Concours blanc ---------- */

.mpee-cb-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.mpee .mpee-cb-tabs a { padding: 8px 14px; border-radius: 999px; background: var(--mpee-white); color: var(--mpee-ink); font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: var(--mpee-shadow); }
.mpee .mpee-cb-tabs a.is-active { background: var(--mpee-ink); color: var(--mpee-cream); }
.mpee-cb-hero__avg { padding-top: 42px; }
.mpee-cb-hero__avg strong { font-size: 30px; }
.mpee-cb-hero__avg small { font-size: 13px; }
.mpee-cb-hero__avg strong.is-none { color: var(--st-warn); font-size: 32px; }
.mpee-cb-hero.has-alert { box-shadow: inset 0 0 0 2px rgba(250, 178, 25, .55); }
.mpee-cb-hero__stats .mpee-pill small { font-size: 14px; font-weight: 700; color: var(--mpee-sand); margin-left: -6px; }
.mpee-cb-hero__stats li > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }

.mpee-cb-alert { display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px; background: var(--st-warn-bg); border: 1px solid #f3d27a; box-shadow: none; color: var(--st-warn-ink); }
.mpee-cb-alert__icon { flex-shrink: 0; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--st-warn); color: #3d2a00; }
.mpee-cb-alert h2 { font-size: 20px; font-weight: 900; color: var(--mpee-ink); margin-bottom: 6px; }
.mpee-cb-alert p { margin: 0 0 6px; }
.mpee-cb-alert strong { color: var(--mpee-ink); }
.mpee-cb-alert__tag { display: inline-block; margin: 0 0 6px !important; padding: 2px 8px; border-radius: 6px; background: var(--st-warn); color: #3d2a00; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.mpee-cb-alert__advice { font-size: 14px; color: var(--mpee-text-2); }

.mpee-cb-word { padding: 18px 22px; border-left: 4px solid var(--mpee-red); }
.mpee-cb-word p:last-child { margin: 0; color: var(--mpee-text-2); }

.mpee-cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.mpee-cb-ep { padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 6px; border-top: 4px solid var(--mpee-ink); }
.mpee-cb-ep.is-nn, .mpee-cb-ep.is-nr { border-top-color: var(--st-warn); background: linear-gradient(180deg, #fffaf0 0%, var(--mpee-white) 60%); }
.mpee-cb-ep.is-none { border-top-color: var(--mpee-line); }
.mpee-cb-ep__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mpee-cb-ep__head h3 { font-size: 16px; }
.mpee-cb-ep__coef { flex-shrink: 0; padding: 2px 8px; border-radius: 6px; background: var(--mpee-cream); font-size: 12px; font-weight: 800; color: var(--mpee-text-2); }
.mpee-cb-ep__note { margin: 4px 0 0 !important; display: flex; align-items: baseline; gap: 2px; font-family: var(--mpee-display); line-height: 1; }
.mpee-cb-ep__note strong { font-size: 44px; font-weight: 900; letter-spacing: -.02em; }
.mpee-cb-ep__note small { font-size: 18px; font-weight: 800; color: var(--mpee-muted); }
.mpee-cb-ep__note.is-b0 strong { color: var(--st-crit); }
.mpee-cb-ep__note.is-b4 strong { color: #0a7d0a; }
.mpee-cb-ep__note.is-flag strong { color: #b07800; }
.mpee-cb-ep__note.is-empty strong { color: var(--mpee-sand); }
.mpee-cb-ep__vs { margin: 0 !important; font-size: 14px; font-weight: 700; color: var(--mpee-muted); display: flex; align-items: center; gap: 6px; }
.mpee-cb-ep__vs.is-up { color: #0a7d0a; }
.mpee-cb-ep__vs.is-down { color: var(--st-crit-ink); }
.mpee-cb-ep__vs.is-flag { color: #8a5a00; }
.mpee-cb-ep__promo { margin: 4px 0 0 !important; font-size: 13px; color: var(--mpee-muted); }
.mpee-cb-ep__promo strong { color: var(--mpee-ink); }
.mpee-cb-scale { margin-top: 10px; }
.mpee-cb-scale__track { position: relative; height: 10px; border-radius: 5px; background: #ece7e2; }
.mpee-cb-scale__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--mpee-ink); opacity: .85; }
.mpee-cb-scale__fill.is-b0 { background: var(--st-crit); }
.mpee-cb-scale__fill.is-b1 { background: var(--st-warn); }
.mpee-cb-scale__fill.is-b3, .mpee-cb-scale__fill.is-b4 { background: var(--st-good); }
.mpee-cb-ep__vs.is-b0 { color: var(--st-crit-ink); }
.mpee-cb-ep__vs.is-b1 { color: var(--st-warn-ink); }
.mpee-cb-ep__vs.is-b3, .mpee-cb-ep__vs.is-b4 { color: #0a7d0a; }
.mpee-pill.is-flag { color: var(--st-warn); }
.mpee-cb-scale__band { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: var(--mpee-sand); }
.mpee-cb-scale__mean { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--mpee-ink); box-shadow: 0 0 0 2px var(--mpee-white); }
.mpee-cb-scale__me { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--mpee-red); box-shadow: 0 0 0 3px var(--mpee-white), 0 2px 6px rgba(20, 17, 15, .25); }
.mpee-cb-scale__axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--mpee-muted); }
.mpee-cb-skipped { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 14px; border: 1px dashed var(--mpee-sand); border-radius: 12px; font-size: 14px; color: var(--mpee-muted); }
.mpee-cb-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 14px 0 0; font-size: 13px; color: var(--mpee-muted); }
.mpee-cb-legend span { display: inline-flex; align-items: center; gap: 7px; }
.mpee-cb-key { display: inline-block; }
.mpee-cb-key.is-me { width: 12px; height: 12px; border-radius: 50%; background: var(--mpee-red); }
.mpee-cb-key.is-mean { width: 3px; height: 14px; border-radius: 2px; background: var(--mpee-ink); }
.mpee-cb-key.is-band { width: 22px; height: 8px; border-radius: 4px; background: var(--mpee-sand); }

.mpee-cb-history ul { list-style: none; margin: 0; padding: 0; }
.mpee .mpee-cb-history__link { display: flex; flex-direction: column; gap: 8px; color: var(--mpee-ink); text-decoration: none; }
.mpee .mpee-cb-history__link:hover strong { color: var(--mpee-red); }
.mpee-subject__pct small { font-size: 12px; color: var(--mpee-muted); }
.mpee-cb-mini-flag { font-size: 12px; font-weight: 800; color: #8a5a00; background: var(--st-warn-bg); padding: 1px 7px; border-radius: 6px; }

.mpee .mpee-cb-teaser { display: flex; align-items: center; gap: 16px; padding: 18px 20px; color: var(--mpee-ink); text-decoration: none; border-left: 4px solid var(--mpee-red); transition: box-shadow .15s; }
.mpee .mpee-cb-teaser:hover { color: var(--mpee-ink); box-shadow: 0 0 0 2px var(--mpee-red); }
.mpee .mpee-cb-teaser.has-alert { border-left-color: var(--st-warn); }
.mpee .mpee-cb-teaser.has-alert:hover { box-shadow: 0 0 0 2px var(--st-warn); }
.mpee-cb-teaser__icon { flex-shrink: 0; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--mpee-ink); color: var(--mpee-coral); }
.mpee-cb-teaser.has-alert .mpee-cb-teaser__icon { background: var(--st-warn); color: #3d2a00; }
.mpee-cb-teaser__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mpee-cb-teaser__text .mpee-eyebrow { margin: 0; font-size: 12px; }
.mpee-cb-teaser.has-alert .mpee-eyebrow { color: #8a5a00; }
.mpee-cb-teaser__text strong { font-family: var(--mpee-display); font-size: 18px; font-weight: 800; }
.mpee-cb-teaser__text > span:last-child { font-size: 14px; color: var(--mpee-muted); }
.mpee-cb-teaser__go { color: var(--mpee-muted); }

@media (max-width: 640px) {
	.mpee-cb-alert { flex-direction: column; padding: 18px; gap: 12px; }
	.mpee-cb-ep__note strong { font-size: 38px; }
	.mpee-cb-hero__stats li > small { max-width: none; white-space: normal; }
}

/* ---------- Gestionnaires : modifications depuis l'aperçu ---------- */

.mpee-replay-wrap { position: relative; display: flex; flex-direction: column; }
.mpee-replay-wrap > .mpee-replay { flex: 1; }
.mpee .mpee-rename-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; font-weight: 800; }
.mpee-replay-wrap > .mpee-rename-btn { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; justify-content: center; border-radius: 10px; background: var(--mpee-white); color: var(--mpee-ink); box-shadow: 0 2px 8px rgba(20, 17, 15, .25); }
.mpee-replay-wrap > .mpee-rename-btn:hover { background: var(--mpee-red); color: var(--mpee-white); }
.mpee-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.mpee .mpee-rename-btn--inline { padding: 7px 12px; border-radius: 10px; background: var(--mpee-cream); color: var(--mpee-ink); font-size: 13px; }
.mpee .mpee-rename-btn--inline:hover { background: var(--mpee-ink); color: var(--mpee-white); }
.mpee-rename-form { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--mpee-white); border-top: 1px solid var(--mpee-line); }
.mpee-title-row .mpee-rename-form { flex: 1 1 100%; border: 1px solid var(--mpee-line); border-radius: 12px; }
.mpee-replay-wrap .mpee-rename-form { border-radius: 0 0 var(--mpee-radius) var(--mpee-radius); margin-top: -8px; position: relative; z-index: 1; box-shadow: var(--mpee-shadow); }
.mpee-rename-form input { height: 42px; border: 1px solid var(--mpee-sand); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 15px; }
.mpee-rename-form input:focus { outline: 2px solid var(--mpee-red); outline-offset: 1px; }
.mpee-rename-form__actions { display: flex; gap: 8px; }
.mpee-rename-form__msg { color: var(--st-crit-ink); font-size: 13px; }
.mpee-rename-form__msg:empty { display: none; }
.mpee-rename-form.is-saving { opacity: .6; pointer-events: none; }
.mpee .mpee-btn--small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.mpee-title-row.is-renaming h1, .mpee-replay-wrap.is-renaming > .mpee-rename-btn { opacity: .35; }

.mpee-fix { position: relative; margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mpee .mpee-fix__toggle { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px dashed var(--mpee-sand); border-radius: 8px; background: var(--mpee-white); color: var(--mpee-ink); font-size: 13px; font-weight: 800; cursor: pointer; }
.mpee .mpee-fix__toggle:hover, .mpee .mpee-fix__toggle[aria-expanded="true"] { border-style: solid; border-color: var(--mpee-ink); }
.mpee-fix__info { flex: 1 1 100%; color: #2a5bb5; font-size: 12px; font-weight: 600; }
.mpee-fix__menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 240px; padding: 6px; display: flex; flex-direction: column; background: var(--mpee-white); border: 1px solid var(--mpee-line); border-radius: 12px; box-shadow: 0 12px 30px rgba(20, 17, 15, .18); }
.mpee-fix__menu[hidden] { display: none; }
.mpee .mpee-fix__menu button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--mpee-ink); font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
.mpee .mpee-fix__menu button:hover, .mpee .mpee-fix__menu button:focus-visible { background: var(--mpee-paper); }
.mpee-fix__menu button.is-current { background: var(--mpee-cream); }
.mpee-fix__menu b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: #fff; font-size: 11px; }
.mpee-fix__menu .is-present b { background: var(--st-good); }
.mpee-fix__menu .is-partiel b { background: var(--st-warn); color: #3d2a00; }
.mpee-fix__menu .is-absent b { background: var(--st-crit); }
.mpee-fix__menu .is-excuse b { background: var(--st-exc); }
.mpee .mpee-fix__menu .is-auto { border-top: 1px solid var(--mpee-line); border-radius: 0 0 8px 8px; margin-top: 4px; color: var(--mpee-muted); font-weight: 600; font-size: 13px; }
.mpee-fix.is-saving { opacity: .5; pointer-events: none; }
.mpee-notice small { display: block; margin-top: 4px; font-size: 13px; }

/* ---------- Concours blanc : espace équipe (import Excel) ---------- */

.mpee-cbteam { padding: 0; border: 2px dashed var(--mpee-sand); box-shadow: none; background: var(--mpee-paper); }
.mpee-cbteam summary { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; list-style: none; }
.mpee-cbteam summary::-webkit-details-marker { display: none; }
.mpee-cbteam summary::after { content: "+"; margin-left: auto; font: 900 22px var(--mpee-display); color: var(--mpee-muted); }
.mpee-cbteam[open] summary::after { content: "–"; }
.mpee-cbteam__icon { flex-shrink: 0; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--mpee-ink); color: var(--mpee-coral); }
.mpee-cbteam__head { display: flex; flex-direction: column; gap: 2px; }
.mpee-cbteam__head small { color: var(--mpee-muted); font-size: 13px; }
.mpee-cbteam__body { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 18px; }
.mpee-cbup { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 14px; background: var(--mpee-white); }
.mpee-cbup label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.mpee-cbup label small { font-weight: 500; color: var(--mpee-muted); }
.mpee-cbup__file { display: flex; flex-direction: column; gap: 8px; }
.mpee-cbup__file label { display: block; }
.mpee-cbup input[type=file] { padding: 14px; border: 2px dashed var(--mpee-sand); border-radius: 12px; background: var(--mpee-paper); font: inherit; font-size: 14px; cursor: pointer; }
.mpee-cbup input[type=file]:hover { border-color: var(--mpee-red); }
.mpee-cbup__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.mpee-cbup input[type=number], .mpee-cbup input[type=text] { height: 44px; border: 1px solid var(--mpee-sand); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 15px; font-weight: 500; }
.mpee .mpee-cbup__check { flex-direction: row; align-items: center; gap: 10px; font-weight: 600; }
.mpee-cbup__check input { width: 18px; height: 18px; accent-color: var(--mpee-red); }
.mpee-cbup__help { margin: 0 !important; font-size: 13px; color: var(--mpee-muted); }
.mpee-cbup code { background: var(--mpee-cream); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.mpee-cbup .mpee-btn { align-self: flex-start; }
.mpee-cbteam__list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mpee-cbteam__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 14px; border-radius: 10px; background: var(--mpee-white); font-size: 14px; }
.mpee-cbteam__list li small { color: var(--mpee-muted); }
.mpee-cbteam__list li a { margin-left: auto; font-weight: 700; font-size: 13px; }
.mpee-cbteam__state { padding: 1px 8px; border-radius: 6px; background: var(--mpee-cream); font-size: 12px; font-weight: 800; color: var(--mpee-muted); }
.mpee-cbteam__state.is-on { background: var(--st-good-bg); color: var(--st-good-ink); }
.mpee-cbrep { padding: 14px 18px; border-radius: 12px; background: var(--st-good-bg); color: var(--st-good-ink); border: 1px solid #b9e2b9; }
.mpee-cbrep.is-error { background: var(--st-crit-bg); color: var(--st-crit-ink); border-color: #f2c2c2; }
.mpee-cbrep__title { margin: 0 0 6px !important; font-weight: 800; }
.mpee-cbrep ul { margin: 0; padding-left: 18px; font-size: 14px; }
.mpee-cbrep li { margin: 4px 0; }
.mpee-cbrep small { color: var(--mpee-text-2); }
.mpee-cbrep__warn { margin: 6px 0 0 !important; font-size: 13px; color: var(--st-warn-ink); }

/* Panneau de gestion des concours (équipe) */
.mpee-cbpanel { display: flex; flex-direction: column; gap: 16px; }
.mpee-cbpanel__block { padding: 18px; border-radius: 14px; background: var(--mpee-white); display: flex; flex-direction: column; gap: 12px; }
.mpee-cbpanel__block h3 { font-size: 16px; display: flex; align-items: baseline; gap: 10px; }
.mpee-cbpanel__block h3 small { font: 700 12px var(--mpee-font); color: var(--mpee-muted); }
.mpee-cbpanel__muted { margin: 0 !important; font-size: 13px; color: var(--mpee-muted); }
.mpee-cbpanel__err { color: var(--st-crit-ink); }
.mpee-cbpanel__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mpee-cbpanel__list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--mpee-line); }
.mpee-cbpanel__list li:first-child { border-top: 0; padding-top: 0; }
.mpee-cbpanel__name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mpee-cbpanel__name small { font-size: 12px; color: var(--mpee-muted); }
.mpee-cbpanel__actions, .mpee-cbpanel__actions form, .mpee-cbpanel__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.mpee .mpee-cbpanel .mpee-btn--small:not(.mpee-btn--primary) { background: var(--mpee-white); border-color: var(--mpee-sand); color: var(--mpee-ink); }
.mpee .mpee-cbpanel .mpee-btn--small:not(.mpee-btn--primary):hover { border-color: var(--mpee-ink); }
.mpee .mpee-cbpanel .mpee-cbpanel__del:hover { background: var(--st-crit); border-color: var(--st-crit); color: var(--mpee-white); }
.mpee-cbpanel__gs { margin: 0 !important; font-size: 14px; }
.mpee-cbpanel__link { display: flex; flex-direction: column; gap: 10px; }
.mpee-cbpanel__link input[type=url] { height: 44px; border: 1px solid var(--mpee-sand); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 15px; }
.mpee-cbpanel__link .mpee-btn { align-self: flex-start; }
.mpee-cbpanel .mpee-cbup { padding: 0; }

/* ---------- Documents rangés par matière ---------- */

.mpee-docfilters { display: flex; flex-direction: column; gap: 10px; }
.mpee-docfilters__row { display: flex; align-items: flex-start; gap: 12px; }
.mpee-docfilters__label { flex-shrink: 0; width: 64px; padding-top: 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mpee-muted); }
.mpee-chip__n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--mpee-cream); color: var(--mpee-muted); font-size: 11px; font-weight: 800; }
.mpee-chip[aria-pressed="true"] .mpee-chip__n { background: rgba(255, 255, 255, .18); color: var(--mpee-white); }
.mpee-docgroups { display: flex; flex-direction: column; gap: 26px; }
.mpee-docgroup__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 4px 10px; }
.mpee-docgroup__head h2 { font-size: 20px; font-weight: 900; }
.mpee-docgroup__head span { font-size: 13px; font-weight: 700; color: var(--mpee-muted); }
.mpee-kind { display: inline-block; margin-right: 4px; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 800; background: var(--mpee-cream); color: var(--mpee-text-2); }
.mpee-kind.is-supports-de-cours { background: #e8eefb; color: #1d3b7a; }
.mpee-kind.is-sujets-de-concours-blanc { background: var(--mpee-red-soft); color: var(--mpee-red-dark); }
@media (max-width: 640px) {
	.mpee-docfilters__row { flex-direction: column; gap: 6px; }
	.mpee-docfilters__label { padding-top: 0; }
	.mpee-docfilters .mpee-chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; }
	.mpee-docfilters .mpee-chip { flex-shrink: 0; }
}

/* ---------- Annonces, compte ---------- */

.mpee-annonce { padding: 24px; }
.mpee-annonce h2 { margin-bottom: 10px; }
.mpee-annonce--short { padding: 0 0 14px; border-bottom: 1px solid var(--mpee-line); }
.mpee-annonce--short:last-child { border-bottom: 0; padding-bottom: 0; }
.mpee-annonce--short h3 a { color: var(--mpee-ink); text-decoration: none; }
.mpee-annonce--short p { margin: 4px 0; font-size: 14px; color: var(--mpee-text-2); }
.mpee-annonce--short small { font-size: 13px; color: var(--mpee-muted); }
.mpee-prose { color: var(--mpee-text-2); }
.mpee-prose img { max-width: 100%; height: auto; }
.mpee-dl { margin: 0; display: grid; gap: 4px 0; }
.mpee-dl dt { font-size: 13px; font-weight: 700; color: var(--mpee-muted); }
.mpee-dl dd { margin: 0 0 10px; font-weight: 600; }
.mpee-taglist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mpee-taglist li { background: var(--mpee-cream); border-radius: 8px; padding: 6px 10px; font-size: 14px; font-weight: 700; }
.mpee-message { padding: 32px; max-width: 640px; }
.mpee-message h1 { font-size: 28px; margin-bottom: 12px; }

/* ---------- Pages de connexion ---------- */

.mpee-auth__grid { display: flex; flex-wrap: wrap; min-height: 100vh; }
.mpee-auth__intro { flex: 1 1 480px; background: var(--mpee-ink); color: var(--mpee-cream); padding: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.mpee-auth__pitch { max-width: 520px; display: flex; flex-direction: column; gap: 16px; }
.mpee-auth__pitch .mpee-eyebrow { color: var(--mpee-sand); letter-spacing: .14em; }
.mpee-auth__pitch h1 { font-size: clamp(34px, 4.4vw, 52px); }
.mpee-auth__pitch p { color: var(--mpee-sand); font-size: 17px; line-height: 1.6; margin: 0; }
.mpee-auth__features { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 28px; color: var(--mpee-sand); font-size: 14px; }
.mpee-auth__features li { display: flex; align-items: center; gap: 10px; }
.mpee-auth__features .mpee-icon { color: var(--mpee-coral); }
.mpee-auth__panel { flex: 1 1 440px; display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.mpee-auth__card { width: 100%; max-width: 440px; padding: 36px; display: flex; flex-direction: column; gap: 16px; }
.mpee-auth__card h2 { font-size: 28px; }
.mpee-auth__card .mpee-flash, .mpee-auth__card .mpee-error { margin: 0; }
.mpee-auth__card > p { margin: 0; }
.mpee-form { display: flex; flex-direction: column; gap: 18px; }
.mpee-field { display: flex; flex-direction: column; gap: 7px; }
.mpee-field label { font-size: 14px; font-weight: 700; }
.mpee-field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mpee-field__row a { font-size: 13px; font-weight: 600; }
.mpee-field input { height: 48px; border: 1px solid var(--mpee-sand); border-radius: 10px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--mpee-ink); background: var(--mpee-white); }
.mpee-field input:focus { outline: 2px solid var(--mpee-red); outline-offset: 1px; border-color: var(--mpee-red); }
.mpee-help { font-size: 13px; color: var(--mpee-muted); }
.mpee-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--mpee-text-2); }
.mpee-check input { width: 18px; height: 18px; accent-color: var(--mpee-red); }

/* ---------- Téléphone et tablette ---------- */

@media (max-width: 900px) {
	.mpee-side { flex: 1 1 100%; position: sticky; height: auto; padding: 10px 12px; gap: 0; z-index: 20; }
	.mpee-side__top { padding: 0 4px; }
	.mpee .mpee-brand img { height: 32px; }
	.mpee-auth__intro .mpee-brand img { height: 40px; }
	.mpee-burger { display: inline-flex; align-items: center; justify-content: center; }
	.mpee-nav { display: none; padding-top: 12px; }
	.mpee-side.is-open .mpee-nav { display: flex; }
	.mpee-main { padding-top: 24px; gap: 22px; }
	.mpee-search { width: 100%; }
	.mpee-viewer { height: 70vh; padding: 12px 8px; }
	.mpee-auth__intro { min-height: 0; gap: 24px; }
	.mpee-auth__features { display: none; }
	.mpee-auth__card { padding: 26px 20px; }
	.mpee-dialog__grid { padding: 24px 20px; }
	.mpee-wm-preview { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.mpee * { transition: none !important; }
}

/* Pas d'impression des documents depuis le navigateur. */
@media print {
	.mpee-viewer, .mpee-viewer-wrap { display: none !important; }
}
.mpee-replay-wrap .mpee-tag { max-width: calc(100% - 64px); }
