/* =============================================================================
 * Accueil public « / » — écran P01, identité v4 « Surligneur ».
 * Couleurs : tokens.css uniquement. L'image de marque du héros est la démo
 * de bandes de factures (bloc DÉMO) animée en CSS pur, propre à cet écran.
 * ============================================================================= */

body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); }

/* Le layout ajoute un .app-footer générique : la landing a le sien. */
.app-footer { display: none; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 60;
  padding: 10px 16px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-3);
  text-decoration: none; font-weight: 600; font-size: 13px;
  transition: top 120ms ease;
}
.skip-link:focus-visible { top: 12px; outline: none; box-shadow: var(--focus-ring); }

/* ---- Barre de navigation publique ---------------------------------------- */
.lp-topnav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklch, var(--surface) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.lp-topnav__inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  min-height: 64px; display: flex; align-items: center; gap: 24px;
}
/* Le lien du logo ramene a l'accueil : c'est une cible, pas une image.
   Il faisait 32 x 32 px, sous le minimum de 44 px au doigt. */
.lp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-height: 44px; }
.lp-brand__mark {
  width: 32px; height: 32px; border-radius: var(--r-3);
  background: var(--accent); color: var(--accent-fg);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 15px;
}
.lp-brand__mark--sm { width: 24px; height: 24px; font-size: 12px; }
.lp-brand__name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }

.lp-nav { display: flex; gap: 4px; margin-left: 8px; }
.lp-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 14px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none;
}
.lp-nav a:hover { background: var(--surface-3); color: var(--text); }
.lp-nav a:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.lp-nav__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.lp-btn { height: 44px; padding: 0 20px; border-radius: var(--r-3); font-size: 14px; }
.lp-btn--lg { height: 52px; padding: 0 26px; font-size: 16px; }
.lp-btn--block { width: 100%; }
.btn-primary.lp-btn:hover { box-shadow: var(--shadow-brand); }

.public-home { max-width: 1120px; margin: 0 auto; padding: 56px 24px 24px; }

/* ---- Héros ---------------------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 56px; align-items: center; padding: 8px 0 56px;
}
.hero__title {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 52px); line-height: 1.08;
  font-weight: 700; letter-spacing: -0.02em;
}
.hero__lede {
  margin: 20px 0 28px; max-width: 46ch;
  color: var(--text-2); font-size: clamp(16px, 1.6vw, 18px); line-height: 1.6;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { margin: 18px 0 0; font-size: 13px; color: var(--text-3); }

/* ---- Séquence d'entrée du héros (une seule fois, au chargement) ------------ */
@media (prefers-reduced-motion: no-preference) {
  .hero__texte > * { animation: hero-pose 520ms ease-out backwards; }
  .hero__texte > :nth-child(2) { animation-delay: 80ms; }
  .hero__texte > :nth-child(3) { animation-delay: 160ms; }
  .hero__texte > :nth-child(4) { animation-delay: 240ms; }
  .hero__texte > :nth-child(5) { animation-delay: 320ms; }
  @keyframes hero-pose { from { opacity: 0; transform: translateY(14px); } }
  .demo-bande { animation: bande-glisse 560ms cubic-bezier(.2,.7,.2,1) backwards; }
  .demo__pile .demo-bande:nth-child(2) { animation-delay: 140ms; }
  .demo__pile .demo-bande:nth-child(3) { animation-delay: 280ms; }
  @keyframes bande-glisse { from { opacity: 0; transform: translateY(18px); } }
  .demo__legende { animation: hero-pose 520ms 460ms ease-out backwards; }

  /* Révélation au défilement (classes posées par home.js). */
  .a-reveler { opacity: 0; transform: translateY(16px); transition: opacity 480ms ease, transform 480ms ease; }
  .a-reveler.est-visible { opacity: 1; transform: none; }
}

