/* ==========================================================================
   Cris’Horse & Care — feuille de style
   Deux ailes sous un même toit : côté soins (clair, vert d’eau) et côté
   écurie (bois sombre, cuir). Le fer à cheval relie les deux.
   Ordre : polices → jetons → base → composants → en-tête → sections → pages
   légales → pied de page → utilitaires → mouvement → impression.
   ========================================================================== */

/* ---------- Polices (auto-hébergées, sous-ensemble latin) ---------- */
@font-face {
  font-family: 'Amaranth';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/amaranth-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Amaranth';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/amaranth-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Gentium Plus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/gentium-plus-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Gentium Plus';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/gentium-plus-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Gentium Plus';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/gentium-plus-700.woff2') format('woff2');
}

/* ---------- Jetons ---------- */
:root {
  /* Papier et encre (texte courant : contraste ≥ 9:1) */
  --paper: #f6f0e4;
  --paper-2: #ece2cf;
  --paper-3: #e1d4bb;
  --ink: #231d17;
  --ink-soft: #4d4339;

  /* Aile soins : vert d’eau profond (6,9:1 sur le papier) */
  --care: #1d5b5e;
  --care-deep: #123c3e;
  --care-tint: #dcebe7;

  /* Aile écurie : bois sombre, cuir, foin */
  --stable: #2a1f18;
  --stable-2: #382a20;
  --stable-ink: #f3e6cf;
  --stable-soft: #d9c7a8;
  --saddle: #7c3a1d;
  --hay: #d8a446;

  /* Fer */
  --iron: #5d6165;
  --iron-light: #8b9094;

  /* Typographie */
  --font-display: 'Amaranth', 'Trebuchet MS', sans-serif;
  --font-text: 'Gentium Plus', Georgia, serif;
  --step--1: clamp(0.92rem, 0.89rem + 0.15vw, 1rem);
  --step-0: clamp(1.06rem, 1.02rem + 0.2vw, 1.16rem);
  --step-1: clamp(1.25rem, 1.17rem + 0.4vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.33rem + 0.8vw, 1.95rem);
  --step-3: clamp(1.85rem, 1.5rem + 1.6vw, 2.75rem);
  --step-4: clamp(2.2rem, 1.6rem + 2.8vw, 3.8rem);

  /* Espacements */
  --space-s: 0.875rem;
  --space-m: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  --space-l: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  --space-xl: clamp(3rem, 2.2rem + 3.4vw, 5.5rem);

  /* Formes */
  --radius: 10px;
  --radius-s: 6px;
  --shadow: 0 1px 0 rgb(35 29 23 / 0.08), 0 10px 28px -14px rgb(35 29 23 / 0.35);
  --wrap: 72rem;
  --header-h: 5.25rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 var(--space-s);
  text-wrap: balance;
}

h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

p, li, dd { text-wrap: pretty; }
p { margin: 0 0 var(--space-s); }

a { color: var(--care); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

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

[tabindex="-1"]:focus { outline: none; }

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  border-radius: var(--radius-s);
}
.skip-link:focus { top: 1rem; }

/* ---------- Composants ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.3rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

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

.btn-stable { background: var(--hay); color: var(--stable); }
.btn-stable:hover { background: #e8bb62; }


/* Le petit écriteau de rubrique, propre à chaque aile */
.sign {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 var(--space-s);
  padding: 0.3rem 0.85rem 0.3rem 0.45rem;
  border-radius: var(--radius-s);
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sign-nail {
  width: 0.55rem;
  height: 0.8rem;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.55;
}
.wing-care .sign { background: var(--care-tint); color: var(--care-deep); }
.wing-stable .sign { background: var(--stable-2); color: var(--hay); }

.lede { font-size: var(--step-1); line-height: 1.5; max-width: 44rem; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--paper-3);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  width: min(100% - 2rem, 84rem);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
}
.brand-mark { width: 2.5rem; height: 2.5rem; flex: none; }
.brand-name { display: flex; flex-direction: column; gap: 0.15rem; font-size: 1.3rem; white-space: nowrap; }
.brand-name span:last-child { font-size: 0.95rem; color: var(--care); padding-left: 0.9rem; }

