/* ===== Reflux'Oc – feuille de style ===== */

@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url("assets/fonts/fredoka-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url("assets/fonts/fredoka-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("assets/fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 600; font-display: swap; src: url("assets/fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("assets/fonts/nunito-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #FBF4EC;          /* crème */
  --card: #FFFFFF;
  --sand: #F3E9DB;        /* beige */
  --olive: #66753A;       /* vert olive (boutons) */
  --olive-dark: #4E5A2B;
  --olive-soft: #EEF0E1;
  --coral: #E5807A;       /* corail du logo */
  --coral-dark: #9E3F3A;
  --coral-soft: #FCEEEA;
  --yellow: #D9C46B;
  --ocre: #B9822F;
  --ocre-soft: #FBF1DC;
  --text: #34322A;
  --muted: #6A665A;
  --line: #E9DFD0;
  --danger: #A12F28;
  --danger-soft: #FDE8E5;
  --radius: 22px;
  --shadow: 0 6px 24px rgba(92, 78, 52, .08);
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--olive-dark); }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.app {
  max-width: 760px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px 32px;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; color: var(--text); }
h1 { font-size: clamp(1.6rem, 5vw, 2rem); }
h2 { font-size: clamp(1.35rem, 4.4vw, 1.65rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 .8em; }

.eyebrow {
  text-align: center;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--olive-dark);
  margin: 12px 0 14px;
}
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---------- Accueil ---------- */
.logo { width: min(440px, 88%); margin: 0 auto 10px; }
.tagline { text-align: center; font-size: 1.12rem; margin: 0 auto 26px; max-width: 34ch; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  margin-bottom: 20px;
}
.intro-card { display: grid; gap: 18px 28px; grid-template-columns: 1fr; }
.portrait { width: 150px; aspect-ratio: 4/5; object-fit: cover; border-radius: 20px; margin: 0 auto; }
.intro-text p { color: var(--muted); font-size: 1.05rem; }
.intro-text h1 { text-align: center; }
.notice { border-radius: 16px; padding: 14px 18px; margin: 0; }
.notice-soft { background: var(--coral-soft); border: 1px solid #F1C9C2; color: var(--coral-dark); }
.start { text-align: center; margin-top: 8px; }
.start .muted { margin-top: 12px; font-size: .95rem; }

@media (min-width: 640px) {
  .app { padding-top: 32px; }
  .card { padding: 34px 36px; }
  .intro-card { grid-template-columns: 190px 1fr; align-items: start; }
  .portrait { width: 190px; margin: 0; }
  .intro-text h1 { text-align: left; }
  .intro-card .notice { grid-column: 1 / -1; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible, .choice input:focus-visible + .choice-box, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--yellow); outline-offset: 2px;
}
.btn-primary { background: var(--olive); color: #fff; box-shadow: 0 6px 16px rgba(102, 117, 58, .28); }
.btn-primary:hover { background: var(--olive-dark); }
.btn-coral { background: var(--coral-dark); color: #fff; }
.btn-coral:hover { background: #853430; }
.btn-ghost { background: transparent; color: var(--olive-dark); border-color: var(--olive); }
.btn-ghost:hover { background: var(--olive-soft); }
.btn-link { background: none; border: 0; color: var(--muted); text-decoration: underline; min-height: 44px; padding: 8px; cursor: pointer; font-size: .95rem; }
.btn-big { min-height: 60px; padding: 16px 40px; font-size: 1.2rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Questionnaire ---------- */
.q-header { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0 14px; margin: -10px 0 8px; }
.q-header .mini-logo { width: 120px; margin: 0 auto 10px; }
.progress-meta { display: flex; justify-content: space-between; font-size: .88rem; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.progress { height: 10px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--olive), #8A9A4E); border-radius: 999px; transition: width .35s ease; }

.step-title { margin: 6px 0 16px; }
.step-title h2 { margin: 0; }
.step-intro { color: var(--muted); margin-top: 6px; }

.question { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 18px; margin-bottom: 16px; border: 2px solid transparent; }
.question.has-error { border-color: var(--danger); }
.question fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-label { display: block; font-family: var(--display); font-weight: 600; font-size: 1.12rem; line-height: 1.3; margin-bottom: 4px; padding: 0; }
.q-tag { display: inline-block; font-family: var(--body); font-size: .78rem; font-weight: 700; padding: 1px 9px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.q-tag.req { background: var(--olive-soft); color: var(--olive-dark); }
.q-tag.opt { background: var(--sand); color: var(--muted); }
.q-help { color: var(--muted); font-size: .95rem; margin: 2px 0 12px; }
.q-error { color: var(--danger); font-weight: 700; font-size: .95rem; margin: 10px 0 0; }

.choices { display: grid; gap: 10px; margin-top: 12px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-box {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 16px; background: #FFFDF9;
  transition: border-color .15s ease, background .15s ease;
}
.choice:hover .choice-box { border-color: #CFC2A8; }
.choice-mark { flex: 0 0 24px; width: 24px; height: 24px; border: 2px solid #B9AE98; background: #fff; display: grid; place-items: center; transition: all .15s ease; }
.choice input[type="radio"] + .choice-box .choice-mark { border-radius: 50%; }
.choice input[type="checkbox"] + .choice-box .choice-mark { border-radius: 8px; }
.choice-mark svg { width: 14px; height: 14px; opacity: 0; transition: opacity .12s ease; }
.choice input:checked + .choice-box { border-color: var(--olive); background: var(--olive-soft); }
.choice input:checked + .choice-box .choice-mark { background: var(--olive); border-color: var(--olive); }
.choice input:checked + .choice-box .choice-mark svg { opacity: 1; }
.choice.exclusive .choice-box { border-style: dashed; }
.choice-extra { margin: 8px 0 0 50px; }

.field-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.input, .textarea, .select {
  width: 100%; min-height: 52px; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 14px; background: #FFFDF9;
  font-size: 1.05rem;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--olive); outline: none; }
.input-num { width: 130px; }
.select { width: auto; min-width: 140px; }
.unit { color: var(--muted); font-weight: 600; }
.textarea { min-height: 96px; resize: vertical; }

.alert-inline { margin-top: 14px; }

.nav { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 22px; }
.nav .btn { flex: 1 1 0; }
.nav .btn-primary { flex-grow: 1.6; }
.form-error-summary { color: var(--danger); font-weight: 700; text-align: center; margin-top: 12px; }

/* ---------- Encadrés ---------- */
.box { border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.box h3 { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.box h3 svg { flex: 0 0 26px; width: 26px; height: 26px; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.box-danger { background: var(--danger-soft); border: 2px solid #E9A49C; color: #5E1D18; }
.box-danger h3 { color: var(--danger); }
.box-medical { background: var(--ocre-soft); border: 2px solid #E7C98F; }
.box-medical h3 { color: #7A531A; }
.box-olive { background: var(--olive-soft); }

/* ---------- Synthèse ---------- */
.synth-head { text-align: center; margin-bottom: 18px; }
.synth-head .logo { width: min(300px, 70%); }
.synth-head .subtitle { font-family: var(--display); font-weight: 600; color: var(--coral-dark); font-size: 1.1rem; }
.synth-date { font-size: .9rem; color: var(--muted); }
.section-title { margin: 30px 0 14px; display: flex; align-items: center; gap: 12px; }
.section-title::after { content: ""; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }

.piste { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 18px; margin-bottom: 14px; position: relative; overflow: hidden; }
.piste::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 6px; background: var(--accent, var(--olive)); }
.piste h3 { margin-top: 4px; }
.piste .elements { font-size: .93rem; color: var(--muted); font-style: italic; }
.piste .yours { background: var(--sand); border-radius: 14px; padding: 12px 14px; margin-top: 10px; font-size: .95rem; }
.piste .yours strong { display: block; margin-bottom: 4px; font-family: var(--display); font-weight: 600; }
.piste .yours ul { margin: 0; padding-left: 20px; }
.no-piste { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

.check-list { padding-left: 0; list-style: none; margin: 0 0 12px; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.check-list li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); }

.laurene { display: grid; gap: 18px; }
.laurene .portrait { width: 130px; }
@media (min-width: 640px) { .laurene { grid-template-columns: 150px 1fr; } .laurene .portrait { width: 150px; } }
.cta-row { text-align: center; margin: 20px 0 6px; }

.recap details { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 18px; }
.recap summary { cursor: pointer; font-family: var(--display); font-weight: 600; min-height: 52px; display: flex; align-items: center; }
.recap dl { margin: 6px 0 16px; }
.recap dt { font-weight: 700; font-size: .92rem; margin-top: 12px; }
.recap dd { margin: 2px 0 0; color: var(--muted); }
.recap h4 { font-family: var(--display); font-weight: 600; margin: 18px 0 0; color: var(--olive-dark); }

.followup form { display: grid; gap: 14px; }
.followup label.lbl { font-weight: 700; display: block; margin-bottom: 6px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 22px; accent-color: var(--olive); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { border-radius: 14px; padding: 12px 14px; font-weight: 600; }
.form-msg.ok { background: var(--olive-soft); color: var(--olive-dark); }
.form-msg.err { background: var(--danger-soft); color: var(--danger); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 22px 0; }

.site-footer { text-align: center; color: var(--muted); font-size: .88rem; padding: 10px 16px max(28px, env(safe-area-inset-bottom)); }
.site-footer p { margin: 4px 0; }

/* Page texte (confidentialité) */
.prose { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 20px; }
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 22px; }
@media (min-width: 640px) { .prose { padding: 34px 40px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Impression / PDF ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11.5pt; }
  .app { max-width: none; padding: 0; }
  .no-print, .site-footer, .q-header, .followup, .actions, .cta-row, .btn { display: none !important; }
  .card, .piste, .question, .recap details, .no-piste { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .box { break-inside: avoid; }
  .recap details > *:not(summary) { display: block !important; }
  .piste::before { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .box, .piste .yours { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
