/* ==========================================================================
   Jack Russell Pedigree — feuille de style commune
   Couleurs, typographie et composants repris de la maquette validée.
   ========================================================================== */

:root {
  color-scheme: light dark;
  box-sizing: border-box;
  --bg: #F6F2EC;
  --surface: #FFFFFF;
  --ink: #1C1917;
  --muted: #6E655C;
  --line: #E2DAD0;
  --line-soft: #EFE8DF;
  --accent: #A4521F;
  --accent-soft: #F7EBE1;
  --on-accent: #FFFFFF;
  --danger: #B3261E;
  --danger-soft: #FBEAE8;
  --ok: #2E7D53;
  --ok-soft: #E8F4EC;
  --warn: #B8791C;
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head-h: 58px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15120F;
    --surface: #1F1B17;
    --ink: #EDE8E2;
    --muted: #A69C91;
    --line: #332D27;
    --line-soft: #2A2621;
    --accent: #DE9160;
    --accent-soft: #35241A;
    --on-accent: #221206;
    --danger: #F0736A;
    --danger-soft: #3A1A17;
    --ok: #6BBF8F;
    --ok-soft: #15291E;
    --warn: #E0A94A;
  }
}

*, *::before, *::after { box-sizing: inherit; }
/* Contenu d'un <details> : les navigateurs récents l'enveloppent dans ::details-content,
   qui n'hérite pas du box-sizing ; sans ça, les champs dépassent de leur colonne. */
details::details-content { box-sizing: inherit; }
.field input, .field select, .field textarea { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Place réservée sous l'en-tête collant quand la page défile vers un élément
   (ancre, champ en erreur…). Seulement dans le contenu : appliquée à toute la
   page, elle faisait remonter la page à chaque lettre tapée dans la recherche
   de l'en-tête, que le navigateur croyait cachée sous l'en-tête. */
main * { scroll-margin-top: calc(var(--head-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
code { font-size: .88em; background: var(--line-soft); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 6px; }
.dev-banner { background: var(--accent); color: var(--on-accent); text-align: center; font-size: .78rem; font-weight: 700; padding: 3px 8px; }

/* ---------------------------------------------------------------- en-tête */

.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.bar { display: flex; align-items: center; gap: 10px; min-height: var(--head-h); }
.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; color: var(--ink); text-decoration: none; }
.seal {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1;
  border-radius: 5px;
}
.brand-text { font-weight: 900; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; }
.brand-text small { display: block; font-size: .66rem; letter-spacing: .22em; color: var(--muted); font-weight: 500; }
/* petits écrans : le sceau suffit comme logo, la recherche garde de la place */
@media (max-width: 480px) { .brand-text { display: none; } }

.search { flex: 1 1 auto; min-width: 0; margin: 0; }
.search input {
  width: 100%;
  font: inherit; font-size: 1rem; /* 16 px : empêche le zoom automatique sur iPhone */
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px;
}

/* menu ordinateur : listes déroulantes */
.nav-desktop { display: none; align-items: center; gap: 2px; flex: 0 0 auto; }
@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .menu { display: none; }
}
.dd { position: relative; }
.dd > summary, .nav-login, .nav-link {
  display: block;
  list-style: none;
  cursor: pointer;
  font-weight: 700; font-size: .9rem;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin: 0 0 3px 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: .5;
}
.dd > summary:hover, .dd[open] > summary, .nav-link:hover { background: var(--bg); }
.nav-login { background: var(--accent); color: var(--on-accent); margin-left: 6px; }
.nav-login:hover { filter: brightness(.95); }
.dd > ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  margin: 0; padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(26, 20, 14, .10);
}
.dd li a, .dd li .linklike {
  display: block; width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink); text-decoration: none;
  font-size: .93rem;
}
.dd li a:hover, .dd li .linklike:hover { background: var(--bg); }

/* menu mobile : un bouton qui déplie un panneau */
.menu > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700; font-size: .9rem;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.nav-mobile {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 28px rgba(26, 20, 14, .10);
  padding: 4px 16px 20px;
  max-height: calc(100dvh - var(--head-h));
  overflow-y: auto;
}
.nav-mobile .nav-h { margin: 16px 0 2px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-mobile a, .nav-mobile .linklike {
  display: block; width: 100%;
  text-align: left;
  padding: 10px 0;
  color: var(--ink); text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px solid var(--line-soft);
}

.linklike { font: inherit; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; }
.nav-mobile form, .dd form { margin: 0; }

/* ---------------------------------------------------------------- contenu */

h1 { font-family: var(--serif); font-weight: 700; line-height: 1.2; }
.lead { color: var(--muted); margin: 0 0 18px; }

.hero { padding: 36px 0 12px; }
.hero h1 { font-size: clamp(1.9rem, 7vw, 2.9rem); line-height: 1.12; margin: 0 0 12px; max-width: 17ch; }
.hero p { color: var(--muted); max-width: 56ch; margin: 0; }
.figures { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 24px 0 0; padding: 0; list-style: none; }
.figures b { display: block; font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; }
.figures span { color: var(--muted); font-size: .88rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px !important; }

/* ---------------------------------------------------------------- panneaux et formulaires */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 18px 20px;
  margin: 28px auto;
}
@media (min-width: 520px) { .panel { padding: 28px 28px 24px; } }
.narrow { max-width: 460px; }
.panel h1 { font-size: 1.6rem; margin: 0 0 8px; }
.panel > p { margin: 0 0 12px; }

.field { margin: 0 0 16px; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin: 0 0 5px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="search"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  font: inherit; font-size: 1rem;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.hint { font-size: .8rem; color: var(--muted); margin: 5px 0 0; }
.check { display: flex; align-items: center; gap: 9px; font-size: .92rem; margin: 2px 0 18px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* champ piège pour robots, invisible pour les humains */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-block;
  font: inherit; font-weight: 700; font-size: .95rem;
  border-radius: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(.95); }
.btn.block { display: block; width: 100%; }

.form-links { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 18px 0 0; padding: 0; font-size: .9rem; }

/* ---------------------------------------------------------------- messages */

.flash, .errors, .notice {
  border-radius: 10px;
  padding: 11px 14px;
  font-size: .92rem;
  border: 1px solid var(--line);
  background: var(--surface);
}
.flash { margin: 18px 0 0; }
.flash-success { border-color: var(--ok); background: var(--ok-soft); }
.flash-error { border-color: var(--danger); background: var(--danger-soft); }
.flash-info { border-color: var(--accent); background: var(--accent-soft); }
.errors { border-color: var(--danger); background: var(--danger-soft); margin: 0 0 18px; }
.errors p { margin: 0; }
.errors p + p { margin-top: 6px; }
.errors ul { margin: 0; padding-left: 18px; }
.notice { background: var(--accent-soft); margin: 14px 0; }

/* ---------------------------------------------------------------- pied de page */

.site-foot { margin-top: 40px; border-top: 1px solid var(--line); padding: 20px 0 34px; color: var(--muted); font-size: .84rem; }
.site-foot p { margin: 0 0 10px; max-width: 70ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0; padding: 0; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--ink); }

/* ==========================================================================
   Étape 2 — fiche chien, arbre, listes, recherche
   Repris de la maquette validée.
   ========================================================================== */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-title { font-size: clamp(1.6rem, 5vw, 2.1rem); margin: 28px 0 14px; }
.unknown { color: var(--muted); font-style: italic; }
.ok { color: var(--ok); font-weight: 700; }

/* ---------------------------------------------------------------- en-tête de fiche */
.dog-head { padding: 22px 0 6px; display: flex; gap: 16px; align-items: flex-start; }
.portrait { flex: 0 0 auto; width: 112px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--accent-soft); }
.portrait img { width: 100%; height: auto; display: block; }
.portrait svg { width: 100%; height: auto; aspect-ratio: 1; display: block; }
@media (min-width: 760px) { .portrait { width: 200px; } }
.dog-head h1 { font-size: clamp(1.4rem, 5.2vw, 2rem); margin: 0 0 2px; overflow-wrap: anywhere; }
.kanji { font-family: var(--serif); font-size: 1rem; color: var(--muted); margin: 0 0 6px; }
.titles { font-size: .98rem; font-weight: 700; color: var(--accent); margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip { font-size: .78rem; font-weight: 500; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); white-space: nowrap; }
.chip a { color: inherit; }
.chip.sex { border-color: var(--accent); color: var(--accent); }

h2.sec { font-family: var(--serif); font-size: 1.18rem; font-weight: 700; margin: 30px 0 4px; padding-top: 18px; border-top: 1px solid var(--line); }
.sub { color: var(--muted); font-size: .87rem; margin: 0 0 14px; }
.count { font-family: var(--sans); font-weight: 500; font-size: .78rem; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; white-space: nowrap; vertical-align: middle; }

