/*
 * MLA — Classement.
 *
 * Feuille distincte de celle du quiz, et c'est délibéré : le classement
 * s'affiche sur le tableau de bord élève, une page **claire** faite de cartes
 * blanches à fine bordure dorée. La plaque noir et or du quiz y jurerait.
 *
 * On reprend donc le langage du tableau de bord — blanc, coins arrondis,
 * bordure et accents dorés, texte sombre — avec #DD9933 pour seule couleur de
 * marque, exactement comme les cartes « Mes cours » et « Mes flashcards ».
 */

.mla-board {
	--mla-or: #DD9933;
	--mla-or-f: #a8701e;
	--mla-or-cl: #f5c264;
	--mla-or-pale: #fdf6ea;
	--mla-encre: #1d2433;
	--mla-gris: #6b7280;
	--mla-trait: #ecedf0;

	max-width: 720px;
	margin: 28px auto;
	font-family: 'Roboto', sans-serif;
	line-height: 1.55;
	color: var(--mla-encre);
	-webkit-font-smoothing: antialiased;
}

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

/* ===== LA CARTE ===== */

.mla-board-card {
	position: relative;
	background: #fff;
	border: 1px solid rgba(221, 153, 51, .38);
	border-radius: 14px;
	padding: 26px 24px 22px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(29, 36, 51, .06);
}

/* La barre dorée en haut, comme sur les cartes du tableau de bord. */
.mla-board-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	background: linear-gradient(90deg, var(--mla-or-cl), var(--mla-or), var(--mla-or-f));
}

/* ===== TITRE ===== */

.mla-board-head {
	text-align: center;
	margin-bottom: 24px;
}

/*
 * Aligné sur les titres du tableau de bord — « Mes succès », « Mes cours »,
 * « Tableau de bord ». Mesurés à 26-27 px de capitale sur les captures, mais
 * l'écran de Sarah est à 125 % : une capture vaut 1,25 pixel physique pour
 * 1 pixel CSS. La police fait donc environ 29 px, et non 36.
 *
 * Écart assumé avec le brief §10, qui prévoit Tenor Sans pour les titres :
 * cette police n'a pas de graisse grasse, et la demander produirait un faux
 * gras baveux. Roboto 700, déjà chargée, offre un vrai gras et la même
 * allure que les titres voisins. Sur cette page, c'est la cohérence avec le
 * tableau de bord qui prime.
 */
.mla-board-head h2 {
	font-family: 'Roboto', sans-serif;
	font-weight: 700;
	letter-spacing: 0;
	font-size: 29px;
	line-height: 1.2;
	margin: 0;
	color: var(--mla-encre);

	/*
	 * Sans cela, Roboto soude le « f » et le « i » en une seule ligature, et
	 * le point du i disparaît : « défi » se lit « déf﻿i » sans point. C'est de
	 * la belle typographie anglaise, mais en français ça passe pour une faute.
	 */
	font-variant-ligatures: none;
	font-feature-settings: "liga" 0, "clig" 0;
}

/* Phrase d'accroche : c'est elle qui doit accrocher l'œil, en or de marque. */
.mla-board-head p {
	margin: 8px 0 0;
	color: var(--mla-or);
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-weight: 600;
	font-size: 19px;
}

/* Phrase informative : elle explique la règle, elle s'efface derrière l'accroche. */
.mla-board-head .mla-board-note {
	font-family: 'Roboto', sans-serif;
	font-size: 13px;
	font-style: italic;
	font-weight: 400;
	color: var(--mla-gris);
	margin-top: 8px;
}

/* Le lundi matin, le défi repart vide : on invite plutôt que de laisser un blanc. */
.mla-board-empty {
	text-align: center;
	color: var(--mla-gris);
	font-style: italic;
	margin: 26px 10px;
}

/* ===== PODIUM ===== */

.mla-board .mla-podium {
	display: grid;
	grid-template-columns: 1fr 1.15fr 1fr;
	align-items: end;
	gap: 12px;
	max-width: 460px;
	margin: 0 auto 22px;
}

.mla-board .mla-pod {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	min-width: 0;
}

.mla-board .mla-crown {
	font-size: 24px;
	margin-bottom: 2px;
	line-height: 1;
}

.mla-board .mla-avwrap {
	position: relative;
	margin-bottom: 8px;
}

/*
 * Pastille dorée sur fond blanc. Le halo tournant de la version sombre a été
 * retiré : sur une page claire il n'apporte rien, et c'était une animation
 * infinie de plus.
 */
