/*
   DEVIM — Studio de développement web
   Identité « COBALT NET » — blanc franc, cobalt,
   rigueur blueprint / ingénierie.
    */

:root {
  /* ---- Surfaces & encres ---- */
  --bg:          #FFFFFF;
  --surface:     #F4F6FB;
  --surface-2:   #EAEEF7;
  --ink:         #0B1220;
  --ink-2:       #3B4658;
  --muted:       #6B7689;
  --line:        #E4E9F2;
  --line-2:      #D5DCEA;

  /* ---- Accent cobalt ---- */
  --cobalt:      #1D4ED8;
  --cobalt-700:  #1E40AF;
  --cobalt-300:  #93B4FB;
  --cobalt-tint: rgba(29, 78, 216, 0.06);
  --sky:         #0EA5E9;
  --ink-band:    #0B1220;
  --ok:          #16A34A;

  --grad:        linear-gradient(135deg, #1D4ED8, #0EA5E9);

  /* ---- Typo ---- */
  --font-display: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-body:    'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* ---- Espacements ---- */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  3rem;
  --space-xl:  5rem;
  --space-2xl: 8rem;

  --container: 76rem;
  --radius-sm: 7px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.04), 0 4px 12px rgba(11, 18, 32, 0.05);
  --shadow-md: 0 4px 14px rgba(11, 18, 32, 0.06), 0 18px 40px rgba(11, 18, 32, 0.08);
  --shadow-cobalt: 0 8px 22px rgba(29, 78, 216, 0.28);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

::selection {
  background: rgba(29, 78, 216, 0.16);
  color: var(--ink);
}

:focus-visible {
  outline: 2.5px solid var(--cobalt);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 200;
  background: var(--cobalt);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
}
.skip-link:focus {
  left: 0.75rem;
}

/* ---- Container ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---- Section header ---- */
.section__header {
  margin-bottom: var(--space-xl);
  max-width: 46rem;
}
.section__header--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: var(--space-md);
  position: relative;
  padding-bottom: 0.65rem;
}
.section__label::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.4rem;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}
.section__header--center .section__label {
  margin-left: auto;
  margin-right: auto;
}
.section__header--center .section__label::after {
  left: 50%;
  transform: translateX(-50%);
}
.section__label--light {
  color: var(--cobalt-300);
}
.section__label--light::after {
  background: linear-gradient(135deg, var(--cobalt-300), var(--sky));
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.022em;
  text-wrap: balance;
}

/* Sauts de ligne décoratifs : visibles en desktop, neutralisés dès que
   la largeur diminue pour laisser le navigateur équilibrer le wrap. */
.brk { display: inline; }

.section__desc {
  margin: var(--space-md) auto 0;
  color: var(--ink-2);
  max-width: 38rem;
  font-size: 1.05rem;
  line-height: 1.7;
}
.section__header:not(.section__header--center) .section__desc {
  margin-left: 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.9rem 1.7rem;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  line-height: 1;
}

.btn__arrow { transition: transform 0.25s ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--primary {
  background: var(--cobalt);
  color: #fff;
  box-shadow: var(--shadow-cobalt);
}
.btn--primary:hover {
  background: var(--cobalt-700);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(29, 78, 216, 0.34);
}

.btn--outline {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line-2);
}
.btn--outline:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
  background: var(--cobalt-tint);
  transform: translateY(-2px);
}

.btn--light {
  background: #fff;
  color: var(--cobalt-700);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.btn--light:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
}

.btn--lg {
  padding: 1.05rem 2rem;
  font-size: 1rem;
}

/*
   NAVIGATION
    */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 24px rgba(11, 18, 32, 0.05);
}

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s ease;
}
.nav__logo:hover { opacity: 0.75; }

.nav__logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin: -10px;
  z-index: 101;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}
.nav__links a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s ease;
  /* Aucun libellé de nav ne doit wrapper sur 2 lignes et déformer la barre. */
  white-space: nowrap;
}
.nav__links a:hover { color: var(--ink); }

/* État actif : couleur + filet dégradé, SANS toucher au font-weight
   (éviter tout layout shift des liens voisins au scroll). */
