/* ==========================================================================
   Pages des races (/nos-races/, /nos-races/<race>/) et page générique
   (page.php : /certificat-adoption/, pages autonomes).
   Par-dessus eclat.css. Toutes les feuilles pages-*.css sont chargées sur
   toutes les pages : chaque classe d'ici commence par « races- ».
   ========================================================================== */

/* ── Pièces communes ──────────────────────────────────────────────────── */

/* Disponibilité d'une race : un point qui respire, puis le nombre. */
.races-dispo {
    display: inline-flex; align-items: center; gap: .6rem;
    min-height: 44px; margin: 0;
    font-weight: 600; font-size: .95rem; color: var(--texte-doux);
}
.races-dispo--oui { color: var(--vert-texte); font-weight: 700; text-decoration: none; }
.races-dispo--oui:hover { color: var(--brun); }
.races-dispo__point {
    flex: none; width: .6rem; height: .6rem; border-radius: 50%;
    background: var(--vert); box-shadow: 0 0 0 4px var(--vert-brume);
}
@media (prefers-reduced-motion: no-preference) {
    .races-dispo__point { animation: races-respire 2.4s ease-in-out infinite; }
}
@keyframes races-respire { 50% { box-shadow: 0 0 0 7px rgba(149, 196, 105, .18); } }

/* Nombre de chiots dans un bouton */
.races-compte {
    display: inline-grid; place-items: center;
    min-width: 1.65rem; height: 1.65rem; padding: 0 .45rem; margin-left: .1rem;
    border-radius: 999px; background: var(--brun-nuit); color: #fff;
    font: 700 .82rem/1 var(--corps);
}

/* ── /nos-races/ ──────────────────────────────────────────────────────── */
.races-hub__bandeau { padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.races-hub__atouts { list-style: none; margin: 1.9rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.races-hub__atouts li {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .5rem .95rem .5rem .65rem; border-radius: 999px;
    background: #fff; color: var(--brun);
    font-weight: 600; font-size: .92rem; line-height: 1.2;
}
.races-hub__atouts .icone { width: 20px; height: 20px; flex: none; color: var(--vert-texte); }
.races-hub__actions { display: flex; flex-wrap: wrap; gap: .8rem 1rem; margin-top: 2.1rem; }

.races-rang { padding-block: clamp(2.5rem, 5.5vw, 4.75rem); }
.races-rang:last-child { padding-bottom: var(--bloc); }
.races-rang__grille {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 6.5rem); align-items: center;
}
.races-rang--inverse .races-rang__photo { order: 2; }
.races-rang__photo { position: relative; display: block; }
.races-rang__cadre {
    display: block; aspect-ratio: 1 / 1; overflow: hidden;
    border-radius: var(--rayon); background: var(--vert-pale);
}
.races-rang__cadre img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.races-rang__photo:hover .races-rang__cadre img { transform: scale(1.04); }
.races-rang__eclats { position: absolute; width: 7rem; right: -1.25rem; top: -2.7rem; rotate: 26deg; }
.races-rang__nom { margin: 0; font: 400 clamp(2.4rem, 4.6vw, 3.7rem)/1.02 var(--titre); letter-spacing: -.022em; color: var(--brun); text-wrap: balance; }
.races-rang__desc { margin: 1.2rem 0 0; max-width: 46ch; font-size: 1.1rem; color: var(--texte-doux); }
.races-rang__atouts {
    list-style: none; margin: 1.9rem 0 0; padding: 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1.75rem;
    max-width: 34rem;
}
.races-rang__atouts li { position: relative; padding-left: 1.55rem; font-weight: 600; font-size: .98rem; line-height: 1.4; color: var(--brun); }
/* Un éclat vert en guise de puce */
.races-rang__atouts li::before {
    content: ""; position: absolute; left: 0; top: .2em;
    width: .75rem; height: .95rem; background: var(--vert);
    clip-path: polygon(38% 0, 100% 52%, 22% 100%, 0 46%);
}
.races-rang__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.6rem; margin-top: 2.3rem; }

