/* ============================================================
   Ergothérapeute Villeurbanne — feuille de style globale
   Palette accessible (contraste AA+), responsive mobile-first
   ============================================================ */

:root {
  --c-primary: #1f6fb2;
  --c-primary-dark: #14517f;
  --c-accent: #0e9f6e;
  --c-accent-dark: #086a48;
  --c-bg: #ffffff;
  --c-bg-soft: #f4f7fb;
  --c-bg-alt: #eaf1f8;
  --c-title: #102a43;
  --c-text: #243b53;
  --c-muted: #627d98;
  --c-border: #d9e2ec;
  --c-warning: #b45309;
  --c-error: #b91c1c;
  --shadow-sm: 0 1px 2px rgba(16, 42, 67, 0.06);
  --shadow-md: 0 4px 12px rgba(16, 42, 67, 0.08);
  --shadow-lg: 0 16px 40px rgba(16, 42, 67, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --max-w: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: var(--c-title);
  line-height: 1.2;
  margin: 0 0 16px;
  font-weight: 800;
}
h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
h2 { font-size: clamp(1.55rem, 3.5vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.4rem); }

p { margin: 0 0 14px; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.97);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--c-border);
}
.nav {
  max-width: var(--max-w); margin: 0 auto;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.logo {
  font-weight: 900; color: var(--c-title);
  font-size: 1.15rem; letter-spacing: -0.01em;
  text-decoration: none; display: flex; align-items: center; gap: 8px;
}
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900;
}
.nav-links {
  display: flex; gap: 22px; align-items: center;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--c-text); font-weight: 600; font-size: 0.97rem;
}
.nav-links a.active, .nav-links a:hover { color: var(--c-primary); text-decoration: none; }
.nav-cta {
  background: var(--c-primary); color: #fff !important;
  padding: 10px 18px; border-radius: 999px; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: var(--c-primary-dark); text-decoration: none; }

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--c-border);
  border-radius: 8px; padding: 6px 10px; cursor: pointer;
  font-size: 1.4rem; color: var(--c-title);
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-links {
    position: absolute; top: 100%; right: 0; left: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 12px 20px 18px; gap: 4px;
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 6px; border-radius: 8px; }
  .nav-cta { text-align: center; margin-top: 6px; }
}

/* ===== Boutons ===== */
.btn {
  display: inline-block; padding: 14px 26px;
  border-radius: 999px; font-weight: 700; font-size: 1rem;
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-align: center;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-dark); text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-primary); color: #fff; text-decoration: none; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(180deg, #f8fbfe 0%, #eaf1f8 100%);
  padding: 56px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}
.hero-eyebrow {
  display: inline-block;
  background: #fff; border: 1px solid var(--c-border);
  color: var(--c-primary);
  padding: 6px 14px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 700;
  margin-bottom: 16px;
}
.hero h1 strong { color: var(--c-primary); }
.hero-lead {
  font-size: 1.13rem; color: var(--c-text);
  max-width: 56ch; margin-bottom: 24px;
}
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px;
}
.trust-pill {
  background: #fff; border: 1px solid var(--c-border);
  padding: 7px 13px; border-radius: 999px; font-size: 0.88rem;
  color: var(--c-text); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.trust-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); }

/* ===== Section ===== */
section { padding: 64px 0; }
section.alt { background: var(--c-bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head p { color: var(--c-muted); font-size: 1.05rem; }
.eyebrow {
  display: inline-block; color: var(--c-primary);
  font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
}

/* ===== Cards / grilles ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--c-bg-alt); color: var(--c-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 14px; font-weight: 800;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--c-text); font-size: 0.97rem; margin: 0; }

/* ===== Listes ===== */
ul.check, ol.steps { padding-left: 0; list-style: none; }
ul.check li {
  padding-left: 30px; position: relative; margin-bottom: 10px;
}
ul.check li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--c-accent); font-weight: 900;
  background: rgba(14,159,110,0.12);
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
ol.steps { counter-reset: step; }
ol.steps li {
  counter-increment: step;
  padding-left: 50px; position: relative; margin-bottom: 18px;
  min-height: 36px;
}
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
}
ol.steps li strong { display: block; color: var(--c-title); margin-bottom: 2px; }

