/* MADSYS — Responsive CSS : desktop, tactile portrait, tactile paysage. */

/* =========================================================
   1. BASE COMMUNE
   ========================================================= */

@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/Geist-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/GeistMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Couleurs, typographie et géométrie de référence. */

:root {
  --color-white: #edf0f2;
  --color-light-grey: #dee4e7;
  --color-grey: #969696;
  --color-black: #262329;
  --color-orange: #ff7247;
  --font-geist: "Geist", Arial, sans-serif;
  --font-geist-mono: "Geist Mono", monospace;

  /* HAUTEUR DU CONTENU — sections fixées à une hauteur d'écran.
     Ces deux proportions ne modifient QUE le contenu, calé en bas.
     Exemple pour 90 % : calc(90 / 100). La marge extérieure reste déduite. */
  --section-height-desktop: calc(2 / 3);
  --section-height-touch: calc(85 / 100);
  --section-height: var(--screen-height);
  --section-block-height: calc(
    var(--screen-height) * var(--section-height-desktop) - var(--space-medium)
  );
  --layout-width: var(--screen-width);
  --layout-side-offset: 0px;
  --layout-edge: var(--space-medium);
  --service-card-height: var(--section-block-height);
  --service-card-width: calc(
    (var(--layout-width) * 2 / 3) - var(--space-medium) -
      (var(--space-medium) / 2)
  );
  --about-block-height: var(--section-block-height);
  --about-column-width: calc(
    (var(--layout-width) / 2) - var(--space-medium) - (var(--space-large) / 2)
  );
  --timeline-marker-size: var(--control-small);
  --timeline-line-size: 1px;
  --map-marker-size: var(--control-small);
  --map-bracket-size: var(--control-small);
  --map-bracket-thickness: max(1px, calc(var(--control-small) / 5));
  --contact-block-height: var(--section-block-height);
  --contact-main-height: calc(
    var(--contact-block-height) - var(--contact-footer-height) -
      var(--space-medium)
  );
  --contact-footer-height: calc(var(--screen-height) * 0.15);
  --contact-logo-height: calc(
    var(--contact-footer-height) - (var(--space-medium) * 2)
  );
}

/* RÉGLAGES RESPONSIVE — coefficients vmin entiers, trois familles indépendantes.
   Référence desktop 1920 × 1080 : marges 10/30/60, commandes 10/30/60,
   textes H1..H6 = 150/100/44/32/22/16 px.
   Dans chaque clamp : minimum, valeur fluide modifiable, maximum.
   Les décalages en rem calent précisément la référence, sans facteur caché. */
:root {
  --layout-mode: desktop;
  --screen-width: 100vw;
  --screen-height: 100svh;
  --page-height: calc(4 * var(--screen-height));

  /* 1 — MARGES. Modifier 3vmin pour changer uniquement les espacements. */
  --space-medium: clamp(0.75rem, calc(3.2vmin - 0.15rem), 4.6875rem);
  --space-small: calc(var(--space-medium) / 3);
  --space-large: calc(var(--space-medium) * 2);

  /* 2 — COMMANDES. Boutons, badges, repères et leur espace intérieur. */
  --control-medium: clamp(0.75rem, calc(3.2vmin - 0.15rem), 4.6875rem);
  --control-small: calc(var(--control-medium) / 3);
  --control-large: calc(var(--control-medium) * 2);
  --menu-toggle-width: clamp(1.5rem, calc(2vmin + 1.3875rem), 2.25rem);
  --menu-toggle-height: calc(var(--menu-toggle-width) * 2 / 3);
  --menu-toggle-stroke: 2px;
  --pagination-dot-size: clamp(0.375rem, 1vmin, 0.4375rem);

  /* 3 — TEXTES. Indépendants des marges et de la taille des commandes. */
  --font-h1: calc(var(--font-h2) * 1.25);
  --font-h2: clamp(2.5rem, calc(12vmin - 1.85rem), 10rem);
  --font-h3: clamp(1.125rem, calc(0.05rem + 4vmin), 4.375rem);
  --font-h4: clamp(0.8125rem, calc(3vmin - 0.025rem), 3.1875rem);
  --font-h5: clamp(0.5625rem, calc(0.025rem + 2vmin), 2.1875rem);
  --font-h6: clamp(0.375rem, calc(2vmin - 0.35rem), 1.625rem);
}

@supports not (height: 100svh) {
  :root {
    --screen-height: 100vh;
  }
}

/* Canvas desktop centré sur les écrans très larges ; pleine largeur ailleurs. */
@media (min-aspect-ratio: 32 / 9) {
  :root {
    --layout-width: calc(var(--screen-height) * 21 / 9);
    --layout-side-offset: calc((var(--screen-width) - var(--layout-width)) / 2);
    --layout-edge: calc(var(--layout-side-offset) + var(--space-medium));
  }
}

/* Tactile : une échelle continue commune au portrait et au paysage.
   Cette condition choisit une composition, elle ne définit aucun palier de taille. */
@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  :root {
    --layout-mode: touch;
    --page-height: 0px;
    --layout-width: var(--screen-width);
    --layout-side-offset: 0px;
    --layout-edge: var(--space-medium);

    /* MARGES tactiles. */
    --space-medium: clamp(0.75rem, 4vmin, 3rem);

    /* COMMANDES tactiles : séparées des marges. */
    --control-medium: clamp(0.75rem, 4vmin, 1.5rem);

    /* TEXTES tactiles. Le rem garde une part liée à la taille de police utilisateur. */
    --font-h1: calc(var(--font-h2) * 1.25);
    --font-h2: clamp(1.75rem, calc(1rem + 4vmin), 4rem);
    --font-h3: clamp(1.0625rem, calc(0.65rem + 3vmin), 2.75rem);
    --font-h4: clamp(0.875rem, calc(0.5rem + 2vmin), 2rem);
    --font-h5: clamp(0.6875rem, calc(4vmin - 0.1rem), 1.25rem);
    --font-h6: clamp(0.5rem, calc(0.375rem + 1vmin), 1rem);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
  width: 100%;
  min-height: 100%;
  background: var(--color-white);
  scroll-behavior: auto;
}

body {
  margin: 0;
  width: 100%;
  min-height: var(--page-height);
  overflow-x: hidden;
  background: var(--color-white);
  color: var(--color-black);
  font-family: var(--font-geist);
  line-height: 1.2;
}

.site-page {
  position: relative;
  width: var(--screen-width);
  min-height: var(--page-height);
  background: var(--color-white);
}

/* Header et navigation. */

.fixed-header-zone {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: calc((var(--space-medium) * 2) + (var(--space-small)));
  background: var(--color-white);
  pointer-events: none;
}

.site-header {
  position: absolute;
  top: var(--space-medium);
  left: var(--layout-edge);
  right: var(--layout-edge);
  height: calc(var(--control-medium) * 1.2);
  pointer-events: auto;
}

.site-nav {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.site-logo {
  display: block;
  flex: 0 0 auto;
  height: 100%;
}

.site-logo img {
  display: block;
  width: auto;
  height: 100%;
}

.site-nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(var(--space-medium) * 1.5);
  height: 100%;
  margin-left: auto;
}

.site-nav-links a {
  display: inline-flex;
  align-items: center;
  height: 100%;
  color: var(--color-black);
  font-family: var(--font-geist-mono);
  font-size: var(--font-h6);
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.about-section,
.contact-section {
  position: relative;
  width: 100%;
  height: var(--section-height);
  background: var(--color-white);
}

@keyframes hero-cursor-blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

/* Bloc du nuage de points. */

/* CARTOUCHE — le ratio réel du bloc choisit sa composition.
   L et H correspondent à la zone intérieure après la marge SMALL.
   Les traits de 1 px sont inclus dans les dimensions des cellules. */

/* Strictement plus large que haut : rectangle, indépendamment de l'appareil. */

/* Titres de section. */

.section-title {
  position: absolute;
  left: var(--layout-edge);
  right: var(--layout-edge);
  z-index: 2;
  margin: 0;
  color: var(--color-black);
  font-family: var(--font-geist);
  font-size: var(--font-h2);
  font-weight: 900;
  line-height: 0.93;
  white-space: nowrap;
}

.services-title {
  bottom: calc(
    var(--space-medium) + var(--service-card-height) + var(--space-small)
  );
}

.about-title {
  bottom: calc(
    var(--space-medium) + var(--about-block-height) + var(--space-small)
  );
}

.contact-title {
  bottom: calc(
    var(--space-medium) + var(--contact-block-height) + var(--space-small)
  );
}

/* Services. */

.services-section {
  position: relative;
  width: 100%;
  background: var(--color-white);
}

.services-horizontal-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--section-height);
  overflow: hidden;
  background: var(--color-white);
}

