/* ==================================================================================================
   Crealinks — feuille de style du site
   Sommaire : 1. polices  2. variables  3. base  4. éléments communs  5. barre et menu
              6. accueil  7. pages intérieures  8. formulaires  9. pied de page  10. mouvement réduit
   ================================================================================================== */

/* 1. Polices (hébergées sur le site, licence SIL Open Font) --------------------------------------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/polices/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/polices/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/polices/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

/* 2. Variables ----------------------------------------------------------------------------------- */
:root {
  --fond: #05080f;
  --fond-2: #0a101b;
  --surface: #0e1524;
  --trait: rgba(150, 185, 255, 0.14);
  --trait-fort: rgba(150, 185, 255, 0.28);
  --texte: #eaf0fa;
  --doux: #a3b1c6;
  --bleu: #2bb1ff;
  --bleu-fort: #0b7bff;
  --lime: #c6ff3d;
  --alerte: #ff8f8f;

  --titres: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --corps: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --marge: clamp(1.25rem, 5vw, 3.5rem);
  --largeur: 78rem;
  --barre: 4.75rem;
  --souple: cubic-bezier(0.2, 0.8, 0.2, 1);
  --vif: cubic-bezier(0.7, 0, 0.2, 1);
}

/* 3. Base ---------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--fond);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--barre) + 1rem);
  scrollbar-color: #24304a var(--fond);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--texte);
  font: 400 1.0625rem/1.6 var(--corps);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
/* Titres répartis sur des lignes de longueur voisine ; paragraphes sans mot isolé en dernière ligne. */
h2, h3, legend, .mur__case--appel strong, .fenetre__legende strong, .prestation__accroche { text-wrap: balance; }
p, li, dd, dt { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas, picture { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
em { font-style: normal; color: var(--lime); }
strong { font-weight: 600; }

::selection { background: var(--lime); color: var(--fond); }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
  border-radius: 2px;
}
main:focus { outline: none; }

/* Transition douce entre deux pages (navigateurs qui la proposent). */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.28s var(--vif) both fondu-sortie; }
::view-transition-new(root) { animation: 0.42s var(--souple) both fondu-entree; }
@keyframes fondu-sortie { to { opacity: 0; } }
@keyframes fondu-entree { from { opacity: 0; transform: translateY(12px); } }

/* 4. Éléments communs ---------------------------------------------------------------------------- */
.conteneur {
  width: 100%;
  max-width: calc(var(--largeur) + 2 * var(--marge));
  margin-inline: auto;
  padding-inline: var(--marge);
}

.insecable { white-space: nowrap; }

.visuellement-cache {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.evitement {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--lime);
  color: var(--fond);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.evitement:focus { transform: none; }

/* Petite ligne en capitales qui annonce une section, précédée d'un « pixel » du logo. */
.etiquette {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35em 0.75em;
  font: 500 0.8rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bleu);
}
.etiquette::before {
  content: "";
  width: 0.55rem; height: 0.55rem;
  background: var(--lime);
  border-radius: 1px;
  flex: none;
}
.hero__etiquette > span + span { display: inline-flex; align-items: center; gap: 0.75em; }
.hero__etiquette > span + span::before { content: ""; width: 0.3rem; height: 0.3rem; background: currentColor; opacity: 0.6; }
.etiquette__numero {
  font: 500 0.78rem/1 var(--mono);
  letter-spacing: 0.14em;
  color: var(--lime);
}

/* Titres découpés en lignes : chaque ligne monte depuis un cache. */
.ligne {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.ligne > span { display: block; }

.section { position: relative; padding-block: clamp(4.5rem, 11vw, 9.5rem); }
.section--pleine {
  background: rgba(10, 16, 27, 0.88);
  border-block: 1px solid var(--trait);
}
.section__entete { max-width: 46rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section__titre {
  margin-top: 1.1rem;
  font: 700 clamp(2.1rem, 5.4vw, 4rem)/1.02 var(--titres);
  font-stretch: 88%;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section__chapeau {
  margin-top: 1.4rem;
  max-width: 38rem;
  color: var(--doux);
  font-size: 1.125rem;
  text-wrap: pretty;
}

/* Boutons : coin coupé, comme un pixel qu'on aurait retiré. Le fond est porté par ::before
   pour que le contour de focus reste visible autour du bouton. */
.bouton {
  --coin: 0.7rem;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border: 0;
  background: none;
  color: var(--fond);
  font: 600 0.98rem/1.2 var(--corps);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--souple), color 0.25s;
}
.bouton::before, .bouton::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  clip-path: polygon(0 0, calc(100% - var(--coin)) 0, 100% var(--coin), 100% 100%, var(--coin) 100%, 0 calc(100% - var(--coin)));
}
.bouton::before { background: var(--lime); transition: background-color 0.25s; }
.bouton::after {
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%);
  background-size: 250% 100%;
  background-position: 130% 0;
  transition: background-position 0.7s var(--souple);
}
.bouton:hover::after { background-position: -30% 0; }
.bouton--grand { min-height: 3.6rem; padding: 0.9rem 1.7rem; font-size: 1.05rem; }
.bouton--petit { min-height: 2.75rem; padding: 0.55rem 1.1rem; font-size: 0.92rem; --coin: 0.55rem; }
.bouton--contour { color: var(--texte); }
.bouton--contour::before { background: var(--trait-fort); }
.bouton--contour::after {
  inset: 1px;
  background: var(--fond);
  transition: background-color 0.3s;
}
.bouton--contour:hover::before { background: var(--bleu); }
.bouton--contour:hover::after { background: #0b1626; }
.bouton .fleche { transition: transform 0.35s var(--souple); }
.bouton:hover .fleche { transform: translateX(4px); }
.bouton:active { transform: scale(0.97); }

.fleche {
  width: 1.15em; height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lien-fleche {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding-block: 0.6rem;
  color: var(--texte);
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(var(--lime), var(--lime)) 0 calc(100% - 0.35rem) / 0 1px no-repeat;
  transition: background-size 0.4s var(--souple), color 0.25s;
}
.lien-fleche:hover { background-size: 100% 1px; color: var(--lime); }
.lien-fleche .fleche { transition: transform 0.35s var(--souple); }
.lien-fleche:hover .fleche { transform: translateX(4px); }
.lien-fleche strong { white-space: nowrap; }

/* Listes dont les puces sont des pixels. */
.liste-pixels { display: grid; gap: 0.7rem; }
.liste-pixels li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--texte);
}
.liste-pixels li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 0.5rem; height: 0.5rem;
  background: var(--bleu);
  border-radius: 1px;
  box-shadow: 0.55rem -0.3rem 0 -0.12rem rgba(43, 177, 255, 0.55);
}