.nav__links a:not(.nav__cta).is-active { color: var(--ink); }
.nav__links a:not(.nav__cta).is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.4rem;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.nav__cta {
  background: var(--cobalt) !important;
  color: #fff !important;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.22);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}
.nav__cta:hover {
  background: var(--cobalt-700) !important;
  box-shadow: 0 8px 22px rgba(29, 78, 216, 0.3);
  transform: translateY(-1px);
}

/* ---- Toggle de langue FR | EN (segmenté, sélecteur de LANGUE) ----
   Affordance explicite via une icône globe en tête du groupe. */
.nav__lang {
  display: inline-flex;
  align-items: center;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  /* Sur la nav non scrollée (au-dessus du hero blanc/grille blueprint),
     le toggle se fond dans le fond translucide au lieu d'un rectangle gris
     flottant ; --surface est restauré une fois .nav--scrolled actif. */
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(11, 18, 32, 0.08);
  border-radius: var(--radius);
  transition: background 0.35s ease, border-color 0.35s ease;
}

/* Icône globe : signale qu'il s'agit d'un choix de langue, pas d'un
   breadcrumb ou d'un numéro de version. Décorative (aria-hidden). */
.lang-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 0.35rem;
  padding-right: 0.1rem;
  color: var(--muted);
  pointer-events: none;
}
.lang-toggle__icon svg { display: block; }

.lang-toggle__btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.38rem 0.6rem;
  min-width: 2.3rem;
  /* Inactif : --ink-2 (#3B4658) ≈ 9:1 sur surface claire, > AA 4.5:1,
     vs --muted (#6B7689) ≈ 3.9:1 qui passait sous le seuil. */
  color: var(--ink-2);
  /* Léger fond pour détacher l'option inactive (lisible aussi sur la nav
     scrollée translucide). */
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.lang-toggle__btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
}

.lang-toggle__btn:focus-visible {
  outline: 2.5px solid var(--cobalt);
  outline-offset: 2px;
}

/* Langue active : pastille pleine cobalt, texte blanc (contraste fort). */
.lang-toggle__btn--active,
.lang-toggle__btn[aria-pressed="true"] {
  color: #fff;
  background: var(--cobalt);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.28);
}
.lang-toggle__btn--active:hover,
.lang-toggle__btn[aria-pressed="true"]:hover {
  color: #fff;
  background: var(--cobalt);
}

/* Nav scrollée (ou pages légales, déjà .nav--scrolled) : le toggle reprend
   le fond --surface opaque, plus net sur la barre blanche translucide. */
.nav--scrolled .lang-toggle {
  background: var(--surface);
  border-color: var(--line);
}

/*
   HERO
    */
.hero {
  position: relative;
  padding: calc(var(--space-2xl) + 2.5rem) 0 var(--space-2xl);
  background:
    radial-gradient(120% 90% at 85% 0%, var(--surface) 0%, var(--bg) 55%),
    var(--bg);
  overflow: hidden;
}

/* Grille blueprint en fond */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(29, 78, 216, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(29, 78, 216, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 80% at 70% 8%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 80% at 70% 8%, #000 0%, transparent 72%);
  pointer-events: none;
}
.hero__glow {
  position: absolute;
  top: -16%;
  right: -8%;
  width: 46rem;
  height: 46rem;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.16), rgba(14, 165, 233, 0.08) 42%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero__content { max-width: 40rem; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: var(--space-md);
  padding: 0.4rem 0.85rem 0.4rem 0.7rem;
  background: var(--cobalt-tint);
  border: 1px solid rgba(29, 78, 216, 0.16);
  border-radius: 100px;
}
.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cobalt);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.15);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.04;
  margin-bottom: var(--space-md);
  color: var(--ink);
  letter-spacing: -0.03em;
  /* EN : mots longs non sécables ('applications', 'Custom-built',
     'day-to-day') autorisés à se couper proprement plutôt que de déborder
     la colonne du grid. hyphens:auto s'appuie sur <html lang> (posé par
     applyLang) pour une césure correcte selon la langue. */
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__subtitle {
  font-size: 1.12rem;
  line-height: 1.72;
  color: var(--ink-2);
  max-width: 34rem;
  margin-bottom: var(--space-lg);
}

.hero__actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.hero__trust svg { color: var(--cobalt); flex-shrink: 0; }

