/* ===== Espace enseignant : réglages ===== */
.ens-outil { max-width: 74em; margin: 0 auto; text-align: left; }
.ens-outil *:focus-visible { outline: 3px solid #f2b01e; outline-offset: 2px; }
.ens-onglets { display: flex; flex-wrap: wrap; gap: .5em; margin-bottom: .8em; }
.ens-onglet { padding: .55em 1.2em; border: 2px solid #e5e5e5; border-radius: 2em; background: #fff; color: #777; cursor: pointer; font-weight: 600; -webkit-user-select: none; user-select: none; }
.ens-onglet:hover { border-color: #5cc79a; }
.ens-onglet.actif { background: #16855a; border-color: #16855a; color: #fff; }
.ens-boite { background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; padding: 1.1em 1.3em 1.2em; margin-bottom: 1.4em; }
.ens-boite h4 { text-align: left; text-transform: none; letter-spacing: 0; margin: 1.1em 0 .6em; font-size: 1em; color: #16855a; }
.ens-boite h4 small, .ens-champ small { color: #999; font-weight: 400; font-size: .85em; text-transform: none; letter-spacing: 0; }
.ens-chap-t { text-align: left; text-transform: none; letter-spacing: 0; margin: .9em 0 .4em; font-size: .9em; color: #2f6f8f; }
.ens-ligne { display: flex; flex-wrap: wrap; gap: .8em 1em; align-items: flex-end; }
.ens-champ { display: block; margin: 0; min-width: 7em; }
.ens-champ.ens-large { flex: 1 1 16em; }
.ens-champ.ens-court { min-width: 4.5em; width: 6em; }
.ens-champ > span:first-child { display: block; margin: 0 0 .3em; font-size: .82em; color: #878787; }
.ens-champ input, .ens-champ select { font: inherit; width: 100%; padding: .45em .7em; border: 2px solid #e5e5e5; border-radius: .6em; background: #fff; color: #333; box-sizing: border-box; height: auto; }
.ens-champ input:focus, .ens-champ select:focus { outline: none; border-color: #16855a; }
.ens-code-c { display: flex; gap: .4em; align-items: center; }
.ens-code-c input { width: 7.5em; font: 600 1.05em/1.2 'Fredoka', 'Nunito', sans-serif; color: #16855a; letter-spacing: .08em; text-transform: uppercase; }
.ens-lien-r { flex: none; width: 2.3em; height: 2.3em; border-radius: 50%; background: #eaf7f1; color: #16855a; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ens-lien-r .icon:before { margin: 0; }
.ens-puces { display: flex; flex-wrap: wrap; gap: .35em; }
.ens-puce { padding: .3em .8em; border: 2px solid #e5e5e5; border-radius: 2em; background: #fff; color: #666; cursor: pointer; font-size: .85em; line-height: 1.3; }
.ens-puce:hover { border-color: #5cc79a; }
.ens-puce.actif { background: #16855a; border-color: #16855a; color: #fff; }
.ens-x { display: inline-block; padding: 0 .35em; border-radius: 50%; background: #eee; cursor: pointer; font-weight: 700; }
.ens-meths, .ens-bareme { display: grid; grid-template-columns: repeat(auto-fill, minmax(21em, 1fr)); gap: .45em; }
.ens-meth { display: flex; align-items: center; justify-content: space-between; gap: .5em; padding: .4em .5em .4em .9em; border: 2px solid #e5e5e5; border-radius: .8em; background: #fff; color: #666; font-size: .9em; line-height: 1.25; }
.ens-meth small { display: block; color: #9a9a9a; font-weight: 400; font-size: .82em; margin-top: .1em; }
.ens-meth small .icon { color: #c4302b; }
.ens-meth.actif { border-color: #5cc79a; background: #eaf7f1; color: #16855a; font-weight: 600; }
.ens-pm { flex: none; display: flex; align-items: center; gap: .3em; }
.ens-pm b { min-width: 1.6em; text-align: center; font-family: 'Fredoka', 'Nunito', sans-serif; white-space: nowrap; }
.ens-pm [role=button] { width: 1.8em; height: 1.8em; border-radius: 50%; background: #fff; border: 2px solid #d4efe3; color: #16855a; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 700; -webkit-user-select: none; user-select: none; }
.ens-pm [role=button]:hover { border-color: #16855a; }
.ens-options { margin-top: 1em; }
.ens-case { display: flex; align-items: center; gap: .45em; margin: 0; padding-bottom: .5em; font-size: .93em; color: #555; cursor: pointer; }
.ens-outil .ens-case input[type=checkbox] { -webkit-appearance: checkbox; appearance: auto; display: inline-block; float: none; position: static; opacity: 1; z-index: auto; width: 1.15em; height: 1.15em; accent-color: #16855a; margin: 0; }
.ens-outil .ens-case:before { display: none !important; }
.ens-bts { display: flex; flex-wrap: wrap; gap: .6em; margin-top: 1.1em; }
.ens-act { display: inline-flex; align-items: center; gap: .55em; padding: .5em .95em; border: 2px solid #e5e5e5; border-radius: .8em; background: #fff; color: #555; cursor: pointer; font-size: .95em; -webkit-user-select: none; user-select: none; }
.ens-act:hover { border-color: #5cc79a; }
.ens-act .icon { flex: none; width: 1.9em; height: 1.9em; border-radius: 50%; background: #eaf7f1; color: #16855a; display: flex; align-items: center; justify-content: center; }
.ens-act .icon:before { margin: 0; }
.ens-act-p { border-color: #16855a; } .ens-act-p .icon { background: #16855a; color: #fff; }
.ens-petit { color: #999; font-size: .85em; font-weight: 400; }
.ens-alerte { color: #b5530b; font-size: .9em; margin: .6em 0 0; }
.ens-lien { color: #16855a; text-decoration: underline; cursor: pointer; }
.ens-apercu-titre { font-weight: 700; color: #16855a; margin: 0 0 .7em; }

/* ===== Feuilles A4 (aperçu à l'écran) ===== */
.ens-feuilles { background: #eef1ef; border-radius: 1.2em; padding: 1.2em; overflow-x: auto; }
.ens-page { width: 210mm; min-height: 297mm; box-sizing: border-box; margin: 0 auto 1.2em; padding: 16mm 18mm 14mm; background: #fff; color: #000; box-shadow: 0 2px 10px rgba(0,0,0,.12); font-family: Garamond, 'EB Garamond', 'Cormorant Garamond', 'Times New Roman', Georgia, serif; font-size: 12pt; line-height: 1.25; position: relative; text-align: left; }
.ens-page:last-child { margin-bottom: 0; }
.ens-page h1, .ens-page h2, .ens-page h3, .ens-page p { text-transform: none; letter-spacing: 0; }
.ens-page p, .ens-page div, .ens-page td, .ens-page li, .ens-page span { text-align: left; color: inherit; }
.ens-page b, .ens-page strong, .ens-page u { color: inherit; }
.ens-page p { margin: 0; }
.ens-page a { color: inherit; border: 0; }
.ens-page .ens-vide { color: #999; font-style: italic; text-align: center; padding: 3em 0; }
.ens-page .ens-code { position: absolute; right: 18mm; bottom: 6mm; font: 8pt Arial, sans-serif; color: #aaa; }
.ens-page sup { font-size: .7em; line-height: 0; vertical-align: .45em; }
.m-f { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .1em; line-height: 1.12; text-align: center; }
.m-f > span { padding: 0 .18em; }
.m-f sup { vertical-align: .45em; }
.m-f > span:first-child sup { vertical-align: .4em; }
.m-f > span:last-child { padding-top: .15em; }
.m-f > span:first-child { border-bottom: .06em solid currentColor; }
.m-rac { border-top: .06em solid currentColor; padding: 0 .1em; }
.m-ang { display: inline-block; position: relative; padding-top: .15em; }
.m-ang:before { content: ''; position: absolute; left: 10%; right: 10%; top: -.05em; height: .35em; border: .06em solid currentColor; border-bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.m-fig { display: block; max-width: 100%; height: auto; margin: .2em 0; font-family: Arial, sans-serif; }
.m-tab { border-collapse: collapse; margin: .3em 0; }
.m-tab td, .m-tab th { border: 1px solid #000; padding: .2em .7em; text-align: center; min-width: 2.2em; font-weight: 400; }
.m-tab th { background: #E7E6E6; }

#features .ens-page p { text-align: left; }
#features .ens-page .fi-sous, #features .ens-page .ev-calc, #features .ens-page .ens-vide { text-align: center; }
#features .ens-page .ev-tete { text-align: justify; }
#features .ens-page .ens-code { text-align: right; }

/* ----- Modèle « Feuille d'exercices » ----- */
.ens-page.ens-fiche { font-size: 14pt; line-height: 1.2; padding: 25mm 25mm 20mm; page: feuille; }
.ens-fiche .fe-titre { font: 400 18pt/1.3 Garamond, 'EB Garamond', 'Times New Roman', serif; color: #2F5496; text-align: center; border-top: 1px solid #4472C4; border-bottom: 1px solid #4472C4; padding: .1em 0; margin: 0 0 1.1em; text-transform: none; letter-spacing: 0; }
.fe-cols { column-count: 2; column-gap: 12.5mm; }
.fe-exo { break-inside: avoid; margin: 0 0 1.3em; }
#features .ens-page .fe-tete { text-align: justify; margin: 0 0 .35em; }
.fe-liste { list-style: none; margin: 0; padding: 0 0 0 1.1em; }
.fe-liste li { margin: 0 0 .05em; padding: 0; display: block; break-inside: avoid; }
.fe-lab { display: inline-block; min-width: 1.5em; }
.fe-noms { padding-left: 0; }
.fe-noms .fe-lab { min-width: 0; }
.fe-txt { display: inline; }
.fe-esp { display: block; }
.fe-txt .ens-fig { display: block; }
.ens-fiche .m-fig, .ens-fiche .m-tab, .ens-fiche .ens-qcm { max-width: 100%; }
.ens-fiche .ens-qcm { font-size: .85em; }
@page feuille { size: A4 portrait; margin: 25mm; }

/* ----- Modèle « Évaluation » ----- */
.ens-page.ens-eval { padding: 12mm 25mm 20mm; page: evaluation; }
@page evaluation { size: A4 portrait; margin: 12mm 25mm 20mm; }
.ev-nom { font: 9pt/1.35 Calibri, Arial, sans-serif; margin: 0 0 9mm; }
.ens-eval .ev-titre { font: 700 18pt/1.2 Garamond, 'EB Garamond', 'Times New Roman', serif; color: #2F5496; text-align: center; border-top: 1px solid #4472C4; border-bottom: 1px solid #4472C4; padding: .1em 0; margin: 0 0 .3em; }
.ens-page .ev-calc { text-align: center; font-weight: 700; text-decoration: underline; margin: 0 0 .7em !important; }
.ev-exo { margin: 0 0 1em; break-inside: avoid-page; }
.ens-page .ev-tete { font-weight: 700; text-align: justify; margin: 0 0 .45em !important; }
.ev-tete u { text-underline-offset: .12em; }
.ens-tab { width: 100%; border-collapse: collapse; margin: 0; }
.ens-tab td { border: 1px solid #000; vertical-align: top; padding: .15em .35em .25em; font-weight: 700; }
.ens-tab tr { break-inside: avoid; }
.ens-tab .ens-rep b { font-weight: 700; }
.ens-cases-trou td { height: 2.6em; vertical-align: middle; }
.ens-cases-libre td, .ens-fiche .ens-cases-libre .ens-cel { font-weight: 400; }
.ens-qcm { width: 100%; border-collapse: collapse; }
.ens-qcm th, .ens-qcm td { border: 1px solid #000; padding: .3em .4em; text-align: center; vertical-align: middle; font-weight: 400; }
.ens-qcm th { background: #E7E6E6; text-align: left; width: 34%; }
.ens-qcm tr { break-inside: avoid; }
.ev-libre { margin-top: 1.2em; break-inside: avoid; }
.ev-libre-q { font-weight: 700; font-style: italic; font-size: 10pt; margin: 0 0 .4em !important; }
.ev-pointilles { border-bottom: 1.5px dotted #000; height: 1.35em; }

/* ----- Corrigés ----- */
.ens-page .ens-titre-c { font: 700 15pt/1.25 Garamond, 'Times New Roman', serif; color: #2F5496; text-align: center; border-bottom: 1px dashed #4472C4; padding-bottom: .2em; margin: 0 0 .7em; }
.ens-c-exo { margin: 0 0 .7em; break-inside: avoid-page; }
.ens-page .ens-c-tete { font-weight: 700; color: #538135; margin: 0 0 .2em; }
.ens-c-liste { margin: 0 0 0 1.2em; padding: 0; list-style: none; }
.ens-c-liste li { margin: 0 0 .25em; padding: 0; line-height: 1.5; }
.ens-page .ens-c-liste b { color: #16855a; }
.ens-corrige .m-fig { max-width: 70%; }

@media screen and (max-width: 840px) {
	.ens-feuilles { padding: .5em; }
	.ens-page { width: 100%; min-height: 0; padding: 1.2em .9em 2em; font-size: 10.5pt; }
	.ens-fiche { font-size: 11pt; }
	.ens-page .ens-code { right: 1em; bottom: .5em; }
	.ev-nom, .ens-page .fi-qr { margin-top: 0; }
	.ens-meths, .ens-bareme { grid-template-columns: 1fr; }
	.ens-grille { grid-template-columns: 1fr 1fr !important; }
}
@media screen and (max-width: 480px) { .ens-grille { grid-template-columns: 1fr !important; } .ens-tab td { display: block; width: auto !important; } }

/* ===== Impression ===== */
@page { size: A4 portrait; margin: 13mm 16mm 12mm; }
@media print {
	body { background: #fff !important; }
	#header, #banner, #footer, #nav, .ens-reglages, .ens-apercu-titre, .ens-verrou, .ens-rgpd { display: none !important; }
	#page-wrapper, #features, #features .container, .ens-outil, .ens-feuilles { padding: 0 !important; margin: 0 !important; background: #fff !important; width: auto !important; max-width: none !important; border: 0 !important; box-shadow: none !important; overflow: visible !important; }
	.ens-page, .ens-page.ens-fiche, .ens-page.ens-eval { width: auto; min-height: 0; padding: 0; margin: 0; box-shadow: none; page-break-after: always; break-after: page; }
	.ens-page:last-child { page-break-after: auto; break-after: auto; }
	.ens-page .ens-code { position: static; text-align: right; margin-top: .8em; }
	.ev-nom { margin: 0 0 9mm; }
	.ens-page .fi-qr { margin-top: 0; }
	.ens-page, .ens-page * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===== Verrou ===== */
#features.ens-section { padding-top: 1em; }
.ens-verrou { max-width: 26em; margin: 1em auto 2em; background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; padding: 1.6em 1.6em 1.3em; text-align: center; }
.ens-verrou h2 { font-size: 1.15em; color: #16855a; margin: .3em 0 .4em; text-transform: none; letter-spacing: 0; }
.ens-verrou p { font-size: .9em; color: #777; margin: 0 0 1em; }
.ens-verrou label { display: block; text-align: left; font-size: .82em; color: #878787; margin: 0 0 .3em; }
.ens-verrou input { font: inherit; width: 100%; padding: .55em .8em; border: 2px solid #e5e5e5; border-radius: .6em; box-sizing: border-box; margin: 0 0 .9em; letter-spacing: .12em; }
.ens-verrou input:focus { outline: none; border-color: #16855a; }
.ens-cadenas { display: inline-flex; width: 2.6em; height: 2.6em; border-radius: 50%; background: #eaf7f1; color: #16855a; align-items: center; justify-content: center; font-size: 1.2em; }
.ens-cadenas:before { margin: 0; }
.ens-msg { min-height: 1.3em; margin: .8em 0 0 !important; color: #b5530b !important; }
.ens-verrou.secoue { animation: ens-secoue .35s; }
@keyframes ens-secoue { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.ens-rgpd { text-align: center; color: #999; font-size: .85em; margin-top: 1em; }
@media (prefers-reduced-motion: reduce) { .ens-verrou.secoue { animation: none; } }
