/* Tribord — tribord-app.fr · charte issue de l'app (AppTheme.swift) */
:root {
  --paper: #F5F2E8;
  --paper-2: #EFEBDD;
  --surface: #FFFFFF;
  --ink-1: #0E1F2E;
  --ink-2: #2C3E4E;
  --ink-3: #5C6E7E;
  --ink-4: #8A9AA8;
  --navy: #1F4E79;
  --navy-deep: #163A5C;
  --navy-soft: #DBE6F0;
  --coral: #E07A4F;
  --coral-deep: #B45A33;
  --coral-soft: #F8DCCD;
  --line: #DBE1E6;
  --line-soft: #ECEEEF;
  --good: #2E8B57;
  --night: #0B0D12;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Rubik", -apple-system, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink-1);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 56px);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.nav .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav .brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav .brand span { font-weight: 700; font-size: 19px; letter-spacing: -0.3px; }
.nav .cta-mini {
  text-decoration: none; font-weight: 600; font-size: 14px; color: #fff;
  background: var(--coral-deep); padding: 9px 18px; border-radius: 999px;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.nav .cta-mini:hover { background: var(--coral); transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 9vh, 110px) clamp(20px, 6vw, 72px) clamp(60px, 10vh, 130px);
  max-width: 1220px; margin: 0 auto;
}
.chart-bg {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  pointer-events: none;
}
.chart-bg .grid-lines {
  position: absolute; inset: -40px;
  background-image:
    linear-gradient(to right, rgba(31, 78, 121, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 78, 121, 0.055) 1px, transparent 1px);
  background-size: 96px 96px;
}
.sounding {
  position: absolute; font-size: 13px; color: var(--ink-4); opacity: 0.5;
  font-variant-numeric: tabular-nums; user-select: none;
}
.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  line-height: 1.04; font-weight: 700; letter-spacing: -0.03em;
  color: var(--ink-1);
}
.hero h1 .accent { color: var(--coral-deep); }
.hero .sub {
  margin-top: 22px; font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  color: var(--ink-2); max-width: 34rem;
}
.hero .actions { margin-top: 34px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn-store {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink-1); color: #fff; text-decoration: none;
  padding: 13px 24px; border-radius: 14px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: 0 10px 28px rgba(14, 31, 46, 0.18);
}
.btn-store:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(14, 31, 46, 0.24); }
.btn-store svg { width: 26px; height: 26px; }
.btn-store .lines { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.btn-store .lines small { font-size: 11px; opacity: 0.75; font-weight: 400; }
.btn-store .lines strong { font-size: 17px; font-weight: 600; letter-spacing: 0.1px; }
.hero .note { font-size: 13.5px; color: var(--ink-3); }

/* Phone mockup */
.phone {
  position: relative;
  width: clamp(230px, 24vw, 300px);
  border-radius: clamp(34px, 4vw, 44px);
  background: var(--ink-1);
  padding: 10px;
  box-shadow: 0 34px 70px rgba(14, 31, 46, 0.28), 0 6px 18px rgba(14, 31, 46, 0.14);
}
.phone img { border-radius: clamp(26px, 3.2vw, 36px); }
.phone::after {
  content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 34%; height: 22px; background: var(--ink-1); border-radius: 999px;
}
.hero .phone { justify-self: center; rotate: 3deg; }

/* ---------- Route (fil conducteur) ---------- */
.route-wrap { position: relative; }
#routePath { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#routePath path {
  fill: none; stroke: var(--coral); stroke-width: 3.5;
  stroke-linecap: round; opacity: 0.85;
}
#routePath circle { fill: var(--coral); stroke: var(--paper); stroke-width: 3; }

/* Waypoints */
.waypoint {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 6vw, 90px);
  align-items: center;
  max-width: 1120px; margin: 0 auto;
  padding: clamp(56px, 10vh, 130px) clamp(20px, 6vw, 60px);
}
.waypoint:nth-of-type(even) .phone { order: -1; }
.waypoint .phone { justify-self: center; rotate: -2deg; }
.waypoint:nth-of-type(even) .phone { rotate: 2deg; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--coral-deep); margin-bottom: 14px;
}
.kicker .buoy { width: 14px; height: 14px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px var(--coral-soft); }
.waypoint h2, .night h2, .pricing h2, .faq h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.12;
}
.waypoint p.lead { margin-top: 16px; color: var(--ink-2); font-size: 1.05rem; max-width: 32rem; }
.checks { margin-top: 22px; list-style: none; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); font-size: 0.98rem; }
.checks li::before { content: "✓"; color: var(--good); font-weight: 700; }

/* Bandeau chiffres examen */
.examstrip {
  display: flex; gap: clamp(16px, 4vw, 46px); flex-wrap: wrap;
  margin-top: 26px; padding: 18px 22px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px;
}
.examstrip div { display: flex; flex-direction: column; }
.examstrip strong { font-size: 1.9rem; font-weight: 700; color: var(--navy); letter-spacing: -0.5px; }
.examstrip span { font-size: 12.5px; color: var(--ink-3); }