.mla-board .mla-av {
	position: relative;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-family: 'Tenor Sans', serif;
	font-size: 21px;
	color: #fff;
	background: linear-gradient(180deg, var(--mla-or-cl), var(--mla-or));
	box-shadow: 0 2px 8px rgba(221, 153, 51, .35);
}

.mla-board .mla-pod--1 .mla-av {
	width: 66px;
	height: 66px;
	font-size: 25px;
	box-shadow: 0 3px 14px rgba(221, 153, 51, .45);
}

.mla-board .mla-av .mla-rk {
	position: absolute;
	bottom: -5px;
	right: -5px;
	width: 21px;
	height: 21px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid var(--mla-or);
	color: var(--mla-or-f);
	font-family: 'Roboto', sans-serif;
	font-size: 11px;
	font-weight: 700;
	display: grid;
	place-items: center;
}

.mla-board .mla-pod .mla-nom {
	font-family: 'Tenor Sans', serif;
	font-size: 15px;
	color: var(--mla-encre);
	max-width: 100%;
	overflow-wrap: break-word;
}

.mla-board .mla-pod .mla-tps {
	font-size: 12px;
	color: var(--mla-gris);
	margin-bottom: 8px;
}

/* Les marches : un doré très pâle, pour ne pas alourdir la page. */
.mla-board .mla-base {
	width: 100%;
	border-radius: 10px 10px 0 0;
	background: linear-gradient(180deg, var(--mla-or-pale), #fff);
	border: 1px solid rgba(221, 153, 51, .3);
	border-bottom: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

.mla-board .mla-base--1 { height: 92px; }
.mla-board .mla-base--2 { height: 70px; }
.mla-board .mla-base--3 { height: 54px; }

.mla-board .mla-base .mla-med { font-size: 19px; line-height: 1; }

/*
 * Le nombre en grand, le libellé en petit dessous : « 24 bonnes réponses »
 * en une seule ligne déborderait d'une marche large de 150 pixels, moins
 * encore sur téléphone.
 */
.mla-board .mla-base .mla-sc {
	font-family: 'Tenor Sans', serif;
	color: var(--mla-or-f);
	font-size: 22px;
	line-height: 1.1;
}

.mla-board .mla-base .mla-sc-label {
	font-family: 'Roboto', sans-serif;
	font-size: 10.5px;
	line-height: 1.2;
	color: var(--mla-gris);
	text-transform: lowercase;
	padding: 0 4px;
}

/* ===== TABLEAU ===== */

.mla-board-table {
	width: 100%;
	/* `fixed` empêche une colonne de pousser les autres hors de l'écran. */
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 14.5px;
	margin-top: 6px;
}

/* Sur grand écran, l'information secondaire vit dans sa propre colonne. */
.mla-board-table .mla-tp-inline { display: none; }

.mla-board-table .mla-nom-texte { overflow-wrap: break-word; }

.mla-board-table td.mla-nom {
	overflow-wrap: break-word;
	word-break: break-word;
}

/* Étiquette « Top 10 », pour que l'élève sache ce qu'elle regarde. */
.mla-board-top {
	font-family: 'Tenor Sans', serif;
	font-size: 13px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--mla-or-f);
	margin: 22px 0 6px;
	padding-bottom: 6px;
	border-bottom: 1px solid rgba(221, 153, 51, .25);
}

.mla-board-table th {
	font-family: 'Tenor Sans', serif;
	font-weight: 400;
	color: var(--mla-or-f);
	font-size: 13px;
	padding: 10px 8px;
	border-bottom: 1px solid rgba(221, 153, 51, .3);
	vertical-align: bottom;
}

.mla-board-table td {
	padding: 12px 8px;
	border-bottom: 1px solid var(--mla-trait);
	color: var(--mla-encre);
	vertical-align: middle;
}

.mla-board-table tr:last-child td { border-bottom: none; }

.mla-board-table tbody tr:hover td { background: var(--mla-or-pale); }

/*
 * L'alignement de chaque en-tête suit celui de sa colonne. Auparavant les
 * en-têtes étaient tous à gauche alors que les valeurs étaient à droite :
 * les deux ne se répondaient pas.
 */
.mla-board-table th.mla-rg,
.mla-board-table td.mla-rg {
	text-align: center;
	width: 42px;
}

.mla-board-table th:nth-child(2),
.mla-board-table td.mla-nom {
	text-align: left;
}

.mla-board-table th.mla-sc,
.mla-board-table td.mla-sc {
	text-align: center;
	width: 30%;
}

.mla-board-table th.mla-tp,
.mla-board-table td.mla-tp {
	text-align: center;
	width: 26%;
}

/* L'en-tête « Total des bonnes réponses » se replie sur plusieurs lignes plutôt que de déborder. */
.mla-board-table th {
	overflow-wrap: break-word;
	hyphens: auto;
}

.mla-board-table .mla-rg {
	color: var(--mla-or-f);
	font-weight: 700;
}

.mla-board-table td.mla-sc { font-weight: 700; }

.mla-board-table td.mla-tp {
	color: var(--mla-gris);
	font-size: 13px;
}

/* ===== LA LIGNE DE L'ÉLÈVE QUI REGARDE ===== */

/*
 * Fond doré soutenu et texte foncé : elle doit se repérer sans chercher,
 * qu'elle soit dans le top ou ajoutée en bas.
 */
.mla-board-table tr.is-me td {
	background: #f6e2c0;
	color: #4a3410;
	font-weight: 700;
}

.mla-board-table tr.is-me:hover td { background: #f2d9ae; }

.mla-board-table tr.is-me .mla-rg { color: #7a5312; }
.mla-board-table tr.is-me .mla-tp { color: #6b4b13; }

/* Hors du top : un trait la détache des dix premières. */
.mla-board-table tr.is-apart td {
	border-top: 2px dashed rgba(221, 153, 51, .55);
}

.mla-board-table .mla-moi {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--mla-or);
	color: #fff;
	font-family: 'Roboto', sans-serif;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	vertical-align: middle;
}

.mla-board-bravo {
	text-align: center;
	margin: 16px 0 0;
	color: var(--mla-or-f);
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-size: 17px;
}

/* ===== MOBILE ===== */

@media (max-width: 600px) {
	.mla-board { margin: 18px auto; }

	.mla-board-card {
		padding: 20px 14px 16px;
		border-radius: 12px;
	}

	/* Réduit sur téléphone, mais reste le titre le plus fort de la carte. */
	.mla-board-head h2 { font-size: 23px; }
	.mla-board-head p { font-size: 16px; }

	.mla-board .mla-podium { gap: 7px; }

	.mla-board .mla-av { width: 46px; height: 46px; font-size: 18px; }
	.mla-board .mla-pod--1 .mla-av { width: 56px; height: 56px; font-size: 21px; }

	.mla-board .mla-pod .mla-nom { font-size: 13.5px; }
	.mla-board .mla-pod .mla-tps { font-size: 11px; }

	.mla-board .mla-base .mla-sc { font-size: 19px; }
	.mla-board .mla-base .mla-sc-label { font-size: 9.5px; }

	/*
	 * ===== LE TABLEAU SUR TÉLÉPHONE =====
	 *
	 * Quatre colonnes ne tiennent pas dans 375 pixels : le tableau débordait à
	 * droite. On passe à trois — rang, élève, nombre — et l'information
	 * secondaire glisse sous le prénom, là où il y a de la place.
	 */
	.mla-board-table { font-size: 13.5px; }
	.mla-board-table td { padding: 10px 4px; }

	/* La colonne secondaire disparaît, sa donnée réapparaît sous le prénom. */
	.mla-board-table th.mla-tp,
	.mla-board-table td.mla-tp { display: none; }

	.mla-board-table .mla-tp-inline {
		display: block;
		margin-top: 2px;
		font-size: 11.5px;
		color: var(--mla-gris);
		font-weight: 400;
	}

	.mla-board-table tr.is-me .mla-tp-inline { color: #6b4b13; }

	/* Le nombre seul suffit : l'en-tête porte déjà le sens. */
	.mla-board-table .mla-l { display: none; }

	.mla-board-table .mla-n {
		font-size: 17px;
		font-weight: 700;
	}

	.mla-board-table th.mla-rg,
	.mla-board-table td.mla-rg { width: 30px; }

	.mla-board-table th.mla-sc,
	.mla-board-table td.mla-sc { width: 74px; }

	.mla-board-table th {
		font-size: 11.5px;
		line-height: 1.25;
		padding: 8px 4px;
	}

	.mla-board-table .mla-moi {
		font-size: 9.5px;
		padding: 1px 5px;
	}
}
