/* =========================================================
   HaSenso — du sens aux actions
   Feuille de styles du site statique
   ========================================================= */

:root {
  --dark-1: #1f2044;          /* bleu nuit des boutons, titres, préchargeur */
  --text: #333333;
  --muted: #888888;
  --light-1: #ffffff;
  --light-3: #f8f8f8;
  --border: rgba(136, 136, 136, .3);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.77, 0, .175, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --duration: 1.2s;
  /* marges du site en ligne (thème Kinsey) */
  --gutter: 120px;
  --gutter-v: 100px;
  --header-top: clamp(22px, min(5.2vw, 8.8vh), 75px);
  --logo-h: clamp(56px, 22vh, 230px);      /* hauteur max des logos */
  --bar-h: 0px;                             /* barre basse (mobile) */
}
@media (max-width: 1400px) { :root { --gutter: 80px; --gutter-v: 60px; } }
@media (max-width: 1280px) { :root { --gutter: 60px; --gutter-v: 40px; } }
@media (max-width: 991.98px) { :root { --gutter: 20px; --gutter-v: 20px; } }

/* Police Inter hébergée localement (pas d’appel à Google Fonts) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(15px, 1.06vw, 17px);
  line-height: 1.8;
  color: var(--text);
  background: var(--light-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; }

button { font: inherit; }

/* ---------------------------------------------------------
   Masques de révélation (préchargeur, colonne images)
   --------------------------------------------------------- */
.mask-layer { position: relative; width: 100%; height: 100%; overflow: hidden; }

/* ---------------------------------------------------------
   Préchargeur
   --------------------------------------------------------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  color: var(--light-1);
  pointer-events: none;
}
.preloader .mask-layer--outer {
  background: var(--dark-1);
  transition: transform 1.2s var(--ease);
}
.preloader .mask-layer--inner {
  transition: transform 1.2s var(--ease);
}
.preloader.is-done .mask-layer--outer { transform: translateY(-101%); }
.preloader.is-done .mask-layer--inner { transform: translateY(101%); }
.preloader.is-hidden { display: none; }

.preloader__logo {
  position: absolute;
  top: var(--header-top);
  left: var(--gutter);
  line-height: 0;
}
.preloader__logo img { width: 127px; }

.preloader__wrapper {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(24px, 5vw, 60px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  transition: opacity .6s ease, transform .6s var(--ease-out);
}
.preloader.is-leaving .preloader__wrapper { opacity: 0; transform: translateY(-50px); }

.preloader__counter {
  font-size: clamp(96px, 14.7vw, 212px);
  font-weight: 100;
  line-height: 1;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
  padding-bottom: .08em;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: var(--progress, 0%) 2px;
}

.preloader__label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: .6em;
}

/* Pendant le chargement, on bloque le défilement */
body.is-loading { overflow: hidden; }

/* Sur grand écran, l'accueil tient dans l'écran : pas de défilement de page */
@media (min-width: 992px) {
  html:has(body.page-home),
  body.page-home {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }
}

/* ---------------------------------------------------------
   En-tête
   --------------------------------------------------------- */
.header {
  position: absolute;
  top: var(--header-top);
  left: var(--gutter);
  z-index: 50;
  line-height: 0;
}
.logo { display: inline-block; }
.logo img { width: 127px; height: auto; }

/* ---------------------------------------------------------
   Section « projets » plein écran
   --------------------------------------------------------- */
.projects {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  transition: background-color var(--duration) var(--ease);
  touch-action: pan-y;
}

/* Colonne de gauche : textes */
.projects__content {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  z-index: 10;
}

