/* ============================================================
   edu.normatic.fr — Thème « Swiss / Brutalist académique »
   Papier clair, encre noire, accent bleu électrique, bordures
   épaisses, zéro arrondi, ombres portées dures décalées.
   Polices : Archivo (display + corps) · JetBrains Mono (labels).
   ============================================================ */

:root {
    --bg: #f3f1e8;          /* papier */
    --surface: #ffffff;     /* cartes : blanc franc qui ressort sur le papier */
    --elevated: #e9e7dc;    /* aplats secondaires */
    --line: #111110;        /* bordures = encre, épaisses */
    --hairline: rgba(17,17,16,0.16);

    --accent: #1024ff;      /* bleu électrique / outremer */
    --accent-hover: #0a18cc;
    --accent-glow: rgba(16,36,255,0.22);
    --blue: #1024ff;
    --blue-glow: rgba(16,36,255,0.22);

    --text: #111110;        /* encre */
    --text-2: #34332e;
    --text-3: #6c6a60;

    --ok: #0a7d3c;
    --ok-bg: rgba(10,125,60,0.12);
    --err: #cf1d1d;
    --err-bg: rgba(207,29,29,0.10);
    --info-bg: rgba(16,36,255,0.08);

    --shadow: 5px 5px 0 var(--line);
    --shadow-accent: 5px 5px 0 var(--accent);
    --r: 0;                 /* brutalist : aucun arrondi */
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg);
    /* trame « papier millimétré » très discrète, esprit Swiss grid */
    background-image:
        linear-gradient(rgba(17,17,16,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17,17,16,0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    overflow-x: hidden;
}
h1, h2, h3, .serif {
    font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}
a { color: inherit; }

::selection { background: var(--accent); color: #fff; }

/* labels / méta en mono : signature « académique » */
.mono, .stat-label, .badge, .breadcrumb, .nav-link,
.table-dark thead th, .chat-header, .chat-input-bar {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* --- Nav --- */
.nav-main {
    border-bottom: 2px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
}
.logo {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 1.125rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}
.nav-link {
    color: var(--text);
    text-decoration: none;
    font-size: 0.75rem !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s, color 0.15s;
}
.nav-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* --- Buttons --- */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: var(--accent); color: #fff;
    font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 0.875rem;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 0.8rem 1.75rem; border-radius: 0;
    border: 2px solid var(--line); cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s;
    text-decoration: none;
}
.btn-primary:hover { background: var(--accent-hover); transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--line); }
.btn-primary:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--line); }

.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: var(--surface); color: var(--text);
    font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 0.875rem;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 0.8rem 1.75rem; border-radius: 0;
    border: 2px solid var(--line); cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s;
    text-decoration: none;
}
.btn-secondary:hover { background: var(--bg); transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--line); }
.btn-secondary:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--line); }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 0.375rem;
    background: transparent; color: var(--accent);
    font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 0.8125rem;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 0.4rem 0; border: none; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px;
}
.btn-ghost:hover { color: var(--accent-hover); }

.btn-success {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: var(--ok); color: #fff;
    font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 0.8125rem;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 0.7rem 1.4rem; border-radius: 0; border: 2px solid var(--line);
    cursor: pointer; box-shadow: var(--shadow);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    text-decoration: none;
}
.btn-success:hover { transform: translate(3px,3px); box-shadow: 2px 2px 0 var(--line); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.75rem; box-shadow: 3px 3px 0 var(--line); }
.btn-sm:hover { box-shadow: 1px 1px 0 var(--line); }

/* --- Input --- */
.input-field {
    width: 100%; background: var(--surface);
    border: 2px solid var(--line); border-radius: 0;
    color: var(--text); padding: 0.8rem 1rem;
    font-family: 'Archivo', sans-serif; font-size: 0.9375rem;
    transition: box-shadow 0.12s ease;
}
.input-field:focus { outline: none; box-shadow: var(--shadow-accent); }
.input-field::placeholder { color: var(--text-3); }

/* --- Cards --- */
.card, .card-static, .glass-card, .hover-card {
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 0;
    padding: 1.75rem;
}
.hover-card { transition: transform 0.14s ease, box-shadow 0.14s ease; }
.hover-card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow); }
.glass-card { box-shadow: var(--shadow); }

