:root {
  --cream: #faf7f2;
  --cream-deep: #f1e8db;
  --paper: #fffdf9;
  --white: #ffffff;
  --ink: #1a1512;
  --ink-soft: #4a4239;
  --muted: #81766c;
  --green: #0f4a35;
  --green-light: #3e8e5a;
  --green-soft: #e8f3ea;
  --orange: #e07b39;
  --orange-dark: #c5662b;
  --orange-soft: #fff0e6;
  --line: #eadfd2;
  --shadow: 0 18px 50px rgba(26, 21, 18, 0.12);
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--green);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(224, 123, 57, 0.33), transparent 26rem),
    radial-gradient(circle at 88% 86%, rgba(255, 255, 255, 0.08), transparent 28rem),
    var(--green);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

img,
svg {
  display: block;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  position: relative;
  width: min(100%, 460px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.28);
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 20px 12px;
  border-bottom: 1px solid rgba(234, 223, 210, 0.82);
  background: rgba(250, 247, 242, 0.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: box-shadow 180ms ease;
}

.topbar.is-scrolled {
  box-shadow: 0 9px 24px rgba(26, 21, 18, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.75px;
  text-decoration: none;
}

.brand > span > span {
  color: var(--orange);
}

.brand-paw {
  width: 22px;
  height: 22px;
  margin-right: 7px;
  fill: var(--green);
}

.step-pill {
  padding: 7px 11px;
  border: 1px solid rgba(15, 74, 53, 0.1);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.025em;
}

.page-content {
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}

.intro {
  padding: 42px 28px 34px;
  text-align: center;
}

.intro-mark {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  place-items: center;
  border-radius: 22px;
  background: var(--orange);
  box-shadow: 0 12px 30px rgba(224, 123, 57, 0.28);
  transform: rotate(-3deg);
}

.intro-mark svg {
  width: 29px;
  height: 29px;
  fill: var(--white);
  transform: rotate(3deg);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 360px;
  margin: 0 auto;
  color: var(--green);
  font-size: clamp(30px, 9vw, 40px);
  font-weight: 900;
  letter-spacing: -1.55px;
  line-height: 1.04;
}

.intro-copy {
  max-width: 350px;
  margin: 16px auto 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

.intro-copy strong {
  color: var(--green);
  font-weight: 800;
}

.timeline-section {
  position: relative;
  padding: 0 18px 16px;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 22px;
  padding-left: 44px;
}

.timeline-list::before {
  position: absolute;
  top: 22px;
  bottom: 8px;
  left: 17px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--orange), #efb185 50%, var(--green-light));
  content: "";
}

.course-card {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(234, 223, 210, 0.88);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 12px 35px rgba(26, 21, 18, 0.085);
}

.timeline-node {
  position: absolute;
  z-index: 3;
  top: 28px;
  left: -43px;
  width: 22px;
  height: 22px;
  border: 5px solid var(--cream);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 2px rgba(224, 123, 57, 0.2);
}

.course-card:nth-child(2) .timeline-node {
  background: #d98443;
}

.course-card:nth-child(3) .timeline-node {
  background: var(--green-light);
  box-shadow: 0 0 0 2px rgba(62, 142, 90, 0.22);
}

.course-visual {
  position: relative;
  height: 148px;
  overflow: hidden;
  border-radius: 25px 25px 16px 16px;
  background: var(--green);
}

.course-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 500ms cubic-bezier(.2, .7, .2, 1);
}

.course-card:hover .course-visual img {
  transform: scale(1.035);
}

.image-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(9, 42, 31, 0.72) 100%);
}

.visual-label {
  position: absolute;
  bottom: 13px;
  left: 15px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.005em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.bookmark-button {
  display: grid;
  width: 42px;
  height: 42px;
  cursor: pointer;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 14px;
  background: rgba(15, 74, 53, 0.58);
  color: #fff;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.course-visual .bookmark-button {
  position: absolute;
  top: 12px;
  right: 12px;
}

.bookmark-button:hover {
  transform: translateY(-2px);
}

.bookmark-button:active {
  transform: scale(0.93);
}

.bookmark-button:focus-visible,
.continue-button:focus-visible,
.brand:focus-visible {
  outline: 3px solid rgba(224, 123, 57, 0.55);
  outline-offset: 3px;
}

.bookmark-button svg {
  width: 22px;
  height: 22px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.65;
  transition: fill 160ms ease;
}

.bookmark-button.is-selected {
  border-color: var(--orange);
  background: var(--orange);
  box-shadow: 0 8px 18px rgba(224, 123, 57, 0.3);
}

.bookmark-button.is-selected svg {
  fill: currentColor;
}

.course-body {
  padding: 20px 19px 22px;
}

.course-timing {
  margin: 0 0 4px;
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 900;
}

.course-body h2 {
  margin: 0 0 13px;
  color: var(--green);
  font-size: clamp(24px, 7vw, 29px);
  font-weight: 900;
  letter-spacing: -0.85px;
  line-height: 1.05;
}

.course-body ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.course-body li {
  position: relative;
  padding-left: 25px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.34;
}

.course-body li::before {
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-light);
  content: "✓";
  font-size: 11px;
  font-weight: 900;
}