/* Drapeau français à côté du mot « France » : il suit la taille du texte et ne s'en détache pas. */
.lieu__pays { white-space: nowrap; }
.drapeau {
  display: inline-block;
  flex: none;
  width: 1.2em; height: 0.8em;
  margin-left: 0.3em;
  vertical-align: -0.04em;
  border-radius: 0.12em;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.16);
}

.icone {
  width: 2rem; height: 2rem;
  fill: none;
  stroke: var(--bleu);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Apparition au défilement. Sans JavaScript (pas de classe .js), tout est visible d'emblée. */
.js [data-anim] {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity 0.8s var(--souple), transform 0.9s var(--souple);
  transition-delay: calc(var(--rang, 0) * 80ms);
}
.js [data-anim].vu { opacity: 1; transform: none; }
.js [data-anim="lignes"] { opacity: 1; transform: none; }
.js [data-anim="lignes"] .ligne > span { transform: translateY(110%); transition: transform 1s var(--souple); }
.js [data-anim="lignes"] .ligne:nth-child(2) > span { transition-delay: 0.1s; }
.js [data-anim="lignes"].vu .ligne > span { transform: none; }
/* Le cache est posé sur l'image, pas sur le bloc observé : un bloc entièrement masqué ne serait jamais « vu ». */
.js [data-anim="visuel"] { opacity: 1; transform: none; }
.js [data-anim="visuel"] picture { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--vif); }
.js [data-anim="visuel"].vu picture { clip-path: inset(0); }

/* Animation de fond (canvas WebGL) et son repli quand WebGL n'est pas disponible. */
.scene { pointer-events: none; opacity: 0; transition: opacity 1.6s ease-out; }
.scene--prete { opacity: 1; }
.scene--fixe {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
}
.scene--bandeau {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(#000 62%, transparent);
  mask-image: linear-gradient(#000 62%, transparent);
}
.scene-repli { display: none; }
.sans-webgl .scene { display: none; }
.sans-webgl .scene-repli, html:not(.js) .scene-repli {
  display: block;
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    url("/assets/img/reseau.svg") 82% 38% / min(60rem, 120vw) no-repeat,
    radial-gradient(60rem 40rem at 80% 30%, rgba(11, 123, 255, 0.22), transparent 70%);
}
.sans-webgl .entete-page, .sans-webgl .erreur, html:not(.js) .entete-page, html:not(.js) .erreur {
  background:
    url("/assets/img/reseau.svg") 88% 50% / min(38rem, 90vw) no-repeat,
    radial-gradient(50rem 30rem at 85% 40%, rgba(11, 123, 255, 0.2), transparent 70%);
}

/* 5. Barre de navigation et menu ------------------------------------------------------------------ */
.barre {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--barre);
}
.barre__fond {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 15, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--trait);
  opacity: 0;
  transition: opacity 0.4s;
}
.barre--defile .barre__fond { opacity: 1; }
/* Menu mobile ouvert : la barre devient opaque, les liens qui défilent dessous ne se mêlent pas au logo. */
.barre--menu .barre__fond { opacity: 1; background: var(--fond); -webkit-backdrop-filter: none; backdrop-filter: none; transition: none; }
.barre__contenu {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  height: 100%;
  max-width: calc(var(--largeur) + 2 * var(--marge));
  margin-inline: auto;
  padding-inline: var(--marge);
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  margin-right: auto;
  text-decoration: none;
  color: var(--texte);
}
.marque__nom {
  font: 700 1.5rem/1 var(--titres);
  font-stretch: 84%;
  letter-spacing: -0.02em;
}
.logo { width: 2.85rem; height: auto; overflow: visible; }
.logo__trait {
  fill: none;
  stroke: var(--bleu);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logo__pixel { fill: var(--bleu); transition: transform 0.5s var(--souple), fill 0.3s; transform-box: fill-box; transform-origin: center; }
.marque:hover .logo__pixel { fill: var(--lime); }
.marque:hover .logo__pixel:nth-of-type(1) { transform: translate(-2px, -2px); }
.marque:hover .logo__pixel:nth-of-type(2) { transform: translate(-2px, 2px); transition-delay: 40ms; }
.marque:hover .logo__pixel:nth-of-type(3) { transform: translate(-4px, -1px) rotate(45deg); transition-delay: 80ms; }
.marque:hover .logo__pixel:nth-of-type(4) { transform: translate(-5px, 3px); transition-delay: 120ms; }
.marque:hover .logo__pixel:nth-of-type(5) { transform: translate(-6px, 0) scale(1.4); transition-delay: 160ms; }

.nav__liste { display: flex; gap: clamp(1.2rem, 2.6vw, 2.4rem); }
.nav__lien {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--texte);
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none;
}
.nav__lien::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.5rem;
  height: 1px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--souple);
}
.nav__lien:hover::after, .nav__lien[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.nav__lien[aria-current] { color: var(--lime); }

.barre__appel {
  display: none;
  place-items: center;
  width: 3rem; height: 3rem;
  margin-right: -0.5rem;
}
.barre__appel .icone { width: 1.55rem; height: 1.55rem; stroke: var(--lime); }
.burger {
  display: none;
  position: relative;
  width: 3rem; height: 3rem;
  margin-right: -0.6rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.burger__traits { position: absolute; inset: 0; }
.burger__traits span {
  position: absolute;
  left: 0.7rem; right: 0.7rem;
  height: 2px;
  background: var(--texte);
  transition: transform 0.4s var(--souple), top 0.4s var(--souple);
}
.burger__traits span:nth-child(1) { top: 1.2rem; }
.burger__traits span:nth-child(2) { top: 1.7rem; }
.burger[aria-expanded="true"] .burger__traits span:nth-child(1) { top: 1.45rem; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__traits span:nth-child(2) { top: 1.45rem; transform: rotate(-45deg); }

.menu-mobile {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: calc(var(--barre) + 2rem) var(--marge) 2rem;
  background: var(--fond);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.35s;
}
.menu-mobile[hidden] { display: none; }
.menu-mobile--ouvert { opacity: 1; }
.menu-mobile__liste { display: grid; gap: 0.25rem; }
.menu-mobile__liste li {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.5s var(--souple), transform 0.6s var(--souple);
  transition-delay: calc(var(--rang) * 60ms + 80ms);
}
.menu-mobile--ouvert .menu-mobile__liste li { opacity: 1; transform: none; }
.menu-mobile__lien {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--trait);
  font: 700 clamp(1.9rem, 9vw, 3rem)/1.1 var(--titres);
  font-stretch: 86%;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.menu-mobile__lien[aria-current] { color: var(--bleu); }
.menu-mobile__liste li:last-child .menu-mobile__lien { color: var(--lime); border-bottom-color: var(--lime); }
.menu-mobile__numero { font: 500 0.78rem/1 var(--mono); letter-spacing: 0.1em; color: var(--bleu); }
.menu-mobile__contact { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; color: var(--doux); }
.menu-mobile__contact a { color: var(--texte); font-weight: 600; text-decoration: none; padding-block: 0.6rem; }
.menu-mobile__contact > span { padding-block: 0.6rem; }

@media (max-width: 860px) {
  .nav, .barre__devis { display: none; }
  .burger { display: block; }
  .barre__appel { display: grid; }
  /* En-têtes de page plus courts : le contenu utile (formulaire, texte) arrive plus vite. */
  .entete-page { min-height: 0; padding-top: calc(var(--barre) + 6.5rem); }
  .entete-page--courte { padding-top: calc(var(--barre) + 4rem); }
}
@media (min-width: 861px) {
  .menu-mobile { display: none !important; }
}

/* 6. Accueil ------------------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--barre) + 2rem);
}
/* Voile sombre derrière le texte, pour qu'il reste lisible par-dessus l'animation. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, var(--fond) 0, rgba(5, 8, 15, 0.82) 22%, transparent 62%),
    radial-gradient(70rem 50rem at 0% 75%, rgba(5, 8, 15, 0.92), transparent 68%);
}
.hero__contenu { padding-bottom: clamp(2rem, 5vw, 4rem); }
.hero__titre {
  margin-top: 1.4rem;
  font: 700 clamp(3.1rem, 11.2vw, 8rem)/0.9 var(--titres);
  font-stretch: 80%;
  letter-spacing: -0.035em;
}
.hero__titre .ligne > span { animation: monte 1.1s var(--souple) both; }
.hero__titre .ligne:nth-child(2) > span { animation-delay: 0.09s; }
.hero__titre .ligne:nth-child(3) > span { animation-delay: 0.18s; }
@keyframes monte { from { transform: translateY(110%); } }
@keyframes apparait { from { opacity: 0; transform: translateY(1.2rem); } }
.hero__etiquette, .hero__texte, .hero__actions, .hero__reperes { animation: apparait 0.9s var(--souple) both; }
.hero__texte { animation-delay: 0.35s; }
.hero__actions { animation-delay: 0.45s; }
.hero__reperes { animation-delay: 0.6s; }
.hero__texte {
  margin-top: clamp(1.4rem, 3vw, 2.2rem);
  max-width: 35rem;
  font-size: clamp(1.06rem, 1.5vw, 1.25rem);
  color: var(--doux);
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem 1rem; margin-top: clamp(1.6rem, 3.5vw, 2.6rem); }
.hero__reperes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--trait);
}
.hero__reperes > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.15rem 1rem 1.4rem 0;
  border-left: 1px solid var(--trait);
  padding-left: 1.25rem;
}
.hero__reperes > div:first-child { border-left: 0; padding-left: 0; }
.hero__reperes dt { font: 500 0.78rem/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--doux); }
.hero__reperes dd { margin-top: 0.35rem; font: 600 clamp(1.15rem, 2.2vw, 1.7rem)/1.1 var(--titres); font-stretch: 88%; }

@media (max-width: 700px) {
  .hero__etiquette { flex-direction: column; align-items: flex-start; gap: 0.3em; }
  .hero__etiquette::before { display: none; }
  .hero__etiquette > span { display: inline-flex; align-items: center; gap: 0.75em; }
  .hero__etiquette > span::before, .hero__etiquette > span + span::before { content: ""; width: 0.45rem; height: 0.45rem; background: var(--lime); opacity: 1; }
  .hero__reperes { grid-template-columns: repeat(2, 1fr); }
  .hero__reperes > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .hero__reperes > div:nth-child(n + 3) { border-top: 1px solid var(--trait); }
  .hero__reperes > div { padding-block: 0.85rem 0.95rem; }
  .hero__actions .bouton { flex: 1 1 100%; }
}

@media (min-width: 900px) and (max-height: 880px) {
  .hero { padding-top: calc(var(--barre) + 0.5rem); }
  .hero__titre { margin-top: 1rem; }
  .hero__texte { margin-top: 1.1rem; }
  .hero__actions { margin-top: 1.4rem; }
  .hero__contenu { padding-bottom: 1.6rem; }
  .hero__reperes > div { padding-block: 0.8rem 0.9rem; }
}

@media (max-height: 480px) {
  .hero { min-height: 0; padding-top: calc(var(--barre) + 1rem); }
  .hero__titre { margin-top: 0.8rem; }
  .hero__texte { margin-top: 1rem; }
  .hero__actions { margin-top: 1.2rem; }
}

/* Entre 900 et 999 px, la ligne d'étiquettes passe sur deux lignes : elle laisse sa place au globe. */
@media (min-width: 900px) and (max-width: 999px) { .hero__etiquette { max-width: 26rem; } }
@media (min-width: 900px) {
  .hero__titre { font-size: clamp(3.1rem, 9.2vw, 8rem); }
  .hero__texte { max-width: min(35rem, 42vw); }
}

/* Les trois services : une section par service, la forme 3D change à chaque fois. */
.services { position: relative; }
.service {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: 5rem;
}
.service__texte { max-width: min(33rem, 44vw); }
.service__titre {
  margin-top: 1.2rem;
  font: 700 clamp(2.3rem, 5.6vw, 4.4rem)/0.98 var(--titres);
  font-stretch: 84%;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.service__chapeau { margin-top: 1.5rem; font-size: 1.125rem; color: var(--doux); text-wrap: pretty; }
.service .liste-pixels { margin-top: 1.7rem; }
.service__liens { margin-top: 1.6rem; }

.services__rail {
  position: sticky;
  top: calc(50vh - 6rem);
  z-index: 5;
  height: 0;
  display: none;
}
.services__rail ol { position: absolute; left: 1.4rem; top: 0; display: grid; gap: 3.4rem; }
.services__rail li { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.1em; color: var(--doux); transition: color 0.4s; padding-left: 1.2rem; }
.services__rail li.actif { color: var(--lime); }
/* Chaque repère est un lien vers sa section. Son libellé est toujours affiché quand la marge est assez
   large (1700 px et plus) ; en dessous, il apparaît au survol ou au clavier, sur un fond opaque. */
.services__rail a { display: inline-flex; align-items: center; gap: 0.8em; margin: -0.6rem -0.5rem; padding: 0.6rem 0.5rem; color: inherit; text-decoration: none; text-transform: uppercase; white-space: nowrap; transition: color 0.2s; }
.services__rail a:hover, .services__rail a:focus-visible { color: var(--texte); }
.services__rail li.actif a:hover, .services__rail li.actif a:focus-visible { color: var(--lime); }
.services__rail-nom { margin: -0.5em -0.7em; padding: 0.5em 0.7em; background: var(--fond); opacity: 0; transition: opacity 0.2s; }
.services__rail a:hover .services__rail-nom, .services__rail a:focus-visible .services__rail-nom { opacity: 1; }
@media (min-width: 1700px) { .services__rail-nom { background: none; opacity: 1; } }
.services__rail-trait { position: absolute; left: 1.4rem; top: 0.2rem; width: 2px; height: 9.6rem; background: var(--trait); }
.services__rail-trait span { display: block; width: 100%; height: 100%; background: var(--lime); transform: scaleY(var(--progression, 0)); transform-origin: top; }
@media (min-width: 1500px) { .services__rail { display: block; } }
/* Rail plus long (sept repères) : mentions légales. */
.mentions-section { position: relative; }
.services__rail--long { top: calc(50vh - 8.5rem); }
.services__rail--long ol { gap: 2rem; }
.services__rail--long .services__rail-trait { height: 16.7rem; }

@media (max-width: 899px) {
  /* Sur téléphone, la forme occupe le haut de l'écran et le texte le bas. */
  .service { align-items: flex-end; min-height: 0; padding-top: 40vh; padding-top: 40svh; padding-bottom: 0; }
  /* Le texte porte son propre fond : en remontant, il recouvre proprement la forme, puis laisse
     la place libre à la forme suivante. */
  .service__texte {
    max-width: none;
    margin-inline: calc(-1 * var(--marge));
    padding: 3rem var(--marge) 3.5rem;
    background: linear-gradient(to bottom, rgba(5, 8, 15, 0), var(--fond) 3rem);
  }
}

/* Pourquoi nous choisir */
.raisons__grille { display: grid; grid-template-columns: 1fr; gap: 1px; }
.carte {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  padding-top: clamp(3.4rem, 6vw, 4.6rem);
  background: var(--fond-2);
  box-shadow: 0 0 0 1px var(--trait);
  overflow: hidden;
}
.carte::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 0%), rgba(43, 177, 255, 0.18), transparent 65%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.carte:hover::before { opacity: 1; }
.carte::after {
  content: "";
  position: absolute;
  top: 1.1rem; right: 1.1rem;
  width: 0.55rem; height: 0.55rem;
  background: var(--trait-fort);
  transition: background-color 0.3s, transform 0.5s var(--souple);
}
.carte:hover::after { background: var(--lime); transform: rotate(90deg) scale(1.25); }
.carte__numero { position: absolute; top: 1.15rem; left: clamp(1.5rem, 3vw, 2.2rem); font: 500 0.8rem/1 var(--mono); letter-spacing: 0.12em; color: var(--doux); }
.carte__titre { font: 700 1.5rem/1.1 var(--titres); font-stretch: 88%; letter-spacing: -0.015em; }
@media (min-width: 600px) { .carte__titre { display: flex; align-items: flex-end; min-height: 2.2em; } }
.carte p { color: var(--doux); font-size: 1rem; }
.carte > * { position: relative; }
.carte > .carte__numero { position: absolute; }

@media (min-width: 600px) { .raisons__grille { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1150px) { .raisons__grille { grid-template-columns: repeat(4, 1fr); } }

/* Réalisations de l'accueil. */
.vitrine { padding-block: clamp(4.5rem, 11vw, 8rem) clamp(3rem, 8vw, 6rem); }
.vitrine__entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
/* Six réalisations en grille : trois par rangée sur ordinateur, deux sur tablette et téléphone. */
.vitrine__piste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.8rem, 1.6vw, 1.25rem); }
@media (min-width: 900px) { .vitrine__piste { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 619px) { .vitrine__piste .fenetre__legende { padding: 0.6rem 0.65rem 0.7rem; } }
.vitrine__fin { display: flex; justify-content: center; margin-top: clamp(2rem, 4vw, 3rem); }

/* Capture d'écran présentée dans une fenêtre de navigateur. */
.fenetre {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--trait);
}
.fenetre__barre { display: flex; gap: 0.4rem; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--trait); }
.fenetre__barre i { width: 0.5rem; height: 0.5rem; background: var(--trait-fort); }
.fenetre__barre i:first-child { background: var(--bleu); }
.fenetre img { width: 100%; aspect-ratio: 580 / 487; object-fit: cover; object-position: top; background: var(--fond-2); }
.fenetre__legende { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.85rem 0.95rem 1rem; border-top: 1px solid var(--trait); }
.fenetre__legende strong { font: 600 1.05rem/1.2 var(--titres); font-stretch: 90%; }
/* Réalisation encore en ligne : son nom est un lien vers le site. */
.fenetre__legende a { display: inline-flex; align-items: center; gap: 0.45em; text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 0.25em; transition: color 0.25s; }
.fenetre__legende a:hover { color: var(--lime); }
.fenetre__legende a .fleche { flex: none; width: 0.9em; height: 0.9em; color: var(--lime); transform: rotate(-45deg); }
.fenetre__legende > span { font: 500 0.76rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--doux); }