.header-call { flex: none; }
.header-call-short { display: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  min-width: 48px;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.nav-toggle:hover { background: var(--paper-2); }
.nav-toggle svg { width: 1.4rem; height: 1.4rem; }

/* Le fer à cheval : sept trous de clou, trois pour les soins, la pince pour
   la maison, trois pour l’écurie. Sous 1240 px il devient un panneau. */
.shoe-nav { display: none; }

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

.shoe a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
}

.hole {
  flex: none;
  width: 0.7rem;
  height: 1.05rem;
  border-radius: 3px;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--ink);
  transition: background-color 0.2s, box-shadow 0.2s;
}
.shoe .is-care .hole { box-shadow: inset 0 0 0 2px var(--care); }
.shoe .is-stable .hole { box-shadow: inset 0 0 0 2px var(--saddle); }
.shoe a:hover .hole,
.shoe a[aria-current] .hole { background: var(--hay); box-shadow: 0 0 0 3px rgb(216 164 70 / 0.35); }
.shoe .is-care a { color: var(--care-deep); }
.shoe .is-stable a { color: var(--saddle); }

/* Panneau mobile : un grand fer ouvert vers le haut */
@media (max-width: 1239.98px) {
  .shoe-nav.is-open {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0;
    overflow-y: auto;
    padding: var(--space-m) 1.25rem var(--space-l);
    background: var(--paper);
    border-top: 1px solid var(--paper-3);
  }
  .shoe-branches {
    display: flex;
    justify-content: space-between;
    width: min(100%, 26rem);
    margin: 0 auto 0.5rem;
    font-family: var(--font-display);
    font-size: var(--step--1);
    font-weight: 700;
  }
  .shoe-branches span:first-child { color: var(--care); }
  .shoe-branches span:last-child { color: var(--saddle); }
  .shoe {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, auto) auto;
    row-gap: 0.85rem;
    width: min(100%, 26rem);
    margin-inline: auto;
    padding: 0.5rem 0 0.35rem;
  }
  .shoe::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1.25rem solid var(--iron);
    border-top: 0;
    border-radius: 0 0 48% 48% / 0 0 34% 34%;
    pointer-events: none;
  }
  .shoe li { position: relative; }
  .shoe li:nth-child(-n+3) { grid-column: 1; justify-self: start; }
  .shoe li:nth-child(4) { grid-column: 1 / -1; grid-row: 4; justify-self: center; }
  .shoe li:nth-child(5) { grid-column: 2; grid-row: 3; justify-self: end; }
  .shoe li:nth-child(6) { grid-column: 2; grid-row: 2; justify-self: end; }
  .shoe li:nth-child(7) { grid-column: 2; grid-row: 1; justify-self: end; }
  .shoe a { font-size: 1.15rem; }
  .shoe li:nth-child(-n+3) .hole { margin-left: 0.28rem; }
  .shoe li:nth-child(n+5) a { flex-direction: row-reverse; }
  .shoe li:nth-child(n+5) .hole { margin-right: 0.28rem; }
  .shoe li:nth-child(4) a { flex-direction: column-reverse; gap: 0.3rem; padding-bottom: 0.05rem; }
  .shoe .hole { background: var(--paper-2); box-shadow: inset 0 0 0 2px var(--ink); }
  .shoe-note {
    width: min(100%, 26rem);
    margin: var(--space-m) auto 0;
    color: var(--ink-soft);
    font-size: var(--step--1);
    text-align: center;
  }
}

@media (min-width: 1240px) {
  .nav-toggle { display: none; }
  .brand { margin-right: 0; }
  .shoe-nav { display: block; margin-inline: auto; }
  .shoe-branches,
  .shoe-note { display: none; }
  .shoe {
    position: relative;
    display: flex;
    padding-top: 0.35rem;
  }
  /* L’arc du fer : son trait passe par le centre de chaque trou */
  .shoe::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0.65rem;
    height: 1.55rem;
    border-top: 0.75rem solid var(--iron-light);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  }
  .shoe li { position: relative; width: 6.25rem; }
  .shoe a {
    flex-direction: column;
    gap: 0.3rem;
    font-size: 1rem;
  }
  .shoe li:nth-child(1),
  .shoe li:nth-child(7) { transform: translateY(1.2rem); }
  .shoe li:nth-child(2),
  .shoe li:nth-child(6) { transform: translateY(0.45rem); }
  .shoe li:nth-child(3),
  .shoe li:nth-child(5) { transform: translateY(0.1rem); }
}

