/* ============ Rehab4Perf — Vitrine v2 (3D) ============ */
:root {
  --blue: #2B5FA6;
  --blue-dark: #1A3A5C;
  --blue-deep: #12283F;
  --blue-light: #EEF3FB;
  --red: #C0392B;
  --red-light: #FDECEA;
  --green: #2D6A4F;
  --green-light: #E8F3EE;
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --surface2: #F1F0ED;
  --border: #E8E6E1;
  --border-strong: #D3D1CB;
  --text: #1A1917;
  --text-muted: #6B6860;
  --text-faint: #9D9B96;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(26, 25, 23, 0.05);
  --shadow-md: 0 6px 24px rgba(26, 58, 92, 0.10);
  --shadow-3d: 0 40px 80px -24px rgba(18, 40, 63, 0.35), 0 18px 36px -18px rgba(18, 40, 63, 0.25);
  --font: 'Figtree', -apple-system, 'Helvetica Neue', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html, body { overflow-x: clip; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Marque ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand svg { display: block; flex-shrink: 0; }
.brand-w { display: inline-flex; align-items: baseline; line-height: 1; white-space: nowrap; }
.brand-r { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 600; font-size: 24px; color: var(--text); letter-spacing: -.01em; }
.brand-e { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 600; font-size: .44em; vertical-align: super; color: var(--blue); margin: 0 .05em 0 .01em; line-height: 0; }
.brand-p { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -.025em; margin-left: .02em; }
.footer .brand-r, .footer .brand-p { color: #fff; }
.footer .brand-e { color: #7FA8D9; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.22s ease;
  white-space: nowrap;
}
.btn svg { transition: transform 0.22s ease; }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(43, 95, 166, 0.30);
}
.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(43, 95, 166, 0.38);
}

.btn-green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.30);
}
.btn-green:hover { background: #1A5C3A; transform: translateY(-2px); }

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

.btn-lg { padding: 15px 32px; font-size: 16px; }

.btn:focus-visible, a:focus-visible {
  outline: 3px solid rgba(43, 95, 166, 0.4);
  outline-offset: 2px;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 246, 243, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--blue); }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.nav-cta .btn { padding: 9px 18px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 84px 0 40px;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.orb-1 { width: 480px; height: 480px; background: #D8E6F8; top: -140px; left: -120px; }
.orb-2 { width: 380px; height: 380px; background: #F8E3DF; top: 60px; right: -140px; opacity: 0.4; }
.orb-3 { width: 420px; height: 420px; background: #DDEee6; bottom: -200px; left: 30%; opacity: 0.45; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--green);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-size: clamp(36px, 5.2vw, 58px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--blue-dark);
  max-width: 800px;
  margin: 0 auto 22px;
}
.hero h1 em { font-style: normal; color: var(--blue); }
.hero p {
  font-size: 18.5px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.hero-note { font-size: 13.5px; color: var(--text-faint); }

/* ---------- Scène 3D ---------- */
.scene {
  margin: 70px auto 0;
  max-width: 1020px;
  perspective: 1800px;
  position: relative;
}
.app-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3d);
  overflow: hidden;
  text-align: left;
  transform-style: preserve-3d;
  transform: rotateX(22deg) scale(0.94);
  transition: transform 0.15s linear;
  will-change: transform;
}
.scene.flat .app-window { transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }

/* Chips flottants */
.chip {
  position: absolute;
  z-index: 5;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 17px;
  box-shadow: 0 18px 44px -12px rgba(18, 40, 63, 0.28);
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  will-change: transform;
  animation: float 6s ease-in-out infinite;
}
.chip small { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-faint); }
.chip-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chip-1 { top: 6%; left: -68px; animation-delay: 0s; }
.chip-1 .chip-icon { background: var(--green-light); color: var(--green); }
.chip-2 { top: 42%; right: -76px; animation-delay: 1.6s; }
.chip-2 .chip-icon { background: var(--blue-light); color: var(--blue); }
.chip-3 { bottom: 10%; left: -50px; animation-delay: 3.1s; }
.chip-3 .chip-icon { background: var(--red-light); color: var(--red); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-13px); }
}

