/* DGL Deploy — landing publique (admin.dgltechlabs.com/landing)
   Les tokens reprennent volontairement ceux de dgltechlabs.com : même famille visuelle,
   feuille de style autonome (ce site est servi indépendamment du site vitrine). */

/* ─── Tokens ─────────────────────────────────────────────────── */
:root {
  --clr-navy: #0f172a;
  --clr-blue: #2563eb;
  --clr-violet: #7c3aed;
  --clr-slate: #64748b;

  --bg-primary: #f8fafc;
  --bg-tinted: #f1f5f9;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.85);
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;

  --ff-head: 'Sora', system-ui, sans-serif;
  --ff-body: 'Inter', system-ui, sans-serif;

  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
  --shadow-xl: 0 24px 64px rgba(15, 23, 42, 0.14);
  --shadow-blue: 0 8px 32px rgba(37, 99, 235, 0.25);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Liste explicite, JAMAIS `all` : une transition sur `background` fige la couleur de fond au
     moment où la classe de thème change sur la racine — la carte reste alors à la couleur du
     thème précédent. On n'anime que ce qui réagit au survol. */
  --transition:
    color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

:root.dark {
  --clr-navy: #f8fafc;
  --clr-slate: #94a3b8;

  --bg-primary: #0b1120;
  --bg-tinted: #0f172a;
  --surface: #131c30;
  --surface-glass: rgba(30, 41, 59, 0.7);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #334155;

  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.55);
}

/* Sans JavaScript, aucune classe n'est posée : on respecte quand même la préférence système. */
@media (prefers-color-scheme: dark) {
  :root:not(.light):not(.dark) {
    --clr-navy: #f8fafc;
    --clr-slate: #94a3b8;
    --bg-primary: #0b1120;
    --bg-tinted: #0f172a;
    --surface: #131c30;
    --surface-glass: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
  }
}

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

html {
  scroll-behavior: smooth;
  /* La navigation par ancre ne doit pas glisser sous l'en-tête collant. */
  scroll-padding-top: 96px;
}

body {
  font-family: var(--ff-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

ul,
ol {
  list-style: none;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  left: 24px;
}

/* ─── Fond animé ─────────────────────────────────────────────── */
.bg-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: blobFloat 12s ease-in-out infinite alternate;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation-duration: 14s;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
  bottom: 10%;
  left: -150px;
  animation-duration: 10s;
  animation-delay: -4s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  animation-duration: 16s;
  animation-delay: -8s;
}

@keyframes blobFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(40px, -30px) scale(1.05);
  }
  66% {
    transform: translate(-30px, 20px) scale(0.96);
  }
  100% {
    transform: translate(20px, 40px) scale(1.02);
  }
}

/* ─── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  position: relative;
  z-index: 1;
  padding: 96px 0;
}

.section--tinted {
  background: var(--bg-tinted);
  border-block: 1px solid var(--border-color);
}

/* ─── Typographie ────────────────────────────────────────────── */
h1,
h2,
h3 {
  font-family: var(--ff-head);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 700;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-blue);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: linear-gradient(90deg, var(--clr-blue), var(--clr-violet));
  border-radius: 2px;
}

:root.dark .section-label {
  color: #7ea6ff;
}

.section-title {
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.0625rem;
  max-width: 620px;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 56px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--clr-blue) 0%, var(--clr-violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Boutons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--clr-blue), #4f46e5);
  color: #fff;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.4);
}

.btn-ghost {
  background: var(--surface-glass);
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
}

/* ─── En-tête ────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-color);
}

.navbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-head);
  font-weight: 700;
}

/* Le logo officiel, carré. `block` l'empêche de reposer sur la ligne de base du nom voisin. */
.brand__logo {
  display: block;
  flex: none;
}

.brand__name {
  font-size: 1.0625rem;
  color: var(--text-primary);
}

.navbar__links {
  display: flex;
  gap: 28px;
  margin-inline-start: auto;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.navbar__links a {
  transition: var(--transition);
}

.navbar__links a:hover {
  color: var(--clr-blue);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--clr-blue);
  border-color: rgba(37, 99, 235, 0.4);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon {
  display: none;
}

:root.dark .theme-toggle .icon-sun {
  display: none;
}

:root.dark .theme-toggle .icon-moon {
  display: block;
}

.navbar__cta {
  padding: 10px 18px;
  font-size: 0.875rem;
}

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  padding: 88px 0 72px;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Le logo du hero : l'actif officiel, carré, au-dessus de l'étiquette de section. */
.hero__logo {
  width: 240px;
  max-width: 70%;
  height: auto;
  margin-bottom: 24px;
}

.hero__lead {
  margin-top: 24px;
  max-width: 720px;
  font-size: 1.125rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

/* ─── Bloc « pourquoi » ──────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px;
  align-items: start;
}

.split__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 1.0625rem;
}

/* ─── Grilles & cartes ───────────────────────────────────────── */
.grid {
  display: grid;
  gap: 24px;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(37, 99, 235, 0.2);
}

.card-accent::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-blue), var(--clr-violet));
}

.card h3 {
  margin-bottom: 10px;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.12));
  color: var(--clr-blue);
}

:root.dark .card__icon {
  color: #7ea6ff;
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

/* ─── Pipeline ───────────────────────────────────────────────── */
.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.pipeline__step {
  position: relative;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

/* Le trait de liaison matérialise l'enchaînement ; masqué dès que les cartes s'empilent. */
.pipeline__step:not(.pipeline__step--final)::after {
  content: '';
  position: absolute;
  top: 44px;
  right: -24px;
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-color), transparent);
}

.pipeline__index {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--ff-head);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: transparent;
  background: linear-gradient(135deg, var(--clr-blue), var(--clr-violet));
  -webkit-background-clip: text;
  background-clip: text;
}

.pipeline__step h3 {
  margin-bottom: 10px;
  font-size: 1.0625rem;
}

.pipeline__step p {
  font-size: 0.9375rem;
}

/* ─── Détails d'ingénierie ───────────────────────────────────── */
.detail {
  position: relative;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--border-color);
  transition: var(--transition);
}

.detail:hover {
  border-left-color: var(--clr-blue);
}

.detail h3 {
  margin-bottom: 10px;
}

/* ─── Stack ──────────────────────────────────────────────────── */
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 56px;
}

.chips li {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.stack-notes .card {
  padding: 26px;
}

.stack-notes p {
  font-size: 0.9375rem;
}

/* ─── Appel à l'action ───────────────────────────────────────── */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 32px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.1), transparent 55%),
    radial-gradient(circle at 85% 100%, rgba(124, 58, 237, 0.1), transparent 55%), var(--surface);
}

.cta h2 {
  margin-bottom: 16px;
}

.cta p {
  max-width: 620px;
  font-size: 1.0625rem;
}

/* ─── Pied de page ───────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tinted);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.footer__note {
  font-size: 0.875rem;
}

.footer__note a {
  color: var(--clr-blue);
  font-weight: 500;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-inline-start: auto;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer__links a:hover {
  color: var(--clr-blue);
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .navbar__links {
    display: none;
  }

  .navbar__actions {
    margin-inline-start: auto;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section {
    padding: 72px 0;
  }
}

@media (max-width: 720px) {
  .pipeline__step::after {
    display: none;
  }

  .cta {
    padding: 48px 24px;
  }

  .footer__links {
    margin-inline-start: 0;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
