/* ==========================================================================
   InTest : pages.css
   Composants partagés des pages intérieures (maquettes v7, section Figma 12155:5671).
   Chargée après main.css et rd.css (et avant une éventuelle feuille de page : societe.css,
   builder.css). Les composants de main.css et rd.css sont réutilisés tels quels ; on ne trouve
   ici que leurs variantes et les composants nouveaux.

   1.  Hauts de page : photo de fond (cadrage par page), logo, photo de produit
   2.  Familles de blocs (espacements, filets, sur-titres)
   3.  Cartes à trois colonnes et cartes secteurs (variantes de .sectors)
   4.  Liste à points + lien (variante de .rd-split), captures, groupes de points
   5.  Cartes à pictogramme (variantes de .rd-cards) : modules, listes, cartes en aplat bleu
   6.  Colonnes numérotées (variantes de .values)
   7.  Chiffres clés
   8.  Matrice (tableau secteur × technologie)
   9.  Comparatif en deux colonnes, appel sous un bloc
   10. Réalisations chiffrées
   11. Étiquettes (vocabulaire)
   12. Formulaires (composants Figma form-field 12095:2713, bt-submit 12173:5724, form-alert 12173:5743,
       form-success 12173:5744) ; comportement dans assets/js/forms.js
   13. Page Contact : coordonnées, cartes de liens, accès
   14. Page Carrières : postes ouverts, photos du formulaire
   15. Responsive
   16. Responsive des formulaires et des pages Contact et Carrières
   ========================================================================== */

/* 1. Hauts de page ---------------------------------------------------------------------
   Photo de fond : variables lues par .hero__photo img (main.css), largeur et décalage en % de la
   photo, relevés sur le calque « image 55 » de bg-main de chaque maquette, dans le repère du cadre
   « bg » (cadre de 1679 px). */

/* Bancs d'essais (12114:3195) et Mécaniques (12142:4871) : photo de 2065 × 1378 à (−31,9 ; −304,7) */
.hero--bancs-essais {
  --hero-photo-w: max(129.0625rem, 123%);
  --hero-photo-w-sm: max(66.875rem, 123%);
  --hero-photo-x: -1.11%;
  --hero-photo-y: -22.11%;
}

/* Photo de l'atelier (R&D 12056:8044, InNova 12116:3816, Secteurs 12115:3514) : même photo, même largeur
   (1852 px à −71 px, valeurs par défaut de main.css), posée 6 px sous le haut du cadre et étirée en
   hauteur comme dans la maquette (1852 × 1468 au lieu de 1852 × 1235). Pour garder les proportions de la
   photo, retirer la règle aspect-ratio. */
.hero--atelier {
  --hero-photo-y: 0.39%;
}

.hero--atelier .hero__photo img {
  aspect-ratio: 1852 / 1468;
}

/* Hydrauliques (12140:4439) : photo de 1728 × 1153 à (−57,1 ; −79,0) */
.hero--hydrauliques {
  --hero-photo-w: max(108.0125rem, 102.93%);
  --hero-photo-w-sm: max(55.99rem, 102.93%);
  --hero-photo-x: -2.78%;
  --hero-photo-y: -6.85%;
}

/* Aéronautique & spatial (12100:2891) : photo de 2804,9 × 829,9 à (−500,1 ; −2,4)
   (source de 1700 px agrandie dans la maquette) */
.hero--aeronautique {
  --hero-photo-w: max(175.3rem, 167.06%);
  --hero-photo-w-sm: max(90.875rem, 167.06%);
  --hero-photo-x: -17.51%;
  --hero-photo-y: -0.28%;
}

/* Logo de produit au-dessus du H1 (InNova : 184 × 48, 28 px au-dessus du titre) */
.hero-rd__logo {
  width: 11.5rem;
  height: auto;
}

/* Photo de produit détourée sur fond bleu 50 : image de 422 × 316,5 posée en (44 ; 91,75) dans le carré
   de 500 px (InNova, 12116:3842) */
.hero-rd__media--produit {
  background: var(--blue-50);
}

.hero-rd__media--produit > img {
  position: absolute;
  top: 18.35%;
  left: 8.8%;
  width: 84.4%;
  height: 63.3%;
  object-fit: contain;
}

/* 2. Familles de blocs ------------------------------------------------------------------
   Grille à rail de main.css ; chaque famille de blocs Figma a ses marges.
   - .section--cartes : blocs de cartes (« block/offre-bancs », « block/par-technologie ») :
     48 px en haut, 51 px sous l'en-tête, 96 px en bas.
   - .section--texte : blocs de texte (« block/texte-points », « block/realisations »,
     « block/vocabulaire ») : 48 px en haut, 40 px entre les éléments, filets noirs à 10 %,
     sur-titre navy 70 %.
   - .section--grille : grilles encadrées (« block/cartes », « block/composants-testes »,
     « block/secteur-x-technologie », modules InNova) : rail à 40 px des bords, 48 px en haut,
     64 px sous l'en-tête, sur-titre navy 70 %.
   - .section--colonnes : colonnes numérotées (« block/architecture », « block/generation-pilotage »,
     technologies InNova) : 48 px en haut ; chapô à 70 % d'opacité en plus du navy 70 % (rendu à 49 %,
     mesuré sur les maquettes), comme le bloc Carrières de l'accueil. */
