/* ==========================================================================
   DataLM — base.css
   Fondations : police, couleurs, mise en page, navigation, pied de page
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  --bg: #050b18;
  --bg-2: #071226;
  --bg-3: #0a1730;
  --surface: rgba(151, 181, 240, 0.045);
  --surface-2: rgba(151, 181, 240, 0.075);
  --surface-3: rgba(151, 181, 240, 0.11);
  --line: rgba(151, 181, 240, 0.14);
  --line-strong: rgba(151, 181, 240, 0.28);

  --text: #eef3fd;
  --text-2: #c2cede;
  --muted: #93a2bc;
  --dim: #7888a5;

  --blue: #3d7bff;
  --blue-2: #78a9ff;
  --blue-3: #bed5ff;
  --blue-deep: #1f50d8;
  --blue-glow: rgba(61, 123, 255, 0.38);

  --ok: #4bd6a4;
  --ok-bg: rgba(75, 214, 164, 0.1);
  --warn: #f0b46a;
  --warn-bg: rgba(240, 180, 106, 0.1);
  --danger: #ff8585;
  --danger-bg: rgba(255, 133, 133, 0.1);

  --font: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --container: 1200px;
  --header-h: 76px;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;

  --shadow-lg: 0 40px 100px -40px rgba(0, 0, 0, 0.9);
  --shadow-md: 0 22px 60px -30px rgba(0, 0, 0, 0.85);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: #2a3c60 var(--bg);
}

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

body.is-locked {
  overflow: hidden;
}

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

[hidden] {
  display: none !important;
}

svg {
  flex: none;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

::selection {
  color: #fff;
  background: rgba(61, 123, 255, 0.55);
}

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

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #26375a;
  border: 3px solid var(--bg);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #35507f;
}

/* --------------------------------------------------------------------------
   Fond de page : grille de contrôle + halos
   -------------------------------------------------------------------------- */

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1000px 680px at 82% -12%, rgba(48, 109, 255, 0.22), transparent 64%),
    radial-gradient(820px 620px at -8% 34%, rgba(28, 79, 216, 0.12), transparent 70%),
    radial-gradient(760px 520px at 65% 108%, rgba(32, 80, 190, 0.1), transparent 70%),
    linear-gradient(180deg, #050b18 0%, #050c1a 42%, #061022 100%);
}

.site-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(160, 190, 255, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 190, 255, 0.038) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 55% 8%, #000 0%, rgba(0, 0, 0, 0.6) 45%, transparent 82%);
  mask-image: radial-gradient(ellipse 90% 70% at 55% 8%, #000 0%, rgba(0, 0, 0, 0.6) 45%, transparent 82%);
}

.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font);
  color: var(--text);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.7rem, 5.8vw, 5.15rem);
}

h2 {
  font-size: clamp(1.95rem, 3.5vw, 3.05rem);
  line-height: 1.08;
}

h3 {
  font-size: clamp(1.18rem, 1.7vw, 1.42rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h4 {
  font-size: 1.02rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

strong {
  color: var(--text);
  font-weight: 600;
}

em {
  font-style: normal;
}

.lead {
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  line-height: 1.6;
  color: var(--text-2);
  font-weight: 450;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
  line-height: 1.55;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.text-blue {
  color: var(--blue-2);
}

.text-ok {
  color: var(--ok);
}

.text-warn {
  color: var(--warn);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.container--wide {
  width: min(100% - 48px, 1360px);
}

.section {
  position: relative;
  padding-block: clamp(72px, 9vw, 122px);
}

.section--tight {
  padding-block: clamp(52px, 6.5vw, 84px);
}

.section--line {
  border-top: 1px solid var(--line);
}

.section--panel {
  border-block: 1px solid var(--line);
  background:
    radial-gradient(900px 380px at 80% 0%, rgba(44, 100, 235, 0.11), transparent 70%),
    rgba(8, 18, 37, 0.5);
}

section[id],
div[id="main"] {
  scroll-margin-top: calc(var(--header-h) + 28px);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  color: #fff;
  background: var(--blue-deep);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Lignes de section
   -------------------------------------------------------------------------- */

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 32px 72px;
  align-items: end;
  margin-bottom: clamp(38px, 5vw, 64px);
}

.section-head__intro {
  color: var(--muted);
  font-size: 1rem;
  max-width: 46ch;
  padding-bottom: 6px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--blue-2);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue));
}

.kicker--dot::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(61, 123, 255, 0.12);
}

.section-head h2 {
  max-width: 18ch;
}

.section-head--center {
  display: block;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
}

.section-head--center h2 {
  margin-inline: auto;
}

.section-head--center .section-head__intro {
  margin: 18px auto 0;
}

.section-head--center .kicker {
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Boutons et liens d'action
   -------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.2s ease;
}

.btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.25s var(--ease);
}

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