/* ---- Titre au surligneur : le trait jaune balaie le segment-clé ------------ */
.surligne {
  background-image: linear-gradient(transparent 52%, var(--accent) 52%, var(--accent) 94%, transparent 94%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 4px;
}
@media (prefers-reduced-motion: no-preference) {
  .surligne { background-size: 0% 100%; animation: surligne-balaye 700ms 300ms ease-out forwards; }
  @keyframes surligne-balaye { to { background-size: 100% 100%; } }
}

/* ---- DÉMO : les bandes de factures (image de marque v4) --------------------
   Trois bandes dont l'état se lit à la couleur ; la bande en retard passe à
   « payée » en boucle : c'est la promesse du produit, montrée sans un mot. */
.demo { padding: 12px 0; }
.demo__pile { display: flex; flex-direction: column; gap: 12px; }
.demo-bande {
  display: grid; grid-template-columns: 6px 1fr auto auto;
  align-items: center; gap: 16px;
  min-height: 64px; padding-right: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-4); box-shadow: var(--shadow-3);
}
.demo-fil { align-self: stretch; border-radius: var(--r-4) 0 0 var(--r-4); }
.demo-bande--paid .demo-fil { background: var(--ok); }
.demo-bande--sent .demo-fil { background: var(--accent); }
.demo-bande--flip .demo-fil { background: var(--danger); }
.demo-traits { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.demo-trait { height: 9px; border-radius: var(--r-pill); background: var(--surface-3); }
.demo-trait--l { width: 72%; }
.demo-trait--c { width: 44%; }
.demo-mnt { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.demo-etat {
  padding: 4px 12px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.demo-etat--ok { background: var(--ok-soft); color: var(--ok-text); }
.demo-etat--warn { background: var(--accent-soft); color: var(--accent-text); }
.demo-etat--danger { background: var(--danger-soft); color: var(--danger-text); }
/* La pile d'états superposés de la bande qui bascule retard → payée. */
.demo-etat-pile { position: relative; display: inline-grid; }
.demo-etat-pile .demo-etat { grid-area: 1 / 1; justify-self: end; }
.demo-etat-pile .demo-etat--ok { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .demo-bande--flip .demo-fil { animation: demo-fil-vire 6s ease-in-out infinite; }
  .demo-etat-pile .demo-etat--danger { animation: demo-etat-part 6s ease-in-out infinite; }
  .demo-etat-pile .demo-etat--ok { animation: demo-etat-arrive 6s ease-in-out infinite; }
  @keyframes demo-fil-vire { 0%, 45% { background: var(--danger); } 60%, 90% { background: var(--ok); } 100% { background: var(--danger); } }
  @keyframes demo-etat-part { 0%, 44% { opacity: 1; } 50%, 92% { opacity: 0; } 98%, 100% { opacity: 1; } }
  @keyframes demo-etat-arrive { 0%, 50% { opacity: 0; } 56%, 90% { opacity: 1; } 96%, 100% { opacity: 0; } }
}
.demo__legende {
  margin: 16px 4px 0; font-size: 14px; color: var(--text-2); text-align: center;
}

/* ---- En-têtes de section -------------------------------------------------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; letter-spacing: -0.02em;
}
.section-head p { margin: 12px auto 0; font-size: 16px; color: var(--text-2); }

.features, .steps-section, .plans-section, .quote-section, .cta-bottom { padding: 56px 0; }

/* ---- 6 fonctions : pas de cartes — un filet d'encre épais et l'icône en
   ligne, comme une liste soulignée au marqueur ------------------------------- */
.features__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 48px; }
.feature {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px;
  padding: 22px 2px;
  border-top: 3px solid var(--text);
}
.feature__icon {
  grid-row: span 2; align-self: start;
  width: 40px; height: 40px; border-radius: var(--r-2);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-fg);
}
.feature h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.feature p { margin: 0; font-size: 14.5px; line-height: 1.6; }

/* ---- 3 étapes numérotées -------------------------------------------------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.step { text-align: center; padding: 0 12px; }
.step__n {
  width: 48px; height: 48px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--accent); color: var(--accent-fg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 20px;
}
.step h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.step p { margin: 0; font-size: 14.5px; }

/* ---- Forfaits ------------------------------------------------------------- */
.plans-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  max-width: 920px; margin: 0 auto;
}
.plan-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-4); padding: 28px 24px; box-shadow: var(--shadow-2);
}
.plan-card--featured { border-color: var(--accent); border-width: 2px; box-shadow: var(--shadow-4); }
/* Ruban « Le plus populaire » : jaune duplicata. */
.plan-card__ribbon {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  padding: 4px 14px; border-radius: var(--r-pill);
  background: var(--carbon); border: 1px solid var(--carbon-strong); color: var(--carbon-text);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.plan-card__name { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.plan-card__price { margin: 12px 0 2px; display: flex; align-items: baseline; gap: 6px; }
.plan-card__amt { font-size: 34px; font-weight: 700; }
.plan-card__per { font-size: 15px; color: var(--text-3); }
.plan-card__desc { margin: 6px 0 18px; font-size: 14px; color: var(--text-3); }
.plan-card__features {
  list-style: none; margin: 0 0 22px; padding: 0; flex: 1;
  display: flex; flex-direction: column; gap: 10px;
}
.plan-card__features li {
  position: relative; padding-left: 26px;
  font-size: 14.5px; color: var(--text-2);
}
/* Coche dessinée (pas de dingbat ni d'émoji). */
.plan-card__features li::before {
  content: ""; position: absolute; left: 4px; top: 5px;
  width: 6px; height: 11px;
  border: solid var(--accent); border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

/* ---- Témoignage ----------------------------------------------------------- */
.quote { max-width: 780px; margin: 0 auto; text-align: center; }
.quote__text {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 27px); font-weight: 600; line-height: 1.4;
  letter-spacing: -0.015em; color: var(--text);
}
.quote__who { display: flex; align-items: center; gap: 14px; justify-content: center; }
.quote__av {
  width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto;
  background: var(--carbon); color: var(--carbon-text);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 15px;
}
.quote__who-txt { display: flex; flex-direction: column; text-align: left; font-size: 14px; }
.quote__name { font-weight: 600; }

/* ---- Bande CTA : encre bleu nuit, bouton surligneur ------------------------ */
.cta-band {
  background: var(--text); border-radius: var(--r-5);
  padding: 52px 36px; text-align: center; color: var(--bg);
}
.cta-band h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 36px); font-weight: 700;
  color: var(--bg); letter-spacing: -0.02em;
}
.cta-band p { font-size: 16px; opacity: 0.85; margin: 12px 0 26px; }
.cta-band__btn { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 700; }
.cta-band__btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: var(--shadow-brand); }