/* --- HERO (brutalist, sans orbs ni glow) --- */
.hero-home {
    position: relative;
    min-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    overflow: hidden;
    border-bottom: 2px solid var(--line);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
/* grille marquée façon plan/Swiss */
.hero-bg::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(17,17,16,0.06) 2px, transparent 2px),
        linear-gradient(90deg, rgba(17,17,16,0.06) 2px, transparent 2px);
    background-size: 96px 96px;
    mask-image: linear-gradient(180deg, black, transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, black, transparent 85%);
}
/* on neutralise les anciens halos « IA » */
.hero-bg::before, .hero-orb, .hero-orb-1, .hero-orb-2, .hero-orb-3 { display: none !important; }

.hero-headline {
    font-family: 'Archivo', sans-serif;
    font-size: clamp(2.25rem, 5.5vw, 4.25rem);
    font-weight: 900;
    line-height: 0.96;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: var(--text);
    position: relative; z-index: 1;
}
.hero-headline .accent { color: var(--accent); }
.hero-sub {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    color: var(--text-2);
    max-width: 620px;
    margin: 1.5rem 0 0;
    line-height: 1.6;
    position: relative; z-index: 1;
    border-left: 4px solid var(--accent);
    padding-left: 1.1rem;
}

/* cartes flottantes → collage de cartons bordés à ombre dure */
.hero-float {
    position: absolute;
    border-radius: 0;
    border: 2px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 0.75rem;
    pointer-events: none;
    z-index: 1;
}
.hero-float-1 { width: 180px; height: 120px; top: 14%; right: 8%;  transform: rotate(-5deg); }
.hero-float-2 { width: 140px; height: 92px;  top: 30%; right: 24%; transform: rotate(4deg); }
.hero-float-3 { width: 160px; height: 104px; bottom: 14%; right: 6%; transform: rotate(3deg); }
.hero-float-4 { width: 120px; height: 84px;  bottom: 24%; right: 26%; transform: rotate(-4deg); }
.float-line { height: 8px; border-radius: 0; background: var(--line); margin-bottom: 7px; }
.float-line:nth-child(2) { background: var(--accent); width: 70%; }
.float-line:nth-child(3) { width: 45%; }

/* --- Section Title --- */
.section-title {
    font-family: 'Archivo', sans-serif;
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--text);
}

/* --- Section Header (inline, avec filet) --- */
.section-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.section-header h2 {
    font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--text); white-space: nowrap;
}
.section-line { flex: 1; height: 2px; background: var(--line); }

/* --- Stat --- */
.stat-card {
    padding: 1.25rem 1.25rem;
    border: 2px solid var(--line);
    background: var(--surface);
}
.stat-label {
    font-size: 0.6875rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-3); margin-bottom: 0.6rem;
}
.stat-value {
    font-family: 'Archivo', sans-serif;
    font-size: 2.75rem; font-weight: 900; line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text);
}

/* --- Progress (barre encadrée, remplissage plein) --- */
.progress-track {
    width: 100%; height: 12px;
    background: var(--surface); border: 2px solid var(--line);
    border-radius: 0; overflow: hidden;
}
.progress-fill {
    height: 100%; border-radius: 0;
    background: var(--accent);
    transition: width 0.5s cubic-bezier(0.16,1,0.3,1);
}

/* --- Badge --- */
.badge {
    display: inline-flex; align-items: center;
    padding: 0.25rem 0.6rem; border-radius: 0;
    font-size: 0.625rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    background: var(--bg); color: var(--text);
    border: 2px solid var(--line);
}

/* --- Table --- */
.table-dark { width: 100%; border-collapse: collapse; border: 2px solid var(--line); background: var(--surface); }
.table-dark thead th {
    font-size: 0.625rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text); padding: 0.75rem 1rem; text-align: left;
    border-bottom: 2px solid var(--line); background: var(--elevated);
}
.table-dark tbody td {
    padding: 0.8rem 1rem; font-size: 0.875rem; color: var(--text-2);
    border-bottom: 1px solid var(--hairline);
}
.table-dark tbody tr:hover { background: var(--bg); }

