@font-face {
  font-family: "DM Serif Display";
  src: url("assets/fonts/dm-serif-display-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("assets/fonts/open-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("assets/fonts/open-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("assets/fonts/open-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cyan: #36a9e1;
  --anthracite: #1d1d1b;
  --rouge-orange: #e8452b;
  --gris-clair: #f2f4f5;
  --texte-2: #3a3a38;
  --texte-3: #4a4a48;
  --bordure: #c9ced2;
  --erreur: #b3301a;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Open Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

[hidden] {
  display: none !important;
}

html {
  background: #fff;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  border-top: 6px solid var(--cyan);
  background: #fff;
  color: var(--anthracite);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
}

h1,
h2,
p {
  margin: 0;
}

/* Colonne et espacement des blocs */
.page {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 24px 56px;
}

/* Logos */
.logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Les logos gardent leur hauteur et rétrécissent seulement si la ligne manque de place */
.logo {
  display: block;
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  object-fit: contain;
}

.logo--proteein {
  height: 44px;
  object-position: left center;
}

.logo--usinerie {
  height: 50px;
  object-position: right center;
}

/* Titre */
.accent {
  display: block;
  width: 36px;
  height: 5px;
  margin-bottom: 16px;
  background: var(--rouge-orange);
}

h1 {
  color: var(--anthracite);
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.1;
}

.intro {
  color: var(--texte-2);
  font-size: 16px;
  line-height: 1.55;
}

/* Formulaire */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

/* La colonne atteint sa largeur maximale à 480 px : les téléphones restent en une colonne */
@media (min-width: 480px) {
  .name-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--anthracite);
  font-size: 14px;
  font-weight: 600;
}

.field input {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--bordure);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--anthracite);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.field input[aria-invalid="true"] {
  border-color: var(--erreur);
}

.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(54, 169, 225, 0.25);
}

.error {
  color: var(--erreur);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.error:not(:empty) {
  margin-top: 6px;
}

/* Champ piège : hors écran, ignoré au clavier et par les lecteurs d'écran */
.piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Consentement */
.consent__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.consent__row input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--cyan);
}

.consent__row label {
  flex: 1;
  min-width: 0;
  color: var(--texte-3);
  font-size: 13px;
  line-height: 1.5;
}

/* Icône de 22 px dans une zone de 44 px, recentrée sur la première ligne */
.info-button {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -12px -11px -12px -7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--cyan);
  cursor: pointer;
  touch-action: manipulation;
}

.info-button:focus-visible,
.submit__button:focus-visible,
.rgpd a:focus-visible {
  outline: 2px solid var(--anthracite);
  outline-offset: 2px;
}

.consent__row input:focus-visible {
  outline: 2px solid var(--anthracite);
  outline-offset: 2px;
}

/* Encadré RGPD */
.rgpd {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--gris-clair);
  color: var(--texte-2);
  font-size: 13px;
  line-height: 1.5;
}

.rgpd h2 {
  margin-bottom: 8px;
  color: var(--anthracite);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
}

.rgpd p + p {
  margin-top: 6px;
}

.rgpd strong {
  font-weight: 600;
}

.rgpd a {
  color: var(--anthracite);
  overflow-wrap: anywhere;
}

/* Bouton d'envoi */
.submit__button {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--cyan);
  color: #fff;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}

.submit__button:disabled {
  opacity: 0.7;
  cursor: default;
}

.error--form:not(:empty) {
  margin-top: 12px;
}

/* Le conteneur reste présent pour que aria-live annonce la confirmation */
#confirmation:empty {
  margin-top: -32px;
}

.confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.confirmation__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--cyan);
}

.confirmation__title {
  margin-bottom: 12px;
  outline: none;
}

.confirmation__text {
  color: var(--texte-2);
  font-size: 16px;
  line-height: 1.55;
}
