.hero {
  padding-block: 20px 10px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  align-items: center;
  gap: 56px;
}

.hero__text {
  min-width: 0;
}

.hero__text h1 {
  margin-top: 14px;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -.015em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.how-it-works {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-xl);
}

.how-it-works h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.facts {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fact {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: start;
  gap: 14px;
}

.fact__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-blue);
  color: var(--color-blue);
  font-size: 22px;
}

.fact__title {
  display: block;
  font-weight: 700;
}

.fact__text {
  font-size: .92rem;
  color: var(--color-text-muted);
}

.schema {
  overflow-x: auto;
  margin: 0;
  padding: 12px;
  background: #fafafa;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
}

.schema svg {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
}

.schema .schema__drawing--vertical {
  display: none;
}

.schema__box {
  fill: var(--color-surface);
  stroke: var(--color-line);
  stroke-width: 1.5;
}

.schema__zone {
  fill: none;
  stroke: var(--color-text-muted);
  stroke-width: 1.5;
  stroke-dasharray: 7 6;
  opacity: .7;
}

.schema__network {
  fill: var(--color-surface-blue);
  stroke: var(--color-blue);
  stroke-width: 2;
}

.schema__tile {
  fill: var(--color-surface);
  stroke: var(--color-blue);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.schema__fill-blue {
  fill: var(--color-blue);
}

.schema__fill-yellow {
  fill: var(--color-yellow);
}

.schema__pictogram {
  fill: none;
  stroke: var(--color-text);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.schema__pictogram--light {
  stroke: #ffffff;
}

.schema__title {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  fill: var(--color-text);
}

.schema__text {
  font-family: var(--font);
  font-size: 12.5px;
  fill: var(--color-text-muted);
}

.schema__label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  fill: var(--color-text-muted);
}

.schema__flow {
  fill: none;
  stroke: var(--color-blue);
  stroke-width: 2.5;
}

.schema__link {
  fill: none;
  stroke: var(--color-text);
  stroke-width: 2;
  opacity: .55;
}

.schema__link--dashed {
  stroke-dasharray: 4 4;
}

.schema__arrow-head {
  fill: var(--color-blue);
}

.legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 15px;
}

.legend__item {
  padding: 18px 20px;
  border-radius: var(--radius-md);
}

.legend__item h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .98rem;
  font-weight: 700;
}

.legend__item p {
  margin: 8px 0 0;
  font-size: .9rem;
  color: var(--color-text-muted);
}

.hero__text > * {
  animation: home-rise .6s ease-out both;
}

.hero__text > :nth-child(2) {
  animation-delay: .1s;
}

.hero__text > :nth-child(3) {
  animation-delay: .2s;
}

.hero__text > :nth-child(4) {
  animation-delay: .3s;
}

.how-it-works {
  animation: home-slide-in .7s cubic-bezier(.2, .7, .3, 1) .3s both;
}

.fact {
  animation: home-rise .5s ease-out both;
  animation-delay: calc(.55s + var(--order, 0) * 120ms);
}

.fact:nth-child(2) {
  --order: 1;
}

.fact:nth-child(3) {
  --order: 2;
}

.fact__icon {
  animation: home-pop .5s cubic-bezier(.3, 1.5, .5, 1) both;
  animation-delay: calc(.65s + var(--order, 0) * 120ms);
}

.js .reveal:not(.is-visible) .section__head > *,
.js .reveal:not(.is-visible) .legend__item {
  opacity: 0;
}

.js .reveal.is-visible .section__head > *,
.js .reveal.is-visible .legend__item {
  animation: home-rise .6s ease-out both;
  animation-delay: calc(var(--order, 0) * 100ms);
}

.section__head > :nth-child(2) {
  --order: 1;
}

.section__head > :nth-child(3) {
  --order: 2;
}

.legend__item {
  --order: 3;
}

.legend__item:nth-child(2) {
  --order: 4;
}

.legend__item:nth-child(3) {
  --order: 5;
}

.legend__item:nth-child(4) {
  --order: 6;
}

@keyframes home-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes home-slide-in {
  from {
    opacity: 0;
    transform: translateX(32px);
  }
}

@keyframes home-pop {
  from {
    opacity: 0;
    transform: scale(.5);
  }
}

.schema__flow {
  stroke-dasharray: 8 6;
  animation: schema-dash-flow 1s linear infinite;
}