/* --- Alerts (bordées, barre de couleur épaisse) --- */
.alert {
    padding: 0.875rem 1.25rem; border-radius: 0;
    border: 2px solid var(--line); border-left-width: 8px;
    background: var(--surface);
    font-size: 0.875rem; display: flex; align-items: center;
    gap: 0.625rem; margin-bottom: 0.75rem; color: var(--text);
}
.alert-success { border-left-color: var(--ok); }
.alert-error   { border-left-color: var(--err); }
.alert-info    { border-left-color: var(--accent); }
.alert-warning { border-left-color: #c98a00; }

/* --- Breadcrumb --- */
.breadcrumb {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-3); margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--text-3); }

/* --- MCQ (option-label) --- */
.option-label {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 1rem 1.25rem; background: var(--surface);
    border: 2px solid var(--line); border-radius: 0;
    cursor: pointer; transition: transform 0.12s, box-shadow 0.12s;
}
.option-label:hover { transform: translate(-2px,-2px); box-shadow: 3px 3px 0 var(--line); }
.option-label input[type="radio"] {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px; border: 2px solid var(--line);
    border-radius: 0; margin-top: 2px; flex-shrink: 0; transition: all 0.12s;
}
.option-label input[type="radio"]:checked {
    border-color: var(--line); background: var(--accent);
    box-shadow: inset 0 0 0 3px var(--surface);
}
.option-label:has(input:checked) { box-shadow: 3px 3px 0 var(--accent); }

/* --- Prose --- */
.prose-dark h2 { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 1.5rem; text-transform: uppercase; letter-spacing: -0.01em; color: var(--text); margin-top: 2rem; margin-bottom: 0.75rem; }
.prose-dark p, .prose-dark div { color: var(--text-2); line-height: 1.75; margin-bottom: 1rem; font-size: 0.9375rem; }
.prose-dark pre { background: var(--surface); border: 2px solid var(--line); border-radius: 0; padding: 1.25rem; overflow-x: auto; font-size: 0.875rem; margin: 1.5rem 0; font-family: 'JetBrains Mono', monospace; }
.prose-dark pre code { color: var(--text); }
.prose-dark blockquote { border-left: 4px solid var(--accent); padding: 0.75rem 1.5rem; margin: 1.5rem 0; font-style: italic; color: var(--text-2); background: var(--surface); }

/* --- Chat Mockup (marketing) --- */
.chat-mockup {
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.chat-header {
    padding: 0.75rem 1.25rem; border-bottom: 2px solid var(--line);
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text);
}
.chat-dot { width: 9px; height: 9px; border-radius: 0; background: var(--ok); border: 1px solid var(--line); }
.chat-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.chat-bubble { max-width: 85%; padding: 0.8rem 1.1rem; border-radius: 0; border: 2px solid var(--line); font-size: 0.875rem; line-height: 1.6; }
.chat-bubble-ai { background: var(--surface); color: var(--text-2); align-self: flex-start; }
.chat-bubble-user { background: var(--accent); color: #fff; align-self: flex-end; }
.chat-input-bar { padding: 0.8rem 1.25rem; border-top: 2px solid var(--line); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }

/* --- Video Placeholder --- */
.video-placeholder {
    aspect-ratio: 16/9;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow);
}
.video-placeholder:hover { transform: translate(-3px,-3px); box-shadow: 8px 8px 0 var(--line); }
.video-play-btn {
    width: 76px; height: 76px; border-radius: 0;
    background: var(--accent); border: 2px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    color: #fff; transition: transform 0.2s;
}
.video-placeholder:hover .video-play-btn { transform: scale(1.08); }

/* --- Feature / module list --- */
.feature-card, .module-card { padding: 1.5rem 0; border-bottom: 2px solid var(--hairline); }
.feature-card:last-child, .module-card:last-child { border-bottom: none; }

/* --- Footer --- */
.footer-main { border-top: 2px solid var(--line); padding: 2.5rem 0; margin-top: 5rem; }

/* --- HTMX --- */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.htmx-request.htmx-indicator { display: inline; }

