@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wdth,wght@12..96,75..100,200..800&display=swap');

:root {
  --paper: #F2F3F7;
  --surface: #FFFFFF;
  --ink: #17182B;
  --ink-2: #3A3C55;
  --muted: #6C6F88;
  --line: #DFE1EA;
  --red: #E5484D;
  --blue: #2E5BFF;
  --yellow: #F5A524;
  --green: #12A150;
  --good: #12A150;
  --bad: #E5484D;
  --focus: #2E5BFF;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 28px;
  --font: 'Bricolage Grotesque Variable', 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* Logo : les quatre formes */
.logo { display: inline-grid; grid-template-columns: repeat(2, 1fr); gap: 2px; width: 26px; height: 26px; flex: none; }
.logo svg { width: 100%; height: 100%; }
.logo svg:nth-child(1) { fill: var(--red); }
.logo svg:nth-child(2) { fill: var(--blue); }
.logo svg:nth-child(3) { fill: var(--yellow); }
.logo svg:nth-child(4) { fill: var(--green); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; color: inherit; }
.brand small { font-weight: 450; color: var(--muted); font-size: .9em; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--ink); color: #fff; font-weight: 650; cursor: pointer;
  transition: transform .15s var(--ease), background .15s, opacity .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #2A2C46; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn.light { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.light:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: rgba(23, 24, 43, .06); }
.btn.danger { color: var(--bad); }
.btn.big { min-height: 60px; padding: 0 32px; font-size: 1.15rem; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .92rem; }
.btn svg { width: 18px; height: 18px; }

/* Champs */
.field { display: grid; gap: 6px; }
.field > span { font-size: .9rem; color: var(--ink-2); font-weight: 550; }
.input {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: var(--radius-s);
  border: 1.5px solid var(--line); background: var(--surface); outline: none;
  transition: border-color .15s;
}
.input:focus { border-color: var(--ink); }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.35; }
.error-text { color: var(--bad); font-weight: 550; font-size: .95rem; min-height: 1.4em; }

/* Couleurs des réponses */
.a-red { --a: var(--red); --a-ink: #fff; }
.a-blue { --a: var(--blue); --a-ink: #fff; }
.a-yellow { --a: var(--yellow); --a-ink: var(--ink); }
.a-green { --a: var(--green); --a-ink: #fff; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 550;
  transition: .25s var(--ease); pointer-events: none; z-index: 100; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.offline {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 90;
  background: var(--ink); color: #fff; font-size: .9rem; padding: 6px 14px; border-radius: 999px;
}

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