:root {
  --creme: #fbf6f1; --blanc: #fffdfb; --rose: #bf6440; --rose-fonce: #97472a; --rose-pale: #fbe4d5; --rose-voile: #fdf2ea;
  --or: #c29a4a; --or-pale: #f6ecd6; --texte: #3d2c2e; --doux: #7a6762; --trait: #f0ddcf; --vert: #5d8a6a; --alerte: #a1381f;
  --titre: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --corps: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ombre: 0 1px 2px rgba(61, 44, 46, .05), 0 8px 24px rgba(191, 100, 64, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--creme); color: var(--texte); font: 16px/1.5 var(--corps); }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(600px 380px at 105% -5%, #fbdcc6 0, transparent 70%), radial-gradient(500px 300px at -10% 105%, #f6ecd6 0, transparent 70%); }
h1, h2, h3 { font-family: var(--titre); font-weight: 500; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 7vw, 42px); }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
p { margin: 0 0 .9em; }
a { color: var(--rose); }
.surtitre { font-family: var(--titre); font-style: italic; color: var(--rose); font-size: 18px; margin: 0 0 4px; }
.doux { color: var(--doux); }
.petit { font-size: 13.5px; }
.page { max-width: 640px; margin: 0 auto; padding: 28px 18px 120px; }
.page.large { max-width: 980px; }
.carte { background: var(--blanc); border: 1px solid var(--trait); border-radius: 20px; padding: 22px; box-shadow: var(--ombre); margin-bottom: 18px; }
.fleur { position: absolute; top: 8px; right: 14px; width: 52px; pointer-events: none; filter: drop-shadow(0 4px 8px rgba(169, 116, 42, .25)); }
header.haut { position: relative; padding-right: 70px; margin-bottom: 18px; }

label.champ { display: block; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
label.champ span.aide { font-weight: 400; color: var(--doux); }
input[type=text], input[type=email], input[type=tel], input[type=password], input:not([type]) {
  width: 100%; margin-top: 6px; padding: 13px 14px; font: inherit; font-size: 16px; color: var(--texte);
  border: 1.5px solid var(--trait); border-radius: 12px; background: #fff; outline: none; }
.tel-ligne { display: flex; gap: 8px; margin-top: 6px; }
.tel-ligne input { margin-top: 0; flex: 1; min-width: 0; }
.tel-ligne select { flex: 0 0 auto; max-width: 46%; padding: 13px 8px; font: inherit; font-size: 16px; color: var(--texte);
  border: 1.5px solid var(--trait); border-radius: 12px; background: #fff; outline: none; }
.tel-ligne .ind-autre { flex: 0 0 64px; }
.tel-ligne:has(.ind-autre) select { max-width: 30%; }
.tel-ligne select:focus { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-pale); }
input:focus { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-pale); }
.case { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 12px 0; cursor: pointer; }
.case input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--rose); flex: none; }

.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--rose); color: #fff; font: 600 16px var(--corps); padding: 14px 24px; border-radius: 999px; text-decoration: none;
  transition: transform .12s, background .2s; min-height: 50px; }
