/* =========================================================================
   Equinoxe Audit — feuille de style du site
   Couleurs, polices et proportions reprises du site WordPress d'origine.
   ========================================================================= */

/* Polices hébergées sur le site (aucun appel à Google Fonts) */
@font-face {
  font-family: "Comfortaa";
  src: url("../fonts/comfortaa-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Josefin Sans";
  src: url("../fonts/josefin-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --orange: #e36600;
  --orange-fonce: #c45800;
  --orange-vif: #ff8c00;
  --bleu: #243a80;
  --voile-bleu: rgb(55 71 131 / 0.75);
  --titre: #222;
  --texte: #666;
  --menu: #8a8a8a;
  --menu-actif: #333;
  --fond: #f8f8f8;
  --bordure: #e1e1e1;
  --erreur: #b3261e;
  --police-texte: "Comfortaa", Helvetica, Arial, sans-serif;
  --police-titre: "Josefin Sans", Helvetica, Arial, sans-serif;
  --largeur: 1310px;
  --marge: 50px;
  --ecart: clamp(24px, 5.5vw, 70px);
  --entete: 168px;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 130px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-top: var(--entete);
  font-family: var(--police-texte);
  font-size: 15px;
  line-height: 1.65;
  color: var(--texte);
  background: var(--fond);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--orange);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0 0 0.7em;
  font-family: var(--police-titre);
  font-weight: 600;
  line-height: 1.15;
  color: var(--titre);
}

h1 {
  font-size: clamp(26px, 3vw, 34px);
  text-transform: uppercase;
  text-align: center;
}

h2 {
  font-size: clamp(23px, 2.4vw, 28px);
  text-transform: uppercase;
}

h3,
.t3 {
  font-size: clamp(20px, 2vw, 23px);
  text-transform: none;
}

p {
  margin: 0 0 1em;
}

strong {
  font-weight: 700;
  color: var(--orange);
}

address {
  font-style: normal;
}

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

.lien-evitement {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--bleu);
  color: #fff;
}

.lien-evitement:focus {
  top: 16px;
}

/* ---------- En-tête ---------- */

.entete {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--bordure);
  transition: box-shadow 0.3s;
}

.entete.est-reduit {
  box-shadow: 0 2px 14px rgb(0 0 0 / 0.07);
}

.entete__barre {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 118px;
  transition: height 0.3s;
}

.entete.est-reduit .entete__barre {
  height: 62px;
}

.entete__logo img {
  width: auto;
  height: 118px;
  transition: height 0.3s;
}

.entete.est-reduit .entete__logo img {
  height: 54px;
}

.entete__burger {
  display: none;
}

.menu__liste {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu__lien {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 13px;
  line-height: 49px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--menu);
  transition: color 0.2s;
}

.menu__lien:hover,
.menu__lien[aria-current="page"] {
  color: var(--menu-actif);
  text-decoration: none;
}

.menu__icone {
  width: 11px;
  height: 11px;
}

/* ---------- Accueil : bandeau principal ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-height: clamp(460px, 55.6vw, 760px);
  padding: 48px 0;
  overflow: hidden;
  background: #374783 url("../img/accueil-hero.webp") center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--voile-bleu);
}

.hero > * {
  position: relative;
}

.hero__bandeau {
  display: flex;
  align-items: center;
  width: 51.25%;
  height: clamp(100px, 12vw, 153px);
  padding-left: 4.8%;
  background: #fff;
  animation: glisse 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__bandeau img {
  width: auto;
  height: 100%;
  animation: fondu 0.8s 0.5s both;
}

.hero .hero__titre {
  margin: clamp(28px, 4.5vw, 60px) 3.5% 0 0;
  font-family: var(--police-texte);
  font-size: clamp(25px, 2.8vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  text-align: right;
  text-transform: none;
  color: #fff;
  animation: monte 0.8s 0.8s both;
}

.hero__bouton {
  margin-top: clamp(28px, 4vw, 56px);
  padding: 31px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: #fff;
  background: var(--orange-vif);
  transition: background 0.2s;
  animation: glisse 0.8s 1.1s both;
}

.hero__bouton:hover {
  background: var(--orange);
  text-decoration: none;
}

@keyframes glisse {
  from {
    opacity: 0;
    transform: translateX(80px);
  }
}

@keyframes fondu {
  from {
    opacity: 0;
  }
}

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

/* ---------- Pages intérieures : bannière ---------- */