.section--cartes {
  --rail-pt: 3rem;
  --main-pt: 3rem;
  --main-pb: 6rem;
  --main-gap: 3.1875rem;
}

.section--texte {
  --line: rgb(0 0 0 / 0.1);
  --rail-pt: 3rem;
  --main-pt: 3rem;
  --main-gap: 2.5rem;
}

.section--grille {
  --rail-pt: 3rem;
  --main-pt: 3rem;
  --main-gap: 4rem;
}

@media (min-width: 64em) {
  .section--grille {
    --rail-px: clamp(1.5rem, 2.381vw, 2.5rem); /* 40 px @1680 */
  }
}

.section--texte .section__rail .eyebrow,
.section--grille .section__rail .eyebrow {
  color: var(--navy-70);
}

.section--colonnes {
  --rail-pt: 3rem;
  --main-pt: 3rem;
}

.section--colonnes .section-head__lead {
  opacity: 0.7;
}

/* Séparateur sous l'en-tête de section (« divider ») */
.divider {
  height: 1px;
  background: var(--navy-15);
}

/* 3. Cartes à trois colonnes et cartes secteurs -----------------------------------------------
   Composant .sectors de l'accueil (grille secondaire : vignettes, titres, textes et liens alignés ;
   filets au milieu des gouttières de 65 px) sur 3 colonnes de 374,67 px : vignette de 375 × 160 px,
   texte navy, 4 lignes réservées (maquette 12145:5324). */
.sectors--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sectors--3 .sector__media {
  aspect-ratio: 375 / 160;
}

.sectors--3 .sector__text {
  min-height: 6rem;
  color: var(--navy);
}

/* Cartes secteurs des pages Secteurs et Aéronautique : texte navy 70 % (mesuré sur les maquettes) et titres
   sans les 4 px rendus au texte sur l'accueil : « Off-road, hydraulique & mobilités » passe sur deux lignes
   comme dans ces maquettes. */
.sectors--secteurs .sector__text {
  color: var(--navy-70);
}

.sectors--secteurs .sector__title {
  margin-right: 0;
}

/* Renvoi sous les cartes, sans filet (« Le déroulement d'un projet ») */
.process-teaser--simple {
  padding-top: 0;
  border-top: 0;
}

/* 4. Liste à points + lien, captures, groupes de points ----------------------------------------
   .rd-split (rd.css) dont la colonne de gauche porte la liste cochée et un lien, 24 px sous la liste ;
   amorces en gras (« Réserve dès la conception : … »). */
.rd-split__points {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.rd-split__points .rd-checklist {
  align-self: stretch;
}

.rd-split__points .link-arrow {
  margin-top: 1.5rem;
}

.rd-checklist__text strong {
  font-weight: 700;
}

/* Capture logiciel en retrait (InNova, « Caractéristiques », 12116:3891) : capture de 441 × 284,5 posée
   en (41, 48) dans le cadre 512 × 380 (la variante de base de rd.css la pose en (29, 39)) */
.rd-screen--inset {
  padding: 9.375% 5.859% 9.277% 8.008%;
}

/* Groupes de points à puces (InServer, 12116:3985) : grille 2 × 2 (colonnes de 331 px, écarts de 32 px),
   titre 16 px demi-gras, liste à puces, 6 px entre les points, le tout en navy 70 % */
.feature-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--navy-70);
}

.feature-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.feature-group__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.feature-group__list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin: 0;
  padding-left: 1.5rem;
  list-style-type: "•\2002"; /* puce du texte (plus petite que le disque du navigateur), suivie d'un demi-cadratin */
}

/* 5. Cartes à pictogramme (.rd-cards, rd.css) ------------------------------------------------------
   Modules InNova (12116:3903) : grille de 12 colonnes, deux rangées de 4 cartes puis une rangée de 3 ;
   rangées à la hauteur de leur contenu. */
.rd-cards--modules {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: none;
}

.rd-cards--modules > li {
  grid-column: span 3;
}

.rd-cards--modules > li:nth-child(n + 9) {
  grid-column: span 4;
}

/* Le navigateur compose ces lignes ~0,3 % plus large que Figma : 4 px rendus au texte (pris sur la marge
   intérieure), comme pour .rd-checklist__text (« InNova ML » sur 2 lignes) */
.rd-cards--modules .rd-card__text {
  margin-right: -0.25rem;
}

