/* Noxisia : rythme plus compact, sans changer la composition ni la typographie. */
:root {
  --section-y:40px;
  --title-gap:24px;
}
@media (min-width:768px) {
  :root { --section-y:56px; --title-gap:32px; }
}
@media (min-width:1200px) {
  :root { --section-y:64px; }
}

:is(.nx-page-home,.nx-page-service) .cut {
  min-height:0;
  padding-block:var(--section-y);
}
:is(.nx-page-home,.nx-page-service) #tarifs {
  padding-top:var(--section-y);
}
:is(.nx-page-home,.nx-page-service) section[id],
:is(.nx-page-home,.nx-page-service) h2[id] {
  scroll-margin-top:calc(var(--bar-h,58px) + 20px);
}
:is(.nx-page-home,.nx-page-service) #contact {
  min-height:0;
  align-content:start;
  align-items:start;
  padding-block:var(--section-y);
  row-gap:24px;
}
:is(.nx-page-home,.nx-page-service) #contact .foot {
  position:static;
  grid-column:1 / -1;
  margin-top:8px;
  padding:20px 0 0;
}
:is(.nx-page-home,.nx-page-service) #contact .mascot-end {
  bottom:calc(var(--section-y) + 80px);
  width:clamp(140px,13vw,180px);
}
@media (max-width:900px) {
  :is(.nx-page-home,.nx-page-service) #contact .mascot-end {
    top:32px;
    bottom:auto;
    right:24px;
    width:72px;
  }
}

/* Accueil : rapprocher les offres, les arguments et les démonstrations. */
.nx-page-home .nxo-offres,
.nx-page-home .nxo-pourquoi,
.nx-page-home .nxo-film { padding-block:var(--section-y); }
.nx-page-home .nxo-offres { padding-bottom:24px; }
.nx-page-home .nxo-offres .intro { margin-bottom:32px; }
.nx-page-home .nxo .cartes { gap:32px 24px; }
.nx-page-home .nxo .carte h3 { margin-top:20px; }
.nx-page-home .nxo .prix { margin-bottom:16px; }
.nx-page-home .nxo-pourquoi .w { gap:32px; }
.nx-page-home .nxo-pourquoi .texte p { margin-bottom:24px; }
.nx-page-home .nxo .atouts { gap:16px; }
.nx-page-home .nxo-film .actions { gap:16px; margin-bottom:32px; }
.nx-page-home #methode { gap:var(--title-gap); }
.nx-page-home #methode .giant { margin-bottom:0; }
.nx-page-home #methode .bientot { margin-top:0; }
.nx-page-home .apres { margin-top:24px; }
.nx-page-home .apres article { padding:24px; }
.nx-page-home .paint-meta { margin-top:16px; }

/* La progression se calcule sur la hauteur totale de #fabrique.
   Les cinq étapes restent égales : la synchronisation vidéo reste intacte. */
.nx-page-home #fabrique .etape {
  min-height:clamp(600px,78svh,840px);
  padding-block:64px;
}
@media (max-width:820px) {
  .nx-page-home #fabrique .etape {
    min-height:max(560px,90svh);
    padding-top:calc(var(--bar-h,58px) + 24px);
    padding-bottom:32px;
  }
}
@media (max-width:360px) {
  .nx-page-home .phone { --ph:min(35svh,280px); }
}
@media (max-width:820px) and (max-height:700px) {
  .nx-page-home #fabrique .etape { padding-top:calc(var(--bar-h,58px) + 16px); }
  .nx-page-home #fabrique .etape h2 { font-size:clamp(2rem,8vw,3rem); }
  .nx-page-home #fabrique .etape__n { margin-bottom:12px; }
  .nx-page-home #fabrique .etape p { margin-top:12px; font-size:1rem; line-height:1.45; }
  .nx-page-home .phone { --ph:32svh; }
}
@media (max-width:600px) {
  .nx-page-home .nxo .w { padding-inline:20px; }
  .nx-page-home .nxo .cartes { gap:36px; }
  .nx-page-home .nxo-offres .intro { margin-bottom:24px; }
  .nx-page-home .apres article { padding:20px; }
}


/* Noxisia — compléments des trois pages services, après le CSS commun.
   --section-y et --title-gap sont définis par le parent.
   Les sections .cut normales et leurs min-height relèvent du commun.
   Aucun changement de hauteur, position ou animation dans #fabrique :
   peak() utilise P = (innerHeight * .5 - rect.top) / rect.height,
   puis floor(P * 5). Les cinq .etape de 100svh sont la piste de lecture.
   Sur mobile, .etape__txt et le téléphone sont fixed, pas sticky.
*/

/* Neutralise les paddings spécifiques de 70px (dont le correctif mobile)
   et le gap de 35px, sans doubler les marges des enfants de la grille. */
.nx-page-service .service-chapter:not(.svc-mini) {
  padding-block: var(--section-y);
  row-gap: var(--title-gap);
}

/* La première section doit toujours commencer sous la barre fixe,
   y compris son bandeau mobile compris dans --bar-h. */
.nx-page-service .service-chapter.svc-top {
  padding-top: calc(var(--bar-h, 58px) + var(--title-gap));
}

