/* ==========================================================================
   dubois.abc-applications.com — mise en page (couleurs : css/colors.css)
   ========================================================================== */

html { color: var(--texte); }
body {
	margin: 0;
	font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;	/* polices système */
}
a { color: var(--lien); }
a.add-webapp { display: none; text-align: center; padding: 6px; }

/* --- en-tête et bande des niveaux ------------------------------------------ */
.bandeau { text-align: center; padding: 28px 16px 18px; }
.bandeau h1 { margin: 0; font-size: 2.1em; font-weight: 800; letter-spacing: -.01em; }
.bandeau p { margin: .2em 0 0; color: var(--texte-secondaire); }
.niveaux { display: flex; height: 6px; }
.niveaux span { flex: 1; }
.CP  { background: var(--niveau-cp); }
.CE1 { background: var(--niveau-ce1); }
.CE2 { background: var(--niveau-ce2); }
.CM1 { background: var(--niveau-cm1); }
.CM2 { background: var(--niveau-cm2); }

/* --- contenu -------------------------------------------------------------- */
.page { max-width: 980px; margin: 0 auto; padding: 8px 20px 40px; box-sizing: border-box; }
.chapeau { color: var(--texte-secondaire); font-size: 1.02em; }

/* --- filtres : mise à jour immédiate du tableau ---------------------------- */
.filtres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; margin: 1.4em 0 1em; padding: 18px;
	background: var(--fond-carte); border: 1px solid var(--bordure); border-radius: 14px; box-shadow: 0 2px 10px var(--ombre); }
.filtres fieldset { border: 0; margin: 0; padding: 0; }
.filtres legend, .champ > label { display: block; font-size: .8em; font-weight: 700; text-transform: uppercase;
	letter-spacing: .04em; color: var(--texte-secondaire); margin-bottom: 6px; }
.niveau, .champ.recherche, .champ.son { grid-column: 1 / -1; }
.champ select, .champ input[type=search] { width: 100%; box-sizing: border-box; padding: 8px 10px; font: inherit;
	color: var(--texte); background: var(--fond-champ); border: 1px solid var(--bordure); border-radius: 8px; }
.champ input[type=search] { max-width: 22em; }
.champ select:focus, .champ input:focus { outline: 2px solid var(--principal); outline-offset: 1px; }

/* boutons à bascule (âge, position) : vrais boutons radio, cachés visuellement */
.niveau label, .position label { position: relative; display: inline-block; cursor: pointer; }
.niveau input, .position input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.niveau label span, .position label span { display: inline-block; padding: 7px 16px; border: 1px solid var(--bordure);
	border-radius: 999px; background: var(--fond-champ); margin: 0 4px 6px 0; }
.niveau label span small { color: var(--texte-secondaire); font-weight: 600; margin-left: 2px; }
.niveau input:checked + span, .position input:checked + span { background: var(--principal); border-color: var(--principal);
	color: var(--texte-sur-principal); }
.niveau input:checked + span small { color: inherit; opacity: .85; }
.niveau input:focus-visible + span, .position input:focus-visible + span { outline: 2px solid var(--principal); outline-offset: 2px; }
.position { display: inline-block; margin-left: 10px; vertical-align: middle; }
.position label span { padding: 5px 12px; font-size: .9em; }

/* --- résumé ------------------------------------------------------------------ */
.resume { display: flex; align-items: center; gap: 12px; color: var(--texte-secondaire); font-weight: 600; }
#effacer { font: inherit; font-size: .85em; font-weight: 400; padding: 3px 12px; cursor: pointer; color: var(--lien);
	background: none; border: 1px solid var(--bordure); border-radius: 999px; }

/* --- tableau ------------------------------------------------------------------ */
.tableau { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--fond-carte);
	border: 1px solid var(--bordure); border-radius: 12px; font-size: .95em; }
.tableau th, .tableau td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--bordure); }
.tableau thead th { position: sticky; top: 0; z-index: 1; background: var(--fond-entete-table);
	border-bottom: 2px solid var(--principal); font-size: .8em; letter-spacing: .04em; text-transform: uppercase; }
.tableau thead th:first-child { border-top-left-radius: 11px; }
.tableau thead th:last-child  { border-top-right-radius: 11px; }
.tableau thead th button { all: unset; cursor: pointer; font-weight: 700; }
.tableau thead th button:focus-visible { outline: 2px solid var(--principal); outline-offset: 2px; }
.tableau th[aria-sort="ascending"] button::after  { content: " ▲"; font-size: .75em; }
.tableau th[aria-sort="descending"] button::after { content: " ▼"; font-size: .75em; }
.tableau tbody th { font-weight: 600; }
.tableau tbody tr:nth-child(even) > * { background: var(--fond-ligne-paire); }
.tableau tbody tr:hover > * { background: var(--fond-ligne-survol); }
.tableau tbody tr:last-child > * { border-bottom: none; }

/* --- sources et pied de page --------------------------------------------------- */
.sources { margin-top: 2.5em; padding-top: 1em; border-top: 1px solid var(--bordure); }
.sources h2 { font-size: 1.15em; margin: 0 0 .3em; }
.sources ul { padding-left: 1.2em; }
.pied { text-align: center; color: var(--texte-secondaire); font-size: .78em; padding: 16px 20px 32px;
	border-top: 1px solid var(--bordure); }
.pied p { max-width: 760px; margin: .5em auto; }
.pied a { color: var(--lien-pied); }
.pied img { vertical-align: middle; }

/* --- petits écrans ------------------------------------------------------------- */
@media (max-width: 720px) {
	body { font-size: 16px; }
	.filtres { grid-template-columns: 1fr; padding: 14px; }
	.position { display: block; margin: 8px 0 0; }
	.tableau th, .tableau td { padding: 7px 8px; }
	.tableau { font-size: .9em; }
}

/* --- Dubois : nombres alignés à droite, bouton « afficher plus » ------------- */
.tableau .nombre, .tableau td.nombre { text-align: right; font-variant-numeric: tabular-nums; }
.tableau thead th.nombre { text-align: right; }
.suite-liste { text-align: center; margin: 1em 0; }
#plus { font: inherit; padding: 7px 18px; cursor: pointer; color: var(--texte-sur-principal);
	background: var(--principal); border: 0; border-radius: 999px; }

/* --- Dubois : classes à cocher, colonne « Exemple » ---------------------------- */
.classes legend { display: flex; gap: 6px; align-items: baseline; }
button.lien { all: unset; cursor: pointer; color: var(--lien); font-size: .95em; text-transform: none; letter-spacing: 0; font-weight: 400; }
button.lien:hover { text-decoration: underline; }
button.lien:focus-visible { outline: 2px solid var(--principal); outline-offset: 2px; }
.tableau td.exemple { color: var(--texte-secondaire); font-size: .92em; }
@media (max-width: 720px) {
	.tableau .exemple { display: none; }		/* écran étroit : l'exemple ne tient pas */
}
.tableau td.prononciation { font-family: "Doulos SIL", "Charis SIL", "Lucida Grande", "Arial Unicode MS", sans-serif; white-space: nowrap; color: var(--texte-secondaire); }
@media (max-width: 720px) { .champ.son select { font-size: .95em; } }
.tableau thead th { white-space: nowrap; }
.champ.son select { width: 22em; max-width: 100%; vertical-align: middle; }
.champ.son .position { margin-left: 10px; }
@media (max-width: 720px) { .champ.son .position { margin-left: 0; } }