/* Lien ou bouton en pied de carte : 40 px sous le texte (écart de 12 px, intercalaire de 16 px, écart de 12 px) */
.rd-cards--modules .rd-card__text:has(+ .rd-card__link, + .btn) {
  margin-bottom: 1.75rem;
}

/* Cartes à liste (« block/cartes », 12100:2969) : liste à puces 16 px navy 70 %, 8 px entre les points,
   retrait de 24 px, lien éventuel en pied de carte ; hauteurs de rangées données par le contenu */
.rd-cards--listes {
  grid-template-rows: none;
}

.rd-card__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding-left: 1.5rem;
  list-style: none;
  color: var(--navy-70);
}

/* Puce de 4 px centrée 14 px avant le texte, à mi-hauteur des minuscules (puce « • » de la maquette) */
.rd-card__list li {
  position: relative;
}

.rd-card__list li::before {
  content: "";
  position: absolute;
  top: 0.5625rem;
  left: -0.875rem;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: currentColor;
}

.rd-card__list:has(+ .rd-card__link) {
  margin-bottom: 1.75rem; /* « push » de 16 px + espacements de 12 px de la maquette */
}

/* Carte en aplat bleu 500 (« card/licence » d'InNova, 12117:4148 ; « card/cta », 12100:2969) : titre blanc,
   texte blanc à 70 %, bouton contour clair en pied de carte. --cta : titre 64 px sous le haut de la carte. */
.rd-card--accent {
  background: var(--blue-500);
  color: var(--white);
}

.rd-card--accent .rd-card__text {
  color: var(--white-70);
}

.rd-card--accent .btn {
  align-self: flex-start;
  margin-top: auto;
  margin-right: -0.25rem; /* bouton de 247 px dans une colonne de 248 px (modules InNova) */
}

.rd-card--accent :focus-visible {
  outline-color: var(--white);
}

.rd-card--cta {
  padding-top: 4rem;
}

/* 6. Colonnes numérotées (.values, main.css) -------------------------------------------------------- */

/* Lien dans une colonne */
.value .link-arrow {
  align-self: flex-start;
}

/* Quatre colonnes sans numéro (technologies InNova, 12116:4310) : 282,75 px puis 3 × 323,75 px ; chaque
   colonne garde la hauteur de son contenu, ses filets verticaux aussi (maquette) */
.values--4 {
  grid-template-columns: minmax(0, 282.75fr) repeat(3, minmax(0, 323.75fr));
  align-items: start;
}

/* 7. Chiffres clés -----------------------------------------------------------------------------------
   Composant Figma « figure » (block/chiffres, 12140:5064) : trois cases bleu 50 de 402 px (gouttière
   24 px), marges 12 / 20 px ; valeur en DM Sans Light 96 px (−4 %), libellé en DM Mono 14 px capitales
   8 px dessous. Variante --md : valeur à 70 px (« stat/xl-light », page mécanique, 12142:5040).
   Balisage <dl> : le libellé (dt) précède la valeur (dd) dans le code, la valeur s'affiche au-dessus. */
.key-figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
}

.key-figure {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.75rem 1.25rem;
  background: var(--blue-50);
}

.key-figure__value {
  order: -1;
  margin: 0;
  font-size: var(--fs-stat);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.key-figures--md .key-figure__value {
  font-size: var(--fs-display);
}

/* 8. Matrice secteur × technologie --------------------------------------------------------------------
   Composant Figma « matrice » (12148:5497) : tableau encadré bleu 200 sur fond blanc, colonnes de
   300 / 476 / 476 px à 1680 px, cellules de 28 / 32 px, filets bleu 200. Vrai <table> (en-têtes de
   colonnes et de lignes, liens dans les cellules) ; le conteneur (role="region", tabindex="0") défile
   horizontalement quand la place manque, au clavier comme au doigt. */
.matrice {
  overflow-x: auto;
  border: 1px solid var(--blue-200);
  background: var(--white);
}

.matrice:focus-visible {
  outline-offset: 2px;
}

.matrice__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.matrice__table th,
.matrice__table td {
  padding: 1.75rem 2rem;
  border-bottom: 1px solid var(--blue-200);
  font-weight: 400;
  text-align: left;
  vertical-align: top;
}

.matrice__table tr > * + * {
  border-left: 1px solid var(--blue-200);
}

.matrice__table tbody tr:last-child > * {
  border-bottom: 0;
}

/* Colonne des secteurs : 300 px (une largeur en % ou en calc() serait ignorée par Chrome sur une
   colonne de tableau) */
.matrice__table thead th:first-child {
  width: 18.75rem;
}

/* En-têtes de colonnes : technologie (mono 12 px, bleu) et lien vers sa page */
.matrice__label {
  display: block;
  color: var(--blue-500);
}

.matrice__table thead th:first-child .matrice__label {
  color: var(--navy);
}

/* En-têtes de lignes : secteur (« heading/lg-light2 », 21 px) et lien vers sa page */
.matrice__secteur {
  display: block;
  font-size: var(--fs-lead);
  font-weight: 300;
  line-height: 1.3;
  line-height: round(1.3em, 1px); /* interligne arrondi au pixel, comme Figma */
  letter-spacing: -0.02em;
}

.matrice__table th > .link-arrow {
  display: flex;
  width: fit-content;
  margin-top: 0.75rem;
}

.matrice__table td {
  color: var(--navy-70);
}

/* 9. Comparatif en deux colonnes, appel sous un bloc -----------------------------------------------------
   « Machine de catalogue ou banc sur mesure ? » (12143:5337) : deux colonnes de 615 px (gouttière
   24 px), marges de 40 px. Colonne de référence : filet navy 15 %, sur-titre et textes navy 70 %,
   puces en tiret. Colonne mise en avant (--accent) : fond blanc, filet bleu 200, sur-titre bleu,
   textes navy, cases cochées (i-check). En-tête : sur-titre mono 12 px, titre 32 px, 24 px dessous ;
   lignes de 16 px de marge sous un filet navy 15 %. */
.comparatif {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.comparatif__col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 2.5rem;
  border: 1px solid var(--navy-15);
}

.comparatif__col--accent {
  border-color: var(--blue-200);
  background: var(--white);
}

.comparatif__head {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
}

.comparatif__overline {
  color: var(--navy-70);
}

.comparatif__col--accent .comparatif__overline {
  color: var(--blue-500);
}

.comparatif__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comparatif__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-block: 1rem;
  border-top: 1px solid var(--navy-15);
  color: var(--navy-70);
}