.services-horizontal-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.services-horizontal-track {
  position: absolute;
  left: var(--layout-edge);
  bottom: var(--space-medium);
  display: flex;
  align-items: stretch;
  gap: var(--space-medium);
  width: max-content;
  height: var(--service-card-height);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.service-card {
  flex: 0 0 var(--service-card-width);
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
  width: var(--service-card-width);
  height: var(--service-card-height);
  overflow: hidden;
  background: var(--color-light-grey);
}

.service-content {
  min-width: 0;
  max-width: 100%;
  height: 100%;
  padding-left: var(--space-medium);
  padding-right: 0;
  overflow: hidden;
}

.service-copy {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  padding-top: calc(var(--space-medium) * 1.5);
  padding-bottom: calc(var(--space-medium) * 1.5);
  overflow: hidden;
  color: var(--color-black);
}

.service-title {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  font-family: var(--font-geist-mono);
  font-size: var(--font-h3);
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}

.service-text {
  align-self: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  font-family: var(--font-geist-mono);
  font-size: var(--font-h5);
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
}

.service-text p {
  margin: 0;
}

/* Retrait suspendu : Services + lignes à puces des cartes About */
.service-text p,
.about-card-info-active
  > :is(
    [data-i18n^="about.cards.domains.infoLine"],
    [data-i18n^="about.cards.tools.infoLine"]
  ) {
  position: relative;
  padding-left: 1.2em;
}

/* Carré réel, aligné sur le bord gauche */
.service-text p::before,
.about-card-info-active
  > :is(
    [data-i18n^="about.cards.domains.infoLine"],
    [data-i18n^="about.cards.tools.infoLine"]
  )::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.475em;
  width: 0.25em;
  height: 0.25em;
  background: currentColor;
}

.service-text p + p {
  margin-top: calc(var(--space-small) * 2.5);
}

.service-footer {
  display: flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  height: var(--control-medium);
  padding: 0 var(--space-small);
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-geist-mono);
  font-size: var(--font-h6);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.service-footer-index,
.service-footer-item {
  flex: 0 0 auto;
}

.service-footer-item::before {
  content: "|";
  margin: 0 1ch;
}

.service-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.service-video {
  display: block;
  flex: 0 0 auto;
  width: min(
    calc(var(--service-card-width) * 9 / 20),
    var(--service-card-height)
  );
  height: min(
    calc(var(--service-card-width) * 9 / 20),
    var(--service-card-height)
  );
  object-fit: cover;
}

.about-layout {
  position: absolute;
  left: var(--layout-edge);
  right: var(--layout-edge);
  bottom: var(--space-medium);
  display: flex;
  align-items: stretch;
  height: var(--about-block-height);
  gap: var(--space-large);
}

.about-main-block {
  flex: 0 0 var(--about-column-width);
  width: var(--about-column-width);
  height: var(--about-block-height);
  background: transparent;
}

.about-main-copy {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100%;
  padding: calc(var(--space-medium) * 1.5) 0;
  overflow: hidden;
  color: var(--color-black);
}

.about-main-title {
  margin: 0;
  font-family: var(--font-geist-mono);
  font-size: var(--font-h3);
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}

.about-main-title span {
  display: block;
}

.about-main-text {
  align-self: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-family: var(--font-geist-mono);
  font-size: var(--font-h5);
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
}

.about-main-text p {
  margin: 0;
}

.about-main-text p + p {
  margin-top: calc(var(--space-small) * 2.5);
}

.about-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  width: 100%;
  padding-inline: var(--space-small);
  color: var(--color-black);
  font-family: var(--font-geist-mono);
  font-size: var(--font-h6);
  font-weight: 400;
  line-height: 1.2;
}

.about-timeline::before {
  content: "";
  position: absolute;
  top: calc(
    (var(--font-h6) * 1.2) + (var(--space-small) / 2) +
      (var(--timeline-marker-size) / 2) - (var(--timeline-line-size) / 2)
  );
  left: calc(var(--space-small) * -1);
  right: calc(var(--space-small) * -1);
  height: var(--timeline-line-size);
  background: var(--color-black);
}

.about-timeline-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.about-timeline-item-start {
  grid-column: 1;
  align-items: flex-start;
  text-align: left;
}

.about-timeline-item-middle {
  grid-column: 3;
  align-items: flex-start;
  text-align: left;
}

.about-timeline-item-end {
  grid-column: 8;
  align-items: flex-end;
  text-align: right;
}

.about-timeline-date {
  margin-bottom: calc(var(--space-small) / 2);
  font-weight: 700;
  white-space: nowrap;
}

.about-timeline-marker {
  display: block;
  flex: 0 0 auto;
  width: var(--timeline-marker-size);
  height: var(--timeline-marker-size);
  margin-bottom: calc(var(--space-small) / 2);
  background: var(--color-black);
}

.about-timeline-label {
  font-weight: 400;
  white-space: nowrap;
}

/* Timeline : tracé au scroll, textes en fade et relance par le menu À propos. */
.about-timeline {
  --timeline-draw-duration: 900ms;
}

.about-timeline-item-end .about-timeline-marker {
  background: var(--color-orange);
}

@media (prefers-reduced-motion: no-preference) {
  .about-timeline.is-timeline-ready::before {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--timeline-draw-duration) linear;
  }

  .about-timeline.is-timeline-ready .about-timeline-marker {
    opacity: 0;
    transform: scale(0);
    transition:
      opacity 180ms ease-out,
      transform 180ms ease-out;
    transition-delay: var(--timeline-reveal-delay, 0ms);
  }

  .about-timeline.is-timeline-ready .about-timeline-date,
  .about-timeline.is-timeline-ready .about-timeline-label {
    opacity: 0;
    transition: opacity var(--text-fade-duration) ease-out;
    transition-delay: var(--timeline-reveal-delay, 0ms);
  }

  .about-timeline.is-timeline-ready.is-timeline-visible::before {
    transform: scaleX(1);
  }

  .about-timeline.is-timeline-ready.is-timeline-visible .about-timeline-marker,
  .about-timeline.is-timeline-ready.is-timeline-visible .about-timeline-date,
  .about-timeline.is-timeline-ready.is-timeline-visible .about-timeline-label {
    opacity: 1;
    transform: none;
  }
}

.about-grid {
  flex: 0 0 var(--about-column-width);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--space-small);
  width: var(--about-column-width);
  height: var(--about-block-height);
}

.about-card {
  --about-card-fill-duration: 240ms;
  --about-card-content-gap: -80ms;
  --about-card-content-duration: 80ms;
  position: relative;
  isolation: isolate;
  --about-card-right-inset: var(--space-large);
  cursor: pointer;
  display: grid;
  grid-template-rows: var(--control-medium) minmax(0, 1fr) var(--control-medium);
  min-width: 0;
  min-height: 0;
  padding: var(--space-medium) 0 var(--space-medium) var(--space-large);
  overflow: hidden;
  background: var(--color-light-grey);
  color: var(--color-black);
}

.about-card-title,
.about-card-footer {
  font-family: var(--font-geist-mono);
  font-size: var(--font-h5);
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}

.about-card-info {
  align-self: center;
  font-family: var(--font-geist-mono);
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}

.about-card-info-inactive {
  font-size: var(--font-h2);
  line-height: 1;
  white-space: nowrap;
}

.about-card-info-active {
  font-size: var(--font-h4);
}

.about-card-info-active > span {
  display: block;
  white-space: nowrap;
}

.about-card-info > [hidden] {
  display: none;
}

/* Informations et actions des cartes : mêmes repères géométriques sur tous les formats. */
.about-card-title {
  grid-row: 1;
  align-self: center;
  display: flex;
  align-items: center;
  height: var(--control-medium);
}

.about-card-info {
  grid-row: 2;
}

.about-card-badge,
.about-card-plus {
  position: absolute;
  right: var(--about-card-right-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--control-medium);
  font-family: var(--font-geist-mono);
  font-size: var(--font-h4);
  line-height: 1;
  pointer-events: none;
}

.about-card-badge {
  font-size: var(--font-h6);
  top: var(--space-medium);
  padding-inline: var(--control-small);
  background: var(--color-black);
  color: var(--color-white);
  font-weight: 400;
  opacity: 0;
  transition: opacity 80ms ease;
}

