/* ElityX vitrine, aux couleurs de marque (bleu / indigo).
   Une seule feuille de style, thème clair/sombre via prefers-color-scheme.
   Polices système, mobile-first. */

:root {
  --brand: #1565c0;        /* bleu primaire ElityX */
  --brand-dark: #0d47a1;
  --brand-accent: #2563eb;
  --brand-soft: #e3f2fd;
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --card: #ffffff;
  --text: #16202e;
  --muted: #5b6675;
  --border: #e3e8ef;
  --shadow: 0 1px 3px rgba(13,71,161,.06), 0 8px 24px rgba(13,71,161,.05);
  --radius: 14px;
  --maxw: 1080px;
}

/* Thème clair par défaut. Le sombre s'active manuellement via data-theme="dark"
   sur <html> (bouton dans le header, choix mémorisé en localStorage). */
:root[data-theme="dark"] {
  --brand: #5fa8f5;
  --brand-dark: #2196f3;
  --brand-accent: #6ea8fe;
  --brand-soft: #102337;
  --bg: #0d141f;
  --bg-alt: #111a27;
  --card: #16202e;
  --text: #e6edf6;
  --muted: #9fb0c4;
  --border: #243246;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: 20px; }

a { color: var(--brand-dark); text-underline-offset: 2px; }
:root[data-theme="dark"] a { color: var(--brand); }

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

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }

.visually-hidden, .skip {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus {
  position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto;
  background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}

/* ---------- Boutons ---------- */
.btn {
  /* Neutralise le rendu natif du <button> pour qu'il soit identique à un <a> stylé en bouton
     (sinon le navigateur teinte le fond via son moteur de thème + impose sa police de bouton). */
  appearance: none; -webkit-appearance: none;
  font: inherit; cursor: pointer;
  display: inline-block; padding: 12px 20px; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: transform .12s ease, background .12s ease, border-color .12s ease;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
:root[data-theme="dark"] .btn-ghost { color: var(--text); } /* idem : reprend la main sur la couleur de lien générique */
:root[data-theme="dark"] .btn-ghost:hover { color: var(--brand); }
/* En thème sombre, --brand est éclairci (#5fa8f5) pour les liens/accents sur fond foncé. Comme fond
   de bouton plein avec texte blanc, le contraste tombe à ~2,5:1 (illisible) → on force un bleu assez
   profond pour rester lisible avec du blanc (>= 4,5:1). */
/* color:#fff explicite : sinon la règle générique « :root[data-theme=dark] a » (l.53) la batterait
   en spécificité pour les boutons qui sont des liens <a> → texte bleu clair au lieu de blanc. */
:root[data-theme="dark"] .btn-primary { background: #1f6fd6; color: #fff; }
:root[data-theme="dark"] .btn-primary:hover { background: #1559b0; }

/* Focus clavier visible (a11y) — uniquement au clavier, pas au clic souris. */
a:focus-visible,
.btn:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; margin-right: auto; }
.brand-logo { width: 32px; height: 32px; border-radius: 8px; display: block; }
.brand-name { font-size: 1.15rem; }

/* Bouton de bascule clair / sombre */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; min-width: 40px;
  border: 1px solid var(--border); border-radius: 10px;
  background: transparent; color: var(--text); cursor: pointer; line-height: 1; font-size: 1.1rem;
}
.theme-toggle:hover { border-color: var(--brand); }
.theme-ic::before { content: "🌙"; }
:root[data-theme="dark"] .theme-ic::before { content: "☀️"; }

/* Nav : details/summary = menu mobile sans JS */
.nav summary { list-style: none; cursor: pointer; }
.nav summary::-webkit-details-marker { display: none; }
.burger { display: inline-block; width: 24px; height: 2px; background: var(--text); position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; width: 24px; height: 2px; background: var(--text); }
.burger::before { top: -7px; } .burger::after { top: 7px; }
.nav nav { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; }
.nav nav a { padding: 10px 4px; text-decoration: none; color: var(--text); border-radius: 8px; }
.nav nav a:hover { color: var(--brand-dark); }
:root[data-theme="dark"] .nav nav a:hover { color: var(--brand); }
.nav[open] nav {
  position: absolute; right: 16px; top: 60px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 8px 14px; min-width: 220px;
}
.nav-cta { margin-top: 6px; text-align: center; }

@media (min-width: 760px) {
  .nav summary { display: none; }
  .nav nav { position: static !important; flex-direction: row; align-items: center; gap: 4px;
    border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0; }
  .nav-cta { margin-top: 0; margin-left: 8px; }
}

/* ---------- Hero ---------- */
.hero { display: grid; gap: 32px; padding: 56px 20px 40px; }
.eyebrow { color: var(--brand-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin: 0 0 8px; }
:root[data-theme="dark"] .eyebrow { color: var(--brand); }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin: 0 0 14px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; }
.hero-freenote { font-size: .9rem; color: var(--brand-dark); font-weight: 600; margin: 14px 0 0; }
:root[data-theme="dark"] .hero-freenote { color: var(--brand); }
.hero-note { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.trust-row { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }

.hero-visual svg { width: 100%; }

/* Capture produit encadrée (mockup). */
.hero-shot { margin: 0; }
.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--card);
}
.sv-card { fill: var(--card); stroke: var(--border); }
.sv-line { fill: var(--brand); opacity: .9; }
.sv-line2 { fill: var(--border); }
.sv-kpi { fill: var(--brand-soft); stroke: var(--border); }
.sv-pill { fill: var(--brand); }

@media (min-width: 880px) {
  .hero { grid-template-columns: 1.1fr .9fr; align-items: center; padding-top: 72px; }
}

/* ---------- Sections ---------- */
.section { padding: 48px 20px; }
.section.alt { background: var(--bg-alt); max-width: none; }
.section.alt > * { max-width: var(--maxw); margin-inline: auto; }
.section h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 0 0 8px; }
.section-lead { color: var(--muted); margin: 0 0 28px; max-width: 60ch; }