/* ---------- Mockup fidèle à l'app ---------- */
.app-topnav {
  background: var(--blue-dark);
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  gap: 2px;
}
.app-topnav .brand { margin-right: 18px; gap: 7px; }
.app-topnav .brand-r { font-size: 14px; color: #fff; }
.app-topnav .brand-e { color: #7FA8D9; }
.app-topnav .brand-p { font-size: 11px; color: #fff; }
.app-tab {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
  font-weight: 500;
  padding: 0 13px;
  height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.app-tab.active {
  color: #fff;
  border-bottom-color: #4A90D9;
  background: rgba(255, 255, 255, 0.05);
}
.app-topnav-right {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11.5px;
}

.app-body { display: flex; min-height: 420px; background: var(--bg); }

.app-side {
  width: 218px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
}
.app-side .brand { font-size: 14.5px; padding: 0 8px; }
.app-side-sub { font-size: 10px; color: var(--text-faint); padding: 2px 8px 10px; }
.patient-card {
  background: var(--surface2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.patient-card .p-name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.patient-card .p-meta { font-size: 10.5px; color: var(--text-faint); margin-bottom: 7px; }
.p-progress { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.p-progress > div { height: 100%; width: 68%; background: var(--blue); border-radius: 3px; }

.side-section {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  padding: 9px 8px 4px;
}
.side-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.side-item .ico { width: 16px; text-align: center; font-size: 12px; }
.side-item.active {
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 600;
}

.app-main { flex: 1; padding: 18px 20px; min-width: 0; }
.block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.block-header {
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
}
.block-header.red { background: var(--red); }
.block-header.green { background: var(--green); }

.t-table { width: 100%; border-collapse: collapse; }
.t-table th {
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.t-table td {
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}
.t-table tr:last-child td { border-bottom: none; }
.res {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 5px;
  border: 1.5px solid;
}
.res-neg { background: var(--green-light); border-color: var(--green); color: var(--green); }
.res-pos { background: var(--red-light); border-color: var(--red); color: var(--red); }
.t-obs { color: var(--text-faint); font-size: 11px; font-style: italic; }

/* ---------- Stats ---------- */
.stats { padding: 72px 0 40px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.stat-num {
  font-size: 34px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.02em;
}
.stat-label { font-size: 14px; color: var(--text-muted); margin-top: 6px; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--blue-dark);
  margin-bottom: 16px;
}
.section-head p { font-size: 17px; color: var(--text-muted); }

/* ---------- Features (cartes 3D tilt) ---------- */
.features { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  perspective: 1200px;
}
.feature {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}
.feature:hover { box-shadow: var(--shadow-md); }
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transform: translateZ(28px);
}
.feature h3 {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 9px;
  transform: translateZ(18px);
}
.feature p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.65;
  transform: translateZ(10px);
}

/* ---------- Steps ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.step { text-align: center; padding: 0 12px; }
.step-num {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--blue);
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 24px -6px rgba(43, 95, 166, 0.45);
  transform: rotate(-4deg);
}
.step:nth-child(2) .step-num { transform: rotate(3deg); background: var(--green); box-shadow: 0 10px 24px -6px rgba(45, 106, 79, 0.45); }
.step:nth-child(3) .step-num { transform: rotate(-2deg); background: var(--red); box-shadow: 0 10px 24px -6px rgba(192, 57, 43, 0.40); }
.step h3 { font-size: 17px; font-weight: 700; color: var(--blue-dark); margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--text-muted); }

/* ---------- Finances ---------- */
.finances { background: var(--blue-dark); color: #fff; position: relative; overflow: hidden; }
.finances::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 144, 217, 0.18), transparent 65%);
  top: -200px;
  right: -150px;
}
.finances-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
}
.finances-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #BFD4EE;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 15px;
  border-radius: 100px;
  margin-bottom: 22px;
}
.finances h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.finances-text > p {
  font-size: 16.5px;
  color: #BFD4EE;
  line-height: 1.7;
  margin-bottom: 30px;
}
.finances-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  perspective: 1000px;
}
.fin-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  transition: transform 0.3s ease, background 0.3s ease;
}
.fin-card:hover { background: rgba(255, 255, 255, 0.13); transform: translateY(-5px) rotateX(4deg); }
.fin-card svg { color: #7FA8D9; margin-bottom: 12px; }
.fin-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.fin-card p { font-size: 13px; color: #9DB8DC; line-height: 1.55; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1020px;
  margin: 0 auto;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.price-card.featured { border: 2px solid var(--blue); box-shadow: var(--shadow-md); }
.price-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 100px;
}
.price-name { font-size: 16px; font-weight: 700; color: var(--blue-dark); margin-bottom: 10px; }
.price-amount { font-size: 42px; font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.price-amount span { font-size: 16px; font-weight: 500; color: var(--text-faint); }
.price-desc { font-size: 14px; color: var(--text-muted); margin: 10px 0 26px; }
.price-list { list-style: none; text-align: left; margin-bottom: 30px; }
.price-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  padding: 7px 0;
}
.price-list svg { color: var(--green); flex-shrink: 0; margin-top: 3px; }
.price-card .btn { width: 100%; justify-content: center; }

/* ---------- CTA final ---------- */
.cta-final {
  text-align: center;
  padding: 92px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.cta-final h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--blue-dark);
  margin-bottom: 14px;
}
.cta-final p { font-size: 17px; color: var(--text-muted); margin-bottom: 32px; }

/* ---------- Footer ---------- */
.footer { background: var(--blue-deep); color: #9DB8DC; padding: 48px 0 32px; }
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.footer-tagline { font-size: 13.5px; max-width: 280px; margin-top: 8px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h5 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 14px;
}
.footer-col a { display: block; font-size: 14px; padding: 4px 0; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

/* ---------- Pages légales ---------- */
.legal-main { padding: 72px 0 80px; }
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content h1 { font-size: 32px; font-weight: 800; color: var(--blue-dark); margin-bottom: 8px; }
.legal-content .legal-date { font-size: 13px; color: var(--text-faint); margin-bottom: 48px; display: block; }
.legal-content h2 { font-size: 16px; font-weight: 700; color: var(--blue-dark); margin: 36px 0 10px; text-transform: uppercase; letter-spacing: .04em; }
.legal-content p, .legal-content li { font-size: 15px; line-height: 1.75; color: var(--text-muted); margin-bottom: 12px; }
.legal-content ul { padding-left: 20px; margin-bottom: 12px; }
.legal-content a { color: var(--blue); text-decoration: underline; }
.legal-content strong { color: var(--text); font-weight: 600; }
.legal-content .info-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin: 20px 0; }
.legal-content .info-box p { margin: 0; }

/* ---------- Reveal au scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .chip-1 { left: 8px; }
  .chip-2 { right: 8px; }
  .chip-3 { left: 16px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .finances-inner { grid-template-columns: 1fr; gap: 36px; }
  .app-side { display: none; }
  .hero { padding: 56px 0 32px; }
  .section { padding: 60px 0; }
  .chip { display: none; }
  .app-window { transform: none !important; }
}
@media (max-width: 520px) {
  .finances-cards { grid-template-columns: 1fr; }
  .nav-cta .btn-outline { display: none; }
  .app-tab { font-size: 11px; padding: 0 8px; }
  .app-topnav-right { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .app-window { transform: none !important; }
  .reveal { opacity: 1; transform: none; }
}