/* ── Page d'une race : bandeau ────────────────────────────────────────── */
.races-race__bandeau .bandeau__photo img { aspect-ratio: 5 / 4; object-position: 50% 40%; }
.races-race__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2.1rem; }
.races-race .lien-fleche { min-height: 44px; }

/* ── Page d'une race : sommaire collant + sections ────────────────────── */
.races-corps {
    display: grid; grid-template-columns: 15.5rem minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 5.5rem); align-items: start;
    padding-top: clamp(1rem, 3vw, 2.5rem); padding-bottom: var(--bloc);
}
.races-sommaire {
    position: sticky; top: calc(var(--entete-h) + 1.75rem); z-index: 5;
    max-height: calc(100vh - var(--entete-h) - 3.5rem); overflow-y: auto;
    /* De la marge autour : le contour du focus et l'ombre du bouton ne sont pas rognés. */
    padding: .45rem .45rem 1.4rem; margin: -.45rem -.45rem 0;
    scrollbar-width: thin; scrollbar-color: var(--vert-brume) transparent;
}
.races-sommaire__titre {
    margin: 0 0 .8rem; padding-left: .9rem;
    font: 700 .76rem/1.2 var(--corps); letter-spacing: .14em; text-transform: uppercase; color: var(--vert-texte);
}
.races-sommaire__defile { position: relative; }
.races-sommaire__liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.races-sommaire__liste a {
    display: flex; align-items: baseline; gap: .7rem;
    padding: .62rem .9rem; border-radius: 12px;
    font-weight: 600; font-size: .95rem; line-height: 1.3; color: var(--texte-doux); text-decoration: none;
    transition: background-color .2s, color .2s;
}
.races-sommaire__liste a:hover { color: var(--brun); background: var(--vert-pale); }
.races-sommaire__liste a[aria-current] { color: var(--brun); background: var(--vert-pale); }
.races-sommaire__num { flex: none; min-width: 1.35rem; font: 400 .85rem/1 var(--titre); color: var(--vert-texte); }
.races-sommaire__cta { width: 100%; margin-top: 1.6rem; }

.races-sections { min-width: 0; }
.races-section { scroll-margin-top: calc(var(--entete-h) + var(--races-sommaire-h, 0px) + 1.5rem); }
.races-section + .races-section { margin-top: clamp(4rem, 8vw, 6.5rem); }

/* Le texte saisi dans WordPress */
.races-section__corps > h2:first-child {
    margin: 0 0 .7em;
    font-size: clamp(2rem, 3.6vw, 2.85rem); line-height: 1.08; letter-spacing: -.015em; text-wrap: balance;
}
.races-section__corps > h2:first-child + p { font-size: 1.14rem; }
.races-section__corps h2 { font-size: clamp(1.5rem, 2.4vw, 1.85rem); margin: 1.9em 0 .55em; line-height: 1.15; }
.races-section__corps h3 { font-size: clamp(1.25rem, 2vw, 1.42rem); margin: 1.6em 0 .45em; }
/* Sous-parties d'une section, rétrogradées en h3 / h4 pour le plan de la page
   (inc/pages-seo.php, 02/12/2026) : même dessin que les h2 / h3 d'avant. */
.races-section__corps .races-h2 { font-size: clamp(1.5rem, 2.4vw, 1.85rem); margin: 1.9em 0 .55em; line-height: 1.15; }
.races-section__corps .races-h3 {
    font-family: var(--titre); font-weight: 400; color: var(--brun);
    font-size: clamp(1.25rem, 2vw, 1.42rem); line-height: 1.1; margin: 1.6em 0 .45em;
}
.races-section__corps p, .races-section__corps li { overflow-wrap: break-word; }

/* « En bref » : la liste devient une fiche */
.prose .races-bref {
    list-style: none; margin: 1.1em 0 1.8em; padding: 1.5rem 1.7rem;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 2rem;
    background: var(--vert-pale); border-radius: var(--rayon-s);
}
.prose .races-bref li { margin: 0; font-size: .98rem; line-height: 1.45; }
.prose .races-bref strong {
    display: block; margin-bottom: .2rem;
    font: 700 .74rem/1.3 var(--corps); letter-spacing: .12em; text-transform: uppercase; color: var(--vert-texte);
}

