/* ── Lokavivo — styles communs à toutes les pages ─────────────────────────── */

/* Replis sûrs pour les jetons décoratifs optionnels utilisés dans une
   déclaration `background-image` à plusieurs couches (séparées par une
   virgule) de {page}-structure.css. Un style qui ne définit pas un jeton
   isolé (ex. `transform: var(--tilt-x)`) retombe sans dommage sur sa valeur
   initiale — mais dans une liste à plusieurs couches, un seul `var()` non
   résolu invalide TOUTE la déclaration au calcul (repli « invalide garanti »
   du standard CSS Custom Properties), effaçant aussi les couches par
   ailleurs valides. Ces deux jetons sont ceux concernés (`.hero`) ; chaque
   style qui les définit continue de l'emporter normalement dans la cascade
   (chargé après lv-common.css). */
:root {
  --bg-glow-hero: none;
  --texture-noise: none;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Base */
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--paper); color: var(--ink);
  line-height: 1.65;
  font-size: clamp(0.9rem, 0.85rem + 0.35vw, 1.05rem);
}
h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.18; text-wrap: balance; font-weight: 700; letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 1.8rem + 1.8vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + 1.1vw, 2.2rem); }
h3 { font-size: clamp(1rem, 0.9rem + 0.45vw, 1.25rem); }
h4 { font-size: 0.95rem; font-weight: 600; font-family: system-ui, sans-serif; }
.label { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mid); }
p { max-width: var(--text-w); }
.container { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem); }
section { padding: var(--gap) 0; }
section[id], #cta, #contact { scroll-margin-top: 66px; }

/* Contenteditable — couleurs d'accent definies dans chaque page */
[contenteditable] { outline: none; border-radius: 2px; cursor: text; transition: box-shadow 0.12s; }

