/* Helpify.Tech — feuille de style partagée
   Polices système uniquement : rien n'est chargé depuis un serveur tiers. */

:root {
  --ink: #12263a;
  --ink-soft: #46586a;
  --blue: #1f5fae;
  --blue-dark: #174a8a;
  --sun: #ffc83d;
  --sun-dark: #f0b21a;
  --mist: #eef4f8;
  --white: #ffffff;
  --line: #d5e0e8;
  --bubble-out: #ddf3e4;
  --error: #b3261e;
  --radius: 14px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

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

html {
  font-size: 112.5%; /* 18 px : confortable pour un public senior */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
}

/* Bascule de langue : un seul des deux textes est visible */
html[lang="fr"] [data-l="en"],
html[lang="en"] [data-l="fr"] { display: none !important; }

img, svg { max-width: 100%; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }

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

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--white); padding: .6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* ---------- En-tête ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 1.1rem;
}
.logo { display: inline-block; line-height: 0; }
.logo img { height: 42px; width: auto; display: block; }

.lang {
  display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden;
}
.lang button {
  font: inherit; font-weight: 700; font-size: .85rem;
  background: transparent; color: var(--ink);
  border: 0; padding: .45rem .9rem; min-height: 40px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 800; font-size: 1.05rem;
  background: var(--sun); color: var(--ink);
  padding: .95rem 1.7rem; min-height: 54px;
  border: 0; border-radius: 999px; text-decoration: none; cursor: pointer;
  box-shadow: 0 3px 0 var(--sun-dark);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { color: var(--ink); transform: translateY(1px); box-shadow: 0 2px 0 var(--sun-dark); }
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ---------- Hero ---------- */
.hero { padding-block: 1.5rem 4rem; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .75rem; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }

.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 36rem; margin: 0 0 1.75rem; }
.hero .btn { margin-bottom: .6rem; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.hero-note { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* Maquette de conversation WhatsApp (illustration décorative) */
.phone {
  width: min(100%, 360px); margin-inline: auto;
  background: var(--white); border: 3px solid var(--ink); border-radius: 30px;
  overflow: hidden; box-shadow: 8px 8px 0 var(--ink);
}
.phone-top {
  display: flex; align-items: center; gap: .7rem;
  background: var(--ink); color: var(--white); padding: .8rem 1rem;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--sun); color: var(--ink);
  display: grid; place-items: center; font-weight: 800; font-family: var(--font-head);
}
.phone-top strong { display: block; line-height: 1.1; }
.phone-top small { opacity: .8; font-size: .75rem; }
.chat { background: #e4ecf1; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; min-height: 330px; }
.msg {
  max-width: 85%; padding: .6rem .85rem; border-radius: 16px;
  font-size: .95rem; line-height: 1.4; opacity: 0;
  animation: pop .45s ease forwards;
}
.msg.in { align-self: flex-start; background: var(--white); border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--bubble-out); border-bottom-right-radius: 4px; }
.msg:nth-child(1) { animation-delay: .4s; }
.msg:nth-child(2) { animation-delay: 1.5s; }
.msg:nth-child(3) { animation-delay: 2.6s; }
.msg:nth-child(4) { animation-delay: 3.7s; }
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */
section { padding-block: 3.5rem; }
.band { background: var(--mist); }
.intro { max-width: 38rem; color: var(--ink-soft); margin: 0 0 2rem; }

/* Les questions du quotidien : un pictogramme et la phrase, écrite comme un vrai message */
.asks {
  display: grid; gap: 2rem 1.5rem; padding: 0; margin: 0 0 1.5rem; list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.asks li { display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; }
.asks img { width: 104px; height: 104px; }
.asks .q {
  margin: 0; background: var(--white); border: 2px solid var(--line);
  border-radius: 18px 18px 18px 4px; padding: .7rem 1.1rem; font-size: 1.05rem;
}
.asks-note { color: var(--ink-soft); margin: 0; }

/* Texte d'un côté, illustration de l'autre */
.split { display: grid; gap: 2rem; align-items: center; }
.scene { width: 100%; max-width: 460px; height: auto; justify-self: center; }

/* Étapes : c'est une vraie séquence, donc numérotée */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.75rem; counter-reset: s; }
.steps li { position: relative; padding-left: 4rem; counter-increment: s; }
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 0;
  width: 2.8rem; height: 2.8rem; border-radius: 50%;
  background: var(--blue); color: var(--white);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.3rem;
}
.steps p { margin: 0; color: var(--ink-soft); max-width: 34rem; }


