/* =========================================================
   SYNTERIVA — Feuille de style principale
   Palette dérivée du logo : bleu nuit #12386E / vert #1E9E4A
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Marque */
  --navy-800: #0A1F3D;
  --navy-700: #12386E;
  --navy-600: #1A4E8A;
  --green-600: #16843E;
  --green-500: #1E9E4A;
  --green-400: #2FBB60;
  --green-300: #6BD894;

  /* Surfaces (thème clair par défaut) */
  --bg: #ffffff;
  --bg-alt: #f4f8fc;
  --bg-deep: var(--navy-800);
  --surface: #ffffff;
  --surface-2: #f7fafd;
  --border: #e3eaf3;
  --border-strong: #cfdbe9;

  /* Texte */
  --text: #0b1b2e;
  --text-soft: #33475e;
  --muted: #5b7189;
  --on-dark: #eaf2fb;
  --on-dark-muted: #9db2ca;

  /* Effets */
  --brand-gradient: linear-gradient(120deg, var(--navy-700) 0%, var(--navy-600) 45%, var(--green-500) 100%);
  --shadow-sm: 0 1px 2px rgba(11, 27, 46, .06), 0 2px 8px rgba(11, 27, 46, .05);
  --shadow-md: 0 8px 24px -8px rgba(11, 27, 46, .18), 0 2px 6px rgba(11, 27, 46, .05);
  --shadow-lg: 0 32px 60px -24px rgba(11, 27, 46, .30), 0 8px 20px -12px rgba(11, 27, 46, .16);

  /* Formes */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Rythme */
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(72px, 9vw, 128px);

  /* Typo */
  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #071324;
  --bg-alt: #0a1c31;
  --bg-deep: #050e1b;
  --surface: #0d2138;
  --surface-2: #102842;
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #e9f1fa;
  --text-soft: #c2d3e6;
  --muted: #92a8c1;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 32px 60px -24px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  color: var(--text);
}

h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.12rem, 1.6vw, 1.32rem); }
p  { margin: 0 0 1rem; color: var(--text-soft); }

::selection { background: var(--green-400); color: #04121f; }

:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 3. Utilitaires ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding-block: clamp(56px, 6vw, 88px); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 999;
  background: var(--navy-700);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-sm);
}
.skip-link:focus { left: 16px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--green-500);
}
[data-theme="dark"] .eyebrow { color: var(--green-400); }

