/* ==========================================================================
   MMC Métiers du Bien-être — feuille de style unique
   Les couleurs et polices se règlent dans :root ci-dessous.
   ========================================================================== */

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

@font-face {
  font-family: "McLaren";
  src: url("/assets/fonts/mclaren-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bordeaux: #6d071a;
  --bordeaux-fonce: #4a0412;
  --creme: #fcf8ee;
  --sable: #f6eed2;
  --or: #caa628;
  --texte: #2d2422;
  --texte-doux: #5a5249;
  --blanc: #ffffff;

  --police-texte: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --police-titres: "McLaren", "Nunito", system-ui, sans-serif;

  --largeur: 72rem;
  --largeur-etroite: 48rem;
  --gouttiere: clamp(1rem, 4vw, 2rem);
  --espace-section: clamp(3rem, 8vw, 5rem);
  --rayon: 0.75rem;
  --ombre: 0 0.5rem 1.5rem rgb(74 4 18 / 0.1);
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--creme);
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 1.0625rem;
  line-height: 1.7;
}

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

h1,
h2,
h3 {
  font-family: var(--police-titres);
  font-weight: 400;
  color: var(--bordeaux);
  line-height: 1.3;
  margin: 0 0 1rem;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.3rem; }

p,
ul,
address {
  margin: 0 0 1rem;
}

address {
  font-style: normal;
}

a {
  color: var(--bordeaux);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--bordeaux-fonce);
  text-decoration-thickness: 2px;
}

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

main:focus {
  outline: none;
}

.visuellement-cache {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.lien-evitement {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--bordeaux);
  color: var(--blanc);
  border-radius: 0 0 var(--rayon) var(--rayon);
}

.lien-evitement:focus {
  top: 0;
  color: var(--blanc);
}

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

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

.conteneur--etroit {
  max-width: var(--largeur-etroite);
}

.section {
  padding-block: var(--espace-section);
}

.section--teintee {
  background: var(--sable);
}

