/* Emerald and sage theme: beige days and charcoal evenings. Sizes in rem so the font-size control scales everything. */
:root {
  --bg: #f1ebdf; --surface: #faf5eb; --fg: #252e28; --muted: #566153; --line: #cbd0bc;
  --accent: #146044; --on-accent: #ffffff; --accent-2: #526b48; --sage: #8eaa80; --danger: #9b2929; --card-bg: #d4dfc7; --card-highlight: #e8eedf; --bar: rgba(241, 235, 223, 0.95);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --echelle: 1;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #202322; --surface: #2a2e2b; --fg: #f2f3ed; --muted: #b4beb4; --line: #475249;
    --accent: #80ab8d; --on-accent: #202322; --accent-2: #a4b995; --sage: #98af89; --danger: #ffb4ab; --card-bg: #343d32; --card-highlight: #465240; --bar: rgba(32, 35, 34, 0.95);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #202322; --surface: #2a2e2b; --fg: #f2f3ed; --muted: #b4beb4; --line: #475249;
  --accent: #80ab8d; --on-accent: #202322; --accent-2: #a4b995; --sage: #98af89; --danger: #ffb4ab; --card-bg: #343d32; --card-highlight: #465240; --bar: rgba(32, 35, 34, 0.95);
  color-scheme: dark;
}
/* Font size: 18px base, then 125 % and 150 % */
:root[data-taille="grande"] { --echelle: 1.25; }
:root[data-taille="tres-grande"] { --echelle: 1.5; }
html { font-size: calc(112.5% * var(--echelle)); scroll-padding-top: 8rem; }

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); line-height: 1.6;
  overflow-wrap: break-word; padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}