/* ---------------------------------------------------------------- détails */
.cols { display: grid; grid-template-columns: 1fr; gap: 0 34px; }
@media (min-width: 680px) { .cols { grid-template-columns: 1fr 1fr; } }
.group { margin: 0 0 20px; }
.group h3 { font-size: .8rem; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.group dl { margin: 0; border-top: 1px solid var(--line-soft); }
.group .row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.group dt { flex: 0 0 42%; font-size: .83rem; color: var(--muted); }
.group dd { flex: 1 1 auto; margin: 0; font-size: .94rem; overflow-wrap: anywhere; }
.group dd a { font-weight: 500; text-decoration: none; }
.group dd a:hover { text-decoration: underline; }
.notes { margin: 0; font-size: .94rem; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- photos */
.photo-grid { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-grid a { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--accent-soft); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid .credit { display: block; font-size: .72rem; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- indicateurs */
.ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.ctl label { font-size: .85rem; color: var(--muted); }
.ctl select { font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
/* Réglages sur une ligne, serrés à gauche : générations, Photos, Health, puis Share. */
.toggle { display: flex; align-items: center; gap: 6px; margin-left: 8px; cursor: pointer; }
.ctl .share { margin-left: 8px; }
.toggle input { accent-color: var(--accent); width: 17px; height: 17px; }
.metrics { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 620px) { .metrics { grid-template-columns: repeat(3, 1fr); } }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.metric .lab { font-size: .8rem; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.metric .val { font-family: var(--serif); font-weight: 700; font-size: 2.1rem; line-height: 1; margin: 0; }
.metric .say { font-size: .85rem; color: var(--muted); margin: 7px 0 0; }
.metric .say b { color: var(--ink); }
.bar-track { height: 5px; border-radius: 3px; background: var(--line-soft); margin: 10px 0 0; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--ok); }
.bar-fill.is-warn { background: var(--warn); }
.bar-fill.is-low { background: var(--danger); }
.scale { display: flex; height: 5px; border-radius: 3px; overflow: hidden; margin: 10px 0 0; background: var(--line-soft); }
.scale i { display: block; height: 100%; }
.scale i:nth-child(1) { width: 25%; background: var(--ok); }
.scale i:nth-child(2) { width: 25%; background: var(--warn); }
.scale i:nth-child(3) { width: 50%; background: var(--danger); }
.marker { position: relative; height: 0; }
.marker span { position: absolute; top: -16px; transform: translateX(-50%); width: 2px; height: 11px; background: var(--ink); border-radius: 1px; }
.scale-lab { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-top: 4px; }
details.formula { margin-top: 14px; font-size: .86rem; color: var(--muted); }
details.formula summary { cursor: pointer; color: var(--ink); font-weight: 500; }
details.formula p { margin: 8px 0 0; max-width: 64ch; }

/* ---------------------------------------------------------------- arbre généalogique */
.ped-outer { position: relative; }
.ped-wrap { overflow: hidden; padding: 2px 0 8px; }
.ped-wrap.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
.ped-outer.scroll::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 12px; width: 32px; pointer-events: none;
  background: linear-gradient(to right, rgba(0, 0, 0, 0), var(--bg)); transition: opacity .2s;
}
.ped-outer.scroll.at-end::after { opacity: 0; }
/* ==========================================================================
   Arbre généalogique en tableau, comme l'ancien site : une colonne par
   génération, chaque case sur toute la hauteur de son ascendance.
   L1 à L7 : arbre réduit pour tenir dans la largeur de l'écran.
   ========================================================================== */
.ptable {
  display: grid; width: max-content; transform-origin: 0 0;
  grid-auto-rows: minmax(30px, auto);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; background: var(--surface);
}
.L1 { grid-template-columns: 160px; }
.L2 { grid-template-columns: 120px 160px; }
.L3 { grid-template-columns: 96px 96px 160px; }
.L4 { grid-template-columns: 82px 82px 104px 146px; }
.L5 { grid-template-columns: 70px 70px 72px 104px 128px; }
.L6 { grid-template-columns: 64px 64px 66px 80px 96px 118px; }
.L7 { grid-template-columns: 58px 58px 60px 70px 82px 98px 116px; }
.Ls { grid-template-columns: 110px 104px 150px repeat(var(--more, 3), 140px); }
.ph-head {
  padding: 7px 8px; background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: .72rem; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc {
  display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 5px 6px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface);
  color: var(--ink); text-decoration: none; font-size: .72rem; line-height: 1.32;
}
a.pc:hover { background: var(--bg); }
.ped-wrap.scroll .pc { justify-content: flex-start; }
.pc .pic { display: block; width: 100%; aspect-ratio: 4 / 3; background: var(--line-soft); border-radius: 8px; overflow: hidden; margin-bottom: 4px; }
.pc .pic img, .pc .pic svg { width: 100%; height: 100%; display: block; }
.pc .pic img { object-fit: contain; } /* photo entière, jamais recadrée */
.pc .txt { display: block; min-width: 0; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.pc .ttl { display: block; font-size: .62rem; font-weight: 700; color: var(--accent); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc .nm { display: block; font-weight: 700; font-size: .74rem; }
.pc .jp { display: block; font-family: var(--serif); color: var(--muted); font-size: .7rem; }
.pc .reg { display: block; color: var(--muted); font-size: .64rem; font-weight: 700; letter-spacing: .02em; overflow-wrap: anywhere; }
.pc .meta { display: block; color: var(--muted); font-size: .68rem; margin-top: 1px; }
.pc.nodog { color: var(--muted); font-style: italic; }
.pc.compact .pic { display: none; }
.pc.t-topmini .pic { aspect-ratio: 16 / 10; }
.pc.t-topmini .jp, .pc.t-topmini .reg { display: none; }
.pc.t-row, .pc.t-rowmini { flex-direction: row; align-items: center; justify-content: flex-start; gap: 6px; }
.ped-wrap.scroll .pc.t-row, .ped-wrap.scroll .pc.t-rowmini { align-items: flex-start; }
.pc.t-row .pic, .pc.t-rowmini .pic { flex: 0 0 auto; margin: 0; aspect-ratio: auto; }
/* place réservée quand le chien n'a pas de photo : les noms restent alignés */
.pc .pic.empty { background: none; }
.pc.t-row .pic { width: 40px; height: 40px; }
.pc.t-rowmini .pic { width: 30px; height: 30px; }
.pc.t-row .txt, .pc.t-rowmini .txt { flex: 1 1 auto; }
.pc.t-row .jp, .pc.t-row .reg, .pc.t-row .ttl,
.pc.t-rowmini .jp, .pc.t-rowmini .reg, .pc.t-rowmini .ttl { display: none; }
/* Téléphone : dans les cases étroites, le drapeau seul (le nom du pays apparaît au survol). */
.pc.t-topmini .ctry-name, .pc.t-row .ctry-name, .pc.t-rowmini .ctry-name { display: none; }

/* Chiens présents plusieurs fois : une couleur pâle chacun, la même à chaque
   apparition. Le fond mélange la couleur avec la surface, pour rester doux
   en mode clair comme en mode sombre. */
.rep-0 { --rep: #E8741E; } .rep-1 { --rep: #3B7DD8; } .rep-2 { --rep: #3E9A55; } .rep-3 { --rep: #8A5CC7; }
.rep-4 { --rep: #C9A21E; } .rep-5 { --rep: #2A9D8F; } .rep-6 { --rep: #D14B7C; } .rep-7 { --rep: #9C6B45; }
.rep-8 { --rep: #7FA32B; } .rep-9 { --rep: #5B6B7A; }
.pc.rep { background: color-mix(in srgb, var(--rep) 15%, var(--surface)); box-shadow: inset 4px 0 0 var(--rep); }
a.pc.rep:hover { background: color-mix(in srgb, var(--rep) 24%, var(--surface)); }
.rep-legend { margin: 12px 0 0; }
.rep-legend p { margin: 0 0 6px; font-size: .84rem; color: var(--muted); }
.rep-legend ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.rep-legend li { display: flex; align-items: center; gap: 7px; font-size: .86rem; }
.rep-legend i { width: 14px; height: 14px; border-radius: 4px; flex: 0 0 auto;
  background: color-mix(in srgb, var(--rep) 15%, var(--surface)); box-shadow: inset 3px 0 0 var(--rep); border: 1px solid var(--rep); }
.rep-legend a { font-weight: 500; text-decoration: none; }
.rep-legend a:hover { text-decoration: underline; }
.rep-legend span { color: var(--muted); font-size: .8rem; }

/* Ordinateur : un tableau bien plus grand, qui profite de la largeur */
@media (min-width: 760px) {
  .L1 { grid-template-columns: 320px; }
  .L2 { grid-template-columns: 260px 340px; }
  .L3 { grid-template-columns: 240px 240px 360px; }
  .L4 { grid-template-columns: 190px 190px 240px 300px; }
  .L5 { grid-template-columns: 150px 150px 165px 220px 270px; }
  .L6 { grid-template-columns: 136px 136px 146px 176px 214px 250px; }
  .L7 { grid-template-columns: 108px 108px 122px 162px 184px 206px 236px; }
  .Ls { grid-template-columns: 200px 190px 250px repeat(var(--more, 3), 230px); }
  .ph-head { padding: 8px 10px; }
  .pc { font-size: .8rem; line-height: 1.35; padding: 8px 10px; }
  .pc .nm { font-size: .9rem; }
  .pc .jp { font-size: .8rem; }
  .pc .meta { font-size: .76rem; }
  .pc .ttl { font-size: .7rem; }
  .pc.t-topmini .pic { aspect-ratio: 4 / 3; }
  .pc.t-topmini .jp, .pc.t-row .jp, .pc.t-topmini .reg, .pc.t-row .reg { display: block; }
  .pc .reg { font-size: .72rem; }
  .pc.t-topmini .ctry-name, .pc.t-row .ctry-name, .pc.t-rowmini .ctry-name { display: inline; }
  .pc.t-row .pic { width: 72px; height: 72px; }
  .pc.t-rowmini .pic { width: 52px; height: 52px; }
  .L4 .pc.t-row .pic { width: 64px; height: 64px; }
  .L5 .pc.t-row .pic { width: 56px; height: 56px; }
  .L6 .pc.t-row .pic, .L7 .pc.t-row .pic { width: 44px; height: 44px; }
  .L6 .pc.t-rowmini .pic, .L7 .pc.t-rowmini .pic { width: 40px; height: 40px; }
  .L6 .pc, .L7 .pc { padding: 6px 8px; }
  .L6 .pc.t-row, .L7 .pc.t-row { font-size: .74rem; line-height: 1.25; padding: 3px 8px; }
  .L6 .pc.t-row .nm, .L7 .pc.t-row .nm { font-size: .8rem; }
  .L6 .pc.t-row .jp, .L6 .pc.t-row .reg, .L7 .pc.t-row .jp, .L7 .pc.t-row .reg,
  .L6 .pc.t-row .ctry, .L7 .pc.t-row .ctry { display: none; }
}


/* ---------------------------------------------------------------- portées */
.fam details { margin-bottom: 8px; }
.fam summary { cursor: pointer; padding: 11px 0; font-weight: 700; font-size: .95rem; display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid var(--line-soft); list-style: none; }
.fam summary::-webkit-details-marker { display: none; }
.fam .inner { padding-top: 12px; }
.litter { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); margin: 0 0 12px; overflow: hidden; }
.litter-head { padding: 10px 13px; background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.litter-date { font-weight: 900; font-size: .78rem; color: var(--accent); }
.litter-par { font-size: .87rem; margin: 3px 0 0; overflow-wrap: anywhere; }
.litter-par a { color: inherit; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--line); }
.litter-par .x { color: var(--muted); font-weight: 400; padding: 0 4px; }
.pups { list-style: none; margin: 0; padding: 4px 13px 10px; }
.pups li { padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: .87rem; display: flex; gap: 10px; align-items: center; }
.pups li:last-child { border-bottom: 0; }
.pups .thumb { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); background: var(--accent-soft); }
.pups .thumb img, .pups .thumb svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.pups .ptxt { flex: 1 1 auto; min-width: 0; }
.pups .pn { font-weight: 700; }
.pups .pn a { text-decoration: none; }
.pups .pn a:hover { text-decoration: underline; }
.pups .pd { color: var(--muted); font-size: .8rem; display: block; margin-top: 1px; }

.actions { margin: 28px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); }
.util { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; font-size: .86rem; }
.util a { color: var(--muted); }
.util a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- listes de chiens */
.dog-list { list-style: none; margin: 10px 0 14px; padding: 0; border-top: 1px solid var(--line-soft); }
.dog-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.dog-list .thumb { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--accent-soft); display: block; }
.dog-list .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* sans photo : la place reste, invisible, pour garder les noms alignés */
.dog-list .thumb:empty, .pups .thumb:empty { border-color: transparent; background: none; }
.dl-txt { min-width: 0; flex: 1 1 auto; }
.dl-name { display: block; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.dl-name:hover { text-decoration: underline; }
.dl-jp { display: block; font-family: var(--serif); font-size: .85rem; color: var(--muted); }
.dl-meta { display: block; font-size: .8rem; color: var(--muted); }
.person-list { list-style: none; margin: 10px 0 14px; padding: 0; border-top: 1px solid var(--line-soft); }
.person-list li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.person-list a { font-weight: 700; text-decoration: none; }
.person-head { padding: 22px 0 4px; }
.person-head h1 { font-size: clamp(1.5rem, 5vw, 2.1rem); margin: 0 0 4px; }

/* ---------------------------------------------------------------- accueil */
.hero-search { display: flex; gap: 8px; margin: 22px 0 0; max-width: 560px; }
.hero-search input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; }
.hero-search .btn { border-radius: 999px; }
.tool-links { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0 28px; border-top: 1px solid var(--line-soft); }
@media (min-width: 720px) { .tool-links { grid-template-columns: repeat(3, 1fr); border-top: 0; } .tool-links li { border-top: 1px solid var(--line-soft); } }
.tool-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.tool-links b { display: block; font-family: var(--serif); font-size: 1.08rem; }
.tool-links span { display: block; color: var(--muted); font-size: .88rem; }
.tool-links a:hover b { text-decoration: underline; }
.join { margin: 34px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); }
.join h2 { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 6px; }
.join p { margin: 0; color: var(--muted); }

/* ---------------------------------------------------------------- recherche */
.search-form { margin: 0 0 18px; }
.search-main { display: flex; gap: 8px; }
.search-main input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.filters { margin: 12px 0 0; }
.filters summary { cursor: pointer; font-weight: 700; font-size: .92rem; }
.filter-grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; margin: 12px 0 10px; }
@media (min-width: 560px) { .filter-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 820px) { .filter-grid { grid-template-columns: 1fr 1fr 1fr; } }
.filter-grid .check { align-self: end; margin-bottom: 20px; }
/* Sans cela, un menu déroulant impose la largeur de son plus long libellé
   et déborde sur la colonne voisine. */
.filter-grid > * { min-width: 0; }
/* Largeur bordures comprises, pour que 100 % reste dans la colonne. */
.filter-grid input, .filter-grid select, .filter-grid textarea { box-sizing: border-box; max-width: 100%; }
.results-head { margin: 0 0 4px; color: var(--muted); font-size: .92rem; }
.results-head b { color: var(--ink); }

.pager ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; padding: 0; }
.pager a, .pager span { display: inline-block; min-width: 38px; text-align: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; text-decoration: none; color: var(--ink); background: var(--surface); }
.pager a:hover { border-color: var(--muted); }
.pager [aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pager .gap { border-color: transparent; background: none; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin: 0 0 10px; background: var(--surface); }
.seg a { padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.seg a[aria-current] { background: var(--ink); color: var(--bg); }

/* ---------------------------------------------------------------- fenêtre photo */
a.lb { cursor: zoom-in; }
.lightbox { border: 0; padding: 0; margin: 0; background: rgba(12, 10, 8, .95); width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(12, 10, 8, .6); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 14px 18px; }
.lightbox img { max-width: 100%; max-height: calc(100% - 44px); object-fit: contain; border-radius: 6px; }
.lightbox figcaption { color: #EDE9E4; font-size: .88rem; margin-top: 12px; text-align: center; }
.lb-close, .lb-prev, .lb-next {
  position: fixed; z-index: 2;
  width: 46px; height: 46px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: #FFF;
  font: 400 1.7rem/1 var(--sans); cursor: pointer;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255, 255, 255, .26); }
.lb-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }

/* ---------------------------------------------------------------- haut de la fiche
   Comme l'ancien site : grande photo à gauche, description à droite.
   Sur téléphone, la photo passe au-dessus du texte. */
.dog-top { display: grid; grid-template-columns: 1fr; gap: 18px; padding: 22px 0 8px; }
@media (min-width: 760px) {
  .dog-top { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 30px; align-items: start; }
}
.main-photo { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--line-soft); }
.main-photo img { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; }
/* chien sans photo : pas de colonne de gauche, la description prend toute la largeur */
.dog-top.no-photo { grid-template-columns: 1fr; }
.photo-credit { font-size: .78rem; color: var(--muted); margin: 6px 0 0; }
.photo-credit:empty { display: none; }
.photo-strip { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.photo-strip a { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--line-soft); }
.photo-strip a:hover { border-color: var(--accent); }
.photo-strip a.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.photo-strip img { width: 100%; height: 100%; display: block; object-fit: contain; }
.dog-info h1 { font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.15; margin: 0 0 4px; overflow-wrap: anywhere; }
/* kanji et numéro d'enregistrement sur une même ligne, sous le nom */
.dog-ids { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 2px 0 6px; }
.dog-ids .kanji { margin: 0; }
.regnr { font-weight: 700; font-size: .92rem; letter-spacing: .02em; }
/* Deux colonnes choisies : identité et origines, puis taille, couleur et santé.
   Sur téléphone, la seconde passe sous la première. */
.facts-cols { display: grid; grid-template-columns: 1fr; gap: 0 28px; margin-top: 14px; }
.facts { margin: 0; border-top: 1px solid var(--line-soft); }
.facts-cols .facts + .facts { border-top: 0; }
.facts .row { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dotted var(--line); align-items: baseline; }
.facts dt { flex: 0 0 42%; font-weight: 700; font-size: .84rem; }
.facts dd { flex: 1 1 auto; margin: 0; font-size: .93rem; overflow-wrap: anywhere; }
.facts dd a { font-weight: 500; text-decoration: none; }
.facts dd a:hover { text-decoration: underline; }

@media (min-width: 760px) {
  .facts-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-cols .facts + .facts { border-top: 1px solid var(--line-soft); }
}
@media (min-width: 1060px) {
  .dog-top { grid-template-columns: minmax(0, 4.4fr) minmax(0, 7fr); }
}
.facts-notes { margin-top: 14px; }
.facts-notes h3 { font-size: .84rem; font-weight: 700; margin: 0 0 4px; }
.facts-notes p { margin: 0; font-size: .93rem; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- page d'accueil
   La grande photo de l'ancien site, avec le titre et la recherche par-dessus. */
.home-hero {
  position: relative; display: flex; align-items: flex-end; min-height: 380px; margin: 20px 0 0;
  border-radius: 18px; background: #2A2420; color: #FFF;
}
/* coins arrondis sur la photo elle-même : la liste de suggestions peut dépasser du bandeau */
.home-hero-img, .home-hero::after { border-radius: inherit; }
.home-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.home-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15, 11, 8, .84) 0%, rgba(15, 11, 8, .5) 45%, rgba(15, 11, 8, .12) 100%);
}
.home-hero-body { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; padding: 28px 22px 26px; max-width: 660px; }
.home-hero h1 { color: #FFF; font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1.12; margin: 0 0 10px; }
.home-hero p { color: rgba(255, 255, 255, .9); margin: 0; max-width: 54ch; }
.home-hero p a { color: #FFF; font-weight: 700; }
.home-hero .hero-search input { border-color: transparent; }
@media (min-width: 760px) {
  .home-hero { min-height: 460px; }
  .home-hero-body { padding: 44px 44px 40px; }
}

.home-figures {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 16px 0 0; padding: 0; list-style: none;
  background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.home-figures li { background: var(--surface); padding: 14px 16px; }
.home-figures b { display: block; font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; }
.home-figures span { color: var(--muted); font-size: .86rem; }
@media (min-width: 760px) { .home-figures { grid-template-columns: repeat(4, 1fr); } }

.quick { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 760px) { .quick { grid-template-columns: repeat(3, 1fr); } }
.quick a {
  display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none;
}
.quick a:hover { border-color: var(--accent); }
.qi { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.qi svg { width: 24px; height: 24px; }
.quick b { display: block; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 2px; }
.quick .qd { display: block; color: var(--muted); font-size: .88rem; }

.about { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; margin: 34px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.about img { display: block; width: 100%; height: auto; border-radius: 16px; }
.about h2 { font-family: var(--serif); font-size: 1.45rem; margin: 0 0 10px; }
.about p { color: var(--muted); margin: 0 0 10px; }
@media (min-width: 760px) { .about { grid-template-columns: 5fr 7fr; gap: 36px; } }

.rule-list { display: grid; grid-template-columns: 1fr; gap: 0 28px; }
@media (min-width: 760px) { .rule-list { grid-template-columns: 1fr 1fr; } }
.rule-list details { border-bottom: 1px solid var(--line-soft); }
.rule-list summary { cursor: pointer; padding: 11px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.rule-list summary::-webkit-details-marker { display: none; }
.rule-list summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.rule-list details[open] summary::after { content: "–"; }
.rule-list details p { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.thanks { margin: 22px 0 0; padding: 18px 20px; background: var(--accent-soft); border-radius: 14px; }
.thanks h3 { font-family: var(--serif); font-size: 1.15rem; margin: 0 0 4px; }
.thanks p { margin: 0; }

/* ---------------------------------------------------------------- activité récente (accueil)
   Trois onglets. Sans JavaScript, les trois listes s'affichent l'une sous l'autre. */
.activity { margin: 34px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.activity-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 14px; }
.activity-head h2 { font-family: var(--serif); font-size: 1.3rem; margin: 0; }
.tabs { display: none; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; max-width: 100%; overflow-x: auto; }
.tabs-ready .tabs { display: inline-flex; }
.tabs button { font: inherit; font-size: .88rem; font-weight: 700; white-space: nowrap; border: 0; background: none; color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.panel-title { font-size: 1rem; margin: 18px 0 8px; }
.tabs-ready .panel-title { display: none; }
.activity-more { margin: 12px 0 0; font-size: .9rem; }

.dog-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.dcard {
  display: flex; gap: 12px; align-items: center; height: 100%; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none;
}
.dcard:hover { border-color: var(--accent); }
.dcard .thumb { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 10px; overflow: hidden; background: var(--line-soft); }
.dcard .thumb:empty { display: none; }
.dcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-txt { min-width: 0; }
/* nom en entier sur deux lignes au besoin, plutôt que coupé */
.dc-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; line-height: 1.3; }
.dc-jp { display: block; font-family: var(--serif); font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-meta { display: block; font-size: .78rem; color: var(--muted); }
.dc-note { display: block; margin-top: 3px; font-size: .74rem; font-weight: 700; color: var(--accent); }

.photo-wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-wall a { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--line-soft); color: #FFF; text-decoration: none; }
.photo-wall img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.photo-wall a:hover img { transform: scale(1.04); }
.photo-wall span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 9px 7px; font-size: .78rem; font-weight: 700;
  background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------------------------------------------------------------- logo
   Trait noir sur fond transparent : inversé en blanc en mode sombre. */
.brand-logo { display: block; height: 36px; width: auto; }
@media (min-width: 760px) { .brand-logo { height: 44px; } }
.foot-logo { display: block; height: 96px; width: auto; margin: 0 0 14px; opacity: .9; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-ink { filter: invert(1); }
}
:root[data-theme="dark"] .logo-ink { filter: invert(1); }

/* ---------------------------------------------------------------- test d'accouplement */
.mating-form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 4px; margin: 0 0 18px; }
.mating-fields { display: grid; grid-template-columns: 1fr; gap: 0 14px; align-items: end; }
@media (min-width: 760px) { .mating-fields { grid-template-columns: 1fr auto 1fr; } }
.mating-x { font-family: var(--serif); font-size: 1.7rem; line-height: 1; color: var(--muted); text-align: center; }
.mating-fields .mating-x { padding: 0 0 26px; }
@media (max-width: 759px) { .mating-fields .mating-x { padding: 0 0 8px; } }
.mating-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 4px 0 12px; }
.mating-parents { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center; margin: 4px 0 0; }
@media (min-width: 760px) { .mating-parents { grid-template-columns: 1fr auto 1fr; } }
.dc-role { display: block; font-size: .66rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.choices { list-style: none; margin: 8px 0 0; padding: 0; }
.choices li { padding: 5px 0; border-top: 1px solid var(--line-soft); }
.choices a { font-weight: 700; }

/* suggestions sous le champ */
.field.ac { position: relative; }
.ac-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 4px; list-style: none; max-height: 330px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(20, 14, 8, .14);
}
.ac-list li { padding: 7px 9px; border-radius: 7px; cursor: pointer; }
.ac-list li.is-active, .ac-list li:hover { background: var(--accent-soft); }
.ac-name { display: block; font-weight: 700; }
.ac-jp { display: block; font-family: var(--serif); font-size: .82rem; color: var(--muted); }
.ac-info { display: block; font-size: .78rem; color: var(--muted); }
.ac-list .ac-empty { color: var(--muted); font-style: italic; cursor: default; background: none; }

/* ---------------------------------------------------------------- formulaire chien */
.dog-form { max-width: 880px; }
.form-section { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 2px; margin: 0 0 14px; }
.form-section h2 { font-family: var(--serif); font-size: 1.12rem; margin: 0 0 14px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 18px; }
@media (min-width: 700px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: 1 / -1; }
}
fieldset.field { border: 0; padding: 0; min-width: 0; }
fieldset.field legend { font-weight: 700; font-size: .9rem; margin: 0 0 5px; padding: 0; }
.field textarea { min-height: 120px; resize: vertical; }
.field-error { color: var(--danger); font-size: .84rem; font-weight: 700; margin: 5px 0 0; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.parents-hint { margin: -8px 0 16px; }

.date-row { display: flex; gap: 8px; }
.date-row select { flex: 1 1 0; min-width: 0; }
.date-row input { flex: 0 0 88px; min-width: 0; }
.unit-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.unit-row input { flex: 0 1 120px; min-width: 70px; }

/* choix groupés : Male / Female / Unknown, cm / inches… */
.seg-radio { display: inline-flex; flex-wrap: wrap; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg); }
.seg-radio label { position: relative; margin: 0; cursor: pointer; }
.seg-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-radio span { display: block; padding: 6px 13px; border-radius: 999px; font-weight: 700; font-size: .86rem; color: var(--muted); }
.seg-radio input:checked + span { background: var(--ink); color: var(--bg); }
.seg-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

.dup-box ul { margin: 8px 0 12px; padding-left: 18px; }
.dup-box li { margin: 3px 0; }
.dup-box .check { margin-bottom: 4px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 6px 0 34px; }

/* fiche : actions de modification et auteurs */
.edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 18px 0 0; }
.hint.who { margin: 0 0 12px; }

/* ---------------------------------------------------------------- pastilles de santé */
.health { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.hb { display: inline-block; font-size: .7rem; font-weight: 700; line-height: 1.2; padding: 2px 7px; border-radius: 999px; border: 1px solid; white-space: nowrap; cursor: default; }
.hb-ok   { color: var(--ok);     border-color: color-mix(in srgb, var(--ok) 45%, transparent);     background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.hb-warn { color: var(--warn);   border-color: color-mix(in srgb, var(--warn) 50%, transparent);   background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.hb-bad  { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.hb-wait { color: var(--muted);  border-color: var(--line);                                        background: var(--bg); }

/* ---------------------------------------------------------------- éleveurs et propriétaires */
.ac-anchor { position: relative; }
.pchips { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pchips:empty { display: none; }
.pchip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 4px 4px 4px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--accent-soft);
}
.pchip-name { font-weight: 700; font-size: .88rem; overflow-wrap: anywhere; }
.pchip-info { font-size: .76rem; color: var(--muted); }
.pchip-x {
  flex: 0 0 auto; width: 24px; height: 24px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 1.05rem; line-height: 1;
}
.pchip-x:hover { background: var(--surface); color: var(--danger); }
.linkish { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* fenêtre de création d'une personne */
.modal { width: min(560px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 16px; padding: 20px 20px 4px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(20, 14, 8, .25); }
.modal::backdrop { background: rgba(12, 10, 8, .5); }
.modal h2 { font-family: var(--serif); font-size: 1.25rem; margin: 0 0 4px; }
.modal .hint { margin: 0 0 14px; }
.modal .form-actions { margin-bottom: 16px; }

/* ---------------------------------------------------------------- page photos */
.btn.small { padding: 6px 12px; font-size: .84rem; }
.back-link { margin: 22px 0 -14px; font-size: .9rem; }
.back-link a { text-decoration: none; }
.upload-box { max-width: 720px; }
.field input[type="file"] { display: block; width: 100%; font: inherit; font-size: .92rem; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); }
.upload-preview { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.upload-preview:empty { display: none; }
.upload-preview li { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--line-soft); }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-manage { list-style: none; margin: 10px 0 30px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pm-card { display: flex; gap: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.pm-card.is-main { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pm-img { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--line-soft); }
.pm-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pm-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.pm-body form { margin: 0; }
.pm-main { margin: 0; font-size: .78rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.pm-credit { display: flex; gap: 6px; width: 100%; }
.pm-credit input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: .86rem; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.pm-body .hint { margin: 0; }
.linkish.danger { color: var(--danger); font-size: .86rem; }

/* fiche d'une personne : étiquettes cliquables et onglets */
.chip a { text-decoration: none; }
.chip a:hover { text-decoration: underline; }
.person-dogs { border-top: 0; padding-top: 6px; }
.tabs .count { margin-left: 4px; background: transparent; border-color: currentColor; color: inherit; opacity: .8; }

/* ---------------------------------------------------------------- nouveautés */
.group-title { font-family: var(--serif); font-size: 1.1rem; margin: 26px 0 10px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.seg + .group-title, .seg + .dog-cards { margin-top: 14px; }
.dc-par { display: block; font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- Dogs available */
.avail-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin: 0 0 14px; }
.avail-head .page-title { margin-bottom: 6px; }
.avail-head .sub { margin: 0; }
.avail-grid { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.avail-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; scroll-margin-top: 90px; }
.avail-card:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
/* min-height: 0 : sans lui, le cadre s'agrandit à la taille d'une photo en hauteur */
.avail-photo { display: block; aspect-ratio: 4 / 3; min-height: 0; overflow: hidden; background: var(--line-soft); }
.avail-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.avail-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 14px 16px 16px; }
.avail-body h2 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 2px; }
.avail-body .dc-jp { margin: 0; }
.avail-body h2 a { color: var(--ink); text-decoration: none; }
.avail-body h2 a:hover { text-decoration: underline; }
.avail-meta { margin: 6px 0 0; font-size: .88rem; }
.avail-place { margin: 2px 0 0; font-size: .86rem; color: var(--muted); }
.avail-desc { margin: 10px 0 0; font-size: .92rem; overflow-wrap: anywhere; }
.avail-card .avail-desc { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.avail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: auto 0 0; padding-top: 14px; }
.avail-actions .see-pedigree { font-size: .9rem; font-weight: 700; }
.avail-badge-row { margin: 4px 0 6px; }
.avail-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--ok); color: #FFF; font-size: .82rem; font-weight: 700; text-decoration: none; }
.avail-badge:hover { filter: brightness(1.08); }
.fixed-value { margin: 0; font-weight: 700; }
/* champ piège anti-robots : hors de l'écran, invisible pour les visiteurs */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* mes annonces, validation */
.listing-rows { list-style: none; margin: 10px 0 30px; padding: 0; border-top: 1px solid var(--line-soft); }
.listing-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.lr-main { min-width: 0; }
.lr-main .dl-name { display: inline; margin-right: 8px; }
.lr-main .hint { margin: 3px 0 0; }
.lr-state { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); vertical-align: 2px; }
.lr-state.lr-pending { border-color: var(--warn); color: var(--warn); }
.lr-state.lr-rejected { border-color: var(--danger); color: var(--danger); }
.lr-state.is-online { border-color: var(--ok); color: var(--ok); }
.lr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lr-actions form { margin: 0; }
.review-list { list-style: none; margin: 10px 0 20px; padding: 0; display: grid; gap: 12px; }
.review-card { display: flex; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.review-body { flex: 1 1 auto; min-width: 0; }
.review-body .hint { margin: 2px 0 0; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 12px; }
.review-actions form { margin: 0; }
.reject-form { display: flex; gap: 6px; flex: 1 1 280px; }
.reject-form input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: .86rem; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }

/* ---------------------------------------------------------------- historique (administrateurs) */
.hist-list { list-style: none; margin: 10px 0 30px; padding: 0; border-left: 2px solid var(--line); }
.hist-item { position: relative; margin: 0 0 16px; padding: 0 0 0 18px; }
.hist-item::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 999px; background: var(--surface); border: 2px solid var(--muted); }
.hist-item.hist-update::before, .hist-item.hist-create::before { border-color: var(--accent); }
.hist-item.hist-restore::before { border-color: var(--ok); background: var(--ok); }
.hist-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.hist-what { font-weight: 700; }
.hist-who, .hist-when { font-size: .86rem; color: var(--muted); }
.hist-who b { color: var(--ink); }
.hist-diff { width: 100%; max-width: 760px; border-collapse: collapse; margin: 8px 0 0; font-size: .88rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.hist-diff th, .hist-diff td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; overflow-wrap: anywhere; }
.hist-diff thead th { background: var(--bg); color: var(--muted); font-size: .76rem; }
.hist-diff tbody th { width: 26%; font-weight: 700; }
.hist-diff td.old { color: var(--danger); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.hist-diff td.new { color: var(--ok); font-weight: 700; }
.hist-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; margin-top: 8px; }
.hist-full summary { cursor: pointer; font-size: .88rem; font-weight: 700; color: var(--accent); }
.hist-full .facts { margin-top: 8px; max-width: 620px; }
.change-list { list-style: none; margin: 10px 0 30px; padding: 0; border-top: 1px solid var(--line-soft); }
.change-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.cr-main { min-width: 0; }
.cr-main .dl-name { display: inline; margin-right: 8px; }
.cr-main .hint { margin: 2px 0 0; }
.cr-side { display: flex; align-items: center; gap: 12px; font-size: .88rem; }

/* ---------------------------------------------------------------- intégration sur un autre site */
.embed-box { margin: 18px 0 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.embed-box summary { cursor: pointer; padding: 12px 14px; font-weight: 700; }
.embed-inner { padding: 0 14px 14px; }
.embed-inner .hint { margin: 0 0 10px; }
.embed-code { width: 100%; font: .82rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); resize: vertical; }
.embed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0 0; }
.embed-actions .hint { margin: 0; }
/* la page intégrée elle-même */
body.embed { background: var(--surface); }
.embed-wrap { padding: 14px 12px 10px; }
.embed-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 12px; }
.embed-head h1 { font-size: clamp(1.15rem, 4vw, 1.6rem); line-height: 1.2; margin: 0; }
.embed-head h1 a { color: var(--ink); text-decoration: none; }
.embed-head .dog-ids { margin: 2px 0 0; }
.embed-coi { margin: 4px 0 0; font-size: .88rem; color: var(--muted); }
.embed-coi b { color: var(--ink); }
.embed-brand img { display: block; height: 30px; width: auto; }
.embed-foot { margin: 10px 0 0; font-size: .78rem; color: var(--muted); }
@media print { .embed-brand img { filter: none; } }

/* formulaire chien : chiens aux noms proches, pendant la saisie */
.similar-box { margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--warn); border-radius: 10px; background: color-mix(in srgb, var(--warn) 9%, var(--surface)); font-size: .88rem; }
.similar-box p { margin: 0 0 6px; font-weight: 700; }
.similar-box ul { margin: 0; padding-left: 18px; }
.similar-box li { margin: 2px 0; }

/* bouton de suppression (administrateurs) */
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #FFF; }
.btn.danger.primary { background: var(--danger); border-color: var(--danger); color: #FFF; }
.delete-summary { margin: 0 0 14px; padding-left: 20px; }
.delete-summary li { margin: 3px 0; }

/* accueil : chiens adultes à placer (seulement s'il y en a) */
.home-available { margin: 26px 0 8px; padding: 16px; border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.ha-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 6px 16px; margin: 0 0 12px; }
.ha-head h2 { font-family: var(--serif); font-size: 1.3rem; margin: 0; }
.ha-head .sub { margin: 2px 0 0; }
.ha-head > a { font-weight: 700; font-size: .92rem; }
.home-available .dog-cards { margin: 0; }
.home-available .dc-note { color: var(--muted); }

/* ---------------------------------------------------------------- partage */
.share { position: relative; display: inline-block; }
.share > summary { list-style: none; }
.share > summary::-webkit-details-marker { display: none; }
.share-btn { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.share-menu {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 190px;
  display: flex; flex-direction: column; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 14, 8, .16);
}
.share-menu a, .share-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 11px; border: 0; border-radius: 8px;
  background: none; color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.share-menu a:hover, .share-menu button:hover { background: var(--accent-soft); }
.mating-share { margin: 4px 0 12px; }

/* ---------------------------------------------------------------- santé dans l'arbre */
.ped .pc .health { margin-top: 3px; gap: 3px; }
.ped .pc .hb { font-size: .6rem; padding: 1px 5px; }
.ped .pc.compact .health { margin-top: 2px; }
.health-summary { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: .86rem; }
.health-summary b { width: 100%; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* ---------------------------------------------------------------- bilan santé de la descendance */
.progeny-health { margin: 4px 0 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.progeny-health h3 { font-family: var(--serif); font-size: 1.1rem; margin: 0 0 2px; }
.progeny-health > .hint { margin: 0 0 12px; }
.prog-rows { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .prog-rows { grid-template-columns: repeat(3, 1fr); } }
.prog-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 6px; font-size: .9rem; }
.prog-head span { font-size: .8rem; color: var(--muted); }
.prog-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--line-soft); }
.prog-seg { display: block; min-width: 4px; }
.prog-seg.lv-ok { background: var(--ok); }
.prog-seg.lv-warn { background: var(--warn); }
.prog-seg.lv-bad { background: var(--danger); }
.prog-seg.lv-wait { background: var(--muted); }
.prog-values { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.prog-row .hint { margin: 0; }

/* ---------------------------------------------------------------- pages d'élevage */
.kennel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; margin: 26px 0 16px; }
.kennel-logo { flex: 0 0 auto; width: 150px; height: 150px; display: grid; place-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.kennel-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.kennel-id { flex: 1 1 280px; min-width: 0; }
.kennel-kicker { margin: 0; font-size: .74rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.kennel-id h1 { font-family: var(--serif); font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.1; margin: 2px 0 0; }
.kennel-id .kanji { margin: 4px 0 0; font-family: var(--serif); font-size: 1.1rem; color: var(--muted); }
.kennel-country { margin: 4px 0 0; color: var(--muted); }
.kennel-id .edit-actions { margin-top: 14px; }
.kennel-about { max-width: 820px; margin: 0 0 18px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.kennel-about p { margin: 0; overflow-wrap: anywhere; }
.year-title { font-family: var(--serif); font-size: 1.05rem; margin: 18px 0 4px; }
.kennel-logo-now img { max-width: 160px; max-height: 160px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: var(--surface); }
.kennel-danger { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: -14px 0 30px; }
.kennel-danger form { margin: 0; }
.kennel-online p { margin: 2px 0; overflow-wrap: anywhere; }
.review-facts { margin: 8px 0 0; max-width: 640px; }
/* liste des élevages */
.kennel-grid { list-style: none; margin: 10px 0 30px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kennel-card { display: flex; align-items: center; gap: 14px; height: 100%; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
.kennel-card:hover { border-color: var(--accent); }
.kc-logo { flex: 0 0 auto; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 12px; background: var(--line-soft); overflow: hidden; }
.kc-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.kc-txt { min-width: 0; }
.kc-name { display: block; font-weight: 700; font-size: 1.02rem; }

/* pages d'élevage : réseaux sociaux et galerie */
.btn.social { display: inline-flex; align-items: center; gap: 7px; }
.kennel-gallery { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.kennel-gallery a { display: block; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--line-soft); }
.kennel-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.kennel-gallery a:hover img { transform: scale(1.04); }
.kg-edit { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.kg-edit li { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.kg-edit img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.kg-edit form { margin: 0; }
.kennel-gallery-edit .count { margin-left: 6px; }
.kennel-later { margin: -18px 0 26px; }

/* onglets sur écran étroit : ils occupent toute la largeur et se resserrent pour tenir */
@media (max-width: 520px) {
  .tabs-ready .activity-head .tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; width: 100%; border-radius: 18px; overflow: visible; }
  .activity-head .tabs button { flex: 1 1 auto; padding: 7px 6px; font-size: .78rem; }
  .activity-head .tabs .count { margin-left: 3px; padding: 0 5px; }
}

/* pays de naissance, sur sa propre ligne sous le sexe, la couleur et l'année */
.pc .ctry { display: block; font-size: .72rem; color: var(--muted); line-height: 1.35; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* drapeaux des pays, dans l'arbre */
.flag { display: inline-block; width: 16px; height: 12px; margin: 0 4px 0 1px; vertical-align: -1px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); object-fit: cover; }

/* arbre : texte centré sous la photo ; à gauche quand la photo est à côté (petites cases) */
.pc .txt { text-align: center; }
.pc .health { justify-content: center; }
.pc.t-row .txt, .pc.t-rowmini .txt { text-align: left; }
.pc.t-row .health, .pc.t-rowmini .health { justify-content: flex-start; }

/* fiche : kanji, puis « Registration n° … – NIPPO Registered » */
.dog-kanji { margin: 4px 0 0; font-family: var(--serif); font-size: 1.05rem; color: var(--muted); }
.dog-reg { margin: 2px 0 8px; font-size: .93rem; color: var(--ink); }
.dog-reg b { font-weight: 700; }
.dog-reg .nippo { font-weight: 400; }

/* formulaire : affections oculaires */
.eye-conditions[hidden] { display: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 16px; margin: 4px 0 8px; }
.check-grid label.check { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 8px; font-size: .9rem; font-weight: 400; }
.check-grid label.check input { flex: 0 0 auto; margin-top: 2px; }
.eye-conditions input[type="text"] { max-width: 420px; }

/* formulaire : les trois porteurs (crème, longcoat, pinto) côte à côte */
.carrier-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }

/* formulaire : nombre et liste des dents manquantes, visibles pour « Missing teeth » */
.missing-teeth { display: grid; grid-template-columns: 1fr; gap: 0 18px; }
@media (min-width: 700px) { .missing-teeth { grid-template-columns: 220px 1fr; } }
[data-reveal-name][hidden] { display: none; }

/* titres avant et après le nom : sur la fiche */
h1 .pre-title, h1 .post-title { font-family: var(--sans, inherit); font-weight: 700; color: var(--accent); vertical-align: middle; letter-spacing: .01em; }
h1 .post-title { font-size: .56em; }
/* le titre d'avant sur sa propre ligne, au-dessus du nom, pour ne jamais couper le nom */
h1 .pre-title { display: block; margin: 0 0 4px; font-size: .62em; line-height: 1.25; }
/* dans l'arbre : titre d'après et sexe à droite du nom */
.pc .nm .post { font-size: .72em; font-weight: 700; color: var(--accent); }
.pc .nm .sx { font-weight: 400; color: var(--muted); white-space: nowrap; }

/* barre de recherche : suggestions de chiens */
.ac-anchor.qs { display: block; flex: 1 1 auto; min-width: 0; }
.ac-anchor.qs input { width: 100%; }
.qs .ac-list { top: calc(100% + 6px); min-width: 280px; color: var(--ink); text-align: left; }
.ac-list li.ac-all { border-top: 1px solid var(--line-soft); margin-top: 2px; }
.ac-list li.ac-all .ac-name { font-weight: 700; color: var(--accent); }

/* fusion des fiches en double */
.merge-box { margin: 26px 0 30px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.merge-box h2 { font-family: var(--serif); font-size: 1.1rem; margin: 0 0 4px; }
.merge-box .hint { margin: 0 0 12px; }
.dup-list { list-style: none; margin: 14px 0 30px; padding: 0; display: grid; gap: 12px; }
.dup-group { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.dup-group h2 { font-family: var(--serif); font-size: 1.05rem; margin: 0 0 6px; }
.dup-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dup-people li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }

/* page des doublons : tableau de fusion */
.dup-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: .92rem; }
.dup-table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 8px 4px 0; font-weight: 700; }
.dup-table td { padding: 6px 8px 6px 0; border-top: 1px dotted var(--line); vertical-align: baseline; }
.dup-table input { width: 17px; height: 17px; accent-color: var(--accent); }
.dup-dogs { white-space: nowrap; color: var(--muted); font-size: .85rem; }
.dup-group .form-actions { margin: 0; }
.dup-auto { margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.dup-auto p { margin: 0 0 10px; font-size: .92rem; }
.dup-warn { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--warn); margin-left: 6px; }

.person-affix { margin: 2px 0 8px; color: var(--muted); }
.person-affix b { color: var(--ink); }

/* fusion des affixes */
.kn-target { max-width: 420px; margin: 0 0 12px; }
.kn-table td:last-child, .kn-table th:last-child { text-align: right; }

/* annonces : description dépliable */
.avail-card .avail-desc.open { display: block; -webkit-line-clamp: none; overflow: visible; }
.avail-more { display: block; margin: 4px 0 0; font-size: .88rem; text-align: left; }

/* accueil : le bloc « Adult dogs available » un peu plus grand */
.home-available { padding: 20px; }
.home-available .ha-head h2 { font-size: 1.55rem; }
.home-available .dog-cards { gap: 14px; }
.home-available .dcard { padding: 14px; gap: 16px; }
.home-available .dcard .thumb { width: 92px; height: 92px; border-radius: 12px; }
.home-available .dc-name { font-size: 1.08rem; }
.home-available .dc-jp { font-size: .9rem; }
.home-available .dc-meta { font-size: .86rem; }
.home-available .dc-note { font-size: .82rem; }

/* pédigré : ajouter un parent manquant */
.pc.nodog .add-parent { font: inherit; font-size: .82rem; font-weight: 700; color: var(--accent); background: none; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.pc.nodog .add-parent:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.add-parent-box { width: 100%; padding: 6px; text-align: left; }
.add-parent-box input { width: 100%; font: inherit; font-size: .86rem; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.add-parent-box .hint { margin: 6px 0 0; font-size: .78rem; }
.add-parent-box .field-error { margin: 6px 0 0; }

/* accueil : appel aux dons */
.donate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  margin: 26px 0 8px; padding: 18px 20px; border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); }
.donate-txt { flex: 1 1 320px; min-width: 0; }
.donate h2 { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 4px; }
.donate p { margin: 0; color: var(--muted); max-width: 60ch; }
.donate-btn { flex: 0 0 auto; }

/* page Admin : cartes et pastille de rappel */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin: 10px 0 26px; }
.admin-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
.admin-card:hover { border-color: var(--accent); }
.admin-icon { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.admin-txt { min-width: 0; }
.admin-title { display: block; font-weight: 700; margin-bottom: 2px; }
.admin-sub { display: block; font-size: .9rem; color: var(--muted); }
.todo-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .74rem; font-weight: 700; vertical-align: 2px; }

/* accueil : élevages récemment mis à jour */
.home-kennels { margin: 26px 0 8px; }
.home-kennels .kennel-grid { margin: 10px 0 6px; }
/* six élevages : trois par rangée sur ordinateur, deux rangées */
@media (min-width: 900px) { .home-kennels .kennel-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 620px) and (max-width: 899px) { .home-kennels .kennel-grid { grid-template-columns: repeat(2, 1fr); } }
.kc-when { display: block; font-size: .74rem; font-weight: 700; color: var(--accent); }

/* page d'élevage : cartes des chiens */
.sex-filter { margin: 0 auto 0 12px; }
.seg button { font: inherit; padding: 6px 14px; border: 0; border-radius: 999px; background: none; font-size: .9rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--bg); }
.kennel-dogs { list-style: none; margin: 6px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.kdog { display: flex; align-items: flex-start; gap: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
.kdog:hover { border-color: var(--accent); }
.kdog .thumb { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--line-soft); }
.kdog .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kdog-txt { min-width: 0; flex: 1 1 auto; }
.kdog .dc-name { display: block; font-weight: 700; line-height: 1.25; }
.kdog .health { margin-top: 4px; }
.kdog-bar { display: flex; align-items: center; gap: 7px; margin-top: 6px; max-width: 220px; }
.kdog-track { flex: 1 1 auto; height: 4px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.kdog-fill { display: block; height: 100%; border-radius: 999px; background: var(--ok); }
.kdog-fill.lv-green { background: var(--ok); }
.kdog-fill.lv-yellow { background: #D8B31A; }
.kdog-fill.lv-orange { background: var(--warn); }
.kdog-fill.lv-red { background: var(--danger); }
.dcard .kdog-bar { margin-top: 6px; }
.kdog-pc { font-size: .72rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.kdog-pc.lv-green { color: var(--ok); }
.kdog-pc.lv-yellow { color: #9A7B0A; }
.kdog-pc.lv-orange { color: var(--warn); }
.kdog-pc.lv-red { color: var(--danger); }
.year-block[hidden] { display: none; }

/* formulaire du chien : explication du taux de remplissage */
.complete-tip { margin: 0 0 16px; }
.complete-tip p { margin: 0 0 6px; }
.complete-tip p:last-child { margin: 0; }

.hint-inline { font-weight: 400; color: var(--muted); }
.kennel-nippo, .kennel-breeder { margin: 3px 0 0; color: var(--muted); }
.kennel-nippo b { color: var(--ink); }
/* même police et même gris que le pays et le nom de l'éleveur */
.kc-nippo { display: block; font-size: .78rem; font-weight: 400; color: var(--muted); }

/* recherche : filtres toujours visibles, en trois sections */
.filters summary { padding: 8px 0; color: var(--accent); }
.filters-open { margin: 6px 0 6px; }
.filter-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.filters-open .filter-title:first-child { margin-top: 4px; padding-top: 0; border-top: 0; }
.filters-open .check { margin-top: 8px; }
/* fond de page beige : les champs restent blancs pour se détacher */
.filters-open .field input[type="text"],
.filters-open .field input[type="search"],
.filters-open .field select { background: var(--surface); }
.filters-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 18px 0 4px; }

/* même style que « Updated … » des cartes de l'accueil */
.kennel-updated { margin: 4px 0 0; font-size: .74rem; font-weight: 700; color: var(--accent); }

/* nouveautés : choix de la période */
.period-filter { flex-wrap: wrap; margin: 4px 0 10px; }
/* téléphone : chaque période devient une pastille séparée, qui passe à la ligne seule */
@media (max-width: 600px) {
  .period-filter { display: flex; gap: 8px; border: 0; padding: 0; border-radius: 0; background: none; }
  .period-filter a { border: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
  .period-filter a[aria-current] { border-color: var(--ink); }
}

/* recadrage d'une photo */
.crop-dialog { border: 0; border-radius: 16px; padding: 16px; max-width: min(92vw, 760px); background: var(--surface); color: var(--ink); }
.crop-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.crop-stage { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.crop-stage img { max-width: 100%; max-height: 65vh; display: block; }
.crop-box { position: absolute; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45); cursor: move; touch-action: none; }
.crop-handle { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: nwse-resize; touch-action: none; }
.crop-dialog .hint { margin: 10px 0 0; }
.crop-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.pm-crop { margin: 0; }

/* carte des étalons */
.stud-map { position: relative; z-index: 0; isolation: isolate;   /* la carte reste sous l'en-tête et les menus */
  height: 420px; border: 1px solid var(--line); border-radius: 14px; margin: 6px 0 4px; background: var(--line-soft); overflow: hidden; }
.leaflet-container { z-index: 0; }
.stud-map .leaflet-popup-content { font: inherit; font-size: .9rem; }
.stud-list { margin-top: 14px; }

/* étalons : critères à choix multiple */
.pick { margin: 0; }
.pick legend { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.pick-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-item { position: relative; margin: 0; }
.pick-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.pick-item span { display: inline-block; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: .85rem; cursor: pointer; }
.pick-item input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.pick-item input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.stud-filters { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .stud-filters { grid-template-columns: 1fr 1fr; } }

.stud-pop { display: flex; gap: 10px; align-items: flex-start; min-width: 190px; }
.stud-pop-img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
/* liens des bulles de la carte : couleur du site, plus prioritaire que celle de Leaflet */
.leaflet-container .leaflet-popup-content a, .leaflet-container .stud-pop a { color: var(--accent); }
.leaflet-container .leaflet-popup-content a:hover { color: var(--accent); text-decoration: underline; }
.pick-fold > summary { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); cursor: pointer; padding: 2px 0; }
.pick-fold[open] > summary { margin-bottom: 6px; }

/* filtres automatiques : le bouton n'est utile que sans JavaScript */
.search-form.auto .filters-actions button[type="submit"] { display: none; }

/* étalon : pastille sous le nom et lien de contact */
.avail-badge.stud-badge { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.stud-contact { display: inline-block; margin-left: 8px; font-size: .85rem; font-weight: 700; }
.home-studs { margin: 26px 0 8px; }
.home-map { height: 340px; margin-top: 10px; }

/* recherche de personnes : champs blancs sur le fond beige, comme les chiens */
.search-form .filter-grid .field input[type="text"],
.search-form .filter-grid .field input[type="search"],
.search-form .filter-grid .field select { background: var(--surface); }

.person-account { margin: 4px 0 10px; color: var(--muted); font-size: .9rem; }

/* compte : fiches de personnes rattachées */
.claim-list { list-style: none; margin: 10px 0 18px; padding: 0; display: grid; gap: 8px; }
.claim-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding-bottom: 8px; border-bottom: 1px dotted var(--line); }
.claim-list form { margin-left: auto; }

/* formulaire du chien : la case « available at stud », bien visible */
/* fieldset.field remet bordure et marges à zéro : on repasse derrière. */
fieldset.field.stud-box { padding: 16px 18px; border: 2px solid var(--accent);
  border-radius: 14px; background: var(--accent-soft); margin-bottom: 16px; }
.stud-box legend { float: left; width: 100%; margin: 0 0 8px; padding: 0; font-weight: 700; color: var(--accent); }
.stud-box legend + * { clear: both; }
.big-check { display: inline-flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 700; margin: 0; }
.big-check input { width: 22px; height: 22px; accent-color: var(--accent); }
.stud-box .hint { margin-top: 8px; }

/* compteurs simples : un grand nombre puis son libellé */
.metric > b { display: block; font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; }
.metric > span { display: block; font-size: .85rem; color: var(--muted); }

/* les deux champs de titres commencent toujours une ligne, pour rester alignés */
@media (min-width: 700px) { .form-grid .start-row { grid-column: 1; } }

/* page d'élevage : mâle proposé à la saillie */
/* même pastille que sous le nom d'un chien disponible */
.stud-flag { display: inline-block; margin-top: 5px; padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 700; }

/* carte : repère portant le nombre, et bulle qui liste les chiens du lieu */
.map-pin { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: .78rem; font-weight: 700;
  border: 2px solid #FFF; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.map-pin.vague { background: color-mix(in srgb, var(--accent) 55%, #FFF); color: var(--ink); }
.map-head { margin: 0 0 6px; font-size: .92rem; }
.map-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.map-list li { display: flex; gap: 8px; align-items: flex-start; }
.map-more { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }

/* bulle de la carte : vignettes compactes, lignes serrées */
.map-list .stud-pop-img { width: 40px; height: 40px; border-radius: 6px; }
.map-list li { font-size: .85rem; line-height: 1.35; }
.map-list a { text-decoration: none; }
.map-list a:hover { text-decoration: underline; }
/* étalons : résumé des critères sur la ligne repliée, bien lisible */
.filters > summary { padding: 12px 0; font-size: 1.05rem; }
.search-form .filters { margin: 4px 0 10px; }

/* test d'accouplement : chiot imaginaire à la place d'un parent */
.mating-fields { align-items: start; }
.mating-fields .mating-x { padding: 34px 0 0; }
@media (max-width: 759px) { .mating-fields .mating-x { padding: 0 0 8px; } }
.mating-side { min-width: 0; }
.mating-side > .field { margin-bottom: 8px; }
.mating-future { margin: 0 0 16px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); }
.mating-future summary { cursor: pointer; font-size: .86rem; font-weight: 700; color: var(--muted); }
.mating-future[open] summary { color: var(--ink); margin-bottom: 4px; }
.mating-future .hint { margin: 0 0 10px; }
.mating-future .field { margin: 0 0 10px; }
.mating-future .field input { background: var(--surface); box-sizing: border-box; max-width: 100%; }
.dcard.virtual { border-style: dashed; }
.dcard.virtual:hover { border-color: var(--line); }
.virtual-mark { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-family: var(--serif); font-size: 1.8rem; color: var(--muted); }
.pc.virtual { background: var(--accent-soft); }
.pc.virtual .ttl { color: var(--accent); }

/* arbre : menu ☰ après le nom du chien (membres connectés) */
.pc-menu { display: inline-flex; align-items: center; justify-content: center; vertical-align: 1px; width: 1.55em; height: 1.35em;
  margin-left: 2px; font-size: .95em; font-weight: 400; line-height: 1; color: var(--muted); border: 1px solid var(--line);
  border-radius: 4px; background: var(--surface); cursor: pointer; }
.pc-menu:hover, .pc-menu:focus-visible { color: var(--ink); border-color: var(--accent); outline: none; }
.dog-menu { position: absolute; z-index: 1000; min-width: 170px; padding: 5px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .16); display: flex; flex-direction: column; }
.dog-menu button { font: inherit; font-size: .9rem; text-align: left; padding: 8px 12px; border: 0; border-radius: 6px; background: none; color: var(--ink); cursor: pointer; }
.dog-menu button:hover, .dog-menu button:focus-visible { background: var(--bg); outline: none; }
.dog-menu button.danger { color: var(--danger); }

/* fenêtre d'édition rapide */
.popup-dlg { width: min(96vw, 1040px); height: min(92vh, 1100px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 14px;
  background: var(--bg); overflow: hidden; }
.popup-dlg::backdrop { background: rgba(0, 0, 0, .55); }
.popup-dlg iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
.popup-x { position: absolute; top: 8px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.popup-x:hover { border-color: var(--accent); }
body.in-popup main.wrap { padding-top: 14px; padding-bottom: 24px; }
body.in-popup .page-title { padding-right: 44px; }
@media (max-width: 600px) { .popup-dlg { width: 100vw; height: 100dvh; border-radius: 0; } }
.pc .nm-end { white-space: nowrap; }
.field-warn { color: var(--warn); font-size: .84rem; font-weight: 700; margin: 5px 0 0; }
.field-warn a { color: inherit; text-decoration: underline; }

/* ---------------------------------------------------------------- dentition
   Schéma des dents du formulaire (Teeth::chart) : dents vues de face, on
   clique sur celles qui manquent, elles apparaissent barrées. */
.teeth-box[hidden] { display: none; }
.teeth-wrap { max-width: 600px; margin: 6px auto 4px; }
.teeth-svg { display: block; width: 100%; height: auto; }
.teeth-svg text { font-family: var(--sans); }
.tooth .t-body { fill: var(--surface); stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; transition: fill .12s; }
.tooth .t-hit { fill: transparent; }
.tooth .t-x { fill: none; stroke: var(--danger); stroke-width: 2; stroke-linecap: round; display: none; }
.tooth.is-missing .t-body { fill: var(--danger-soft); stroke: var(--danger); stroke-dasharray: 3 2; }
.tooth.is-missing .t-x { display: inline; }
.t-gum { fill: #F4D3CD; }
.t-mid { stroke: var(--line); stroke-dasharray: 4 3; }
.t-lab { font-size: 8px; fill: var(--muted); text-anchor: middle; }
.t-jaw { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; fill: var(--muted); text-anchor: middle; }
.t-side { font-size: 10px; font-weight: 700; fill: var(--accent); }
.t-side-r { text-anchor: end; }
@media (prefers-color-scheme: dark) { .t-gum { fill: #4A2C2A; } }
[data-teeth-chart] .tooth { cursor: pointer; outline: none; }
[data-teeth-chart] .tooth:hover .t-body { fill: var(--accent-soft); }
[data-teeth-chart] .tooth.is-missing:hover .t-body { fill: var(--danger-soft); }
[data-teeth-chart] .tooth:focus-visible .t-body { stroke: var(--accent); stroke-width: 2.4; }
.teeth-sum { text-align: center; font-weight: 700; margin: 4px 0 12px; }
.teeth-count { max-width: 360px; margin: 0 auto; }
.dna-carrier { }
.dna-affected { color: var(--danger); font-weight: 700; }
/* « Mon profil » : création de sa fiche propriétaire */
.create-entry > summary { cursor: pointer; list-style: none; }
.create-entry > summary::-webkit-details-marker { display: none; }
.create-entry > summary h2 { display: inline; }
.create-entry > summary::after { content: " +"; color: var(--accent); font-weight: 700; }
.create-entry[open] > summary::after { content: " −"; }
.site-foot .foot-credit { margin: 14px 0 0; font-size: .8rem; }
.foot-credit a { color: var(--muted); }
.foot-credit a:hover { color: var(--ink); }
.ped-wrap.editing { overflow: visible; }
/* Fiche d'une personne : site web, Facebook, Instagram en gros boutons */
.person-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }
.person-links .btn { font-size: 1rem; padding: 10px 18px; }
.panel-title-single { font-size: 1rem; margin: 18px 0 0; color: var(--muted); }
/* Arbre : recherche d'un parent manquant. Écriture droite et lisible, et la
   liste des suggestions prend sa place dans la case (rien n'est coupé). */
.add-parent-box { font-style: normal; color: var(--ink); font-size: .9rem; }
.add-parent-box input { font-size: .95rem; font-style: normal; }
.add-parent-box .ac-list { position: static; max-height: none; margin-top: 6px; box-shadow: 0 6px 18px rgba(20, 14, 8, .10); }
.add-parent-box .ac-list li { padding: 8px 10px; }
.add-parent-box .ac-name { font-weight: 700; color: var(--ink); }
.add-parent-box .ac-info { color: var(--muted); }
.add-parent-box .ac-all { color: var(--accent); font-weight: 700; border-top: 1px solid var(--line-soft); margin-top: 4px; }
/* Administration : liste des membres */
.members-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 560px; margin: 14px 0 18px; }
.members-search input { flex: 1 1 220px; min-width: 0; font: inherit; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); }
.member-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.member { display: grid; grid-template-columns: 1fr; gap: 10px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
@media (min-width: 820px) { .member { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.member-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.member-name { font-size: 1.05rem; }
.member-mail { overflow-wrap: anywhere; }
.member-meta { color: var(--muted); font-size: .84rem; }
.member-unconfirmed { color: var(--warn); font-weight: 700; }
.member-none { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.member-entries .claim-list { margin: 0 0 8px; }
.member-link { display: flex; align-items: flex-start; gap: 8px; }
.member-link .field { flex: 1 1 auto; margin: 0; }
.member-link .btn { flex: 0 0 auto; margin-top: 2px; }
.members-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 20px 0; }
.member-dogs { margin-top: 6px; }
.member-dogs summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.member-dogs ul { list-style: none; margin: 6px 0 0; padding: 0; max-height: 260px; overflow-y: auto; font-size: .88rem; }
.member-dogs li { padding: 3px 0; border-bottom: 1px dotted var(--line); }
/* Page de texte (« How the COI is calculated ») */
.prose { max-width: 760px; }
.prose .lead { font-size: 1.08rem; color: var(--muted); }
.prose h2 { font-family: var(--serif); font-size: 1.3rem; margin: 30px 0 8px; }
.prose h3 { font-family: var(--serif); font-size: 1.08rem; margin: 22px 0 8px; }
.prose p, .prose li { line-height: 1.65; }
.prose ul { padding-left: 1.2em; }
.formula-big { font-family: var(--serif); font-size: 1.25rem; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.coi-table { border-collapse: collapse; width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.coi-table th, .coi-table td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); }
.coi-table th { font-size: .85rem; color: var(--muted); }
.coi-cta { margin: 28px 0 10px; }
.foot-pages { margin-top: 8px; }
/* Pédigré vide : un grand encart pour inviter à ajouter les parents */
.ped-empty-note { color: var(--ink); font-size: 1rem; }
.ped-empty .ptable.L1 { grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 560px; }
.ped-empty .ph-head { font-size: .95rem; padding: 12px 18px; }
.ped-empty .pc { padding: 18px; font-size: 1rem; min-height: 96px; }
.ped-empty .pc.nodog .txt { font-size: 1.05rem; }
.ped-empty .pc.nodog .add-parent { width: 100%; font-size: 1.05rem; font-style: normal; padding: 16px 20px; border-width: 2px; border-radius: 14px; }

/* Fiche du chien : légère ombre sous la photo principale. */
.main-photo { box-shadow: 0 10px 28px rgba(28, 25, 23, .12); border-color: transparent; }
@media (prefers-color-scheme: dark) { .main-photo { box-shadow: 0 10px 28px rgba(0, 0, 0, .45); } }

/* ==========================================================================
   Fond texturé (papier et tweed, dans les tons du site) et cadres blancs :
   chaque page est posée dans un grand cadre ; la fiche chien et le test
   d'accouplement ont un cadre par partie.
   ========================================================================== */
body { background: #FBF9F6 url("bg-texture-pale.jpg") repeat; }
.site-head { background: #F7F3ED url("head-texture-pale.jpg") repeat; border-bottom: 3px solid #8C5C3A; }
.site-head .search input, .site-head input[type="search"] { background: #FFF; border-color: var(--line); }
.page-card, .panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 1px 3px rgba(70, 45, 20, .06);
}
.page-card { margin: 22px 0 28px; padding: 6px 22px 26px; }
.panel { margin: 18px 0; padding: 4px 18px 20px; }
.panel.dog-top { margin-top: 22px; padding-top: 18px; }
.panel > h2.sec:first-child { margin-top: 12px; padding-top: 0; border-top: 0; }
.panel > .page-title:first-child { margin-top: 18px; }
.panel .embed-box { margin-bottom: 0; }
@media (min-width: 760px) {
  .page-card { padding: 10px 34px 34px; }
  .panel { padding: 8px 34px 30px; }
  .panel.dog-top { padding-top: 30px; }
}
@media (prefers-color-scheme: dark) {
  body { background-image: url("bg-texture-dark.jpg"); }
  .site-head { background: var(--surface); border-bottom-color: var(--line); }
  .site-head .search input, .site-head input[type="search"] { background: var(--bg); }
}
/* Accueil : la photo, les chiffres et les raccourcis posés sur le fond, les rubriques en cadres. */
.panel.activity, .panel.home-studs, .panel.home-kennels, .panel.about { margin: 26px 0; padding-top: 22px; }
/* Arbre : le nom d'un chien se sélectionne à la souris (pour le copier). */
a.pc { -webkit-user-drag: none; -webkit-user-select: text; user-select: text; }
/* Texture très claire à l'intérieur des cadres : indicateurs, arbre et portées. */
.metric, .ptable, .litter { background: var(--surface); }
.panel, .embed-box { background: #FEFDFB url("inner-texture-pale.jpg") repeat; }
.pc, a.pc { background: transparent; }
a.pc:hover { background: rgba(255, 255, 255, .6); }
.ph-head { background: #F6F1EA; }
@media (prefers-color-scheme: dark) {
  .metric, .ptable, .litter { background: var(--surface); }
  .ph-head { background: var(--bg); }
}
/* Arbre sur 3 générations : photo au-dessus du nom aussi en dernière colonne, sans qu'elle devienne immense. */
/* Arbre élargi à toute la largeur : les photos ne grandissent pas avec les
   colonnes, pour que l'arbre sur 3 générations tienne en hauteur dans l'écran. */
@media (min-width: 760px) {
  .L3 .pc.c1 .pic { max-width: 230px; margin-left: auto; margin-right: auto; }
  .L3 .pc.c2 .pic { max-width: 132px; margin-left: auto; margin-right: auto; }
  .L3 .pc.t-row .pic { width: 64px; height: 64px; }
  .L3 .pc.t-row { padding-top: 6px; padding-bottom: 6px; }
  /* 4 générations : dernière colonne plus large et en deux lignes, pour tenir dans l'écran. */
  .L4 { grid-template-columns: 170px 170px 230px 370px; }
  .L4 .pc.c1 .pic { max-width: 200px; margin-left: auto; margin-right: auto; }
  .L4 .pc.c2 .pic { max-width: 118px; margin-left: auto; margin-right: auto; }
  .L4 .pc.c2, .L4 .pc.c3 { padding-top: 4px; padding-bottom: 4px; line-height: 1.25; }
  .L4 .pc.t-row { padding-top: 3px; padding-bottom: 3px; line-height: 1.25; }
  .L4 .pc.t-row .pic { width: 34px; height: 34px; }
  .L4 .pc.t-row .ctry, .L4 .pc.t-row .reg, .L4 .pc.t-row .jp { display: none; }
}
@media (prefers-color-scheme: dark) { .panel, .embed-box { background: var(--surface); } }
.panel.dog-top { background: var(--surface); }
.dog-info h1.one-line { white-space: nowrap; overflow-wrap: normal; }
.dog-info, .dog-head-block { min-width: 0; }
/* Dernière génération : la photo est collée au bord gauche de la case. */
.pc.t-row:has(> .pic) { padding-left: 0; gap: 8px; }
.pc.t-row > .pic { border-radius: 0 6px 6px 0; }
.pc.t-row.rep:has(> .pic) { padding-left: 4px; }
/* Portées plus compactes : date et parents sur une ligne, chiots moins hauts. */
.litter-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 6px 12px; }
.litter-date { font-size: .74rem; }
.litter-par { margin: 0; font-size: .82rem; }
.pups { padding: 0 12px 2px; }
.pups li { padding: 5px 0; gap: 9px; }
.pups .thumb { width: 34px; height: 34px; border-radius: 6px; }
.pups .ptxt { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 1px; }
.pups .pd { display: inline; margin: 0; font-size: .78rem; }
.pups .pd .flag { width: 16px; height: 12px; vertical-align: -1px; border-radius: 2px; }
.pups .health { margin: 0; }
.pups .pup-stud { padding: 1px 8px; font-size: .7rem; line-height: 1.5; }


/* ================= Ajouts venus du site Shikoku : ancêtres communs, outils de la race, rareté, impression ================= */
/* ---------- Ancêtres communs et toile des liens (bloc à déplier sous le COI) ---------- */
.links-box { margin: 12px 0 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.links-box > summary { cursor: pointer; padding: 10px 14px; font-weight: 800; font-size: .92rem; list-style: none; display: flex; align-items: center; gap: 8px; }
.links-box > summary::-webkit-details-marker { display: none; }
.links-box > summary::before { content: "▸"; color: var(--accent); }
.links-box[open] > summary::before { transform: rotate(90deg); }
.links-box > summary .count { font-size: .74rem; font-weight: 700; color: var(--muted); background: var(--line-soft); border-radius: 10px; padding: 1px 8px; }
.links-body { padding: 0 14px 14px; }
.links-body .sub { margin: 0 0 10px; }
.links-table-wrap { overflow-x: auto; }
.links-table { width: 100%; border-collapse: collapse; font-size: .85rem; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.links-table th { background: var(--bg); text-align: left; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 10px; }
.links-table td { padding: 6px 10px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.links-table .lt-name a { font-weight: 700; color: inherit; text-decoration: none; }
.links-table .lt-name a:hover { text-decoration: underline; }
.links-table .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; }
.links-table .gs, .links-table .gd { display: inline-block; font-size: .72rem; padding: 0 7px; border-radius: 10px; margin: 1px 3px 1px 0; white-space: nowrap; }
.links-table .gs { background: #E8F0FB; color: #2A5AA0; }
.links-table .gd { background: #FBEBE7; color: #A02A1A; }
.links-table .lt-share { white-space: nowrap; }
.links-table .lt-bar { display: inline-block; width: 90px; height: 7px; background: var(--line-soft); border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.links-table .lt-bar i { display: block; height: 100%; background: var(--accent); }
.links-table tfoot td { font-weight: 800; background: var(--bg); }
.links-h { font-size: .95rem; margin: 18px 0 4px; }
.links-web-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 4px; text-align: center; }
.links-web { display: block; margin: 0 auto; max-width: 100%; height: auto; min-width: min(var(--w, 560px), 560px); font-family: var(--sans); }
.links-web path { fill: none; }
.links-web text { font-size: 12.5px; font-weight: 700; }
.links-web .lk-n rect { stroke-opacity: .4; }
.links-web .lk-s rect { fill: #E8F0FB; stroke: #2A5AA0; } .links-web .lk-s text { fill: #2A5AA0; }
.links-web .lk-d rect { fill: #FBEBE7; stroke: #A02A1A; } .links-web .lk-d text { fill: #A02A1A; }
.links-web .lk-b rect { fill: #F4F4F1; stroke: #62645F; } .links-web .lk-b text { fill: #1F201E; }
.links-web .lk-ca text { fill: var(--ink); font-weight: 800; font-size: 13px; paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.links-web a:hover text { text-decoration: underline; }
.links-web .lk-root rect { fill: var(--accent); } .links-web .lk-root text { fill: #fff; font-weight: 800; font-size: 13px; }
.links-leg { font-size: .76rem; color: var(--muted); margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.links-leg .k-s { color: #2A5AA0; font-weight: 700; } .links-leg .k-d { color: #A02A1A; font-weight: 700; }
@media (max-width: 640px) {
  .links-table thead { display: none; }
  .links-table, .links-table tbody, .links-table tr, .links-table td { display: block; width: 100%; }
  .links-table tr { border-top: 1px solid var(--line-soft); padding: 6px 0; }
  .links-table td { border: 0; padding: 2px 10px; }
  .links-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .74rem; }
  .links-table tfoot { display: block; }
  .links-table tfoot tr { display: flex; justify-content: space-between; }
  .links-table tfoot td { width: auto; }
}
.links-table .gs b, .links-table .gd b { font-weight: 800; }

/* ---------- Pédigré à imprimer / enregistrer en PDF (embed/pedigree.php?print=1) ---------- */
.print-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .print-bar { display: none !important; }
  .print-mode { background: #fff !important; }
  .print-mode .embed-wrap { box-shadow: none; border: 0; padding: 0; }
  .print-mode .pc { break-inside: avoid; }
  .print-mode * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* ================= Nouveaux outils de la race (relationship, stats, complete, rarity) ================= */
.muted { color: var(--muted); }

/* Listes de chiens des statistiques */
.mate-list { list-style: none; margin: 0; padding: 0; }
.mate-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin: 0 0 6px; }
.mate-rank { width: 26px; text-align: right; font-weight: 800; color: var(--muted); font-size: .85rem; flex: 0 0 auto; }
.mate-list .thumb { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--line-soft); }
.mate-list .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mate-list .thumb:empty { background: none; }
.mate-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mate-name { font-weight: 800; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.mate-name:hover { text-decoration: underline; }
.mate-meta { font-size: .8rem; color: var(--muted); }
.mate-meta .flag { width: 16px; height: 12px; vertical-align: -1px; border-radius: 2px; }
.mate-stud { color: var(--ok); font-weight: 700; }
.mate-txt .health { margin: 2px 0 0; }
.mate-coi { flex: 0 0 auto; text-align: right; min-width: 82px; }
.mate-coi b { display: block; font-family: var(--serif); font-size: 1.25rem; line-height: 1.1; }
.mate-coi b.lo { color: var(--ok); } .mate-coi b.mid { color: var(--warn); } .mate-coi b.hi { color: var(--danger); }
.mate-coi small { font-size: .72rem; color: var(--muted); }
.mate-coi.na b { color: var(--muted); }
.mate-test { flex: 0 0 auto; padding: 6px 12px; font-size: .82rem; }
.mate-coi { text-decoration: none; color: inherit; }
@media (max-width: 560px) {
  .mate-list li { gap: 8px; padding: 7px 8px; align-items: flex-start; }
  .mate-rank { width: auto; padding-top: 2px; }
  .mate-list .thumb { width: 38px; height: 38px; }
  .mate-list .thumb:empty { display: none; }
  .mate-test { display: none; }
  .mate-coi { min-width: 64px; }
}

/* How are two dogs related? */
.rel-card { display: grid; grid-template-columns: 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 0 0 14px; }
@media (min-width: 760px) { .rel-card { grid-template-columns: 1.4fr 1fr 0.9fr; } }
.rel-card .lab { font-size: .8rem; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.rel-label { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; line-height: 1.25; margin: 0; }
.rel-card .val { font-family: var(--serif); font-weight: 700; font-size: 2.1rem; line-height: 1; margin: 0; }
.rel-card .say { font-size: .85rem; color: var(--muted); margin: 7px 0 0; }
.rel-card .say b, .rel-card .say a { color: var(--ink); }
.rel-scale { list-style: none; margin: 0; padding: 10px 12px; background: var(--bg); border-radius: 10px; font-size: .8rem; color: var(--muted); align-self: start; }
.rel-scale li { padding: 2px 0; }
.rel-scale b { display: inline-block; min-width: 44px; color: var(--ink); }
.mating-actions select { margin: 0 8px 0 4px; }

/* Breed statistics */
.stat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 18px; }
@media (min-width: 760px) { .stat-tiles { grid-template-columns: repeat(4, 1fr); } }
.stat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat-tile .lab { font-size: .78rem; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.stat-tile .val { font-family: var(--serif); font-weight: 700; font-size: 1.8rem; line-height: 1; margin: 0; }
.stat-tile .say { font-size: .76rem; color: var(--muted); margin: 5px 0 0; }
.stat-block { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px 16px; margin: 0 0 16px; }
.stat-block .sec { margin-top: 14px; }
.stat-chart { width: 100%; height: auto; display: block; font-family: var(--sans); }
.stat-chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.stat-chart .ax { font-size: 11px; fill: var(--muted); }
.stat-chart .bar path { fill: var(--accent); }
.stat-chart .bar .hit { fill: transparent; }
.stat-chart .bar:hover path { fill: #7A3A12; }
.sire-list { margin: 0; padding: 0 0 0 1.6em; font-size: .88rem; }
.sire-list li { padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.sire-list li a { font-weight: 700; color: var(--ink); text-decoration: none; }
.sire-list li a:hover { text-decoration: underline; }
.sire-bar { display: inline-block; width: 120px; height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; vertical-align: middle; margin: 0 8px; }
.sire-bar.small { width: 70px; margin: 0 6px 0 0; }
.sire-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.sire-n { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.stat-more { margin: 10px 0 0; }
.stat-more summary { cursor: pointer; font-weight: 700; font-size: .88rem; }
.world-map { height: 340px; margin: 0 0 12px; }
.country-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 18px; font-size: .86rem; }
.country-list li { display: flex; align-items: center; gap: 7px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.country-list li span { flex: 1 1 auto; }
.country-list .flag { width: 20px; height: 15px; border-radius: 2px; }
.stat-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.stat-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.stat-table td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); }
@media (max-width: 560px) { .stat-table th:nth-child(2), .stat-table td:nth-child(2) { display: none; } }

/* Help complete the pedigrees */
.cp-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.cp-tabs a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); font-size: .85rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.cp-tabs a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cp-tabs .count { font-weight: 600; opacity: .75; margin-left: 3px; }
.cp-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.cp-list > li { padding: 7px 14px; border-bottom: 1px solid var(--line-soft); font-size: .88rem; }
.cp-list > li:last-child { border-bottom: 0; }
.cp-name { font-weight: 700; color: var(--ink); }
.cp-edit { font-size: .78rem; margin-left: 6px; }
.cp-groups ul { list-style: none; margin: 0 0 4px; padding: 0; }
.cp-groups ul li { padding: 2px 0; }
.cp-report { font-size: .78rem; }
.cp-why { font-size: .8rem; color: var(--danger); }
.cp-empty { padding: 20px; background: var(--ok-soft); border-radius: 12px; }
.cp-pages { display: flex; align-items: center; gap: 12px; margin: 14px 0; }

/* Rareté des lignées (fiche du chien) */
.rarity { margin: 12px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.rarity .lab { font-size: .8rem; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.rarity-val { margin: 0 0 8px; font-size: .95rem; }
.rarity-val b { font-family: var(--serif); font-size: 1.15rem; }
.rarity-track { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #E8D9D2, #D7E6DA); }
.rarity-track span { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.rarity-ends { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin: 4px 0 0; }
.rarity .say { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }
.rarity-rare .rarity-val b { color: var(--ok); }
.rarity-vcommon .rarity-val b { color: var(--warn); }
.inline-select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); color: var(--ink); }
.stat-chart-wrap { overflow-x: auto; } .stat-chart-wrap .stat-chart { min-width: 560px; }
.st-tested { white-space: nowrap; }
.st-tested .sire-bar.small { margin: 0 0 0 8px; width: 60px; }
.st-results { line-height: 1.9; }
.st-res { display: inline-block; padding: 1px 9px; margin: 1px 4px 1px 0; border-radius: 12px; background: var(--ok-soft); color: var(--ink); font-size: .8rem; white-space: nowrap; }
.st-res b { font-weight: 800; }
.st-res small { color: var(--muted); }
.st-res.bad { background: var(--danger-soft); }
.st-res.bad b { color: var(--danger); }
@media (max-width: 560px) { .stat-table th:nth-child(2), .stat-table td:nth-child(2) { display: table-cell; } .st-tested .sire-bar { display: none; } }
.st-period { margin: 0 0 8px; }
.st-res { padding: 2px 10px; font-size: .84rem; }
.st-res .st-pct { font-weight: 800; font-size: .95rem; color: var(--ink); }
.st-res.bad .st-pct { color: var(--danger); }
.st-res small { font-size: .74rem; }
/* Rareté des lignées : jauge plus visible (orange = lignées très courantes, vert = lignées rares). */
.rarity-track { height: 10px; border-radius: 5px; background: linear-gradient(90deg, #D9822B 0%, #E6B84A 40%, #9DBF5A 70%, #2E7D53 100%); }
.rarity-track span { top: -5px; width: 8px; height: 20px; margin-left: -4px; border-radius: 4px; background: #fff; border: 2px solid var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.rarity-gens { font-size: .78rem; color: var(--muted); margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
a.st-res { text-decoration: none; cursor: pointer; }
a.st-res:hover { box-shadow: 0 0 0 2px var(--line); }
a.st-res.bad:hover { box-shadow: 0 0 0 2px #E8B4AC; }
.back-link { margin: 0 0 4px; font-size: .88rem; }
.st-exact { flex: 0 0 auto; font-size: .82rem; color: var(--muted); text-align: right; }
.st-dogs .thumb:empty { display: none; }
/* Test d'accouplement : père (bleu) et mère (rose) sur la jauge de la portée */
.rarity-track .rp { position: absolute; top: -3px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; }
.rarity-track .rp-sire { background: #3B7DD8; }
.rarity-track .rp-dam { background: #D14B7C; }
.rarity-parents { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .8rem; margin: 6px 0 0; }
.rarity-parents .rl { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.rarity-parents .rl::before { content: ""; width: 4px; height: 13px; border-radius: 2px; }
.rarity-parents .rl-litter::before { width: 6px; background: #fff; border: 2px solid var(--ink); box-sizing: border-box; }
.rarity-parents .rl-sire { color: #2A5AA0; } .rarity-parents .rl-sire::before { background: #3B7DD8; }
.rarity-parents .rl-dam { color: #A8365F; } .rarity-parents .rl-dam::before { background: #D14B7C; }
.rarity-val .rarity-pct { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 12px; background: var(--bg); font-size: .82rem; font-weight: 700; color: var(--ink); vertical-align: 2px; }
.rarity-help { margin: -2px 0 10px; font-size: .9rem; color: var(--ink); }

/* ---------- Indicateurs génétiques plus compacts en hauteur ---------- */
.ind-ctl { margin: 0 0 10px; gap: 6px 10px; }
.ind-ctl .ind-note { font-size: .8rem; color: var(--muted); }
.metric { padding: 10px 12px; }
.metric .lab { margin: 0 0 2px; font-size: .76rem; }
.metric .val { font-size: 1.7rem; }
.metric .say { font-size: .8rem; margin: 5px 0 0; line-height: 1.4; }
.metric .scale { margin-top: 7px; }
.metric .scale-lab { margin-top: 2px; font-size: .66rem; }
.coi-why { margin: 5px 0 0; }
.rarity { margin: 10px 0 0; padding: 10px 12px; }
.rarity .lab { font-size: .76rem; margin: 0 0 2px; }
.rarity-val { margin: 0 0 6px; font-size: .9rem; }
.rarity-val b { font-size: 1.05rem; }
.rarity-ends { margin: 2px 0 0; font-size: .68rem; }
.rarity .say.rarity-say { font-size: .76rem; margin: 5px 0 0; line-height: 1.4; }
.rarity-gens { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; margin: 0 0 0 6px; font-size: .76rem; }
.links-box { margin: 10px 0 2px; }
.links-box > summary { padding: 8px 12px; font-size: .88rem; }
details.formula { margin-top: 6px; }
/* Téléphone : COI en entier, AVK et remplissage côte à côte */
@media (max-width: 619px) {
  .metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metrics > .metric:first-child { grid-column: 1 / -1; }
  .metric .val { font-size: 1.45rem; }
  .metric .say { font-size: .76rem; }
}
.metric .scale { margin-top: 10px; }
.metric .marker span { top: -13px; height: 9px; }
.rarity-gens { margin: 0; }
/* Tableau des ancêtres communs : la bordure va sur le cadre, pour éviter une barre de défilement inutile. */
.links-table-wrap { border: 1px solid var(--line); border-radius: 9px; }
.links-table { border: 0; }
/* Indicateurs génétiques repliables : le titre sert de bouton. */
.ind-fold > .ind-sum { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 0; }
.ind-fold > .ind-sum::-webkit-details-marker { display: none; }
.ind-fold > .ind-sum h2.sec { margin: 0; padding: 0; border: 0; }
.ind-fold > .ind-sum { justify-content: flex-start; }
.ind-fold > .ind-sum .ind-toggle { margin-left: auto; }
.ind-arrow { flex: 0 0 auto; color: var(--accent); font-size: 1rem; line-height: 1; transition: transform .15s; margin-right: -4px; }
.ind-fold[open] .ind-arrow { transform: rotate(90deg); }
.ind-toggle { flex: 0 0 auto; font-size: .8rem; font-weight: 700; color: var(--accent); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; background: var(--surface); }
.ind-toggle::after { content: "Hide ▴"; }
.ind-fold:not([open]) .ind-toggle::after { content: "Show ▾"; }
.ind-fold > .ind-sum:hover .ind-toggle { border-color: var(--accent); }
.ind-fold:not([open]) > .ind-sum { margin-bottom: -6px; }
/* Descendance et frères et sœurs : toujours ouverts, titres simples. */
.fam .fam-group { margin-bottom: 8px; }
.fam .fam-head { margin: 0; padding: 11px 0; font-family: var(--sans); font-weight: 700; font-size: .95rem; display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid var(--line-soft); }
/* Résultats de la recherche : des cartes, comme le reste du site. */
.res-grid { list-style: none; margin: 10px 0 16px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 760px) { .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.res-card { min-width: 0; }
.res-card { display: flex; gap: 14px; align-items: center; padding: 10px 14px 10px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, box-shadow .15s; position: relative; }
.res-card:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(70, 45, 20, .08); }
.res-pic { flex: 0 0 auto; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--line-soft); display: block; }
.res-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.res-pic.empty { background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.res-pic.empty img { width: 70%; height: auto; object-fit: contain; opacity: .35; }
.res-txt { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.res-ttl { font-size: .68rem; font-weight: 800; color: var(--accent); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-name { font-weight: 800; font-size: 1rem; line-height: 1.25; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.res-name::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.res-name:hover { color: var(--accent); }
.res-sx { font-weight: 400; color: var(--muted); }
.res-meta { font-size: .8rem; color: var(--muted); }
.res-ctry { white-space: nowrap; }
.res-meta .flag { width: 16px; height: 12px; vertical-align: -1px; border-radius: 2px; }
.res-par { font-size: .8rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-par .x { color: var(--muted); }
.res-badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 3px; position: relative; }
.res-badges .health { margin: 0; }
.res-stud { padding: 1px 8px; font-size: .68rem; line-height: 1.5; }
.results-head { margin: 18px 0 4px; }

/* ==========================================================================
   Retour aux couleurs de la première version : fond beige uni, barre du haut
   blanche, pas de cadres autour des parties… sauf la fiche du chien, encadrée
   en blanc comme les cases COI / AVK.
   ========================================================================== */
body { background: var(--bg); background-image: none; }
.site-head { background: var(--surface); background-image: none; border-bottom: 1px solid var(--line); }
.site-head .search input, .site-head input[type="search"] { background: var(--bg); border-color: transparent; }
.page-card, .panel, .embed-box.panel { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 0; margin: 0; }
.panel > h2.sec:first-child { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.panel > .page-title:first-child { margin-top: 28px; }
.ind-fold > .ind-sum { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.ind-fold:not([open]) > .ind-sum { margin-bottom: 0; }
.embed-box { background: var(--surface); }
.metric, .ptable, .litter { background: var(--surface); }
.ph-head { background: var(--bg); }
/* La fiche du chien et les étalons de l'accueil : un cadre blanc, comme les cases des indicateurs. */
.panel.dog-top, .panel.home-studs { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 22px 0 0; }
.panel.home-studs { margin: 26px 0; }
@media (min-width: 760px) {
  .page-card, .panel { padding: 0; }
  .panel.dog-top, .panel.home-studs { padding: 24px 26px; }
}
/* Arbre : ligne des titres (Parents, Grandparents…) colorée comme l'en-tête des portées. */
.ph-head { background: var(--accent-soft) !important; color: var(--accent); font-weight: 800; }
.ped-empty .ph-head { background: var(--accent-soft) !important; }
/* Arbre : pas de fond beige-gris autour des photos (photo entière, sans cadre coloré). */
.pc .pic, .pc .pic.empty { background: transparent !important; }

/* Admin : nouveaux membres — bloc à coller à la fin de assets/site.css */
/* Admin : nouveaux membres */
.mb-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 14px; }
.mb-tabs a { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: .88rem; margin-right: 4px; }
.mb-tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mb-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.mb-main { min-width: 0; }
.mb-name { font-size: 1rem; }
.mb-mail, .mb-when { display: block; font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.mb-mail { color: var(--ink); }
.mb-status { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; vertical-align: 2px; background: var(--line-soft); color: var(--muted); }
.mb-wait { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); color: var(--warn); }
.mb-ok { background: var(--ok-soft); color: var(--ok); }
.mb-off { background: var(--danger-soft); color: var(--danger); }
.mb-actions form { display: flex; gap: 6px; flex-wrap: wrap; }
.mb-transcript { margin: 0 0 14px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.mb-transcript summary { cursor: pointer; font-weight: 700; }
.mb-transcript pre { margin: 8px 0 0; max-height: 360px; overflow: auto; font-size: .76rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
form.mb-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }
.member-id .mb-status { align-self: flex-start; margin: 2px 0 3px; }

/* Descendance : [+] devant un chiot pour afficher ses propres portées, à l'infini. */
.fam-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.fam-intro .sub { margin: 0; }
.fam-tools { margin: 0; display: flex; gap: 6px; }
.pups li { display: block; padding: 0; }
.pup-row { display: flex; gap: 9px; align-items: center; padding: 5px 0; }
.pup-toggle { flex: 0 0 auto; width: 20px; height: 20px; padding: 0; border: 1.5px solid var(--accent); border-radius: 5px;
  background: var(--surface); color: var(--accent); cursor: pointer; position: relative; display: inline-block; vertical-align: middle; }
.pup-toggle::before, .pup-toggle::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; border-radius: 1px; transform: translate(-50%, -50%); }
.pup-toggle::before { width: 9px; height: 2px; }
.pup-toggle::after { width: 2px; height: 9px; }
.pup-toggle.open { background: var(--accent); color: var(--on-accent); }
.pup-toggle.open::after { display: none; }
.pup-toggle:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.pup-toggle.none { border-color: transparent; background: none; cursor: default; box-shadow: none; }
.pup-toggle.none::before, .pup-toggle.none::after { display: none; }
.pup-toggle.demo { width: 16px; height: 16px; vertical-align: -3px; cursor: default; }
.pup-reg { font-size: .76rem; color: var(--muted); }
.pup-litters { display: inline-block; font-size: .7rem; font-weight: 800; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.litter-sexes { margin-left: auto; font-size: .76rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.sub-litters { margin: 2px 0 10px 9px; padding-left: 18px; border-left: 2px solid var(--accent-soft); }
.sub-litters .litter { margin: 8px 0; }
.sub-litters > .hint { margin: 6px 0; }
@media (max-width: 759px) { .sub-litters { margin-left: 4px; padding-left: 8px; } }
/* Grand écran d'ordinateur : page plus large (arbre, noms des parents, portées). */
@media (min-width: 1300px) { .wrap { max-width: 1280px; } }
@media (min-width: 1600px) { .wrap { max-width: 1440px; } }
/* Fiche : colonne des libellés à largeur fixe sur ordinateur, plus de place pour les noms des parents. */
@media (min-width: 1000px) { .facts dt { flex: 0 0 132px; } .facts-cols { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
@media (min-width: 1300px) { .dog-top { grid-template-columns: minmax(0, 3.6fr) minmax(0, 7fr); } }
/* Lignes des chiots plus basses (27 px sur ordinateur). */
.pup-row { min-height: 27px; padding: 1px 0; gap: 8px; }
.pups .thumb { width: 25px; height: 25px; border-radius: 5px; }
.pups .ptxt { row-gap: 0; line-height: 1.3; }
.pups .pn { font-size: .86rem; }
.pups .hb { padding: 0 6px; font-size: .64rem; line-height: 1.5; }
.pups .pup-litters, .pups .pup-stud { padding: 0 7px; line-height: 1.5; }
.pup-toggle { width: 18px; height: 18px; }
/* Lignes des chiots : un peu plus grandes (32 px). */
.pup-row { min-height: 32px; padding: 2px 0; gap: 9px; }
.pups .thumb { width: 30px; height: 30px; border-radius: 6px; }
.pups .pn { font-size: .9rem; }
.pups .hb { padding: 1px 7px; font-size: .68rem; }
.pup-toggle { width: 20px; height: 20px; }
.pup-row { min-height: 32px; padding: 2px 0; } .pups .thumb { width: 28px; height: 28px; } .pups .ptxt { line-height: 1.25; }
/* Téléphone : pastilles de santé plus petites dans les portées. */
@media (max-width: 759px) {
  .pups .health { gap: 2px; }
  .pups .hb { padding: 0 4px; font-size: .56rem; line-height: 1.45; border-radius: 6px; letter-spacing: -.01em; }
  .pups .pup-litters, .pups .pup-stud { font-size: .6rem; padding: 0 5px; }
  .pups .pd { font-size: .74rem; }
}
/* Titres des listes (Direct offspring, Half-siblings…) plus grands ; ligne des parents un tout petit peu plus grande. */
.fam .fam-head { font-size: 1.12rem; font-weight: 800; padding: 14px 0 10px; }
.fam .fam-head .count { font-size: .8rem; }
.litter-par { font-size: .86rem; }
.litter-date { font-size: .78rem; }
/* Noms des chiots un peu moins grands. */
.pups .pn { font-size: .84rem; }
/* Arbre : dernières générations (photo à gauche du nom) centrées dans leur case. */
.pc.t-row, .pc.t-rowmini, .ped-wrap.scroll .pc.t-row, .ped-wrap.scroll .pc.t-rowmini { justify-content: center; }
.pc.t-row:has(> .pic) { padding-left: 6px; }
.pc.t-row > .pic { border-radius: 6px; }
.pc.t-row .txt, .pc.t-rowmini .txt { flex: 0 1 auto; }
/* Lignes des chiots : 34 px au minimum, photo de 32 × 32 px. */
.pup-row { min-height: 34px; padding: 1px 0; }
.pups .thumb { width: 32px; height: 32px; border-radius: 6px; }
/* Badge « 🐾 N litters » : cliquable, déroule les portées du chien comme le bouton [+]. */
.pups .pup-litters { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: .74rem; font-weight: 800; line-height: 1.5;
  color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 999px; padding: 1px 9px 1px 7px; cursor: pointer; }
.pups .pup-litters:hover { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-color: var(--accent); }
.pups .pup-litters .paw { width: 13px; height: 13px; fill: currentColor; flex: 0 0 auto; }
.pup-row:has(.pup-toggle.open) .pup-litters { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (max-width: 759px) { .pups .pup-litters { font-size: .64rem; padding: 0 7px 0 5px; } .pups .pup-litters .paw { width: 11px; height: 11px; } }
/* Badge des portées : bleu-gris clair, avant les tests de santé. */
.pups .pup-litters { color: #465E7D; background: #EBF0F6; border-color: #CCD7E4; }
.pups .pup-litters:hover { background: #DFE7F1; border-color: #465E7D; }
.pup-row:has(.pup-toggle.open) .pup-litters { background: #465E7D; color: #FFF; border-color: #465E7D; }
/* Badge des portées plus carré (coins peu arrondis), pour le distinguer des tests de santé. */
.pups .pup-litters { border-radius: 7px; padding: 2px 9px 2px 7px; }
/* Fiches des personnes et des élevages : nom d'appel en étiquette au-dessus du nom. */
.kdog .call-name { align-self: flex-start; display: inline-block; margin: 0 0 4px; padding: 0 10px; font-family: var(--serif); font-size: 1.15rem;
  line-height: 1.45; color: #34497A; background: #E8EEF8; border: 1px solid #B9C6DE; border-radius: 6px; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Recherche : éleveurs et propriétaires trouvés, et suggestions de personnes. */
.res-people { list-style: none; margin: 8px 0 18px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 760px) { .res-people { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.res-people a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink); text-decoration: none; }
.res-people a:hover { border-color: var(--accent); }
.rp-icon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #EBF0F6; color: #465E7D; display: grid; place-items: center; }
.rp-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.rp-txt { min-width: 0; display: flex; flex-direction: column; }
.rp-txt b { overflow-wrap: anywhere; }
.rp-txt span { font-size: .8rem; color: var(--muted); }
.ac-person .ac-name::before { content: "👤 "; }
/* Nom d'appel : plus petit et un peu plus gras. */
.kdog .call-name { font-size: .95rem; font-weight: 700; line-height: 1.4; padding: 0 8px; margin-bottom: 3px; }
/* Nom d'appel collé au nom du chien (moins d'espace en dessous). */
.kdog .call-name { display: block; width: fit-content; margin: 0 0 2px; line-height: 1.35; }
.kdog .call-name + .dc-name { margin-top: 0; }
/* Suggestions de recherche : nom d'appel en bleu. */
.ac-call { color: #34497A; font-weight: 800; }
/* Fond de page : motif de vagues très clair. La barre de recherche prend un fond proche. */
body { background: #F8F7F5 url("bg-vagues.jpg") repeat; background-size: 350px 350px; }
.site-head .search input, .site-head input[type="search"] { background: #EFEDE9; border: 1px solid #E2DED7; }
.site-head .search input:focus { background: #F6F5F2; }
@media (prefers-color-scheme: dark) { body { background-image: none; } }