.schema__zone {
  animation: schema-dash-zone 3s linear infinite;
}

.schema__tile {
  animation: schema-dash-tile 1.6s linear infinite;
}

.schema__link--dashed {
  animation: schema-dash-tile 1s linear infinite;
}

.schema__pulse {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: schema-pulse 2.4s ease-out infinite;
}

.schema__pulse--blue {
  fill: var(--color-blue);
}

.schema__pulse--yellow {
  fill: var(--color-yellow);
}

#schema-point-entree .schema__pulse,
#schema-mobile-point-entree .schema__pulse {
  animation-delay: .5s;
}

#schema-conteneurs .schema__pulse,
#schema-mobile-conteneurs .schema__pulse {
  animation-delay: 1s;
}

#schema-connexion-unique .schema__pulse,
#schema-mobile-connexion-unique .schema__pulse {
  animation-delay: 1.5s;
}

#schema-depot-code .schema__pulse,
#schema-mobile-depot-code .schema__pulse {
  animation-delay: 2s;
}

#schema-outils use,
#schema-mobile-outils use {
  animation: schema-tile-glow 4.8s ease-in-out infinite;
}

#schema-outils use:nth-of-type(2),
#schema-mobile-outils use:nth-of-type(2) {
  animation-delay: .8s;
}

#schema-outils use:nth-of-type(3),
#schema-mobile-outils use:nth-of-type(3) {
  animation-delay: 1.6s;
}

#schema-outils use:nth-of-type(4),
#schema-mobile-outils use:nth-of-type(4) {
  animation-delay: 2.4s;
}

#schema-outils use:nth-of-type(5),
#schema-mobile-outils use:nth-of-type(5) {
  animation-delay: 3.2s;
}

#schema-outils use:nth-of-type(6),
#schema-mobile-outils use:nth-of-type(6) {
  animation-delay: 4s;
}

.schema__packet {
  fill: var(--color-yellow);
  stroke: var(--color-blue);
  stroke-width: 2;
}

.schema svg > g {
  animation: schema-appear .6s ease-out both;
  animation-delay: calc(var(--step, 0) * 120ms);
}

#schema-internet,
#schema-mobile-internet {
  --step: 1;
}

#schema-serveur,
#schema-mobile-serveur {
  --step: 2;
}

#schema-point-entree,
#schema-mobile-point-entree {
  --step: 3;
}

#schema-conteneurs,
#schema-mobile-conteneurs {
  --step: 4;
}

#schema-reseau-interne,
#schema-mobile-reseau-interne {
  --step: 5;
}

#schema-connexion-unique,
#schema-mobile-connexion-unique {
  --step: 6;
}

#schema-outils,
#schema-mobile-outils {
  --step: 7;
}

#schema-depot-code,
#schema-mobile-depot-code {
  --step: 8;
}

#schema-paquets,
#schema-mobile-paquets {
  --step: 9;
}

.schema.is-paused *,
.schema.is-paused svg > g {
  animation-play-state: paused;
}

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

@keyframes schema-dash-flow {
  to {
    stroke-dashoffset: -14;
  }
}

@keyframes schema-dash-zone {
  to {
    stroke-dashoffset: -26;
  }
}

@keyframes schema-dash-tile {
  to {
    stroke-dashoffset: -16;
  }
}

@keyframes schema-pulse {
  0% {
    opacity: .45;
    transform: scale(1);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@keyframes schema-tile-glow {
  0%,
  30%,
  100% {
    opacity: 1;
  }

  15% {
    opacity: .35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .schema__flow {
    stroke-dasharray: none;
  }

  .schema__pulse,
  .schema__packets {
    display: none;
  }
}

@media (max-width: 1260px) {
  .hero {
    overflow-x: clip;
  }
}

@media (max-width: 960px) {
  .legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .schema svg {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .section__head {
    margin-bottom: 20px;
  }

  .schema {
    padding: 8px;
  }

  .schema .schema__drawing--horizontal {
    display: none;
  }

  .schema .schema__drawing--vertical {
    display: block;
    max-width: 400px;
    margin-inline: auto;
  }

  .legend {
    gap: 12px;
    margin-top: 16px;
  }
}

@media (max-width: 520px) {
  .legend {
    grid-template-columns: 1fr;
  }
}

@media print {
  .hero__actions {
    display: none;
  }
}