/* ---- Panneau code signature ---- */
.hero__panel {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 30rem;
}

.codepane {
  background: #0B1220;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 30px 60px -20px rgba(11, 18, 32, 0.45),
    0 0 0 1px rgba(29, 78, 216, 0.2);
  transform: perspective(1400px) rotateY(-7deg) rotateX(2deg);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero__panel:hover .codepane {
  transform: perspective(1400px) rotateY(-3deg) rotateX(1deg) translateY(-4px);
}

.codepane__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: #11192b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.codepane__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.codepane__dot:nth-child(1) { background: #ff5f57; }
.codepane__dot:nth-child(2) { background: #febc2e; }
.codepane__dot:nth-child(3) { background: #28c840; }
.codepane__file {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
}

.codepane__body {
  margin: 0;
  padding: 1.25rem 1.4rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.85;
  color: #c5d1e6;
  white-space: pre;
  overflow-x: auto;
  tab-size: 2;
}
.codepane__body code { font-family: inherit; }
.c-key  { color: #7cb0ff; }
.c-var  { color: #e2e8f0; }
.c-prop { color: #93c5fd; }
.c-str  { color: #5fd6a8; }
.c-bool { color: #f0a868; }
.c-fn   { color: #38bdf8; }
.cursor {
  color: var(--sky);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__badge {
  position: absolute;
  bottom: -1.1rem;
  left: -1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.55rem 1rem 0.55rem 0.6rem;
  box-shadow: var(--shadow-md);
}
.hero__badge-k {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.82rem;
  color: #fff;
  background: var(--grad);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
}
.hero__badge-t {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

/*
   SERVICES
    */
.services { padding: var(--space-2xl) 0; }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.service-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-card:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.service-card:hover::before { transform: scaleX(1); }

.service-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}
.service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--cobalt-tint);
  border: 1px solid rgba(29, 78, 216, 0.12);
  color: var(--cobalt);
  transition: background 0.3s ease, color 0.3s ease;
}
.service-card:hover .service-card__icon {
  background: var(--cobalt);
  color: #fff;
}
.service-card__number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--line-2);
  letter-spacing: 0.05em;
}

.service-card__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.service-card__desc {
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}
.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.service-card__tags li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  color: var(--ink-2);
  background: #fff;
}

/*
   REALISATIONS
    */
.realisations {
  padding: var(--space-2xl) 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.projects {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.project {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-xl);
  align-items: center;
}
.project--reverse .project__visual { order: 2; }

/* ---- Visuel / device frame ---- */
.project__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) var(--space-md);
}
.project__visual::before {
  content: '';
  position: absolute;
  inset: 8% 4%;
  background: radial-gradient(circle at 50% 40%, rgba(29, 78, 216, 0.16), transparent 68%);
  filter: blur(6px);
  border-radius: 40%;
  z-index: 0;
}

.device {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px -24px rgba(11, 18, 32, 0.35), 0 4px 16px rgba(11, 18, 32, 0.08);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
}
.project:hover .device {
  transform: translateY(-6px);
  box-shadow: 0 40px 80px -28px rgba(29, 78, 216, 0.32), 0 6px 20px rgba(11, 18, 32, 0.1);
}

/* Browser frame (desktop captures) */
.device--browser {
  width: 100%;
  max-width: 34rem;
  border-radius: 14px;
  overflow: hidden;
}
.device__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 0.85rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.device__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line-2);
}
.device__dot:nth-child(1) { background: #ff5f57; }
.device__dot:nth-child(2) { background: #febc2e; }
.device__dot:nth-child(3) { background: #28c840; }
.device__url {
  margin-left: 0.6rem;
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.22rem 0.6rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Phone frame (PWA mobile capture) */
.device--phone {
  width: 100%;
  max-width: 15rem;
  border-radius: 32px;
  padding: 0.55rem;
  background: #0B1220;
  border-color: #1a2438;
}
.device--phone .device__screen {
  border-radius: 24px;
}
/* Réserve une fine barre de statut en haut de l'écran pour que le notch
   (posé en absolu au-dessus) ne masque pas le header de la PWA capturée.
   Le padding réduit la box de .shot (relative) ; le fallback (absolu) est
   décalé manuellement pour rester sous la barre. */
.device--phone .device__screen {
  padding-top: 1.7rem;
  background: var(--ink);
}
.device--phone .shot-fallback {
  top: 1.7rem;
}
.device__notch {
  position: absolute;
  top: 0.95rem;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 1.1rem;
  background: #0B1220;
  border-radius: 0 0 12px 12px;
  z-index: 3;
}

/* Screen (fallback + img) */
.device__screen {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  aspect-ratio: 9 / 19.5;
}
.device__screen--wide {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.shot {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Fallback CSS visible si la capture manque */
.shot-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(29, 78, 216, 0.12), rgba(14, 165, 233, 0.1)),
    var(--bg);
  padding: 12%;
  display: flex;
  flex-direction: column;
  gap: 8%;
}
.shot-fallback::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(29, 78, 216, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(29, 78, 216, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.shot-fallback__bar {
  height: 9%;
  border-radius: 5px;
  background: var(--grad);
  width: 55%;
}
.shot-fallback__chips {
  display: flex;
  gap: 6%;
}
.shot-fallback__chips span {
  flex: 1;
  height: 2.6rem;
  border-radius: 7px;
  background: rgba(29, 78, 216, 0.12);
  border: 1px solid rgba(29, 78, 216, 0.16);
}
.shot-fallback__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6%;
  flex: 1;
}
.shot-fallback__tiles span {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}
.shot-fallback__rows {
  display: flex;
  flex-direction: column;
  gap: 4%;
  flex: 1;
}
.shot-fallback__rows span {
  height: 16%;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

/* ---- Project info ---- */
.project__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.project__badge {
  display: inline-block;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.8rem;
  background: var(--cobalt-tint);
  border: 1px solid rgba(29, 78, 216, 0.16);
  border-radius: 100px;
  color: var(--cobalt);
  margin-bottom: var(--space-sm);
}
.project__name {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--ink);
}
.project__desc {
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.72;
  margin-bottom: var(--space-md);
}
.project__note {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cobalt);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: var(--space-md);
}
.project__note-k {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cobalt);
  margin-bottom: 0.25rem;
}
.project__note strong { color: var(--ink); }

.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: var(--space-md);
}
.project__tags li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.28rem 0.65rem;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  color: var(--ink-2);
}

.project__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cobalt);
}
.project__link svg { transition: transform 0.25s ease; }
.project__link:hover { color: var(--cobalt-700); }
.project__link:hover svg { transform: translateX(5px); }

/*
   METHODE
    */
.methode { padding: var(--space-2xl) 0; }

.methode__steps {
  display: flex;
  flex-direction: column;
  max-width: 48rem;
}

.step {
  display: flex;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
}
.step:last-child { padding-bottom: 0; }

.step__marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  width: 3rem;
}
.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--cobalt);
  background: var(--cobalt-tint);
  border: 1px solid rgba(29, 78, 216, 0.18);
  transition: background 0.3s ease, color 0.3s ease;
}
.step:hover .step__number {
  background: var(--cobalt);
  color: #fff;
}
.step__line {
  flex: 1;
  width: 2px;
  min-height: 2rem;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cobalt-300), transparent);
}