.slide {
  position: absolute;
  inset: 0;
  padding:
    calc(var(--header-top) + 15px + clamp(20px, 5vh, 56px))
    var(--gutter)
    calc(var(--bar-h) + clamp(20px, 6vh, 64px))
    var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  justify-content: safe center;
  visibility: hidden;
  pointer-events: none;
  /* secours : si le contenu dépasse (très petits écrans), il défile */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.slide::-webkit-scrollbar { display: none; }
.slide.is-active,
.slide.is-leaving { visibility: visible; }
.slide.is-active { pointer-events: auto; }

.slide__heading {
  margin: 0;
  font-size: clamp(28px, min(3.46vw, 7vh), 76px);
  text-wrap: balance;
  font-weight: 100;
  line-height: 1.23;
  letter-spacing: -1px;
  color: var(--dark-1);
  align-self: flex-start;
  /* soulignement au survol du bouton */
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 100% 100%;
  background-size: 0% 1px;
  transition: background-size .6s var(--ease);
}
.projects.is-hovering .slide.is-active .slide__heading {
  background-position: 0 100%;
  background-size: 100% 1px;
}

.slide__text {
  margin: clamp(.6rem, 2vh, 1rem) 0 .5rem;
  max-width: 34em;
}

.slide__logos {
  margin: clamp(.4rem, 1.5vh, .75rem) 0 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}
.slide__logos img {
  width: auto;
  height: auto;
  min-width: 0;
  flex: 0 1 auto;
  max-width: min(var(--w, 300px), 100%);
  max-height: var(--logo-h);
}

.slide__button { margin-top: clamp(.9rem, 3vh, 1.5rem); }

/* liens complémentaires (offres IA, etc.) */
.slide__links {
  list-style: none;
  margin: clamp(.5rem, 1.6vh, 1rem) 0 0;
  padding: 0 0 0 16px;
  max-width: 34em;
  display: grid;
  gap: clamp(8px, 1.6vh, 14px);
  border-left: 1px solid rgba(31, 32, 68, .25);
}
.offer {
  display: grid;
  gap: 1px;
  color: inherit;
  text-decoration: none;
}
.offer__title {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--dark-1);
  line-height: 1.5;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 100% 100%;
  background-size: 0% 1px;
  transition: background-size .5s var(--ease);
}
.offer__arrow {
  display: inline-block;
  flex: none;
  width: 17px;
  height: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 10'%3E%3Cpath d='M0 5h15.5M11.5 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 10'%3E%3Cpath d='M0 5h15.5M11.5 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform .4s var(--ease-out);
}
.offer__text {
  font-size: .88em;
  line-height: 1.55;
  color: #4a4a5a;
}
.offer:hover .offer__title,
.offer:focus-visible .offer__title { background-position: 0 100%; background-size: 100% 1px; }
.offer:hover .offer__arrow,
.offer:focus-visible .offer__arrow { transform: translateX(5px); }
.offer:focus-visible { outline: 2px solid var(--dark-1); outline-offset: 4px; }

/* les logos se font plus discrets quand la page a des liens complémentaires */
.slide--has-links .slide__logos img { max-height: calc(var(--logo-h) * .62); }

/* compteur texte (mobile uniquement) */
.counter { display: none; }

/* --- texte découpé (lettres et lignes) --- */
.split-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  /* marge invisible sous chaque lettre : les jambages (g, p, q, j) ne sont plus coupés */
  padding-bottom: .22em;
  margin-bottom: -.22em;
}
.split-line { display: block; overflow: hidden; }
.split-line__inner { display: block; }
.split-char { display: inline-block; }
.split-word { display: inline-block; white-space: nowrap; }

.split-char,
.split-line__inner {
  transform: translateY(100%);
  transition: transform .9s var(--ease-out);
  will-change: transform;
}
.split-char { transform: translateY(calc(100% + .22em)); }
.slide.is-in .split-char,
.slide.is-in .split-line__inner { transform: translateY(0); }
.slide.is-out .split-char,
.slide.is-out .split-line__inner {
  transform: translateY(-100%);
  transition-duration: .6s;
  transition-timing-function: var(--ease);
}

.slide .fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .9s var(--ease-out);
}
.slide.is-in .fade-up { opacity: 1; transform: none; }
.slide.is-out .fade-up {
  opacity: 0;
  transform: translateY(-20px);
  transition-duration: .5s;
  transition-delay: 0s !important;
}

/* ---------------------------------------------------------
   Bouton « + d'infos »
   --------------------------------------------------------- */
