@font-face {
  font-family: Nunito;
  src: url(assets/Nunito.woff2) format('woff2');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --ink: #0e1c2d;
  --blue: #126f99;
  --blue-dark: #0b5274;
  --cyan: #188abe;
  --muted: #526174;
  --pale: #eef6fa;
  --tint: #f5f8fa;
  --line: #dce5ed;
  --error: #a61b1b;
  --success: #17663a;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font: 17px/1.65 Nunito, sans-serif;
  color: var(--ink);
  background: #fff;
}

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

img {
  max-width: 100%;
  height: auto;
}

main p a:not(.btn):not(.text-link):not(.email),
main li a,
.form-note a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

button {
  font: inherit;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: -100px;
  left: 15px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  z-index: 100;
  border: 2px solid var(--blue);
  border-radius: 7px;
  font-weight: 800;
}

.skip:focus {
  top: 10px;
}

main:focus {
  outline: 0;
}

.wrap {
  width: min(1200px, calc(100% - 64px));
  margin: auto;
}

/* En-tête et navigation */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

@supports (backdrop-filter: blur(8px)) {
  header {
    background: #fffffff2;
    backdrop-filter: blur(8px);
  }
}

.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
}

.logo {
  width: 210px;
  height: auto;
  display: block;
}

nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 14px;
  font-weight: 800;
}

.header nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}

.header nav a:not(.btn):hover {
  color: var(--blue);
}

.header nav a[aria-current="page"]:not(.btn) {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 7px;
}

.mobile {
  display: none;
}

/* Boutons */
.btn {
  display: inline-flex;
  min-height: 44px;
  padding: 11px 23px;
  background: var(--blue);
  color: #fff;
  border-radius: 7px;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid var(--blue);
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  line-height: 1.3;
}

.btn:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
}

.btn:active,
.btn:focus-visible {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
}