.later-section {
  position: relative;
  margin-top: 38px;
  padding: 48px 18px 34px;
  border-radius: 40px 40px 0 0;
  background: var(--white);
  box-shadow: 0 -16px 45px rgba(26, 21, 18, 0.055);
}

.later-section::before,
.later-section::after {
  position: absolute;
  top: -19px;
  width: 58%;
  height: 42px;
  background: var(--white);
  content: "";
}

.later-section::before {
  left: -12px;
  border-radius: 70% 45% 0 0;
  transform: rotate(2deg);
}

.later-section::after {
  right: -12px;
  border-radius: 45% 70% 0 0;
  transform: rotate(-2deg);
}

.later-heading {
  position: relative;
  z-index: 1;
  padding: 0 10px 25px;
  text-align: center;
}

.mini-paw {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 14px;
  background: var(--green-soft);
}

.mini-paw svg {
  width: 23px;
  height: 23px;
  fill: var(--green-light);
}

.later-heading h2 {
  margin: 0;
  color: var(--green);
  font-size: clamp(28px, 8vw, 35px);
  font-weight: 900;
  letter-spacing: -1.1px;
  line-height: 1.05;
}

.later-heading > p:last-child {
  max-width: 350px;
  margin: 13px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.later-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.later-card {
  position: relative;
  display: grid;
  min-height: 119px;
  grid-template-columns: 112px 1fr 40px;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  padding: 0 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(26, 21, 18, 0.055);
}

.later-card > img {
  width: 112px;
  height: 100%;
  min-height: 119px;
  object-fit: cover;
}

.later-card:nth-child(2n) > img {
  object-position: 58% center;
}

.later-copy {
  min-width: 0;
  padding: 15px 0;
}

.later-copy h3 {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.35px;
  line-height: 1.08;
}

.later-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.32;
}

.bookmark-button.compact {
  position: relative;
  width: 38px;
  height: 42px;
  border-color: rgba(15, 74, 53, 0.18);
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  backdrop-filter: none;
}

.bookmark-button.compact svg {
  width: 21px;
  height: 21px;
}

.bookmark-button.compact .plus {
  position: absolute;
  top: 5px;
  left: 50%;
  color: currentColor;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  transform: translateX(-50%);
  transition: opacity 160ms ease;
}

.bookmark-button.compact.is-selected {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.bookmark-button.compact.is-selected .plus {
  opacity: 0;
}

.bottom-bar {
  position: fixed;
  z-index: 60;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(234, 223, 210, 0.88);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -12px 35px rgba(26, 21, 18, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.bottom-bar.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(110%);
}

.continue-button {
  display: grid;
  width: 100%;
  min-height: 58px;
  cursor: pointer;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 9px;
  padding: 0 20px 0 22px;
  border-radius: 19px;
  background: var(--orange);
  box-shadow: 0 12px 28px rgba(224, 123, 57, 0.3);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  text-align: left;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.continue-button:hover {
  background: var(--orange-dark);
  box-shadow: 0 15px 34px rgba(197, 102, 43, 0.34);
  transform: translateY(-1px);
}

.continue-button:active {
  transform: scale(0.985);
}

.button-count {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 700;
}

.button-arrow {
  font-size: 23px;
  font-weight: 500;
  line-height: 1;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  left: 18px;
  display: flex;
  width: min(calc(100% - 36px), 410px);
  min-height: 72px;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: var(--green);
  box-shadow: 0 18px 45px rgba(15, 74, 53, 0.34);
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast strong {
  font-size: 15px;
}

.toast-paw {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.toast-paw svg {
  width: 23px;
  height: 23px;
  fill: #fff;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms cubic-bezier(.2, .7, .2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 370px) {
  .intro {
    padding-right: 20px;
    padding-left: 20px;
  }

  .timeline-section {
    padding-right: 12px;
    padding-left: 12px;
  }

  .timeline-list {
    padding-left: 38px;
  }

  .timeline-list::before {
    left: 14px;
  }

  .timeline-node {
    left: -38px;
  }

  .later-section {
    padding-right: 12px;
    padding-left: 12px;
  }

  .later-card {
    grid-template-columns: 92px 1fr 36px;
    gap: 10px;
  }

  .later-card > img {
    width: 92px;
  }
}

@media (min-width: 700px) {
  body::before {
    position: fixed;
    top: 50%;
    left: max(26px, calc(50% - 420px));
    max-width: 230px;
    color: rgba(255, 255, 255, 0.92);
    content: "Mieux le comprendre. Jour après jour.";
    font-size: clamp(30px, 4vw, 52px);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 0.98;
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