.about-card-plus {
  bottom: var(--space-medium);
  width: var(--control-medium);
  background-color: var(--color-orange);
  background-image: url("../assets/img/plus.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 0.5em 0.5em;
  color: transparent;
  font-weight: 700;
  opacity: 1;
  transition: opacity 80ms ease var(--about-card-fill-duration);
}

.about-card-footer {
  position: absolute;
  left: var(--about-card-left-inset, var(--space-large));
  right: var(--about-card-right-inset);
  bottom: var(--space-medium);
  display: flex;
  align-items: center;
  height: var(--control-medium);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 80ms ease;
}

/* Texte principal actif, badge et information basse apparaissent ensemble.
   L’intitulé en haut à gauche reste toujours visible.
   L’animation fonctionne aussi lorsque le texte principal quitte display:none. */
.about-card.is-active .about-card-info-active,
.about-card.is-active .about-card-badge,
.about-card.is-active .about-card-footer {
  opacity: 1;
  animation: about-card-content-enter var(--about-card-content-duration) ease
    calc(var(--about-card-fill-duration) + var(--about-card-content-gap)) both;
}

@keyframes about-card-content-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.about-card.is-active .about-card-plus {
  opacity: 0;
  transition-delay: 0s;
}

/* Un seul aplat se déploie depuis l'emplacement du bouton +. */
.about-card > * {
  z-index: 1;
}

.about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--color-orange);
  clip-path: inset(
    calc(100% - var(--space-medium) - var(--control-medium))
      var(--about-card-right-inset) var(--space-medium)
      calc(100% - var(--about-card-right-inset) - var(--control-medium))
  );
  transition: clip-path var(--about-card-fill-duration)
    cubic-bezier(0.22, 1, 0.36, 1);
}

.about-card.is-active::before {
  clip-path: inset(0);
}

.about-card:focus-visible {
  outline: 2px solid var(--color-black);
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  .about-card::before,
  .about-card-badge,
  .about-card-plus,
  .about-card-footer {
    transition: none;
  }

  .about-card.is-active .about-card-info-active,
  .about-card.is-active .about-card-badge,
  .about-card.is-active .about-card-footer {
    animation: none;
  }
}

.contact-layout {
  position: absolute;
  left: var(--layout-edge);
  right: var(--layout-edge);
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-medium);
  height: var(--contact-block-height);
}

.contact-main-block {
  flex: 0 0 var(--contact-main-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--space-large);
  width: 100%;
  height: var(--contact-main-height);
  background: transparent;
}

.contact-left,
.contact-right {
  min-width: 0;
  height: 100%;
}

.contact-left-copy {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100%;
  padding: calc(var(--space-medium) * 1.5) 0;
  overflow: hidden;
  color: var(--color-black);
}

.contact-main-title {
  margin: 0;
  font-family: var(--font-geist-mono);
  font-size: var(--font-h3);
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}

.contact-main-title span {
  display: block;
}

.contact-main-text {
  align-self: center;
  width: 100%;
  max-width: 100%;
  font-family: var(--font-geist-mono);
  font-size: var(--font-h5);
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
}

.contact-main-text p {
  margin: 0;
}

.contact-main-text-line {
  display: block;
  white-space: nowrap;
}

.contact-email {
  --menu-ink: var(--color-black);
  --menu-paper: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-self: start;
  padding: 0 var(--control-medium);
  height: var(--control-large);
  background: var(--color-orange);
  color: var(--color-black);
  font-family: var(--font-geist-mono);
  font-size: var(--font-h4);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.email-at {
  font-family: var(--font-geist);
}

.contact-email:focus-visible {
  background: var(--color-black);
  color: var(--color-white);
  outline: 2px solid var(--color-black);
  outline-offset: 4px;
}

.contact-email:focus-visible .menu-label {
  transform: translateY(-100%);
}

.contact-email:focus-visible .menu-label-hover {
  transform: translateY(0);
}

.contact-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: calc(var(--space-medium) * 1.5);
  overflow: hidden;
}

.contact-map {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* Localisation et interaction avec la carte. */

.map-location {
  position: absolute;
  z-index: 3;
  width: var(--map-marker-size);
  height: var(--map-marker-size);
  transform: translate(-50%, -50%);
  cursor: pointer;
  outline: none;
}

.map-location-marker {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--color-orange);
  transform: scale(1);
  transition: transform 180ms ease;
}

.map-location-bracket {
  position: absolute;
  width: var(--map-bracket-size);
  height: var(--map-bracket-size);
  border-color: var(--location-bracket-color, var(--color-black));
  border-style: solid;
  border-width: 0;
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 160ms ease,
    transform 180ms ease;
}

.map-location-bracket-top-left {
  left: calc(var(--map-bracket-size) * -1.2);
  top: calc(var(--map-bracket-size) * -1.2);
  border-top-width: var(--map-bracket-thickness);
  border-left-width: var(--map-bracket-thickness);
  transform-origin: bottom right;
}

.map-location-bracket-top-right {
  left: calc(var(--map-bracket-size) * 1.2);
  top: calc(var(--map-bracket-size) * -1.2);
  border-top-width: var(--map-bracket-thickness);
  border-right-width: var(--map-bracket-thickness);
  transform-origin: bottom left;
}

.map-location-bracket-bottom-left {
  left: calc(var(--map-bracket-size) * -1.2);
  top: calc(var(--map-bracket-size) * 1.2);
  border-bottom-width: var(--map-bracket-thickness);
  border-left-width: var(--map-bracket-thickness);
  transform-origin: top right;
}

.map-location-bracket-bottom-right {
  left: calc(var(--map-bracket-size) * 1.2);
  top: calc(var(--map-bracket-size) * 1.2);
  border-right-width: var(--map-bracket-thickness);
  border-bottom-width: var(--map-bracket-thickness);
  transform-origin: top left;
}

.map-location-info {
  position: absolute;
  left: 50%;
  bottom: calc((var(--map-bracket-size) * 2.2) + var(--space-small));
  padding: 0 var(--control-small);
  background: var(--location-info-background, var(--color-black));
  color: var(--location-info-color, var(--color-white));
  font-family: var(--font-geist-mono);
  font-size: var(--font-h6);
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, var(--space-small));
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 180ms ease;
}

.map-location-info-line {
  display: block;
}