.btn.light {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn.light:hover,
.btn.light:active,
.btn.light:focus-visible {
  background: var(--pale);
  border-color: var(--blue);
  color: var(--ink);
}

.btn[aria-current="page"],
.btn[aria-current="page"]:hover,
.btn[aria-current="page"]:active,
.btn[aria-current="page"]:focus-visible {
  background: #fff;
  color: var(--blue);
  border-color: var(--blue);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  background: #e4eaef;
  border-color: #adbfcc;
  border-style: dashed;
  color: #3e4c5a;
  cursor: not-allowed;
}

.btn:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

/* Typographie */
.eyebrow {
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 20px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

h1 {
  font-size: clamp(2.25rem, 1.5rem + 2.6vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 850;
}

h2 {
  font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 22px;
  line-height: 1.3;
}

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

.br-lg {
  display: none;
}

.accent {
  color: var(--blue);
}

.icon {
  display: inline-block;
  flex: none;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.small {
  font-size: 14px;
  line-height: 1.5;
}

.text-link {
  font-size: 14px;
  color: var(--blue);
  font-weight: 900;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Sections */
.hero {
  background: linear-gradient(110deg, #fff 35%, #eef6fa);
  padding: 82px 0 68px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 60px;
  align-items: center;
}

.hero-grid > *,
.split > *,
.contact-layout > *,
.service-layout > * {
  min-width: 0;
}

.intro {
  font-size: 19px;
  max-width: 560px;
  margin-top: 25px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.hero .small {
  margin-top: 26px;
}

.architecture {
  background: var(--ink);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 25px 65px #0e1c2d20;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.architecture::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#ffffff06 1px, transparent 1px), linear-gradient(90deg, #ffffff06 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.diagram-top {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff26;
  padding-bottom: 20px;
  font-size: 11px;
  letter-spacing: 2px;
  color: #b5cbdc;
}

.nodes {
  display: flex;
  gap: 9px;
  margin-top: 29px;
  position: relative;
}

.nodes.after-core {
  margin-top: 0;
}

.nodes span {
  flex: 1;
  padding: 12px 6px;
  text-align: center;
  border: 1px solid #476073;
  border-radius: 6px;
  font-size: 12px;
}

.connector {
  height: 35px;
  width: 1px;
  background: #5a829b;
  margin: auto;
}

.core {
  background: #163951;
  border: 1px solid #188abe;
  padding: 23px;
  text-align: center;
  border-radius: 8px;
  position: relative;
}

.core b {
  display: block;
  font-size: 25px;
}

.core small {
  color: #bcd6e5;
}

.diagram-footer {
  font-size: 12px;
  color: #b5cbdc;
  margin-top: 24px;
  text-align: center;
}

section.block {
  padding: 80px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 70px;
  margin-bottom: 38px;
}

.section-head p {
  max-width: 390px;
}

.group-title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 48px 0 24px;
}

.group-title:first-of-type {
  margin-top: 32px;
}

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.services.spaced,
.module-grid.spaced {
  margin-top: 32px;
}

.service {
  border: 1px solid var(--line);
  padding: 30px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.num {
  font-size: 14px;
  color: var(--blue);
  font-weight: 900;
  display: block;
  margin-bottom: 30px;
}

.service p {
  font-size: 15px;
  margin-top: 18px;
}

.service ul {
  padding-left: 18px;
  font-size: 14px;
  color: var(--muted);
  margin: 23px 0;
}

.service a {
  margin-top: auto;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.service a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.module {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px;
  background: #fff;
}

.module h3 {
  font-size: 20px;
}

.module p {
  font-size: 15px;
  margin-top: 12px;
}

.tint {
  background: var(--tint);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 75px;
  align-items: center;
}

.top-gap {
  margin-top: 22px;
}

.list {
  margin-top: 24px;
}

.list div {
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}

.list b {
  display: block;
}

.list p {
  font-size: 15px;
  margin-top: 6px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.step {
  position: relative;
}

.step b {
  display: block;
  margin-bottom: 10px;
}

.step p {
  font-size: 15px;
}

.step span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

/* Trait de liaison vers l'étape suivante */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 46px;
  right: -20px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--line));
}

.product {
  background: var(--ink);
  color: #fff;
}

.product p {
  color: #bfd1df;
  margin-top: 20px;
}

.product .eyebrow {
  color: #8ad0f0;
}

.product .brand {
  width: 215px;
  max-width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 22px;
}

.product h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.product img.screen {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 9px;
  box-shadow: 0 15px 40px #0004;
}

.product .caption {
  font-size: 14px;
  margin-top: 12px;
}

.aside-note {
  border-left: 3px solid var(--cyan);
  padding: 8px 0 8px 30px;
}

.aside-note p {
  margin: 14px 0;
}

.narrow {
  max-width: 760px;
}

.faq {
  max-width: 820px;
  margin: auto;
}

details {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

summary {
  font-weight: 800;
  cursor: pointer;
}

details p {
  margin-top: 15px;
  font-size: 16px;
}

.contact {
  text-align: center;
  background: var(--pale);
  padding: 65px 30px;
  border-radius: 15px;
}

.contact p {
  max-width: 640px;
  margin: 20px auto;
}

.contact .actions {
  justify-content: center;
}

.email {
  display: block;
  color: var(--blue);
  font-weight: 800;
  margin-top: 20px;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Pied de page */
footer {
  padding: 34px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-links,
.legal-links {
  display: flex;
  gap: 8px 20px;
  flex-wrap: wrap;
}

.footer-links a,
.legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.footer-links a:hover,
.legal-links a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.legal-links {
  margin-top: 12px;
  font-size: 13px;
}

/* Finitions : transitions discrètes, désactivées si l'utilisateur réduit les animations */
@media (prefers-reduced-motion: no-preference) {
  .btn,
  .service,
  .module,
  .product-shot,
  .header nav a,
  .text-link {
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  }

  .service:hover,
  .module:hover {
    border-color: #b9d3e2;
    box-shadow: 0 10px 28px #0e1c2d14;
    transform: translateY(-2px);
  }

  .btn:hover {
    transform: translateY(-1px);
  }
}

/* Effets liés au défilement : amélioration progressive, ignorés par les navigateurs non compatibles */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes header-scrolled {
      to {
        box-shadow: 0 6px 24px #0e1c2d1a;
        border-bottom-color: transparent;
      }
    }

    @keyframes reveal-up {
      from {
        opacity: 0;
        transform: translateY(28px);
      }
    }

    header {
      animation: header-scrolled linear forwards;
      animation-timeline: scroll(root block);
      animation-range: 0 120px;
    }

    .section-head,
    .service,
    .module,
    .product-shot,
    .contact {
      animation: reveal-up linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}

@media (min-width: 901px) {
  .br-lg {
    display: inline;
  }
}

@media (max-width: 1100px) {
  nav {
    gap: 14px;
  }

  .header {
    position: static;
    min-height: 68px;
  }

  .header > nav {
    display: none;
  }

  .logo {
    width: 180px;
  }

  html {
    scrollbar-gutter: stable;
  }

  html:has(.mobile[open]) {
    overflow: hidden;
  }

  .mobile {
    display: block;
    border: 0;
    padding: 0;
  }

  .mobile summary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 14px 0 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    list-style: none;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s;
  }

  .mobile summary::-webkit-details-marker {
    display: none;
  }

  .mobile summary:hover,
  .mobile[open] summary {
    border-color: var(--blue);
    color: var(--blue);
  }

  .burger {
    position: relative;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: background-color 0.2s;
  }

  .burger::before,
  .burger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s ease;
  }

  .burger::before {
    top: -6px;
  }

  .burger::after {
    top: 6px;
  }

  .mobile[open] .burger {
    background: transparent;
  }

  .mobile[open] .burger::before {
    transform: translateY(6px) rotate(45deg);
  }

  .mobile[open] .burger::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Fond assombri sous le panneau : un clic dessus ferme le menu (nav.js) */
  .mobile[open]::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 100vh;
    z-index: 1;
    background: #0e1c2d59;
  }

  .mobile nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100dvh - 69px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 32px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 18px 40px #0e1c2d33;
    font-size: 17px;
  }

  .mobile nav a:not(.btn) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    border-bottom: 1px solid var(--line);
  }

  .mobile nav a:not(.btn)::after {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border: solid currentColor;
    border-width: 2px 2px 0 0;
    opacity: 0.35;
    transform: rotate(45deg);
  }

  .mobile nav a:not(.btn):hover,
  .mobile nav a[aria-current="page"]:not(.btn) {
    color: var(--blue);
    text-decoration: none;
  }

  .mobile nav a[aria-current="page"]:not(.btn)::after {
    opacity: 1;
  }

  .mobile nav .btn {
    margin-top: 20px;
    min-height: 52px;
    font-size: 15px;
  }

  @media (prefers-reduced-motion: no-preference) {
    .mobile[open] nav {
      animation: menu-in 0.22s ease-out;
    }

    .mobile[open]::after {
      animation: menu-fade 0.22s ease-out;
    }
  }
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes menu-fade {
  from {
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .mobile nav {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 900px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .hero {
    padding: 45px 0;
  }

  .hero-grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 35px;
  }

  .architecture {
    max-width: 560px;
    width: 100%;
  }

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

  .services > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 20px;
  }

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

  .step:nth-child(2n)::before {
    display: none;
  }

  section.block {
    padding: 48px 0;
  }

  .footer {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .services,
  .module-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .services > :last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .step {
    padding: 0 0 26px 54px;
  }

  .step span {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
  }

  .step:not(:last-child)::before,
  .step:nth-child(2n):not(:last-child)::before {
    display: block;
    top: 42px;
    bottom: 4px;
    left: 18px;
    right: auto;
    width: 2px;
    height: auto;
    background: var(--line);
  }

  .step b {
    padding-top: 7px;
  }

  .actions .btn {
    width: 100%;
  }

  .architecture {
    padding: 22px;
  }

  .nodes span {
    font-size: 11px;
  }

  .contact {
    padding: 40px 20px;
  }

  .logo {
    width: 170px;
  }
}

@media (max-width: 360px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .mobile nav {
    padding-left: 16px;
    padding-right: 16px;
  }
}

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