@media (max-width: 599.98px) {
  .header-call-long { display: none; }
  .header-call-short { display: inline; }
}

@media (max-width: 419.98px) {
  .header-inner { gap: 0.5rem; width: calc(100% - 1.25rem); }
  .brand-mark { width: 2.1rem; height: 2.1rem; }
  .brand-name { font-size: 1.12rem; }
  .brand-name span:last-child { font-size: 0.85rem; }
  .nav-toggle { padding-inline: 0.7rem; }
  .nav-toggle-label { display: none; }
}

@media (max-width: 359.98px) {
  .header-call { padding-inline: 0.75rem; }
  .header-call-short { display: none; }
}

/* ---------- Héros : la porte d’écurie ---------- */
.hero {
  position: relative;
  padding: var(--space-l) 0 var(--space-xl);
  background:
    repeating-linear-gradient(180deg, transparent 0 46px, rgb(35 29 23 / 0.07) 46px 48px),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  overflow: hidden;
}

.hero-title {
  max-width: 62rem;
  margin: 0 auto var(--space-l);
  text-align: center;
}
.hero-title h1 {
  font-size: var(--step-4);
  margin-bottom: var(--space-s);
}
.hero-title h1 span { display: block; }
.hero-title h1 span:first-child { color: var(--care); }
.hero-title h1 span:last-child { color: var(--saddle); }
.hero-title p { font-size: var(--step-1); color: var(--ink-soft); margin-inline: auto; max-width: 40rem; }

.hero-stage {
  display: grid;
  grid-template-columns: 1fr minmax(17rem, 25rem) 1fr;
  align-items: center;
  gap: var(--space-m);
}

.hero-door { grid-column: 2; grid-row: 1; }
.hero-door svg { width: 100%; height: auto; }