/* Méthode : cinq étapes reliées par un fil qui se remplit au défilement. */
.methode__grille { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
@media (min-width: 1000px) {
  .methode__grille { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); align-items: start; }
  .methode__entete { position: sticky; top: calc(var(--barre) + 3rem); margin-bottom: 0; }
}
.etapes { position: relative; }
.etapes__fil { position: absolute; left: 0.95rem; top: 0.6rem; bottom: 0.6rem; width: 2px; background: var(--trait); }
.etapes__fil span { display: block; width: 100%; height: 100%; background: linear-gradient(var(--bleu), var(--lime)); transform: scaleY(var(--progression, 0)); transform-origin: top; }
.etapes__liste { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.etape { position: relative; padding-left: 4rem; }
.etape__numero {
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  background: var(--fond-2);
  border: 1px solid var(--trait-fort);
  font: 500 0.76rem/1 var(--mono);
  color: var(--doux);
  transition: background-color 0.4s, color 0.4s, border-color 0.4s, transform 0.5s var(--souple);
}
.etape--atteinte .etape__numero { background: var(--lime); border-color: var(--lime); color: var(--fond); }
.etape__titre { font: 700 clamp(1.4rem, 2.6vw, 1.9rem)/1.1 var(--titres); font-stretch: 88%; letter-spacing: -0.015em; }
.etape p { margin-top: 0.6rem; color: var(--doux); max-width: 32rem; }
/* Une étape pas encore atteinte est en retrait par la couleur (et non par la transparence, pour rester lisible). */
.js .etape__titre { color: var(--doux); transition: color 0.5s; }
.js .etape--atteinte .etape__titre { color: var(--texte); }

/* Bandeau défilant (accueil). */
.technos { padding-block: clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--trait); overflow: hidden; background: var(--fond); }
.defilant { display: flex; width: max-content; }
.defilant__liste { display: flex; flex: none; align-items: center; }
.defilant__liste li {
  display: flex;
  align-items: center;
  font: 700 clamp(2.4rem, 7vw, 5.5rem)/1 var(--titres);
  font-stretch: 80%;
  letter-spacing: -0.02em;
  /* Lettres en contour : le trait est dessiné d'abord, puis recouvert par un remplissage de la couleur
     du fond. Sans cela, les tracés internes de la police variable apparaissent dans les lettres. */
  color: var(--fond);
  -webkit-text-stroke: 2px rgba(150, 185, 255, 0.5);
  paint-order: stroke fill;
  white-space: nowrap;
}
.defilant__liste li::after {
  content: "";
  width: 0.22em; height: 0.22em;
  margin-inline: 0.45em;
  background: var(--lime);
}
.defilant--anime { animation: defile 38s linear infinite; }
.defilant--anime:hover { animation-play-state: paused; }
@keyframes defile { to { transform: translateX(-50%); } }

