/* ============================================================
   PILOTON — DESIGN SYSTEM PUBLIC (pages marketing & conversion)
   Thème clair premium. Source unique des tokens et composants
   partagés des pages publiques. Ne pas utiliser sur les pages
   privées (dashboard.css reste leur référence).
   ============================================================ */

/* Inter auto-hébergée (SIL OFL 1.1 — assets/fonts/OFL-Inter.txt). Police variable :
   un fichier par sous-ensemble couvre les graisses 400 à 800. Évite deux origines
   tierces sur le chemin critique et toute transmission d'IP à Google Fonts. */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  /* Couleurs — palette cible */
  --bg:            #FAFBFD;
  --surface:       #FFFFFF;
  --surface-2:     #F1F5FB;
  --text:          #14243A;
  /* text-2 / text-3 assombris vs la palette cible (#64748B / #94A3B8) :
     contraste AA ≥ 4,5:1 requis aussi sur les fonds teintés (#F1F5FB…). */
  --text-2:        #556377;
  --text-3:        #5F6B7E;
  --primary:       #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft:  #EFF4FE;
  --primary-border:#BFD3F8;
  --success:       #16A34A;  /* icônes / éléments graphiques (≥ 3:1) */
  --success-text:  #15803D;  /* texte vert (≥ 4,5:1) */
  --star:          #D97706;
  --success-soft:  #EAF7EF;
  --success-border:#BBE5CB;
  --warning:       #B45309;
  --warning-soft:  #FEF7EC;
  --danger:        #B91C1C;
  --danger-soft:   #FDF0F0;
  --border:        #E2E8F0;
  --border-strong: #CBD5E1;

  /* Rayons */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* Ombres — légères, jamais théâtrales */
  --shadow-xs: 0 1px 2px rgba(20,36,58,.05);
  --shadow-sm: 0 1px 3px rgba(20,36,58,.06), 0 4px 12px rgba(20,36,58,.05);
  --shadow-md: 0 2px 6px rgba(20,36,58,.06), 0 12px 32px rgba(20,36,58,.08);
  --shadow-lg: 0 4px 10px rgba(20,36,58,.06), 0 24px 56px rgba(20,36,58,.10);

  /* Typo */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--primary); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 641px) { .container { padding: 0 24px; } }

/* Focus clavier visible, partout */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Lien d'évitement */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 400;
  background: var(--surface); color: var(--text); padding: 10px 16px;
  border-radius: var(--r-sm); box-shadow: var(--shadow-md); font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ------------------------------------------------------------
   TYPOGRAPHIE
   ------------------------------------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--primary); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: .9rem;
}
.h-display {
  font-size: clamp(2.05rem, 4.4vw, 3.1rem);
  font-weight: 800; line-height: 1.12; letter-spacing: -.025em; color: var(--text);
}
.h-display .accent { color: var(--primary); }
.h-section {
  font-size: clamp(1.65rem, 3.2vw, 2.3rem);
  font-weight: 800; line-height: 1.16; letter-spacing: -.02em;
  color: var(--text); margin-bottom: .8rem;
}
.h-card { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: .45rem; }
.body-lead { font-size: 1.08rem; color: var(--text-2); line-height: 1.7; }
.body-base { font-size: .94rem; color: var(--text-2); line-height: 1.7; }
.text-muted { color: var(--text-3); }

.sec-header { margin-bottom: 2.75rem; }
.sec-header.center { text-align: center; }
.sec-header.center .body-lead { margin: 0 auto; max-width: 580px; }