.banniere {
  width: 100%;
  min-height: 150px;
  max-height: 430px;
  object-fit: cover;
}

/* ---------- Mise en page ---------- */

.page {
  padding: 56px 0 96px;
}

.conteneur {
  width: 100%;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 var(--marge);
}

.section + .section {
  margin-top: 80px;
}

h1 + .section {
  margin-top: 40px;
}

.grille {
  display: grid;
  gap: var(--ecart);
}

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

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

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

.grille--haut {
  align-items: start;
}

.centre {
  text-align: center;
}

.prose h2,
.prose h3 {
  margin-top: 1.6em;
}

.texte-etroit {
  max-width: 820px;
}

.mentions h2 {
  margin-top: 2em;
  font-size: 17px;
}

/* Intertitre « Nos missions » placé sous une grille texte + image */
.section > h3 {
  margin-top: 56px;
}

.etiquette {
  margin: 0 0 0.3em;
  font-family: var(--police-texte);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--orange);
}

.liste-simple {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 2;
}

.bouton {
  display: inline-block;
  padding: 10px 18px;
  border: 0;
  border-radius: 3px;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  background: var(--orange);
  cursor: pointer;
  transition: background 0.2s;
}

.bouton:hover {
  background: var(--orange-fonce);
  text-decoration: none;
}

/* Image qui change au survol (balance orange → bleue) */
.fondu-image {
  position: relative;
}

.fondu-image img + img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s;
}

.fondu-image:hover img + img {
  opacity: 1;
}

/* Cartes des missions */
.cartes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.carte {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 23px;
  border-radius: 10px;
  text-align: center;
  background: #fff;
}

/* Frise des valeurs (page Notre cabinet) */
.frise {
  position: relative;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.frise::before {
  content: "";
  position: absolute;
  top: 45px;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--bordure);
}

.frise__icone {
  position: relative;
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  color: #fff;
  background: var(--bleu);
  box-shadow: 0 0 0 6px var(--fond), 0 0 0 7px var(--bordure);
}

.frise__icone svg {
  width: 34px;
  height: 34px;
}

.frise .frise__titre {
  margin: 26px 0 14px;
  font-size: 25px;
  text-transform: uppercase;
  color: var(--bleu);
}

.frise__texte {
  padding: 22px;
  border: 1px solid var(--bordure);
  border-radius: 3px;
  background: #fff;
}

.frise__texte p:last-child {
  margin-bottom: 0;
}

/* ---------- Formulaire de contact ---------- */

.formulaire {
  width: 100%;
  max-width: 548px;
  margin: 0 auto;
}

.champ {
  margin-bottom: 14px;
  text-align: center;
}

.champ label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.champ input,
.champ textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bordure);
  border-radius: 2px;
  font: inherit;
  font-size: 14px;
  color: var(--titre);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.champ textarea {
  min-height: 170px;
  resize: vertical;
}

.champ input:focus,
.champ textarea:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgb(36 58 128 / 0.15);
}

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

.champ__erreur {
  min-height: 1.2em;
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--erreur);
}

.piege {
  position: absolute;
  left: -9999px;
}

.formulaire__envoi {
  margin: 8px 0 0;
  text-align: center;
}

.formulaire__envoi .bouton {
  padding: 12px 30px;
}

.formulaire__message {
  margin: 18px 0 0;
  padding: 12px 16px;
  border-left: 3px solid var(--bleu);
  font-size: 14px;
  color: var(--bleu);
  background: #eef1f9;
}

.formulaire__message[data-type="erreur"] {
  border-color: var(--erreur);
  color: var(--erreur);
  background: #fbeceb;
}

.formulaire__mention {
  margin: 14px 0 0;
  font-size: 12px;
  text-align: center;
}

/* Coordonnées (page Contact) */
.coordonnees img {
  width: 300px;
  margin: 0 auto 18px;
}

