@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');
[hidden] { display: none !important; }

:root {
  --accent: #ff9f1c;
  --accent-dark: #e07c00;
  --ink: #2b2118;
  --muted: #7a6a5c;
  --card: #fffdf8;
  --line: #f0e2cd;
  --radius: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #ffdb70 0%, #ffb02e 45%, #ff8c1a 100%);
}

.sky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; opacity: .35; }
.ray {
  position: absolute; width: 6px; height: 190px; border-radius: 99px;
  background: #fff3c4; transform-origin: top center;
}
.ray-1 { left: 8%; top: -40px; transform: rotate(18deg); }
.ray-2 { left: 32%; top: -60px; transform: rotate(-8deg); }
.ray-3 { left: 58%; top: -30px; transform: rotate(12deg); }
.ray-4 { right: 22%; top: -50px; transform: rotate(-16deg); }
.ray-5 { right: 6%; top: 10px; transform: rotate(24deg); }
.ray-6 { left: 80%; top: -70px; transform: rotate(-4deg); }

.topbar {
  position: relative; z-index: 1;
  max-width: 1080px; margin: 0 auto; padding: 28px 20px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.brand-logo { width: 56px; height: 56px; filter: drop-shadow(0 6px 12px rgba(150,80,0,.25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.brand-text small { font-size: 13px; color: #6d4a12; font-weight: 600; }
.pill {
  background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.85);
  padding: 8px 16px; border-radius: 99px; font-size: 12px; font-weight: 800;
  letter-spacing: .12em; color: #8a5200;
}

.announcement {
  position: relative; z-index: 1; max-width: 1040px; margin: 8px auto 0;
  padding: 12px 18px; border-radius: 14px; background: rgba(255,255,255,.85);
  color: #7a4b00; font-weight: 700; box-shadow: 0 8px 24px rgba(150,80,0,.12);
}

.container { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 28px 20px 60px; }
.loading { text-align: center; padding: 80px 0; font-weight: 700; color: #7a4b00; }

.card {
  background: var(--card); border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--radius); box-shadow: 0 18px 45px rgba(150,80,0,.18);
}

.hero { padding: 34px 36px; margin-bottom: 24px; }
.hero h1 { margin: 0 0 8px; font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.hero p { margin: 0; color: var(--muted); font-size: 16px; max-width: 620px; }

.section-title { margin: 30px 4px 14px; font-size: 14px; font-weight: 800; letter-spacing: .1em; color: #7a4b00; text-transform: uppercase; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.form-card {
  display: block; padding: 24px; text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.form-card:hover { transform: translateY(-4px); box-shadow: 0 24px 55px rgba(150,80,0,.24); }
.form-card .icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: #fff0d6; font-size: 22px; margin-bottom: 16px;
}
.form-card h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.form-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; min-height: 40px; }
.form-card .meta { display: flex; gap: 14px; font-size: 12px; font-weight: 700; color: #a07a3c; }

.empty { padding: 50px; text-align: center; color: var(--muted); }
.empty .big { font-size: 42px; margin-bottom: 10px; }

/* Formulaire */
.form-header { padding: 34px 36px 24px; border-bottom: 1px solid var(--line); }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--accent-dark); font-weight: 800; text-decoration: none; font-size: 14px; }
.form-header h1 { margin: 0 0 8px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.form-header p { margin: 0; color: var(--muted); white-space: pre-wrap; }
.form-body { padding: 12px 36px 30px; }

.question { padding: 24px 0; border-bottom: 1px solid var(--line); }
.question:last-of-type { border-bottom: 0; }
.q-title { display: block; font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.q-title .req { color: #e5484d; margin-left: 3px; }
.q-desc { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.q-controls { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

input[type="text"], input[type="email"], input[type="number"], input[type="date"], textarea, select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 15px; background: #fff; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,159,28,.16); }

.choice { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--accent); background: #fff8ec; }
.choice input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.choice span { font-size: 15px; }

.q-error { color: #d92d20; font-size: 13px; font-weight: 700; margin-top: 8px; min-height: 0; }
.question.invalid input, .question.invalid textarea, .question.invalid select { border-color: #f39995; }

.form-footer { padding: 0 36px 34px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn {
  border: 0; border-radius: 12px; padding: 13px 26px; font: inherit; font-weight: 800;
  font-size: 15px; cursor: pointer; background: var(--accent); color: #3a2400;
  box-shadow: 0 8px 18px rgba(255,159,28,.35); transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; box-shadow: none; color: var(--accent-dark); }
.btn-danger { background: #ffe3e0; color: #b42318; box-shadow: none; }
.form-note { font-size: 12px; color: var(--muted); }

.success { padding: 64px 36px; text-align: center; }
.success .check {
  width: 72px; height: 72px; border-radius: 50%; background: #e7f8ec; color: #16803c;
  display: grid; place-items: center; font-size: 36px; margin: 0 auto 20px;
}
.success h1 { margin: 0 0 10px; font-size: 28px; }
.success p { margin: 0 0 24px; color: var(--muted); white-space: pre-wrap; }

.footer {
  position: relative; z-index: 1; max-width: 1040px; margin: 0 auto;
  padding: 0 20px 30px; display: flex; justify-content: space-between;
  font-size: 12px; font-weight: 700; color: rgba(90,55,0,.65);
}
.footer a { color: inherit; }

@media (max-width: 640px) {
  .hero, .form-header, .form-body, .form-footer { padding-left: 20px; padding-right: 20px; }
  .hero h1, .form-header h1 { font-size: 24px; }
  .brand-text small { display: none; }
}