.button {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  border-radius: 96px;
  background: var(--dark-1);
  color: #cfcfcf;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  padding: 16px 30px;
  transition: color .4s ease, transform .4s var(--ease-out);
}
.button:hover,
.button:focus-visible { color: #fff; }
.button:focus-visible { outline: 2px solid var(--dark-1); outline-offset: 3px; }

.button__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .5s var(--ease);
}
.button__label--hover {
  position: absolute;
  inset: 0;
  justify-content: center;
  transform: translateY(100%);
}
.button:hover .button__label--normal,
.button:focus-visible .button__label--normal { transform: translateY(-300%); }
.button:hover .button__label--hover,
.button:focus-visible .button__label--hover { transform: translateY(0); }

.button__arrow {
  display: inline-block;
  width: 17px;
  height: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 10'%3E%3Cpath d='M0 5h15.5M11.5 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 10'%3E%3Cpath d='M0 5h15.5M11.5 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------------------------------------------------------
   Colonne images
   --------------------------------------------------------- */
.projects__images {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: calc(50% - 2 * var(--gutter));   /* laisse une bande de 2 marges à droite */
  z-index: 5;
}
.projects__images .mask-layer--outer {
  background: #ffffff;
  clip-path: inset(0 0 0 100%);
  transition: clip-path 1.4s var(--ease);
}
.projects__images .mask-layer--inner {
  transform: scale(1.2);
  transform-origin: 50% 50%;
  transition: transform 1.6s var(--ease);
}
.projects.is-revealed .projects__images .mask-layer--outer { clip-path: inset(0 0 0 0); }
.projects.is-revealed .projects__images .mask-layer--inner { transform: scale(1); }

.images-track {
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform var(--duration) var(--ease);
  will-change: transform;
}
.images-slide {
  height: 100%;
  /* mêmes marges que le site en ligne : fixes sur les côtés, fluides en haut et en bas */
  padding:
    min(160px, calc(50px + (100vw - 320px) * .06875))
    var(--gutter)
    min(150px, calc(50px + (100vw - 320px) * .0625));
  overflow: hidden;
}
.images-slide__frame {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.images-slide__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.25);
  transition: transform var(--duration) var(--ease);
}
.images-slide.is-active .images-slide__frame img { transform: scale(1); }
.projects.is-hovering .images-slide.is-active .images-slide__frame img {
  transform: scale(1.1);
  transition: transform .8s var(--ease-out);
}

.projects__overlay { display: none; }

/* ---------------------------------------------------------
   Compteur vertical et flèches (bande de droite)
   --------------------------------------------------------- */
.scrollbar,
.arrows {
  position: absolute;
  right: 0;
  width: calc(2 * var(--gutter));
  display: flex;
  justify-content: center;
  z-index: 20;
}
.scrollbar { top: 50%; transform: translateY(-50%); }
.arrows {
  bottom: calc(var(--gutter-v) / 1.5);
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.jump-in {
  opacity: 0;
  translate: 30px 0;
  transition: opacity .8s ease, translate 1s var(--ease-out);
}
.projects.is-revealed .jump-in { opacity: 1; translate: 0 0; transition-delay: .5s; }

.scrollbar__track {
  position: relative;
  width: 1px;
  height: 180px;
  background: rgba(31, 32, 68, .18);
}
.scrollbar__handle {
  position: absolute;
  left: -1px;
  top: 0;
  width: 3px;
  height: calc(100% / var(--count, 7));
  background: var(--dark-1);
  transition: transform var(--duration) var(--ease);
}
.scrollbar__handle::before {
  content: attr(data-content);
  position: absolute;
  right: 14px;
  top: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--dark-1);
  font-variant-numeric: tabular-nums;
}

.arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--dark-1);
  cursor: pointer;
  transition: opacity .3s ease, background-color .3s ease, transform .3s var(--ease-out);
}
.arrow svg { width: 24px; height: 24px; fill: currentColor; }
.arrow:hover:not(:disabled) { background: rgba(31, 32, 68, .08); transform: scale(1.1); }
.arrow:focus-visible { outline: 2px solid var(--dark-1); outline-offset: 2px; }
.arrow:disabled { opacity: .3; cursor: default; }