.btn--primary {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 45%),
    linear-gradient(135deg, #417fff 0%, #2b63ee 55%, #1d4fd5 100%);
  border-color: rgba(152, 192, 255, 0.5);
  box-shadow:
    0 12px 32px -12px rgba(45, 108, 255, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 44px -14px rgba(45, 108, 255, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn--secondary {
  color: var(--text);
  background: rgba(151, 181, 240, 0.04);
  border-color: var(--line-strong);
}

.btn--secondary:hover {
  transform: translateY(-2px);
  background: rgba(151, 181, 240, 0.09);
  border-color: rgba(160, 193, 255, 0.48);
}

.btn--ghost {
  min-height: 42px;
  padding: 0;
  color: var(--blue-2);
  border-radius: 0;
  font-size: 0.9rem;
}

.btn--ghost:hover {
  color: var(--blue-3);
}

.btn--ghost svg {
  width: 15px;
  height: 15px;
}

.btn--small {
  min-height: 42px;
  padding-inline: 17px;
  font-size: 0.875rem;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-2);
  font-size: 0.9rem;
  font-weight: 600;
}

.link-arrow svg {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover svg {
  transform: translate(2px, -2px);
}

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(5, 11, 24, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 14px rgba(61, 123, 255, 0.28));
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  color: var(--text);
}

.brand-name span {
  color: var(--blue-2);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a:not(.btn) {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  color: var(--text-2);
  font-size: 0.885rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-nav a:not(.btn):hover {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a[aria-current="page"]::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.nav-cta {
  margin-left: 2px;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
}

.menu-toggle span:not(.sr-only) {
  position: absolute;
  left: 13px;
  width: 19px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease), opacity 0.2s ease;
}

.menu-toggle span:nth-child(1) {
  top: 18px;
}

.menu-toggle span:nth-child(2) {
  top: 26px;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 22px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  top: 22px;
  transform: rotate(-45deg);
}

.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;
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  margin-top: clamp(40px, 7vw, 90px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(700px 300px at 20% 0%, rgba(45, 108, 255, 0.08), transparent 70%),
    rgba(4, 9, 19, 0.6);
  overflow: hidden;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.9fr);
  gap: 48px;
  padding-block: clamp(48px, 6vw, 72px) 44px;
}

.footer-brand .brand {
  margin-bottom: 18px;
}

.footer-brand p {
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.93rem;
}

.footer-signature {
  margin-top: 14px;
  color: var(--text-2) !important;
  font-size: 0.86rem !important;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.footer-title {
  margin-bottom: 16px;
  color: var(--dim);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 20px;
}

.footer-nav a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

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

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-mail svg {
  width: 16px;
  height: 16px;
  color: var(--blue-2);
}

.footer-mail:hover {
  color: var(--blue-2);
}

.footer-social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.footer-social a:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.footer-social svg {
  width: 14px;
  height: 14px;
}

.footer-contact .btn {
  margin-top: 6px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  color: var(--dim);
  font-size: 0.8rem;
}

.footer-legal {
  display: flex;
  gap: 22px;
}

.footer-legal a {
  color: var(--dim);
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

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

.footer-word {
  position: relative;
  height: clamp(60px, 9vw, 118px);
  margin-top: 10px;
  overflow: hidden;
  color: transparent;
  font-size: clamp(5.4rem, 15.5vw, 13rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.78;
  text-align: center;
  -webkit-text-stroke: 1px rgba(140, 175, 245, 0.1);
  pointer-events: none;
  user-select: none;
}

/* --------------------------------------------------------------------------
   En-tête de page intérieure
   -------------------------------------------------------------------------- */

.page-hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(58px, 7vw, 90px));
  padding-bottom: clamp(48px, 6vw, 76px);
}

.page-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100% - 48px, var(--container));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--line-strong), var(--line) 45%, transparent);
}

.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 36px 80px;
  align-items: end;
}

.page-hero h1 {
  max-width: 17ch;
  font-size: clamp(2.5rem, 4.9vw, 4.3rem);
}

.page-hero__intro {
  max-width: 42ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  padding-bottom: 8px;
}

.page-hero__intro strong {
  color: var(--text-2);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--dim);
  font-size: 0.8rem;
}

.breadcrumb a {
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--text-2);
}

.breadcrumb svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Accessibilité / mouvement
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Responsive — fondations
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .site-nav {
    gap: 22px;
  }

  .site-nav ul {
    gap: 20px;
  }

  .site-nav a:not(.btn) {
    font-size: 0.84rem;
  }

  .nav-cta {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 68px;
  }

  .container,
  .container--wide {
    width: min(100% - 36px, var(--container));
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: calc(100dvh - var(--header-h));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 28px 24px 40px;
    background:
      radial-gradient(600px 300px at 90% 0%, rgba(45, 108, 255, 0.14), transparent 70%),
      #050b18;
    border-top: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s var(--ease), visibility 0.25s;
    overflow-y: auto;
  }

  .site-header.is-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav li {
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:not(.btn) {
    height: auto;
    padding: 17px 4px;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text);
  }

  .site-nav a:not(.btn)::after {
    left: auto;
    right: 6px;
    bottom: 50%;
    width: 6px;
    height: 6px;
    transform: translateY(50%);
  }

  .site-nav a[aria-current="page"]::after {
    transform: translateY(50%);
  }

  .nav-cta {
    display: inline-flex;
    margin-top: 24px;
    min-height: 48px;
  }

  .section-head,
  .page-hero__grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-head__intro,
  .page-hero__intro {
    padding-bottom: 0;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .container,
  .container--wide {
    width: min(100% - 32px, var(--container));
  }

  .brand-mark {
    width: 29px;
    height: 29px;
  }

  .brand-name {
    font-size: 1.06rem;
  }

  .hero-actions,
  .actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .actions-row .btn {
    width: 100%;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-legal {
    gap: 18px;
  }
}