/* ===== Quiz ===== */
.ergo-quiz {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 520px;
  margin: 0 auto;
}
.quiz-card { padding: 28px 26px 30px; }
.quiz-progress {
  height: 6px; background: var(--c-bg-alt); border-radius: 999px;
  overflow: hidden; margin-bottom: 8px;
}
.quiz-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  width: 50%; border-radius: 999px; transition: width 0.3s ease;
}
.quiz-step-label {
  color: var(--c-muted); font-size: 0.85rem; font-weight: 600;
  margin-bottom: 18px; letter-spacing: 0.02em;
}
.quiz-step { display: none; }
.quiz-step.active { display: block; }
.quiz-q { font-size: 1.2rem; margin-bottom: 6px; color: var(--c-title); }
.quiz-q-hint { font-size: 0.85rem; color: var(--c-muted); margin-bottom: 14px; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  display: block; width: 100%;
  background: #fff; color: var(--c-title);
  border: 2px solid var(--c-border);
  border-radius: 12px; padding: 14px 18px;
  font-size: 1rem; font-weight: 600; text-align: left;
  cursor: pointer; transition: all 0.15s ease;
}
.quiz-option:hover {
  border-color: var(--c-primary); background: #f5faff;
}
.quiz-options-multi .quiz-option.selected {
  border-color: var(--c-primary); background: #eaf3fc; color: var(--c-primary-dark);
}
.quiz-options-multi .quiz-option.selected::after {
  content: " ✓"; color: var(--c-accent); font-weight: 900;
}
.quiz-option-secondary {
  background: transparent; border-color: var(--c-border); color: var(--c-muted); font-weight: 500;
}
.quiz-continue {
  margin-top: 16px; width: 100%;
  background: var(--c-primary); color: #fff;
  border: none; border-radius: 12px;
  padding: 14px 18px; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: background 0.15s ease;
}
.quiz-continue:hover:not(:disabled) { background: var(--c-primary-dark); }
.quiz-continue:disabled { background: var(--c-border); color: #fff; cursor: not-allowed; }
.quiz-divider {
  text-align: center; color: var(--c-muted); font-size: 0.8rem;
  margin: 14px 0 10px; position: relative;
}
.quiz-divider::before, .quiz-divider::after {
  content: ""; position: absolute; top: 50%;
  width: 40%; height: 1px; background: var(--c-border);
}
.quiz-divider::before { left: 0; }
.quiz-divider::after { right: 0; }
.quiz-back {
  margin-top: 14px; background: transparent; border: none;
  color: var(--c-muted); font-size: 0.9rem; cursor: pointer;
  padding: 6px 0;
}
.quiz-back:hover { color: var(--c-primary); text-decoration: underline; }

.quiz-result { text-align: center; padding: 12px 0 0; }
.quiz-result-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 900; color: #fff;
  margin-bottom: 14px;
}
.quiz-result-ok .quiz-result-icon { background: var(--c-accent); }
.quiz-result-ko .quiz-result-icon { background: var(--c-warning); }
.quiz-result-title { font-size: 1.35rem; margin-bottom: 10px; }
.quiz-result-text { color: var(--c-text); font-size: 0.98rem; margin-bottom: 20px; }
.quiz-cta-doctolib {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: #0c8af4; color: #fff !important;
  padding: 14px 22px; border-radius: 999px;
  font-weight: 800; font-size: 1rem; text-decoration: none;
  box-shadow: 0 6px 16px rgba(12,138,244,0.35);
  width: 100%;
}
.quiz-cta-doctolib:hover { background: #0a78d4; text-decoration: none; transform: translateY(-1px); }
.quiz-cta-doctolib img { height: 22px; width: auto; border-radius: 4px; background: #fff; padding: 2px 4px; }
.quiz-cta-contact {
  display: inline-block;
  background: var(--c-primary); color: #fff !important;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none;
}
.quiz-restart {
  background: transparent; border: none; color: var(--c-muted);
  font-size: 0.88rem; cursor: pointer; margin-top: 14px; display: block; width: 100%;
}
.quiz-restart:hover { color: var(--c-primary); text-decoration: underline; }

/* ===== FAQ ===== */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--c-border);
  background: #fff;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 54px 18px 22px;
  font-weight: 700;
  color: var(--c-title);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem; color: var(--c-primary);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-answer {
  padding: 0 22px 20px;
  color: var(--c-text);
}
.faq-answer p:last-child { margin-bottom: 0; }

/* ===== Témoignages ===== */
.quote {
  background: #fff;
  border-left: 4px solid var(--c-primary);
  padding: 22px 26px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.quote p { font-style: italic; color: var(--c-text); margin-bottom: 10px; }
.quote-author { font-size: 0.9rem; color: var(--c-muted); font-weight: 600; }

/* ===== Encart info ===== */
.info-box {
  background: #eaf3fc; border-left: 4px solid var(--c-primary);
  padding: 18px 22px; border-radius: 8px;
  margin: 22px 0;
}
.info-box strong { color: var(--c-primary-dark); }
.warn-box {
  background: #fef3c7; border-left: 4px solid var(--c-warning);
  padding: 18px 22px; border-radius: 8px; margin: 22px 0;
  color: #78350f;
}

/* ===== CTA Section ===== */
.cta-band {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: #fff;
  text-align: center;
  padding: 56px 20px;
  border-radius: var(--radius-lg);
  margin: 32px auto;
  max-width: calc(var(--max-w) - 40px);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.92); max-width: 600px; margin: 0 auto 22px; }

/* ===== Footer ===== */
.site-footer {
  background: #102a43; color: #cdd9e5;
  padding: 48px 0 24px; margin-top: 40px;
}
.site-footer a { color: #9fb3c8; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid #243b53;
  margin-top: 32px; padding-top: 18px;
  font-size: 0.85rem; color: #829ab1; text-align: center;
}

/* ===== Two columns content ===== */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
}
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; gap: 28px; } }

