/* =========================================================
   Titoutou Salon — landing
   Mobile-first. Thème clair par défaut, sombre via prefers-color-scheme.
   ========================================================= */

:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #eaeef4;
  --text: #0f172a;
  --text-muted: #5a6473;
  --border: rgba(15, 23, 42, 0.1);
  --accent: #2563eb;
  --accent-press: #1d4ed8;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --violet-1: #6366f1;
  --violet-2: #8b5cf6;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --blue-soft: #dbeafe;
  --phone-bezel: #0c1626;
  --shadow: 0 32px 70px -30px rgba(15, 23, 42, 0.45);
  --shadow-sm: 0 8px 24px -12px rgba(15, 23, 42, 0.28);
  --radius-card: 22px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #141d30;
    --surface-2: #0f1830;
    --text: #f1f5f9;
    --text-muted: #9aa6b8;
    --border: rgba(255, 255, 255, 0.1);
    --accent: #3b82f6;
    --accent-press: #2563eb;
    --green: #22c55e;
    --green-soft: rgba(34, 197, 94, 0.16);
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.16);
    --blue-soft: rgba(59, 130, 246, 0.18);
    --phone-bezel: #05080f;
    --shadow: 0 32px 70px -32px rgba(0, 0, 0, 0.75);
    --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Apple Color Emoji", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2 {
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 0.5rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.15rem, 7vw, 3.7rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.55rem, 4.4vw, 2.45rem);
  line-height: 1.12;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
}

/* ---------- conteneurs ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.narrow {
  max-width: 720px;
}

.center {
  text-align: center;
}

.center .cta-row,
.center .shift-pills {
  justify-content: center;
}

main > section {
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}

.eyebrow,
.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.eyebrow {
  background: var(--blue-soft);
  color: var(--accent);
}

.tag-blue {
  background: var(--blue-soft);
  color: var(--accent);
}
.tag-green {
  background: var(--green-soft);
  color: var(--green);
}
.tag-violet {
  background: color-mix(in srgb, var(--violet-2) 18%, transparent);
  color: var(--violet-2);
}
.tag-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.accroche {
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  font-weight: 650;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.lede,
.body-lg {
  color: var(--text-muted);
  font-size: clamp(1.04rem, 2.2vw, 1.18rem);
  line-height: 1.72;
  max-width: 54ch;
}

.lede {
  margin-bottom: 0.85rem;
}

.body-lg {
  margin-bottom: 1rem;
}

/* Sections centrées : centrer aussi la colonne de texte (max-width) */
.center .lede,
.center .body-lg {
  margin-left: auto;
  margin-right: auto;
}

/* Mots-clés mis en avant dans le corps de texte (ressortent sur le gris) */
.lede strong,
.body-lg strong {
  color: var(--text);
  font-weight: 700;
}

/* ---------- boutons ---------- */
.btn {
  --pad-y: 0.85em;
  --pad-x: 1.45em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 75%, transparent);
}
.btn-primary:hover {
  background: var(--accent-press);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface);
  transform: translateY(-1px);
}