.entrance {
  position: relative;
  padding: var(--space-m);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.entrance h2 { font-size: var(--step-2); }
.entrance p { margin-bottom: var(--space-m); }
.entrance-care { grid-column: 1; grid-row: 1; background: #fff; border-top: 6px solid var(--care); }
.entrance-care h2 { color: var(--care-deep); }
.entrance-stable { grid-column: 3; grid-row: 1; background: var(--stable); color: var(--stable-ink); border-top: 6px solid var(--hay); }
.entrance-stable h2 { color: var(--hay); }
.entrance-side {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 700;
}
.entrance-care .entrance-side { color: var(--care); }
.entrance-stable .entrance-side { color: var(--stable-soft); }

/* Oreille qui bouge, regard de la tête au-dessus de la porte */
.horse-ear { transform-origin: 290px 196px; animation: ear 6s ease-in-out infinite; }
@keyframes ear {
  0%, 82%, 100% { transform: rotate(0deg); }
  86% { transform: rotate(-9deg); }
  90% { transform: rotate(2deg); }
}

@media (max-width: 999.98px) {
  .hero-stage { grid-template-columns: 1fr 1fr; }
  .hero-door { grid-column: 1 / -1; width: min(100%, 24rem); margin-inline: auto; }
  .entrance-care { grid-column: 1; grid-row: 2; }
  .entrance-stable { grid-column: 2; grid-row: 2; }
}

@media (max-width: 639.98px) {
  .hero-stage { grid-template-columns: 1fr; }
  .entrance-care,
  .entrance-stable { grid-column: 1; grid-row: auto; }
}

/* ---------- Les ailes ---------- */
.wing-banner {
  padding: var(--space-m) 0;
  font-family: var(--font-display);
}
.wing-banner .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.wing-banner strong { font-size: var(--step-2); }
.wing-banner span { font-size: var(--step--1); }

.wing-care .wing-banner { background: var(--care); color: #fff; }
.wing-stable .wing-banner { background: var(--saddle); color: #fff; }
.wing-stable .wing-banner a { color: #fff; }

.wing-stable { background: var(--stable); color: var(--stable-ink); }
.wing-stable a { color: var(--hay); }

.section { padding: var(--space-xl) 0; }
.section + .section { padding-top: 0; }

.section-head { max-width: 46rem; margin-bottom: var(--space-l); }
.wing-care h2 { color: var(--care-deep); }
.wing-stable h2 { color: var(--stable-ink); }

/* ---------- Soins : la feuille de tournée ---------- */
.round {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: var(--space-l);
  align-items: start;
}

.round-sheet {
  position: relative;
  padding: var(--space-l) var(--space-m) var(--space-m);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* La pince du porte-bloc */
.round-sheet::before {
  content: '';
  position: absolute;
  top: -0.7rem;
  left: 50%;
  width: 7rem;
  height: 1.4rem;
  translate: -50% 0;
  border-radius: 6px 6px 3px 3px;
  background: var(--iron);
}
.round-sheet h3 {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--care);
  color: var(--care-deep);
}
.round-sheet h3 small { font-family: var(--font-text); font-size: var(--step--1); font-weight: 400; color: var(--ink-soft); }

.round-list { list-style: none; margin: 0; padding: 0; counter-reset: stop; }
.round-list li {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0.25rem 1rem;
  padding: var(--space-s) 0;
  border-bottom: 1px dashed var(--paper-3);
  counter-increment: stop;
}
.round-list li:last-child { border-bottom: 0; }
.round-list li::before {
  content: counter(stop);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--care-tint);
  color: var(--care-deep);
  font-family: var(--font-display);
  font-weight: 700;
}
.round-list strong { font-family: var(--font-display); font-size: var(--step-1); color: var(--ink); }
.round-list p { margin: 0; color: var(--ink-soft); }

.round-aside { display: grid; gap: var(--space-m); }
.panel {
  padding: var(--space-m);
  border-radius: var(--radius);
  border: 2px solid var(--care-tint);
  background: var(--paper);
}
.panel h3 { color: var(--care-deep); }
.panel ul { margin: 0; padding-left: 1.1rem; }
.panel dl { margin: 0; }
.panel dt { font-family: var(--font-display); font-weight: 700; }
.panel dd { margin: 0 0 0.6rem; }

.panel .towns { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0; }
.panel .towns li {
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-s);
  background: var(--care-tint);
  color: var(--care-deep);
  font-size: var(--step--1);
}

/* ---------- Prescription : étapes + carnet ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-m);
  list-style: none;
  margin: 0 0 var(--space-xl);
  padding: 0;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding-top: 3.4rem;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 2px solid var(--care);
  background: var(--paper);
  color: var(--care);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}
/* Le trait qui relie les étapes, comme le trajet d’une tournée */
.steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 1.3rem;
  left: 3.2rem;
  right: calc(var(--space-m) * -1 + 0.4rem);
  border-top: 2px dotted var(--care);
}
.steps h3 { color: var(--care-deep); }
.steps p { color: var(--ink-soft); margin: 0; }

.notebook {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: var(--space-l);
  align-items: start;
}
.notebook-pages {
  margin: 0;
  padding: var(--space-m) var(--space-m) var(--space-m) 3.2rem;
  background:
    linear-gradient(90deg, transparent 2.3rem, rgb(124 58 29 / 0.35) 2.3rem 2.45rem, transparent 2.45rem),
    repeating-linear-gradient(180deg, #fff 0 1.95rem, var(--care-tint) 1.95rem 2rem);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.notebook-pages dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  color: var(--care-deep);
  line-height: 1.3;
}
.notebook-pages dd { margin: 0.2rem 0 var(--space-m); }
.notebook-pages dd:last-child { margin-bottom: 0; }

.urgent {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: var(--space-m);
  border-radius: var(--radius);
  background: #fff;
  border-left: 6px solid #9c2a1e;
}
.urgent svg { width: 2rem; height: 2rem; flex: none; color: #9c2a1e; }
.urgent p { margin: 0; }
.urgent strong { font-family: var(--font-display); }

/* ---------- Rendez-vous soins ---------- */
.callback {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: var(--space-l);
  align-items: start;
}
.call-card {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  padding: var(--space-m);
  border-radius: var(--radius);
  background: var(--care);
  color: #fff;
}
.call-card h3 { color: #fff; }
.call-card a { color: #fff; }
.call-number {
  display: inline-block;
  margin: 0.3rem 0 var(--space-s);
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.call-card .btn { background: #fff; color: var(--care-deep); }
.call-card .btn:hover { background: var(--care-tint); }

/* ---------- Formulaires ---------- */
.form {
  display: grid;
  gap: var(--space-m);
  padding: var(--space-m);
  border-radius: var(--radius);
}
.wing-care .form { background: #fff; box-shadow: var(--shadow); }
.wing-stable .form { background: var(--stable-2); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-m); }
.field { display: grid; gap: 0.35rem; align-content: start; }
.field label,
.field legend {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.req { color: inherit; font-weight: 400; }
.hint { font-size: var(--step--1); margin: 0; }
.wing-care .hint { color: var(--ink-soft); }
.wing-stable .hint { color: var(--stable-soft); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--iron-light);
  border-radius: var(--radius-s);
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--care); }
.field [aria-invalid='true'] { border-color: #a3261a; }
.wing-stable .field [aria-invalid='true'] { border-color: #ff9d86; }

fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { position: relative; }
.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.95rem;
  border: 2px solid var(--iron-light);
  border-radius: 999px;
  font-size: var(--step--1);
  transition: background-color 0.2s, border-color 0.2s;
}
.wing-care .choice input:checked + span { background: var(--care); border-color: var(--care); color: #fff; }
.wing-stable .choice input:checked + span { background: var(--hay); border-color: var(--hay); color: var(--stable); }
.choice input:focus-visible + span { outline: 3px solid var(--hay); outline-offset: 2px; }
.choice input[aria-invalid='true'] + span { border-color: #a3261a; }
.wing-stable .choice input[aria-invalid='true'] + span { border-color: #ff9d86; }

.field-error { margin: 0; font-size: var(--step--1); font-weight: 700; }
.field-error:empty { display: none; }
.wing-care .field-error { color: #a3261a; }
.wing-stable .field-error { color: #ffb4a3; }

.no-health {
  display: flex;
  gap: 0.7rem;
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-s);
  background: var(--care-tint);
  color: var(--care-deep);
}
.no-health svg { width: 1.4rem; height: 1.4rem; flex: none; margin-top: 0.15rem; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s); }
.form-note { font-size: var(--step--1); margin: 0; }
.wing-care .form-note { color: var(--ink-soft); }
.wing-stable .form-note { color: var(--stable-soft); }

.form-status:empty { display: none; }
.form-status {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-s);
  font-size: var(--step--1);
}
.form-status.is-success { background: var(--care-tint); color: var(--care-deep); }
.form-status.is-error { background: #f8dcd6; color: #7a1d12; }
.wing-stable .form-status.is-success { background: var(--stable); color: var(--stable-ink); border: 1px solid var(--hay); }
.form-status a { color: inherit; }

/* ---------- La maison : la pince du fer ---------- */
.house {
  position: relative;
  padding: var(--space-xl) 0;
  background: var(--paper-2);
  border-block: 1px solid var(--paper-3);
}
.house-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--space-l);
  align-items: center;
}
.house h2 { color: var(--ink); }
.house .sign { background: var(--paper); color: var(--iron); }
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: var(--space-m);
  border-radius: var(--radius);
  background: var(--paper);
  border: 2px solid var(--paper-3);
}
.facts dt { font-family: var(--font-display); font-weight: 700; color: var(--ink-soft); }
.facts dd { margin: 0; }

.crossroads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-m);
  margin-top: var(--space-l);
}
.crossroad {
  display: block;
  padding: var(--space-m);
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-display);
  transition: transform 0.2s;
}
.crossroad:hover { transform: translateY(-2px); }
.crossroad strong { display: block; font-size: var(--step-1); }
.crossroad-care { background: var(--care); color: #fff; }
.crossroad-stable { background: var(--stable); color: var(--stable-ink); }
.crossroad-stable strong { color: var(--hay); }

/* ---------- Écurie : l’allée des box ---------- */
.aisle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-m);
  margin-bottom: var(--space-l);
}
.box-door {
  position: relative;
  padding: 4.2rem var(--space-m) var(--space-m);
  border-radius: var(--radius) var(--radius) var(--radius-s) var(--radius-s);
  background:
    repeating-linear-gradient(90deg, rgb(0 0 0 / 0.14) 0 2px, transparent 2px 3.2rem),
    #4a3526;
  border: 3px solid #5d4432;
}
/* Barreaux de la partie haute du box */
.box-door::before {
  content: '';
  position: absolute;
  top: 0.8rem;
  left: var(--space-m);
  right: var(--space-m);
  height: 2.4rem;
  border-radius: 4px;
  background: repeating-linear-gradient(90deg, var(--iron) 0 4px, transparent 4px 18px), #1b140f;
}
.plate {
  display: inline-block;
  margin-bottom: var(--space-s);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  background: linear-gradient(180deg, #e6c26f, #c9963e);
  color: var(--stable);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.2);
}
.box-door p { color: var(--stable-ink); }
.box-door ul { margin: 0; padding-left: 1.1rem; color: var(--stable-soft); }

.included {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-l);
  padding: var(--space-m);
  border: 2px dashed #6a5240;
  border-radius: var(--radius);
}
.included h3 { color: var(--hay); }
.included ul { margin: 0; padding-left: 1.1rem; }

/* ---------- Convalescence : la fiche de box ---------- */
.recovery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-l);
  align-items: start;
}
.stall-card {
  position: relative;
  padding: var(--space-l) var(--space-m) var(--space-m);
  border-radius: var(--radius-s);
  background: #f4ead5;
  color: var(--ink);
  rotate: -1deg;
  box-shadow: 0 14px 30px -12px rgb(0 0 0 / 0.6);
}
.stall-card::before {
  content: '';
  position: absolute;
  top: 0.6rem;
  left: 50%;
  width: 0.9rem;
  height: 0.9rem;
  translate: -50% 0;
  border-radius: 50%;
  background: var(--iron);
  box-shadow: inset -2px -2px 0 rgb(0 0 0 / 0.3);
}
.stall-card h3 { color: var(--saddle); border-bottom: 2px solid var(--saddle); padding-bottom: 0.4rem; }
.stall-card table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.stall-card th,
.stall-card td { padding: 0.5rem 0.4rem; text-align: left; vertical-align: top; border-bottom: 1px solid #d7c6a5; }
.stall-card th { font-family: var(--font-display); color: var(--saddle); white-space: nowrap; }
.stall-card p { margin: var(--space-s) 0 0; font-size: var(--step--1); color: var(--ink-soft); }

.work-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-m); }
.work-list li { padding-left: 1.4rem; border-left: 3px solid var(--hay); }
.work-list strong { display: block; font-family: var(--font-display); font-size: var(--step-1); color: var(--hay); }