.step__content {
  flex: 1;
  padding-top: 0.4rem;
  max-width: 38rem;
}
.step__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.step__desc {
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.72;
}

/*
   STATS
    */
.stats {
  padding: var(--space-xl) 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.stat {
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  position: relative;
}
.stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: var(--line-2);
}

.stat__value {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
}
.stat__number {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat__suffix {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 700;
  color: var(--cobalt);
}
.stat__suffix--lead {
  margin-right: 0.05em;
}
.stat__label {
  display: block;
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 0.6rem;
  font-weight: 500;
  /* Hauteur min ≈ 2 lignes : absorbe les labels EN plus longs
     ('Of development experience', 'Custom-built, no templates') sans casser
     l'alignement vertical des chiffres entre colonnes. */
  min-height: 2.6em;
}

/*
   CONTACT
    */
.contact { padding: var(--space-2xl) 0; }

.contact__inner {
  position: relative;
  text-align: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--space-md);
  background: var(--ink-band);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.contact__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000, transparent 70%);
  mask-image: radial-gradient(120% 100% at 50% 0%, #000, transparent 70%);
}
.contact__glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 44rem;
  height: 44rem;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.4), rgba(14, 165, 233, 0.14) 40%, transparent 68%);
  pointer-events: none;
}

.contact__body {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto;
}
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-md);
  color: #fff;
  text-wrap: balance;
}
.contact__desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.08rem;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}
.contact__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}
.contact__alt {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.68);
}
.contact__alt a {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 1px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.contact__alt a:hover {
  color: var(--cobalt-300);
  border-color: var(--cobalt-300);
}

/*
   FOOTER
    */
.footer {
  background: var(--ink-band);
  padding: var(--space-xl) 0 var(--space-lg);
  color: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: var(--space-xl);
}

.footer__logo { display: inline-flex; }
.footer__logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.footer__tagline {
  margin-top: var(--space-sm);
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
  max-width: 24rem;
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer__col-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 0.3rem;
}
.footer__col a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s ease;
  width: fit-content;
}
.footer__col a:hover { color: #fff; }

.footer__bottom {
  grid-column: 1 / -1;
  margin-top: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}
.footer__sign {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
}
.footer__sign span[aria-hidden] {
  color: var(--cobalt-300);
}

/*
   LEGAL PAGES
    */
.legal {
  padding-top: calc(var(--space-2xl) + 1rem);
  padding-bottom: var(--space-2xl);
}
.legal__header {
  margin-bottom: var(--space-xl);
}
.legal__header .section__title {
  margin-top: 0.25rem;
}
.legal__intro {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 44rem;
  margin-bottom: var(--space-xl);
}
.legal__content {
  max-width: 48rem;
}
.legal__section {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--line);
}
.legal__section:last-child { border-bottom: none; }
.legal__section h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: var(--space-sm);
}
.legal__section p {
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.78;
  margin-bottom: var(--space-sm);
}
.legal__section p:last-child { margin-bottom: 0; }
.legal__section ul {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
}
.legal__section ul li {
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.78;
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.3rem;
}
.legal__section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--grad);
}
.legal__section strong { color: var(--ink); }
.legal__hint {
  margin-top: var(--space-sm);
  font-size: 0.86rem !important;
  line-height: 1.6 !important;
  color: var(--muted) !important;
  background: var(--surface);
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
}
.legal__section .legal__hint [data-fill] {
  font-style: normal;
}
[data-fill] {
  color: var(--cobalt-700);
  font-style: italic;
}
.legal__section a {
  color: var(--cobalt);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.legal__section a:hover {
  color: var(--cobalt-700);
  border-color: var(--cobalt);
}

/*
   REVEAL ANIMATIONS
    */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  /* will-change est posé/retiré dynamiquement par script.js autour de l'anim. */
}
.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger orchestré */
.hero__content .reveal:nth-child(1) { transition-delay: 0.05s; }
.hero__content .reveal:nth-child(2) { transition-delay: 0.13s; }
.hero__content .reveal:nth-child(3) { transition-delay: 0.21s; }
.hero__content .reveal:nth-child(4) { transition-delay: 0.29s; }
.hero__content .reveal:nth-child(5) { transition-delay: 0.37s; }
.hero__panel.reveal { transition-delay: 0.2s; }

