/*
 * Site de présentation de Présence douce. Couleurs de la charte de l'app
 * (apps/mobile/src/theme/tokens.ts), mêmes contrastes vérifiés (WCAG 2.2 AA) :
 * turquoise jamais pour du texte sur fond clair, jaune doré seulement avec du bleu nuit.
 */
:root {
  --deep-blue: #083b73;
  --petrol: #087f9c;
  --turquoise: #35c4c5;
  --gold: #ffd54f;

  --ink: #0b2545;
  --muted: #4a6378;
  --bg: #f1f8f9;
  --surface: #ffffff;
  --line: #cfe3e8;
  --primary: var(--deep-blue);
  --on-primary: #ffffff;
  --primary-soft: #e2f4f5;
  --link: #0a6e87;
  --band: #e2f4f5;

  --radius: 20px;
  --radius-small: 12px;
  --shadow: 0 10px 30px rgba(11, 37, 69, 0.08);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eaf2f8;
    --muted: #a9bed0;
    --bg: #071d36;
    --surface: #0d2c4f;
    --line: #24476d;
    --primary: var(--turquoise);
    --on-primary: #06213f;
    --primary-soft: #123a5e;
    --link: #5fd3d4;
    --band: #0a2645;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--petrol);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}

.narrow {
  width: min(760px, 100% - 32px);
}

.center {
  text-align: center;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 16px;
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 0.5em;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
}

.small {
  font-size: 0.92rem;
  color: var(--muted);
}

.note {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 1.4em;
}

/* Boutons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  background: var(--primary);
  color: var(--on-primary);
  border: 2px solid var(--primary);
  transition: transform 0.15s ease;
}

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

.button-ghost {
  background: transparent;
  color: var(--primary);
}

.button-small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.95rem;
}

.button-large {
  min-height: 56px;
  padding: 0 32px;
  font-size: 1.1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.6em;
}

/* En-tête */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  border-radius: 10px;
}

.topbar nav {
  margin-left: auto;
}

.nav {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.nav a:hover {
  color: var(--link);
}

@media (max-width: 820px) {
  .topbar nav {
    display: none;
  }

  .topbar .button {
    margin-left: auto;
  }
}

/* Accueil */
.hero {
  padding: 64px 0 40px;
  background:
    radial-gradient(
      60% 70% at 85% 30%,
      color-mix(in srgb, var(--turquoise) 22%, transparent),
      transparent 70%
    ),
    var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 920px) {
  .hero {
    padding-top: 40px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }
}

/* Sections */
section {
  padding: 72px 0;
}

.audiences {
  background: var(--surface);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
}

@media (max-width: 820px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--primary-soft);
  font-size: 1.6rem;
  margin-bottom: 14px;
}

/* Photos des personas (personnes fictives, images générées) */
.photo {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.band-photo {
  margin-top: 32px;
  aspect-ratio: 2 / 1;
}

.pilot-photo {
  margin-top: 24px;
  max-width: 520px;
}

.overview {
  margin: 32px auto 0;
  max-width: 900px;
  width: 100%;
}

/* Fonctionnalités */
.feature {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
  margin-top: 64px;
}

.feature-reverse .feature-text {
  order: 2;
}

.feature h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
}

.feature img {
  justify-self: center;
}

.feature img.phone {
  max-width: 300px;
}

@media (max-width: 820px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 48px;
  }

  .feature-reverse .feature-text {
    order: 0;
  }

  .feature img.phone {
    max-width: 260px;
  }
}

/* Confiance */
.trust {
  background: var(--band);
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

@media (max-width: 820px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

.trust-col {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}

.checklist li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--primary);
  color: var(--on-primary);
}

.checklist-no li::before {
  content: '✕';
  background: var(--primary-soft);
  color: var(--primary);
}

/* Étapes */
.step-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 32px 0 0;
}

@media (max-width: 820px) {
  .step-list {
    grid-template-columns: 1fr;
  }
}

.step-list li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.step-list li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: #0b2545;
  font-weight: 800;
  margin-bottom: 14px;
}

.step-list p {
  margin: 0;
  color: var(--muted);
}

/* Pilote */
.pilot {
  background: var(--deep-blue);
  color: #ffffff;
}

.pilot h2 {
  color: #ffffff;
}

.pilot .lead {
  color: #d7e7f3;
}

.pilot-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 820px) {
  .pilot-inner {
    grid-template-columns: 1fr;
  }
}

.pilot-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.pilot .button {
  background: var(--gold);
  border-color: var(--gold);
  color: #0b2545;
}

.pilot .small {
  color: #d7e7f3;
  margin: 16px 0 0;
}

.pilot :focus-visible {
  outline-color: var(--gold);
}

/* Questions */
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  padding: 0 22px;
  margin-top: 12px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 18px 0;
  list-style-position: outside;
}

.faq details p {
  color: var(--muted);
}

/* Pied de page */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.brand-footer {
  font-size: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--ink);
}

.footer-note {
  width: 100%;
  margin: 0;
}

/* Pages de texte (mentions légales) */
.page {
  padding: 56px 0 72px;
}

.page h2 {
  font-size: 1.35rem;
  margin-top: 1.6em;
}

.page .placeholder {
  background: var(--primary-soft);
  border-radius: 6px;
  padding: 0 4px;
}

/* Page « Installer » : étapes numérotées */
.install-cta {
  margin: 28px 0 8px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.install-cta .small {
  margin: 14px 0 0;
}

.toc {
  margin: 28px 0 8px;
}

.toc ol {
  margin: 0;
  padding-left: 1.4em;
}

.toc li {
  margin: 4px 0;
}

.howto {
  padding: 8px 0 0;
}

.howto h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.howto-num {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: #0b2545;
  font-size: 1rem;
  font-weight: 800;
}

.howto ol,
.howto ul {
  padding-left: 1.4em;
}

.howto li {
  margin: 6px 0;
}

/* Page des plaquettes (lien direct seulement) */
.brochures {
  list-style: none;
  padding: 0;
  margin: 32px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.brochure {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  align-items: start;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brochure img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.brochure h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.brochure-wide {
  grid-column: 1 / -1;
  grid-template-columns: 300px 1fr;
}

@media (max-width: 820px) {
  .brochures {
    grid-template-columns: 1fr;
  }

  .brochure,
  .brochure-wide {
    grid-template-columns: 1fr;
  }

  .brochure img {
    max-width: 280px;
  }
}

/* Page « introuvable » (404) */
.not-found {
  padding: 32px 0 48px;
}

.not-found-links {
  list-style: none;
  padding: 0;
  margin: 28px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.not-found-more {
  padding-left: 1.2em;
  display: grid;
  gap: 8px;
  color: var(--muted);
}