.bouton:hover { background: var(--rose-fonce); }
.bouton:active { transform: scale(.98); }
.bouton[disabled] { opacity: .45; cursor: default; }
.bouton.second { background: #fff; color: var(--rose); border: 1.5px solid var(--rose-pale); }
.bouton.second:hover { background: var(--rose-voile); }
.bouton.plein { width: 100%; }
.bouton.mini { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.rangee { display: flex; gap: 10px; flex-wrap: wrap; }
.erreur { color: var(--alerte); font-size: 14px; min-height: 1.2em; margin: 8px 0 0; }

/* Puces à toucher (QCM) */
.choix { display: grid; gap: 10px; }
.choix.deux { grid-template-columns: 1fr 1fr; }
.puce { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid var(--trait); border-radius: 14px; padding: 13px 14px; font: inherit; color: var(--texte);
  transition: border-color .15s, background .15s, transform .1s; -webkit-tap-highlight-color: transparent; min-height: 52px; }
.puce:active { transform: scale(.99); }
.puce .coche { width: 22px; height: 22px; flex: none; border: 1.5px solid #e3c6b3; border-radius: 7px; display: grid; place-items: center; transition: all .15s; }
.puce.rond .coche { border-radius: 50%; }
.puce[aria-pressed=true] { border-color: var(--rose); background: var(--rose-voile); }
.puce[aria-pressed=true] .coche { background: var(--rose); border-color: var(--rose); }
.puce[aria-pressed=true] .coche::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.puce .rang { margin-left: auto; font: 600 13px var(--corps); color: #fff; background: var(--rose); border-radius: 999px; padding: 2px 9px; }
.puce .emo { font-size: 20px; }
.puce.suggere:not([aria-pressed=true]) { border-style: dashed; border-color: var(--or); }
.puce.suggere .badge { margin-left: auto; font-size: 11.5px; color: #8a6a24; background: var(--or-pale); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }

/* Note de 1 à 5 */
.notes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 6px 0 4px; }
.note { aspect-ratio: 1; max-height: 60px; border-radius: 50%; border: 1.5px solid var(--trait); background: #fff; font: 600 20px var(--titre);
  color: var(--texte); cursor: pointer; transition: all .15s; }
.note[aria-pressed=true] { background: var(--rose); border-color: var(--rose); color: #fff; transform: scale(1.06); }
.legende-notes { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--doux); }
.legende-note { text-align: center; color: var(--rose); font-family: var(--titre); font-style: italic; min-height: 1.4em; margin-top: 6px; }

/* Étapes du questionnaire */
.progression { position: sticky; top: 0; z-index: 5; background: rgba(251, 246, 241, .92); backdrop-filter: blur(8px); padding: 12px 18px 10px; margin: 0 -18px 12px; }
.barre { height: 6px; background: var(--rose-pale); border-radius: 99px; overflow: hidden; }
.barre i { display: block; height: 100%; background: linear-gradient(90deg, var(--rose), var(--or)); border-radius: 99px; transition: width .35s ease; }
.progression .etiquette { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--doux); margin-top: 6px; }
.etape { animation: entree .35s ease both; }
@keyframes entree { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.numero-sphere { font-family: var(--titre); color: var(--or); font-size: 22px; margin-right: 6px; }
.bas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: linear-gradient(transparent, var(--creme) 30%); padding: 22px 18px calc(16px + env(safe-area-inset-bottom)); }
.bas .interieur { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.bas .bouton.retour { flex: 0 0 auto; }
.bas .bouton.suite { flex: 1; }
.sous-titre { font-weight: 600; font-size: 14px; letter-spacing: .02em; color: var(--rose); text-transform: uppercase; margin: 18px 0 8px; }

/* Roue */
.roue { display: block; width: 100%; max-width: 380px; margin: 0 auto; }
.roue text { font-family: var(--corps); font-size: 11px; fill: var(--texte); }

/* Lien et QR */
.lien-boite { background: var(--rose-voile); border: 1.5px dashed #efc3a8; border-radius: 14px; padding: 14px; word-break: break-all; font: 600 15px ui-monospace, Menlo, Consolas, monospace; color: var(--rose-fonce); }
.qr { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: 16px; border: 1px solid var(--trait); width: max-content; margin: 14px auto; }
.qr img, .qr svg { width: 200px; height: 200px; display: block; }
.liste-bilans { display: grid; gap: 10px; }
.ligne-bilan { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: #fff; border: 1px solid var(--trait); border-radius: 14px; text-decoration: none; color: inherit; }
.ligne-bilan:hover { border-color: var(--rose); }
.ligne-bilan .qui { font-weight: 600; }
.ligne-bilan .quand { font-size: 13px; color: var(--doux); }
.statut { margin-left: auto; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.statut.nouveau { background: var(--rose); color: #fff; }
.statut.vu { background: var(--or-pale); color: #8a6a24; }
.statut.repondu, .statut.plan { background: #e3efe5; color: var(--vert); }
.onglets { display: flex; gap: 6px; background: var(--rose-pale); padding: 4px; border-radius: 999px; margin-bottom: 16px; }
.onglets button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 999px; font: 600 14px var(--corps); color: var(--rose-fonce); cursor: pointer; }
.onglets button[aria-selected=true] { background: #fff; box-shadow: var(--ombre); }
.vide { text-align: center; padding: 30px 10px; color: var(--doux); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--texte); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; transition: all .25s; z-index: 50; pointer-events: none; }
.toast.vu { opacity: 1; transform: translateX(-50%); }
.credit { text-align: center; font-size: 12px; color: #a8958f; margin-top: 30px; }
@media (max-width: 420px) { .choix.deux { grid-template-columns: 1fr; } .carte { padding: 18px; } }
.bouton.whatsapp { background: #1fa855; font-size: 17px; min-height: 58px; }
.bouton.whatsapp:hover { background: #178a45; }
.envoi-wa { border-color: #bfe3cb; }
.ok-wa { color: #178a45; font-weight: 600; margin: 10px 0 0; }