/* Listes dont chaque ligne commence par un emoji : pas de puce en plus */
.prose .races-liste-sans-puce { list-style: none; padding-left: 0; }

/* Tableaux : une ombre douce signale qu'il reste à défiler */
.prose .races-table {
    margin: 1.6em 0; border-radius: var(--rayon-s);
    background:
        linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) left center / 2.5rem 100% no-repeat local,
        linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) right center / 2.5rem 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgba(61, 37, 8, .2), transparent) left center / .9rem 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgba(61, 37, 8, .2), transparent) right center / .9rem 100% no-repeat scroll;
}
.prose .races-table table { margin: 0; min-width: 32rem; }
.prose .races-table th:first-child { border-top-left-radius: 12px; }
.prose .races-table th:last-child { border-top-right-radius: 12px; }
.prose .races-table td:first-child { font-weight: 700; color: var(--brun); }

/* Boutons écrits dans le contenu (classes du parent) */
.races-section .prose a.btn, .races-simple .prose a.btn { font-weight: 700; text-decoration: none; }
.races-section .prose .btn--primary, .races-simple .prose .btn--primary { background: var(--brun); color: #fff; }
.races-section .prose .btn--primary:hover, .races-simple .prose .btn--primary:hover { background: var(--brun-nuit); }
.races-section .prose .btn--secondary, .races-simple .prose .btn--secondary { background: #fff; color: var(--brun); border-color: var(--vert-brume); }

/* Les reproducteurs de la race */
.races-repros__titre { margin: 0 0 1.7rem; font: 400 clamp(2rem, 3.6vw, 2.85rem)/1.08 var(--titre); letter-spacing: -.015em; color: var(--brun); text-wrap: balance; }
.races-repros__liste {
    list-style: none; margin: 0 0 1.9rem; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1.6rem 1.1rem;
}
.races-repros__liste--peu { grid-template-columns: repeat(auto-fill, minmax(12rem, 14rem)); }
.races-repros .lien-fleche { display: inline-block; min-height: 0; padding-block: .55rem; }
.races-repros .lien-fleche .icone { display: inline-block; vertical-align: -.22em; margin-left: .45rem; }
.races-repro__lien { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.races-repro__photo { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 18px; background: var(--vert-pale); }
.races-repro__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.races-repro__lien:hover .races-repro__photo img { transform: scale(1.05); }
.races-repro__nom { margin: .8rem 0 0; font: 400 1.28rem/1.15 var(--titre); color: var(--brun); }
.races-repro__lien:hover .races-repro__nom { color: var(--vert-texte); }
.races-repro__couleur { margin-top: .15rem; font-size: .9rem; line-height: 1.35; color: var(--texte-doux); }

/* Les chiots de la race (le seul bloc teinté de la page) */
.races-chiots { scroll-margin-top: var(--entete-h); }
.races-chiots__grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.races-chiots--0 { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.races-chiots--0 .races-chiots__grille { grid-template-columns: minmax(0, 1fr); }
.races-chiots--0 .races-chiots__texte { max-width: 780px; }
.races-chiots--1 .races-chiots__grille { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.races-chiots__texte p { margin: 1.2rem 0 2rem; max-width: 46ch; color: var(--texte-doux); }
.races-chiots__actions { display: flex; flex-wrap: wrap; gap: .8rem 1rem; }
.races-chiots .btn--contour { background: #fff; }
.races-chiots .surtitre span { text-wrap: balance; }
.races-chiots__liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.races-chiots--1 .races-chiots__liste { grid-template-columns: minmax(0, 400px); justify-content: end; }
.races-chiots .chiot-carte__lien { box-shadow: var(--ombre); }
.races-chiots .chiot-carte__photo img { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.races-chiots .chiot-carte__lien:hover .chiot-carte__photo img { transform: scale(1.04); }

/* ── Page générique ───────────────────────────────────────────────────── */
.races-simple__corps { padding-bottom: var(--bloc); }
.races-simple__renvoi { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 3rem 0 1.5rem; }

/* ── Tablette et téléphone ────────────────────────────────────────────── */
@media (max-width: 960px) {
    .races-rang__grille { grid-template-columns: minmax(0, 1fr); gap: 2rem; max-width: 620px; }
    .races-rang--inverse .races-rang__photo { order: 0; }
    .races-rang__cadre { aspect-ratio: 5 / 4; }
    .races-rang__eclats { right: .5rem; width: 5.5rem; top: -2.3rem; }

    .races-race__bandeau .bandeau__photo { max-width: 560px; margin-top: 1.25rem; }

    /* Le sommaire devient une barre qui défile, collée sous l'en-tête. */
    .races-race { --races-sommaire-h: 62px; }
    .races-corps { display: block; padding-top: 0; }
    .races-sommaire {
        top: var(--entete-h); z-index: 80;
        max-height: none; overflow: visible;
        margin: 0 calc(-1 * var(--gouttiere)) 2.75rem; padding: 0;
        background: rgba(255, 255, 255, .96);
        backdrop-filter: saturate(1.4) blur(10px);
        -webkit-backdrop-filter: saturate(1.4) blur(10px);
        box-shadow: 0 12px 24px -22px rgba(61, 37, 8, .55);
    }
    .races-sommaire__titre, .races-sommaire__cta { display: none; }
    .races-sommaire__defile {
        overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
        padding: .5rem var(--gouttiere);
        -webkit-mask-image: linear-gradient(to right, transparent, #000 1rem, #000 calc(100% - 2.75rem), transparent);
        mask-image: linear-gradient(to right, transparent, #000 1rem, #000 calc(100% - 2.75rem), transparent);
    }
    .races-sommaire__defile::-webkit-scrollbar { display: none; }
    .races-sommaire__liste { display: flex; gap: .35rem; width: max-content; padding-right: 2rem; }
    .races-sommaire__liste a { align-items: center; min-height: 44px; padding: .5rem 1rem; border-radius: 999px; white-space: nowrap; }

    .races-chiots__grille, .races-chiots--1 .races-chiots__grille { grid-template-columns: minmax(0, 1fr); }
    .races-chiots--1 .races-chiots__liste { justify-content: start; }
}
@media (max-width: 760px) {
    .races-hub__atouts { gap: .45rem; }
    .races-hub__atouts li { font-size: .85rem; padding: .45rem .8rem .45rem .55rem; gap: .4rem; }
    .races-hub__atouts .icone { width: 18px; height: 18px; }
    .races-rang__atouts { grid-template-columns: minmax(0, 1fr); }
    .races-repros__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1rem; }
    .prose .races-bref { grid-template-columns: minmax(0, 1fr); padding: 1.3rem 1.35rem; }
}
@media (max-width: 480px) {
    .races-hub__actions .btn, .races-chiots__actions .btn { width: 100%; }
    .races-rang__actions .btn { width: 100%; }
    .races-race__actions .btn { width: 100%; }
}

/* Icônes qui remplacent ✅ ⚠️ ❌ en tête des listes du contenu (relecture 1, G4). */
.prose .races-liste-sans-puce li:has(> .races-puce) { position: relative; padding-left: 1.75rem; }
.races-puce { position: absolute; left: 0; top: .28em; width: 1.15em; height: 1.15em; color: var(--vert-texte); }
.races-puce--attention { color: var(--brun); }
/* La flèche du lien « Tous nos reproducteurs … » ne part jamais seule à la ligne (relecture 1, D12). */
.races-repros .lien-fleche { display: inline-flex; align-items: center; flex-wrap: nowrap; }
.races-repros .lien-fleche .icone { flex: none; margin-left: .45rem; }
/* Sur la bannière verte, le bouton est brun : la pastille du nombre passe en blanc. */
.bandeau .btn .races-compte { background: #fff; color: var(--brun); }
