/* ==========================================================================
   JGJPayStock - Site vitrine : design tokens, reset, utilitaires
   Couleur de marque alignee sur l'application (#4361EE).
   ========================================================================== */

:root {
  /* Marque (indigo) */
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #4361ee;
  --brand-600: #3a4fd6;
  --brand-700: #3f37c9;
  --brand-800: #312e81;
  --brand-900: #1e1b4b;

  /* Accents */
  --accent-cyan: #22d3ee;
  --accent-violet: #7c3aed;

  /* Neutres */
  --ink-900: #0b1020;
  --ink-800: #131a2e;
  --ink-700: #1e2940;
  --ink-600: #334155;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-50: #f8fafc;

  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --bg-muted: #eef1f8;
  --surface: #ffffff;
  --border: #e6e9f2;
  --border-strong: #d4d9e6;

  --text: #131a2e;
  --text-muted: #5b6577;
  --text-subtle: #6b7280;
  --text-inverse: #ffffff;

  /* Semantiques */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Typo - les polices de repli sont ajustees aux metriques des polices reelles
     (size-adjust/ascent/descent) pour eviter tout decalage de mise en page (CLS)
     au moment ou Inter/Poppins remplacent le repli (FOUT). */
  --font-sans: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Poppins", "Poppins Fallback", "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Rayons */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  /* Ombres */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 10px 30px rgba(20, 30, 70, 0.10);
  --shadow-lg: 0 24px 60px rgba(20, 30, 70, 0.16);
  --shadow-brand: 0 16px 40px rgba(67, 97, 238, 0.28);

  /* Gradients */
  --grad-brand: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 100%);
  --grad-brand-soft: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
  --grad-hero: radial-gradient(1200px 600px at 80% -10%, rgba(67, 97, 238, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(124, 58, 237, 0.12), transparent 55%);

  /* Layout */
  --container: 1200px;
  --container-narrow: 880px;
  --header-h: 72px;

  --transition: 200ms ease;
}

/* ----- Polices auto-hebergees (sous-ensemble latin : FR / EN / DE) -----
   Servies en first-party (plus de requete tierce vers Google Fonts), woff2. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-400.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/inter-500.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-600.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/inter-700.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/poppins-500.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/poppins-600.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/poppins-700.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/poppins-800.woff2) format("woff2"); }

/* ----- Polices de repli ajustees (anti-CLS) -----
   Repli base sur Arial, redimensionne pour occuper le meme espace que la police
   reelle : la bascule vers Inter/Poppins ne provoque aucun reflux. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90%;
  descent-override: 22.43%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}
@font-face {
  font-family: "Poppins Fallback";
  src: local("Arial");
  ascent-override: 105%;
  descent-override: 35%;
  line-gap-override: 0%;
  size-adjust: 112%;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.15; color: var(--ink-900); font-weight: 700; letter-spacing: -0.02em; }

a { color: var(--brand-600); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-700); }

img { max-width: 100%; height: auto; display: block; }
svg { display: block; flex-shrink: 0; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 3px; border-radius: 4px; }

/* ----- Layout utilitaires ----- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--container-narrow); }

.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section--soft { background: var(--bg-soft); }
.section--muted { background: var(--bg-muted); }
.section--dark { background: var(--ink-900); color: var(--ink-200); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }

.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.nowrap { white-space: nowrap; }

/* En-tete de section */
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head--left { margin-left: 0; text-align: left; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand-600); background: var(--brand-50);
  padding: 6px 14px; border-radius: var(--radius-full); margin-bottom: 18px;
}
.section--dark .eyebrow { color: var(--brand-200); background: rgba(67, 97, 238, 0.18); }
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.section-subtitle { font-size: 1.075rem; color: var(--text-muted); }
.section--dark .section-subtitle { color: var(--ink-300); }

/* Grilles */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 20px; }
}

/* Reveal au scroll (anime par site.js) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }
