/* ==========================================================================
   InTest : light.css
   Version light du site (FR / EN), chargée après les autres feuilles sur toutes les pages.
   Ajouts propres à cette version : page Solutions (composée de blocs existants), pages légales,
   fenêtre de contact envoyée par le serveur.

   1. Page Solutions : six cartes de bancs sur deux rangées, listes des cartes de services, ancres
   2. Page légale (mentions légales & RGPD) : haut de page sans photo, texte courant
   3. Fenêtre de contact : champ piège, message d'erreur, envoi en cours
   4. Retours de novembre 2026 : frise du déroulement d'un projet, modules InNova en 3 × 3, certificat Qualiopi
   ========================================================================== */

/* 1. Page Solutions ----------------------------------------------------------------------------- */

/* Six cartes (bancs d'essais) : deux rangées de trois, filet horizontal entre les rangées, pas de filet
   vertical devant la première carte d'une rangée. Une colonne sous 1200 px (règles de pages.css). */
@media (min-width: 75em) {
  .sectors--6 .sector:nth-child(3n + 1)::before {
    display: none;
  }

  .sectors--6 .sector:nth-child(n + 4)::after {
    content: "";
    position: absolute;
    top: 0;
    left: calc(-2rem - 1px);
    right: calc(-2rem - 1px);
    height: 1px;
    background: var(--line);
  }

  .sectors--6 .sector:nth-child(3n + 1)::after {
    left: 0;
  }

  .sectors--6 .sector:nth-child(3n)::after {
    right: 0;
  }
}

/* Prestations d'une carte de service : intitulé en gras, précision en navy 70 % */
.offer-card__list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--navy-70);
}

.offer-card__list li {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.offer-card__list strong {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--navy);
}

/* Ancres sur des éléments (cartes, prestations) : un peu d'air sous l'en-tête et la barre d'ancres collés */
.sector[id],
.rd-card[id],
.offer-cards > li[id],
.offer-card__list li[id] {
  scroll-margin-top: calc(var(--sticky-offset) + 1.5rem);
}

/* Arrivée par une entrée du méga menu (ancre) : l'élément visé est signalé en bleu */
.sector:target .sector__title,
.rd-card:target .card-title,
.offer-card__list li:target strong,
:target > .offer-card .card-title {
  color: var(--blue-500);
}

.offer-card__list li:target {
  border-left-color: var(--blue-500);
}

/* 2. Page légale -------------------------------------------------------------------------------- */

/* Haut de page : gabarit R&D sans photo carrée, titre seul */
.hero--legal .hero__main {
  padding-bottom: 3.5rem;
}

.legal__texte {
  max-width: 50rem;
}

.legal__texte > * + * {
  margin-top: 1rem;
}

.legal__texte h2 {
  margin-top: 3rem;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.legal__texte h3 {
  margin-top: 2rem;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.3;
}

.legal__texte h2 + *,
.legal__texte h3 + * {
  margin-top: 0.75rem;
}

.legal__texte p,
.legal__texte li {
  line-height: 1.6;
  color: var(--navy-70);
}

.legal__texte strong {
  font-weight: 500;
  color: var(--navy);
}

.legal__texte ul {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.legal__texte li::marker {
  color: var(--blue-500);
}

.legal__texte a {
  color: var(--blue-500);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.15em;
}

.legal__texte a:hover {
  color: var(--blue-600);
}

/* 3. Fenêtre de contact ------------------------------------------------------------------------- */

/* Champ piège (anti-spam) : déjà dans pages.css, repris ici pour les pages qui ne la chargent pas */
.chat .form-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.chat__msg--erreur {
  background: var(--red-50);
  color: var(--red-600);
}

.chat__msg--erreur a {
  color: inherit;
  text-decoration: underline;
}

.chat__form[aria-busy="true"] .chat__send {
  opacity: 0.6;
  cursor: progress;
}

/* 4. Retours de novembre 2026 ------------------------------------------------------------------- */

/* Frise « Le déroulement d'un projet » (page Solutions) : SVG fourni par InTest, à sa taille d'origine
   (1190 px) au plus ; sous 1000 px de large, elle garde cette largeur et défile horizontalement */
.frise {
  align-self: stretch;
  margin-top: 1.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.frise:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 0.25rem;
}

.frise__svg {
  display: block;
  width: 100%;
  min-width: 62.5rem;
  max-width: 74.375rem;
  height: auto;
}

/* Modules InNova : huit modules et la licence, en 3 × 3 (≥ 1440 px ; deux colonnes en dessous, pages.css) */
@media (min-width: 90em) {
  .rd-cards--neuf > li,
  .rd-cards--neuf > li:nth-child(n + 9) {
    grid-column: span 4;
  }
}

/* Certification Qualiopi (accueil) : la carte entière ouvre le certificat dans la visionneuse */
.cert-card {
  position: relative;
}

.cert-card__link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.15em;
}

.cert-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.cert-card__link:hover {
  color: var(--blue-500);
}

.cert-card__link:focus-visible {
  outline: none;
}

.cert-card__link:focus-visible::after {
  outline: 2px solid var(--blue-500);
  outline-offset: -2px;
}

/* Visionneuse : document en portrait (certificat), cadre ajusté à l'image, page entière visible */
.modal--image:has(img[src*="certificat-qualiopi"]) {
  width: fit-content;
}

.modal--image:has(img[src*="certificat-qualiopi"]) img {
  width: auto;
  height: auto;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 7.5rem);
}

/* Page Inertron en anglais : titre plus long (« Next-generation Mass Properties Measurement System »), corps
   réduit pour tenir sur trois lignes comme le titre français sur deux (≈ 56 px à 1680 px au lieu de 67 px) */
.hero-inertron__title:lang(en) {
  font-size: clamp(1.5rem, 9.6cqi, 3.5rem);
}