/* ------------------------------------------------------------
   BOUTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-sm);
  font-family: var(--font); font-size: .92rem; font-weight: 600; letter-spacing: .005em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s;
  white-space: nowrap;
  text-align: center;
}
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-sm); }
.btn-secondary {
  background: var(--surface); color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--r-md); }
.btn-block { width: 100%; }

/* ------------------------------------------------------------
   NAVIGATION
   ------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(250,251,253,.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.nav.scrolled { border-color: var(--border); box-shadow: var(--shadow-xs); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1120px; margin: 0 auto; padding: 0 20px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--text); font-weight: 800; font-size: 1.05rem;
}
.nav-logo img { width: 28px; height: 28px; }
.nav-logo span { white-space: nowrap; }
.nav-menu { display: flex; align-items: center; gap: 1.6rem; }
.nav-menu a {
  color: var(--text-2); text-decoration: none; font-size: .9rem; font-weight: 500;
  transition: color .18s;
}
.nav-menu a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-login { font-size: .9rem; font-weight: 600; color: var(--text-2); text-decoration: none; }
.nav-login:hover { color: var(--text); }
.mobile-toggle {
  display: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 9px; cursor: pointer; color: var(--text-2);
}
.mobile-drawer {
  display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 199; padding: 18px 20px;
  flex-direction: column; gap: 8px; border-top: 1px solid var(--border);
  overflow-y: auto;
}
.mobile-drawer.open { display: flex; }
.mobile-drawer a {
  display: block; padding: 14px 16px; border-radius: var(--r-md);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem;
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color .18s;
}
.mobile-drawer a:hover { border-color: var(--primary-border); }
.mobile-drawer .drawer-cta { background: var(--primary); color: #fff; border-color: var(--primary); text-align: center; }

@media (max-width: 1024px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: inline-flex; flex-shrink: 0; }
}
/* CTA d'en-tête long : déplacé dans le menu mobile pour ne pas écraser le logo. */
@media (max-width: 640px) { .nav-cta-desktop { display: none; } }

/* ------------------------------------------------------------
   SECTIONS / CARTES
   ------------------------------------------------------------ */
.section { padding: 84px 0; }
.section.alt { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
@media (max-width: 640px) { .section { padding: 60px 0; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 26px;
  box-shadow: var(--shadow-xs);
  transition: border-color .2s, box-shadow .2s;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.card-icon {
  width: 42px; height: 42px; border-radius: var(--r-md);
  background: var(--primary-soft); border: 1px solid var(--primary-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); margin-bottom: 1rem;
}
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
@media (max-width: 1024px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Badge / pastilles */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--primary-soft); border: 1px solid var(--primary-border);
  color: var(--primary); padding: 5px 13px; border-radius: 50px;
  font-size: .78rem; font-weight: 700;
}
.badge.success { background: var(--success-soft); border-color: var(--success-border); color: var(--success-text); }
.badge.neutral { background: var(--surface-2); border-color: var(--border); color: var(--text-2); }

/* Liste à coches */
.check-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.check-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .92rem; color: var(--text-2); line-height: 1.55;
}
.check-list li::before {
  content: ''; width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px;
  background: var(--success-soft); border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316A34A' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 10px; background-repeat: no-repeat; background-position: center;
}

/* Réassurance inline (sous CTA) */
.reassure { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.reassure-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .84rem; color: var(--text-2); font-weight: 500;
}
.reassure-item svg { color: var(--success); flex-shrink: 0; }

/* ------------------------------------------------------------
   TÉMOIGNAGES
   ------------------------------------------------------------ */
.quote-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; gap: 14px;
}
.quote-stars { color: var(--star); font-size: .9rem; letter-spacing: 2px; }
.quote-text { font-size: .95rem; color: var(--text); line-height: 1.65; }
.quote-author { display: flex; align-items: center; gap: 11px; margin-top: auto; }
.quote-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .82rem;
}
.quote-name { font-size: .88rem; font-weight: 700; color: var(--text); }
.quote-role { font-size: .78rem; color: var(--text-3); }

/* ------------------------------------------------------------
   TARIFS
   ------------------------------------------------------------ */
.pricing-grid {
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr);
  gap: 20px; max-width: 980px; margin: 0 auto; align-items: start;
}
@media (max-width: 1024px) { .pricing-grid { grid-template-columns: 1fr; max-width: 520px; } }
.plan {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 30px; position: relative;
  display: flex; flex-direction: column; box-shadow: var(--shadow-xs);
}
.plan.featured { border-color: var(--primary); box-shadow: var(--shadow-md); }
.plan-badge {
  position: absolute; top: -12px; left: 28px;
  background: var(--primary); color: #fff; padding: 4px 14px; border-radius: 50px;
  font-size: .72rem; font-weight: 700; letter-spacing: .03em; white-space: nowrap;
}
.plan-name { font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); margin-bottom: 6px; }
.plan-tagline { font-size: .88rem; color: var(--text-2); margin-bottom: 1.4rem; line-height: 1.6; }
.plan-price { margin-bottom: 1.5rem; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan-amount { font-size: 2.9rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); line-height: 1; }
.plan-period { font-size: .88rem; color: var(--text-2); }
.plan-prefix { display: block; width: 100%; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin-bottom: .3rem; }
.plan-features { list-style: none; flex: 1; display: flex; flex-direction: column; gap: 10px; margin-bottom: 1.75rem; }
.plan-features li { display: flex; align-items: flex-start; gap: 9px; font-size: .9rem; color: var(--text-2); line-height: 1.5; }
.plan-features li svg { color: var(--success); flex-shrink: 0; margin-top: 2px; }
.plan-cta { width: 100%; justify-content: center; }
.plan-note { font-size: .78rem; color: var(--text-3); margin-top: 12px; line-height: 1.6; }