/* Survol souris : indépendant des états ouverts par appui. */
@media (hover: hover) and (pointer: fine) {
  .map-location:not(.cloud-location):hover .map-location-marker {
    transform: scale(1.2);
  }
  .map-location:not(.cloud-location):hover .map-location-bracket {
    opacity: 1;
    transform: scale(1);
  }
  .map-location:not(.cloud-location):hover .map-location-info {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.cloud-location.is-hovered .map-location-marker,
.map-location:focus-visible .map-location-marker,
.map-location.is-active .map-location-marker {
  transform: scale(1.2);
}
.cloud-location.is-hovered .map-location-bracket,
.map-location:focus-visible .map-location-bracket,
.map-location.is-active .map-location-bracket {
  opacity: 1;
  transform: scale(1);
}
.cloud-location.is-hovered .map-location-info,
.map-location:focus-visible .map-location-info,
.map-location.is-active .map-location-info {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .map-location-marker,
  .map-location-bracket,
  .map-location-info {
    transition: none;
  }
}

/* L’origine de la pièce et le centre du trou oblong se projettent au centre du canvas. */
.cloud-location {
  left: 50%;
  top: 50%;
  --location-bracket-color: var(--color-light-grey);
  --location-info-background: var(--color-light-grey);
  --location-info-color: var(--color-black);
}

.cloud-location-info-line {
  display: flex;
  justify-content: space-between;
  gap: var(--space-small);
}

/* Footer. */

.contact-footer-block {
  position: relative;
  flex: 0 0 var(--contact-footer-height);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: calc(100% + var(--layout-edge) * 2);
  margin-left: calc(-1 * var(--layout-edge));
  margin-right: calc(-1 * var(--layout-edge));
  height: var(--contact-footer-height);
  padding: var(--space-medium);
  background: var(--color-black);
}

.contact-footer-copy {
  position: absolute;
  top: var(--space-small);
  left: var(--space-medium);
  bottom: var(--space-small);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--color-white);
  font-family: var(--font-geist-mono);
  font-size: var(--font-h6);
  font-weight: 400;
  line-height: 1.2;
}

.contact-footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-footer-links a {
  color: var(--color-white);
  text-decoration: none;
  transition: color 150ms ease;
}

.contact-footer-links a:hover,
.contact-footer-links a:focus-visible {
  color: var(--color-orange);
  text-decoration: none;
}

.contact-footer-copyright {
  white-space: nowrap;
}

.contact-logo {
  display: block;
  width: auto;
  height: var(--contact-logo-height);
  max-width: 100%;
  object-fit: contain;
}

/* Le lien du logo conserve sa taille et son image blanche, sans effet de survol. */
.contact-logo-image {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* Références typographiques H1 à H6. */

h1,
.h1 {
  font-size: var(--font-h1);
}

h2,
.h2 {
  font-size: var(--font-h2);
}

h3,
.h3 {
  font-size: var(--font-h3);
}

h4,
.h4 {
  font-size: var(--font-h4);
}

h5,
.h5 {
  font-size: var(--font-h5);
}

h6,
.h6 {
  font-size: var(--font-h6);
}

@media not all and ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  /* =========================================================
   2. DESKTOP — PRESETS, 3/2, 21/9 ET CANVAS 32/9
   ========================================================= */

  /* Une géométrie commune aux trois colonnes de texte desktop.
   Les deux pistes flexibles sont égales : le texte reste au centre du bloc,
   indépendamment du nombre de lignes du sous-titre ou de la hauteur de l’info. */
  html:root {
    --desktop-section-inset: calc(var(--space-medium) * 1.5);
  }

  html:root .service-copy,
  html:root .about-main-copy,
  html:root .contact-left-copy {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding-block: var(--desktop-section-inset);
  }

  html:root .service-title,
  html:root .about-main-title,
  html:root .contact-main-title {
    grid-row: 1;
    align-self: start;
  }

  html:root .service-text,
  html:root .about-main-text,
  html:root .contact-main-text {
    grid-row: 2;
    align-self: center;
  }

  html:root .service-footer,
  html:root .about-timeline,
  html:root .contact-email {
    grid-row: 3;
    align-self: end;
  }

  /* Contact : le haut s’aligne sous le titre, le footer conserve sa position.
   Aucun gap supplémentaire ne s’ajoute au padding sous le bouton email. */
  html:root .contact-layout {
    --contact-main-height: calc(
      var(--contact-block-height) + var(--space-medium) -
        var(--contact-footer-height)
    );
    height: calc(var(--contact-block-height) + var(--space-medium));
    gap: 0;
  }
}

/* Canvas et proportions gérés dans le CSS. */

@media (max-aspect-ratio: 3 / 2) {
  .service-title {
    overflow: visible;
    white-space: normal;
  }

  .contact-main-text-line {
    white-space: normal;
  }
}

@media (min-aspect-ratio: 21 / 9) {
  .service-content {
    padding-left: calc(var(--space-large) * 2);
    padding-right: var(--space-large);
  }

  .about-main-copy {
    padding: var(--space-large) 0;
  }

  .contact-left-copy {
    padding: var(--space-large) 0;
  }
}

.services-horizontal-viewport::before,
.services-horizontal-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: var(--layout-edge);
  background: var(--color-white);
  pointer-events: none;
}

.services-horizontal-viewport::before {
  left: 0;
}

.services-horizontal-viewport::after {
  right: 0;
}

.services-title {
  z-index: 2;
}

.mobile-menu-toggle,
.services-pagination {
  display: none;
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  /* =========================================================
   3. TOUCH COMMUN
   ========================================================= */

  html:root {
    --section-height: var(--screen-height);
    --section-content-height: calc(
      var(--screen-height) * var(--section-height-touch)
    );
    width: 100%;
    min-height: 0;
  }

  html:root body {
    width: 100%;
    min-height: 0;
    overflow-x: hidden;
  }

  html:root body.mobile-menu-open {
    overflow: hidden;
  }

  html:root .site-page {
    width: 100%;
    min-height: 0;
  }

  html:root .fixed-header-zone {
    height: calc(var(--space-medium) + var(--space-large) + var(--space-small));
    background: var(--color-white);
  }

  html:root body.mobile-menu-open .fixed-header-zone {
    background: var(--color-light-grey);
  }

  html:root .site-header {
    top: var(--space-medium);
    left: var(--space-medium);
    right: var(--space-medium);
    height: var(--control-large);
  }

  html:root .site-logo {
    position: relative;
    z-index: 1002;
    height: calc(var(--control-medium) * 1.5);
  }

  html:root .site-nav {
    align-items: center;
  }

  html:root .mobile-menu-toggle {
    position: relative;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    flex: 0 0 auto;
    width: var(--menu-toggle-width);
    height: var(--menu-toggle-height);
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  html:root .mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: var(--menu-toggle-stroke);
    background: var(--color-black);
    transform-origin: center;
    transition:
      transform 180ms ease,
      opacity 180ms ease;
  }

  html:root body.mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(
        calc((var(--menu-toggle-height) - var(--menu-toggle-stroke)) / 2)
      )
      rotate(45deg);
  }

  html:root body.mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  html:root body.mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(
        calc((var(--menu-toggle-height) - var(--menu-toggle-stroke)) / -2)
      )
      rotate(-45deg);
  }
}

/* Un panneau tactile unique, indépendant du masque de l'accueil. */
.mobile-menu-layer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: var(--color-light-grey);
}

.mobile-menu-layer[hidden] {
  display: none;
}

.mobile-menu-copyright {
  position: absolute;
  left: var(--space-medium);
  bottom: var(--space-medium);
  z-index: 1002;
  display: flex;
  align-items: center;
  height: var(--control-large);
  color: var(--color-black);
  font-family: var(--font-geist-mono);
  font-size: var(--font-h5);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.mobile-menu-header {
  position: absolute;
  top: var(--space-medium);
  left: var(--space-medium);
  right: var(--space-medium);
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--control-large);
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  html:root .landing-header-zone .site-nav-links {
    display: none;
  }

  html:root .mobile-menu-layer .site-nav-links {
    transition: none;
  }

  html:root .site-nav-links {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    background: var(--color-light-grey);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 180ms ease,
      visibility 180ms ease;
  }

  html:root body.mobile-menu-open .site-nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  html:root .site-nav-links a {
    height: auto;
    font-family: var(--font-geist);
    font-size: var(--font-h2);
    font-weight: 900;
    line-height: 1;
  }

  html:root .about-section,
  html:root .contact-section {
    position: relative;
    width: 100%;
    height: var(--section-height);
    min-height: var(--section-height);
  }

  html:root .services-section {
    position: relative;
    width: 100%;
    height: var(--section-height);
    padding: 0;
    background: var(--color-white);
    --touch-service-card-width: calc(100vw - (var(--space-medium) * 2));
    --touch-service-card-height: calc(
      var(--section-content-height) - var(--space-medium)
    );
  }

  html:root .services-horizontal-sticky {
    position: static;
    top: auto;
    width: 100%;
    height: 100%;
    overflow: visible;
  }

  html:root .services-horizontal-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  html:root .services-horizontal-viewport::before,
  html:root .services-horizontal-viewport::after {
    display: none;
  }

  html:root .services-title {
    position: absolute;
    left: var(--space-medium);
    right: var(--space-medium);
    margin: 0;
    bottom: calc(
      var(--space-medium) + var(--touch-service-card-height) +
        var(--space-small)
    );
  }

  html:root .services-horizontal-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--space-medium);
    display: flex;
    align-items: stretch;
    gap: var(--space-large);
    width: 100%;
    padding: 0 var(--space-medium);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--space-medium);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    transform: none;
    will-change: auto;
    height: var(--touch-service-card-height);
  }

  html:root .services-horizontal-track::-webkit-scrollbar {
    display: none;
  }

  html:root .service-card {
    display: grid;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex: 0 0 var(--touch-service-card-width);
    width: var(--touch-service-card-width);
    height: var(--touch-service-card-height);
  }

  html:root .service-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  html:root .service-copy {
    width: 100%;
    height: 100%;
    padding: 0;
  }

  html:root .service-title {
    overflow: visible;
  }

  html:root .service-text {
    width: 100%;
  }

  html:root .service-footer {
    display: none;
  }

  html:root .service-media {
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  html:root .service-video {
    flex: 0 0 auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
  }

  html:root .services-pagination {
    position: absolute;
    left: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-small);
    bottom: calc(var(--space-medium) + var(--control-small));
    transform: translateX(-50%);
  }

  html:root .services-pagination-dot {
    display: block;
    width: var(--pagination-dot-size);
    height: var(--pagination-dot-size);
    padding: 0;
    border: 1px solid var(--color-black);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }

  html:root .services-pagination-dot.is-active {
    background: var(--color-black);
  }

  html:root .about-title {
    position: absolute;
    left: var(--space-medium);
    right: var(--space-medium);
    top: auto;
    margin: 0;
  }

  html:root .about-layout {
    position: absolute;
    left: var(--space-medium);
    right: var(--space-medium);
    bottom: var(--space-medium);
    display: grid;
    width: auto;
  }

  html:root .about-main-block {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  html:root .about-main-copy {
    display: grid;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  html:root .about-timeline {
    display: none;
  }

  html:root .about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: var(--space-small);
    width: 100%;
  }

  html:root .about-card {
    width: 100%;
    height: 100%;
    --about-card-left-inset: var(--space-medium);
    --about-card-right-inset: var(--about-card-left-inset);
    padding: var(--space-medium);
  }

  html:root .about-card-title,
  html:root .about-card-footer {
    font-size: var(--font-h6);
  }

  html:root .contact-title {
    position: absolute;
    left: var(--space-medium);
    right: var(--space-medium);
    top: auto;
    margin: 0;
  }

  html:root .contact-layout {
    position: absolute;
    left: var(--space-medium);
    right: var(--space-medium);
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
  }

  html:root .contact-main-block {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
  }

  html:root .contact-left {
    width: 100%;
  }

  html:root .contact-right {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    overflow: hidden;
  }

  html:root .contact-left-copy {
    display: grid;
    width: 100%;
  }

  html:root .contact-main-text-line {
    display: block;
    white-space: normal;
  }

  html:root .contact-email {
    font-size: var(--font-h4);
    justify-self: center;
  }

  html:root .contact-map {
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  html:root:root .contact-footer-block {
    --touch-footer-height: calc(var(--screen-height) * 0.18);
    flex: 0 0 var(--touch-footer-height);
    height: var(--touch-footer-height);
  }

  html:root .contact-footer-block {
    position: relative;
    min-height: 0;
    padding: var(--space-medium);
  }

  html:root .contact-logo {
    width: auto;
    max-height: 100%;
    object-fit: contain;
  }

  html:root .contact-footer-copy {
    display: flex;
    flex-direction: column;
    color: var(--color-white);
    font-size: var(--font-h6);
  }
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) and (orientation: landscape) {
  /* Géométrie paysage partagée par mobile et tablette. */

  html:root:root {
    --section-height-touch: calc(75 / 100);
  }

  html:root:root .contact-email {
    justify-self: start;
  }

  html:root:root .site-nav-links {
    gap: var(--space-large);
    padding: calc(var(--space-medium) + var(--space-large) + var(--space-small))
      var(--space-medium)
      calc(var(--space-medium) + var(--font-h3) + (var(--space-medium) * 2));
  }

  html:root:root .services-section {
    min-height: var(--section-height);
  }

  html:root:root .service-card {
    grid-template-rows: 1fr;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  html:root:root .service-copy {
    display: grid;
    grid-template-rows: auto 1fr;
  }

  html:root:root .service-title {
    font-size: var(--font-h3);
    white-space: nowrap;
  }

  html:root:root .service-text {
    align-self: center;
  }

  html:root:root .service-text p + p {
    margin-top: var(--space-medium);
  }

  html:root:root .service-media {
    align-items: center;
    padding: var(--space-medium);
  }

  html:root:root .service-video {
    width: min(
      38vw,
      calc(var(--touch-service-card-height) - (var(--space-medium) * 2))
    );
    height: min(
      38vw,
      calc(var(--touch-service-card-height) - (var(--space-medium) * 2))
    );
  }

  html:root:root .contact-title {
    bottom: calc(var(--section-content-height) + var(--space-small));
  }

  html:root:root .contact-layout {
    top: calc(var(--section-height) - var(--section-content-height));
    gap: var(--space-medium);
  }

  html:root:root .contact-main-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  html:root:root .contact-left {
    height: 100%;
    min-height: 0;
  }

  html:root:root .contact-right {
    height: 100%;
    padding: var(--space-medium);
  }

  html:root:root .contact-left-copy {
    grid-template-rows: auto 1fr auto;
    height: 100%;
    overflow: hidden;
  }

  html:root:root .contact-main-text {
    align-self: center;
    margin: 0;
  }

  html:root:root .contact-footer-block {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: var(--color-black);
  }

  html:root:root .contact-footer-copy {
    position: absolute;
    top: var(--space-small);
    left: var(--space-small);
    bottom: var(--space-small);
    align-items: flex-start;
    justify-content: space-between;
    width: auto;
    gap: 0;
    text-align: left;
  }

  html:root:root .contact-footer-links {
    align-items: flex-start;
  }

  html:root:root .contact-footer-copyright {
    white-space: nowrap;
  }

  html:root:root .contact-logo {
    display: block;
    height: calc(var(--touch-footer-height) - (var(--space-medium) * 2));
    max-width: 50%;
  }

  html:root:root .about-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  html:root:root .about-main-copy {
    grid-template-rows: auto 1fr;
  }

  html:root:root .about-main-text {
    align-self: end;
  }

  html:root:root .about-main-title {
    margin: 0;
  }

  html:root:root .about-grid {
    height: 100%;
  }

  /* =========================================================
   5. MOBILE PAYSAGE
   ========================================================= */

  html:root:root .about-section {
    padding: 0;
  }

  html:root:root .about-title {
    bottom: calc(var(--section-content-height) + var(--space-small));
  }

  html:root:root .about-layout {
    height: calc(var(--section-content-height) - var(--space-medium));
    gap: var(--space-medium);
  }

  html:root:root .about-main-copy {
    padding: var(--space-medium) 0 var(--space-medium);
  }

  html:root:root .about-grid,
  html:root:root .about-card {
    min-height: 0;
  }

  html:root:root .service-content {
    padding: var(--space-medium) var(--space-medium) var(--space-medium);
  }

  html:root:root .service-title {
    margin: 0;
  }

  html:root:root .contact-main-block {
    column-gap: var(--space-medium);
  }

  html:root:root .contact-left-copy {
    padding: var(--space-medium) 0 var(--space-medium);
  }

  html:root:root .contact-main-title {
    margin: 0;
  }
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) and (orientation: portrait) {
  /* =========================================================
   4. MOBILE PORTRAIT
   ========================================================= */

  /* Structure portrait commune aux écrans tactiles. */

  html:root:root .site-nav-links {
    gap: var(--space-large);
    padding: calc(
        var(--space-medium) + var(--space-large) + var(--space-small) +
          var(--space-large)
      )
      var(--space-medium)
      calc(var(--space-medium) + var(--font-h3) + (var(--space-medium) * 2));
  }

  html:root:root .about-section {
    --mobile-about-top-from-bottom: var(--section-content-height);
    padding: 0;
  }

  html:root:root .contact-section {
    --mobile-contact-top-from-bottom: var(--section-content-height);
    padding: 0;
  }

  html:root:root .service-card {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  html:root:root .service-content {
    min-height: 0;
    padding: var(--space-large) var(--space-medium) 0;
  }

  html:root:root .service-copy {
    height: 100%;
    min-height: 0;
    display: block;
  }

  html:root:root .service-title {
    margin: 0 0 var(--space-large);
    white-space: normal;
  }

  html:root:root .service-text p + p,
  html:root:root .about-main-text p + p {
    margin-top: var(--space-medium);
  }

  /* Deux moitiés fixes : les textes n’agrandissent plus la zone vidéo.
     Les paddings du texte sont conservés ; sa longueur sera ajustée séparément. */
  html:root:root .service-media {
    container-type: size;
    align-items: center;
    padding: var(--control-large) 0;
  }

  html:root:root .service-video {
    width: min(100%, 100cqh);
    height: auto;
    max-height: 100%;
    aspect-ratio: 1;
    object-fit: contain;
  }

  /* Le centre des dots coïncide avec le centre du padding vidéo inférieur. */
  html:root:root .services-pagination {
    bottom: calc(
      var(--space-medium) +
        (var(--control-large) - var(--pagination-dot-size)) / 2
    );
  }

  html:root:root .about-title {
    bottom: calc(var(--mobile-about-top-from-bottom) + var(--space-small));
  }

  html:root:root .about-layout {
    top: calc(var(--section-height) - var(--mobile-about-top-from-bottom));
    grid-template-rows: auto minmax(0, 1fr);
    height: auto;
    gap: var(--space-large);
  }

  html:root:root .about-main-copy {
    grid-template-rows: auto auto auto;
    align-content: start;
    padding: var(--space-large) 0 0;
    height: auto;
  }

  html:root:root .about-main-block {
    height: auto;
  }

  html:root:root .about-main-title {
    margin: 0 0 var(--space-large);
  }

  html:root:root .about-main-text {
    align-self: start;
    width: 100%;
  }

  html:root:root .about-grid {
    height: 100%;
    min-height: 0;
  }

  html:root:root .about-card {
    min-height: 0;
    aspect-ratio: auto;
    cursor: pointer;
  }

  html:root:root .contact-title {
    bottom: calc(var(--mobile-contact-top-from-bottom) + var(--space-small));
    transform: none;
  }

  html:root:root .contact-layout {
    top: calc(var(--section-height) - var(--mobile-contact-top-from-bottom));
    gap: var(--space-large);
  }

  html:root:root .contact-main-block {
    display: flex;
    flex-direction: column;
    row-gap: var(--space-large);
  }

  html:root:root .contact-left {
    flex: 0 0 auto;
    height: auto;
  }

  html:root:root .contact-right {
    flex: 1 1 auto;
    height: auto;
    padding: 0 var(--space-large);
  }

  html:root:root .contact-left-copy {
    grid-template-rows: auto auto auto;
    align-content: start;
    height: auto;
    padding: var(--space-large) 0 0;
    overflow: visible;
  }

  html:root:root .contact-main-title {
    margin: 0 0 var(--space-large);
  }

  html:root:root .contact-main-title span {
    display: block;
  }

  html:root:root .contact-main-title span:not(:last-child)::after {
    content: none;
  }

  html:root:root .contact-main-text {
    align-self: start;
    margin: 0 0 var(--space-large);
  }

  html:root:root .contact-footer-block {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    justify-content: stretch;
    justify-items: center;
    row-gap: var(--control-medium);
  }

  html:root:root .contact-logo {
    grid-row: 1;
    justify-self: center;
    align-self: stretch;
    height: 100%;
    min-height: 0;
    max-width: 100%;
  }

  html:root:root .contact-footer-copy {
    grid-row: 2;
    position: static;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-medium);
    width: 100%;
    text-align: center;
  }

  html:root:root .contact-footer-links {
    align-items: center;
  }

  html:root:root .contact-footer-copyright {
    white-space: normal;
  }
}

/* Seul le texte d’aide de la landing conserve son fade d’apparition. */
:root {
  --text-fade-duration: 300ms;
}

@media (prefers-reduced-motion: no-preference) {
  #home .text-reveal-fade.text-reveal-ready {
    opacity: 0;
  }

  #home .text-reveal-fade.is-text-reveal-visible {
    opacity: 1;
    transition: opacity var(--text-fade-duration) ease-out;
    transition-delay: 250ms;
  }
}

