@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;900&family=Barlow:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #E8181A;
  --red-dim: rgba(232,24,26,0.10);
  --red-border: rgba(232,24,26,0.28);
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #181818;
  --bg4: #1e1e1e;
  --border: #222222;
  --border2: #2a2a2a;
  --text: #e8e8e8;
  --text-dim: #888888;
  --text-muted: #6a6a6a;
  --green: #44cc88;
  --orange: #ffaa22;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Barlow', sans-serif; font-size: 16px; line-height: 1.75; min-height: 100vh; }

.container { max-width: 680px; margin: 0 auto; padding: 48px 20px 80px; }

/* HEADER */
.header { text-align: center; margin-bottom: 48px; }
.header-logo { font-family: 'Barlow Condensed', sans-serif; font-size: clamp(42px, 10vw, 72px); font-weight: 900; letter-spacing: .04em; text-transform: uppercase; line-height: 1.0; color: var(--text); margin-bottom: 4px; }
.header-logo span { color: var(--red); }
.header-subtitle { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--text-muted); margin-top: 8px; }
.header-divider { width: 48px; height: 2px; background: var(--red); margin: 16px auto 0; }

/* STEPS */
.steps { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 36px; }
.step-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border2); transition: all 0.3s; }
.step-dot.active { background: var(--red); width: 20px; border-radius: 3px; }
.step-dot.done { background: var(--red); opacity: 0.4; }

/* CARD */
.card { background: var(--bg2); border: 1px solid var(--border); padding: 32px; margin-bottom: 20px; animation: fadeUp 0.3s ease both; }
.card-title { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--red); margin-bottom: 24px; }

/* FORM */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.form-group input, .form-group select { width: 100%; padding: 13px 16px; background: var(--bg3); border: 1px solid var(--border); color: var(--text); font-family: 'Barlow', sans-serif; font-size: 15px; outline: none; transition: border-color .2s; appearance: none; -webkit-appearance: none; }
.form-group select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-group select option { background: var(--bg3); color: var(--text); }
.form-group input::placeholder { color: var(--text-muted); }
.form-group input:focus, .form-group select:focus { border-color: var(--red); }

/* LANGUE */
.langue-toggle { display: flex; gap: 1px; background: var(--border); }
.langue-btn { flex: 1; padding: 12px; border: none; background: var(--bg3); color: var(--text-dim); font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: all 0.15s; }
.langue-btn.active { background: var(--red); color: white; }
.langue-btn:hover:not(.active) { background: var(--bg4); color: var(--text); }

/* PROGRESS */
.progress-bar { width: 100%; height: 2px; background: var(--border); margin-bottom: 32px; }
.progress-fill { height: 100%; background: var(--red); transition: width 0.4s ease; }

/* QUESTION */
.question-block { margin-bottom: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.question-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.question-num { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.question-text { font-size: 16px; color: var(--text); font-weight: 500; margin-bottom: 16px; line-height: 1.5; }
.question-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; font-style: italic; }

/* OPTIONS */
.option-label { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); cursor: pointer; margin-bottom: 6px; transition: all 0.15s; background: var(--bg3); }
.option-label:hover { border-color: rgba(232,24,26,0.4); background: var(--bg4); }
.option-label input[type="radio"], .option-label input[type="checkbox"] { display: none; }
.option-check { width: 16px; height: 16px; min-width: 16px; border: 1.5px solid var(--text-muted); margin-top: 3px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; font-size: 10px; font-weight: 700; }
.option-label input[type="radio"] + .option-check { border-radius: 50%; }
.option-label.selected { border-color: var(--red); background: var(--red-dim); border-left: 3px solid var(--red); padding-left: 11px; }
.option-label.selected .option-check { background: var(--red); border-color: var(--red); color: white; }
.option-text { font-size: 14px; color: var(--text-dim); line-height: 1.5; }
.option-label.selected .option-text { color: var(--text); }