/* Features */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: 1fr; }
.feature {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.feature-ic { font-size: 1.6rem; line-height: 1; }
.feature h3 { margin: 12px 0 6px; font-size: 1.1rem; }
.feature p { margin: 0; color: var(--muted); }
@media (min-width: 620px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .features { grid-template-columns: 1fr 1fr 1fr; } }

/* Intégrations & conformité */
.integrations { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: 1fr; }
.integration {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 20px 18px; box-shadow: var(--shadow);
}
.integration h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.integration p { margin: 0; color: var(--muted); }
.chip-status {
  display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; padding: 3px 10px; border-radius: 999px;
}
.chip-status.chip-ok { background: var(--brand-soft); color: var(--brand-dark); }
.chip-status.chip-soon { background: var(--bg-alt); color: var(--muted); border: 1px solid var(--border); }
:root[data-theme="dark"] .chip-status.chip-ok { color: var(--brand); }
/* « Intégration en cours » : statut intermédiaire (validé, raccordement en cours) entre « Bientôt » et « Disponible ». */
.chip-status.chip-progress { background: #fff3e0; color: #b25e09; border: 1px solid #f0c690; }
:root[data-theme="dark"] .chip-status.chip-progress { background: #3a2a12; color: #f0b450; border-color: #5a4420; }
/* Badge « Pro » inline dans un titre de fonctionnalité (offre payante). */
.badge-pro {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark);
}
:root[data-theme="dark"] .badge-pro { color: var(--brand); }
@media (min-width: 620px) { .integrations { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .integrations { grid-template-columns: 1fr 1fr 1fr; } }

/* Audience */
.audience { display: grid; gap: 18px; grid-template-columns: 1fr; }
.aud-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.aud-card h3 { margin: 0 0 8px; }
.aud-card p { margin: 0; color: var(--muted); }
@media (min-width: 760px) { .audience { grid-template-columns: 1fr 1fr 1fr; } }

/* CTA */
.cta-section { text-align: center; }
.cta-section .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; padding-block: 22px; }
.site-footer p { margin: 0; color: var(--muted); font-size: .9rem; }
.footer-inner nav { display: flex; gap: 16px; }
.footer-inner nav a { text-decoration: none; font-size: .9rem; }

/* ---------- Comment ça marche ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: 1fr; counter-reset: step; }
.step {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease;
}
.step:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(13,71,161,.12); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 1.1rem;
}
.step h3 { margin: 14px 0 6px; font-size: 1.1rem; }
.step p { margin: 0; color: var(--muted); }
@media (min-width: 760px) { .steps { grid-template-columns: 1fr 1fr 1fr; } }
.steps-cta { justify-content: center; margin-top: 26px; }

/* ---------- Tarifs ---------- */
.pricing { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: stretch; }
.pricing-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.pricing-card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(13,71,161,.12); }
.pricing-card--featured { border-color: var(--brand); box-shadow: 0 8px 28px rgba(21,101,192,.18); }
.pricing-badge {
  align-self: flex-start; margin: 0 0 10px; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}
:root[data-theme="dark"] .pricing-badge { color: var(--brand); }
.pricing-name { margin: 0 0 6px; font-size: 1.25rem; }
.pricing-price { margin: 0 0 6px; }
.pricing-price .amount { font-size: 1.9rem; font-weight: 700; color: var(--text); }
.pricing-price .period { color: var(--muted); font-size: .95rem; }
.pricing-desc { margin: 0 0 14px; color: var(--muted); }
.pricing-feats { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.pricing-feats li { position: relative; padding-left: 26px; color: var(--text); }
.pricing-feats li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--brand); font-weight: 700;
}
.pricing-cta { margin-top: auto; text-align: center; }
.pricing-note { color: var(--muted); font-size: .85rem; margin: 18px 0 0; }
@media (min-width: 820px) { .pricing { grid-template-columns: 1fr 1fr 1fr; } }