.services__grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.services__grid .reveal:nth-child(3) { transition-delay: 0.2s; }

.stats__grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.stats__grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.stats__grid .reveal:nth-child(4) { transition-delay: 0.24s; }

.methode__steps .reveal:nth-child(2) { transition-delay: 0.08s; }
.methode__steps .reveal:nth-child(3) { transition-delay: 0.16s; }
.methode__steps .reveal:nth-child(4) { transition-delay: 0.24s; }

/*
   RESPONSIVE
    */

/* Grand écran */
@media (min-width: 1600px) {
  :root { --container: 84rem; }
  .hero__title { font-size: clamp(3rem, 5vw, 4.8rem); }
}

/* Desktop ↓ tablette large : hero & projets empilés */
@media (max-width: 1024px) {
  .hero {
    padding-top: calc(var(--space-2xl) + 1rem);
  }
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .hero__content { max-width: 42rem; }
  .hero__panel {
    justify-self: center;
    max-width: 28rem;
  }
  .codepane {
    transform: perspective(1400px) rotateY(-4deg);
  }

  .services__grid {
    grid-template-columns: 1fr 1fr;
  }
  .services__grid .reveal:nth-child(3) { transition-delay: 0.1s; }

  .project,
  .project--reverse {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .project__visual,
  .project--reverse .project__visual {
    order: 0;
  }
  .device--phone { max-width: 14rem; }
  .device--browser { max-width: 38rem; }
}

/* Navigation : bascule en menu burger off-canvas dès 860px.
   La nav desktop complète (Services / Réalisations / Approche / CTA + toggle
   langue) est plus à l'étroit en FR qu'en EN ; on élimine la zone grise
   769–860px où elle pouvait se serrer. */
@media (max-width: 860px) {
  .nav__toggle { display: flex; }

  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(80vw, 320px);
    background: #fff;
    border-left: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: var(--space-xl) var(--space-lg);
    gap: var(--space-md);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -12px 0 40px rgba(11, 18, 32, 0.12);
  }
  .nav__links--open { transform: translateX(0); }
  .nav__links a { font-size: 1.05rem; }
  .nav__cta { margin-top: var(--space-sm); padding: 0.8rem 1.5rem; }

  /* Toggle langue dans le menu off-canvas : pleine largeur lisible. */
  .nav__lang { margin-top: var(--space-sm); width: 100%; }
  .lang-toggle { width: 100%; }
  .lang-toggle__btn {
    flex: 1;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    /* Cible tactile ≥ 44px, cohérente avec les liens footer/nav mobiles. */
    min-height: 44px;
  }

  /* Pages légales : pas de JS ni de hamburger → la nav reste en flux
     normal (jamais d'off-canvas inaccessible). */
  .nav--legal .nav__toggle { display: none; }
  .nav--legal .nav__links {
    position: static;
    width: auto;
    background: none;
    border-left: none;
    box-shadow: none;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 0;
    gap: 0.9rem 1.2rem;
    transform: none;
  }
  .nav--legal .nav__links a { font-size: 0.9rem; }
  .nav--legal .nav__cta { margin-top: 0; padding: 0.55rem 1.1rem; }

  /* Pages légales : toggle compact en flux (pas d'off-canvas). */
  .nav--legal .nav__lang { margin-top: 0; width: auto; }
  .nav--legal .lang-toggle { width: auto; }
  .nav--legal .lang-toggle__btn { flex: 0 0 auto; padding: 0.38rem 0.6rem; font-size: 0.78rem; min-height: 0; }

  .nav__toggle--active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav__toggle--active span:nth-child(2) { opacity: 0; }
  .nav__toggle--active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}

