/* Tableau de numération : une couleur par classe (millions violet, mille bleu, unités vert, partie décimale orange) */
#features.nu-section { padding-top: 1em; }
.nu-outil { max-width: 72em; margin: 0 auto; text-align: left; }
.nu-outil *:focus-visible { outline: 3px solid #f2b01e; outline-offset: 2px; }
.nu-outil:fullscreen { background: #fff; padding: 1.5em 2em; overflow: auto; max-width: none; }
.nu-outil:-webkit-full-screen { background: #fff; padding: 1.5em 2em; overflow: auto; max-width: none; }
.nu-carte { background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; padding: 1em 1.2em 1.2em; }

/* Le nombre et le tableau */
.nu-nombre { text-align: center; font: 600 3em/1.2 'Fredoka', 'Nunito', sans-serif; color: #333; margin: 0 0 .3em; letter-spacing: .02em; }
.nu-table-wrap { overflow-x: auto; padding-bottom: .3em; }
.nu-table { width: 100%; min-width: 34em; table-layout: fixed; border-collapse: collapse; margin: 0; }
.nu-table th, .nu-table td { border: 2px solid #ddd; text-align: center; padding: .35em .1em; vertical-align: middle; }
.nu-classe { background: var(--c); color: #fff; font-size: .8em; font-weight: 700; letter-spacing: .03em; line-height: 1.3; }
.nu-rang { color: var(--c); background: #fafafa; font-weight: 700; font-size: 1.15em; cursor: pointer; -webkit-user-select: none; user-select: none; transition: background .15s; }
.nu-rang.dec { font-size: .72em; }
.nu-rang:hover { background: #f0f0f0; }
.nu-rang.on { background: var(--c); color: #fff; }
.nu-chiffres td { height: 2em; position: relative; overflow: visible; cursor: pointer; font: 700 2.7em/1 'Fredoka', 'Nunito', sans-serif; color: var(--c); -webkit-user-select: none; user-select: none; }
.nu-chiffres td:hover { background: #fafafa; }
.nu-chiffres td.lu { background: #fff4c7; }
.nu-chiffres td.sel { box-shadow: inset 0 0 0 4px #f2b01e; }
.nu-table .fin-classe { border-right: 4px solid #888; }
.nu-chiffres td.virg::after { content: ','; position: absolute; right: -.14em; bottom: .32em; line-height: 1; color: #c0392b; font-size: 1.15em; z-index: 2; pointer-events: none; }
.nu-ch { display: inline-block; transition: transform .8s cubic-bezier(.3, .7, .3, 1); }
.nu-ch.neuf { animation: nu-pop .7s ease; color: #c0392b; }
@keyframes nu-pop { 0% { transform: scale(.2); opacity: 0; } 70% { transform: scale(1.2); } 100% { transform: none; opacity: 1; } }

/* × et ÷ */
.nu-ops { display: flex; flex-wrap: wrap; gap: .5em; justify-content: center; margin: 1em 0 .2em; }
.nu-op { padding: .4em 1.1em; border: 2px solid #b8e3cf; border-radius: .8em; background: #eaf7f1; color: #16855a; font: 700 1.25em/1.2 'Fredoka', 'Nunito', sans-serif; cursor: pointer; -webkit-user-select: none; user-select: none; transition: border-color .2s; }
.nu-op:hover { border-color: #16855a; }
.nu-op.div { background: #fdf2e1; border-color: #f5d6a6; color: #b76a06; }
.nu-op.div:hover { border-color: #b76a06; }
.nu-msg { margin-top: .8em; padding: .8em 1.1em; border-radius: .9em; background: #f6fcf9; color: #444; line-height: 1.7; text-align: center; }
.nu-msg.err { background: #fdecea; color: #a33; }
.nu-grand { font-size: 1.35em; color: #16855a; }

/* Écritures */
.nu-ecritures { margin-top: 1em; background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; padding: .4em 1.1em; }
.nu-ec { display: grid; grid-template-columns: 13em minmax(0, 1fr); gap: .3em 1em; align-items: center; padding: .55em 0; border-bottom: 1px solid #f0f0f0; line-height: 1.6; }
.nu-ec:last-child { border-bottom: 0; }
.nu-ec-t { font-size: .8em; text-transform: uppercase; letter-spacing: .06em; color: #999; font-weight: 700; }
.nu-ec-v { color: #444; }
.nu-ec-v small, .nu-gris { color: #888; }
.nu-cache { display: inline-flex; align-items: center; justify-content: center; width: 3em; height: 1.8em; border-radius: .5em; background: #eaf7f1; color: #16855a; font-weight: 700; cursor: pointer; justify-self: start; }
.nu-cache:hover { background: #d4efe3; }
.nu-f { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .15em; line-height: 1.1; font-weight: 700; }
.nu-f > span { padding: 0 .2em; }
.nu-f > span:first-child { border-bottom: 2px solid currentColor; }

/* Réglages, sous l'outil */
.nu-reglages { display: flex; flex-wrap: wrap; gap: 1em 1.5em; align-items: flex-end; justify-content: center; margin-top: 1em; padding: 1em 1.2em; background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; }
.nu-saisie { margin: 0; flex: 1 1 18em; max-width: 26em; }
.nu-saisie > span:first-child { display: block; font-weight: 600; color: #555; margin-bottom: .3em; font-size: .9em; }
.nu-ligne { display: flex; gap: .5em; align-items: center; }
.nu-ligne input { flex: 1; min-width: 0; font: 600 1.2em/1.2 'Fredoka', 'Nunito', sans-serif !important; }
.nu-plages, .nu-actions { display: flex; flex-wrap: wrap; gap: .5em; }
.nu-puce { padding: .35em 1em; border: 2px solid #e5e5e5; border-radius: 2em; background: #fff; color: #777; cursor: pointer; font-size: .92em; -webkit-user-select: none; user-select: none; }
.nu-puce:hover { border-color: #5cc79a; }
.nu-puce.actif { background: #16855a; border-color: #16855a; color: #fff; }
.nu-act { display: inline-flex; align-items: center; gap: .55em; padding: .45em .9em; border: 2px solid #e5e5e5; border-radius: .8em; background: #fff; color: #555; cursor: pointer; font-size: .9em; line-height: 1.3; white-space: nowrap; -webkit-user-select: none; user-select: none; transition: border-color .2s; }
.nu-act:hover { border-color: #5cc79a; }
.nu-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; }
.nu-act .icon:before { margin: 0; }
.nu-act.actif { border-color: #16855a; }
.nu-act.actif .icon, .nu-act-p .icon { background: #16855a; color: #fff; }
.nu-astuce { margin: 1em 0 0; text-align: center; font-size: .82em; color: #999; }
.nu-astuce .icon { color: #5cc79a; margin-right: .3em; }

/* Code de série */
.nu-code-zone { max-width: 72em; margin: 1.2em auto 0; display: grid; gap: .8em; background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; padding: 1em 1.2em; text-align: left; }
.nu-code-zone .cc-bloc > span:first-child { display: block; font-weight: 600; color: #555; margin-bottom: .4em; }
.nu-code-zone:empty { display: none; }

@media screen and (max-width: 736px) {
	.nu-nombre { font-size: 2em; }
	.nu-chiffres td { font-size: 1.7em; }
	.nu-classe { font-size: .62em; }
	.nu-ec { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .nu-ch { transition: none; } .nu-ch.neuf { animation: none; } .nu-op, .nu-act, .nu-rang { transition: none; } }