/* 7. Pages intérieures --------------------------------------------------------------------------- */
.entete-page {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(46rem, 78svh);
  padding-top: calc(var(--barre) + 3.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
  border-bottom: 1px solid var(--trait);
}
.entete-page--courte { min-height: min(36rem, 64svh); }
.entete-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60rem 36rem at 0% 80%, rgba(5, 8, 15, 0.92), transparent 70%);
  pointer-events: none;
}
.entete-page > .conteneur { position: relative; z-index: 1; }
.entete-page__titre {
  margin-top: 1.3rem;
  /* Taille plafonnée pour que le plus long des titres laisse toujours de l'air à la forme 3D placée à sa droite. */
  font: 700 clamp(2.7rem, 7.4vw, 5.6rem)/0.92 var(--titres);
  font-stretch: 80%;
  letter-spacing: -0.035em;
}
.entete-page__titre .ligne > span { animation: monte 1.1s var(--souple) both; }
.entete-page__titre .ligne:nth-child(2) > span { animation-delay: 0.09s; }
.entete-page .etiquette, .entete-page__texte, .sommaire { animation: apparait 0.9s var(--souple) both; }
.entete-page__texte { animation-delay: 0.3s; margin-top: 1.6rem; max-width: 37rem; font-size: clamp(1.06rem, 1.4vw, 1.2rem); color: var(--doux); text-wrap: pretty; }
.sommaire { animation-delay: 0.42s; display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }
.sommaire a {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--trait-fort);
  background: rgba(5, 8, 15, 0.6);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.3s, color 0.3s, background-color 0.3s;
}
.sommaire a > span { font: 500 0.7rem/1 var(--mono); color: var(--lime); letter-spacing: 0.1em; }
.sommaire a:hover { border-color: var(--lime); color: var(--lime); }

/* Services */
.prestation { border-bottom: 1px solid var(--trait); }
.prestation__grille { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (min-width: 1000px) {
  .prestation__grille { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .prestation--inverse .prestation__visuel { order: 2; }
}
.prestation__visuel { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--fond-2); border: 1px solid var(--trait); }
.prestation__visuel .fenetre__barre { position: absolute; inset: 0 0 auto 0; z-index: 1; background: rgba(10, 16, 27, 0.92); }
.prestation__visuel picture { position: absolute; inset: -8% 0; }
/* Trame de points par-dessus l'image : elle rappelle les nuages de points de l'animation. */
.prestation__visuel::after { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(5, 8, 15, 0.55) 1px, transparent 1.4px) 0 0 / 5px 5px; pointer-events: none; }
.prestation__visuel img { width: 100%; height: 100%; object-fit: cover; transform: translateY(calc(var(--parallaxe, 0) * 1%)); will-change: transform; }
.prestation__numero {
  position: absolute;
  left: 1rem; bottom: 0.4rem;
  font: 800 clamp(4rem, 10vw, 8rem)/1 var(--titres);
  font-stretch: 78%;
  color: var(--texte);
  text-shadow: 0 0.1rem 1.5rem rgba(5, 8, 15, 0.8);
}
.prestation__texte > p:not(.etiquette) { margin-top: 1.2rem; color: var(--doux); text-wrap: pretty; }
.prestation__texte > .prestation__accroche { margin-top: 1rem; color: var(--texte); font: 600 clamp(1.2rem, 2vw, 1.45rem)/1.25 var(--titres); font-stretch: 90%; }
.prestation__texte .liste-pixels { margin-top: 1.7rem; }
.prestation__texte > p:last-child { margin-top: 2rem; }