.comparatif__col--accent .comparatif__item {
  color: var(--navy);
}

.comparatif__icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--blue-500);
}

/* Tiret de 10 × 1,5 px centré dans une case de 24 px (calque « marker ») */
.comparatif__dash {
  position: relative;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
}

.comparatif__dash::before {
  content: "";
  position: absolute;
  top: 0.703125rem;
  left: 0.4375rem;
  width: 0.625rem;
  height: 1.5px;
  background: var(--navy);
}

.comparatif__text {
  flex: 1;
  min-width: 0;
}

/* Appel sous un bloc (« appel », 12143:5382) : phrase en 17 px puis lien fléché, 24 px d'écart */
.cta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

.cta-line__text {
  font-size: 1.0625rem;
  line-height: 1.3;
  line-height: round(1.3em, 1px); /* interligne arrondi au pixel, comme Figma */
  letter-spacing: -0.02em;
}

/* 10. Réalisations chiffrées ------------------------------------------------------------------------
   Cartes de 402 px (gouttière 24 px) : photo 220 px, corps 28 / 32 / 32 px, secteur en mono 12 px,
   titre 32 px, texte, puis trois chiffres (valeur 24 px sur 168 px, libellé 14 px) sous filets.
   Composant Figma « card-realisation » (12137:4582) ; badge « Exemple fictif » facultatif. */
.realisations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.realisation {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--blue-200);
  background: var(--white);
}

.realisation__media {
  flex: none;
  height: 13.75rem;
}

.realisation__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem 2rem 2rem;
}

.realisation__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--blue-500);
}

.realisation__badge {
  padding: 0.25rem 0.5rem;
  background: var(--orange-100);
  color: var(--navy);
  white-space: nowrap;
}

.realisation__text {
  color: var(--navy-70);
}

.realisation__figures {
  margin: 0;
  padding-top: 0.5rem;
}

.realisation__figure {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 0.75rem;
  border-top: 1px solid var(--navy-15);
}

/* Valeur avant le libellé à l'écran ; dans le code, le libellé (dt) précède la valeur (dd) */
.realisation__figure dd {
  flex: none;
  order: -1;
  width: 10.5rem;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.1;
  line-height: round(1.1em, 1px); /* interligne arrondi au pixel, comme Figma (26 px) */
  letter-spacing: -0.02em;
}

.realisation__figure dt {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--navy-70);
}

/* Exemples fictifs (badge « Exemple fictif » de la maquette) : chaque bloc de réalisations inventées porte
   l'attribut data-exemple-fictif. Pour les masquer tous d'un coup, décommenter la règle ci-dessous
   (et retirer le lien « Réalisations » de la navigation interne des pages concernées).
[data-exemple-fictif] {
  display: none !important;
}
*/

/* 11. Étiquettes (vocabulaire) --------------------------------------------------------------------
   Composant Figma « tag » (12144:5446) : mot-clé encadré, angles droits, 12 / 20 px.
   Type Texte : filet navy 15 %, texte navy. Type Lien : filet bleu 200, texte bleu et flèche. */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--navy-15);
  background: var(--white);
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--navy);
}

a.tag {
  border-color: var(--blue-200);
  color: var(--blue-500);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease);
}

