/* FibroMate — feuille de style unique. Fontes système, aucune ressource extérieure.

   Direction : page produit. Le vide sépare les sections, jamais un trait.
   Deux fonds qui alternent, deux niveaux de gris par fond, une seule teinte —
   le rouge du PLA. Contrastes calculés (WCAG 2.1, texte normal ≥ 4,5:1) :

     fond clair #f5f4f2 : encre #14141a 16,69:1 · gris #5f5f6b 5,73:1
                          rouge profond #b3301d 5,69:1
     fond noir  #0a0a0b : encre #f5f4f2 18,00:1 · gris #9b9ba6 7,19:1
                          rouge #e8482f 5,09:1
     blanc sur le bouton #b3301d 6,26:1 · survol #c23a22 5,35:1          */

:root {
  --blanc:        #f5f4f2;
  --noir:         #0a0a0b;
  --encre-clair:  #14141a;
  --gris-clair:   #5f5f6b;
  --encre-sombre: #f5f4f2;
  --gris-sombre:  #9b9ba6;
  --rouge:        #e8482f;   /* le rouge de l’objet : sur le noir, et en grand */
  --rouge-profond:#b3301d;   /* le même rouge assombri : texte sur clair, bouton */
  --rouge-vif:    #c23a22;   /* survol du bouton */

  /* rythme vertical : les sections respirent, rien ne les sépare d’autre */
  --respire:   clamp(4.5rem, 4rem + 5vw, 11.25rem);
  --gouttiere: clamp(1.5rem, 5vw, 4rem);
  --large:     68rem;
  --mesure:    36rem;

  /* échelle typographique */
  --t-petit:  0.9375rem;
  --t-corps:  clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --t-lede:   clamp(1.2rem, 1.1rem + 0.42vw, 1.4rem);
  --t-h2:     clamp(2.1rem, 1.36rem + 2.9vw, 3.6rem);
  --t-h1:     clamp(2.9rem, 1.9rem + 3.9vw, 4.5rem);
  --t-geant:  clamp(3.2rem, 1.9rem + 5.1vw, 6rem);
  --t-note:   clamp(2.6rem, 1.9rem + 2.6vw, 4rem);

  /* largeurs d’affichage des photos : la moitié de leur définition de fichier,
     pour rester nettes sur un écran à densité double */
  --l-ouverture:  640px;
  --l-modules:    360px;
  --l-service:    369px;
  --l-endo:       200px;
  --l-creality:   300px;
  --l-snapmaker:  360px;
  --l-jean:       390px;

  --sans: ui-sans-serif, system-ui, -apple-system, "SF Pro Text", "Segoe UI",
          Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --courbe: cubic-bezier(0.16, 1, 0.3, 1);
  --duree: 600ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #8a8a94 transparent;
}

body {
  margin: 0;
  background: var(--noir);
  color: var(--encre-sombre);
  font-family: var(--sans);
  font-size: var(--t-corps);
  line-height: 1.55;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }

/* ---------- typographie ---------- */

h1, h2, h3 { margin: 0; text-wrap: balance; }