/* Réalisations */
.mur { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); grid-auto-flow: dense; gap: clamp(0.8rem, 1.6vw, 1.25rem); }
.mur__case { display: flex; }
.mur__case .fenetre { width: 100%; }
.mur__case .fenetre img { aspect-ratio: 5 / 4; }
/* Une grande capture garde ses proportions d'origine ; la légende absorbe la hauteur restante de la case. */
.mur__case--grande .fenetre img { aspect-ratio: 580 / 487; }
.mur__case .fenetre__legende { flex: 1; }
.mur__case--appel a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 11rem;
  padding: 1.1rem;
  border: 1px dashed var(--trait-fort);
  text-decoration: none;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}
.mur__case--appel .etiquette { flex-wrap: nowrap; white-space: nowrap; }
/* Téléphone : l'étiquette, qui ne se coupe pas, doit tenir dans une tuile d'une demi-largeur d'écran. */
@media (max-width: 440px) { .mur__case--appel .etiquette { gap: 0.5em; font-size: 0.7rem; letter-spacing: 0.06em; } }
@media (max-width: 345px) { .mur__case--appel .etiquette { letter-spacing: 0.03em; } .mur__case--appel a { padding-inline: 0.8rem; } }
.mur__case--appel strong { font: 700 1.35rem/1.1 var(--titres); font-stretch: 88%; letter-spacing: -0.015em; }
.mur__case--appel .fleche { width: 1.6rem; height: 1.6rem; color: var(--lime); transition: transform 0.4s var(--souple); }
.mur__case--appel a:hover { border-color: var(--lime); background: rgba(198, 255, 61, 0.05); }
.mur__case--appel a:hover .fleche { transform: translateX(6px); }
/* Grille des réalisations : le nombre de colonnes est fixé pour chaque plage de largeur, de façon que
   les 18 sites et la carte d'appel remplissent exactement la grille, sans case vide.
   - téléphone : 2 colonnes, grandes captures sur toute la largeur ;
   - tablette : 3 colonnes régulières, carte d'appel sur une rangée ;
   - ordinateur : 4 puis 5 colonnes, grandes captures sur 2 × 2 cases. */
@media (min-width: 620px) and (max-width: 1019px) {
  .mur { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mur__case--grande .fenetre img { aspect-ratio: 5 / 4; }
}
@media (min-width: 1020px) {
  .mur { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mur__case--grande { grid-column: span 2; grid-row: span 2; }
}
/* Avec 12 grandes cases, 11 petites et l'appel, la grille tombe juste à 2, 3, 4 et 5 colonnes
   (à revoir si la liste change : essais/mur.mjs le contrôle). */
@media (min-width: 1280px) { .mur { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 619px) {
  .mur { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mur__case--grande { grid-column: span 2; }
  .mur .fenetre__legende { padding: 0.6rem 0.65rem 0.7rem; }
  .mur .fenetre__legende strong { font-size: 0.95rem; }
}

/* Applications mobiles : une fiche par application, texte à gauche et écrans à droite sur grand écran. */
.appli { display: grid; gap: clamp(1.8rem, 4vw, 3rem); padding-block: clamp(2.2rem, 5vw, 3.5rem); border-top: 1px solid var(--trait); }
.appli:last-child { padding-bottom: 0; }
.appli__entete { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.appli__icone { flex: none; width: 4rem; height: 4rem; border-radius: 22%; border: 1px solid var(--trait-fort); }
.appli__nom { font: 700 clamp(1.5rem, 3vw, 2.1rem)/1.1 var(--titres); font-stretch: 88%; letter-spacing: -0.02em; }
.appli__genre { margin-top: 0.3rem; font: 500 0.76rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bleu); }
.appli__texte > p { color: var(--doux); max-width: 32rem; }
.appli__texte .liste-pixels { margin-top: 1.4rem; }
.appli__lien { display: flex; flex-wrap: wrap; gap: 0.9rem 2rem; margin-top: 1.6rem; }
.appli__ecrans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.5rem, 1.6vw, 1.25rem); align-items: start; max-width: 36rem; }
.appli--paysage .appli__ecrans { grid-template-columns: minmax(0, 1fr); gap: clamp(0.8rem, 1.6vw, 1.25rem); }
.telephone {
  padding: clamp(0.3rem, 0.7vw, 0.5rem);
  background: #121a2b;
  border: 1px solid var(--trait-fort);
  border-radius: clamp(0.7rem, 1.6vw, 1.3rem);
  box-shadow: 0 1.5rem 3rem -1rem rgba(0, 0, 0, 0.7);
}
.appli:not(.appli--paysage) .telephone:nth-child(even) { margin-top: clamp(1rem, 3vw, 2.2rem); }
.telephone img { width: 100%; border-radius: clamp(0.45rem, 1vw, 0.85rem); }
@media (min-width: 900px) {
  .appli { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); align-items: center; }
  .appli__ecrans { justify-self: end; width: 100%; }
}

/* Mentions légales */
.mentions { display: grid; gap: clamp(2.5rem, 5vw, 4rem); max-width: 54rem; }
.mentions__bloc h2 { display: flex; align-items: baseline; gap: 0.9rem; font: 700 clamp(1.5rem, 3vw, 2.1rem)/1.1 var(--titres); font-stretch: 88%; letter-spacing: -0.02em; }
.mentions__bloc dl { margin-top: 1.2rem; border-top: 1px solid var(--trait); }
.mentions__bloc dl > div { display: grid; gap: 0.2rem 2rem; padding-block: 0.95rem; border-bottom: 1px solid var(--trait); }
@media (min-width: 700px) { .mentions__bloc dl > div { grid-template-columns: 18rem 1fr; } }
.mentions__bloc dt { color: var(--doux); }
.mentions__bloc p { margin-top: 1rem; color: var(--doux); max-width: 44rem; }
.mentions__bloc dd { font-weight: 500; overflow-wrap: anywhere; }
.mentions__bloc a { color: var(--texte); font-weight: 600; text-decoration-color: var(--lime); text-underline-offset: 0.25em; }
.mentions__bloc a:hover { color: var(--lime); }

/* Page d'erreur */
.erreur {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--barre) + 2rem) 0 clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}
@media (min-width: 900px) { .erreur { align-items: center; padding-bottom: 2rem; } }
/* Mise en page empilée, écran plus haut que large : le nombre dessiné en 3D se tient entre la barre et
   l'étiquette ; on lui réserve toujours cette place, même sur un téléphone peu haut. */
