/* Bastigo, site vitrine. Charte graphique reprise de web/src/index.css
   (design system Bastion v2.1) pour rester visuellement cohérent avec le
   portail applicatif, sans dépendance à Tailwind ni à un build : ce site
   est du HTML/CSS statique pur. */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* Echelle typographique (charte Bastion 04, Informations/charte-graphique).
   Trois poids seulement (400/500/600), jamais de gras superieur : la
   hierarchie se fait par taille et interlignage, pas par un poids plus
   lourd. Manrope pour l'interface et le texte courant, IBM Plex Mono pour
   toute donnee "machine" (identifiants, horodatages, sur-titres). */
.t-display { font: 600 clamp(2.5rem, 6vw, 4.5rem) / 1.05 var(--font-sans); letter-spacing: -0.03em; }
.t-title   { font: 600 clamp(1.75rem, 3.4vw, 2.25rem) / 1.15 var(--font-sans); letter-spacing: -0.025em; }
.t-heading { font: 600 1.125rem / 1.3 var(--font-sans); }
.t-body    { font: 400 1rem / 1.65 var(--font-sans); }
.t-label   { font: 500 0.8125rem / 1.4 var(--font-sans); }
.t-data    { font: 500 0.9375rem / 1.5 var(--font-mono); }
.t-overline { font: 600 0.6875rem / 1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; }

:root {
  --font-sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --color-bg: #07090d;
  --color-surface: #0d1015;
  --color-surface-2: #151a22;
  --color-border: #202836;
  --color-border-strong: #39435a;
  --color-text: #f4f7fa;
  --color-text-base: #e4e8ee;
  --color-text-muted: #8f99a8;
  --color-text-faint: #5c6472;

  --color-accent: #6ec3f0;
  --color-accent-soft: rgba(110, 195, 240, 0.14);
  --color-accent-strong: #8fd1f5;
  --color-accent-grad-from: #8fd1f5;
  --color-accent-grad-to: #3f97cc;

  --color-success: #2bb673;
  --color-success-soft: rgba(43, 182, 115, 0.14);
  --color-success-border: rgba(43, 182, 115, 0.32);

  --radius-lg: 0.875rem;
  --radius-xl: 1.125rem;

  --surface-raised-bg: var(--color-surface);
  --hero-glow: #132234;
  --shadow-card: 0 10px 24px rgba(0, 0, 0, 0.28);
  --max-width: 72rem;

  /* Logo (charte 02), tokens propres a la marque, distincts de
     --color-accent applicatif, repris a l'identique de web/src/index.css
     pour que le logo reste visuellement identique entre l'app et le site. */
  --logo-ring: #3a5b70;
  --logo-accent: #4ea6d8;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    --color-bg: #f4f6f9;
    --color-surface: #ffffff;
    --color-surface-2: #eef2f6;
    --color-border: #dce2ea;
    --color-border-strong: #c4ccd6;
    --color-text: #0f1216;
    --color-text-base: #1a1f27;
    --color-text-muted: #5c6472;
    --color-text-faint: #8f99a8;

    --color-accent: #3f97cc;
    --color-accent-soft: rgba(63, 151, 204, 0.12);
    --color-accent-strong: #1e93d0;
    --color-accent-grad-from: #6ec3f0;
    --color-accent-grad-to: #1e93d0;

    --color-success: #1f9d5f;
    --color-success-soft: rgba(31, 157, 95, 0.1);
    --color-success-border: rgba(31, 157, 95, 0.28);

    --surface-raised-bg: linear-gradient(165deg, var(--color-surface-2), var(--color-surface));
    --hero-glow: #dceaf6;
    --shadow-card: 0 10px 24px rgba(15, 23, 32, 0.08);

    --logo-ring: #9db3c0;
    --logo-accent: #1c4a66;
  }
}