a.tag .ico-arrow {
  flex: none;
  width: 0.875rem;
  height: 0.625rem;
  transition: transform 0.25s var(--ease);
}

a.tag:hover {
  border-color: var(--blue-500);
  background: var(--blue-50);
  color: var(--blue-600);
}

a.tag:hover .ico-arrow,
a.tag:focus-visible .ico-arrow {
  transform: translateX(0.25rem);
}

/* 12. Formulaires ---------------------------------------------------------------------------- */

/* Mise en page : formulaire (694 px) | colonne complémentaire (512 px), 48 px d'écart, sous le séparateur */
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 694fr) minmax(0, 512fr);
  align-items: start;
  gap: 3rem;
}

.form-layout__main {
  min-width: 0;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Les composants en display:flex ignoreraient l'attribut hidden */
.form[hidden],
.form-alert[hidden],
.form-success[hidden],
.form-field__error[hidden],
.form-field__aide[hidden],
.form-submit__spinner[hidden] {
  display: none;
}

/* Deux champs côte à côte, 24 px d'écart */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

/* Champ : libellé mono 12 px navy 70 %, 8 px au-dessus de la boîte ; « (facultatif) » navy, en minuscules */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.form-field__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  color: var(--navy-70);
}

.form-field__optional {
  color: var(--navy);
  text-transform: none;
}

/* Boîte : 56 px de haut, marges 16 / 20 px, filet navy 15 %. Focus : filet bleu 500 de 2 px ;
   erreur : filet rouge 600 de 1,5 px (ombres intérieures : pas de décalage du contenu). */
.form-field__control {
  display: block;
  width: 100%;
  height: 3.5rem;
  margin: 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--navy-15);
  border-radius: 0;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.02em;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-field__control::placeholder {
  color: var(--navy-70);
  opacity: 1;
}

.form-field__control:hover {
  border-color: var(--navy-20);
}

.form-field__control[aria-invalid="true"] {
  border-color: var(--red-600);
  box-shadow: inset 0 0 0 0.5px var(--red-600);
}

.form-field__control:focus-visible,
.form-field__control:focus {
  border-color: var(--blue-500);
  outline: 0;
  box-shadow: inset 0 0 0 1px var(--blue-500);
}

.form-field__control--textarea {
  height: 10rem;
  min-height: 10rem;
  resize: vertical;
}

/* Liste : <select> natif, chevron 20 px à 20 px du bord ; libellé d'invite en navy 70 % */
.form-field__select {
  position: relative;
}

.form-field__select .form-field__control {
  padding-right: 3.5rem;
  text-overflow: ellipsis;
  cursor: pointer;
}

.form-field__select .form-field__control:invalid {
  color: var(--navy-70);
}

.form-field__select option {
  color: var(--navy);
}

.form-field__chevron {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--navy);
  pointer-events: none;
  translate: 0 -50%;
}

/* Message d'erreur et texte d'aide : 14 px, sous la boîte */
.form-field__error,
.form-field__aide {
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-field__error {
  color: var(--red-600);
}

.form-field__aide {
  color: var(--navy-70);
}

/* Le message d'erreur remplace l'aide (état « Erreur » du champ CV) */
.form-field.is-invalid .form-field__aide {
  display: none;
}

/* Dépôt de fichier (type « Fichier ») : zone pointillée de 24 px de marge, vrai <input type="file">
   masqué visuellement mais atteignable au clavier ; le libellé couvre toute la zone (clic, glisser-déposer).
   États : vide, survol (fichier glissé au-dessus), rempli, erreur. */
/* Pointillés de la maquette (traits de 6 px, espaces de 4 px), plus longs que ceux de border: dashed :
   quatre dégradés répétés ; couleur et épaisseur par variables (--drop-line, --drop-w) */
.form-drop {
  --drop-line: var(--navy);
  --drop-w: 1px;
  --drop-h: repeating-linear-gradient(90deg, var(--drop-line) 0 6px, transparent 6px 10px);
  --drop-v: repeating-linear-gradient(180deg, var(--drop-line) 0 6px, transparent 6px 10px);
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: calc(1.5rem + 1px);
  background:
    var(--drop-h) left top / 100% var(--drop-w) no-repeat,
    var(--drop-h) left bottom / 100% var(--drop-w) no-repeat,
    var(--drop-v) left top / var(--drop-w) 100% no-repeat,
    var(--drop-v) right top / var(--drop-w) 100% no-repeat,
    var(--drop-bg, var(--white));
}

.form-drop__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
}

.form-drop:focus-within {
  outline: 2px solid var(--blue-500);
  outline-offset: 3px;
}

.form-drop__icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--blue-500);
}