.vet-note {
  margin-top: var(--space-l);
  padding: var(--space-m);
  border-radius: var(--radius);
  background: var(--stable-2);
  color: var(--stable-ink);
}
.vet-note strong { color: var(--hay); font-family: var(--font-display); }

/* ---------- Visite : l’ardoise + formulaire ---------- */
.visit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--space-l);
  align-items: start;
}
.slate {
  padding: var(--space-m);
  border: 0.75rem solid #6b4b33;
  border-radius: var(--radius-s);
  background: #1f2623;
  color: #eef0ea;
}
.slate h3 { font-size: var(--step-2); color: #eef0ea; }
.slate dl { margin: 0; }
.slate dt { font-family: var(--font-display); font-weight: 700; color: #f2d48f; margin-top: var(--space-s); }
.slate dd { margin: 0.15rem 0 0; color: #dfe3da; }
.slate a { color: #f2d48f; }

.back-to-care {
  margin-top: var(--space-l);
  padding: var(--space-s) var(--space-m);
  border-radius: var(--radius-s);
  background: var(--stable-2);
}
.back-to-care p { margin: 0; }

/* ---------- Pages légales ---------- */
.legal-hero {
  padding: var(--space-l) 0 var(--space-m);
  background: var(--paper-2);
  border-bottom: 1px solid var(--paper-3);
}
.legal-hero h1 { font-size: var(--step-4); }
.legal-hero p { color: var(--ink-soft); margin: 0; }

.legal {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: var(--space-l);
  padding: var(--space-l) 0 var(--space-xl);
}
.legal-toc { position: sticky; top: calc(var(--header-h) + 1rem); align-self: start; }
.legal-toc h2 { font-size: var(--step-1); }
.legal-toc ol { margin: 0; padding-left: 1.2rem; font-size: var(--step--1); }
.legal-toc li { margin-bottom: 0.3rem; }

.legal-body { max-width: 46rem; }
.legal-body h2 {
  font-size: var(--step-2);
  margin-top: var(--space-l);
  padding-top: var(--space-s);
  border-top: 2px solid var(--paper-3);
  color: var(--care-deep);
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { margin-top: var(--space-m); }
.legal-body ul,
.legal-body ol { padding-left: 1.3rem; }
.legal-body li { margin-bottom: 0.35rem; }
.legal-body address { font-style: normal; }
.legal-body .box {
  padding: var(--space-m);
  border-radius: var(--radius);
  background: #fff;
  border-left: 5px solid var(--care);
  margin-bottom: var(--space-m);
}
.legal-body .box-stable { border-left-color: var(--saddle); }

.legal-table { width: 100%; border-collapse: collapse; margin: var(--space-s) 0 var(--space-m); font-size: var(--step--1); }
.legal-table th,
.legal-table td { padding: 0.6rem 0.7rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--paper-3); }
.legal-table thead th { background: var(--paper-2); font-family: var(--font-display); }
.legal-table code { font-size: 0.95em; word-break: break-all; }

/* ---------- 404 ---------- */
.lost {
  padding: var(--space-xl) 0;
  text-align: center;
}
.lost svg { width: min(16rem, 70%); margin: 0 auto var(--space-m); }
.lost h1 { font-size: var(--step-4); }
.lost p { max-width: 34rem; margin-inline: auto; }
.lost-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-s); margin-top: var(--space-m); }

/* ---------- Pied de page : la plaque de laiton sur le mur ---------- */
.site-footer {
  padding: var(--space-l) 0 var(--space-m);
  background:
    repeating-linear-gradient(180deg, transparent 0 46px, rgb(0 0 0 / 0.18) 46px 48px),
    #3a2a1f;
  color: var(--stable-ink);
}
.footer-plate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-m) var(--space-l);
  align-items: center;
  padding: var(--space-m) var(--space-l);
  border-radius: var(--radius);
  background: linear-gradient(160deg, #e9c878, #c79540 70%, #b5832f);
  color: var(--stable);
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.25), 0 12px 24px -12px rgb(0 0 0 / 0.7);
}
.footer-plate svg { width: 4rem; height: 4rem; }
.footer-name { margin: 0; font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1.1; }
.footer-id { margin: 0.3rem 0 0; font-size: var(--step--1); }
.footer-plate a { color: var(--stable); }