:root[data-theme='light'] {
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;
  --color-surface-2: #eef2f6;
  --color-border: #dce2ea;
  --color-border-strong: #c4ccd6;
  --color-text: #0f1216;
  --color-text-base: #1a1f27;
  --color-text-muted: #5c6472;
  --color-text-faint: #8f99a8;

  --color-accent: #3f97cc;
  --color-accent-soft: rgba(63, 151, 204, 0.12);
  --color-accent-strong: #1e93d0;
  --color-accent-grad-from: #6ec3f0;
  --color-accent-grad-to: #1e93d0;

  --color-success: #1f9d5f;
  --color-success-soft: rgba(31, 157, 95, 0.1);
  --color-success-border: rgba(31, 157, 95, 0.28);

  --surface-raised-bg: linear-gradient(165deg, var(--color-surface-2), var(--color-surface));
  --hero-glow: #dceaf6;
  --shadow-card: 0 10px 24px rgba(15, 23, 32, 0.08);

  --logo-ring: #9db3c0;
  --logo-accent: #1c4a66;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-base);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.25;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

p { margin: 0; }

img, svg { display: block; max-width: 100%; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: inline-flex;
}

.brand-mark svg { width: 100%; height: 100%; }

.brand-word {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--color-text); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch {
  display: flex;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.lang-switch a {
  text-decoration: none;
  color: var(--color-text-faint);
  padding: 0.2rem 0.4rem;
  border-radius: 0.4rem;
}

.lang-switch a[aria-current='true'] {
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  border-radius: 0.6rem;
  width: 2.4rem;
  height: 2.4rem;
  color: var(--color-text);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  border-radius: var(--radius-lg);
  padding: 0 1.3rem;
  font: 600 0.875rem/1 var(--font-sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(155deg, var(--color-accent-grad-from), var(--color-accent-grad-to));
  color: #071018;
  box-shadow: 0 8px 20px rgba(63, 151, 204, 0.28);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(63, 151, 204, 0.36); }

.btn-ghost {
  background: var(--color-surface-2);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn-ghost:hover { background: var(--color-surface); border-color: var(--color-accent); }

.btn-lg { min-height: 2.875rem; padding: 0 1.6rem; font-size: 0.9375rem; }

.btn .arrow { width: 1rem; height: 1rem; transition: transform 0.2s ease; }

.btn:hover .arrow { transform: translateX(3px); }

/* Hero */
.hero {
  position: relative;
  background: radial-gradient(circle at 15% -10%, var(--hero-glow) 0%, var(--color-bg) 46%);
  padding: 6rem 0 4.5rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--color-border) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 0%, #000 0%, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}

.hero .container { position: relative; }

/* Fond anime, present sur le hero de chaque page : reseau de particules en
   Canvas, remplace le motif de points statique - voir assets/main.js. Pas
   de fichier video : plus leger, theme-aware, et respecte
   prefers-reduced-motion nativement (la boucle d'animation ne demarre pas). */
.hero-animated::before { display: none; }

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero .container { z-index: 1; }

.hero-inner { text-align: center; max-width: 46rem; margin: 0 auto; }

.hero h1 {
  font: 600 clamp(2rem, 5vw, 3.75rem) / 1.15 var(--font-sans);
  letter-spacing: 0.015em;
}

.hero .lede {
  margin-top: 1.25rem;
  font: 400 1.125rem / 1.65 var(--font-sans);
  color: var(--color-text-muted);
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 1.75rem;
  font-size: 0.8rem;
  color: var(--color-text-faint);
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
section { padding: 4rem 0; }

.section-head { max-width: 40rem; margin: 0 auto 2.75rem; text-align: center; }

.section-head h2 { font: 600 clamp(1.5rem, 2.8vw, 1.875rem) / 1.25 var(--font-sans); letter-spacing: 0.02em; }

.section-head p { margin-top: 0.9rem; color: var(--color-text-muted); font: 400 1.0625rem / 1.65 var(--font-sans); }

.alt-bg { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

/* Cards / grid */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface-raised-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.6rem;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover, .pricing-card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

/* Icones (charte 07) : jeu lineaire, trait 1,5 px, angles doux, jamais de
   pictogramme plein ni colore, couleur heritee du texte (currentColor).
   Le conteneur reste neutre (bordure, pas de fond colore) : seule la ligne
   de l'icone prend l'accent. */
.feature-card .icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.feature-card .icon svg { width: 1.375rem; height: 1.375rem; stroke: currentColor; }

.feature-card:hover .icon { border-color: var(--color-accent); }

.feature-card h3 { font: 600 1.0625rem / 1.3 var(--font-sans); margin-bottom: 0.5rem; }

.feature-card p { color: var(--color-text-muted); font: 400 0.9375rem / 1.6 var(--font-sans); }

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.compare-table th, .compare-table td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.compare-table thead th {
  background: var(--color-surface-2);
  font: 600 0.6875rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
}

.compare-table tbody tr:last-child td { border-bottom: none; }

.compare-table td:first-child { color: var(--color-text-muted); font-weight: 600; }

.tick { color: var(--color-success); font-weight: 600; }
.cross { color: var(--color-text-faint); }

/* Pricing */
.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.pricing-card.featured {
  border-color: var(--color-accent-strong);
  box-shadow: var(--shadow-card);
  position: relative;
}

.pricing-badge {
  position: absolute;
  top: -0.8rem;
  left: 1.4rem;
  background: var(--color-accent-strong);
  color: #071018;
  font: 600 0.6875rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}

.pricing-card h3 { font: 600 1.1875rem / 1.3 var(--font-sans); }

.pricing-card .price { font: 600 1.75rem / 1.2 var(--font-sans); letter-spacing: -0.02em; color: var(--color-text); }

.pricing-card .price small { font-size: 0.85rem; font-weight: 500; color: var(--color-text-muted); }

.pricing-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; font-size: 0.9rem; color: var(--color-text-muted); }

.pricing-card li { display: flex; gap: 0.55rem; align-items: flex-start; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1.15rem 0;
}

.faq-item summary {
  cursor: pointer;
  font: 600 1rem / 1.4 var(--font-sans);
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.15s ease;
}

.faq-item summary:hover { color: var(--color-accent-strong); }

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after { content: '+'; color: var(--color-accent-strong); font-size: 1.2rem; }

.faq-item[open] summary::after { content: '\2212'; }

.faq-item p { margin-top: 0.75rem; color: var(--color-text-muted); font-size: 0.94rem; }

/* Illustrated feature rows (Fonctionnalités page) */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3.5rem 0;
}

.feature-row + .feature-row { border-top: 1px solid var(--color-border); }

.feature-row.reverse .feature-row-media { order: 2; }

.feature-row-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.feature-row-body h2 { font: 600 clamp(1.25rem, 2.2vw, 1.625rem) / 1.3 var(--font-sans); letter-spacing: 0.02em; }

.feature-row-body p.lede-sm { margin-top: 0.9rem; color: var(--color-text-muted); font: 400 1.0625rem / 1.65 var(--font-sans); }

.feature-row-body ul {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.feature-row-body li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--color-text-base);
}

.feature-row-body li .tick { flex-shrink: 0; margin-top: 0.1rem; }

@media (max-width: 800px) {
  .feature-row { grid-template-columns: 1fr; gap: 1.5rem; }
  .feature-row.reverse .feature-row-media { order: 0; }
}

/* CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--color-accent-grad-from), var(--color-accent-grad-to));
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  color: #071018;
}

/* Motif discret : une simple grille de points, meme esprit epure que le
   fond du hero, plutot qu'un motif charge. */
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(7, 16, 24, 0.16) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
  pointer-events: none;
}

.cta-band > * { position: relative; }

.cta-band h2 { color: #071018; font-size: clamp(1.5rem, 3vw, 2rem); }

.cta-band p { margin-top: 0.75rem; color: rgba(7, 16, 24, 0.75); }

.cta-band .hero-actions { margin-top: 1.75rem; }

.cta-band .btn-ghost { background: rgba(7, 16, 24, 0.08); border-color: rgba(7, 16, 24, 0.2); color: #071018; }

/* Forms */
.form-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }

.form-field label { font-size: 0.82rem; font-weight: 600; color: var(--color-text-muted); }

.form-field input, .form-field textarea, .form-field select {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.65rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* Footer */
.site-footer { border-top: 1px solid var(--color-border); padding: 3rem 0 2.5rem; }

.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; }

.footer-grid h4 { font: 600 0.6875rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--color-text-faint); margin-bottom: 1rem; }

.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }

.footer-grid a { text-decoration: none; color: var(--color-text-muted); font-size: 0.9rem; }

.footer-grid a:hover { color: var(--color-text); }

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--color-text-faint);
}