/* Bascule Mensuel / Annuel */
.billing-toggle {
  display: inline-flex; gap: 4px; margin: 0 0 24px;
  padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--card);
}
.billing-opt {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: transparent; color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 8px 18px; min-height: 40px; border-radius: 999px;
  transition: background .12s ease, color .12s ease;
}
.billing-opt:hover { color: var(--brand-dark); }
:root[data-theme="dark"] .billing-opt:hover { color: var(--brand); }
.billing-opt.is-active { background: var(--brand); color: #fff; }
.billing-opt.is-active:hover { color: #fff; }
.billing-save {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  background: var(--brand-soft); color: var(--brand-dark);
  padding: 2px 8px; border-radius: 999px;
}
.billing-opt.is-active .billing-save { background: rgba(255,255,255,.22); color: #fff; }
:root[data-theme="dark"] .billing-save { color: var(--brand); }
@media (prefers-reduced-motion: reduce) { .billing-opt { transition: none; } }

/* Comparatif détaillé (repliable) */
.pricing-compare { margin-top: 24px; }
.pricing-compare > summary {
  list-style: none; cursor: pointer; font-weight: 600; color: var(--brand-dark);
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
}
.pricing-compare > summary::-webkit-details-marker { display: none; }
.pricing-compare > summary::before { content: "▸"; transition: transform .15s ease; }
.pricing-compare[open] > summary::before { transform: rotate(90deg); }
:root[data-theme="dark"] .pricing-compare > summary { color: var(--brand); }
.pricing-table-scroll { overflow-x: auto; margin-top: 14px; }
.pricing-table {
  width: 100%; border-collapse: collapse; min-width: 560px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.pricing-table th, .pricing-table td {
  padding: 11px 14px; text-align: center; border-bottom: 1px solid var(--border); font-size: .92rem;
}
.pricing-table thead th { background: var(--bg-alt); font-weight: 700; }
.pricing-table tbody th[scope="row"] { text-align: left; font-weight: 500; color: var(--text); }
.pricing-table tbody tr:last-child td, .pricing-table tbody tr:last-child th { border-bottom: 0; font-weight: 700; }
.pricing-table small { color: var(--muted); font-weight: 400; }
.pricing-table .yes { color: var(--brand); font-weight: 700; }
.pricing-table .no { color: var(--muted); }

/* Note de pied de page (astérisque hébergement) */
.footer-note { color: var(--muted); font-size: .82rem; margin: 0 auto; padding: 0 20px 18px; }
.footer-note a { color: var(--brand-dark); }
:root[data-theme="dark"] .footer-note a { color: var(--brand); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 760px; }
.faq-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px 18px;
}
.faq-item summary {
  list-style: none; cursor: pointer; font-weight: 600;
  padding: 14px 28px 14px 0; position: relative; min-height: 44px;
  display: flex; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--brand); line-height: 1; transition: transform .15s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0 0 16px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
.contact-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .92rem; }
.field .optional { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px;
  width: 100%; min-height: 44px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--brand); }
.contact-form .btn { justify-self: start; }
.contact-privacy { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.contact-aside {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); align-self: start;
}
.contact-aside h3 { margin: 0 0 8px; }
.contact-aside p { color: var(--muted); }
.contact-direct { font-size: .92rem; }
@media (min-width: 820px) { .contact-grid { grid-template-columns: 1.4fr .9fr; } }

/* ---------- Mockups SVG (texte & accents) ---------- */
.sv-text { fill: var(--text); font-family: system-ui, "Segoe UI", Roboto, sans-serif; }
.sv-muted { fill: var(--muted); font-family: system-ui, "Segoe UI", Roboto, sans-serif; }
.sv-accent { fill: var(--brand); }
.sv-bar { fill: var(--brand); opacity: .85; }
.sv-bar-soft { fill: var(--brand-soft); }
.sv-row { fill: var(--bg-alt); }

/* ---------- Preuve sociale ---------- */
.stats { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin: 0 0 36px; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center;
}
.stat-num { font-size: 1.9rem; font-weight: 700; color: var(--brand-dark); }
:root[data-theme="dark"] .stat-num { color: var(--brand); }
.stat-label { color: var(--muted); font-size: .92rem; margin-top: 4px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.quotes { display: grid; gap: 18px; grid-template-columns: 1fr; margin: 0 0 28px; }
.quote {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.quote blockquote { margin: 0 0 12px; font-size: 1.02rem; color: var(--text); }
.quote figcaption { color: var(--muted); font-size: .9rem; }
.quote figcaption strong { color: var(--text); }
@media (min-width: 820px) { .quotes { grid-template-columns: 1fr 1fr 1fr; } }

.logos { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: center; opacity: .85; }
.logo-slot {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; min-width: 120px; padding: 0 14px;
  border: 1px dashed var(--border); border-radius: 8px;
  color: var(--muted); font-weight: 600; font-size: .9rem;
}

/* ---------- Pages légales ---------- */
.legal { max-width: 76ch; }
.legal h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 6px; }
.legal h2 { font-size: 1.2rem; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--text); }
.legal p { margin: 0 0 12px; }
.legal ul { padding-left: 1.2em; margin: 0 0 12px; }
.legal li { margin: 8px 0; }
.legal a { color: var(--brand-dark); }
:root[data-theme="dark"] .legal a { color: var(--brand); }
/* CTA bouton plein dans une page légale : garder le texte blanc (sinon `.legal a`, plus spécifique,
   le repasse en bleu → bleu sur bleu illisible). Couvre thème clair et sombre. */
.legal a.btn-primary,
:root[data-theme="dark"] .legal a.btn-primary { color: #fff; }
.legal-updated { color: var(--muted); font-size: .9rem; margin: 0 0 20px; }
.legal-back { margin-top: 32px; }
.legal-disclaimer {
  background: var(--brand-soft); border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: 8px; padding: 12px 16px; margin: 0 0 24px; color: var(--text); font-size: .92rem;
}

/* Micro-animation hover sur les cartes existantes (sobre). */
.feature, .aud-card { transition: transform .14s ease, box-shadow .14s ease; }
.feature:hover, .aud-card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(13,71,161,.12); }

/* Réduit les animations si l'utilisateur le demande (accessibilité + sobriété). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .step, .pricing-card, .feature, .aud-card, .faq-item summary::after { transition: none; }
  .step:hover, .pricing-card:hover, .feature:hover, .aud-card:hover { transform: none; }
}