/* BUTTON */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 32px; font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: .1em; cursor: pointer; border: none; transition: all 0.2s; text-transform: uppercase; }
.btn-primary { background: var(--red); color: white; width: 100%; }
.btn-primary:hover { background: #cc1010; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-dim); }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-save { background: var(--red); color: white; border: none; }
.btn-save:hover { background: #cc1010; }

/* ALERT */
.alert { padding: 14px 16px; margin-bottom: 20px; font-size: 13px; line-height: 1.5; border-left: 3px solid; }
.alert-warning { background: rgba(232,24,26,0.06); border-color: var(--red); color: #ffaaaa; }
.alert-success { background: rgba(68,204,136,0.07); border-color: var(--green); color: #a0f0af; }

/* SECTION */
.section { display: none; }
.section.active { display: block; }

/* SPINNER */
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* CONFIRMATION */
.confirm-wrap { text-align: center; padding: 64px 32px; }
.confirm-icon { font-size: 52px; margin-bottom: 20px; }
.confirm-title { font-family: 'Barlow Condensed', sans-serif; font-size: 42px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--text); margin-bottom: 16px; }
.confirm-msg { font-size: 15px; color: var(--text-dim); line-height: 1.7; max-width: 420px; margin: 0 auto; }

/* ADMIN */
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--border); margin-bottom: 24px; }
.stat-card { background: var(--bg2); padding: 20px 24px; text-align: center; }
.stat-num { font-family: 'Barlow Condensed', sans-serif; font-size: 44px; font-weight: 900; color: var(--red); line-height: 1; }
.stat-label { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 10px 14px; font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-dim); vertical-align: top; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.badge { display: inline-block; padding: 2px 8px; font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.badge-licence { background: rgba(232,24,26,0.12); color: var(--red); border: 1px solid var(--red-border); }
.badge-errors { background: rgba(232,24,26,0.08); color: #ff9090; border: 1px solid rgba(232,24,26,0.2); }
.badge-ok { background: rgba(68,204,136,0.08); color: var(--green); border: 1px solid rgba(68,204,136,0.2); }
.badge-corrected { background: rgba(68,204,136,0.1); color: var(--green); border: 1px solid rgba(68,204,136,0.25); }

.search-input { background: var(--bg3); border: 1px solid var(--border); padding: 9px 14px; color: var(--text); font-family: 'Barlow', sans-serif; font-size: 13px; outline: none; width: 220px; }
.search-input:focus { border-color: var(--red); }
.search-input::placeholder { color: var(--text-muted); }

.admin-detail-panel { background: var(--bg3); border: 1px solid var(--border); padding: 20px; margin-top: 8px; }
.error-item { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.error-item:last-child { border-bottom: none; }
.error-q { color: var(--text-dim); margin-bottom: 5px; font-size: 13px; line-height: 1.4; }
.error-given { color: #ff7070; font-size: 13px; margin-bottom: 3px; }
.error-correct { color: var(--green); font-size: 13px; }

.correction-form { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.correction-form input[type="text"] { flex: 1; min-width: 160px; background: var(--bg3); border: 1px solid var(--border); padding: 8px 12px; color: var(--text); font-family: 'Barlow', sans-serif; font-size: 13px; outline: none; }
.correction-form input[type="text"]:focus { border-color: var(--red); }

.checkbox-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-dim); user-select: none; }
.checkbox-wrap input[type="checkbox"] { display: none; }
.custom-checkbox { width: 16px; height: 16px; border: 1.5px solid var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; transition: all 0.15s; flex-shrink: 0; }
.checkbox-wrap input:checked + .custom-checkbox { background: var(--green); border-color: var(--green); color: #0a0a0a; }

.detail-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; margin-bottom: 24px; border: 1px solid var(--border); }
.detail-info-item { padding: 12px 16px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.detail-info-label { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 3px; }
.detail-info-value { color: var(--text); font-size: 14px; }
.errors-header { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .admin-table { font-size: 12px; }
  .admin-table th, .admin-table td { padding: 8px 10px; }
  .container { padding: 32px 16px 60px; }
}