/* ---------------------------------------------------------
   Éléments réservés au mobile (cachés sur grand écran)
   --------------------------------------------------------- */
.slide__media,
.menu-btn,
.menu,
.mfooter,
.header__progress,
.logo__light { display: none; }

/* =========================================================
   MOBILE ET TABLETTE (< 992 px)
   Un récit vertical : chaque activité est un chapitre de sa
   couleur, la photo posée dans un passe-partout blanc qui
   déborde à droite. En-tête à la couleur du chapitre en cours,
   menu plein écran bleu nuit.
   ========================================================= */
@media (max-width: 991.98px) {
  :root {
    --m-pad: 22px;
    --header-h: 64px;
  }
  body { font-size: 15.5px; line-height: 1.7; }

  /* ---- en-tête fixe ---- */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 950;
    height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) var(--m-pad) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--header-bg, transparent);
    transition: background-color .6s var(--ease);
    line-height: 1;
  }
  .page-contact .header { --header-bg: var(--light-3); }
  .logo { position: relative; }
  .logo img { width: 132px; transition: opacity .4s ease; }
  .logo__light { display: block; position: absolute; inset: 0; opacity: 0; }
  .menu-open .logo__dark { opacity: 0; }
  .menu-open .logo__light { opacity: 1; }
  .menu-open .header { background-color: transparent; }

  .header__progress {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(31, 32, 68, .12);
    transition: opacity .3s;
  }
  .header__progress span {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--dark-1);
    transform-origin: 0 50%;
    transform: scaleX(var(--progress, 0));
  }
  .menu-open .header__progress { opacity: 0; }
  .header.is-dark .logo__dark { opacity: 0; }
  .header.is-dark .logo__light { opacity: 1; }
  .header.is-dark .menu-btn { color: #fff; }
  .header.is-dark .header__progress { background: rgba(255, 255, 255, .15); }
  .header.is-dark .header__progress span { background: #fff; }

  .menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    margin-right: -10px;
    padding: 0 10px;
    border: 0;
    background: none;
    color: var(--dark-1);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color .4s ease;
  }
  .menu-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 4px; }
  .menu-btn__icon { position: relative; width: 22px; height: 10px; }
  .menu-btn__icon::before,
  .menu-btn__icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: currentColor;
    transition: transform .5s var(--ease), top .5s var(--ease);
  }
  .menu-btn__icon::before { top: 0; }
  .menu-btn__icon::after { top: 8.5px; }
  .menu-open .menu-btn { color: #fff; }
  .menu-open .menu-btn__icon::before { top: 4.25px; transform: rotate(45deg); }
  .menu-open .menu-btn__icon::after { top: 4.25px; transform: rotate(-45deg); }

  /* ---- menu plein écran ---- */
  .menu {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 900;
    visibility: hidden;
    pointer-events: none;
    color: #fff;
  }
  .menu__outer,
  .menu__inner {
    height: 100%;
    overflow: hidden;
    transform: translateY(-101%);
    transition: transform .9s var(--ease);
  }
  .menu__outer { background: var(--dark-1); }
  .menu__inner { transform: translateY(101%); }
  .menu-open .menu { visibility: visible; pointer-events: auto; }
  .menu-open .menu__outer,
  .menu-open .menu__inner { transform: none; }
  .menu.is-closing { visibility: visible; }

  .menu__scroll {
    height: 100%;
    overflow-y: auto;
    padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 24px) var(--m-pad) calc(32px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
  .menu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .menu__link {
    display: inline-block;
    padding: 4px 0;
    color: #fff;
    text-decoration: none;
    font-size: clamp(30px, 9vw, 46px);
    font-weight: 100;
    line-height: 1.15;
    letter-spacing: -1px;
  }
  .menu__link-in { display: inline-block; }
  .menu__list li { overflow: hidden; }
  .menu__list li .menu__link-in { transform: translateY(105%); transition: transform .8s var(--ease-out); }
  .menu-open .menu__list li .menu__link-in { transform: none; }
  .menu__link:active, .menu__link:focus-visible { color: #cfcfcf; outline: none; }
  .menu__link:focus-visible .menu__link-in { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

  .menu__contact {
    margin-top: auto;
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: #cfcfcf;
    opacity: 0;
    transition: opacity .6s ease .5s;
  }
  .menu-open .menu__contact { opacity: 1; }
  .menu__contact a { color: #fff; text-decoration: none; }
  .menu__contact .button { justify-self: start; margin-top: 14px; }
  .menu-open { overflow: hidden; }

  /* ---- accueil : le carrousel devient une suite de chapitres ---- */
  .projects {
    height: auto;
    overflow: visible;
    background: none !important;
    touch-action: auto;
  }
  .projects__images,
  .scrollbar,
  .arrows,
  .counter { display: none !important; }
  .projects__content { position: static; width: auto; }

  .slide {
    position: relative;
    inset: auto;
    display: block;
    visibility: visible;
    pointer-events: auto;
    overflow: visible;
    padding: calc(var(--header-h) + 40px) var(--m-pad) 64px;
    background-color: var(--bg, #e2e2e2);
    scroll-margin-top: 0;
  }
  .slide:first-child { padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 44px); }

  .slide__heading {
    display: block;
    font-size: clamp(46px, 14vw, 72px);
    line-height: 1.02;
    letter-spacing: -.035em;
    background-image: none;
  }

  /* la photo, centrée dans une bande blanche pleine largeur
     (écho de la colonne blanche de la version ordinateur) */
  .slide__media {
    display: flex;
    justify-content: center;
    margin: 30px calc(-1 * var(--m-pad)) 34px;
    padding: 36px 0;
    background: #fff;
    clip-path: inset(0 0 0 100%);
    transition: clip-path 1.3s var(--ease);
  }
  .slide__media-frame {
    width: min(50vw, 230px);
    aspect-ratio: 3 / 4;
    overflow: hidden;
  }
  .slide__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.18);
    transition: transform 1.8s var(--ease);
  }
  .slide.is-in .slide__media { clip-path: inset(0 0 0 0); }
  .slide.is-in .slide__media img { transform: none; }

  .slide__text { margin: 0; max-width: 36em; }
  .slide__links { margin-top: 22px; max-width: 36em; }
  .slide__logos { margin-top: 26px; flex-wrap: wrap; gap: 14px 18px; }
  .slide__logos img { max-height: 84px; max-width: min(var(--w, 300px), 62%); }
  .slide--has-links .slide__logos img { max-height: 72px; }
  .slide__button { margin-top: 30px; }

  /* ---- pied de page « Parlons-en » ---- */
  .mfooter {
    display: block;
    padding: 72px var(--m-pad) calc(48px + env(safe-area-inset-bottom, 0px));
    background: var(--dark-1);
    color: #cfcfcf;
  }
  .mfooter__title {
    margin: 0 0 20px;
    color: #fff;
    font-size: clamp(46px, 14vw, 72px);
    font-weight: 100;
    line-height: 1.02;
    letter-spacing: -.035em;
  }
  .mfooter__lines { margin: 0; display: grid; gap: 4px; font-size: 15px; }
  .mfooter__lines strong { color: #fff; font-weight: 600; }
  .mfooter a { color: #fff; text-decoration: none; }
  .mfooter .button { margin-top: 28px; }
  .mfooter .button--light { background: #fff; color: var(--dark-1); }
  .mfooter .button--light:hover, .mfooter .button--light:focus-visible { color: var(--dark-1); }
  .mfooter__legal { margin: 48px 0 0; font-size: 12px; color: rgba(207, 207, 207, .6); }
}

@media (max-width: 991.98px) and (max-height: 500px) {
  :root { --header-h: 52px; }
}

/* Tablette et téléphone à l'horizontale : texte à gauche, photo à droite */
@media (min-width: 640px) and (max-width: 991.98px) {
  :root { --m-pad: 40px; }
  .slide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
    grid-template-rows: 1fr auto auto auto auto auto 1fr;
    grid-template-areas:
      ".      media"
      "head   media"
      "text   media"
      "links  media"
      "logos  media"
      "button media"
      ".      media";
    column-gap: 48px;
    min-height: min(100svh, 760px);
  }
  .slide__heading { grid-area: head; font-size: clamp(44px, 7vw, 64px); }
  .slide__text { grid-area: text; margin-top: 18px; }
  .slide__links { grid-area: links; }
  .slide__logos { grid-area: logos; }
  .slide__button { grid-area: button; }
  .slide__media {
    grid-area: media;
    align-self: stretch;
    align-items: center;
    margin: calc(-1 * (var(--header-h) + 40px)) calc(-1 * var(--m-pad)) -64px 0;
    padding: calc(var(--header-h) + 32px) 0 32px;
  }
  .slide__media-frame { width: min(52%, 260px); aspect-ratio: 2 / 5; max-height: calc(100svh - var(--header-h) - 80px); }
  .slide:first-child .slide__media { margin-top: calc(-1 * (var(--header-h) + env(safe-area-inset-top, 0px) + 44px)); }
  .mfooter { padding-left: var(--m-pad); padding-right: var(--m-pad); }
}

/* ---------------------------------------------------------
   Page contact
   --------------------------------------------------------- */
.page-contact { background: var(--light-3); }

.contact {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 100px);
  padding: 140px var(--gutter) 80px;
  max-width: 1440px;
  margin: 0 auto;
}

.contact__identity {
  text-align: center;
  color: var(--text);
  font-size: 14px;
}
.contact__identity img { width: min(290px, 70%, 42vh); }
.contact__identity p { margin: .75rem 0 0; }
.contact__identity strong { color: var(--dark-1); font-weight: 600; }
.contact__identity a { text-decoration: none; }
.contact__identity a:hover { text-decoration: underline; }

.contact__card {
  background: #ffffff;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 2vw, 20px);
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 24px;
}
.form__field { position: relative; }
.form__field--full { grid-column: 1 / -1; }

.form__input {
  width: 100%;
  border: 0;
  border-bottom: 2px solid #f0f0f0;
  border-radius: 0;
  background: transparent;
  padding: 8px 0;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .3s ease;
}
.form__input::placeholder { color: transparent; }
textarea.form__input { min-height: 180px; resize: vertical; display: block; }

.form__label {
  position: absolute;
  left: 0;
  top: 8px;
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
  transform-origin: 0 0;
  transition: transform .3s var(--ease-out), color .3s ease;
}
.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
  transform: translateY(-22px) scale(.85);
  color: var(--dark-1);
}
.form__field::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--dark-1);
  transform: scaleX(0);
  transform-origin: 0 0;
  transition: transform .5s var(--ease);
}
.form__field:focus-within::after { transform: scaleX(1); }