/* --- Animations (sobres, chargement échelonné) --- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.animate-spin { animation: spin 1s linear infinite; }
.spinner { width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
.anim-fade-in-up { animation: fadeUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both; }
.anim-fade-in { animation: fadeIn 0.5s ease-out both; }
.anim-scale-in { animation: fadeUp 0.45s ease-out both; }
.delay-1 { animation-delay: 0.06s; }
.delay-2 { animation-delay: 0.12s; }
.delay-3 { animation-delay: 0.18s; }
.delay-4 { animation-delay: 0.24s; }
.delay-5 { animation-delay: 0.30s; }
.delay-6 { animation-delay: 0.36s; }
.delay-7 { animation-delay: 0.42s; }
.delay-8 { animation-delay: 0.48s; }

/* --- Links --- */
.link-accent, .link-gold { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.link-accent:hover, .link-gold:hover { color: var(--accent-hover); }

/* --- Badge / progress variantes (compat) --- */
.badge-gold, .badge-green, .badge-blue, .badge-purple, .badge-gray, .badge-teal, .badge-muted, .badge-success, .badge-error, .badge-red {
    background: var(--bg); color: var(--text); border: 2px solid var(--line);
}
.badge-success { border-left: 6px solid var(--ok); }
.badge-error, .badge-red { border-left: 6px solid var(--err); }
.progress-fill-gold, .progress-fill-blue, .progress-fill-green, .progress-fill-teal,
.progress-fill-purple, .progress-fill-red, .progress-fill-yellow,
.progress-fill-success { background: var(--accent); }
.progress-fill-error { background: var(--err); }
.stat-card.stat-blue::before, .stat-card.stat-green::before,
.stat-card.stat-purple::before, .stat-card.stat-gold::before { display: none; }

/* --- Compat utilitaires Tailwind (cohérence brutalist) --- */
.text-gray-300, .text-gray-400, .text-gray-500 { color: var(--text-3) !important; }
.rounded, .rounded-md, .rounded-lg, .rounded-xl, .rounded-2xl { border-radius: 0 !important; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); border-left: 2px solid var(--line); }
::-webkit-scrollbar-thumb { background: var(--line); }

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-home { min-height: 70vh; }
    .hero-headline { font-size: 2.1rem !important; }
    .hero-sub { font-size: 1rem !important; }
    .hero-float { display: none; }
    .stat-value { font-size: 2rem; }
    .glass-card, .card, .card-static { padding: 1.25rem; }
    .section-title { font-size: 1.5rem !important; }
}

/* ============================================================
   Pages d'authentification (connexion / inscription)
   ============================================================ */
.auth-wrap { max-width: 460px; margin: 3rem auto; }
.auth-card {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 0;
    padding: 2.5rem 2.25rem;
    box-shadow: var(--shadow);
}
.auth-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--accent); font-weight: 700; margin-bottom: 0.85rem;
}
.auth-title {
    font-size: 2.5rem; line-height: 0.98; font-weight: 900;
    text-transform: uppercase; letter-spacing: -0.03em;
    color: var(--text); margin: 0 0 0.6rem;
}
.auth-sub { color: var(--text-2); font-size: 0.9375rem; margin: 0 0 1.75rem; }
.auth-sub a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.auth-sub a:hover { color: var(--accent-hover); }

.auth-field { margin-bottom: 1.25rem; }
.auth-field > label {
    display: block; font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text); margin-bottom: 0.45rem;
}
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
    width: 100%; background: var(--surface);
    border: 2px solid var(--line); border-radius: 0;
    color: var(--text); padding: 0.8rem 1rem;
    font-family: 'Archivo', sans-serif; font-size: 0.9375rem;
    transition: box-shadow 0.12s ease;
}
.auth-card input:focus { outline: none; box-shadow: var(--shadow-accent); }
.auth-card input::placeholder { color: var(--text-3); }

/* case à cocher (ex : « se souvenir de moi ») en ligne */
.auth-field:has(input[type="checkbox"]) {
    display: flex; flex-direction: row-reverse; justify-content: flex-end;
    align-items: center; gap: 0.55rem;
}
.auth-field:has(input[type="checkbox"]) > label { margin: 0; }
.auth-card input[type="checkbox"] {
    width: 18px; height: 18px; border: 2px solid var(--line); border-radius: 0;
    accent-color: var(--accent); cursor: pointer;
}

.auth-help { font-size: 0.75rem; color: var(--text-3); line-height: 1.5; margin-top: 0.45rem; }
.auth-help ul { margin: 0; padding-left: 1.1rem; }
.auth-help li { margin-bottom: 0.1rem; }