h1 {
  font-size: var(--t-h1);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

h2 {
  font-size: var(--t-h2);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.032em;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1.1em; }

/* les chiffres sont des données : chasse fixe partout */
.fait, .chiffre, .appui, .coordonnees, .fiche dd, .tel {
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---------- les deux fonds ---------- */

.scene {
  padding: var(--respire) var(--gouttiere);
}
.scene--noir  { background: var(--noir);  color: var(--encre-sombre); }
.scene--blanc { background: var(--blanc); color: var(--encre-clair); }

::selection                { background: var(--rouge);         color: #fff; }
.scene--blanc::selection,
.scene--blanc ::selection  { background: var(--rouge-profond); color: #fff; }

/* chaque section fait une affirmation, centrée */
.bloc {
  max-width: var(--mesure);
  margin-inline: auto;
  text-align: center;
}
.bloc p { text-wrap: balance; }
.bloc h2 + p { margin-top: clamp(1.25rem, 2.4vw, 1.75rem); }
.scene--noir  .bloc p { color: var(--gris-sombre); }
.scene--blanc .bloc p { color: var(--gris-clair); }

/* le visuel suit son affirmation, petit et net au milieu du vide */
.visuel {
  margin: clamp(3rem, 7vw, 5.5rem) auto 0;
  text-align: center;
}
.visuel img { margin-inline: auto; }
.visuel--ouverture img { width: 100%; max-width: var(--l-ouverture); height: auto; }
.visuel--modules   img { width: 100%; max-width: var(--l-modules);   height: auto; }
.visuel--service   img { width: 100%; max-width: var(--l-service);   height: auto; }
.visuel--jean      img { width: 100%; max-width: var(--l-jean);      height: auto; }

/* ---------- ouverture ---------- */

.ouverture {
  padding-top: clamp(4rem, 10vh, 7rem);
  padding-bottom: clamp(4rem, 9vh, 6.5rem);
}

.ouverture .bloc { max-width: 40rem; }

.ouverture .lede {
  max-width: 36ch;
  margin: clamp(1.25rem, 2.6vw, 1.75rem) auto 0;
  font-size: var(--t-lede);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.014em;
}

.ouverture .bloc .fait {
  max-width: 42ch;
  margin: clamp(1rem, 2vw, 1.4rem) auto 0;
  color: var(--encre-sombre);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 2rem;
  margin-top: clamp(1.75rem, 3.4vw, 2.5rem);
}

/* ---------- le seul bouton de la page ---------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  background: var(--rouge-profond);
  color: #fff;
  font-size: 1rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: background-color 180ms var(--courbe),
              transform 140ms var(--courbe);
}
.bouton:active { transform: scale(0.97); }

/* un lien prend le rouge de l’objet, jamais une autre teinte */
.lien,
.coordonnees a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--rouge);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(232, 72, 47, 0.38);
  transition: text-decoration-color 180ms var(--courbe);
}
.scene--blanc .lien { color: var(--rouge-profond); }

@media (hover: hover) and (pointer: fine) {
  .bouton:hover { background-color: var(--rouge-vif); }
  .lien:hover,
  .coordonnees a:hover { text-decoration-color: currentcolor; }
}

a:focus-visible,
video:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--rouge);
  outline-offset: 4px;
  border-radius: 2px;
}
.scene--blanc a:focus-visible { outline-color: var(--rouge-profond); }
main:focus { outline: none; }

.evitement {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  padding: 0.9rem 1.4rem;
  background: var(--rouge-profond);
  color: #fff;
  text-decoration: none;
}
.evitement:focus { left: 0; }

/* ---------- la bande de vues endoluminales ---------- */

.pellicule {
  display: flex;
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
  margin-top: clamp(3rem, 7vw, 5.5rem);
  margin-inline: calc(var(--gouttiere) * -1);
  padding-inline: var(--gouttiere);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.pellicule img {
  flex: 0 0 min(52vw, var(--l-endo));
  width: min(52vw, var(--l-endo));
  height: auto;
  scroll-snap-align: center;
}
/* dès que les cinq vignettes tiennent, la bande se pose au centre */
@media (min-width: 75rem) {
  .pellicule {
    justify-content: center;
    margin-inline: auto;
    overflow: visible;
  }
}

/* ---------- les chiffres sont des évènements ---------- */

.chiffres {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(3rem, 9vw, 7rem);
  margin-top: clamp(3.5rem, 8vw, 6rem);
  text-align: center;
}
.chiffres .chiffre { margin: 0; }
.chiffres strong {
  display: block;
  font-size: var(--t-geant);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--rouge);
}
.chiffres span {
  display: block;
  margin-top: 0.9rem;
  font-size: var(--t-petit);
  color: var(--gris-sombre);
}

/* ---------- les deux séquences ---------- */

.films {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: clamp(3.5rem, 8vw, 6rem);
}
.films video {
  width: 100%;
  height: auto;
  background: #141417;
}
.films video:first-child { max-width: var(--l-snapmaker); }
.films video:last-child  { max-width: var(--l-creality); }

/* ---------- les notes, en jauges ---------- */

.notes {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  max-width: 40rem;
  margin: clamp(3.5rem, 8vw, 6rem) auto 0;
}
.notes > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem 1.25rem;
  align-items: baseline;
}
.notes dt {
  grid-column: 1;
  grid-row: 1;
  font-size: var(--t-corps);
  font-weight: 550;
  letter-spacing: -0.01em;
  color: var(--encre-clair);
}
.notes .chiffre {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--rouge-profond);
}
.notes .chiffre small {
  font-size: 0.875rem;
  font-weight: 450;
  letter-spacing: 0;
  color: var(--gris-clair);
}
.notes .jauge {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 0.6rem;
  margin: 0;
  border-radius: 999px;
  background: rgba(20, 20, 26, 0.1);
  overflow: hidden;
}
.notes .jauge span {
  display: block;
  width: var(--v);
  height: 100%;
  border-radius: 999px;
  background: var(--rouge-profond);
  transform-origin: left center;
}
.js .notes.vu .jauge span { animation: jauge 900ms var(--courbe) both; }
@keyframes jauge { from { transform: scaleX(0); } to { transform: none; } }