/* La timeline conserve son animation et son replay au clic du menu. */
.is-section-animation-resetting .about-timeline::before,
.is-section-animation-resetting .about-timeline-marker,
.is-section-animation-resetting .about-timeline-date,
.is-section-animation-resetting .about-timeline-label {
  transition: none !important;
}

/* Le logo conserve exactement la place disponible dans sa cellule. */

/* Les bordures gardent leur épaisseur ; seul leur dessin est remplacé. */

/* =========================================================
   PAGES LÉGALES — menu, réglages CSS et hauteur partagés avec Services
   ========================================================= */

.legal-document,
.legal-document .site-page,
.legal-page {
  height: var(--screen-height);
  min-height: 0;
}

.legal-page {
  position: relative;
  overflow: hidden;
}

.legal-layout {
  position: absolute;
  left: var(--layout-edge);
  right: var(--layout-edge);
  bottom: var(--space-medium);
  display: grid;
  grid-template-columns:
    calc(var(--layout-width) / 3 - var(--space-medium) * 1.5)
    minmax(0, 1fr);
  gap: var(--space-medium);
  height: var(--service-card-height);
}

.legal-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: var(--space-large) var(--space-medium) var(--space-medium);
  overflow: hidden;
  background: var(--color-light-grey);
  color: var(--color-black);
  font-family: var(--font-geist-mono);
  font-size: var(--font-h6);
  font-weight: 400;
  line-height: 1.2;
}

.legal-column-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.legal-section + .legal-section {
  margin-top: var(--space-medium);
}

.legal-section h2 {
  margin: 0 0 var(--space-small);
  font-family: var(--font-geist-mono);
  font-size: var(--font-h4);
  font-weight: 700;
  line-height: 1.2;
}

.legal-section p {
  margin: 0;
}

.legal-section p + p {
  margin-top: var(--space-small);
}

.legal-section a {
  color: inherit;
  text-underline-offset: 0.15em;
}

.legal-section a[href^="mailto:"] {
  color: var(--color-orange);
  text-decoration: none;
}

.legal-page-links {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-small);
  margin-top: 0;
}

.legal-page-links a {
  color: var(--color-black);
  text-decoration: none;
}

.legal-page-links a[aria-current="page"] {
  color: var(--color-orange);
}

.legal-page-links a:hover,
.legal-section a:hover {
  text-decoration: underline;
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  html:root .legal-layout {
    height: var(--touch-service-card-height);
  }
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) and (orientation: portrait) {
  /* Le conteneur conserve sa hauteur fixe ; les deux blocs se partagent l'espace. */
  html:root:root .legal-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   BLACK LANDING — common geometry, portrait touch adjustment
   ========================================================= */
:root {
  /* Couleurs indépendantes des éléments de l’accueil. */
  --home-title-color: var(--color-white);
  --home-subtitle-color: var(--color-white);
  --home-help-color: var(--color-grey);
  --cloud-point-color: var(--color-white);
  --home-menu-color: var(--color-white);
  --home-curtain-duration: 600ms;
}

.home-landing {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  height: var(--screen-height);
  min-height: 0;
  background: var(--color-black);
  clip-path: inset(0 0 var(--home-curtain-cut, 0%) 0);
  isolation: isolate;
}

.home-landing-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: calc(var(--space-medium) + (var(--control-medium) * 1.2) + var(--space-large)) var(--space-medium) var(--space-medium);
  min-width: 0;
  min-height: 0;
}

.home-intro {
  min-width: 0;
}

.home-title {
  height: 1em;
  margin: 0;
  color: var(--home-title-color);
  font-family: var(--font-geist);
  font-size: var(--font-h1);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  text-indent: -0.06em;
  pointer-events: none;
  user-select: none;
}

.home-title-underscore {
  display: inline;
  animation: hero-cursor-blink 1s step-end infinite;
}

.home-subtitle {
  margin: var(--space-small) 0 0;
  color: var(--home-subtitle-color);
  font-family: var(--font-geist-mono);
  font-size: var(--font-h4);
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}

.home-cloud-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* Textes et bouton devant le nuage. */
.home-intro,
.home-bottom {
  position: relative;
  z-index: 1;
}

/* Maintenir le bouton dans la dernière ligne de la grille. */
.home-bottom {
  grid-row: 3;
}

/* Permettre la manipulation du nuage derrière les textes. */
.home-intro {
  pointer-events: none;
}

.home-bottom {
  pointer-events: none;
}

.home-explore {
  pointer-events: auto;
}

.hero-cloud {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-touch-callout: none;
}

.hero-cloud.is-dragging {
  cursor: grabbing;
}

.home-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 0;
  height: var(--space-large);
}

