/* Design system du site — décalque de SuiviCanin/Core/Theme.swift.
   Fond crème, cartes blanches moelleuses, accent corail, typo arrondie sur les
   titres et les grands chiffres, teintes par domaine. Aucune police externe :
   la pile système suffit et garde les Core Web Vitals au vert. */

:root {
  --accent: #ee7e4a;
  --accent-deep: #d95c3d;
  --accent-soft: #fdf0e8;
  --health: #3b82f6;
  --weight: #6366f1;
  --training: #8b5cf6;
  --walks: #10b981;

  --bg: #faf7f1;
  --bg-elevated: #fffdf9;
  --card: #ffffff;
  --ink: #2b2622;
  --ink-soft: #5c5349;
  --muted: #837868;
  --line: #eae2d6;

  --ok: #12855f;
  --warn: #b4690e;
  --danger: #c0392b;
  --info: #2563eb;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 4px 14px rgba(60, 40, 20, 0.07);
  --shadow-lg: 0 18px 40px rgba(60, 40, 20, 0.12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", Avenir, var(--font);

  --wrap: 1120px;
  --gap: clamp(1rem, 3vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15130f;
    --bg-elevated: #1c1915;
    --card: #221e19;
    --ink: #f4efe7;
    --ink-soft: #cfc6b8;
    --muted: #9d9384;
    --line: #332e27;
    --accent-soft: #33241b;
    --ok: #34d399;
    --warn: #fbbf24;
    --danger: #f87171;
    --info: #60a5fa;
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-round);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-deep); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

@media (prefers-color-scheme: dark) {
  a { color: var(--accent); }
}

/* `height: auto` est indispensable, pas cosmétique : sans lui, l'attribut HTML
   `height` d'une image (posé pour réserver la place et éviter les décalages)
   s'applique comme hauteur réelle dès qu'une largeur CSS la contraint — et la
   capture est étirée verticalement. C'est exactement ce qui a défiguré le
   visuel du héros. À ne jamais retirer. */
img, svg { max-width: 100%; height: auto; }
strong { font-weight: 650; }

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

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }
.lede { font-size: clamp(1.06rem, 2vw, 1.24rem); color: var(--ink-soft); max-width: 62ch; }
.center .lede { margin-inline: auto; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  padding: 0.75rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}
.logo-mark { flex: none; border-radius: 30%; }

.site-nav {
  display: flex;
  gap: 1.35rem;
  margin-left: auto;
  font-size: 0.95rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  padding: 0.6rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.nav-toggle span + span { margin-top: 5px; }

.mobile-menu {
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
}
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu a {
  padding: 0.9rem min(2.5vw, 1.25rem);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 940px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: block; }
}

/* En sombre, 88 % d'opacité laissait remonter le crème de la capture qui
   défile dessous : l'en-tête virait au brun au scroll. */