.btn-sm {
  --pad-y: 0.6em;
  --pad-x: 1.05em;
  font-size: 0.92rem;
}
.btn-lg {
  --pad-y: 1em;
  --pad-x: 1.9em;
  font-size: 1.08rem;
}
.btn-block {
  width: 100%;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.3rem;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem max(22px, env(safe-area-inset-left));
  padding-top: max(0.7rem, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(150deg, var(--violet-1), var(--violet-2));
}

.brand-name {
  font-size: 1.06rem;
}

.header-cta {
  flex-shrink: 0;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  padding-top: clamp(2.5rem, 6vw, 4.5rem) !important;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.hero-copy {
  max-width: 620px;
}

.hero-trust {
  margin-top: 1.25rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.hero-trust::before {
  content: "● ";
  color: var(--green);
  font-size: 0.7em;
  vertical-align: 1px;
}

.hero-shot {
  display: flex;
  justify-content: center;
}

/* ---------- cadre iPhone ---------- */
.phone {
  background: var(--phone-bezel);
  padding: 9px;
  border-radius: 46px;
  box-shadow: var(--shadow);
  width: min(80vw, 310px);
  flex-shrink: 0;
}
.phone img {
  width: 100%;
  height: auto;
  border-radius: 38px;
  display: block;
}

.phone-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 1290 / 2120;
  background: var(--surface);
  border: 1px solid var(--border);
}
.placeholder-inner {
  display: grid;
  place-items: center;
  gap: 0.6rem;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 38px;
  border: 2px dashed color-mix(in srgb, var(--text) 22%, transparent);
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem;
}
.placeholder-inner p {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}
.placeholder-inner span {
  font-weight: 500;
  opacity: 0.7;
}

/* ---------- douleur ---------- */
.pain {
  background: var(--surface-2);
}
.pain h2 {
  line-height: 1.12;
}

/* ---------- bascule ---------- */
.shift-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.6rem;
  font-weight: 700;
}
.pill {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 1rem;
}
.pill-a {
  background: var(--green-soft);
  color: var(--green);
}
.pill-b {
  background: var(--blue-soft);
  color: var(--accent);
}
.pill-arrow {
  color: var(--text-muted);
  font-size: 1.3rem;
}

/* ---------- features (piliers) ---------- */
.feature.alt {
  background: var(--surface-2);
}

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.feature-copy {
  max-width: 560px;
}
.feature-shot {
  display: flex;
  justify-content: center;
}
.caption-note {
  margin-top: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- réassurance ---------- */
.badges {
  list-style: none;
  margin: 2.2rem auto 0;
  padding: 0 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.4rem;
  max-width: 760px;
}
.badges li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.96rem;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.founder {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  max-width: 680px;
  margin: 2.8rem auto 0;
  padding: 1.4rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}
.founder-avatar {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
  background: linear-gradient(150deg, var(--violet-1), var(--violet-2));
}
.founder figcaption {
  min-width: 0;
}
.founder-quote {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  line-height: 1.5;
}
.founder-name {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- comment ça se passe ---------- */
.how-head {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.2rem;
}
.steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.steps p {
  margin: 0;
  font-weight: 600;
  font-size: 1.04rem;
}
.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
}

/* ---------- bêta ---------- */
.beta {
  background: linear-gradient(
    180deg,
    var(--surface-2),
    color-mix(in srgb, var(--green) 8%, var(--bg))
  );
}
.beta-flag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green);
  background: var(--green-soft);
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.beta-form {
  margin-top: 1.8rem;
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}
.field {
  margin-bottom: 1rem;
}
.field label {
  display: block;
  font-weight: 650;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
}
.field input,
.field select {
  width: 100%;
  font: inherit;
  font-size: 16px; /* évite le zoom auto iOS */
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235a6473' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
}
.form-fineprint {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}
.form-status {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  min-height: 1.2em;
}
.form-status.ok {
  color: var(--green);
}
.form-status.err {
  color: #dc2626;
}
.data-trust {
  margin: 1.4rem auto 0;
  max-width: 52ch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.data-trust-icon {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  color: var(--green);
}

/* ---------- CTA final ---------- */
.final-cta {
  background: var(--surface-2);
}
.final-cta .btn {
  margin-top: 0.5rem;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.6rem;
  padding-bottom: max(1.6rem, calc(env(safe-area-inset-bottom) + 1rem));
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  justify-content: space-between;
}
.footer-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-copy {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.4rem;
}
.footer-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}
.footer-link:hover {
  color: var(--accent);
}

/* ---------- sticky CTA (mobile) ---------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 0.7rem 16px;
  padding-bottom: max(0.7rem, calc(env(safe-area-inset-bottom) + 0.4rem));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--border);
  transform: translateY(130%);
  transition: transform 0.3s ease;
}
.sticky-cta.visible {
  transform: translateY(0);
}

/* ---------- reveal au scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* =========================================================
   Desktop / tablette
   ========================================================= */
@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .steps li {
    flex-direction: column;
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
  }
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split.reverse .feature-copy {
    order: 2;
  }
  .phone {
    width: min(38vw, 340px);
  }
}

/* la barre collante n'apparaît que sur mobile */
@media (min-width: 860px) {
  .sticky-cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn {
    transition: none;
  }
}

/* ─── Pull-to-refresh (tirer vers le bas pour rafraîchir) ─── */
html,
body {
  overscroll-behavior-y: contain;
}
.ptr-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-top: env(safe-area-inset-top, 0px);
  transform: translateX(-50%) translateY(-50px);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.32s ease;
}
.ptr-spinner {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--violet-2) 22%, transparent);
  border-top-color: var(--violet-2);
  will-change: transform;
}
.ptr-indicator[data-refreshing='true'] .ptr-spinner {
  animation: ptr-spin 0.7s linear infinite;
}
@keyframes ptr-spin {
  to {
    transform: rotate(360deg);
  }
}