a { color: var(--accent); text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button, .btn, .menu a, .tools a { min-height: 48px; min-width: 48px; font: inherit; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--bar); border-bottom: 1px solid var(--line); }
/* On phones the menu and tools take several lines: let them scroll away; the call bar stays */
@media (max-width: 899px) { .topbar { position: static; } html { scroll-padding-top: 1rem; } }
.topbar-in { max-width: 60rem; margin: 0 auto; padding: 0.25rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; }
.brand { font-weight: 700; color: var(--fg); text-decoration: none; display: inline-flex; align-items: center; min-height: 48px; margin-right: auto; }
.menu { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.menu a { text-decoration: none; display: inline-flex; align-items: center; padding: 0 0.75rem; border-radius: 0.5rem; color: var(--fg); }
.menu a[aria-current="page"] { background: linear-gradient(135deg, var(--card-highlight), var(--card-bg) 75%); font-weight: 700; text-decoration-color: var(--accent-2); text-decoration-thickness: 3px; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.tools a { display: inline-flex; align-items: center; justify-content: center; }
.switch { display: inline-flex; border: 1px solid var(--line); border-radius: 0.5rem; overflow: hidden; }
.switch button { background: var(--surface); color: var(--fg); border: 0; border-right: 1px solid var(--line); padding: 0 0.6rem; cursor: pointer; }
.switch button:last-child { border-right: 0; }
.switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.wave { display: block; width: 100%; height: 0.75rem; color: var(--line); }

/* Pages */
main { max-width: 60rem; margin: 0 auto; padding: 1rem; }
main:focus { outline: none; }
.page h1 { font-size: 1.9rem; line-height: 1.25; margin: 1rem 0 0.5rem; }
.page h2 { font-size: 1.4rem; margin: 2rem 0 0.5rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; padding: 0; list-style: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.25rem; }
.card h2, .card h3 { margin-top: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; white-space: pre-wrap; padding: 0.5rem 1.25rem; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; border: 2px solid var(--accent); }
.btn-alt { background: transparent; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0; }
.note { color: var(--muted); }
.error { border-left: 4px solid var(--accent-2); padding-left: 0.75rem; }

/* Call bar: always reachable on phones */
.callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: 0.5rem; justify-content: center;
  padding: 0.5rem 1rem calc(0.5rem + env(safe-area-inset-bottom, 0px)); background: var(--bar); border-top: 1px solid var(--line); }
.callbar .btn { flex: 1 1 0; max-width: 16rem; }
@media (min-width: 900px) { .callbar { display: none; } body { padding-bottom: 0; } }

.site-foot { max-width: 60rem; margin: 2rem auto 0; padding: 1rem; color: var(--muted); border-top: 1px solid var(--line); }

/* Prices */
.tarifs { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; background: var(--surface); border-radius: 1rem; overflow: hidden; }
.tarifs-titre { font-size: 1.3rem; margin: 1.5rem 0 0.5rem; }
.tarifs th, .tarifs td { text-align: left; vertical-align: top; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.tarifs thead th { font-size: 0.9rem; color: var(--muted); }
.tarifs tbody th { font-weight: 400; }
.tarifs td { font-weight: 700; text-align: right; }
.montant { white-space: nowrap; }  /* an amount never splits; the words around it may wrap */
.tarifs thead th:last-child { text-align: right; }
/* Phones: one row per line, the price under its name, so large text never scrolls sideways */
@media (max-width: 599px) {
  .tarifs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tarifs, .tarifs tbody, .tarifs tr, .tarifs th, .tarifs td { display: block; }
  .tarifs tbody th { border-bottom: 0; padding-bottom: 0.25rem; }
  .tarifs td { text-align: left; white-space: normal; padding-top: 0; }
}

/* Navigation feedback is shared by mouse and keyboard users. */
.menu a { transition: background-color 160ms ease, color 160ms ease, text-decoration-color 160ms ease; }
.menu a:hover, .menu a:focus-visible { text-decoration-line: underline; color: var(--fg); text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 0.3em; }
.language-item { border-left: 1px solid var(--line); margin-left: 0.25rem; padding-left: 0.25rem; }

/* A floating display panel slides to the edge, leaving its 48px handle reachable. */
.preferences {
  position: fixed; right: 0; top: 50%; z-index: 20;
  display: flex; align-items: flex-start; width: min(19rem, 100vw);
  transform: translateY(-50%); transition: transform 200ms ease;
  filter: drop-shadow(0 0.25rem 0.6rem rgba(0, 0, 0, 0.16));
}
.preferences.is-intro { transition-duration: 1400ms; }
.preferences.is-collapsed { transform: translate(calc(100% - 48px), -50%); }
.preferences-toggle {
  flex: 0 0 48px; width: 48px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 0.4rem 0; border: 1px solid var(--line);
  border-right: 0; border-radius: 0.75rem 0 0 0.75rem;
  background: var(--accent); color: var(--on-accent); cursor: pointer; font-weight: 700;
}
.preferences-arrow { line-height: 1; }
.is-collapsed .preferences-arrow { transform: rotate(180deg); }
.preferences .tools {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch;
  padding: 0.75rem; gap: 0.5rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 0 0 0 0.75rem;
  max-height: calc(100dvh - 9rem); overflow-y: auto;
}
.preference-label { margin: 0; font-weight: 700; }
.preferences .switch { display: flex; flex-wrap: wrap; flex-shrink: 0; }
.preferences .switch button { flex: 1 0 auto; max-width: 100%; padding: 0.25rem 0.45rem; }
.switch button:hover, .preferences-toggle:hover { box-shadow: inset 0 0 0 2px var(--accent-2); }
@media (prefers-reduced-motion: reduce) {
  .menu a, .preferences, .preferences.is-intro { transition: none; }
}
.topbar-in > nav { margin-left: auto; }

/* Contact labels and addresses wrap inside their buttons at large text sizes. */
.actions .btn { max-width: 100%; flex-wrap: wrap; column-gap: 0.3em; }
.actions .btn span { min-width: 0; overflow-wrap: anywhere; }
/* A cursor-led spotlight gives the contact actions a brighter, tactile response. */
:is(.btn[data-tel], .btn[data-sms], .btn-discover) {
  position: relative;
  transition: transform 180ms ease, box-shadow 220ms ease, border-color 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  :is(.btn[data-tel], .btn[data-sms], .btn-discover):hover {
    background-image: radial-gradient(circle 6rem at var(--cursor-x, 50%) var(--cursor-y, 50%),
      rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05) 45%, transparent 75%);
    border-color: color-mix(in srgb, var(--accent) 65%, var(--sage));
    box-shadow: 0 0.4rem 1rem color-mix(in srgb, var(--accent) 35%, transparent),
      0 0 1.4rem color-mix(in srgb, var(--accent) 25%, transparent),
      inset 0 0 0 1px color-mix(in srgb, var(--accent) 65%, transparent);
    transform: translateY(-3px) scale(1.025);
  }
}
:is(.btn[data-tel], .btn[data-sms], .btn-discover):focus-visible {
  box-shadow: 0 0 1rem color-mix(in srgb, var(--accent) 40%, transparent);
}
:is(.btn[data-tel], .btn[data-sms], .btn-discover):active { transform: scale(0.98); }
@media (prefers-reduced-motion: reduce) {
  :is(.btn[data-tel], .btn[data-sms], .btn-discover) { transition: none; }
  :is(.btn[data-tel], .btn[data-sms], .btn-discover):hover,
  :is(.btn[data-tel], .btn[data-sms], .btn-discover):active { transform: none; }
}
/* Sage service cards with a coloured rim and generous icon tiles. */
.card {
  position: relative; min-width: 0; padding: 1.5rem;
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 1.3rem;
  background: linear-gradient(135deg, var(--card-highlight), var(--card-bg) 75%);
  box-shadow: 0 0.5rem 1.4rem color-mix(in srgb, var(--fg) 7%, transparent);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 1.3rem; right: 1.3rem; height: 4px;
  border-radius: 0 0 6px 6px; background: linear-gradient(90deg, var(--sage) 25%, var(--accent));
}

.card-icon {
  display: inline-flex; padding: 0.65rem; margin-bottom: 1rem; border-radius: 0.85rem;
  color: var(--accent); background: color-mix(in srgb, var(--sage) 32%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--sage) 65%, var(--surface));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--surface) 70%, transparent);
}
.card-icon svg { width: 1.6rem; height: 1.6rem; }
.card h2, .card h3 { line-height: 1.25; }
.card > p:last-child { margin-bottom: 0; }
.card > ul { padding-left: 1.2rem; }
.card > ul li + li { margin-top: 0.45rem; }
.btn-discover {
  display: inline-flex; gap: 0.8rem; max-width: 100%; white-space: normal; text-align: center;
  border-radius: 0.85rem; padding: 0.7rem 1rem;
  background-color: var(--accent);
  background-image: linear-gradient(125deg, var(--accent), color-mix(in srgb, var(--accent) 85%, var(--sage)));
  box-shadow: 0 0.35rem 0.8rem color-mix(in srgb, var(--accent) 23%, transparent);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.btn-discover span { flex-shrink: 0; font-size: 1.25em; transition: transform 180ms ease; }
.card .btn-discover { display: flex; margin-top: 1rem; }
@media (hover: hover) and (pointer: fine) {
  .card:hover, .card:focus-within {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 0.8rem 1.8rem color-mix(in srgb, var(--accent) 18%, transparent);
  }
  .btn-discover:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.6rem 1.3rem color-mix(in srgb, var(--accent) 36%, transparent);
  }
  .btn-discover:hover span { transform: translate(2px, -2px); }
}
@media (prefers-reduced-motion: reduce) {
  .card, .btn-discover, .btn-discover span { transition: none; }
  .card:hover, .card:focus-within, .btn-discover:hover, .btn-discover:hover span { transform: none; }
}