.auth-err { color: var(--err); font-size: 0.8125rem; margin-top: 0.4rem; font-weight: 600; }
.auth-nonfield {
    background: var(--surface); color: var(--text);
    border: 2px solid var(--line); border-left-width: 8px; border-left-color: var(--err);
    padding: 0.75rem 1rem; font-size: 0.875rem; margin-bottom: 1.25rem;
}

.auth-card .btn-primary { width: 100%; margin-top: 0.5rem; }
.auth-foot {
    margin-top: 1.5rem; text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-3);
}

/* ============================================================
   Évaluation conversationnelle (chat bubbles)
   ============================================================ */
.bubble { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 0; }
.bubble.answered { display: block; }
.bubble.answered .tutor-bubble { margin-bottom: 0.5rem; }

.tutor-bubble { justify-content: flex-start; }
.tutor-bubble .bubble-avatar {
    flex: 0 0 38px; width: 38px; height: 38px;
    background: var(--accent); color: #fff;
    border: 2px solid var(--line); border-radius: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 0.95rem;
}
.tutor-bubble .bubble-content {
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 0;
    padding: 1rem 1.25rem;
    max-width: 85%;
    color: var(--text);
    box-shadow: 3px 3px 0 var(--line);
}
.bubble-question-text { font-size: 1rem; line-height: 1.5; margin: 0; }
.bubble-question-text.faded { color: var(--text-3); }
.bubble-help { font-size: 0.8125rem; color: var(--text-3); margin-top: 0.35rem; }

.learner-bubble { justify-content: flex-end; flex-direction: row-reverse; margin-top: 0.5rem; }
.learner-bubble .bubble-content {
    background: var(--accent);
    border: 2px solid var(--line);
    border-radius: 0;
    padding: 0.55rem 0.9rem;
    max-width: 75%;
    color: #fff;
    margin-left: auto; margin-right: 0;
    box-shadow: 3px 3px 0 var(--line);
}
.answer-chip { font-size: 0.875rem; font-weight: 600; }

/* --- Options radio / checkbox custom --- */
.qopt-list { display: flex; flex-direction: column; gap: 0.5rem; }
.qopt-boolean { flex-direction: row; gap: 0.75rem; }
.qopt {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.7rem 0.95rem;
    border: 2px solid var(--line); border-radius: 0;
    background: var(--surface); cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}
.qopt:hover { transform: translate(-2px,-2px); box-shadow: 3px 3px 0 var(--line); }
.qopt input[type=radio], .qopt input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qopt-marker {
    flex: 0 0 18px; width: 18px; height: 18px;
    border: 2px solid var(--line); border-radius: 0;
    position: relative; transition: all 0.12s;
}
.qopt:has(input:checked) { box-shadow: 3px 3px 0 var(--accent); }
.qopt:has(input:checked) .qopt-marker { border-color: var(--line); background: var(--accent); }
.qopt:has(input:checked) .qopt-marker::after { content: ''; position: absolute; inset: 3px; background: var(--surface); }
.qopt-label { font-size: 0.9375rem; color: var(--text); flex: 1; }
.qopt:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }

/* --- Scale (Likert / emoji) --- */
.scale-row { display: flex; gap: 0.5rem; justify-content: space-between; flex-wrap: wrap; }
.scale-item {
    flex: 1 1 0; min-width: 90px;
    padding: 0.875rem 0.5rem;
    border: 2px solid var(--line); border-radius: 0;
    background: var(--surface); cursor: pointer; text-align: center;
    transition: transform 0.12s, box-shadow 0.12s; position: relative;
}
.scale-item:hover { transform: translate(-2px,-2px); box-shadow: 3px 3px 0 var(--line); }
.scale-item input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale-item:has(input:checked) { background: var(--accent); box-shadow: 4px 4px 0 var(--line); }
.scale-label { display: block; font-size: 0.875rem; color: var(--text-2); line-height: 1.3; }
.scale-item:has(input:checked) .scale-label { color: #fff; font-weight: 700; }

/* --- Textarea --- */
.textarea-eval {
    width: 100%; background: var(--surface);
    border: 2px solid var(--line); border-radius: 0;
    padding: 0.875rem 1rem; color: var(--text);
    font-family: inherit; font-size: 0.9375rem; line-height: 1.5;
    resize: vertical; transition: box-shadow 0.12s;
}
.textarea-eval:focus { outline: none; box-shadow: var(--shadow-accent); }