.section-head { max-width: 660px; margin-bottom: clamp(38px, 5vw, 62px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head p { font-size: 1.06rem; color: var(--muted); margin-bottom: 0; }

.grad-text {
  background: linear-gradient(100deg, var(--navy-600) 5%, var(--green-500) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="dark"] .grad-text {
  background: linear-gradient(100deg, #6ea8ec 5%, var(--green-400) 95%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ---------- 4. Boutons ---------- */
.btn {
  --btn-bg: var(--navy-700);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .22s cubic-bezier(.2,.8,.3,1), box-shadow .22s ease, background-color .22s ease, border-color .22s ease, color .22s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary {
  background: var(--brand-gradient);
  background-size: 160% 160%;
  box-shadow: 0 10px 26px -12px rgba(18, 56, 110, .8);
}
.btn--primary:hover { background-position: 100% 0; box-shadow: 0 16px 34px -12px rgba(30, 158, 74, .6); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--navy-600); background: var(--surface-2); }

.btn--light { background: #fff; color: var(--navy-800); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn--outline-light:hover { background: rgba(255,255,255,.1); border-color: #fff; }

.btn--sm { padding: 10px 20px; font-size: .88rem; }

/* ---------- 5. En-tête ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding-block: 16px;
  transition: background-color .3s ease, box-shadow .3s ease, padding .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  padding-block: 9px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border);
  box-shadow: 0 6px 24px -18px rgba(11, 27, 46, .6);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 42px; width: auto; transition: height .3s ease; }
.header.is-stuck .brand img { height: 36px; }
.brand .logo--light { display: none; }
[data-theme="dark"] .brand .logo--dark { display: none; }
[data-theme="dark"] .brand .logo--light { display: block; }

.nav { margin-left: auto; }
/* Le CTA du panneau mobile reste caché sur grand écran */
.nav > .btn { display: none; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  position: relative;
  display: block;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-size: .93rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color .2s ease, background-color .2s ease;
}
.nav__link:hover { color: var(--text); background: var(--surface-2); }
.nav__link.is-active { color: var(--navy-700); font-weight: 600; }
[data-theme="dark"] .nav__link.is-active { color: var(--green-400); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  translate: -50% 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--green-500);
}

.header__actions { display: flex; align-items: center; gap: 10px; flex: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.icon-btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .icon-moon { display: none; }
[data-theme="dark"] .icon-btn .icon-sun { display: none; }
[data-theme="dark"] .icon-btn .icon-moon { display: block; }

/* Flex + gap : l'espacement des barres est fixe, donc la croix se ferme juste */
.burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .3s ease, opacity .2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5b. Sélecteur de langue ---------- */
.lang { position: relative; flex: none; }
.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color .2s ease, transform .2s ease;
}
.lang__btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.lang__btn svg { width: 18px; height: 18px; flex: none; }
.lang__code { letter-spacing: .04em; }

.lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 120;
  min-width: 158px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.lang__menu.is-open { opacity: 1; visibility: visible; transform: none; }
.lang__menu button {
  display: block;
  width: 100%;
  padding: 10px 13px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  text-align: start;
  font-size: .92rem;
  color: var(--text-soft);
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.lang__menu button:hover { background: var(--surface-2); color: var(--text); }
.lang__menu button[aria-current="true"] {
  background: rgba(30,158,74,.12);
  color: var(--green-600);
  font-weight: 600;
}
[data-theme="dark"] .lang__menu button[aria-current="true"] { color: var(--green-400); }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(130px, 16vw, 180px);
  padding-bottom: clamp(70px, 9vw, 110px);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 8%, rgba(30, 158, 74, .16), transparent 60%),
    radial-gradient(55% 60% at 8% 4%, rgba(18, 56, 110, .16), transparent 62%),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 72%);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, currentColor 1px, transparent 1px),
    linear-gradient(to bottom, currentColor 1px, transparent 1px);
  background-size: 68px 68px;
  color: var(--navy-700);
  opacity: .05;
  mask-image: radial-gradient(78% 62% at 50% 22%, #000 15%, transparent 78%);
  -webkit-mask-image: radial-gradient(78% 62% at 50% 22%, #000 15%, transparent 78%);
}
[data-theme="dark"] .hero__bg::after { opacity: .12; color: #7aa8e0; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(38px, 5vw, 68px);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 24px;
}
.badge b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(30, 158, 74, .12);
  color: var(--green-600);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
[data-theme="dark"] .badge b { color: var(--green-400); }
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 0 rgba(30, 158, 74, .55);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(30, 158, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 158, 74, 0); }
}

/* Hauteur réservée en deux colonnes : le mot qui tourne ne fait pas sauter la mise en page */
@media (min-width: 1025px) {
  .hero h1 { min-height: 3.45em; }
}

.hero__lead {
  font-size: clamp(1.03rem, 1.5vw, 1.17rem);
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 32px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  padding-top: 26px;
  border-top: 1px dashed var(--border-strong);
}
.hero__proof span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .87rem;
  color: var(--muted);
}
.hero__proof svg { width: 17px; height: 17px; color: var(--green-500); flex: none; }

/* Visuel hero */
.hero__visual { position: relative; }
.hero__glow {
  position: absolute;
  inset: -14% -8% -10%;
  z-index: 0;
  background: radial-gradient(50% 50% at 50% 50%, rgba(30, 158, 74, .22), transparent 68%);
  filter: blur(28px);
}

.window {
  position: relative;
  z-index: 1;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.window__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.window__dot:nth-child(1) { background: #ff5f57; }
.window__dot:nth-child(2) { background: #febc2e; }
.window__dot:nth-child(3) { background: #28c840; }
.window__title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
}
.window__body { padding: 22px 24px 26px; }

.code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1.85;
  color: var(--text-soft);
  overflow-x: auto;
}
.code .c-key { color: #b05bd6; }
.code .c-fn  { color: var(--navy-600); }
.code .c-str { color: var(--green-600); }
.code .c-com { color: var(--muted); opacity: .8; }
.code .c-num { color: #c2570f; }
[data-theme="dark"] .code .c-key { color: #cf8ef0; }
[data-theme="dark"] .code .c-fn  { color: #74b0f2; }
[data-theme="dark"] .code .c-str { color: var(--green-300); }
[data-theme="dark"] .code .c-num { color: #f0b46b; }

.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  translate: 0 2px;
  background: var(--green-500);
  animation: blink 1.05s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.float-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 17px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: floaty 6s ease-in-out infinite;
}
.float-card--a { top: -26px; right: -6px; }
.float-card--b { bottom: -28px; left: -22px; animation-delay: -3s; }
@keyframes floaty {
  50% { transform: translateY(-13px); }
}
.float-card__icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: rgba(30, 158, 74, .13);
  color: var(--green-600);
  flex: none;
}
.float-card--a .float-card__icon { background: rgba(18, 56, 110, .12); color: var(--navy-600); }
[data-theme="dark"] .float-card--a .float-card__icon { color: #7fb3ee; }
[data-theme="dark"] .float-card__icon { color: var(--green-400); }
.float-card__icon svg { width: 20px; height: 20px; }
.float-card small { display: block; font-size: .72rem; color: var(--muted); }
.float-card strong { font-family: var(--font-display); font-size: 1.02rem; }

/* ---------- 7. Bandeau logos ---------- */
.marquee {
  border-block: 1px solid var(--border);
  background: var(--bg);
  padding-block: 26px;
  overflow: hidden;
}
.marquee__label {
  text-align: center;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.marquee__track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: slide 34s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--muted);
  opacity: .72;
  white-space: nowrap;
  transition: opacity .2s ease, color .2s ease;
}
.marquee__item:hover { opacity: 1; color: var(--text); }
.marquee__item svg { width: 21px; height: 21px; }

/* ---------- 8. Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat { background: var(--surface); padding: 30px 26px; text-align: center; }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  background: linear-gradient(120deg, var(--navy-600), var(--green-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="dark"] .stat__value { background: linear-gradient(120deg, #74b0f2, var(--green-400)); -webkit-background-clip: text; background-clip: text; }
.stat__label { margin-top: 8px; font-size: .88rem; color: var(--muted); }

/* ---------- 9. Cartes services ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.card {
  position: relative;
  padding: 30px 28px 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.3,1), box-shadow .3s ease, border-color .3s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s cubic-bezier(.2,.8,.3,1);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 20px;
  border-radius: 15px;
  background: linear-gradient(140deg, rgba(18,56,110,.11), rgba(30,158,74,.13));
  color: var(--navy-700);
}
[data-theme="dark"] .card__icon { color: var(--green-400); background: linear-gradient(140deg, rgba(122,168,224,.14), rgba(47,187,96,.16)); }
.card__icon svg { width: 25px; height: 25px; }
.card p { font-size: .95rem; margin-bottom: 18px; }
.card__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.card__list li {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: .78rem;
  color: var(--muted);
}

/* ---------- 10. Expertise / stack ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(36px, 5vw, 66px);
  align-items: center;
}
.stack-groups { display: grid; gap: 16px; }
.stack-group {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.stack-group:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateX(4px); }
.stack-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .96rem;
  margin-bottom: 14px;
}
.stack-group h3 svg { width: 19px; height: 19px; color: var(--green-500); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li {
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.chips li:hover { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }

.feature-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 18px; }
.feature-list li { display: flex; gap: 14px; }
.feature-list .ck {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  flex: none;
  border-radius: 50%;
  background: rgba(30,158,74,.14);
  color: var(--green-600);
}
[data-theme="dark"] .feature-list .ck { color: var(--green-400); }
.feature-list .ck svg { width: 14px; height: 14px; }
.feature-list h4 { margin: 0 0 3px; font-size: 1rem; }
.feature-list p { margin: 0; font-size: .92rem; color: var(--muted); }

/* ---------- 11. Méthode ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 30px 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform .3s ease, box-shadow .3s ease;
}
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.step::after {
  content: "";
  position: absolute;
  top: 52px;
  right: -14px;
  width: 22px;
  height: 2px;
  background: repeating-linear-gradient(to right, var(--border-strong) 0 5px, transparent 5px 10px);
}
.step:last-child::after { display: none; }
.step__num {
  counter-increment: step;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: var(--brand-gradient);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
}
.step__num::before { content: "0" counter(step); }
.step h3 { font-size: 1.06rem; }
.step p { font-size: .91rem; margin: 0; color: var(--muted); }

/* ---------- 12. Réalisations ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.work {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.work:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.work__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: var(--brand-gradient);
  overflow: hidden;
}
.work--b .work__cover { background: linear-gradient(135deg, #0e2a52, #1a4e8a 55%, #2a6bb4); }
.work--c .work__cover { background: linear-gradient(135deg, #16843e, #1e9e4a 50%, #12386e); }
.work__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
}
.work__cover svg { width: 74px; height: 74px; color: rgba(255,255,255,.94); position: relative; }
.work__tag {
  position: absolute;
  top: 14px; left: 14px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(4, 18, 31, .42);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.work__body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.work__body p { font-size: .93rem; }
.work__kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.work__kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.28rem;
  color: var(--green-600);
  line-height: 1.2;
}
[data-theme="dark"] .work__kpi strong { color: var(--green-400); }
.work__kpi span { font-size: .78rem; color: var(--muted); }

/* ---------- 13. Témoignages ---------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.quote {
  position: relative;
  padding: 32px 28px 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.quote::before {
  content: "\201C";
  position: absolute;
  top: 6px; right: 22px;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--green-500);
  opacity: .16;
}
.quote p { font-size: .97rem; color: var(--text-soft); }
.quote__author { display: flex; align-items: center; gap: 13px; margin-top: 22px; }
.avatar {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
}
.quote__author strong { display: block; font-size: .93rem; }
.quote__author span { font-size: .82rem; color: var(--muted); }
.stars { display: flex; gap: 3px; margin-bottom: 14px; color: #e08b00; }
.stars svg { width: 15px; height: 15px; }

/* ---------- 14. FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.faq__item.is-open { border-color: var(--green-500); box-shadow: var(--shadow-md); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 19px 22px;
  border: 0;
  background: none;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.faq__q svg {
  width: 19px; height: 19px;
  flex: none;
  color: var(--green-500);
  transition: transform .3s ease;
}
.faq__item.is-open .faq__q svg { transform: rotate(45deg); }
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .32s cubic-bezier(.2,.8,.3,1);
}
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { margin: 0; padding: 0 22px 21px; font-size: .94rem; color: var(--muted); }

/* ---------- 15. CTA + Contact ---------- */
.cta-band {
  position: relative;
  padding: clamp(44px, 6vw, 68px) clamp(28px, 5vw, 64px);
  border-radius: var(--r-xl);
  background: var(--brand-gradient);
  color: #fff;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(80% 80% at 20% 0%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 80% at 20% 0%, #000, transparent 75%);
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,.86); margin: 0; max-width: 56ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Carte de contact principale (le formulaire a ete remplace par un contact direct) */
.contact-cta {
  position: relative;
  max-width: 720px;
  margin: 0 auto clamp(32px, 4vw, 48px);
  padding: clamp(34px, 5vw, 52px) clamp(24px, 4vw, 48px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
  overflow: hidden;
}
.contact-cta::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--brand-gradient);
}
.contact-cta__icon {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  margin: 0 auto 20px;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(18,56,110,.11), rgba(30,158,74,.14));
  color: var(--navy-700);
}
[data-theme="dark"] .contact-cta__icon { color: var(--green-400); background: linear-gradient(140deg, rgba(122,168,224,.14), rgba(47,187,96,.16)); }
.contact-cta__icon svg { width: 30px; height: 30px; }

.contact-cta__label {
  margin: 0 0 6px;
  font-size: .88rem;
  color: var(--muted);
}
.contact-cta__mail {
  display: inline-block;
  margin-bottom: 26px;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.4vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -.02em;
  word-break: break-word;
  background: linear-gradient(100deg, var(--navy-600) 5%, var(--green-500) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  border-bottom: 2px solid transparent;
  transition: border-color .25s ease;
}
[data-theme="dark"] .contact-cta__mail {
  background: linear-gradient(100deg, #6ea8ec 5%, var(--green-400) 95%);
  -webkit-background-clip: text;
  background-clip: text;
}
.contact-cta__mail:hover { border-bottom-color: var(--green-500); }

.contact-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
/* Repli affiché quand le clic sur « Écrire un email » n'ouvre aucune messagerie */
.mail-fallback {
  max-width: 52ch;
  margin: 22px auto 0;
  padding: 18px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  animation: fallback-in .3s ease both;
}
@keyframes fallback-in {
  from { opacity: 0; transform: translateY(-6px); }
}
.mail-fallback__text {
  margin: 0 0 14px;
  font-size: .88rem;
  color: var(--muted);
}
.mail-fallback__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.mail-fallback .btn svg { width: 16px; height: 16px; }

.contact-cta__hint {
  max-width: 52ch;
  margin: 26px auto 0;
  padding-top: 22px;
  border-top: 1px dashed var(--border-strong);
  font-size: .88rem;
  color: var(--muted);
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.contact-item {
  display: flex;
  gap: 15px;
  padding: 19px 21px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color .2s ease, transform .2s ease;
}
.contact-item:hover { border-color: var(--green-500); transform: translateY(-3px); }
.contact-item__icon {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  flex: none;
  border-radius: 12px;
  background: rgba(30,158,74,.13);
  color: var(--green-600);
}
[data-theme="dark"] .contact-item__icon { color: var(--green-400); }
.contact-item__icon svg { width: 20px; height: 20px; }
.contact-item strong { display: block; font-family: var(--font-display); font-size: .93rem; margin-bottom: 2px; }
.contact-item span, .contact-item a { font-size: .9rem; color: var(--muted); }
.contact-item a:hover { color: var(--green-600); }
[data-theme="dark"] .contact-item a:hover { color: var(--green-400); }


/* ---------- 16. Pied de page ---------- */
.footer {
  padding-top: clamp(56px, 6vw, 84px);
  background: var(--bg-deep);
  color: var(--on-dark);
}
.footer img { height: 44px; width: auto; margin-bottom: 18px; }
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 48px;
}
.footer p { color: var(--on-dark-muted); font-size: .92rem; max-width: 40ch; }
.footer h4 {
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer li a {
  font-size: .91rem;
  color: var(--on-dark-muted);
  transition: color .2s ease, padding-left .2s ease;
}
.footer li a:hover { color: var(--green-400); padding-left: 4px; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  color: var(--on-dark-muted);
  transition: background-color .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.socials a:hover { background: var(--green-500); border-color: var(--green-500); color: #fff; transform: translateY(-2px); }
.socials svg { width: 17px; height: 17px; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 22px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .85rem;
  color: var(--on-dark-muted);
}
.footer__bottom nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer__bottom a:hover { color: #fff; }

/* ---------- 17. Retour en haut ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  box-shadow: var(--shadow-lg);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-3px); }
.to-top svg { width: 19px; height: 19px; }

/* ---------- 18. Révélation au scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2,.8,.3,1), transform .7s cubic-bezier(.2,.8,.3,1);
  transition-delay: var(--d, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 19. Responsive ---------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; margin-inline: auto; }
  .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2n)::after { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: repeat(2, 1fr); }
}

/* En dessous de ~1100 px la barre de navigation complète ne tient plus
   (logo + 6 liens + bascule de thème + CTA) : on bascule sur le menu latéral. */
@media (max-width: 1100px) {
  .burger { display: flex; }
  /* La nav sort du flux : c'est le bloc d'actions qui est poussé à droite */
  .header__actions { margin-left: auto; }
  .header__actions > .btn { display: none; }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(330px, 84vw);
    padding: 96px 26px 32px;
    background: var(--bg);
    border-left: 1px solid var(--border);
    box-shadow: -20px 0 60px -30px rgba(0,0,0,.5);
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.2,.8,.3,1);
    overflow-y: auto;
  }
  .nav.is-open { transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav__link { padding: 13px 16px; border-radius: var(--r-sm); font-size: 1rem; }
  .nav__link.is-active::after { display: none; }
  .nav > .btn { display: inline-flex; margin-top: 18px; width: 100%; }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(4, 12, 22, .45);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
  }
  .nav-backdrop.is-open { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }

  .cta-band { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .steps { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .float-card--a { top: -18px; right: -4px; scale: .88; transform-origin: top right; }
  .float-card--b { bottom: -18px; left: -6px; scale: .88; transform-origin: bottom left; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
  .hero__proof { gap: 10px 18px; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .hero__cta .btn { width: 100%; }
}

/* ---------- 19b. Arabe : police et sens de lecture ---------- */
html[lang="ar"] {
  --font-display: "Cairo", "Segoe UI", system-ui, sans-serif;
  --font-body: "Cairo", "Segoe UI", system-ui, sans-serif;
}
/* L'écriture arabe est liée : l'interlettrage la casse, les capitales n'existent pas. */
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] .eyebrow,
html[lang="ar"] .footer h4,
html[lang="ar"] .marquee__label,
html[lang="ar"] .lang__code,
html[lang="ar"] .badge b { letter-spacing: normal; }
html[lang="ar"] .eyebrow,
html[lang="ar"] .footer h4,
html[lang="ar"] .marquee__label,
html[lang="ar"] .badge b { text-transform: none; }
html[lang="ar"] body { line-height: 1.85; }
html[lang="ar"] h1 { line-height: 1.35; }
html[lang="ar"] h2, html[lang="ar"] h3 { line-height: 1.4; }
/* Le bandeau de technologies et l'extrait de code restent en latin */
html[lang="ar"] .marquee__track,
html[lang="ar"] .chips,
html[lang="ar"] .card__list,
html[lang="ar"] .code { direction: ltr; }

[dir="rtl"] .nav { margin-left: 0; margin-inline-start: auto; }
[dir="rtl"] .float-card--a { right: auto; left: -6px; }
[dir="rtl"] .float-card--b { left: auto; right: -22px; }
[dir="rtl"] .step::after { right: auto; left: -14px; }
[dir="rtl"] .quote::before { right: auto; left: 22px; }
[dir="rtl"] .work__tag { left: auto; right: 14px; }
[dir="rtl"] .to-top { right: auto; left: 22px; }
[dir="rtl"] .stack-group:hover { transform: translateX(-4px); }
[dir="rtl"] .footer li a:hover { padding-left: 0; padding-right: 4px; }
/* Les flèches et icônes d'envoi pointent dans le sens de lecture */
[dir="rtl"] .btn--primary svg { transform: scaleX(-1); }
[dir="rtl"] .skip-link:focus { left: auto; right: 16px; }

@media (max-width: 1100px) {
  [dir="rtl"] .header__actions { margin-left: 0; margin-inline-start: auto; }
  [dir="rtl"] .nav {
    inset: 0 auto 0 0;
    border-left: 0;
    border-right: 1px solid var(--border);
    box-shadow: 20px 0 60px -30px rgba(0,0,0,.5);
    transform: translateX(-100%);
  }
  [dir="rtl"] .nav.is-open { transform: none; }
}

/* ---------- 20. Préférences & impression ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .header, .to-top, .marquee, .nav-backdrop, .float-card { display: none !important; }
  body { color: #000; background: #fff; }
  .section { padding-block: 24px; }
}