@media (prefers-color-scheme: dark) {
  .site-header { background: color-mix(in srgb, var(--bg) 94%, transparent); }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-round);
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-icon { width: 19px; height: 19px; fill: currentColor; flex: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 6px 18px rgba(217, 92, 61, 0.28);
}
.btn-primary:hover { color: #fff; box-shadow: 0 10px 26px rgba(217, 92, 61, 0.36); }

.btn-secondary {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.btn-secondary:hover { color: var(--ink); border-color: var(--accent); }

.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.9rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.center .actions { justify-content: center; }

/* ---------- Sections & cartes ---------- */

section { padding-block: clamp(2.75rem, 7vw, 5rem); }
section.tight { padding-block: clamp(1.75rem, 4vw, 3rem); }
.section-head { max-width: 66ch; margin-bottom: 2rem; }
.center .section-head { margin-inline: auto; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.grid { display: grid; gap: 1.15rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--tint, var(--accent)), color-mix(in srgb, var(--tint, var(--accent)) 72%, #000));
}
.feature-icon svg { width: 22px; height: 22px; fill: currentColor; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

@media (prefers-color-scheme: dark) {
  .eyebrow { color: var(--accent); }
}

/* ---------- Héros ---------- */

.hero {
  padding-block: clamp(2rem, 5vw, 3.25rem) clamp(2rem, 5vw, 3.5rem);
  /* `clip` et non `hidden` : `hidden` créerait un conteneur de défilement qui
     casserait le `position: sticky` de l'en-tête. Filet de sécurité si la
     grappe déborde à une largeur intermédiaire. */
  overflow-x: clip;
}
.hero-grid {
  display: grid;
  /* minmax(0, …) : sans lui, la largeur mini de la pile de téléphones ferait
     gonfler la colonne de droite et étranglerait le texte. */
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
/* Le titre du héros reste plus sage que le h1 générique : la colonne est
   étroite et une accroche sur six lignes noierait la promesse. */
.hero h1 { margin-bottom: 0.6rem; font-size: clamp(1.95rem, 3.6vw, 2.75rem); }
/* Grille et non flex : en flex, le troisième repère retombait seul sur une
   deuxième ligne avec 430 px de vide à sa droite. */
.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem 1.4rem;
  margin-top: 1.75rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 420px) {
  .hero-proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.hero-proof b { display: block; color: var(--ink); font-family: var(--font-round); font-size: 1.15rem; }

/* ---------- Appareil ----------

   Géométrie réelle de l'iPhone 17 Pro : écran de 402 × 874 pt, rayon des coins
   d'écran ≈ 55 pt, soit 13,7 % de la largeur. Tout se dérive de `--screen`,
   l'unique variable : les captures gardent donc les bonnes proportions à
   n'importe quelle taille.

   Le châssis est fait d'anneaux de `box-shadow` plutôt que d'éléments
   imbriqués : le rayon extérieur d'un anneau vaut automatiquement le rayon de
   l'écran plus son épaisseur, exactement comme sur l'appareil. Aucune image de
   châssis à charger, et le cadre reste net sur tous les écrans.

   Aucune troncature nulle part : un appareil coupé au milieu du vide se lit
   comme un bug, pas comme un parti pris. */

.device {
  --screen: 240px;
  position: relative;
  flex: none; /* sans ça, le flex de la grappe écrase les largeurs déclarées */
  width: var(--screen);
  aspect-ratio: 402 / 874;
  margin-inline: auto;
  border-radius: calc(var(--screen) * 0.137);
  background: var(--card);
  box-shadow:
    /* bezel noir */
    0 0 0 calc(var(--screen) * 0.026) #0a0a0c,
    /* tranche en titane, le liseré clair visible de face */
    0 0 0 calc(var(--screen) * 0.033) #61616a,
    /* arête sombre : détache l'appareil d'un fond clair */
    0 0 0 calc(var(--screen) * 0.037) #26262b,
    /* ombre de contact, courte et dense */
    0 3px 8px rgba(48, 30, 14, 0.18),
    /* ombre ambiante, longue et douce */
    0 28px 55px -20px rgba(48, 30, 14, 0.38);
}

/* Boutons latéraux. Chaque pseudo-élément dessine une barre, et ses `box-shadow`
   décalés verticalement en dessinent d'autres : trois boutons à gauche (action,
   volume +, volume −) et deux à droite (veille, commande caméra) sans le
   moindre élément supplémentaire dans le markup. Tout est proportionnel à
   `--screen`, donc juste à n'importe quelle taille. */
.device::before,
.device::after {
  content: "";
  position: absolute;
  width: calc(var(--screen) * 0.014);
  height: calc(var(--screen) * 0.075);
  background: linear-gradient(90deg, #4c4c55, #82828d);
  border-radius: calc(var(--screen) * 0.006);
}
.device::before {
  left: calc(var(--screen) * -0.045);
  top: calc(var(--screen) * 0.33);
  box-shadow:
    0 calc(var(--screen) * 0.17) 0 0 #6e6e79,
    0 calc(var(--screen) * 0.34) 0 0 #6e6e79;
}
.device::after {
  right: calc(var(--screen) * -0.045);
  top: calc(var(--screen) * 0.42);
  height: calc(var(--screen) * 0.13);
  background: linear-gradient(270deg, #4c4c55, #82828d);
}

/* `display: contents` : l'élément <picture> disparaît de la mise en page, et
   l'image redevient enfant direct de .device. Le <picture> sert uniquement à ne
   PAS télécharger les captures secondaires sur mobile (voir home.mjs). */
.device picture { display: contents; }

.device img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  /* Rayon calculé, pas hérité : avec display:contents le parent de rendu de
     l'image est le <picture>, qui n'a pas de rayon. */
  border-radius: calc(var(--screen) * 0.137);
}

@media (prefers-color-scheme: dark) {
  .device {
    box-shadow:
      0 0 0 calc(var(--screen) * 0.026) #0a0a0c,
      0 0 0 calc(var(--screen) * 0.033) #6d6d78,
      0 0 0 calc(var(--screen) * 0.037) #17171a,
      0 3px 8px rgba(0, 0, 0, 0.45),
      0 28px 55px -20px rgba(0, 0, 0, 0.7);
  }
}

/* Deux appareils, pas trois : à trois, les écrans latéraux tombaient sous
   160 px de large et le contenu de l'app n'y était plus qu'une tache de
   couleur. Deux appareils suffisent à dire « plusieurs écrans » tout en
   gardant le meneur lisible. */
.device-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  --lead: clamp(206px, 20vw, 262px);
}
/* Le `margin-inline: auto` de .device sert à centrer un appareil isolé (pages
   /chiot et /adopte). Dans la grappe il absorberait l'espace libre et
   annulerait le recouvrement : on le neutralise. */
.device-cluster .device { margin-inline: 0; }
.device-cluster .device-lead {
  --screen: var(--lead);
  z-index: 2; /* le meneur passe devant */
}
/* Marge négative à GAUCHE : c'est l'appareil d'appoint qui glisse sous le
   meneur, pas l'inverse. Sans ça les deux appareils restent côte à côte,
   séparés, et la composition perd toute profondeur. */
.device-cluster .device-side {
  --screen: calc(var(--lead) * 0.78);
  z-index: 1;
  /* 10 % de recouvrement : assez pour la profondeur, assez peu pour que le
     titre de l'écran d'appoint reste lisible. */
  margin-left: calc(var(--lead) * -0.1);
  transform: translateY(7%);
}

/* Appareil seul (pages /chiot et /adopte) : il n'y a pas de grappe, donc pas de
   `--lead`. Sans cette règle, `--screen: var(--lead)` serait invalide et
   l'appareil perdrait width, rayon et châssis d'un coup. */
.hero-visual > .device { --screen: clamp(230px, 22vw, 286px); }

/* Socle. Un écran d'app crème (#f9f6f1) posé sur le fond crème du site
   (#faf7f1) ne se détache pas : 1,01:1 de contraste. Le halo teinté rattrape
   ça en clair, et en sombre il empêche l'écran clair de flotter comme un trou
   découpé dans la page. */
.hero-visual { position: relative; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -12% -10% -6%;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(62% 52% at 50% 46%,
    color-mix(in srgb, var(--accent) 20%, transparent) 0%,
    color-mix(in srgb, var(--accent) 8%, transparent) 45%,
    transparent 72%);
  filter: blur(32px);
}

@media (prefers-color-scheme: dark) {
  .hero-visual::before {
    background: radial-gradient(62% 52% at 50% 46%,
      color-mix(in srgb, var(--accent) 32%, transparent) 0%,
      color-mix(in srgb, var(--accent) 12%, transparent) 45%,
      transparent 72%);
  }
}

/* Sous 980 px la grappe ne tient plus : un seul appareil, entier, centré. */
@media (max-width: 980px) {
  .device-side { display: none; }
  .device-cluster { --lead: min(252px, 62vw); }
  .device-cluster .device-lead { margin-inline: auto; }
  .hero-visual > .device { --screen: min(252px, 62vw); }
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  /* Le visuel passe APRÈS la promesse et les boutons : sur mobile, le premier
     écran doit porter le texte et l'appel à l'action, pas une capture. */
  .hero-visual { margin-top: 2.5rem; }
}

/* En paysage sur téléphone, un appareil de 550 px de haut n'a aucun sens. */
@media (max-height: 520px) and (orientation: landscape) {
  .hero-visual { display: none; }
}

/* ---------- Visite guidée : les écrans qui défilent ----------

   Un simple conteneur à défilement horizontal avec accrochage. Pas de
   bibliothèque : le geste tactile, le trackpad à deux doigts, les flèches du
   clavier et la molette Maj fonctionnent nativement. Le JS n'ajoute que le
   glisser-déposer à la souris et l'état des boutons — sans lui, ça défile
   quand même. */

.tour { overflow: hidden; }
.tour-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.tour-head .section-head { margin-bottom: 0; }

.tour-nav { display: flex; gap: 0.5rem; flex: none; }
.tour-nav button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.tour-nav button:hover:not(:disabled) { border-color: var(--accent); }
.tour-nav button:active:not(:disabled) { transform: scale(0.94); }
.tour-nav button:disabled { opacity: 0.35; cursor: default; }
.tour-nav svg { width: 20px; height: 20px; fill: currentColor; }

/* La piste déborde volontairement de la colonne de contenu : les diapositives
   viennent mourir au bord de l'écran, ce qui montre qu'il y en a d'autres. */
.tour-track {
  --gutter: max(1.25rem, calc((100% - var(--wrap)) / 2));
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 1.6rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  /* Pas de `scroll-behavior: smooth` : le défilement des boutons est animé en
     JavaScript. Le natif ne se déclenche pas dans certains environnements
     embarqués, et les boutons y paraissaient alors morts. */
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
  padding-block: 0.75rem 0.5rem;
  list-style: none;
  margin: 0;
  cursor: grab;
  scrollbar-width: none;
}
.tour-track::-webkit-scrollbar { display: none; }
/* Pendant un glissement — et pendant l'animation des boutons — l'accrochage
   doit lâcher, sinon le navigateur recale la position à chaque image et
   combat le mouvement. */
.tour-track.is-dragging,
.tour-track.is-animating { scroll-snap-type: none; }
.tour-track.is-dragging { cursor: grabbing; }
.tour-track.is-dragging img { pointer-events: none; }

.tour-slide {
  flex: none;
  scroll-snap-align: center;
  width: var(--tour-screen, 232px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tour-slide .device {
  --screen: var(--tour-screen, 232px);
  /* Le glissement de la piste ne doit pas être capté par l'image. */
  user-select: none;
  -webkit-user-drag: none;
}
.tour-caption h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.tour-caption p { font-size: 0.88rem; color: var(--muted); margin: 0; }

@media (max-width: 620px) {
  .tour-track { --tour-screen: min(214px, 58vw); }
  .tour-head { flex-direction: column; align-items: flex-start; }
  .tour-nav { display: none; } /* au doigt, les flèches ne servent à rien */
}

.tour-hint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}
.tour-hint svg { width: 17px; height: 17px; fill: currentColor; flex: none; }
/* ---------- Listes de contenu ---------- */

/* Puces et étapes : le marqueur est positionné en absolu, PAS posé dans une
   grille ou une boîte flexible.
   La version précédente faisait du <li> un conteneur de grille à deux colonnes.
   Elle ne marchait que si le <li> contenait exactement un enfant : dès qu'il
   contenait « <strong>Titre.</strong> puis du texte », ça faisait trois
   éléments de grille, et le texte partait à la ligne suivante DANS la colonne
   de 34 px — un mot par ligne. Le positionnement absolu est indifférent à la
   forme du contenu : un enfant ou vingt, le texte coule normalement. */

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.checks li { position: relative; padding-left: 1.8rem; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  /* Calé sur la première ligne de texte, quelle que soit la taille de police. */
  top: 0.22em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d95c3d'%3E%3Cpath d='M9.6 16.6 5 12l1.4-1.4 3.2 3.2 8-8L19 7.2z'/%3E%3C/svg%3E") center/14px no-repeat;
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.15rem; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  min-height: 34px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1em;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-round);
  font-weight: 700;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.2rem 1.1rem;
  margin-bottom: 0.7rem;
}
.faq summary {
  font-family: var(--font-round);
  font-weight: 650;
  cursor: pointer;
  padding: 0.9rem 0;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; float: right; color: var(--accent); }
.faq details[open] summary::after { content: "－"; }
.faq details > *:not(summary) { padding-bottom: 0.9rem; }

.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 1rem 1.15rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}
.callout.vet { border-color: var(--health); background: color-mix(in srgb, var(--health) 9%, transparent); }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
/* Les listes composées (.checks, .steps) portent leur propre indentation :
   celle de .prose s'ajouterait à la leur et décalerait les marqueurs. */
.prose ul:not(.checks):not(.steps),
.prose ol:not(.checks):not(.steps) { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }
.prose .checks li, .prose .steps li { margin-bottom: 0; }

.breadcrumbs { font-size: 0.85rem; color: var(--muted); padding-top: 1.4rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.4rem; color: var(--line); }
.breadcrumbs a { color: var(--muted); }

/* ---------- Tableaux ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-block: 1.25rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; min-width: 460px; }
th, td { text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); }
th { font-family: var(--font-round); font-weight: 650; color: var(--ink-soft); }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Pastilles d'état ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  font-family: var(--font-round);
  white-space: nowrap;
  background: color-mix(in srgb, var(--muted) 14%, transparent);
  color: var(--ink-soft);
}
.pill-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pill-danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.pill-info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }

/* ---------- Outils ---------- */

.tool-layout { display: grid; grid-template-columns: 340px 1fr; gap: clamp(1.25rem, 3vw, 2.25rem); align-items: start; }
@media (max-width: 900px) { .tool-layout { grid-template-columns: 1fr; } }

.tool-form { position: sticky; top: 86px; }
@media (max-width: 900px) { .tool-form { position: static; } }

.field { margin-bottom: 1.05rem; }
.field label, .field legend {
  display: block;
  font-family: var(--font-round);
  font-weight: 650;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem; }

input[type="date"], input[type="number"], input[type="text"], select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
input:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

fieldset { border: 0; padding: 0; margin: 0 0 1.05rem; }

.segmented { display: flex; gap: 0.4rem; background: var(--bg); padding: 0.25rem; border-radius: 999px; border: 1px solid var(--line); }
.segmented label { flex: 1; margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block;
  text-align: center;
  padding: 0.45rem 0.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--ink-soft);
}
.segmented input:checked + span { background: var(--accent); color: #fff; font-weight: 650; }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.switch-row { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.7rem; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.switch-row label { margin: 0; font-weight: 500; font-family: var(--font); font-size: 0.95rem; }

.result-empty { color: var(--muted); text-align: center; padding: 2.5rem 1rem; }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.timeline li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.05rem;
}
.timeline .when {
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}
.timeline .when small { display: block; font-weight: 500; color: var(--muted); font-size: 0.78rem; }
.timeline h3 { font-size: 1.02rem; margin-bottom: 0.15rem; }
.timeline p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.timeline li.is-past { opacity: 0.62; }
.timeline li.is-next { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

@media (max-width: 520px) {
  .timeline li { grid-template-columns: 1fr; gap: 0.3rem; }
}

@media (prefers-color-scheme: dark) {
  .timeline .when { color: var(--accent); }
}

.summary-card {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 12px 30px rgba(217, 92, 61, 0.28);
}
.summary-card h2 { color: #fff; margin-bottom: 0.3rem; font-size: 1.4rem; }
.summary-card p { opacity: 0.94; margin: 0; }
.summary-card.is-blocking { background: linear-gradient(135deg, #e05252, #b3271b); box-shadow: 0 12px 30px rgba(179, 39, 27, 0.3); }
.summary-card.is-ready { background: linear-gradient(135deg, #2fb37f, #12855f); box-shadow: 0 12px 30px rgba(18, 133, 95, 0.28); }

.step-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.05rem 1.15rem; }
.step-card + .step-card { margin-top: 0.7rem; }
.step-card header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.35rem; }
.step-card h3 { margin: 0; font-size: 1.03rem; }
.step-card p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }
.step-card.s-blocking { border-left: 4px solid var(--danger); }
.step-card.s-toPlan { border-left: 4px solid var(--warn); }
.step-card.s-pending { border-left: 4px solid var(--info); }
.step-card.s-ok { border-left: 4px solid var(--ok); }

.chart-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.chart-card svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.chart-legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }

.breed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 0.6rem; list-style: none; padding: 0; margin: 0; }
.breed-grid a {
  display: block;
  padding: 0.7rem 0.9rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.94rem;
}
.breed-grid a:hover { border-color: var(--accent); color: var(--ink); }
.breed-grid small { display: block; color: var(--muted); font-size: 0.8rem; }

.dest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; list-style: none; padding: 0; margin: 0; }
.dest-grid a {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
}
.dest-grid a:hover { border-color: var(--accent); color: var(--ink); }
.dest-grid .flag { font-size: 1.6rem; line-height: 1; }
.dest-grid small { display: block; color: var(--muted); font-size: 0.82rem; }

/* ---------- Carte d'identité partagée ---------- */

.id-card {
  max-width: 460px;
  margin-inline: auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.id-card .banner {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  padding: 1.5rem;
  text-align: center;
}
.id-card .banner h1 { color: #fff; font-size: 1.9rem; margin-bottom: 0.1rem; }
.id-card .banner p { margin: 0; opacity: 0.92; }
.id-card dl { margin: 0; padding: 1.25rem 1.5rem; display: grid; grid-template-columns: auto 1fr; gap: 0.55rem 1.25rem; }
.id-card dt { color: var(--muted); font-size: 0.88rem; }
.id-card dd { margin: 0; font-weight: 600; text-align: right; }
.id-card .id-actions { padding: 0 1.5rem 1.5rem; display: grid; gap: 0.6rem; }

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

.site-footer { border-top: 1px solid var(--line); background: var(--bg-elevated); padding-block: 3rem 2rem; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
.footer-grid h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.75rem; }
.footer-grid nav { display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.94rem; }
.footer-grid nav a { color: var(--ink-soft); text-decoration: none; }
.footer-grid nav a:hover { color: var(--accent-deep); }
.footer-brand p { font-size: 0.92rem; max-width: 34ch; }
.footer-social { display: flex; gap: 1rem; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.disclaimer { font-size: 0.86rem; color: var(--muted); max-width: 80ch; }

@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Impression : la checklist et le calendrier doivent sortir propres ---------- */

@media print {
  .site-header, .site-footer, .tool-form, .breadcrumbs, .no-print, .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .tool-layout { display: block; }
  .card, .step-card, .timeline li { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .summary-card { background: none !important; color: #000; border: 2px solid #000; }
  .summary-card h2 { color: #000; }
  section { padding-block: 0.5rem; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* ---------- La frise socialisation / vaccination ---------- */

/* Le SVG est écrit en coordonnées fixes et mis à l'échelle par son viewBox :
   sans ces règles, les libellés sortent à la taille par défaut du navigateur
   (16 px non mis à l'échelle) et cadrés à gauche de leur repère. */

/* Le SVG se met à l'échelle par son viewBox : à 335 px de large sur mobile, ses
   libellés de 15 unités tombent autour de 7 px, illisibles. On le fait donc
   défiler sous une largeur plancher, comme les tableaux du site, plutôt que de
   le laisser rétrécir. */
.timeline-figure { margin: 2rem 0 2.25rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.timeline-figure svg { width: 100%; height: auto; display: block; min-width: 560px; }
.timeline-figure text { font-family: var(--font-sans); fill: var(--ink); }
.timeline-figure .band { font-size: 15px; font-weight: 600; fill: var(--ink); }
.timeline-figure .tick { font-size: 15px; text-anchor: middle; fill: var(--muted); }
.timeline-figure .unit { font-size: 13px; fill: var(--muted); }
.timeline-figure .dose { font-size: 14px; font-weight: 600; text-anchor: middle; fill: var(--health); }
.timeline-figure .dose-legend { font-size: 13px; fill: var(--muted); }
.timeline-figure .after { font-size: 13px; text-anchor: middle; fill: var(--weight); }
.timeline-figure .or { font-size: 13px; font-style: italic; text-anchor: middle; fill: var(--muted); }

/* ---------- Les blocs de citation ---------- */

.quote-block { margin: 1.5rem 0; }
.quote-block blockquote {
  margin: 0;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
  font-size: 1.02rem;
  line-height: 1.6;
}
.quote-block .translation {
  margin: 0.5rem 0 0 1.1rem;
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
}
.quote-block figcaption {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.quote-block figcaption .find { display: block; margin-top: 0.2rem; }
.quote-block figcaption code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

/* ---------- La fiche A4 ---------- */

/* Un recto que l'éducateur pose sur la table de son école du chiot : les
   citations, leurs références, l'adresse de la page. Le projet n'a aucune
   chaîne PDF et n'en aura pas (zéro dépendance npm) — c'est l'impression du
   navigateur qui fabrique le fichier, donc c'est cette feuille de style qui est
   l'objet imprimé. À l'écran, la fiche se présente comme une page posée. */

.sheet {
  background: #fff;
  color: #16130f;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2.5rem);
  box-shadow: 0 2px 6px rgba(48, 30, 14, 0.08), 0 24px 48px -28px rgba(48, 30, 14, 0.3);
  /* Proche du rapport A4 sans l'imposer : le contenu reste maître de sa hauteur. */
  max-width: 46rem;
  margin-inline: auto;
}

.sheet h2 { margin-top: 0; }
.sheet blockquote {
  margin: 0 0 0.5rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--accent);
  font-size: 1rem;
  line-height: 1.55;
}
.sheet .ref {
  font-size: 0.82rem;
  color: #5c5346;
  margin: 0 0 1.4rem;
}
.sheet .ref a { color: inherit; }
.sheet-foot {
  margin: 1.6rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: #5c5346;
}

@media print {
  /* Sur cette page, et seulement elle, l'impression ne sort que la fiche. */
  body.sheet-page section:not(.sheet-section) { display: none !important; }
  body.sheet-page .sheet-section { padding: 0; }
  body.sheet-page .sheet {
    border: 0;
    box-shadow: none;
    padding: 0;
    max-width: none;
    /* La règle générale d'impression monte le corps à 12 pt, ce qui pousse la
       fiche sur une deuxième page. Tout l'objet est de tenir sur un recto. */
    font-size: 10.5pt;
    line-height: 1.45;
  }
  body.sheet-page .sheet h2 { font-size: 15pt; margin-bottom: 0.8em; }
  body.sheet-page .sheet blockquote { font-size: 10.5pt; break-inside: avoid; }
  body.sheet-page .sheet .ref { font-size: 8.5pt; margin-bottom: 1em; }
  body.sheet-page .sheet-foot { font-size: 8.5pt; }
  /* La règle générale accole l'URL à chaque lien : illisible sur un recto où
     les adresses sont déjà écrites en toutes lettres. */
  body.sheet-page a[href^="http"]::after { content: none; }
  @page { size: A4; margin: 16mm; }
}
