/* =====================================================================
   Quiz Orange — socle visuel commun
   Charte : orange PANTONE 151C (R255 V102 B0), noir, blanc, gris (R50 V50 B50)
   Police web : Arial (recommandation charte pour le HTML)
   ===================================================================== */
:root {
  --orange: #FF6600;          /* charte fournie (R255 V102 B0) — une seule ligne à changer si charte digitale #FF7900 */
  --orange-press: #E05A00;
  --black: #000000;
  --white: #FFFFFF;
  --grey: #323232;            /* charte : R50 V50 B50 */
  --grey-2: #1C1C1C;
  --grey-3: #595959;
  --grey-text: #BFBFBF;
  --ok: #32C832;
  --warn: #FFCC00;
  --err: #FF4D4D;
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --tap: 56px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--orange); }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- boutons (angles droits, style Orange) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 18px;
  border: 2px solid transparent; border-radius: 0;
  background: var(--grey); color: var(--white);
  font-weight: 700; font-size: 16px; line-height: 1.1; text-align: center;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background .12s, border-color .12s, transform .06s, opacity .12s;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.btn[disabled], .btn.is-busy { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--orange); color: var(--black); }
.btn-primary:hover:not([disabled]) { background: var(--orange-press); }
.btn-outline { background: transparent; border-color: var(--white); }
.btn-outline:hover:not([disabled]) { background: var(--white); color: var(--black); }
.btn-ghost { background: transparent; color: var(--grey-text); text-decoration: underline; text-underline-offset: 3px; min-height: 40px; }
.btn-danger { background: var(--err); color: var(--black); }
.btn-white { background: var(--white); color: var(--black); }
.btn-block { width: 100%; }
.btn-lg { min-height: var(--tap); font-size: 19px; padding: 14px 20px; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 14px; }

/* ---------- champs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; color: var(--grey-text); }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--black); color: var(--white);
  border: 2px solid var(--grey-3); border-radius: 0;
  font-size: 17px;
}
.textarea { min-height: 84px; resize: vertical; line-height: 1.35; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--orange); }
.input.is-error { border-color: var(--err); }
.hint { font-size: 13px; color: var(--grey-text); }
.error-msg { color: var(--err); font-weight: 700; font-size: 15px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 460px); pointer-events: none; }
.toast { background: var(--white); color: var(--black); padding: 12px 16px; font-weight: 700; border-left: 6px solid var(--orange); box-shadow: 0 8px 24px rgba(0,0,0,.45); animation: toast-in .2s ease-out; pointer-events: auto; }
.toast.warn { border-left-color: var(--warn); }
.toast.error { border-left-color: var(--err); }
.toast.success { border-left-color: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- bandeau connexion ---------- */
.netbar { position: fixed; left: 0; right: 0; top: 0; z-index: 9000; background: var(--warn); color: var(--black); text-align: center; font-weight: 700; font-size: 14px; padding: 8px 12px; }

/* ---------- logo officiel (fichier client, jamais redessiné) ---------- */
.brand-logo { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ---------- utilitaires ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--grey-text); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--grey-3); flex: none; }
.dot.on { background: var(--ok); }
.mic-icon { width: 1.2em; height: 1.2em; flex: none; }

.meter { height: 8px; background: var(--grey); position: relative; overflow: hidden; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--orange); transition: width .08s linear; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