@media (max-width: 899px) and (max-aspect-ratio: 21/20) { html.js:not(.sans-webgl) .erreur { padding-top: calc(var(--barre) + 8.5rem); } }
.erreur::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--fond) 8%, transparent 55%); pointer-events: none; }
.erreur__contenu { position: relative; z-index: 1; }
.erreur__code { display: none; font: 800 clamp(7rem, 34vw, 22rem)/0.85 var(--titres); font-stretch: 78%; color: var(--fond); -webkit-text-stroke: 4px var(--bleu); paint-order: stroke fill; margin-bottom: 2rem; }
.sans-webgl .erreur__code { display: block; }
.erreur__titre { margin-top: 1.2rem; font: 700 clamp(2.4rem, 7vw, 5rem)/0.95 var(--titres); font-stretch: 82%; letter-spacing: -0.03em; }
.erreur__texte { margin-top: 1.3rem; max-width: 34rem; color: var(--doux); font-size: 1.125rem; }
.erreur__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2.2rem; }

/* 8. Formulaires --------------------------------------------------------------------------------- */
.section--formulaire { padding-top: clamp(3rem, 7vw, 5.5rem); }
.formulaire-grille { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
@media (min-width: 1000px) { .formulaire-grille { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }
.formulaire-zone { scroll-margin-top: calc(var(--barre) + 1.5rem); }
.formulaire { display: grid; gap: 1.5rem; }
.formulaire__groupe { display: grid; gap: 1.5rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.formulaire__groupe + .formulaire__groupe { margin-top: 2rem; }
.formulaire__groupe legend { display: flex; align-items: baseline; gap: 0.9rem; width: 100%; padding: 0 0 0.9rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--trait); font: 700 clamp(1.5rem, 3vw, 2rem)/1.1 var(--titres); font-stretch: 88%; letter-spacing: -0.02em; }
.formulaire__ligne { display: grid; gap: 1.5rem; }
@media (min-width: 620px) { .formulaire__ligne { grid-template-columns: 1fr 1fr; } }

.champ { display: grid; gap: 0.5rem; align-content: start; min-width: 0; }
.champ__libelle { font-weight: 500; font-size: 0.98rem; }
.champ__requis { color: var(--doux); font-weight: 400; font-size: 0.88rem; }
.champ input:not([type="checkbox"]), .champ select, .champ textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--trait-fort);
  border-radius: 0;
  background: rgba(14, 21, 36, 0.7);
  color: var(--texte);
  font-size: 1rem;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
  appearance: none;
  -webkit-appearance: none;
}
.champ textarea { min-height: 11rem; resize: vertical; line-height: 1.55; }
.champ select {
  padding-right: 2.8rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--bleu) 50%), linear-gradient(135deg, var(--bleu) 50%, transparent 50%);
  background-position: calc(100% - 1.35rem) 50%, calc(100% - 1rem) 50%;
  background-size: 0.36rem 0.36rem;
  background-repeat: no-repeat;
}
.champ select option { background: var(--surface); color: var(--texte); }
.champ input:hover, .champ select:hover, .champ textarea:hover { border-color: rgba(150, 185, 255, 0.5); }
.champ input:not([type="checkbox"]):focus-visible, .champ select:focus-visible, .champ textarea:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
  border-color: var(--bleu);
  background: rgba(14, 21, 36, 1);
  box-shadow: 0 0 2rem -0.5rem rgba(43, 177, 255, 0.5);
}
.champ input[aria-invalid="true"]:not([type="checkbox"]), .champ select[aria-invalid="true"], .champ textarea[aria-invalid="true"] { border-color: var(--alerte); }
.champ__aide { color: var(--doux); font-size: 0.9rem; }
/* Le carré et le texte sont sur deux colonnes : une seconde ligne s'aligne sous le texte, pas sous le carré. */
.champ__erreur { display: grid; grid-template-columns: auto 1fr; gap: 0.5em; align-items: baseline; color: var(--alerte); font-size: 0.93rem; font-weight: 500; }
.champ__erreur::before { content: "■"; font-size: 0.6em; transform: translateY(-0.2em); }
.champ__erreur[hidden] { display: none; }

.choix { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.choix__option { position: relative; cursor: pointer; }
.choix__option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choix__option > span {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.6rem 1.05rem;
  border: 1px solid var(--trait-fort);
  background: rgba(14, 21, 36, 0.7);
  font-weight: 500;
  transition: border-color 0.25s, color 0.25s, background-color 0.25s;
}
.choix__option > span::before { content: ""; width: 0.6rem; height: 0.6rem; border: 1px solid var(--doux); transition: background-color 0.25s, border-color 0.25s, transform 0.4s var(--souple); }
.choix__option:hover > span { border-color: rgba(150, 185, 255, 0.5); }
.choix__option input:checked + span { border-color: var(--lime); color: var(--lime); background: rgba(198, 255, 61, 0.07); }
.choix__option input:checked + span::before { background: var(--lime); border-color: var(--lime); transform: rotate(90deg); }
.choix__option input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 3px; }