/* ---- Pied de page --------------------------------------------------------- */
.public-footer {
  margin-top: 16px; padding: 28px 0 8px;
  border-top: 1px solid var(--divider); color: var(--text-3); font-size: 13px;
}
.public-footer__inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.public-footer__brand { display: inline-flex; align-items: center; gap: 8px; }
.public-footer__links { display: flex; gap: 6px; flex-wrap: wrap; }
.public-footer__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--text-3); text-decoration: none; border-radius: var(--r-2);
}
.public-footer__links a:hover { color: var(--text); }
.public-footer__links a:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .demo { max-width: 500px; margin: 0 auto; }
  .features__grid, .steps, .plans-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .public-home { padding: 32px 18px 16px; }
  .lp-nav { display: none; }
  .lp-brand__name { font-size: 15px; }
  .features, .steps-section, .plans-section, .quote-section, .cta-bottom { padding: 40px 0; }
  .hero__cta .btn { width: 100%; }
  .cta-band { padding: 40px 22px; }
}

/* ---- Topnav vitrine : mobile (~390 px), zéro débordement ---- */
@media (max-width: 560px) {
  .lp-topnav__inner { gap: 10px; padding: 0 14px; }
  .lp-brand__name { display: none; }
  .lp-nav__right { gap: 6px; }
  .lp-btn { height: 40px; padding: 0 12px; font-size: 13px; }
  .lp-btn--lg { height: 48px; padding: 0 18px; font-size: 15px; }
}