.hero-cloud-controls {
  color: var(--home-help-color);
  font-family: var(--font-geist-mono);
  font-size: var(--font-h6);
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* Le bouton réutilise les masques et la transition des liens du menu. */
.home-explore {
  --menu-ink: var(--color-black);
  --menu-paper: var(--color-black);
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: var(--control-medium);
  height: var(--control-large);
  padding: 0 var(--control-medium);
  background: var(--color-orange);
  color: var(--color-black);
  font-family: var(--font-geist-mono);
  font-size: var(--font-h4);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.home-explore-label {
  width: 8ch;
}

.home-explore-arrow {
  flex: 0 0 1ch;
  text-align: right;
}

.home-explore:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 4px;
  background: var(--color-white);
}

.home-explore:focus-visible .menu-label {
  transform: translateY(-100%);
}

.home-explore:focus-visible .menu-label-hover {
  transform: translateY(0);
}

/* Deux en-têtes : le menu blanc appartient au rideau noir. */
body.has-black-landing > .content-header-zone {
  z-index: 5;
}

body.has-black-landing .landing-header-zone {
  position: absolute;
  z-index: 3;
  background: transparent;
}

.landing-header-zone .site-nav-links a {
  color: var(--home-menu-color);
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  html:root .landing-header-zone .mobile-menu-toggle span {
    background: var(--home-menu-color);
  }

  /* Le contenu garde sa hauteur ; seul ce fond remplit l'espace supplémentaire. */
  html:root body.is-home-at-top::before {
    content: "";
    position: fixed;
    top: var(--screen-height);
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9;
    background: var(--color-black);
    pointer-events: none;
  }
}

.cloud-controls-touch {
  display: none;
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  html:root .cloud-controls-desktop {
    display: none;
  }

  html:root .cloud-controls-touch {
    display: block;
  }

  html:root .hero-cloud-controls {
    display: block;
    line-height: 1.6;
  }
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) and (orientation: portrait) {
  html:root:root .hero-cloud-controls {
    position: absolute;
    left: 0;
    bottom: calc(var(--space-large) + var(--space-medium));
  }
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  html:root .home-bottom {
    justify-content: space-between;
  }
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) and (orientation: portrait) {
  html:root:root .home-landing-content {
    padding-top: calc(var(--section-height) - var(--section-content-height) - var(--space-small) - (var(--font-h2) * 0.93));
  }

  html:root:root .home-bottom {
    justify-content: center;
  }
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) and (orientation: landscape) {
  html:root:root .home-landing-content {
    padding-top: calc(var(--section-height) - var(--section-content-height) - var(--space-small) - (var(--font-h2) * 0.93));
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-landing {
    position: relative;
    clip-path: none;
  }

  .home-title-underscore {
    animation: none;
  }
}

/* Liens à deux textes superposés : sortie vers le haut, entrée depuis le bas. */
.site-nav-links {
  --menu-ink: var(--color-black);
  --menu-paper: var(--color-white);
}

.landing-header-zone .site-nav-links {
  --menu-ink: var(--color-white);
  --menu-paper: var(--color-black);
}

.site-nav-links a.menu-link {
  height: var(--control-medium);
  padding: 0 var(--control-small);
  color: var(--menu-ink);
  background: transparent;
  line-height: 1.2;
}

.menu-label-mask {
  position: relative;
  display: block;
  overflow: hidden;
}

.menu-label,
.menu-label-hover {
  display: block;
  transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-label {
  color: var(--menu-ink);
}

.menu-label-hover {
  position: absolute;
  inset: 0;
  color: var(--menu-paper);
  transform: translateY(100%);
}

.site-nav-links a.menu-link:focus-visible {
  background: var(--menu-ink);
  outline: 1px solid var(--menu-ink);
  outline-offset: 3px;
}

.menu-link:focus-visible .menu-label {
  transform: translateY(-100%);
}

.menu-link:focus-visible .menu-label-hover {
  transform: translateY(0);
}

/* Langue choisie à droite à chaque ouverture ; ordre conservé pendant le clic. */
.language-control {
  --language-button-width: calc(2ch + var(--control-small) * 2);
  --language-row-offset: 0px;
  position: relative;
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  width: var(--language-button-width);
  height: var(--control-medium);
  overflow: hidden;
  font-family: var(--font-geist-mono);
  font-size: var(--font-h6);
  font-weight: 400;
  line-height: 1.2;
  transition: width 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.language-control[data-selected-position="left"] {
  --language-row-offset: var(--language-button-width);
}

.language-control > button {
  box-sizing: border-box;
  position: relative;
  display: block;
  flex: 0 0 var(--language-button-width);
  width: var(--language-button-width);
  height: var(--control-medium);
  padding: 0 var(--control-small);
  border: 0;
  border-radius: 0;
  font: inherit;
  color: var(--menu-ink);
  background: transparent;
  cursor: pointer;
  transform: translateX(var(--language-row-offset));
  transition:
    transform 250ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 250ms;
}

.language-control > .language-alternative {
  visibility: hidden;
}

.language-control.is-language-order-resetting,
.language-control.is-language-order-resetting > button {
  transition: none;
}

.language-control > .language-current,
.language-control > button:hover,
.language-control > button:focus-visible {
  color: var(--color-black);
  background: var(--color-orange);
}

@media not all and ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  html:root
    .language-control:has(> button:hover)
    > .language-current:not(:hover) {
    background: transparent;
    color: var(--menu-ink);
  }
}

.language-control:has(> button:focus-visible) {
  --language-row-offset: 0px;
  width: calc(var(--language-button-width) * 2);
}

.language-control:has(> button:focus-visible) > button {
  visibility: visible;
  transition-delay: 0s;
}

.language-control > button:focus-visible {
  outline: 1px solid var(--menu-ink);
  outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
  .site-nav-links a.menu-link:hover {
    background: var(--menu-ink);
  }

  .home-explore:hover {
    background: var(--color-white);
  }

  .contact-email:hover {
    background: var(--color-black);
    color: var(--color-white);
  }

  .contact-email:hover .menu-label {
    transform: translateY(-100%);
  }

  .contact-email:hover .menu-label-hover {
    transform: translateY(0);
  }

  .home-explore:hover .menu-label {
    transform: translateY(-100%);
  }

  .home-explore:hover .menu-label-hover {
    transform: translateY(0);
  }

  .menu-link:hover .menu-label {
    transform: translateY(-100%);
  }

  .menu-link:hover .menu-label-hover {
    transform: translateY(0);
  }

  .language-control:hover {
    --language-row-offset: 0px;
    width: calc(var(--language-button-width) * 2);
  }

  .language-control:hover > button {
    visibility: visible;
    transition-delay: 0s;
  }
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  html:root .site-nav-links {
    --menu-ink: var(--color-black);
    --menu-paper: var(--color-white);
    gap: var(--space-large);
  }

  html:root body.mobile-menu-open .mobile-menu-toggle span {
    background: var(--color-black);
  }

  html:root .site-nav-links a.menu-link {
    transform: none;
  }

  html:root .language-control {
    position: absolute;
    right: var(--space-medium);
    bottom: var(--space-medium);
    z-index: 1;
    width: auto;
    height: var(--control-large);
    overflow: visible;
    font-size: var(--font-h4);
    font-weight: 700;
    transition: none;
  }

  html:root .language-control > .language-alternative {
    display: none;
  }

  html:root .language-control > .language-current {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    height: var(--control-large);
    padding: 0 var(--control-medium);
    color: var(--color-black);
    background: var(--color-orange);
    transform: none;
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-label,
  .menu-label-hover,
  .language-control,
  .language-control > button {
    transition: none;
  }
}

/* Footer fixé sous le contenu clair : le bord du rideau suit le scroll. */
.contact-footer-block.footer-curtain-slot {
  background: transparent;
  pointer-events: none;
}

body > .contact-footer-block.footer-curtain-surface {
  position: fixed;
  z-index: 2;
  left: var(--footer-curtain-left, 0px);
  bottom: var(--footer-curtain-bottom, 0px);
  width: var(--footer-curtain-width, 100%);
  height: var(--footer-curtain-height, var(--contact-footer-height));
  margin: 0;
  clip-path: inset(var(--footer-curtain-covered, 100%) 0 0 0);
}

/* Navigation par menu : la nouvelle section recouvre l'ancienne depuis le bas. */
:root {
  --menu-transition-duration: 650ms;
}

html:is(.is-menu-section-transition, .is-document-transition)
  .content-header-zone {
  view-transition-name: menu-fixed-header;
}

html:is(.is-menu-section-transition, .is-document-transition) .site-nav-links {
  transition: none;
}

html:is(.is-menu-section-transition, .is-document-transition)::view-transition {
  pointer-events: none;
}

html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-group(root),
html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-group(menu-fixed-header) {
  animation: none;
}

html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-group(root) {
  z-index: 0;
}

html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-group(menu-fixed-header) {
  z-index: 1;
}

html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-old(root),
html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-new(root) {
  mix-blend-mode: normal;
  opacity: 1;
}

html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-old(root) {
  animation: none;
  z-index: 0;
}

html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-new(root) {
  z-index: 1;
  animation: menu-section-enter var(--menu-transition-duration)
    cubic-bezier(0.65, 0, 0.35, 1) both;
}

html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-old(menu-fixed-header) {
  animation: none;
  opacity: 0;
}

html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-new(menu-fixed-header) {
  animation: none;
  opacity: 1;
  mix-blend-mode: normal;
}

@keyframes menu-section-enter {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html:is(
      .is-menu-section-transition,
      .is-document-transition
    )::view-transition-new(root) {
    animation: none;
  }
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  /* Zone d'appui tactile : le point et ses repères gardent leur taille. */
  html:root .map-location {
    --location-hit-offset: calc((48px - var(--map-marker-size)) / 2);
    width: 48px;
    height: 48px;
    touch-action: pan-y;
  }

  html:root .map-location-marker {
    inset: auto;
    left: 50%;
    top: 50%;
    width: var(--map-marker-size);
    height: var(--map-marker-size);
    transform: translate(-50%, -50%);
  }

  html:root .map-location:is(.is-active, :focus-visible) .map-location-marker {
    transform: translate(-50%, -50%) scale(1.2);
  }

  html:root .map-location-bracket-top-left {
    left: calc(var(--location-hit-offset) - var(--map-bracket-size) * 1.2);
    top: calc(var(--location-hit-offset) - var(--map-bracket-size) * 1.2);
  }

  html:root .map-location-bracket-top-right {
    left: calc(var(--location-hit-offset) + var(--map-bracket-size) * 1.2);
    top: calc(var(--location-hit-offset) - var(--map-bracket-size) * 1.2);
  }

  html:root .map-location-bracket-bottom-left {
    left: calc(var(--location-hit-offset) - var(--map-bracket-size) * 1.2);
    top: calc(var(--location-hit-offset) + var(--map-bracket-size) * 1.2);
  }

  html:root .map-location-bracket-bottom-right {
    left: calc(var(--location-hit-offset) + var(--map-bracket-size) * 1.2);
    top: calc(var(--location-hit-offset) + var(--map-bracket-size) * 1.2);
  }

  html:root .map-location-info {
    bottom: calc(
      var(--location-hit-offset) + var(--map-bracket-size) * 2.2 +
        var(--space-small)
    );
  }
}

/* Navigation entre documents : le nouveau contenu recouvre la vue précédente. */
@view-transition {
  navigation: auto;
}

html.is-page-entry-pending .site-page,
html.is-page-entry-pending body > .footer-curtain-surface {
  visibility: hidden;
}

html.is-page-transition-home .content-header-zone {
  view-transition-name: none;
}

html.is-page-transition-home::view-transition-new(root) {
  animation-name: page-enter-from-top;
}

@keyframes page-enter-from-top {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Repli sans View Transition : un masque découvre la page sans déplacer sa géométrie. */
html.is-page-entry-css body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--color-white);
  pointer-events: none;
  animation: page-entry-mask-up var(--menu-transition-duration)
    cubic-bezier(0.65, 0, 0.35, 1) both;
}

html.is-page-entry-css[data-page-entry="down"] body::after {
  animation-name: page-entry-mask-down;
}

html.is-page-entry-css:not([data-page-entry="down"]) .content-header-zone {
  z-index: 1000;
}

@keyframes page-entry-mask-up {
  to {
    transform: translateY(-100%);
  }
}

@keyframes page-entry-mask-down {
  to {
    transform: translateY(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  html.is-page-entry-pending .site-page,
  html.is-page-entry-pending body > .footer-curtain-surface {
    visibility: visible;
  }

  html.is-page-entry-css body::after {
    display: none;
  }
}

/* Le cliché du menu conserve son échelle, même si le navigateur masque la scrollbar. */
html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-group(menu-fixed-header) {
  width: var(--document-header-width, 100%);
}

html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-old(menu-fixed-header),
html:is(
    .is-menu-section-transition,
    .is-document-transition
  )::view-transition-new(menu-fixed-header) {
  width: 100%;
  height: 100%;
  object-fit: none;
  object-position: left top;
}

/* Géométrie du vrai menu et de ses clichés figée pendant les transitions de document. */
html.is-document-transition .content-header-zone {
  width: var(--document-header-width, 100%);
  left: var(--document-header-left, 0px);
}

/* La largeur du sélecteur est calculée directement lors du chargement.
   L’animation de largeur reste réservée à l’ouverture au survol, une fois prêt. */
html:is(
    .is-language-initializing,
    .is-page-entry-pending,
    .is-document-transition
  )
  .language-control,
html:is(
    .is-language-initializing,
    .is-page-entry-pending,
    .is-document-transition
  )
  .language-control
  > button {
  transition: none;
}

/* =========================================================
   404 — mêmes réglages CSS, composants et couleurs que le site
   ========================================================= */
:root {
  --error-code-scale: 2.1;
  --error-cloud-point-color: var(--color-white);
  --error-console-font-size: var(--font-h6);
  --error-console-line-height: calc(var(--error-console-font-size) * 1.6);
}

html[data-document-type="error"] {
  scrollbar-gutter: auto;
}

.error-document {
  height: var(--screen-height);
  min-height: var(--screen-height);
  background: var(--color-black);
  color: var(--color-white);
}

.error-document .fixed-header-zone.error-header-zone {
  background: transparent;
}

.error-header-tools {
  --menu-ink: var(--color-white);
  --menu-paper: var(--color-black);
  display: flex;
  align-items: center;
  height: 100%;
}

.error-page {
  position: relative;
  width: var(--screen-width);
  height: var(--screen-height);
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  padding-inline: var(--space-medium);
}

.error-copy {
  position: relative;
  top: auto;
  left: auto;
  width: max-content;
  align-self: center;
  transform: none;
}

.error-code {
  margin: 0;
  font-family: var(--font-geist);
  font-size: calc(var(--font-h1) * var(--error-code-scale));
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-indent: -0.035em;
}

.error-title {
  margin: var(--space-small) 0 0;
  font-family: var(--font-geist);
  font-size: var(--font-h3);
  font-weight: 900;
  line-height: 1;
}

.error-description {
  margin: var(--space-small) 0 0;
  font-family: var(--font-geist-mono);
  font-size: var(--font-h5);
  font-weight: 400;
  line-height: 1;
}

.error-cloud-stage {
  position: relative;
  inset: auto;
  width: 100%;
  height: calc(
    var(--screen-height) - var(--space-large) - var(--space-medium) * 5
  );
  align-self: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.error-cloud-stage .hero-cloud {
  cursor: default;
  pointer-events: none;
}

.error-console {
  position: absolute;
  z-index: 1;
  left: var(--space-medium);
  bottom: var(--space-medium);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: calc(50% - var(--space-medium));
  height: calc(var(--error-console-line-height) * 5);
  overflow: hidden;
  font-family: var(--font-geist-mono);
  font-size: var(--error-console-font-size);
  font-weight: 400;
  color: var(--color-grey);
  line-height: var(--error-console-line-height);
}

.error-console-row {
  flex: 0 0 var(--error-console-line-height);
  height: var(--error-console-line-height);
  white-space: pre;
  overflow: hidden;
}

.error-console-text {
  display: block;
}

.error-console-ok {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}

.error-console-ok:not(:disabled):hover,
.error-console-ok:not(:disabled):focus-visible {
  color: var(--color-orange);
}

.error-console-ok:disabled {
  cursor: default;
  opacity: 1;
}

.error-console-ok:focus-visible {
  outline: 1px solid var(--color-orange);
  outline-offset: 2px;
}

.error-home-button {
  position: absolute;
  z-index: 1;
  right: var(--space-medium);
  bottom: var(--space-medium);
}

.error-home-button .home-explore-label {
  width: 14ch;
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  html:root .error-document .language-control {
    position: relative;
    right: auto;
    bottom: auto;
  }
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) and (orientation: portrait) {
  html:root:root .error-header-zone .site-header {
    left: var(--space-medium);
    right: var(--space-medium);
  }

  html:root:root .error-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: var(--space-medium);
    padding: calc(var(--space-large) * 2 + var(--space-medium))
      var(--space-medium) var(--space-medium);
  }

  html:root:root .error-copy {
    position: static;
    width: auto;
    transform: none;
  }

  html:root:root .error-cloud-stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
  }

  html:root:root .error-console {
    position: relative;
    inset: auto;
    width: 100%;
  }

  html:root:root .error-home-button {
    position: relative;
    inset: auto;
    justify-self: center;
  }
}

html[data-document-type="error"] {
  background: var(--color-black);
}

/* Pages légales : conserver leur fenêtre d'écran et leurs dimensions propres. */
.legal-document {
  --section-height: var(--screen-height);
  --service-card-height: calc(
    var(--screen-height) * 2 / 3 - var(--space-medium)
  );
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) and (orientation: portrait) {
  html:root:root .legal-page {
    --touch-service-card-height: calc(
      var(--screen-height) * 0.8 - var(--space-medium)
    );
  }
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) and (orientation: landscape) {
  html:root:root .legal-page {
    --touch-service-card-height: calc(
      var(--screen-height) * 0.75 - var(--space-medium)
    );
  }
}

@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) and (orientation: portrait) {
  html:root:root .home-subtitle {
    white-space: normal;
  }
}

body:is(.legal-document, .error-document) {
  --page-height: var(--screen-height);
}

.legal-column-content {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}
@media ((hover: none) or (any-pointer: coarse)) and ((max-width: 1100px) or (max-height: 1100px)) {
  /* 8em inclut le mot anglais le plus long et le curseur, sans couper le texte. */
  html:root .home-intro {
    container-type: inline-size;
  }
  html:root .home-title {
    --home-title-width-em: 8;
    font-size: min(var(--font-h1), calc(100cqw / var(--home-title-width-em)));
  }
}