/* Reveal au scroll (voir assets/main.js) : discret, desactive pour
   prefers-reduced-motion (l'observer applique is-visible immediatement
   dans ce cas plutot que de ne jamais reveler le contenu). */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Legere cascade sur les grilles de cards - detail qui evite l'effet
   "tout apparait d'un bloc" d'un reveal naif. */
.grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.grid .reveal:nth-child(5) { transition-delay: 0.24s; }
.grid .reveal:nth-child(6) { transition-delay: 0.3s; }

/* Lien avec fleche qui glisse au survol - detail utilise sur les liens
   d'action secondaires (voir .link-arrow dans les pages). */
.link-arrow { display: inline-flex; align-items: center; gap: 0.4rem; }

.link-arrow svg { width: 1rem; height: 1rem; transition: transform 0.2s ease; }

.link-arrow:hover svg { transform: translateX(3px); }

/* Utility */
.text-center { text-align: center; }
.mt-lg { margin-top: 3rem; }
.badge-list { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.badge-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
}

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .nav-right .lang-switch, .nav-right .btn { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  body[data-nav-open] .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 1.5rem 1rem;
  }
  body[data-nav-open] .nav-links a { padding: 0.6rem 0; width: 100%; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .compare-table { display: block; overflow-x: auto; }
}