/* ---- Démo du héros : très petits écrans, tout tient dans 390 px ---- */
@media (max-width: 430px) {
  .lp-topnav .lang-switch { display: none; }
  .lp-topnav__inner { gap: 8px; }
  .lp-nav__right .btn { white-space: nowrap; }
  .lp-btn { padding: 0 10px; font-size: 12.5px; }
  .demo { max-width: 100%; }
  .demo-bande { gap: 10px; padding-right: 12px; }
  .demo-mnt { font-size: 15px; }
  .demo-etat { padding: 3px 9px; font-size: 11.5px; }
}

/* La vitrine garde ses en-têtes de section empilés-centrés : shell.css (chargé
   avant) définit un .section-head flex pour les pages internes. */
.public-home .section-head { display: block; }

/* ---- Aperçus réels de l'application (captures, pas de montage) ---- */
.apercu-section { padding: 64px 0; }
.apercu-grille {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 32px; align-items: start; margin-top: 32px;
}
.apercu { margin: 0; }
.apercu img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: var(--r-3);
  box-shadow: var(--shadow-3); background: var(--surface);
}
.apercu figcaption { display: grid; gap: 4px; margin-top: 14px; font-size: 15px; }
.apercu figcaption strong { font-family: var(--font-display); font-size: 17px; }
.apercu__pdf {
  justify-self: start; margin-top: 6px; font-weight: 500;
  color: var(--accent-text); text-decoration: underline;
  min-height: 44px; display: inline-flex; align-items: center;
}
.apercu--phone img { max-width: 320px; margin: 0 auto; }

/* ---- Questions fréquentes ---- */
.faq-section { padding: 64px 0; }
.faq-liste { max-width: 760px; margin: 28px auto 0; display: grid; gap: 10px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-3); padding: 4px 18px;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 14px 0;
  font-family: var(--font-display); font-weight: 600; font-size: 16.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 22px; line-height: 1; color: var(--text-3); flex-shrink: 0;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item summary:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-2); }
.faq-item p { margin: 0 0 16px; font-size: 15.5px; line-height: 1.65; color: var(--text-2); }

/* ---- Contact humain ---- */
.contact-section { padding: 0 0 64px; }
.contact-carte {
  max-width: 760px; margin: 0 auto; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-4); padding: 36px 28px;
}
.contact-carte h2 { font-family: var(--font-display); margin: 0 0 10px; font-size: 24px; }
.contact-carte p { margin: 0 0 8px; font-size: 16px; color: var(--text-2); }
.contact-coord a {
  font-size: 19px; font-weight: 600; color: var(--accent-text);
  text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center;
}

@media (max-width: 900px) {
  .apercu-grille { grid-template-columns: 1fr; gap: 40px; }
  .apercu--phone img { max-width: 280px; }
}
@media (max-width: 720px) {
  .apercu-section, .faq-section { padding: 40px 0; }
}

/* Vitrine sur téléphone : les phrases courtes portent les arguments de vente
   (« TPS/TVQ automatiques · Paiement en ligne »). Elles doivent se lire au
   soleil, sur un chantier, à bout de bras. */
@media (max-width: 640px) {
  .hero__note,
  .demo__legende,
  .public-home .page-head__eyebrow,
  .lp-eyebrow { font-size: 15px; line-height: 1.45; }

  /* Les descriptions de fonctions, d'étapes et de forfaits sont l'argumentaire :
     à 14 px elles se lisaient mal au soleil, sur un chantier. */
  .feature p,
  .step p,
  .plan-card__desc,
  .plan-card__feats li { font-size: 15.5px; line-height: 1.6; }
}