.deux-colonnes {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 60rem) {
  .deux-colonnes {
    grid-template-columns: 1.2fr 1fr;
  }

  .deux-colonnes--inverse {
    grid-template-columns: 1fr 1.2fr;
  }

  .deux-colonnes--egales {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.texte {
  max-width: 65ch;
}

.photo {
  margin: 0;
}

.photo img,
.galerie img,
.illustration {
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}

.photo--petite {
  max-width: 22rem;
  justify-self: center;
}

.photo--large {
  margin-top: 2rem;
}

.illustration {
  margin-bottom: 1.25rem;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}

.galerie {
  display: grid;
  gap: 1rem;
}

/* ---------- En-tête et navigation ---------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--creme);
  border-bottom: 1px solid rgb(202 166 40 / 0.5);
}

.entete__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding-block: 0.6rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: auto;
  font-family: var(--police-titres);
  font-size: 1.15rem;
  line-height: 1.2;
  text-decoration: none;
}

.logo img {
  width: 48px;
}

.nav__liste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__liste a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--rayon);
  font-weight: 600;
  text-decoration: none;
}

.nav__liste a:hover {
  background: var(--sable);
}

.nav__liste a[aria-current] {
  background: var(--sable);
  box-shadow: inset 0 -3px 0 var(--or);
}

.nav__bouton {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 2px solid var(--bordeaux);
  border-radius: var(--rayon);
  background: transparent;
  color: var(--bordeaux);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav__icone,
.nav__icone::before,
.nav__icone::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav__icone {
  position: relative;
}

.nav__icone::before,
.nav__icone::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav__icone::before { top: -6px; }
.nav__icone::after { top: 6px; }

/* Mobile, avec JavaScript : menu repliable */
@media (max-width: 59.99rem) {
  .js .nav {
    order: 3;
  }

  .js .nav__liste {
    display: none;
  }

  .js .nav__bouton[aria-expanded="true"] + .nav__liste {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-block: 0.5rem;
  }

  .js .nav:has([aria-expanded="true"]) {
    width: 100%;
  }

  .entete__tel {
    order: 2;
  }
}

@media (min-width: 60rem) {
  .nav__bouton {
    display: none !important;
  }
}

/* ---------- Boutons ---------- */

.bouton {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--bordeaux);
  border-radius: 999px;
  background: var(--bordeaux);
  color: var(--blanc);
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.bouton:hover {
  background: var(--bordeaux-fonce);
  border-color: var(--bordeaux-fonce);
  color: var(--blanc);
}

.bouton--secondaire {
  background: transparent;
  color: var(--bordeaux);
}

.bouton--secondaire:hover {
  background: var(--bordeaux);
  color: var(--blanc);
}

.bouton--petit {
  padding: 0.45rem 1rem;
  font-size: 0.95rem;
}

/* ---------- Bandeau de titre ---------- */

.bandeau {
  position: relative;
  isolation: isolate;
  padding-block: clamp(3rem, 10vw, 6rem);
  overflow: hidden;
  background: var(--sable);
}

.bandeau__fond {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.bandeau picture {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.bandeau__texte {
  text-align: center;
}

.bandeau h1 {
  max-width: 22ch;
  margin-inline: auto;
}

.bandeau__intro {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1.2rem;
  font-weight: 600;
}

.fil-ariane ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.fil-ariane li + li::before {
  content: "›";
  margin-right: 0.35rem;
  color: var(--texte-doux);
}

/* ---------- Cartes de prestations ---------- */

.cartes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.carte {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  transition: transform 0.2s;
}

.carte:has(a:hover) {
  transform: translateY(-4px);
}

.carte img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.carte__corps {
  padding: 1.25rem;
}

.carte h3 a {
  text-decoration: none;
}

/* Toute la carte est cliquable, le lien reste le titre */
.carte h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.carte p {
  margin: 0;
  color: var(--texte-doux);
}

/* ---------- Divers ---------- */

.etiquette {
  display: inline-block;
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  background: var(--or);
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

.liste-puces {
  padding-left: 1.25rem;
}

.liste-puces li::marker {
  color: var(--or);
}

.zones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zones li {
  padding: 1rem 1.25rem;
  background: var(--blanc);
  border-left: 4px solid var(--or);
  border-radius: var(--rayon);
}

.note {
  margin-top: 2rem;
  color: var(--texte-doux);
}

.note--importante {
  color: var(--bordeaux);
  font-weight: 700;
}

.adresse {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

/* ---------- Tarifs ---------- */

.tarifs + .tarifs {
  margin-top: 3rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  overflow: hidden;
}

th,
td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--bordeaux);
  color: var(--blanc);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr + tr {
  border-top: 1px solid var(--sable);
}

tbody th {
  font-weight: 400;
}

td {
  white-space: nowrap;
}

td:last-child {
  font-weight: 700;
  color: var(--bordeaux);
  text-align: right;
}

thead th:last-child {
  text-align: right;
}

.unite {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--texte-doux);
}

/* Sur petit écran : chaque ligne devient un bloc lisible */
@media (max-width: 40rem) {
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tr {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 0.75rem 1rem;
  }

  tbody th {
    grid-column: 1 / -1;
    padding: 0 0 0.35rem;
  }

  td {
    padding: 0;
  }
}

/* ---------- Formulaire ---------- */

.formulaire {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.champ label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.champ input,
.champ select,
.champ textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--texte-doux);
  border-radius: 0.5rem;
  background: var(--blanc);
  color: var(--texte);
  font: inherit;
}

.champ input:focus-visible,
.champ select:focus-visible,
.champ textarea:focus-visible {
  border-color: var(--bordeaux);
}

.champ__aide {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--texte-doux);
}

.formulaire .bouton {
  justify-self: start;
}

/* ---------- Appel à l'action ---------- */

.appel {
  padding-block: var(--espace-section);
  background: var(--bordeaux);
  color: var(--blanc);
  text-align: center;
}

.appel h2 {
  color: var(--blanc);
}

.appel__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 0;
}

.appel .bouton {
  background: var(--blanc);
  border-color: var(--blanc);
  color: var(--bordeaux);
}

.appel .bouton:hover {
  background: var(--sable);
  border-color: var(--sable);
}

.appel .bouton--secondaire {
  background: transparent;
  color: var(--blanc);
}

.appel .bouton--secondaire:hover {
  background: var(--blanc);
  color: var(--bordeaux);
}

.appel :focus-visible {
  outline-color: var(--blanc);
}

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

.pied {
  padding-top: 3rem;
  background: var(--bordeaux-fonce);
  color: var(--sable);
}

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

.pied :focus-visible {
  outline-color: var(--blanc);
}

.pied__grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 2rem;
}

.pied__titre {
  font-family: var(--police-titres);
  font-size: 1.15rem;
  color: var(--blanc);
}

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

.pied ul li + li {
  margin-top: 0.35rem;
}

.pied__bas {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 2rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgb(246 238 210 / 0.25);
  font-size: 0.9rem;
}

.pied__bas p {
  margin: 0;
}

/* ---------- Préférences utilisateur ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
