/* ═══════════════════════════════════════════════════════════════
   Kompta URSSAF — module.css
   Tokens alignés sur style.css du hub, légère teinte bleutée.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Tokens ─────────────────────────────────────────────────── */
:root {
  /* Fonds — base sombre d'origine + léger reflet bleuté */
  --bg: #0f1219;
  --bg-elevated: #141823;
  --bg-card: #191f2c;
  --bg-card-hover: #1e2533;
  --bg-sidebar: #141823;

  /* Bordures */
  --border: #232b39;
  --border-hover: #303a4b;

  /* Texte */
  --text: #e6e9ee;
  --text-muted: #8b95a3;
  --text-dim: #5f6975;

  /* Accents */
  --accent: #4f8cff;
  --accent-hover: #6a9eff;
  --accent-dim: rgba(79, 140, 255, 0.12);

  /* Bouton primaire — bleu vif uni */
  --accent-btn: #4f7dff;
  --accent-btn-hover: #628cff;

  /* Sémantique */
  --success: #22c55e;
  --success-dim: rgba(34, 197, 94, 0.12);
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.12);

  /* Glass */
  --glass-bg: rgba(25, 31, 44, 0.68);
  --glass-bg-hover: rgba(30, 37, 51, 0.78);
  --glass-border: rgba(140, 150, 165, 0.1);
  --glass-border-hover: rgba(160, 172, 188, 0.18);
  --glass-blur: blur(14px);

  /* Divers */
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --container: 1140px;
  --container-narrow: 820px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --section-pad: clamp(4rem, 9vw, 7rem);
}

/* ─── Reset / base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

/* ─── Gating contextuel web / HubY ───────────────────────────── */
html[data-context="web"]  .show-in-huby { display: none !important; }
html[data-context="huby"] .show-on-web  { display: none !important; }

/* ─── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-pad); }
.section + .section { border-top: 1px solid var(--border); }

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 18, 25, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Carré blanc + logo HubY superposé */
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f4f7fc;
  padding: 5px;
  flex: 0 0 auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-mark-sm {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  padding: 3px;
}

.brand-name {
  font-size: 1.08rem;
  color: #ffffff;
  font-weight: 700;
}

.breadcrumb-sep { color: var(--text-dim); font-size: 0.95rem; }
.breadcrumb-current {
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}
.site-nav a {
  color: var(--text-muted);
  transition: color var(--transition);
}
.site-nav a:hover { color: var(--text); }

/* ─── Boutons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }

.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 1.4rem; font-size: 1rem; }

/* Bouton primaire — bleu vif uni, sans dégradé */
.btn-primary {
  color: #fff;
  background: var(--accent-btn);
  box-shadow: 0 4px 14px -4px rgba(79, 125, 255, 0.5);
}
.btn-primary:hover {
  background: var(--accent-btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(79, 125, 255, 0.65);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 0.55rem;
  transition: color var(--transition), gap var(--transition);
}
.link-arrow svg { width: 14px; height: 14px; transition: transform var(--transition); }
.link-arrow:hover { color: var(--accent-hover); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 7vw, 6rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(50% 60% at 25% 0%, rgba(79, 140, 255, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-content { max-width: 560px; }

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.35rem;
}
.hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 6px;
  flex: 0 0 auto;
}
.hero-title {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.hero-tagline {
  margin-top: 1.1rem;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  max-width: 42ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}
.meta-pill svg { width: 14px; height: 14px; }
.meta-pill-success {
  color: var(--success);
  background: var(--success-dim);
  border-color: rgba(34, 197, 94, 0.28);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--text-dim);
  font-size: 0.83rem;
}
.hero-note svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* Aperçu produit */
.hero-preview { position: relative; }
.preview-frame {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow:
    0 30px 60px -30px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.preview-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: top left;
}

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.36rem 0.85rem 0.36rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-accent {
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(79, 140, 255, 0.28);
}

/* Point clignotant doux */
.badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.22);
  animation: badge-pulse 2.4s ease-in-out infinite;
  flex: 0 0 auto;
}

@keyframes badge-pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.22);
  }
  50% {
    opacity: 0.55;
    box-shadow: 0 0 0 6px rgba(79, 140, 255, 0.05);
  }
}

/* ─── Sections ───────────────────────────────────────────────── */
.section-label {
  display: inline-block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.section-label.centered { display: block; text-align: center; }

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 26ch;
}
.section-title.centered { text-align: center; margin-inline: auto; }

.section-subtitle {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 60ch;
  text-align: center;
  margin-inline: auto;
}

