/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue-100); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-y); }
.section--gray { background: var(--gray-50); }
.section--night { background: var(--night); color: var(--white); overflow: hidden; }

/* ---------- Typographie ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; line-height: 20px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gray-500);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-600); box-shadow: 0 0 0 4px rgba(28, 100, 242, .14); }
.section--night .eyebrow { color: rgba(255, 255, 255, .62); }
.section--night .eyebrow::before { background: var(--blue-400); box-shadow: 0 0 0 4px rgba(118, 169, 250, .16); }

.h1, .h2, .h3 { font-family: var(--font-display); font-weight: 500; color: var(--ink); }
.section--night .h2, .section--night .h3 { color: var(--white); }
.h1 { font-size: clamp(32px, 3.9vw, 50px); line-height: 1.16; letter-spacing: -.025em; }
.h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.15; letter-spacing: -.022em; text-wrap: balance; }
.h3 { font-size: 20px; line-height: 1.35; letter-spacing: -.01em; }
.lead { font-size: clamp(16px, 1.35vw, 19px); line-height: 1.6; color: var(--gray-600); text-wrap: pretty; }
.section--night .lead { color: rgba(255, 255, 255, .68); }
.muted { color: var(--gray-500); }
.grad-text {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: gradShift 8s var(--ease-in-out) infinite alternate;
}
@keyframes gradShift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.section-head { display: grid; gap: 16px; max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

/* ---------- Boutons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap; cursor: pointer; user-select: none;
  transform: translate3d(var(--mx), var(--my), 0);
  transition: transform .5s var(--ease), background-color .25s, border-color .25s, box-shadow .3s var(--ease), color .25s;
}
.btn .arrow { display: inline-block; transition: transform .45s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn::after { /* reflet qui balaie le bouton */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .9s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn-primary { background: var(--blue-600); border: 1px solid var(--blue-600); color: var(--white); box-shadow: var(--shadow-cta), 0 8px 24px -8px rgba(28, 100, 242, .55); }
.btn-primary:hover { background: var(--blue-700); box-shadow: var(--shadow-cta), 0 14px 32px -10px rgba(28, 100, 242, .7); }
.btn-ghost { background: var(--white); border: 1px solid var(--gray-200); color: var(--ink); box-shadow: var(--shadow-card); }
.btn-ghost::after { background: linear-gradient(110deg, transparent 30%, rgba(28, 100, 242, .08) 50%, transparent 70%); }
.btn-ghost:hover { border-color: var(--gray-300); }
.btn-white { background: var(--white); border: 1px solid var(--white); color: var(--ink); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
.btn-white::after { background: linear-gradient(110deg, transparent 30%, rgba(28, 100, 242, .12) 50%, transparent 70%); }
.btn-glass { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); color: var(--white); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); box-shadow: var(--shadow-cta); }
.btn-glass:hover { background: rgba(255, 255, 255, .12); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); border-bottom: 1px solid transparent; transition: border-color .25s, color .25s; }
.link-arrow:hover { color: var(--blue-600); border-color: currentColor; }
.link-arrow .arrow { transition: transform .45s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(3px); }
.section--night .link-arrow { color: var(--white); }

/* ---------- Pastilles ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: var(--pill);
  font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .01em;
  background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200);
  white-space: nowrap;
}
.tag--demo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber-600); }
.tag--blue { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.tag--green { background: var(--green-50); color: var(--green-600); border-color: #bcf0da; }
.tag--amber { background: #fef3c7; color: var(--amber-600); border-color: #fde68a; }
.tag--glass { background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .14); }

/* ---------- Bandeau d’annonce ---------- */
.announce {
  position: relative; z-index: 60;
  background: var(--night); color: rgba(255, 255, 255, .86);
  font-size: 14px; line-height: 20px;
}
.announce a { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 8px var(--gutter); text-align: center; }
.announce .tag { height: 22px; background: rgba(28, 100, 242, .22); border-color: rgba(118, 169, 250, .35); color: #cfe0ff; }
.announce strong { color: var(--white); font-weight: 600; }
@media (max-width: 560px) { .announce .hide-sm { display: none; } .announce a { font-size: 13.5px; white-space: nowrap; } }
.announce .arrow { transition: transform .45s var(--ease); }
.announce a:hover .arrow { transform: translateX(4px); }

/* ---------- Navigation ---------- */
.nav-wrap { position: sticky; top: 0; z-index: 50; height: var(--nav-h); pointer-events: none; transition: transform .55s var(--ease); }
.nav-wrap.is-hidden { transform: translateY(-110%); }
.nav {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 56px; margin: 6px auto 0; padding: 0 8px 0 18px;
  width: min(100% - var(--gutter) * 2, var(--container));
  border-radius: var(--radius-md); border: 1px solid transparent;
  transition: width .6s var(--ease), background-color .4s, border-color .4s, box-shadow .4s, backdrop-filter .4s;
}
.nav-wrap.is-scrolled .nav {
  width: min(100% - var(--gutter) * 2, 980px);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border-color: rgba(229, 231, 235, .9);
  box-shadow: 0 8px 32px -12px rgba(16, 24, 40, .16);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.02em; color: var(--ink); }
.brand-mark {
  position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--grad-blue); color: var(--white); font-size: 15px; box-shadow: var(--shadow-cta), 0 4px 12px -4px rgba(28, 100, 242, .6);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 500; color: var(--gray-600); transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--ink); background: var(--gray-100); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 420px) { .nav-cta .btn-ghost { display: none; } }

/* ---------- Pied de page ---------- */
.footer { border-top: 1px solid var(--gray-200); padding-block: 40px; font-size: 14px; color: var(--gray-500); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a:hover { color: var(--ink); }
.footer .brand { font-size: 16px; }
.footer .brand-mark { width: 24px; height: 24px; border-radius: 7px; font-size: 12px; }

/* ---------- Avatar ---------- */
.avatar {
  position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: var(--grad-blue); color: var(--white);
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--gray-200);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- États avant animation ----------
   La classe .motion est posée dans <head> seulement si les animations sont permises ;
   elle est retirée au bout de 3 s si le script ne s’est pas lancé. */
.motion [data-reveal], .motion [data-stagger] > * { opacity: 0; }
.motion [data-split] { opacity: 0; }
.motion .is-split[data-split] { opacity: 1; }
.word { display: inline-block; will-change: transform, filter, opacity; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--pill);
  background: var(--ink); color: var(--white); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-xl);
  transition: opacity .35s var(--ease), transform .5s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