.footer-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-m);
  margin-top: var(--space-l);
  font-size: var(--step--1);
}
.footer-lines h2 { font-size: var(--step-0); color: var(--hay); margin-bottom: 0.4rem; }
.footer-lines p { margin: 0 0 0.3rem; }
.footer-lines ul { list-style: none; margin: 0; padding: 0; }
.footer-legal ul { columns: 2; column-gap: var(--space-m); }
.footer-lines li { margin: 0; }
.footer-lines a,
.footer-lines button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--stable-ink);
}
.footer-lines button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.footer-lines a:hover,
.footer-lines button:hover { color: var(--hay); }
.footer-copy {
  margin: var(--space-m) 0 0;
  padding-top: var(--space-s);
  border-top: 1px solid rgb(243 230 207 / 0.2);
  font-size: var(--step--1);
  color: var(--stable-soft);
}

/* ---------- Bandeau et fenêtre cookies ---------- */
.consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  max-width: 40rem;
  margin-inline: auto;
  padding: var(--space-m);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  border-top: 6px solid var(--iron);
  box-shadow: 0 18px 40px -10px rgb(0 0 0 / 0.45);
}
.consent-title { font-size: var(--step-1); }
.consent-text { font-size: var(--step--1); }
.consent-text a { color: var(--care); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.consent-btn {
  min-height: 46px;
  padding: 0.55rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.consent-btn:hover { background: var(--stable-2); }
.consent-link {
  min-height: 46px;
  padding: 0.5rem 0.4rem;
  border: 0;
  background: none;
  color: var(--care-deep);
  font: inherit;
  font-size: 1rem;
  text-decoration: underline;
  cursor: pointer;
}
.consent-dialog {
  width: min(100% - 2rem, 36rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.consent-dialog::backdrop { background: rgb(35 29 23 / 0.6); }
.consent-dialog-inner { padding: var(--space-m); }
.consent-categories { list-style: none; margin: 0 0 var(--space-m); padding: 0; }
.consent-category { padding: var(--space-s) 0; border-bottom: 1px solid var(--paper-3); }
.consent-category p { margin: 0.3rem 0 0; font-size: var(--step--1); color: var(--ink-soft); }
.consent-category-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.consent-category h3 { margin: 0; font-size: var(--step-0); }
.consent-always { font-size: var(--step--1); color: var(--care-deep); font-weight: 700; }
.consent-switch { position: relative; display: inline-flex; width: 3.4rem; height: 2.75rem; align-items: center; cursor: pointer; }
.consent-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.consent-switch-track {
  position: relative;
  width: 3.2rem;
  height: 1.8rem;
  border-radius: 999px;
  background: var(--iron);
  transition: background-color 0.2s;
}
.consent-switch-track::after {
  content: '';
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #fff;
  transition: translate 0.2s;
}
.consent-switch input:checked + .consent-switch-track { background: var(--care); }
.consent-switch input:checked + .consent-switch-track::after { translate: 1.4rem 0; }
.consent-switch input:focus-visible + .consent-switch-track { outline: 3px solid var(--hay); outline-offset: 2px; }

/* ---------- Mise en page étroite ---------- */
@media (max-width: 999.98px) {
  .round,
  .notebook,
  .callback,
  .house-grid,
  .recovery,
  .visit { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(2)::after { display: none; }
  .aisle { grid-template-columns: 1fr; }
  .legal { grid-template-columns: 1fr; }
  .legal-toc,
  .call-card { position: static; }
  .footer-lines { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 639.98px) {
  .steps { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
  .form-row,
  .included,
  .crossroads { grid-template-columns: 1fr; }
  .footer-plate { grid-template-columns: 1fr; padding: var(--space-m); }
  .footer-lines { grid-template-columns: 1fr; }
  .stall-card { rotate: 0deg; }
  .round-sheet h3 { flex-direction: column; gap: 0.2rem; }
  /* Les tableaux s’empilent en blocs libellé / valeur */
  .legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table td,
  .stall-card table,
  .stall-card tbody,
  .stall-card tr,
  .stall-card th,
  .stall-card td { display: block; width: 100%; }
  .legal-table tr { padding: 0.5rem 0; border-bottom: 2px solid var(--paper-3); }
  .legal-table td { border: 0; padding: 0.2rem 0; }
  .legal-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink-soft);
  }
  .stall-card th { border-bottom: 0; padding-bottom: 0; }
}

/* ---------- Apparition au défilement ---------- */
.reveal { opacity: 0; translate: 0 18px; transition: opacity 0.6s ease, translate 0.6s ease; }
.reveal.is-in { opacity: 1; translate: 0 0; }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; translate: none !important; }
}

/* ---------- Impression ---------- */
@media print {
  .site-header,
  .consent,
  .consent-dialog,
  .form,
  .site-footer button { display: none; }
  body { background: #fff; }
  .wing-stable,
  .site-footer { background: #fff; color: #000; }
}
