/* ==========================================================================
   BFE – Composants réutilisables
   En-tête · boutons · surtitres · étiquettes · formulaire · pied de page
   ========================================================================== */

/* --- En-tête ------------------------------------------------------------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.entete.a-defile {
  border-bottom-color: var(--c-trait);
  box-shadow: 0 6px 24px rgba(14, 27, 51, .06);
}

.entete__barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--hauteur-entete);
}

.marque {
  display: inline-flex;
  flex-shrink: 0;
}

.marque img {
  width: auto;
  height: 58px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__liens {
  display: flex;
  gap: 1.75rem;
}

.nav__liens a {
  position: relative;
  padding: .4rem 0;
  font-size: .97rem;
  font-weight: 500;
  color: var(--c-encre);
  text-decoration: none;
}

.nav__liens a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--c-bleu);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.nav__liens a:hover::after,
.nav__liens a.est-actif::after {
  transform: scaleX(1);
}

.nav__liens a.est-actif {
  color: var(--c-bleu);
}

.nav-bouton {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--c-trait);
  border-radius: var(--rayon-s);
  background: #fff;
  cursor: pointer;
}

.nav-bouton span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--c-encre);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}

.entete.menu-ouvert .nav-bouton span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.entete.menu-ouvert .nav-bouton span:nth-child(2) { opacity: 0; }
.entete.menu-ouvert .nav-bouton span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-bouton {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1rem var(--gouttiere) 1.5rem;
    background: #fff;
    border-bottom: 1px solid var(--c-trait);
    box-shadow: 0 18px 30px rgba(14, 27, 51, .08);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }

  .entete.menu-ouvert .nav {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .nav__liens {
    flex-direction: column;
    gap: 0;
  }

  .nav__liens a {
    display: block;
    padding: .85rem 0;
    border-bottom: 1px solid var(--c-trait);
    font-size: 1.05rem;
  }

  .nav__liens a::after {
    display: none;
  }

  .marque img {
    height: 48px;
  }
}

/* --- Boutons ------------------------------------------------------------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 50px;
  padding: .8rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.bouton svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform .2s ease;
}

.bouton:hover svg {
  transform: translateX(3px);
}

.bouton--principal {
  background: var(--c-bleu);
  color: #fff;
  box-shadow: 0 6px 18px rgba(6, 82, 221, .28);
}

.bouton--principal:hover {
  background: var(--c-bleu-fonce);
  transform: translateY(-1px);
}

.bouton--jaune {
  background: var(--c-jaune);
  color: var(--c-encre);
  box-shadow: 0 6px 18px rgba(255, 195, 18, .3);
}

.bouton--jaune:hover {
  background: var(--c-jaune-fonce);
  transform: translateY(-1px);
}

.bouton--contour {
  border-color: var(--c-trait);
  background: #fff;
  color: var(--c-encre);
}

.bouton--contour:hover {
  border-color: var(--c-bleu);
  color: var(--c-bleu);
}

.bouton--petit {
  min-height: 42px;
  padding: .55rem 1.15rem;
  font-size: .95rem;
}

.bouton[disabled] {
  opacity: .7;
  cursor: progress;
  transform: none;
}

/* --- Surtitre : petit libellé au-dessus des titres ------------------------- */
/* Le liseré tricolore reprend les trois couleurs du logo. */

.surtitre {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-bleu);
}

.surtitre::before {
  content: "";
  width: 30px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c-jaune) 0 33%, var(--c-bleu) 33% 66%, var(--c-vert) 66%);
}

.surtitre--clair {
  color: var(--c-jaune);
}

/* --- En-tête de section ---------------------------------------------------- */

.section {
  padding-block: var(--espace-section);
}

.section--alt {
  background: var(--c-fond-alt);
}

.section__entete {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.75rem);
}

.section__entete--centre {
  margin-inline: auto;
  text-align: center;
}

.section__intro {
  font-size: 1.125rem;
  color: var(--c-discret);
}

/* --- Étiquettes ------------------------------------------------------------ */

.etiquettes {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.etiquette {
  padding: .25rem .7rem;
  border-radius: 999px;
  background: var(--c-fond-alt);
  font-size: .8rem;
  font-weight: 500;
  color: var(--c-texte);
}

/* --- Icônes ---------------------------------------------------------------- */

.icone {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Formulaire ------------------------------------------------------------ */

.formulaire__grille {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.25rem;
}

.champ {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.champ--large {
  grid-column: 1 / -1;
}

.champ label {
  font-size: .92rem;
  font-weight: 600;
  color: var(--c-encre);
}

.champ label .obligatoire {
  color: var(--c-bleu);
}

.champ input,
.champ select,
.champ textarea {
  width: 100%;
  padding: .8rem .95rem;
  border: 1.5px solid var(--c-trait);
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
  color: var(--c-encre);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.champ input::placeholder,
.champ textarea::placeholder {
  color: #9AA3B5;
}

.champ select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E1B33' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 18px;
}

.champ textarea {
  min-height: 140px;
  resize: vertical;
}

.champ input:hover,
.champ select:hover,
.champ textarea:hover {
  border-color: #C5CEDE;
}

.champ input:focus,
.champ select:focus,
.champ textarea:focus {
  outline: none;
  border-color: var(--c-bleu);
  box-shadow: 0 0 0 4px rgba(6, 82, 221, .14);
}

.champ [aria-invalid="true"] {
  border-color: var(--c-erreur);
}

.champ [aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgba(198, 40, 40, .14);
}

.champ__erreur {
  min-height: 0;
  font-size: .85rem;
  color: var(--c-erreur);
}

.champ__erreur:empty {
  display: none;
}

.case {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem;
  align-items: start;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--c-discret);
}

.case input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--c-bleu);
}

.case label {
  font-weight: 400;
  color: var(--c-discret);
}

/* Champ piège anti-robots : invisible pour les humains */
.champ-piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 600px) {
  .formulaire__grille {
    grid-template-columns: 1fr;
  }
}

/* --- Pied de page ------------------------------------------------------------ */

.pied {
  padding-top: 4rem;
  background: var(--c-fond-alt);
  border-top: 1px solid var(--c-trait);
  font-size: .95rem;
}

.pied__grille {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.pied__logo img {
  width: auto;
  height: 52px;
  margin-bottom: 1.25rem;
}

.pied__texte {
  max-width: 380px;
  color: var(--c-discret);
}

.pied__titre {
  margin-bottom: 1rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-encre);
}

.pied__liste li + li {
  margin-top: .55rem;
}

.pied__liste a {
  color: var(--c-texte);
  text-decoration: none;
}

.pied__liste a:hover {
  color: var(--c-bleu);
  text-decoration: underline;
}

.pied__bas {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--c-trait);
  font-size: .87rem;
  color: var(--c-discret);
}

.pied__bas p {
  margin: 0;
}

.pied__bas a {
  color: var(--c-discret);
}

.pied--simple {
  padding-top: 0;
}

.pied--simple .pied__bas {
  border-top: 0;
}

@media (max-width: 820px) {
  .pied__grille {
    grid-template-columns: 1fr 1fr;
  }

  .pied__presentation {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .pied__grille {
    grid-template-columns: 1fr;
  }
}
