:root { color-scheme: light; --ink: #20332e; --green: #075e54; --muted: #60746e; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: #dce5e1; color: var(--ink); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
.brand { max-width: 860px; margin: 32px auto 0; padding: 22px 28px; display: flex; align-items: center; gap: 14px; background: var(--green); color: white; border-radius: 20px 20px 0 0; font-weight: 700; }
.brand-mark { flex-shrink: 0; background: #d9f1e6; color: var(--green); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; }
.brand-detail { display: block; font-size: 14px; font-weight: 400; color: #d3e8e1; }
.header-tag { margin-left: auto; font-size: 12px; font-weight: 400; color: #d3e8e1; }
main { max-width: 860px; min-height: 570px; margin: auto; padding: 28px 36px 120px; background-color: #eeeae2; background-image: radial-gradient(#697d7015 1px, transparent 1px); background-size: 20px 20px; border-radius: 0 0 20px 20px; box-shadow: 0 24px 60px #173c2812; }
.day-label { width: fit-content; margin: 0 auto 30px; padding: 5px 12px; border-radius: 8px; font-size: 12px; letter-spacing: .06em; background: #f8faf8; color: var(--muted); }
.bubble { width: fit-content; max-width: 84%; padding: 11px 14px; margin: 0 0 12px; border-radius: 0 14px 14px 14px; box-shadow: 0 2px 2px #20332e0c; overflow-wrap: anywhere; }
.teacher { margin-right: auto; background: white; }
.student { margin-left: auto; background: #d9fdd3; border-radius: 16px 0 16px 16px; min-width: 130px; }
.sender { display: block; color: var(--green); font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.student .sender { color: #44613c; }
.bubble p { margin: 0 0 10px; }
.bubble p:last-child { margin-bottom: 0; }
h1 { font-size: 25px; line-height: 1.25; margin: 8px 0 14px; letter-spacing: -.03em; }
h1 [lang="he"] { display: inline-block; margin-left: 10px; color: var(--green); }
h2 { font-size: 16px; line-height: 1.45; margin: 0 0 6px; }
#question-title[dir="rtl"] { width: 100%; text-align: right; unicode-bidi: plaintext; }
.message-note { color: var(--muted); font-size: 13px; }
.welcome-action { display: flex; justify-content: flex-end; margin-top: 30px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid #b27b17; outline-offset: 4px; }
.primary { border: 0; border-radius: 24px; background: var(--green); color: white; padding: 13px 22px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 48px; }
.primary:hover { background: #064a42; }
.progress-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: #475e55; }
.progress-label span + span { font-size: 12px; letter-spacing: .08em; }
progress { width: 100%; height: 5px; display: block; margin: 12px 0 28px; border: 0; border-radius: 5px; background: #d5ddd5; accent-color: var(--green); }
progress::-webkit-progress-bar { background: #d5ddd5; border-radius: 5px; }
progress::-webkit-progress-value { background: var(--green); border-radius: 5px; }
progress::-moz-progress-bar { background: var(--green); border-radius: 5px; }
.description { color: var(--muted); }
.composer { margin: 22px 0 20px auto; max-width: 88%; padding: 18px; background: #f7f9f6; border-radius: 16px; }
.composer-label { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.chat-input-only { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 7px; border: 1px solid #d4ddd7; border-radius: 28px; background: white; }
.chat-input-only, .chat-answer-form { position: fixed; z-index: 20; left: 50%; bottom: 16px; width: min(calc(100% - 32px), 760px); max-width: none; margin: 0; transform: translateX(-50%); box-shadow: 0 8px 28px #173c2826; }
.chat-input-only label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.chat-input-only input { min-width: 0; border: 0; border-radius: 22px; padding: 9px 12px; background: transparent; font-size: 16px; }
.chat-input-only input:focus-visible { outline: 0; }
.chat-input-only .primary { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; font-size: 18px; }
.chat-input-only .help { grid-column: 1 / -1; margin: 0 12px 8px; }
.chat-answer-form { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; margin-top: 14px; padding: 7px; border: 1px solid #d4ddd7; border-radius: 28px; background: white; }
.chat-answer-form label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.chat-answer-form input { min-width: 0; border: 0; border-radius: 22px; padding: 9px 12px; background: transparent; font-size: 16px; }
.chat-answer-form input:focus-visible { outline: 0; }
.chat-answer-form > .primary { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; font-size: 18px; }
.chat-answer-form .help, .chat-answer-form .keyboard { grid-column: 1 / -1; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; border: 1px solid #aec6b8; background: #e8f7e4; color: var(--ink); border-radius: 12px; padding: 8px 12px; font-size: 14px; line-height: 1.35; }
.choice:hover:enabled { background: #d9fdd3; border-color: var(--green); }
.choice [lang="he"] { font-size: 16px; }
label { display: block; margin-bottom: 8px; font-weight: 650; }
input { width: 100%; border: 1px solid #aec6b8; border-radius: 22px; padding: 10px 18px; font-size: 18px; color: var(--ink); background: white; }
.help { font-size: 14px; color: var(--muted); margin: 12px 0; }
.keyboard { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.keyboard button { min-width: 42px; min-height: 44px; border: 1px solid #c4d4ca; border-radius: 8px; background: white; color: var(--green); font-size: 22px; }
.keyboard button:last-child { font-size: 14px; padding: 8px 12px; }
.feedback { border-left: 3px solid #418658; }
.feedback.incorrect { border-left-color: #b57437; }
.next { display: flex; margin: 24px 0 0 auto; }
.results { background: white; max-width: 84%; border-radius: 0 16px 16px 16px; padding: 20px; margin-top: 20px; box-shadow: 0 2px 2px #20332e0c; }
.score { font-size: 40px; font-weight: 750; color: var(--green); margin: 12px 0; }
footer { text-align: center; color: var(--muted); font-size: 14px; padding: 22px; }
@media (max-width: 600px) { .brand { margin: 0; border-radius: 0; padding: 18px 16px; } .header-tag { display: none; } main { border-radius: 0; min-height: calc(100svh - 160px); padding: 22px 16px 110px; } .bubble, .results { max-width: 92%; padding: 11px 14px; } .composer { max-width: 95%; padding: 14px; } .chat-input-only, .chat-answer-form { max-width: none; padding: 7px; } .progress-label span + span { display: none; } h1 { font-size: 25px; } }
/* Supports du test, dans les bulles existantes. */
.question-image { display: block; width: 100%; max-width: 440px; max-height: 350px; object-fit: contain; margin: 12px 0; border-radius: 8px; }
.question-video { display: block; width: 100%; min-width: 220px; aspect-ratio: 16 / 9; border: 0; margin: 12px 0; border-radius: 8px; }
.youtube-preview { position: relative; display: block; width: 100%; min-width: 220px; aspect-ratio: 16 / 9; margin: 12px 0; padding: 0; overflow: hidden; border: 0; border-radius: 8px; background: #111; }
.youtube-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.youtube-play { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; display: grid; place-items: center; width: 64px; height: 46px; padding-left: 4px; border-radius: 12px; background: #e62117; color: white; font-size: 24px; box-shadow: 0 3px 12px #0006; }
.youtube-preview:hover .youtube-play { background: #c91b13; transform: scale(1.06); }
.passage-message { width: 100%; max-width: 100%; }
.reading-passage { white-space: pre-wrap; font-size: 17px; line-height: 1.7; margin: 8px 0 0 !important; text-align: right; }
#question-context a { display: inline-block; color: var(--green); margin: 8px 0 16px; }
.choice[aria-pressed="true"] { background: #d9fdd3; border: 2px solid var(--green); }
#skip, #confirm-choices { margin-top: 14px; }
#skip { background: transparent; color: var(--green); border: 1px solid #aec6b8; }
@media (max-width: 600px) { #question-level { display: inline; } }
