/* ==========================================================================
   PasEnAvant Digital — Design System
   main.css · Tokens, layout, components, utilities
   Author: PasEnAvant Digital · https://pasenavant.com
   ========================================================================== */

/* ----------------------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --c-electric: #2C4BFF;      /* bleu électrique */
  --c-electric-600: #1E37D8;
  --c-violet: #7A3CF0;        /* violet */
  --c-violet-600: #5E27C9;
  --c-night: #0B1437;         /* bleu nuit */
  --c-night-900: #060B22;
  --c-cyan: #38E1FF;          /* accent lumière cyan */

  /* Neutrals */
  --c-bg: #FAFAFA;
  --c-bg-soft: #F2F4FA;
  --c-surface: #FFFFFF;
  --c-ink: #0B1437;
  --c-ink-soft: #38406B;
  --c-muted: #6B7392;
  --c-line: #E7EAF3;
  --c-line-soft: #EFF1F8;

  /* Gradients */
  --grad-brand: linear-gradient(120deg, var(--c-electric) 0%, var(--c-violet) 100%);
  --grad-brand-soft: linear-gradient(120deg, #3a57ff 0%, #8b4ff5 60%, #38E1FF 130%);
  --grad-night: linear-gradient(160deg, #0B1437 0%, #131C4A 55%, #1B1148 100%);
  --grad-text: linear-gradient(100deg, var(--c-electric) 0%, var(--c-violet) 70%);
  --grad-halo: radial-gradient(closest-side, rgba(44,75,255,.28), rgba(122,60,240,.12) 60%, transparent);

  /* Typography */
  --font-display: "Space Grotesk", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-hero: clamp(2.6rem, 1.4rem + 5vw, 5.4rem);
  --fs-h1: clamp(2.2rem, 1.3rem + 3.6vw, 3.9rem);
  --fs-h2: clamp(1.8rem, 1.2rem + 2.4vw, 3rem);
  --fs-h3: clamp(1.3rem, 1.05rem + 1vw, 1.7rem);
  --fs-lead: clamp(1.06rem, .98rem + .5vw, 1.32rem);
  --fs-body: 1.02rem;
  --fs-sm: .92rem;
  --fs-xs: .8rem;

  /* Space scale */
  --sp-1: .35rem;  --sp-2: .6rem;  --sp-3: 1rem;  --sp-4: 1.5rem;
  --sp-5: 2.25rem; --sp-6: 3.25rem; --sp-7: 4.75rem; --sp-8: 7rem; --sp-9: 10rem;

  /* Radius */
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 34px; --r-pill: 999px;

  /* Shadows — extremely soft */
  --sh-xs: 0 1px 2px rgba(11,20,55,.05);
  --sh-sm: 0 6px 18px -10px rgba(11,20,55,.18);
  --sh-md: 0 22px 50px -28px rgba(11,20,55,.30);
  --sh-lg: 0 40px 90px -45px rgba(33,46,120,.45);
  --sh-glow: 0 24px 70px -30px rgba(44,75,255,.55);

  /* Layout */
  --container: 1240px;
  --container-wide: 1400px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 76px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: .25s; --t: .45s; --t-slow: .8s;
}

/* ----------------------------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--c-ink-soft);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--c-ink); line-height: 1.07; font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -.01em; }
p { color: var(--c-ink-soft); }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
:focus-visible { outline: 2px solid var(--c-electric); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(44,75,255,.18); color: var(--c-night); }

/* ----------------------------------------------------------------------------
   3. LAYOUT — 12 col grid, container, sections
   ------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: 880px; }

.section { padding-block: clamp(4rem, 8vw, var(--sp-8)); position: relative; }
.section--tight { padding-block: clamp(3rem, 5vw, var(--sp-6)); }

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.25rem, 2.5vw, 2rem); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px){ .cols-4 { grid-template-columns: repeat(2,1fr); } .cols-3 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 680px){ .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------
   4. TYPOGRAPHIC HELPERS
   ------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase;
  color: var(--c-electric);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--grad-brand); display: inline-block; }
.eyebrow--center::after { content: ""; width: 26px; height: 1px; background: var(--grad-brand); display: inline-block; }

.gradient-text {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lead { font-size: var(--fs-lead); color: var(--c-muted); line-height: 1.62; }
.section-head { max-width: 720px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: var(--sp-2); }
.section-head p { margin-top: var(--sp-3); }
.text-balance { text-wrap: balance; }

/* ----------------------------------------------------------------------------
   5. BUTTONS
   ------------------------------------------------------------------------- */
.btn {
  --bg: var(--grad-brand);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--font-display); font-weight: 500; font-size: .98rem;
  padding: .95rem 1.7rem; border-radius: var(--r-pill);
  color: #fff; background: var(--bg); position: relative; isolation: isolate;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease);
  box-shadow: var(--sh-glow); will-change: transform;
}
.btn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(120deg, var(--c-violet), var(--c-electric));
  opacity: 0; transition: opacity var(--t) var(--ease); z-index: -1;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 30px 70px -28px rgba(44,75,255,.7); }
