/* ==========================================================================
   MBH – Movement by Heart
   Feuille de style unique. Approche mobile-first.
   Polices : Fraunces (titres), Jost (texte).
   ========================================================================== */

/* ---------- 1. Variables (design tokens) ---------- */
:root {
  --green: #38453f;
  --green-deep: #2b352f;
  --caramel: #c0966a;
  --caramel-ink: #8a6338;   /* caramel assombri pour le texte (contraste AA) */
  --cream: #f7f1e6;
  --sand: #f1dcb4;
  --ink: #26302b;
  --soft: #586259;
  --line: #e4d9c6;
  --white: #fff;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 40px);
  --section-space: clamp(64px, 9vw, 120px);
  --radius: 4px;
  --focus: #8a6338;
  --header-h: 72px;

  color-scheme: light;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--green);
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.5rem, 7.2vw, 4.75rem); line-height: 1.04; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.875rem); line-height: 1.1; }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.25; font-weight: 600; }

p { margin: 0 0 1rem; max-width: 62ch; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

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

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--green);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- 3. Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: 500 1rem/1.2 var(--font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--sm { min-height: 44px; padding: 0 1.1rem; font-size: .95rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-deep); }

.btn--secondary { border-color: var(--green); color: var(--green); background: transparent; }
.btn--secondary:hover { background: var(--green); color: #fff; }

/* Boutons sur fond vert */
.btn--light { background: var(--sand); color: var(--green-deep); }
.btn--light:hover { background: #fff; }
.btn--outline-light { border-color: rgba(255, 255, 255, .7); color: #fff; background: transparent; }
.btn--outline-light:hover { background: #fff; color: var(--green-deep); }

/* Lien d'action discret (services) */
.link-cta {
  display: inline-block;
  padding: 10px 0;
  color: var(--caramel-ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.link-cta:hover { color: var(--green); }

/* ---------- 4. En-tête et navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  min-height: var(--header-h);
  padding-block: 8px;
}
.brand { display: block; line-height: 0; }
.brand img { height: 48px; width: auto; }

/* Sans JavaScript : liens visibles sous le logo, sur plusieurs lignes si besoin */
.primary-nav { flex-basis: 100%; }
.primary-nav ul { display: flex; flex-wrap: wrap; gap: 0 20px; }
.primary-nav li a {
  display: inline-block;
  padding: 10px 0;
  text-decoration: none;
  font-weight: 500;
}
.primary-nav li a:hover { color: var(--caramel-ink); text-decoration: underline; text-underline-offset: 6px; }
.primary-nav .btn { margin: 8px 0 12px; }

.menu-toggle { display: none; }

/* Avec JavaScript : menu repliable sur mobile et tablette */
.js .menu-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: transparent;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  color: var(--green);
  font: 500 1rem/1 var(--font-body);
  cursor: pointer;
}
.js .primary-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 8px var(--gutter) 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(38, 48, 43, .08);
}
.js .primary-nav.is-open { display: block; }
.js .primary-nav ul { display: block; }
.js .primary-nav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.js .primary-nav .btn { width: 100%; margin: 16px 0 0; }

@media (min-width: 960px) {
  .header-inner { flex-wrap: nowrap; }
  .primary-nav,
  .js .primary-nav {
    display: flex;
    position: static;
    flex-basis: auto;
    align-items: center;
    gap: 28px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .primary-nav ul,
  .js .primary-nav ul { display: flex; gap: 28px; }
  .primary-nav li a,
  .js .primary-nav li a { display: inline-block; padding: 8px 0; border: 0; font-size: .98rem; }
  .primary-nav .btn,
  .js .primary-nav .btn { width: auto; margin: 0; }
  .js .menu-toggle { display: none; }
}

/* ---------- 5. Sections ---------- */
.section { padding-block: var(--section-space); }
.section--cream { background: var(--cream); }
.section--dark { background: var(--green); color: #fff; --focus: var(--sand); }
.section--dark h2 { color: #fff; }

.section-head { max-width: 44rem; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { margin-bottom: 1rem; }
.lead { font-size: clamp(1.08rem, 1.8vw, 1.25rem); color: var(--soft); max-width: 40em; margin-bottom: 0; }
.section--dark .lead { color: #e9e1d2; }

.label {
  margin: 0 0 6px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--caramel-ink);
}

.plain-list li { position: relative; padding: 4px 0 4px 18px; }
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05em;
  width: 8px;
  height: 2px;
  background: var(--caramel);
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 10vw, 136px) clamp(56px, 9vw, 120px);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { max-width: 15ch; }
.hero-lead {
  max-width: 34em;
  margin-top: 1.5rem;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  color: var(--soft);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.25rem; }
.hero-actions .btn { flex: 1 1 220px; max-width: 320px; }
.hero-for {
  max-width: 46ch;
  margin: 2.75rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: .98rem;
  color: var(--soft);
}
.hero-mark { display: none; }

@media (min-width: 900px) {
  .hero-actions .btn { flex: 0 0 auto; }
  .hero-mark {
    display: block;
    position: absolute;
    z-index: 0;
    right: -3%;
    top: 50%;
    width: min(44vw, 500px);
    transform: translateY(-50%);
    opacity: .9;
  }
}

/* ---------- 7. Piliers ---------- */
.pillars { display: grid; gap: 40px; }
.pillar { padding-top: 22px; border-top: 2px solid var(--green); }
.pillar h3 { margin-bottom: .75rem; }
.pillar p { color: var(--soft); }
.pillar .plain-list { margin-top: 1.25rem; }
@media (min-width: 840px) {
  .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
}

/* ---------- 8. Services ---------- */
.flagship {
  display: grid;
  gap: 32px;
  padding: clamp(28px, 5vw, 56px);
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  --focus: var(--sand);
}
.flagship h3 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 1rem; }
.flagship-situation { color: #e9e1d2; }
.flagship-gain { color: #fff; }
.flagship .btn { margin-top: .75rem; }
.flagship .label { color: var(--sand); }
.two-col-list { display: grid; gap: 0 28px; }
.two-col-list li { padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .22); }
@media (min-width: 560px) {
  .two-col-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .flagship { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
}

.offers { margin-top: clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.offer {
  display: grid;
  gap: 20px 40px;
  padding-block: 32px;
  border-top: 1px solid var(--line);
}
.offer h3 { margin-bottom: .25rem; }
.offer p:last-child { margin-bottom: 0; }
.offer p { color: var(--soft); }
.offer .label { color: var(--caramel-ink); }
@media (min-width: 640px) {
  .offer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offer-title { grid-column: 1 / -1; }
}
@media (min-width: 1040px) {
  .offer { grid-template-columns: 1.1fr 1fr 1fr 1.1fr; }
  .offer-title { grid-column: auto; }
}

/* ---------- 9. Méthode ---------- */
.steps { display: grid; gap: 0; counter-reset: step; }
.steps li {
  position: relative;
  counter-increment: step;
  margin-left: 16px;
  padding: 0 0 32px 36px;
  border-left: 2px solid var(--caramel);
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: -2px;
  top: -4px;
  transform: translateX(-50%);
  min-width: 32px;
  padding: 2px 0;
  background: var(--cream);
  color: var(--caramel-ink);
  font: 600 1.6rem/1 var(--font-display);
  text-align: center;
}
.steps h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.steps p { color: var(--soft); margin-bottom: 0; }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; }
  .steps li {
    margin: 0;
    padding: 22px 0 0;
    border-left: 0;
    border-top: 2px solid var(--green);
  }
  .steps li:last-child { padding-bottom: 0; }
  .steps li::before {
    position: static;
    transform: none;
    display: block;
    min-width: 0;
    margin-bottom: 14px;
    padding: 0;
    background: none;
    font-size: 2.2rem;
    text-align: left;
  }
}

/* ---------- 10. Références ---------- */
.logos { display: flex; flex-wrap: wrap; gap: 28px 36px; }
.logos li { width: 104px; text-align: center; }
.logos img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
}
.logos span { display: block; margin-top: 10px; font-size: .95rem; color: var(--soft); }

.reference-feature {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.reference-feature img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.reference-feature h3 { margin-bottom: 2px; }
.reference-feature p:last-child { margin-bottom: 0; color: var(--soft); }
@media (min-width: 640px) {
  .reference-feature { grid-template-columns: 120px 1fr; gap: 32px; }
  .reference-feature img { width: 120px; height: 120px; }
}

/* ---------- 11. À propos ---------- */
.about { display: grid; gap: 28px; align-items: start; }
.about-photo { width: 180px; height: 180px; object-fit: cover; border-radius: var(--radius); }
.about-text h3 { font-size: 1.5rem; }
.role { margin: .25rem 0 1.25rem; color: var(--caramel-ink); font-weight: 500; }
@media (min-width: 720px) {
  .about { grid-template-columns: 240px 1fr; gap: 56px; }
  .about-photo { width: 240px; height: 240px; }
}

/* ---------- 12. Contact ---------- */
.contact-grid { display: grid; gap: 48px; }
.contact-intro h2 { margin-bottom: 1rem; }
.contact-phone { margin: 2rem 0 1.25rem; }
.contact-phone a {
  font: 600 clamp(1.9rem, 6vw, 2.6rem)/1.1 var(--font-display);
  color: var(--sand);
  text-decoration: none;
}
.contact-phone a:hover { text-decoration: underline; text-underline-offset: 6px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-actions .btn { flex: 1 1 200px; }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.form label { font-size: .95rem; font-weight: 500; color: var(--sand); }
.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: 400 1rem/1.4 var(--font-body);  /* 16 px : évite le zoom automatique sur iPhone */
}
.form textarea { min-height: 130px; resize: vertical; }
.form input[aria-invalid="true"],
.form textarea[aria-invalid="true"] { border-color: #ffb89a; }
.field-error { margin: 0; font-size: .92rem; color: #ffd9c6; }
.form-note { margin: 0; font-size: .88rem; color: #e0d8c8; }
.form-status { margin: 0; min-height: 1.4em; font-weight: 500; color: var(--sand); }
.nojs-note { display: none; margin: 0; color: #e9e1d2; }
.no-js .form { display: none; }
.no-js .nojs-note { display: block; }

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
}

/* ---------- 13. Pied de page ---------- */
.site-footer {
  background: var(--green-deep);
  color: #e9e1d2;
  padding-block: 40px;
  font-size: .95rem;
  --focus: var(--sand);
}
.footer-inner { display: grid; gap: 20px; }
.footer-inner p { margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-footer a { display: inline-block; padding: 8px 0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
@media (min-width: 900px) {
  .footer-inner { grid-template-columns: 1fr auto auto; align-items: center; gap: 40px; }
}
@media (max-width: 719px) {
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- 14. Bouton WhatsApp flottant ---------- */
.wa-float {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 56px;
  height: 56px;
  padding: 0 16px;
  background: #0b6b57;           /* vert WhatsApp foncé : texte blanc lisible */
  color: #fff;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  transition: opacity .2s, visibility .2s;
}
.wa-float:hover { background: #09594a; }
.wa-float svg { width: 26px; height: 26px; fill: #fff; flex: none; }
.wa-float span { display: none; }
.wa-float.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
@media (min-width: 720px) {
  .wa-float span { display: inline; }
  .wa-float { padding: 0 22px 0 18px; }
}