.champ-piege { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.formulaire__envoi { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 0.5rem; }
.formulaire__note { color: var(--doux); font-size: 0.9rem; max-width: 22rem; }
.bouton[disabled] { cursor: progress; opacity: 0.7; }

.alerte, .confirmation { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid; margin-bottom: 2rem; }
.alerte { border-color: var(--alerte); background: rgba(255, 143, 143, 0.07); }
.alerte strong { color: var(--alerte); }
.alerte p { margin-top: 0.35rem; }
.confirmation { border-color: var(--lime); background: rgba(198, 255, 61, 0.05); margin-bottom: 0; }
.confirmation h2 { margin-top: 1.25rem; font: 700 clamp(1.7rem, 4vw, 2.6rem)/1.05 var(--titres); font-stretch: 86%; letter-spacing: -0.02em; }
.confirmation p { margin-top: 0.9rem; color: var(--doux); }
.confirmation__signe { display: block; width: 3rem; height: 3rem; background: var(--lime); clip-path: polygon(14% 52%, 26% 40%, 42% 56%, 74% 22%, 86% 34%, 42% 80%); animation: apparait 0.7s var(--souple) both; }

.a-cote { display: grid; gap: 1px; }
.a-cote__bloc { display: grid; gap: 0.55rem; padding: clamp(1.3rem, 3vw, 1.8rem); background: var(--fond-2); box-shadow: 0 0 0 1px var(--trait); }
.a-cote__bloc h2 { margin-top: 0.4rem; font: 650 1.3rem/1.2 var(--titres); font-stretch: 100%; letter-spacing: 0; }
.a-cote__bloc p { color: var(--doux); }
.a-cote__bloc a { color: var(--texte); font-weight: 600; text-decoration-color: var(--lime); text-underline-offset: 0.25em; }
.a-cote__bloc a:hover { color: var(--lime); }
.a-cote__bloc .bouton { margin-top: 0.4rem; text-decoration: none; }
.a-cote__bloc .bouton .icone { width: 1.2rem; height: 1.2rem; stroke: var(--lime); }
.a-cote__grand { display: inline-block; padding-block: 0.6rem; font: 700 clamp(1.6rem, 3vw, 2rem)/1.1 var(--titres) !important; font-stretch: 86%; white-space: nowrap; }
.entete-page__appel { margin-top: 1.6rem; animation: apparait 0.9s var(--souple) 0.42s both; }
.entete-page__appel .icone { width: 1.25rem; height: 1.25rem; stroke: var(--lime); }

/* 9. Pied de page -------------------------------------------------------------------------------- */
.pied { position: relative; }
.appel {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 92vh;
  min-height: 92svh;
  padding-block: 6rem;
  text-align: center;
  overflow: hidden;
}
.appel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(46rem 30rem at 50% 55%, rgba(5, 8, 15, 0.94) 35%, transparent 78%); }
.appel__contenu { display: flex; flex-direction: column; align-items: center; }
.appel__titre { margin-top: 1.4rem; font: 700 clamp(1.9rem, 8.6vw, 8rem)/0.92 var(--titres); font-stretch: 80%; letter-spacing: -0.035em; }
.appel__texte { margin-top: 2.1rem; max-width: 32rem; color: var(--doux); font-size: 1.125rem; }
.appel__actions { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin-top: 2.2rem; }
.page-accueil .appel { background: none; }
/* L'animation s'efface en douceur avant le pied de page, au lieu d'être coupée net. */
.page-accueil .appel::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, var(--fond), rgba(5, 8, 15, 0) 22%, rgba(5, 8, 15, 0) 65%, var(--fond)); }
@media (max-width: 700px) { .appel { min-height: 78vh; min-height: 78svh; padding-block: 4.5rem; } }
body:not(.page-accueil) .appel { background: radial-gradient(60rem 30rem at 50% 110%, rgba(11, 123, 255, 0.22), transparent 70%); border-top: 1px solid var(--trait); min-height: 0; padding-block: clamp(5rem, 12vw, 9rem); }

.pied__bas { position: relative; background: var(--fond); border-top: 1px solid var(--trait); overflow: hidden; }
.pied__grille { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2.5rem 1.5rem; padding-block: clamp(3rem, 7vw, 5rem) 2.5rem; }
.pied__marque { grid-column: 1 / -1; max-width: 24rem; }
.pied__marque p { margin-top: 1rem; color: var(--doux); }
@media (min-width: 700px) { .pied__grille { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .pied__grille { grid-template-columns: 1.7fr repeat(2, minmax(0, 1fr)); } .pied__marque { grid-column: auto; } }
.pied__titre { font: 500 0.8rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--doux); }
.pied__colonne ul { display: grid; margin-top: 0.7rem; }
.pied__colonne li { display: flex; align-items: center; min-height: 2.75rem; }
.pied__colonne a { display: inline-flex; align-items: center; min-height: 2.75rem; white-space: nowrap; text-decoration: none; transition: color 0.25s; }
.pied__colonne a:hover, .pied__colonne a[aria-current] { color: var(--lime); }
.pied__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 2rem; padding-block: 1.4rem; border-top: 1px solid var(--trait); color: var(--doux); font: 500 0.8rem/1.5 var(--mono); letter-spacing: 0.04em; }
/* Les deux numéros se séparent par un blanc, pas par un point : aucun signe ne reste seul en fin de ligne. */
.pied__numeros { display: flex; flex-wrap: wrap; gap: 0 1.6em; }
.pied__numeros span { white-space: nowrap; }
/* Petite phrase de fin : entre le copyright et le SIRET sur grand écran, sur sa propre ligne en dessous. */
.pied__mot { color: var(--texte); }
@media (max-width: 1199px) { .pied__mot { order: 3; flex-basis: 100%; } }

/* Titres bornés par la hauteur d'écran. Ce bloc doit rester APRÈS toutes les autres règles de taille des titres :
   à sélecteur égal, c'est la dernière règle écrite qui s'applique. */
@media (min-width: 900px) and (max-height: 880px) {
  .hero__titre { font-size: min(9.2vw, 12.5vh); }
  .entete-page__titre { font-size: min(7.4vw, 12.5vh); }
}
@media (max-height: 480px) {
  .hero__titre, .entete-page__titre { font-size: clamp(2rem, 13vh, 4rem); }
}

/* 10. Mouvement réduit : une version calme, sans déplacement ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-anim], .js [data-anim="lignes"] .ligne > span { transform: none; }
  .js [data-anim="visuel"] picture { clip-path: none; }
  .defilant { width: auto; }
  .defilant__liste { flex-wrap: wrap; justify-content: center; gap: 0.5rem 0; padding-inline: var(--marge); }
  .prestation__visuel img { transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

@media print {
  .barre, .menu-mobile, .scene, .scene-repli, .appel { display: none !important; }
  html, body { background: #fff; color: #000; }
}