.form__actions {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 4px;
}
.form__actions .button { border: 0; cursor: pointer; }
.form__note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
  min-height: 1.4em;
}
.form__note.is-error { color: #c0233f; }
.form__trap {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form { position: relative; }
.form[hidden], .form__done[hidden] { display: none; }
.is-sending .form .button { opacity: .6; cursor: progress; }

.form__done {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: clamp(24px, 6vh, 60px) 0;
  text-align: center;
  outline: none;
  animation: done-in .8s var(--ease-out);
}
.form__done-title {
  margin: 0;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 200;
  line-height: 1.25;
  letter-spacing: -.5px;
  color: var(--dark-1);
}
.form__done-text { margin: 0; font-size: 14px; color: var(--muted); }
.form__again {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dark-1);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
@keyframes done-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

/* apparition de la page contact */
.page-contact .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1.2s var(--ease-out);
}
.page-contact.is-ready .reveal { opacity: 1; transform: none; }
.page-contact.is-ready .reveal:nth-child(2) { transition-delay: .15s; }

@media (max-width: 991.98px) {
  .contact {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 28px);
    padding-bottom: 48px;
    max-width: 640px;
  }
  .contact__identity img { width: min(200px, 50vw, 34vh); }
}
@media (max-width: 575.98px) {
  .form { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------
   Mouvement réduit
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    animation-duration: .01ms !important;
  }
}