/* ---------- fiche technique ---------- */

.fiche {
  max-width: 46rem;
  margin: clamp(3rem, 7vw, 5rem) auto 0;
}
.fiche > div {
  display: grid;
  gap: 0.3rem 2.5rem;
  padding-block: 0.95rem;
}
.fiche dt {
  font-size: var(--t-petit);
  font-weight: 550;
  letter-spacing: -0.006em;
  color: var(--encre-clair);
}
.fiche dd {
  margin: 0;
  font-size: var(--t-petit);
  line-height: 1.5;
  color: var(--gris-clair);
}
@media (min-width: 46rem) {
  .fiche > div { grid-template-columns: 13rem minmax(0, 1fr); }
}

/* ---------- contact ---------- */

.contact { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.contact .visuel { margin-top: 0; }
.contact .bloc { margin-top: clamp(3rem, 7vw, 5rem); }

.coordonnees {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.5rem 2.5rem;
  margin-top: clamp(1.75rem, 3.4vw, 2.5rem);
  font-style: normal;
}
.coordonnees .tel {
  font-size: clamp(1.9rem, 1.2rem + 2.3vw, 2.9rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  text-underline-offset: 0.14em;
}

.mention {
  max-width: 46ch;
  margin: clamp(2.5rem, 5vw, 3.25rem) auto 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--gris-sombre);
}

/* ---------- pied ---------- */

.pied {
  padding: clamp(2.5rem, 5vw, 4rem) var(--gouttiere) clamp(3rem, 6vw, 4.5rem);
  background: var(--noir);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--gris-sombre);
  text-align: center;
}
.pied .bloc { max-width: var(--mesure); }
.pied .lien { font-size: 0.875rem; }

/* ---------- mentions légales (page secondaire, non réécrite) ---------- */

.bandeau {
  padding: var(--gouttiere) var(--gouttiere) 0;
}
.bandeau .page,
.pied .page,
.texte-legal.page {
  max-width: var(--large);
  margin-inline: auto;
}
.bandeau .page {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.bandeau .marque { font-weight: 650; letter-spacing: -0.02em; }
.bandeau .marque a { color: var(--encre-sombre); text-decoration: none; }
.bandeau-contact { font-size: var(--t-petit); color: var(--gris-sombre); }
.bandeau-contact a { color: var(--rouge); }

.texte-legal {
  max-width: 44rem;
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 5rem) var(--gouttiere);
}
.texte-legal h1 { font-size: var(--t-h2); margin-bottom: 2rem; }
.texte-legal h2 {
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
  margin: 2.75rem 0 0.75rem;
}
.texte-legal p,
.texte-legal address { color: var(--gris-sombre); }
.texte-legal a { color: var(--rouge); }
.texte-legal .retour { display: inline-flex; align-items: center; min-height: 44px; font-weight: 550; }
.a-completer { color: var(--rouge); font-style: italic; }

/* ---------- mouvement ----------

   Un seul geste, partout le même : la section monte de 24 px en fondu quand
   elle entre dans le champ. Même durée, même courbe. L’ouverture le joue une
   fois au chargement, en CSS pur, sans attendre le script.
   Sans JavaScript la classe .js n’existe pas : rien n’est jamais masqué.     */

.ouverture .bloc > *,
.ouverture .visuel {
  animation: monte var(--duree) var(--courbe) both;
}
.ouverture .lede    { animation-delay:  60ms; }
.ouverture .fait    { animation-delay: 120ms; }
.ouverture .actions { animation-delay: 180ms; }
.ouverture .visuel  { animation-delay: 240ms; }

@keyframes monte {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duree) var(--courbe),
              transform var(--duree) var(--courbe);
}
.js [data-reveal].vu { opacity: 1; transform: none; }

/* Mouvement réduit : le déplacement disparaît, le retour visuel des commandes
   reste. Un bouton qui ne répond plus à la pression n’aide personne. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .bouton, .lien, .coordonnees a {
    transition-property: background-color, color, text-decoration-color !important;
    transition-duration: 180ms !important;
  }
  .bouton:active { transform: none; }
}