/* ===== Floating CTA ===== */
.floating-cta {
  position: fixed; bottom: 18px; right: 18px; z-index: 60;
  background: var(--c-accent); color: #fff !important;
  padding: 14px 20px; border-radius: 999px;
  font-weight: 800; text-decoration: none;
  box-shadow: 0 10px 24px rgba(14,159,110,0.4);
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.95rem;
}
.floating-cta:hover { background: var(--c-accent-dark); transform: translateY(-2px); text-decoration: none; }
@media (max-width: 600px) {
  .floating-cta { padding: 12px 16px; font-size: 0.88rem; }
  .floating-cta .label-long { display: none; }
}

/* ===== Tableau ===== */
.table-wrap { overflow-x: auto; }
table.simple {
  width: 100%; border-collapse: collapse;
  background: #fff; border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.simple th, table.simple td {
  text-align: left; padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
}
table.simple th {
  background: var(--c-bg-alt); color: var(--c-title);
  font-weight: 700;
}
table.simple tr:last-child td { border-bottom: none; }

/* ===== Accessibilité focus ===== */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid #93c5fd; outline-offset: 2px;
}

/* ===== Modal Quiz ===== */
.quiz-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.quiz-modal[hidden] { display: none !important; }
.quiz-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(16, 42, 67, 0.62);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease;
}
.quiz-modal-panel {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 540px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px 28px 30px;
  animation: slideUp 0.25s ease;
  outline: none;
}
.quiz-modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-bg-soft); border: none;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  color: var(--c-muted);
}
.quiz-modal-close:hover { background: var(--c-bg-alt); color: var(--c-title); }
.quiz-modal-header { text-align: center; margin-bottom: 18px; }
.quiz-modal-title {
  font-size: 1.3rem; color: var(--c-title); margin: 0 0 8px;
  padding-right: 30px;
}
.quiz-modal-sub { color: var(--c-muted); font-size: 0.95rem; margin: 0; }
.quiz-modal .ergo-quiz {
  box-shadow: none; border: none; max-width: none;
}
.quiz-modal .quiz-card { padding: 4px 0 0; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* CTA Doctolib-like big button */
.btn-doctolib {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  background: #0c8af4; color: #fff !important;
  padding: 16px 32px; border-radius: 999px;
  font-weight: 800; font-size: 1.05rem;
  border: none; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 20px rgba(12, 138, 244, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-doctolib:hover {
  background: #0a78d4; text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(12, 138, 244, 0.45);
}
.btn-doctolib .doctolib-badge {
  background: #fff; color: #0c8af4;
  font-size: 0.7rem; font-weight: 900;
  padding: 3px 8px; border-radius: 4px;
  letter-spacing: 0.04em;
}

/* ===== Print ===== */
@media print {
  .nav, .site-footer, .floating-cta, .nav-toggle, .quiz-modal { display: none !important; }
  body { font-size: 12pt; }
}