/* Nav */
nav { position: sticky; top: 0; z-index: 100; background: rgba(242,245,250,0.92); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(6,11,31,0.07); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; max-width: 1080px; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem); gap: 1rem; }
.nav-back { font-size: .78rem; color: var(--mid); text-decoration: none; display: flex; align-items: center; gap: .4rem; white-space: nowrap; }
.nav-back:hover { color: var(--ink); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--ink2); font-size: .78rem; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--accent); }
.nav-badge { font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--accent); color: #fff; padding: .2rem .55rem; border-radius: 100px; }
.nav-cta { background: var(--accent); color: #fff; text-decoration: none; padding: .42rem 1.1rem; border-radius: 100px; font-size: .8rem; font-weight: 600; transition: opacity .15s; white-space: nowrap; }
.nav-cta:hover { opacity: .88; }

/* Pulse strip */
.pulse-strip { background: var(--accent); color: #fff; padding: 0; }
.pulse-strip-inner { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1080px; margin: 0 auto; }
.pulse-item { padding: 1.4rem clamp(1.25rem, 5vw, 3rem); border-right: 1px solid rgba(255,255,255,0.18); display: flex; flex-direction: column; gap: .2rem; }
.pulse-item:last-child { border-right: none; }
.pulse-num { font-family: Georgia, serif; font-size: clamp(1.5rem, 1.3rem + .8vw, 2.2rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pulse-label { font-size: .78rem; opacity: .8; }

/* Benefits — fond icône via --accent-tint défini par page */
.benefits { background: var(--paper); }
.ben-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; margin-top: 2.5rem; }
.ben-card { background: #fff; border-radius: 10px; padding: 2rem 1.75rem; border: 1px solid rgba(6,11,31,.07); display: flex; flex-direction: column; gap: .75rem; }
.ben-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-tint); display: flex; align-items: center; justify-content: center; }
.ben-icon svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ben-card h3 { margin-bottom: .1rem; }
.ben-card p { font-size: .87rem; color: var(--mid); max-width: unset; }

/* Process — fond via --process-bg défini par page */
.process { background: var(--process-bg, var(--ink2)); color: #fff; }
.process .label { color: rgba(255,255,255,.38); }
.process h2 { color: #fff; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; overflow: hidden; margin-top: 2.5rem; }
.step { padding: 1.75rem 1.5rem; border-right: 1px solid rgba(255,255,255,.07); }
.step:last-child { border-right: none; }
.step-n { display: inline-block; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; text-align: center; line-height: 28px; margin-bottom: .75rem; }
.step h4 { color: #fff; font-size: .92rem; font-weight: 700; font-family: system-ui, sans-serif; margin-bottom: .4rem; }
.step p { font-size: .82rem; color: rgba(255,255,255,.5); max-width: unset; }

/* CTA — fond/bordure via --cta-section-bg / --cta-border / --cta-bg définis par page */
.cta-section { background: var(--cta-section-bg, var(--ink)); color: #fff; }
.cta-inner { border: 1px solid var(--cta-border, rgba(255,255,255,.2)); background: var(--cta-bg, rgba(255,255,255,.05)); border-radius: 10px; padding: 3rem; text-align: center; }
.cta-inner h2 { color: #fff; margin-bottom: .75rem; }
.cta-inner p { color: rgba(255,255,255,.6); font-size: .9rem; margin: 0 auto 2rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-accent { background: var(--accent); color: #fff; text-decoration: none; padding: .75rem 1.75rem; border-radius: 100px; font-weight: 700; font-size: .9rem; transition: opacity .15s; }
.btn-accent:hover { opacity: .88; }
.btn-outline-w { border: 1.5px solid rgba(255,255,255,.35); color: #fff; text-decoration: none; padding: .7rem 1.6rem; border-radius: 100px; font-size: .88rem; font-weight: 600; transition: border-color .15s; }
.btn-outline-w:hover { border-color: #fff; }

/* Témoignages */
.testimonials { background: var(--paper2); }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.testi-card { background: #fff; border-radius: 10px; padding: 1.75rem; border: 1px solid rgba(6,11,31,.07); display: flex; flex-direction: column; gap: .85rem; }
.testi-stars { font-size: .8rem; letter-spacing: .18em; }
.testi-quote { font-size: .875rem; color: var(--ink2); font-style: italic; line-height: 1.72; flex: 1; }
.testi-author { display: flex; align-items: center; gap: .7rem; padding-top: .5rem; border-top: 1px solid rgba(6,11,31,.06); }
.testi-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--paper2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; color: var(--accent); flex-shrink: 0; border: 1.5px solid rgba(6,11,31,.08); }
.testi-meta { display: flex; flex-direction: column; gap: .1rem; }
.testi-name { font-size: .82rem; font-weight: 700; color: var(--ink); }
.testi-role { font-size: .73rem; color: var(--mid); }

/* Footer */
footer { background: var(--ink); border-top: 1px solid rgba(255,255,255,.05); padding: 2.5rem 0; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.foot-copy { font-size: .78rem; color: rgba(255,255,255,.35); }
.foot-contact { font-size: .82rem; color: rgba(255,255,255,.55); }
.foot-contact a { color: var(--accent); text-decoration: none; }
.foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.foot-links a { font-size: .78rem; color: rgba(255,255,255,.45); text-decoration: none; }
.foot-links a:hover { color: rgba(255,255,255,.8); }

/* Bouton export — caché par défaut, affiché uniquement par lv-editor.js en mode édition */
#export-btn { display: none; position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999; background: var(--ink); color: #fff; border: none; border-radius: 100px; padding: .6rem 1.2rem; font-size: .8rem; font-weight: 600; cursor: pointer; box-shadow: 0 4px 18px rgba(6,11,31,.35); transition: opacity .15s; font-family: system-ui, sans-serif; align-items: center; gap: .45rem; }
#export-btn:hover { opacity: .88; }

/* Canvas → <img> dans les pages exportées */
img#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.3; pointer-events: none; object-fit: cover; }
.hero-mark img  { width: 100%; aspect-ratio: 1; border-radius: 50%; }

/* Responsive partagé */
@media (max-width: 820px) {
  .nav-links           { display: none; }
  .hero-inner          { grid-template-columns: 1fr; }
  .hero-mark           { display: none; }
  .ben-grid            { grid-template-columns: 1fr; }
  .steps               { grid-template-columns: 1fr 1fr; }
  .testi-grid          { grid-template-columns: 1fr; }
  .pulse-strip-inner   { grid-template-columns: 1fr; }
  .pulse-item          { border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); }
  .pulse-item:last-child { border-bottom: none; }
}