.card a:not(.btn) { color: var(--fg); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* Give the main service choices room to read, then offer one clear next step. */
.services-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.services-cards .card > p { margin-top: 0; }
.services-cards .card > ul { margin-bottom: 0; }
.service-next { margin-top: 2rem; padding: 1.25rem 0; border-top: 2px solid var(--sage); }
.service-next h2 { margin-top: 0; }

/* Pricing leads with two clear rates; examples are available on demand. */
.price-cards .price-amount { font-size: 1.7rem; font-weight: 700; color: var(--fg); line-height: 1.3; margin: 0.6rem 0; }
.price-cards .price-amount .montant { font-size: 1.35em; }
.billing-details { margin: 1rem 0 2rem; padding: 0.35rem 1rem; border: 1px solid var(--line); border-radius: 0.8rem; background: var(--card-bg); }
.billing-details summary { min-height: 48px; padding: 0.5rem 0; cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em; }
.billing-details summary:hover { color: var(--accent); }

/* A readable, single-column booking form in the site's sage palette. */
.booking-panel { margin: 1.5rem 0 2rem; }
.booking-panel h2 { margin-top: 0; }
.booking-form { max-width: 36rem; }
.booking-form label { display: block; font-weight: 700; margin: 1rem 0 0.35rem; }
.booking-form input, .booking-form textarea, .booking-form select {
  display: block; width: 100%; min-width: 0; min-height: 48px;
  padding: 0.65rem 0.8rem; font: inherit; color: var(--fg);
  background: var(--surface); border: 1px solid var(--muted); border-radius: 0.6rem;
}
.booking-form textarea { resize: vertical; }
.booking-form .btn { cursor: pointer; }
.booking-form .btn:disabled { cursor: not-allowed; opacity: 0.65; transform: none; box-shadow: none; }
.booking-form .form-privacy { font-size: 0.9rem; margin-top: 1rem; }
.form-status { margin: 1rem 0 0; }
.form-status:empty { display: none; }

/* Field errors use text and a red border, independent of the browser language. */
.booking-form [aria-invalid="true"] { border: 2px solid var(--danger); }
.booking-form [aria-invalid="true"]:focus-visible { outline-color: var(--danger); }
.booking-form .field-error { color: var(--danger); font-weight: 600; margin: 0.35rem 0 0; }

/* Formspree silently filters submissions that fill this bot-only field. */
.form-honeypot { display: none !important; }

/* Keyboard, magnification and operating-system accessibility preferences. */
.visually-hidden { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0; }
.skip-link { position:fixed;top:.5rem;left:.5rem;z-index:1000;padding:.7rem 1rem;background:var(--bg);color:var(--fg);border:2px solid currentColor;transform:translateY(-200%); }
.skip-link:focus { transform:none; }
:focus-visible { outline:3px solid var(--accent);outline-offset:3px; }
a,button,input,select,textarea,summary,[tabindex] { scroll-margin-block:8rem; }
@media (prefers-reduced-motion:reduce) {
 html { scroll-behavior:auto!important; }
 *,*::before,*::after { animation:none!important;transition:none!important; }
}
@media (forced-colors:active) {
 :focus-visible { outline:3px solid Highlight; }
 button,input,select,textarea { border:1px solid ButtonText; }
 a { text-decoration:underline; }
}

.switch button:focus-visible,.theme-switch button:focus-visible { outline-offset:-4px; }

.menu .theme-toggle { display:inline-flex;align-items:center;justify-content:center;min-width:48px;min-height:48px;padding:.35rem;border:0;border-radius:.5rem;background:transparent;color:var(--fg);cursor:pointer; }
.menu .theme-toggle:hover { background:var(--card-bg); }
.theme-toggle svg { width:1.3rem;height:1.3rem; }