/* Tablette */
@media (max-width: 768px) {
  :root {
    --space-xl: 3.5rem;
    --space-2xl: 5rem;
  }

  .services__grid { grid-template-columns: 1fr; }

  .step { gap: var(--space-md); }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
  /* Grille 2 colonnes : masque le séparateur en fin de chaque ligne
     (robuste quel que soit le nombre de stats, vs index codé en dur). */
  .stats__grid .stat:nth-child(2n)::after { display: none; }
  .stat::after { top: 28%; bottom: 28%; }

  /* Cibles tactiles ≥ 44px sur les liens d'action en mobile. */
  .footer__col a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .project__link,
  .contact__alt a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .footer__links { gap: var(--space-md) var(--space-lg); }
}

/* Mobile */
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .hero__panel { max-width: 100%; }
  .hero__badge { left: 0.5rem; bottom: -0.9rem; }

  /* Évite tout scroll horizontal interne dans le panneau code signature. */
  .codepane__body {
    font-size: 0.72rem;
    line-height: 1.8;
    padding: 1rem 1.1rem 1.2rem;
    overflow-x: hidden;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .device--phone { max-width: 13rem; }

  .stats__grid { grid-template-columns: 1fr 1fr; }

  .footer__links { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* Très petits écrans : masque les sauts de ligne forcés des titres. */
@media (max-width: 640px) {
  .brk { display: none; }
}

/*
   PREFERS-REDUCED-MOTION
    */
@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;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .codepane,
  .hero__panel:hover .codepane {
    transform: none !important;
  }
  .cursor { animation: none !important; }
}
