/* Machine Enigma (EPI 3e). Tout est rangé sous #enigma pour ne rien changer au reste du site. */
#features.en-section { padding-top: 1em; }
.en-note { text-align: center; font-size: 0.8em; margin: 1em 0 0; }
#enigma { --k: 36px; background: #101214; color: #f3ead2; border-radius: 18px; padding: 16px;
	display: grid; grid-template-columns: minmax(380px, 460px) 1fr; gap: 14px; align-items: start;
	font: 15px/1.4 'Nunito', 'Segoe UI', Arial, sans-serif; text-align: left; }
#enigma *, #enigma *:before, #enigma *:after { box-sizing: border-box; }
#enigma button { -webkit-appearance: none; appearance: none; min-width: 0; height: auto; line-height: 1; letter-spacing: 0;
	text-transform: none; box-shadow: none; text-shadow: none; margin: 0; outline-offset: 2px; transition: none;
	touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
#enigma .en-machine { background: linear-gradient(160deg, #5b3b22, #3e2715); padding: 12px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
#enigma .en-inner { background: #17191c; border-radius: 8px; padding: 12px 10px 14px; }
#enigma .en-lab { font: 700 11px/1 'Courier New', monospace; letter-spacing: 2px; color: #9aa3ad; text-align: center; margin: 10px 0 6px; }
#enigma .en-rotors { display: flex; justify-content: center; gap: 16px; }
#enigma .en-rot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#enigma .en-rot small { font: 700 11px 'Courier New', monospace; color: #9aa3ad; }
#enigma .en-rot button { width: 54px; height: 26px; border: 0; border-radius: 5px; background: #3a4047; color: #fff !important; font: 13px/1 Arial, sans-serif; cursor: pointer; padding: 0; }
#enigma .en-rot button:hover { background: #525a63; }
#enigma .en-win { width: 54px; height: 58px; background: #f3ead2; color: #111; border-radius: 5px; border: 3px solid #888; display: flex; align-items: center; justify-content: center;
	font: 700 34px 'Courier New', monospace; box-shadow: inset 0 6px 8px rgba(0,0,0,.33), inset 0 -6px 8px rgba(0,0,0,.33); }
#enigma .en-keyinfo { text-align: center; margin-top: 9px; font-size: 13px; }
#enigma .en-keyinfo b { font: 700 17px 'Courier New', monospace; letter-spacing: 4px; color: #ffd866; }
#enigma .en-row { display: flex; justify-content: center; gap: 5px; margin: 5px 0; }
#enigma .en-lampe { width: var(--k); height: var(--k); border-radius: 50%; background: #0c0d0f; border: 2px solid #3a3f45; color: #59616a; display: flex; align-items: center; justify-content: center;
	font: 700 16px 'Courier New', monospace; }
#enigma .en-lampe.on { background: #ffd866; color: #3a2a00; border-color: #fff3c4; box-shadow: 0 0 16px 4px rgba(255,216,102,.8); }
#enigma .en-touche { width: var(--k); height: var(--k); border-radius: 50%; background: #0c0d0f; border: 2.5px solid #cfd4da; color: #fff !important; font: 700 15px/1 'Courier New', monospace; cursor: pointer; padding: 0; box-shadow: 0 3px 0 #000; }
#enigma .en-touche:hover { border-color: #ffd866; background: #0c0d0f; }
#enigma .en-touche.down { transform: translateY(3px); box-shadow: none; border-color: #ff5a4d; color: #ff5a4d !important; }
#enigma .en-cmd { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
#enigma .en-cmd button { background: #f3ead2; color: #111 !important; border: 0; border-radius: 6px; padding: 9px 12px; font: 700 13px/1.2 'Nunito', Arial, sans-serif; cursor: pointer; }
#enigma .en-cmd button.en-sec { background: #3a4047; color: #fff !important; }
#enigma .en-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#enigma .en-card { background: #22262b; border-radius: 10px; padding: 12px 14px; }
#enigma .en-card h2 { font: 700 13px/1 'Courier New', monospace; letter-spacing: 2px; margin: 0 0 8px; color: #9aa3ad; text-transform: none; }
#enigma .en-tape { font: 700 22px/1.5 'Courier New', monospace; letter-spacing: 3px; word-break: break-all; min-height: 33px; color: #f3ead2; }
#enigma .en-tape.en-out { color: #ffd866; }
#enigma .en-tl { font-size: 12px; color: #9aa3ad; margin-top: 6px; }
#enigma svg { width: 100%; height: auto; display: block; }
#enigma .en-leg { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; margin-top: 6px; }
#enigma .en-leg i { display: inline-block; width: 22px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
#enigma .en-leg .en-go { background: #ff5a4d; }
#enigma .en-leg .en-back { background: #39d98a; }
#enigma .en-aide { font-size: 13px; color: #c9cfd6; }
#enigma .en-aide b { color: #fff; }
#enigma > .pe-barre { grid-column: 1 / -1; margin: 0; }
#enigma .pe-bouton { background: #22262b !important; color: #f3ead2 !important; border-color: #3a4047; }
/* plein écran : machine à gauche (touches agrandies selon la hauteur), bande et schéma à droite, sans défiler */
#enigma:fullscreen { --k: clamp(30px, 4.6vh, 56px); border-radius: 0; grid-template-columns: auto minmax(0, 1fr); align-content: center; }
#enigma:fullscreen .en-touche, #enigma:fullscreen .en-lampe { font-size: calc(var(--k) * .42); }
#enigma:fullscreen .en-machine { align-self: start; }
#enigma:fullscreen .en-side svg { max-height: calc(100vh - 21em); width: auto; max-width: 100%; margin: 0 auto; }

@media (max-width: 980px) { #enigma { grid-template-columns: 1fr; } #enigma .en-machine { max-width: 540px; margin: 0 auto; width: 100%; } }
@media (max-width: 699px) {
	#enigma { --k: clamp(24px, calc((100vw - 96px) / 9 - 5px), 36px); padding: 8px; border-radius: 12px; }
	#enigma .en-machine { padding: 8px; } #enigma .en-inner { padding: 10px 6px 12px; }
	#enigma .en-touche, #enigma .en-lampe { font-size: calc(var(--k) * .42); } #enigma .en-tape { font-size: 18px; }
}
@media (pointer: coarse) and (min-width: 700px) {
	#enigma { --k: 44px; } #enigma .en-touche, #enigma .en-lampe { font-size: 18px; } #enigma .en-row { gap: 6px; margin: 7px 0; }
	#enigma .en-rot button { width: 64px; height: 40px; font-size: 16px; } #enigma .en-win { width: 64px; } #enigma .en-cmd button { padding: 13px 14px; font-size: 14px; }
}
@media (pointer: coarse) and (min-width: 1000px) { #enigma { grid-template-columns: minmax(480px, 520px) 1fr; } }
