/* =========================================================
   Erylo — pages publiques
   Page de vente, inscription, connexion, plan de la démo
   ========================================================= */
@import url('tokens.css');

/* L'attribut hidden l'emporte toujours (sinon .case { display: flex } le contredit) */
[hidden] { display: none !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--f-texte);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
}
img, svg, iframe { max-width: 100%; }
a { color: var(--doubs); text-underline-offset: 3px; }
a:hover { color: var(--doubs-2); }
:focus-visible { outline: 2px solid var(--doubs); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--f-titre); color: var(--encre); margin: 0; font-weight: 650; letter-spacing: -0.015em; }
h1 { font-size: clamp(40px, 5.4vw, 70px); line-height: 1.02; letter-spacing: -0.03em; }
h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.025em; }
h3 { font-size: 21px; line-height: 1.25; }
p { margin: 0 0 1em; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; color: var(--gris); max-width: 58ch; }

/* Montants à fixer plus tard */
.prix-provisoire {
  text-decoration: underline dotted var(--mirabelle);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 16px/1.2 var(--f-texte);
  padding: 14px 22px;
  border-radius: var(--r-pilule);
  border: 1.5px solid var(--doubs);
  background: var(--doubs);
  color: var(--doubs-ink);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--doubs-2); border-color: var(--doubs-2); color: var(--doubs-ink); }
.btn-sec { background: transparent; color: var(--doubs); }
.btn-sec:hover { background: var(--brume); color: var(--doubs); border-color: var(--doubs); }
.btn-jaune { background: var(--mirabelle); border-color: var(--mirabelle); color: var(--encre); }
.btn-jaune:hover { background: #F5CC66; border-color: #F5CC66; color: var(--encre); }
.btn-petit { padding: 9px 16px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-titre);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.03em;
  color: var(--encre);
  text-decoration: none;
}
.logo svg { width: 30px; height: 30px; flex: none; }

/* ---------- En-tête ---------- */
.site-head {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: rgba(250, 251, 248, .92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent;
}
.site-head.is-scrolled { border-bottom-color: var(--ligne); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.site-nav { display: flex; gap: 26px; margin-left: 28px; }
.site-nav a { color: var(--encre); text-decoration: none; font-weight: 500; font-size: 15.5px; }
.site-nav a:hover { color: var(--doubs); text-decoration: underline; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.head-actions .lien-connexion { color: var(--encre); font-weight: 500; font-size: 15.5px; text-decoration: none; }
.head-actions .lien-connexion:hover { text-decoration: underline; }
@media (max-width: 900px) { .site-nav { display: none; } }
.head-actions a { white-space: nowrap; }
@media (max-width: 420px) {
  .head-actions { gap: 12px; }
  .head-actions .btn { padding: 9px 14px; font-size: 14.5px; }
  .head-actions .lien-connexion { font-size: 14.5px; }
  .logo { font-size: 21px; }
}
/* Très petit écran : le bouton du hero suffit, on garde la connexion */
@media (max-width: 400px) {
  .head-actions .btn { display: none; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 116px); }
.section-tete { max-width: 680px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-tete p { color: var(--gris); font-size: 18px; margin-top: 14px; }

/* ---------- Formulaires (inscription, connexion) ---------- */
.champ { display: grid; gap: 6px; min-width: 0; }
.champ > label, .champ > .libelle { font-weight: 600; font-size: 15px; }
.champ .aide { font-size: 14px; color: var(--gris); margin: 0; }
.champ input[type="text"], .champ input[type="email"], .champ input[type="tel"], .champ input[type="password"], .champ input[type="url"], .champ input:not([type]), .champ select, .champ textarea {
  font: 400 16px/1.4 var(--f-texte);
  color: var(--encre);
  background: var(--blanc);
  border: 1.5px solid var(--ligne);
  border-radius: var(--r-ctrl);
  padding: 12px 14px;
  width: 100%;
  min-width: 0;
}
.champ textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--doubs); box-shadow: 0 0 0 3px rgba(20, 64, 59, .14); }
.champ input[aria-invalid="true"] { border-color: var(--danger); }
.erreur { color: var(--danger); font-size: 14px; margin: 0; }

.case { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; cursor: pointer; }
.case input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--doubs); flex: none; }