/* Bandeau d'appel final */
.cta { background: var(--sun); text-align: center; }
.cta p { max-width: 34rem; margin: 0 auto 1.5rem; font-size: 1.1rem; }
.cta .btn { background: var(--ink); color: var(--white); box-shadow: 0 3px 0 #000; }
.cta .btn:hover { color: var(--white); }

/* ---------- Pied de page ---------- */
.site-footer { padding-block: 2rem; font-size: .9rem; color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ---------- Page de préinscription ---------- */
.form-page { padding-block: 1rem 4rem; }
.form-card { max-width: 560px; margin-inline: auto; }
.form-card .lead { margin-bottom: 1.5rem; }

.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"] {
  width: 100%; font: inherit; color: var(--ink);
  min-height: 56px; padding: .6rem .9rem;
  background: var(--white); border: 2px solid var(--ink-soft); border-radius: 12px;
}
.field input:focus { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.row { display: grid; gap: 0 1rem; }

.err { color: var(--error); font-size: .9rem; font-weight: 600; margin: .35rem 0 0; min-height: 0; }

.contact-note {
  background: var(--mist); border-left: 5px solid var(--blue);
  padding: .8rem 1rem; border-radius: 0 10px 10px 0; margin: 0 0 1.5rem;
}

.consent { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1.5rem; }
.consent input { width: 26px; height: 26px; flex: none; margin-top: .15rem; accent-color: var(--blue); }
.consent label { font-size: .92rem; color: var(--ink-soft); }

/* Champ piège anti-robots : invisible pour les humains */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error { color: var(--error); font-weight: 700; margin: 1rem 0 0; }

.thanks { display: none; text-align: center; padding-block: 2rem; }
.thanks.show { display: block; }
.thanks .tick {
  width: 72px; height: 72px; border-radius: 50%; background: var(--sun);
  display: grid; place-items: center; margin: 0 auto 1.2rem; font-size: 2.2rem;
}
.thanks p { color: var(--ink-soft); }

/* ---------- Page mentions légales / confidentialité ---------- */
.legal { max-width: 46rem; padding-block: 1rem 4rem; }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
.legal h2 { font-size: 1.45rem; margin-top: 2.5rem; }
.legal h3 { font-size: 1.1rem; margin: 1.5rem 0 .3rem; }
.legal p, .legal li { max-width: 40rem; }
.legal ul { padding-left: 1.2rem; }
.updated { color: var(--ink-soft); font-size: .9rem; margin: 0 0 1rem; }
/* Informations à compléter par l'éditeur avant la mise en ligne */
mark.todo { background: var(--sun); color: var(--ink); padding: 0 .3em; border-radius: 4px; font-weight: 700; }

/* ---------- Grands écrans ---------- */
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 3.5rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .steps li { padding-left: 0; padding-top: 3.8rem; }
}
@media (min-width: 520px) {
  .row { grid-template-columns: 1fr 1fr; }
}

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

/* Slogan */
.slogan { background: var(--ink); padding-block: 3rem; text-align: center; }
.slogan p { margin: 0 auto; max-width: 30ch; font-family: var(--font-head); font-weight: 800; font-size: clamp(1.5rem, 4.5vw, 2.3rem); line-height: 1.25; letter-spacing: -0.02em; color: var(--white); text-wrap: balance; }
.slogan p::before { content: ""; display: block; width: 64px; height: 6px; margin: 0 auto 1.2rem; border-radius: 3px; background: var(--sun); }