.coordonnees address {
  margin-bottom: 24px;
  line-height: 1.8;
}

.plan img {
  width: 100%;
  border: 1px solid var(--bordure);
}

/* ---------- Pied de page ---------- */

.pied {
  /* marge basse : le bouton « haut de page » ne recouvre pas les derniers liens */
  padding: 48px 0 84px;
  border-top: 1px solid var(--bordure);
  font-size: 13px;
  line-height: 1.8;
  color: var(--bleu);
  background: #fff;
}

.pied a {
  color: var(--bleu);
}

.pied__grille {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.pied__logo {
  width: 220px;
  margin-bottom: 14px;
}

.pied__nav {
  text-align: right;
}

.pied .pied__titre {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--bleu);
}

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

.pied__nav li:not(:last-child) {
  text-transform: uppercase;
}

/* Bouton « haut de page » */
.haut-de-page {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 3px;
  color: #fff;
  background: rgb(0 0 0 / 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background 0.2s;
}

.haut-de-page.est-visible {
  opacity: 1;
  visibility: visible;
}

.haut-de-page:hover {
  background: var(--bleu);
}

.haut-de-page svg {
  width: 18px;
  height: 18px;
}

/* ---------- Apparition au défilement (seulement si le JavaScript est actif) ---------- */

.js .apparait {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js .apparait.est-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Tablette ---------- */

@media (max-width: 989px) {
  .grille--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .grille--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .frise {
    display: grid;
    gap: 40px;
  }

  .frise::before {
    display: none;
  }
}

@media (min-width: 990px) {
  .frise {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--ecart);
  }
}

/* ---------- Téléphone ---------- */

@media (max-width: 767px) {
  :root {
    --marge: 20px;
    --entete: 84px;
  }

  html {
    scroll-padding-top: 96px;
  }

  .entete__barre,
  .entete.est-reduit .entete__barre {
    justify-content: space-between;
    height: 84px;
    padding: 0 var(--marge);
  }

  .entete__logo img,
  .entete.est-reduit .entete__logo img {
    height: 62px;
  }

  .entete__burger {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    color: var(--menu-actif);
    background: none;
    cursor: pointer;
  }

  .entete__burger-traits,
  .entete__burger-traits::before,
  .entete__burger-traits::after {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: transform 0.25s, background 0.25s;
  }

  .entete__burger-traits {
    position: relative;
  }

  .entete__burger-traits::before,
  .entete__burger-traits::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .entete__burger-traits::before {
    top: -7px;
  }

  .entete__burger-traits::after {
    top: 7px;
  }

  .entete.menu-ouvert .entete__burger-traits {
    background: transparent;
  }

  .entete.menu-ouvert .entete__burger-traits::before {
    transform: translateY(7px) rotate(45deg);
  }

  .entete.menu-ouvert .entete__burger-traits::after {
    transform: translateY(-7px) rotate(-45deg);
  }

  .js .menu {
    display: none;
  }

  .js .entete.menu-ouvert .menu {
    display: block;
    max-height: calc(100vh - var(--entete));
    overflow-y: auto;
    border-top: 1px solid var(--bordure);
  }

  .menu__liste {
    flex-direction: column;
    padding: 8px 0 14px;
  }

  .menu__lien {
    justify-content: center;
    line-height: 46px;
    font-size: 14px;
  }

  .hero {
    align-items: center;
    min-height: 480px;
    text-align: center;
  }

  .hero__bandeau {
    justify-content: center;
    width: 100%;
    height: 112px;
    padding: 0 16px;
  }

  .hero__bandeau img {
    height: auto;
    max-height: 100%;
  }

  .hero .hero__titre {
    margin: 30px var(--marge) 0;
    text-align: center;
  }

  .hero__bouton {
    padding: 18px 26px;
  }

  .page {
    padding: 40px 0 64px;
  }

  .section + .section {
    margin-top: 56px;
  }

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

  .pied__nav {
    text-align: left;
  }

  .haut-de-page {
    right: 16px;
    bottom: 16px;
  }
}

/* ---------- Préférences d'animation ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .apparait {
    opacity: 1;
    transform: none;
  }
}