.form-drop__texts {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.form-drop__title {
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Le libellé de la zone rend toute la zone cliquable */
.form-drop__label {
  cursor: pointer;
}

.form-drop__label::before {
  content: "";
  position: absolute;
  inset: 0;
}

.form-drop__link {
  color: var(--blue-500);
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.form-drop__label:hover .form-drop__link {
  color: var(--blue-600);
  text-decoration-line: underline;
}

.form-drop__meta {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--navy-70);
}

.form-drop__remove {
  position: relative; /* au-dessus du libellé étendu */
  flex: none;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--blue-500);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.form-drop__remove:hover {
  color: var(--blue-600);
}

/* Contenu selon l'état (forms.js pose .is-filled et .is-over) : --empty (invite), --idle (formats acceptés),
   --over (fichier glissé au-dessus), --filled (nom et taille du fichier, bouton « Retirer ») */
.form-drop__state--over,
.form-drop__state--filled,
.form-drop__remove,
.form-drop__icon--file {
  display: none;
}

.form-drop.is-filled {
  padding: 1.5rem;
  border: 1px solid var(--navy-15);
  background: var(--white);
}

.form-drop.is-filled .form-drop__state--empty,
.form-drop.is-filled .form-drop__state--idle,
.form-drop.is-filled .form-drop__icon--upload {
  display: none;
}

.form-drop.is-filled .form-drop__state--filled,
.form-drop.is-filled .form-drop__icon--file {
  display: block;
}

.form-drop.is-filled .form-drop__remove {
  display: inline;
}

.form-drop.is-over {
  --drop-line: var(--blue-500);
  --drop-w: 1.5px;
  --drop-bg: var(--blue-50);
  padding: calc(1.5rem + 1px);
  border: 0;
  background:
    var(--drop-h) left top / 100% var(--drop-w) no-repeat,
    var(--drop-h) left bottom / 100% var(--drop-w) no-repeat,
    var(--drop-v) left top / var(--drop-w) 100% no-repeat,
    var(--drop-v) right top / var(--drop-w) 100% no-repeat,
    var(--drop-bg);
}

.form-drop.is-over .form-drop__state--empty,
.form-drop.is-over .form-drop__state--filled,
.form-drop.is-over .form-drop__icon--file,
.form-drop.is-over .form-drop__remove {
  display: none;
}

.form-drop.is-over .form-drop__state--over,
.form-drop.is-over .form-drop__state--idle,
.form-drop.is-over .form-drop__icon--upload {
  display: block;
}

.form-field.is-invalid .form-drop {
  --drop-line: var(--red-600);
  --drop-w: 1.5px;
}

.form-field.is-invalid .form-drop__icon {
  color: var(--red-600);
}

/* Case à cocher : case de 20 px, filet navy de 1,5 px ; cochée : bleu 500, coche blanche ;
   focus : filet bleu de 2 px et halo bleu 200 de 3 px (états Figma) */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--navy);
  cursor: pointer;
}

.form-check__input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.125rem 0 0;
  border: 1.5px solid var(--navy);
  border-radius: 2px;
  background: var(--white) center / 1rem 1rem no-repeat;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.form-check__input:checked {
  border-color: var(--blue-500);
  background-color: var(--blue-500);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.333 8.667 6 11.333l6.667-6.666' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.form-check__input:focus-visible {
  border: 2px solid var(--blue-500);
  outline: 0;
  box-shadow: 0 0 0 3px var(--blue-200);
}

/* Bouton d'envoi (« bt-submit », dérivé du bouton « bt medium blue ») : 50 px de haut, 18 px gras.
   Envoi en cours : désactivé (aria-disabled), libellé « Envoi en cours… », indicateur animé, opacité 60 %. */
.btn--md {
  min-height: 0;
  padding: 1rem 1rem 1rem 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.form-submit {
  flex: none;
}

.form-submit__spinner {
  display: none;
  flex: none;
  width: 1rem;
  height: 1rem;
}

.form-submit[aria-disabled="true"] {
  opacity: 0.6;
  cursor: progress;
}

.form-submit[aria-disabled="true"]:hover {
  background: var(--blue-500);
}

.form-submit[aria-disabled="true"] .ico-ne {
  display: none;
}

.form-submit[aria-disabled="true"] .form-submit__spinner {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .form-submit__spinner {
    animation: form-spin 0.8s linear infinite;
  }
}

@keyframes form-spin {
  to {
    rotate: 1turn;
  }
}

/* Bouton et mention sous le formulaire, 32 px d'écart */
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
}

.form-actions__note {
  flex: 1 1 16rem;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--navy-70);
}

.form-actions__note a {
  color: var(--blue-500);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

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

/* Champ piège (anti-spam) : hors écran, jamais atteint au clavier */
.form-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Bandeau (« form-alert ») : fond rouge 50, filet gauche rouge 600 de 3 px, pictogramme 20 px ;
   titre 16 px gras, texte 14 px ; liens vers les champs à corriger (ajout pour l'accessibilité).
   Hauteur selon le contenu (60 px fixes dans la maquette, où la seconde ligne est rognée). */
.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--red-600);
  background: var(--red-50);
  scroll-margin-top: calc(var(--sticky-offset) + 1.5rem);
}