/* Les quatre points de la page Sites sont déjà plus compacts :
   conserver leurs 32px/12px, sans les agrandir avec le commun. */
.nx-page-service .service-chapter.svc-mini {
  padding-block: 32px;
  row-gap: 12px;
}

.nx-page-service .service-chapter > p {
  margin-block: 0;
}

/* Avant : gap 35px + preuve 40px, navigation 20px ou CTA 24px.
   Le gap de la grille devient l'unique séparation verticale.
   .service-intro est un paragraphe : pas de padding de section ici. */
.nx-page-service .svc-top > .proof,
.nx-page-service .svc-top > .service-nav,
.nx-page-service .svc-top > .svc-cta {
  margin-block: 0;
}

/* Conserve le centrage horizontal des médias et leurs dimensions. */
.nx-page-service .service-chapter > .service-visual,
.nx-page-service .service-chapter > .case-video {
  margin-block: 0;
}

/* Comparatif Vidéos : réduit seulement les séparations verticales.
   Colonnes, tailles des lecteurs et accordéon restent inchangés. */
.nx-page-service .video-comparison,
.nx-page-service .video-comparison__head,
.nx-page-service .video-comparison__grid,
.nx-page-service .video-comparison__foot {
  row-gap: var(--title-gap);
}


/* Noxisia — fragment pages, à assembler en dernier dans espacements.css.
   Les jetons --section-y / --title-gap sont fournis par le parent.
   Scopes limités au contenu : aucun sélecteur de navigation ou de tiroir. */

/* Compte, panier et catalogue : dégager la barre fixe une seule fois.
   !important nécessaire contre le padding-top du style local prestations. */
body.nx-page-portal main.client.client--seul {
  padding-top: calc(var(--bar-h, 58px) + 14px) !important;
}

body.nx-page-portal main.client.client--seul > h1 {
  margin-top: 0;
}

body.nx-page-portal main.client > #message {
  padding-block: 12px;
}

/* Les statuts remplis conservent leur respiration et leur aria-live. */
body.nx-page-portal main.client > #message:empty {
  margin-block: 0;
  padding-block: 0;
}

body.nx-page-portal main.client > section {
  padding-block: var(--section-y, 40px);
}

/* La source impose déjà 28px !important sur la première section. */
body.nx-page-portal main.client.client--seul > section:first-of-type {
  padding-top: 24px !important;
}

body.nx-page-portal main.client > .retour {
  margin-top: 24px;
}

/* Les marges des labels s'ajoutaient à l'espace entre lignes du formulaire. */
body.nx-page-portal main.client .duo {
  gap: 16px 32px;
}
body.nx-page-portal main.client .duo > label {
  margin-block: 8px 0;
}
body.nx-page-portal main.client #selection-form {
  margin-top: 24px;
}

/* Prestations : garder les trois métiers, leurs images et leurs animations. */
body.nx-page-portal main.client > #metiers {
  margin-top: 0;
  padding-bottom: var(--section-y, 40px);
}

body.nx-page-portal main.client > .presta-intro {
  padding-top: 32px;
}

body.nx-page-portal main.client > #catalogue {
  padding-top: 24px;
}

body.nx-page-portal main.client #products > .catalog-category {
  margin-block: 40px 16px;
  padding-block: 16px;
}

body.nx-page-portal main.client #products > .catalog-category:first-child {
  margin-top: 8px;
}

/* Mentions, confidentialité, CGV et les quatre pages du blog.
   Ne pas compacter la scène .hero à éléments absolus sans contrôle visuel. */
body.nx-page-doc main#informations {
  padding-block: var(--section-y, 40px);
}

/* Remplace uniquement le margin-top:28px en attribut style du h1. */
body.nx-page-doc main#informations > h1 {
  margin-top: 0 !important;
}

body.nx-page-doc main#informations > h2 {
  margin-top: 24px;
}

/* Aperçu autonome : préserver les objets superposés et le cadrage vidéo. */
body.nx-page-preview > :is(.offres, .pourquoi, .film) {
  padding-block: var(--section-y, 40px);
}

body.nx-page-preview .offres .intro,
body.nx-page-preview .film .actions {
  margin-bottom: var(--title-gap, 24px);
}

body.nx-page-preview .cartes {
  gap: 32px;
}

body.nx-page-preview .pourquoi .wrap {
  gap: 32px;
}

/* Suivi : enveloppe et transitions entre blocs, sans modifier les lignes
   du tableau, les contrôles, les notifications ou les panneaux défilants. */
body.nx-page-followup main#demo {
  padding-block: 32px 40px;
}

body.nx-page-followup main#demo > .intro {
  gap: 32px;
  margin-bottom: 24px;
}

body.nx-page-followup main#demo > .simulation {
  margin-bottom: 24px;
}

@media (max-width: 767px) {
  body.nx-page-portal main.client > .presta-intro {
    padding-top: 24px;
  }

  body.nx-page-portal main.client #products > .catalog-category {
    margin-top: 32px;
  }

  body.nx-page-portal main.client #products > .catalog-category:first-child {
    margin-top: 8px;
  }

  body.nx-page-followup main#demo {
    padding-block: 24px 32px;
  }

  body.nx-page-followup main#demo > .intro {
    gap: 24px;
  }
}