/* ---------- Section nuit ---------- */
.night {
  position: relative; z-index: 1;
  background: var(--night); color: #F2EFE6;
  padding: clamp(70px, 13vh, 150px) clamp(20px, 6vw, 60px);
  text-align: center;
}
.night h2 { color: #F7F4EA; }
.night .sub { color: rgba(242, 239, 230, 0.65); margin-top: 14px; font-size: 1.05rem; }
.lights { display: flex; flex-direction: column; align-items: center; gap: 30px; margin: 52px 0 34px; }
.light {
  width: 34px; height: 34px; border-radius: 50%;
  background: #23262d; transition: background 0.5s, box-shadow 0.7s;
}
.lights.on .light.r { background: #FF4242; box-shadow: 0 0 42px 16px rgba(255, 66, 66, 0.5); }
.lights.on .light.w { background: #FFFFFF; box-shadow: 0 0 42px 16px rgba(255, 255, 255, 0.42); }
.lights.on .light:nth-child(1) { transition-delay: 0.1s; }
.lights.on .light:nth-child(2) { transition-delay: 0.55s; }
.lights.on .light:nth-child(3) { transition-delay: 1s; }
.night .answer {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.7s var(--ease) 1.7s, transform 0.7s var(--ease) 1.7s;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 600; color: #F7F4EA;
}
.night .answer small { display: block; margin-top: 8px; font-size: 0.95rem; font-weight: 400; color: rgba(242, 239, 230, 0.6); }
.night.lit .answer { opacity: 1; transform: none; }

/* ---------- Pricing ---------- */
.pricing { max-width: 980px; margin: 0 auto; padding: clamp(64px, 11vh, 140px) clamp(20px, 6vw, 60px); position: relative; z-index: 1; }
.pricing .panel {
  margin-top: 36px; display: grid; grid-template-columns: 1fr 1.2fr;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(14, 31, 46, 0.08);
}
.pricing .col { padding: clamp(24px, 3.5vw, 44px); }
.pricing .col.premium { background: var(--navy-deep); color: #F2EFE6; }
.pricing h3 { font-size: 1.25rem; font-weight: 700; }
.pricing .col ul { list-style: none; margin-top: 18px; display: grid; gap: 9px; font-size: 0.96rem; }
.pricing .col.free ul li { color: var(--ink-2); }
.pricing .col.free ul li::before { content: "· "; color: var(--ink-4); }
.pricing .col.premium ul li { color: rgba(242, 239, 230, 0.88); }
.pricing .col.premium ul li::before { content: "✓ "; color: var(--coral); font-weight: 700; }
.pricing .price-row { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.pricing .price {
  border: 1px solid rgba(242, 239, 230, 0.28); border-radius: 14px; padding: 12px 18px;
}
.pricing .price strong { font-size: 1.35rem; font-weight: 700; }
.pricing .price span { display: block; font-size: 12px; color: rgba(242, 239, 230, 0.65); }
.pricing .fineprint { margin-top: 16px; font-size: 12px; color: rgba(242, 239, 230, 0.55); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; padding: 0 clamp(20px, 6vw, 60px) clamp(64px, 10vh, 120px); position: relative; z-index: 1; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 1.02rem; padding: 16px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--coral-deep); transition: rotate 0.3s var(--ease); }
.faq details[open] summary::after { rotate: 45deg; }
.faq .a { color: var(--ink-2); font-size: 0.97rem; padding: 0 0 18px; max-width: 62ch; }
.faq h2 { margin-bottom: 18px; }

/* ---------- CTA final + footer ---------- */
.final {
  text-align: center; padding: clamp(70px, 12vh, 150px) 20px;
  background: var(--paper-2); position: relative; z-index: 1;
}
.final h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.02em; }
.final p { color: var(--ink-2); margin: 14px auto 30px; max-width: 36rem; }
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 30px clamp(20px, 6vw, 56px);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--ink-3);
}
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--coral-deep); }

/* ---------- Pages légales ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: clamp(40px, 7vh, 80px) clamp(20px, 6vw, 60px) 90px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.legal .updated { color: var(--ink-3); font-size: 14px; margin-bottom: 36px; }
.legal h2 { font-size: 1.25rem; font-weight: 700; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--ink-2); font-size: 0.99rem; max-width: 68ch; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal li { margin-bottom: 6px; }

/* ---------- Reveals ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: left; padding-bottom: 40px; }
  .hero .phone { rotate: 0deg; margin-top: 12px; }
  .waypoint { grid-template-columns: 1fr; }
  .waypoint:nth-of-type(even) .phone { order: 0; }
  .waypoint .phone, .waypoint:nth-of-type(even) .phone { rotate: 0deg; }
  .pricing .panel { grid-template-columns: 1fr; }
  #routePath { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .night .answer { transition: none; }
  #routePath path { stroke-dashoffset: 0 !important; }
}