.section-intro {
  margin-top: 1rem;
  color: var(--text-muted);
  max-width: 60ch;
}

.prose {
  margin-top: 1.75rem;
  display: grid;
  gap: 1.05rem;
  color: var(--text-muted);
  font-size: 1.02rem;
}
.prose strong { color: var(--text); font-weight: 700; }

.presentation-shot {
  margin: 2.75rem 0 0;
}
.presentation-shot img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: top left;
}
.presentation-shot figcaption {
  margin-top: 0.85rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}

/* ─── Grilles génériques ─────────────────────────────────────── */
.features-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.grid-4 {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.trust-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

/* ─── Cartes glass (features / personas / bénéfices) ─────────── */
.feature-card {
  padding: 1.6rem 1.5rem 1.7rem;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border-hover);
  background: var(--glass-bg-hover);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(79, 140, 255, 0.22);
  color: var(--accent);
  margin-bottom: 1rem;
}
.feature-icon svg { width: 20px; height: 20px; }

.feature-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ─── Cartes « sécurité » centrées ───────────────────────────── */
.trust-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.trust-card:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border-hover);
  background: var(--glass-bg-hover);
}
.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(79, 140, 255, 0.22);
  color: var(--accent);
  margin: 0 auto 1rem;
}
.trust-icon svg { width: 22px; height: 22px; }
.trust-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
}
.trust-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 30ch;
  margin-inline: auto;
}

/* ─── Tableau comparatif Excel ───────────────────────────────── */
.table-wrap {
  margin-top: 2.75rem;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.compare-table thead th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.compare-table tbody th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
}

.compare-table tbody td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  white-space: nowrap;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table .cell-icon {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 0.5rem;
}

.cell-bad {
  color: var(--danger);
}
.cell-bad .cell-icon { color: var(--danger); }

.cell-good {
  color: var(--success);
}
.cell-good .cell-icon { color: var(--success); }

/* ─── Étapes « Comment obtenir » ─────────────────────────────── */
.steps {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.1rem;
}

.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1.1rem;
  align-items: start;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color var(--transition), background var(--transition);
}
.step:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid rgba(79, 140, 255, 0.28);
}

.step-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.step-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ─── FAQ ────────────────────────────────────────────────────── */
.faq {
  margin-top: 2.5rem;
  display: grid;
  gap: 0.6rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  transition: border-color var(--transition), background var(--transition);
}
.faq-item[open] { border-color: var(--border-hover); background: var(--bg-card-hover); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  transition: transform var(--transition);
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--text-muted);
  border-radius: 1px;
  transition: transform var(--transition), background var(--transition);
}
.faq-icon::before { left: 0; top: 8px; width: 18px; height: 2px; }
.faq-icon::after  { top: 0; left: 8px; width: 2px; height: 18px; }
.faq-item[open] .faq-icon::after { transform: scaleY(0); }
.faq-item[open] .faq-icon::before { background: var(--accent); }

.faq-body {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding-block: 2.25rem;
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-brand span:not(.brand-mark):not(.footer-sep):not(.footer-note) {
  color: var(--text);
  font-weight: 700;
}
.footer-sep { color: var(--text-dim); }
.footer-note { color: var(--text-dim); }

/* ─── Animations d'entrée ────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-up.is-visible { opacity: 1; transform: none; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-preview { order: -1; }
  .hero-content { max-width: none; }
  .site-nav { display: none; }
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .features-grid,
  .grid-4 { grid-template-columns: 1fr; }
  .header-inner { gap: 0.6rem; min-height: 62px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
  .breadcrumb-sep, .breadcrumb-current { display: none; }
  .compare-table { font-size: 0.88rem; }
  .compare-table thead th,
  .compare-table tbody th,
  .compare-table tbody td { padding: 0.8rem 0.9rem; }
}

/* ─── Accessibilité : mouvement réduit ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .fade-up { opacity: 1; transform: none; }
  .badge-dot { animation: none; }
}

/* ─── Focus visible ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   Scrollbar stylisée au thème
   ═══════════════════════════════════════════════════════════════ */

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) transparent;
}

/* WebKit (Chrome, Edge, Safari, Tauri WebView2) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 8px;
  border: 2px solid var(--bg);
  background-clip: padding-box;
  transition: background var(--transition);
}

::-webkit-scrollbar-thumb:hover {
  background: #3a4558;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:active {
  background: var(--accent);
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: var(--bg);
}

/* Scrollbar fine pour les blocs défilants internes (tableau comparatif) */
.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
  border-width: 2px;
}