.form-alert:focus-visible {
  outline-color: var(--red-600);
}

.form-alert__icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--red-600);
}

.form-alert__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
  line-height: 1.5;
}

.form-alert__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.form-alert__text {
  font-size: 0.875rem;
  color: var(--navy-70);
}

.form-alert__text a {
  color: inherit;
  text-decoration: none;
}

.form-alert__text a:hover {
  text-decoration: underline;
}

.form-alert__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.form-alert__list:empty {
  display: none;
}

.form-alert__list a {
  color: var(--red-600);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

/* Confirmation (« form-success ») : remplace le formulaire, même emplacement ; cadre bleu 200,
   marges de 48 px, pictogramme 40 px, titre 32 px, texte, lien secondaire */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 3rem;
  border: 1px solid var(--blue-200);
  background: var(--white);
  scroll-margin-top: calc(var(--sticky-offset) + 1.5rem);
}

.form-success__icon {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--blue-500);
}

.form-success__text {
  color: var(--navy-70);
}

/* 13. Page Contact : coordonnées, cartes de liens, accès ------------------------------------------------------------------------------- */

/* Colonne coordonnées (12118:4592) : photo 512 × 220, coordonnées, séparateur, renvoi Carrières ; 32 px d'écart */
.coords-aside {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
}

.coords-aside__media {
  aspect-ratio: 512 / 220;
}

.coords {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.coord {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.coord__icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--blue-500);
}

.coord__text {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.coord__label {
  color: var(--navy-70);
}

.coord__value {
  overflow-wrap: anywhere;
}

.coord__value a:hover {
  color: var(--blue-500);
}

.coords-aside__candidats {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--navy-70);
}

/* Cartes encadrées avec liens (« Nos solutions », 12119:4388) : grille .rd-cards (rd.css), rangées de
   432 et 374 px comme la maquette, liens en bas de carte ; carte « Carrières » en bleu 500 */
.rd-cards--liens {
  grid-template-rows: minmax(27rem, auto) minmax(23.375rem, auto);
}

.rd-card__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

/* Accès (12118:4286) : adresse (600 px au plus), lien d'itinéraire 32 px dessous */
.acces {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}

.acces__adresse {
  max-width: 37.5rem;
  font-style: normal;
  color: var(--navy-70);
}

/* 14. Page Carrières : postes ouverts, photos du formulaire ------------------------------------------------------------------------------ */

/* Postes ouverts (12096:2652) : liste encadrée bleu 200 sur fond blanc ; par poste : pictogramme 44 px,
   intitulé (420 px : titre 32 px, lieu et profil en mono), texte, lien « Postuler » ; 40 px d'écart */
.jobs-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--blue-200);
  background: var(--white);
}

.job-card {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 26.25rem) minmax(0, 1fr) auto;
  align-items: start;
  gap: 2.5rem;
  padding: 2rem;
}

.job-card + .job-card {
  border-top: 1px solid var(--blue-200);
}

.job-card__head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.job-card__meta {
  color: var(--navy-70);
}

.job-card__text {
  color: var(--navy-70);
}

