/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-top:       #EAE0F2;
  --bg-mid:       #E2EAF5;
  --bg-bottom:    #E8EFF7;
  --surface:      #FFFFFF;
  --teal:         #2A9D8A;
  --teal-dark:    #227F6E;
  --teal-light:   #D8EDE9;
  --dark-card:    #1A2A28;
  --text-main:    #221E38;
  --text-soft:    #4A4370;
  --text-muted:   #7B759E;
  --tag-color:    #6E6890;
  --shadow-sm:    0 2px 12px rgba(44, 40, 64, 0.07);
  --shadow-md:    0 4px 24px rgba(44, 40, 64, 0.09);
  --radius-sm:    10px;
  --radius-md:    16px;
  --radius-lg:    20px;
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Inter', system-ui, sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  background: linear-gradient(160deg, var(--bg-top) 0%, #EDE6F5 20%, var(--bg-mid) 55%, var(--bg-bottom) 100%);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 110px; /* laisse la place pour la nav fixe */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ─── APP SHELL ────────────────────────────────────────────── */
.header,
.main,
.bottom-nav {
  width: 100%;
  max-width: 420px;
}

.header,
.main {
  position: relative;
  z-index: 1;
}

/* ─── HEADER ───────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  background: rgba(234, 224, 242, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--text-main);
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.hamburger {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-main);
  border-radius: 2px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2C2840;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── MAIN ─────────────────────────────────────────────────── */
.main {
  padding: 0 22px 130px;
  flex: 1 0 auto;
}

/* ─── HERO ─────────────────────────────────────────────────── */
.hero {
  padding: 28px 0 30px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(38px, 9vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  font-weight: 300;
  color: var(--text-soft);
  line-height: 1.55;
}

/* ─── FORM ─────────────────────────────────────────────────── */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.20em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.field-textarea {
  width: 100%;
  min-height: 112px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(168, 158, 210, 0.22);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 8px rgba(44, 40, 64, 0.06);
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  font-weight: 300;
  color: var(--text-main);
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.field-textarea::placeholder {
  color: #9B95B8;
}

.field-textarea:focus {
  border-color: rgba(42, 157, 138, 0.35);
  box-shadow: 0 0 0 3px rgba(42, 157, 138, 0.07), var(--shadow-sm);
  background: rgba(255, 255, 255, 0.88);
}

/* ─── MAIN BUTTON ──────────────────────────────────────────── */
.btn-main {
  width: 100%;
  padding: 18px 24px;
  margin-top: 6px;
  background: var(--teal);
  color: #fff;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.20em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow:
    0 4px 14px rgba(42, 157, 138, 0.28),
    0 1px 3px rgba(42, 157, 138, 0.15);
}

.btn-main:hover {
  background: var(--teal-dark);
  box-shadow: 0 6px 18px rgba(42, 157, 138, 0.34);
}

.btn-main:active {
  transform: scale(0.985);
}

.btn-main:focus {
  outline: none;
}

/* ─── LOADER ──────────────────────────────────────────────── */
.loader {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  min-height: 24px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  color: var(--text-soft);
  opacity: 1;
  transition: opacity 0.2s ease;
}

.hidden {
  display: none;
}

.loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(42, 157, 138, 0.35);
  animation: pulseLoader 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulseLoader {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(42, 157, 138, 0.35);
    opacity: 0.75;
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 10px rgba(42, 157, 138, 0);
    opacity: 1;
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(42, 157, 138, 0);
    opacity: 0.75;
  }
}

/* ─── RESULTS ──────────────────────────────────────────────── */
.results-section {
  margin-top: 44px;
  margin-bottom: 16px;
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.results-section.visible {
  display: block;
}

.results-section.animated {
  opacity: 1;
  transform: translateY(0);
}

.results-header {
  margin-bottom: 24px;
}

.results-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 7vw, 34px);
  font-weight: 400;
  color: var(--text-main);
  margin-bottom: 5px;
}

.results-subtitle {
  font-family: var(--font-serif);
  font-size: 14px;
  font-style: italic;
  font-weight: 300;
  color: var(--text-soft);
}

/* ─── CARDS ────────────────────────────────────────────────── */
.cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-white {
  background: #FFFFFF;
  box-shadow: var(--shadow-md);
}

.card-teal {
  background: var(--teal-light);
  box-shadow: var(--shadow-sm);
}

.card-dark {
  background: var(--dark-card);
  box-shadow: 0 8px 30px rgba(26, 42, 40, 0.25);
}

.card-body {
  padding: 22px 22px 14px;
}

/* Card icon */
.card-icon {
  font-size: 16px;
  color: var(--text-soft);
  margin-bottom: 14px;
  display: block;
  line-height: 1;
}

.card-icon-rose {
  color: #C4706A;
}

.card-icon-teal {
  color: var(--teal);
}

/* Card top row (card 3) */
.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-tag-top {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

/* Card serif title */
.card-title-serif {
  font-family: var(--font-serif);
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 12px;
}

/* Card body text */
.card-content {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-main);
}

/* Steps list */
.card-steps {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-main);
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-steps li::marker {
  color: var(--teal);
  font-weight: 500;
}

/* Card footer */
.card-footer {
  padding: 0 22px 18px;
}

.card-tag {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--tag-color);
}

/* Dark card */
.card-label-dark {
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.40);
  margin-bottom: 18px;
}

.card-anchor {
  font-family: var(--font-serif);
  font-size: 26px;
  font-style: italic;
  font-weight: 300;
  line-height: 1.45;
  color: #FFFFFF;
}

.card-footer-dark {
  padding: 16px 22px 22px;
}

.card-resources {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}

/* ─── MÉDITER BUTTON ───────────────────────────────────────── */
.btn-mediter {
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.80);
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.20em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-align: center;
}

.btn-mediter:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.40);
}

/* ─── BOTTOM NAV ───────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 0 calc(16px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(200, 195, 220, 0.30);
  z-index: 20;
}

.nav-item {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  color: #7B759E;
  transition: color 0.2s;
}

.nav-item span {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-item-active {
  color: var(--teal);
}

/* ─── MOBILE TUNING ────────────────────────────────────────── */
@media (max-width: 599px) {
  body {
    background-attachment: scroll;
  }

  .header {
    padding: 16px 18px 12px;
  }

  .main {
    padding: 0 16px 136px;
  }

  .hero {
    padding: 22px 0 24px;
  }

  .field-textarea {
    font-size: 16px; /* évite certains zooms mobiles */
  }
}

/* ─── DESKTOP: simulate phone frame ───────────────────────── */
@media (min-width: 600px) {
  body {
    background: #C9C2DC;
    padding-bottom: 40px;
  }

  .header,
  .main {
    max-width: 390px;
  }

  .bottom-nav {
    max-width: 390px;
    border-radius: 0 0 32px 32px;
    border-left: 1px solid rgba(200, 195, 220, 0.30);
    border-right: 1px solid rgba(200, 195, 220, 0.30);
  }

  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 390px;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(160deg, var(--bg-top) 0%, #EDE6F5 20%, var(--bg-mid) 55%, var(--bg-bottom) 100%);
    z-index: -1;
    border-radius: 0;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.18);
  }
}