.btn:hover::after { opacity: 1; }
.btn:active { transform: translateY(-1px); }
.btn .ico { width: 18px; height: 18px; transition: transform var(--t) var(--ease); }
.btn:hover .ico { transform: translateX(4px); }

.btn--ghost {
  background: var(--c-surface); color: var(--c-ink); box-shadow: var(--sh-sm);
  border: 1px solid var(--c-line);
}
.btn--ghost::after { background: var(--c-bg-soft); }
.btn--ghost:hover { color: var(--c-electric); box-shadow: var(--sh-md); }
.btn--ghost .ico { color: var(--c-electric); }

.btn--line {
  background: transparent; color: var(--c-ink); box-shadow: none;
  border: 1px solid var(--c-line);
}
.btn--line::after { background: var(--c-night); }
.btn--line:hover { color: #fff; box-shadow: var(--sh-md); }

.btn--light { background: #fff; color: var(--c-night); box-shadow: 0 20px 50px -20px rgba(0,0,0,.4); }
.btn--light::after { background: #f0f2ff; }
.btn--light:hover { color: var(--c-electric); }

.btn--lg { padding: 1.15rem 2.1rem; font-size: 1.05rem; }
.btn--sm { padding: .7rem 1.25rem; font-size: .9rem; box-shadow: none; }

.text-link {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 600;
  color: var(--c-electric); font-family: var(--font-display);
  transition: gap var(--t) var(--ease);
}
.text-link .ico { width: 16px; height: 16px; transition: transform var(--t) var(--ease); }
.text-link:hover { gap: .7rem; }
.text-link:hover .ico { transform: translateX(3px); }

/* ----------------------------------------------------------------------------
   6. CARDS / SURFACES / GLASS
   ------------------------------------------------------------------------- */
.card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); padding: clamp(1.6rem, 2.4vw, 2.3rem);
  box-shadow: var(--sh-sm); position: relative; overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: rgba(44,75,255,.25); }
.card__glow {
  position: absolute; inset: auto -30% -60% auto; width: 320px; height: 320px;
  background: var(--grad-halo); opacity: 0; transition: opacity var(--t-slow) var(--ease);
  pointer-events: none; filter: blur(6px);
}
.card:hover .card__glow { opacity: 1; }

.glass {
  background: rgba(255,255,255,.6); backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,.7); border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}

.icon-badge {
  width: 56px; height: 56px; border-radius: var(--r-md);
  display: grid; place-items: center; color: #fff; background: var(--grad-brand);
  box-shadow: var(--sh-glow); flex: none;
}
.icon-badge svg { width: 26px; height: 26px; }
.icon-badge--soft { background: linear-gradient(140deg, rgba(44,75,255,.12), rgba(122,60,240,.12)); color: var(--c-electric); box-shadow: none; border: 1px solid var(--c-line); }

/* decorative background orbs */
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; z-index: 0; }
.orb--blue { background: radial-gradient(circle, rgba(44,75,255,.55), transparent 70%); }
.orb--violet { background: radial-gradient(circle, rgba(122,60,240,.5), transparent 70%); }
.orb--cyan { background: radial-gradient(circle, rgba(56,225,255,.45), transparent 70%); }

/* ----------------------------------------------------------------------------
   7. REVEAL ANIMATIONS
   ------------------------------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); will-change: transform, opacity; }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"]{ transition-delay: .08s; }
[data-reveal-delay="2"]{ transition-delay: .16s; }
[data-reveal-delay="3"]{ transition-delay: .24s; }
[data-reveal-delay="4"]{ transition-delay: .32s; }
[data-reveal-delay="5"]{ transition-delay: .40s; }
[data-reveal="scale"] { transform: scale(.94); }
[data-reveal="scale"].is-visible { transform: none; }
[data-reveal="left"] { transform: translateX(-36px); }
[data-reveal="left"].is-visible { transform: none; }
[data-reveal="right"] { transform: translateX(36px); }
[data-reveal="right"].is-visible { transform: none; }

@media (prefers-reduced-motion: reduce){ [data-reveal]{ opacity:1 !important; transform:none !important; } }

/* Mobile: collapse 12-col grid layouts (storytelling, method) to single column.
   !important overrides inline grid-column:span N on the section children. */
@media (max-width: 760px){
  .grid-12 { grid-template-columns: 1fr; gap: 1.75rem; }
  .grid-12 > * { grid-column: 1 / -1 !important; }
}

/* Prevent horizontal reveal offsets from extending the page on small screens */
html { overflow-x: hidden; }
@media (max-width: 760px){
  [data-reveal="left"], [data-reveal="right"] { transform: translateY(26px); }
}