/* Photos à côté du formulaire de candidature (12098:2901) : deux photos 512 × 200, 16 px d'écart */
.form-photos {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-photos .media {
  aspect-ratio: 512 / 200;
}

/* 15. Responsive ----------------------------------------------------------------------------------- */

/* ≤ 1439 px : l'accueil passe ses secteurs en 2 × 2 ; les cartes à 3 colonnes restent sur une rangée ;
   modules sur 2 colonnes (la dernière carte sur toute la largeur), technologies en 2 × 2 ; colonne des
   secteurs de la matrice resserrée, flèche des liens à la suite du dernier mot */
@media (max-width: 89.9375em) {
  .sectors--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sectors--3 .sector:nth-child(3)::before {
    display: block;
  }

  .sectors--3 .sector::after {
    content: none;
  }

  .sectors--3 .sector__text {
    min-height: 0;
  }

  .rd-cards--modules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rd-cards--modules > li,
  .rd-cards--modules > li:nth-child(n + 9) {
    grid-column: auto;
  }

  .rd-cards--modules > li:last-child {
    grid-column: 1 / -1;
  }

  .values--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .values--4 .value:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .values--4 .value:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .matrice__table thead th:first-child {
    width: 15rem;
  }

  .matrice__table th > .link-arrow {
    display: block;
    width: fit-content;
  }

  .matrice__table th > .link-arrow .ico-arrow {
    display: inline-block;
    margin-left: 0.25rem;
    vertical-align: 0.0625rem;
  }

  .realisation__body {
    padding: 1.5rem 1.5rem 1.75rem;
  }

  .realisation__figure dd {
    width: 8.5rem;
  }
}

/* ≤ 1199 px : cartes en une colonne (vignette de 375 px au plus), réalisations en cartes horizontales,
   cartes à liste sur 2 colonnes (rd.css), carte d'appel moins haute et sur toute la dernière rangée */
@media (max-width: 74.9375em) {
  .sectors--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .sectors--3 .sector {
    padding-block: 2rem;
  }

  .sectors--3 .sector + .sector::before {
    display: none;
  }

  .sectors--3 .sector + .sector {
    border-top: 1px solid var(--line);
  }

  .sectors--3 .sector__media {
    justify-self: start;
    width: min(100%, 23.4375rem);
  }

  .sectors--3 .sector__title {
    min-height: 0;
  }

  .rd-card--cta {
    padding-top: 3rem;
  }

  .rd-cards--listes .rd-card--cta:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .rd-cards--listes .link-arrow {
    display: block;
    width: fit-content;
  }

  .rd-cards--listes .link-arrow .ico-arrow {
    display: inline-block;
    margin-left: 0.25rem;
    vertical-align: 0.0625rem;
  }

  .matrice__table th,
  .matrice__table td {
    padding: 1.5rem;
  }

  .matrice__table thead th:first-child {
    width: 12.5rem;
  }

  .realisations {
    grid-template-columns: minmax(0, 1fr);
  }

  .realisation {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }

  .realisation__media {
    height: 100%;
    min-height: 13.75rem;
  }
}

/* ≤ 1023 px : une colonne (technologies, comparatif) ; la matrice garde une largeur lisible et défile,
   avec des ombres de défilement (bords masqués) */
@media (max-width: 63.9375em) {
  .values--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .values--4 .value:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }

  .comparatif {
    grid-template-columns: minmax(0, 1fr);
  }

  .matrice__table {
    min-width: 40rem;
  }

  .matrice {
    background:
      linear-gradient(90deg, var(--white) 30%, rgb(255 255 255 / 0)) left / 2.5rem 100% no-repeat local,
      linear-gradient(270deg, var(--white) 30%, rgb(255 255 255 / 0)) right / 2.5rem 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgb(9 36 74 / 0.12), transparent) left / 0.875rem 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgb(9 36 74 / 0.12), transparent) right / 0.875rem 100% no-repeat scroll,
      var(--white);
  }
}

/* ≤ 639 px : tout en une colonne, marges resserrées */
@media (max-width: 39.9375em) {
  .sectors--3 .sector__media {
    width: 100%;
  }

  .rd-cards--modules,
  .feature-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .rd-card--cta {
    padding-top: 2rem;
  }

  .key-figures {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .comparatif__col {
    padding: 1.5rem;
  }

  .matrice__table th,
  .matrice__table td {
    padding: 1.25rem;
  }

  .matrice__table thead th:first-child {
    width: 11rem;
  }

  .realisation {
    display: flex;
  }

  .realisation__media {
    height: auto;
    min-height: 0;
    aspect-ratio: 400 / 220;
  }

  .realisation__figure dd {
    width: 7.5rem;
    font-size: 1.375rem;
  }

  .tag {
    padding: 0.625rem 1rem;
  }
}

/* 16. Responsive des formulaires et des pages Contact et Carrières ------------------------------------------------------------------------------ */

/* ≤ 1439 px : postes ouverts resserrés */
@media (max-width: 89.9375em) {
  .job-card {
    grid-template-columns: 2.75rem minmax(0, 1fr) minmax(0, 1.2fr) auto;
    gap: 2rem;
  }
}

/* ≤ 1199 px : formulaire sur toute la largeur, colonne complémentaire dessous (photos côte à côte) ;
   cartes « Nos solutions » sur 2 colonnes (rd.css), hauteurs libres ; postes : intitulé et texte l'un sous l'autre */
@media (max-width: 74.9375em) {
  .form-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-layout__aside {
    max-width: 40rem;
  }

  .form-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .rd-cards--liens {
    grid-template-rows: none;
  }

  .job-card {
    grid-template-columns: 2.75rem minmax(0, 1fr) auto;
    column-gap: 1.5rem;
    row-gap: 1rem;
  }

  .job-card__text {
    grid-column: 2;
    grid-row: 2;
  }

  .job-card .link-arrow {
    grid-column: 3;
    grid-row: 1;
  }
}

/* ≤ 639 px : champs empilés, bouton et mention l'un sous l'autre, marges réduites */
@media (max-width: 39.9375em) {
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-photos {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-drop {
    padding: 1.25rem;
  }

  .form-success {
    padding: 2rem 1.5rem;
  }

  .job-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.5rem;
  }

  .job-card__text,
  .job-card .link-arrow {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Écrans tactiles : 16 px au moins dans les champs (sinon iOS agrandit la page au focus) */
@media (pointer: coarse) {
  .form-field__control {
    font-size: max(1rem, 16px);
  }
}
