:root {
  --navy: #0b2a6f;
  --blue: #1e6be6;
  --green: #16a34a;
  --mint: #1dc87a;
  --violet: #6d3fd8;
  --orange: #f28c1a;
  --ink: #12224a;
  --muted: #5b6b8c;
  --bg: #f4f8ff;
  --card: #ffffff;
  --line: #dbe6fb;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  min-height: 100vh; min-height: 100dvh; line-height: 1.4;
}
button, input { font: inherit; }
a { color: var(--blue); }
.hidden { display: none !important; }

/* ---------- Accueil ---------- */
.home {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  padding: 20px 20px 24px; max-width: 520px; margin: 0 auto; position: relative; overflow: hidden;
  background-color: #fff;
  background-image:
    radial-gradient(circle at 108% -8%, rgba(29, 200, 122, .35) 0, rgba(30, 107, 230, .22) 70px, transparent 140px),
    radial-gradient(circle at -10% 105%, rgba(30, 107, 230, .14) 0, transparent 220px);
}
.home .logo { display: block; width: 100%; max-width: 330px; margin: 6px auto 0; height: auto; }
.home h1 { font-size: 1.65rem; line-height: 1.2; color: var(--navy); margin: 22px 0 8px; letter-spacing: -.01em; }
.home h1 span { color: var(--blue); }
.home .lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 22px; }
.cta { display: flex; flex-direction: column; gap: 14px; }
.btn-big {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; text-decoration: none;
  border: 0; border-radius: 18px; padding: 18px 18px; font-size: 1.15rem; font-weight: 700; color: #fff;
  min-height: 78px; cursor: pointer; box-shadow: 0 6px 0 rgba(11, 42, 111, .18);
  transition: transform .08s, box-shadow .08s;
}
.btn-big:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(11, 42, 111, .18); }
.btn-big svg { flex: none; width: 34px; height: 34px; }
.btn-big small { display: block; font-weight: 500; font-size: .85rem; opacity: .9; margin-top: 2px; }
.btn-demo { background: linear-gradient(135deg, var(--green), var(--mint)); }
.btn-devis { background: linear-gradient(135deg, var(--navy), var(--blue)); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.chips li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: .88rem; font-weight: 600; color: var(--navy); }
.chips li::before { content: "✓ "; color: var(--green); }
.home footer { margin-top: auto; padding-top: 28px; text-align: center; font-size: .9rem; color: var(--muted); }
.home footer strong { color: var(--navy); }
.home footer a { text-decoration: none; font-weight: 600; }