/* ------------------------------------------------------------
   FAQ
   ------------------------------------------------------------ */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; transition: border-color .2s;
}
.faq-item:hover { border-color: var(--border-strong); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: .95rem; font-weight: 600; color: var(--text); text-align: left;
}
.faq-q svg { flex-shrink: 0; transition: transform .22s; color: var(--text-3); }
.faq-q[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-a { display: none; }
.faq-a.open { display: block; }
.faq-a p { padding: 0 20px 16px; font-size: .9rem; color: var(--text-2); line-height: 1.7; }

/* ------------------------------------------------------------
   FORMULAIRES
   ------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: .86rem; font-weight: 600; color: var(--text); }
.field .hint { font-size: .78rem; color: var(--text-3); }
.input, .field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; padding: 11px 14px; font-family: var(--font); font-size: .95rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  transition: border-color .18s, box-shadow .18s;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.field .error-msg { font-size: .8rem; color: var(--danger); display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .error-msg { display: block; }

/* Alertes / états */
.notice { border-radius: var(--r-md); padding: 14px 16px; font-size: .9rem; line-height: 1.6; border: 1px solid; }
.notice.info { background: var(--primary-soft); border-color: var(--primary-border); color: #1E429F; }
.notice.success { background: var(--success-soft); border-color: var(--success-border); color: #14532D; }
.notice.warning { background: var(--warning-soft); border-color: #F4D9B0; color: var(--warning); }
.notice.danger { background: var(--danger-soft); border-color: #F3C4C4; color: #991B1B; }

/* Spinner sobre */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--primary-soft); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------
   MOCKUP PRODUIT (fenêtre app, données de démonstration)
   ------------------------------------------------------------ */
.mockup {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg);
}
.mockup-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.mockup-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.mockup-url {
  flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 5px;
  padding: 3px 10px; font-size: .72rem; color: var(--text-3); text-align: center; margin: 0 10px;
}
.mockup-body { padding: 16px; }
.mockup-demo-tag {
  display: inline-block; font-size: .68rem; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .06em;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 8px;
}

/* KPI tiles dans le mockup */
.kpi-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 12px; }
.kpi {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 10px 12px;
}
.kpi-label { font-size: .68rem; color: var(--text-3); margin-bottom: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.kpi-value.success { color: var(--success-text); }
.kpi-value.primary { color: var(--primary); }
.kpi-delta { font-size: .7rem; color: var(--success-text); font-weight: 600; }

/* ------------------------------------------------------------
   ÉTAPES (comment ça marche)
   ------------------------------------------------------------ */
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media (max-width: 1024px) { .steps-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }
.step-num {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-soft); border: 1px solid var(--primary-border);
  color: var(--primary); font-size: .95rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.1rem;
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; } .footer-brand { grid-column: 1 / -1; } }
.footer-logo { display: flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 800; color: var(--text); margin-bottom: 12px; text-decoration: none; }
.footer-logo img { width: 24px; height: 24px; }
.footer-brand p { font-size: .84rem; color: var(--text-2); line-height: 1.65; max-width: 240px; }
.footer-col h4 { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); margin-bottom: 1rem; }
.footer-col a { display: block; font-size: .86rem; color: var(--text-2); text-decoration: none; margin-bottom: 8px; transition: color .18s; }
.footer-col a:hover { color: var(--text); }
/* Lien « Gérer les cookies » inséré par cookie-consent.js à la fin du <footer> */
.site-footer > #piloton-cookie-manage {
  display: block; box-sizing: border-box; width: 100%; max-width: 1120px;
  margin: 12px auto 0; padding: 0 20px; text-align: left; color: var(--text-2);
}
@media (min-width: 641px) { .site-footer > #piloton-cookie-manage { padding: 0 24px; } }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px; border-top: 1px solid var(--border);
  font-size: .8rem; color: var(--text-3); flex-wrap: wrap; gap: 12px;
}

/* ------------------------------------------------------------
   ANIMATIONS — sobres, respectent prefers-reduced-motion
   ------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------
   UTILITAIRES
   ------------------------------------------------------------ */
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