/* ---------- Formulaire (style quiz) ---------- */
.quiz { --accent: var(--blue); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--accent); color: #fff; transition: background .3s; }
.quiz[data-c="1"] { --accent: var(--blue); }
.quiz[data-c="2"] { --accent: var(--green); }
.quiz[data-c="3"] { --accent: var(--violet); }
.quiz[data-c="4"] { --accent: var(--orange); }
.quiz[data-c="5"] { --accent: var(--navy); }
.qtop { padding: 14px 18px 0; max-width: 560px; width: 100%; margin: 0 auto; }
.qtop .row { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: .95rem; margin-bottom: 10px; }
.qtop .row a { color: #fff; opacity: .85; text-decoration: none; font-weight: 600; }
.progress { height: 10px; background: rgba(255, 255, 255, .3); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: #fff; border-radius: 99px; transition: width .3s ease; }
.stage { flex: 1; max-width: 560px; width: 100%; margin: 0 auto; padding: 22px 18px 130px; position: relative; }
.screen { animation: in .22s ease-out; }
.screen.back { animation-name: inback; }
@keyframes in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes inback { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
.screen h2 { font-size: 1.55rem; line-height: 1.2; margin: 8px 0 20px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.field input[type=text], .field input[type=tel] {
  width: 100%; border: 0; border-radius: 14px; padding: 16px 16px; font-size: 1.2rem; color: var(--ink);
  background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .2); outline: 0;
}
.field input:focus { box-shadow: 0 4px 0 rgba(0, 0, 0, .2), 0 0 0 4px rgba(255, 255, 255, .55); }
.field .hint { font-size: .9rem; opacity: .92; margin-top: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.choices { display: grid; gap: 14px; }
.choice {
  display: flex; align-items: center; gap: 14px; min-height: 92px; border: 0; border-radius: 16px; padding: 16px;
  background: #fff; color: var(--ink); font-size: 1.25rem; font-weight: 800; text-align: left; cursor: pointer;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .22); transition: transform .08s, box-shadow .08s;
}
.choice:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .22); }
.choice .shape { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 1.5rem; }
.choice[data-v="immediat"] .shape { background: var(--green); }
.choice[data-v="semaine_prochaine"] .shape { background: var(--blue); }
.choice[aria-pressed="true"] { outline: 5px solid #fff; background: #fff; transform: scale(1.02); box-shadow: 0 6px 0 rgba(0, 0, 0, .35), 0 0 0 9px rgba(255, 255, 255, .35); }
.choice[aria-pressed="true"]::after { content: "✓"; margin-left: auto; color: var(--green); font-size: 1.8rem; }
.recap { background: rgba(255, 255, 255, .15); border-radius: 14px; padding: 12px 14px; margin-bottom: 18px; font-size: 1rem; }
.recap div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.recap b { font-weight: 700; text-align: right; word-break: break-word; }
.consent { display: flex; gap: 14px; align-items: flex-start; background: #fff; color: var(--ink); border-radius: 14px; padding: 16px; cursor: pointer; font-weight: 700; font-size: 1.1rem; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.consent input { flex: none; width: 28px; height: 28px; margin: 0; accent-color: var(--green); }
.consent small { display: block; font-weight: 500; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.err { background: #fff; color: #b3261e; font-weight: 700; border-radius: 12px; padding: 10px 14px; margin-top: 14px; }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .18)); }
.bar .in { max-width: 560px; margin: 0 auto; display: flex; gap: 12px; }
.bar button { min-height: 62px; border: 0; border-radius: 16px; font-size: 1.2rem; font-weight: 800; cursor: pointer; }
.btn-next { flex: 1; background: #fff; color: var(--navy); box-shadow: 0 6px 0 rgba(0, 0, 0, .28); transition: transform .08s, box-shadow .08s, opacity .15s; }
.btn-next:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .28); }
.btn-next.off { opacity: .55; }
.btn-next[disabled] { opacity: .6; }
.btn-back { flex: none; width: 70px; background: rgba(255, 255, 255, .22); color: #fff; }
.thanks { text-align: center; padding-top: 28px; }
.thanks .tick { width: 120px; height: 120px; margin: 0 auto 18px; border-radius: 50%; background: #fff; display: grid; place-items: center; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.thanks .tick svg { width: 64px; height: 64px; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.thanks h2 { font-size: 1.9rem; }
.thanks p { font-size: 1.1rem; margin: 0 0 12px; }
.thanks .link { display: inline-block; margin-top: 18px; background: #fff; color: var(--navy); border-radius: 14px; padding: 15px 22px; font-weight: 800; text-decoration: none; box-shadow: 0 5px 0 rgba(0, 0, 0, .25); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Administration ---------- */
.adm { max-width: 1100px; margin: 0 auto; padding: 16px; }
.adm header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.adm header img { height: 40px; width: auto; }
.adm h1 { font-size: 1.25rem; margin: 0; color: var(--navy); flex: 1; min-width: 150px; }
.login { max-width: 380px; margin: 12vh auto 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; text-align: center; }
.login img { width: 220px; max-width: 100%; }
.login input { width: 100%; padding: 14px; border: 2px solid var(--line); border-radius: 12px; font-size: 1.05rem; margin: 14px 0 10px; }
.btn { border: 0; border-radius: 12px; padding: 12px 16px; background: var(--blue); color: #fff; font-weight: 700; cursor: pointer; font-size: .95rem; text-decoration: none; display: inline-block; }
.btn.alt { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.ok { background: var(--green); }
.login .btn { width: 100%; padding: 14px; font-size: 1.05rem; }
.msg { color: #b3261e; font-weight: 600; min-height: 1.4em; margin: 6px 0 0; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.tabs { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 14px; font-weight: 700; color: var(--navy); cursor: pointer; }
.tab[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.warn { background: #fff4e0; border: 1px solid #f1c98a; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: .92rem; }
.list { display: grid; gap: 10px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.card.done { opacity: .65; }
.card .top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.card h3 { margin: 0; font-size: 1.05rem; color: var(--navy); word-break: break-word; }
.badge { display: inline-block; border-radius: 99px; padding: 3px 10px; font-size: .8rem; font-weight: 800; color: #fff; }
.badge.demo { background: var(--green); }
.badge.devis { background: var(--blue); }
.meta { font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.meta b { color: var(--ink); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 36px 0; }
.nonotif { color: #b3261e; font-size: .8rem; font-weight: 700; }
@media (min-width: 760px) {
  .card { grid-template-columns: 150px 80px 1.4fr 1fr 1.2fr 130px auto; align-items: center; gap: 12px; }
  .card .top { display: contents; }
  .card .meta { display: contents; }
}
.home footer .brand { width: 130px; height: auto; }

.choices.grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice.num { justify-content: center; min-height: 84px; font-size: 1.9rem; padding: 10px; text-align: center; }
.choice.num.wide { grid-column: span 3; font-size: 1.3rem; min-height: 72px; }
.choice.num:nth-child(1) { color: var(--blue); }
.choice.num:nth-child(2) { color: var(--green); }
.choice.num:nth-child(3) { color: var(--violet); }
.choice.num:nth-child(4) { color: var(--orange); }
.choice.num:nth-child(5) { color: var(--navy); }
.choice.num[aria-pressed="true"]::after { content: none; }
.choice.num[aria-pressed="true"] { background: var(--navy); color: #fff; outline-color: #fff; }

.home footer .by { font-weight: 600; color: var(--muted); letter-spacing: .02em; }

.thanks .link.wa { display: block; background: #25d366; color: #fff; font-size: 1.1rem; margin: 22px auto 8px; max-width: 340px; }
.thanks .small { font-size: .9rem; opacity: .92; }
.thanks .link.plain { background: transparent; color: #fff; box-shadow: none; text-decoration: underline; padding: 10px; font-weight: 600; margin-top: 10px; }
