/* ==========================================================================
   Shingeki No Inu — feuille de style principale
   Palette : #24377D (bleu marine), #A24F17 (rouille), blanc
   ========================================================================== */

:root {
    --navy: #24377D;
    --navy-dark: #1a2960;
    --rust: #A24F17;
    --rust-dark: #82400f;
    --white: #ffffff;
    --off-white: #f6f5f2;
    --border: #e6e3dd;
    --text: #2b2b2b;
    --text-muted: #6b6b6b;
    --amber: #b3891f;
    --radius: 10px;
    --shadow: 0 4px 20px rgba(36, 55, 125, 0.08);
    --max-width: 1180px;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', 'Inter', sans-serif;
    color: var(--navy);
    line-height: 1.25;
    margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--rust); text-decoration: none; }
a:hover { text-decoration: underline; }

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

ul { list-style: none; margin: 0; padding: 0; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- Header / navigation ---------- */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.puppy-banner {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--rust);
    color: var(--white);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 0.6rem 1rem;
    text-decoration: none;
    transition: background 160ms var(--ease-out);
}
.puppy-banner:hover, .puppy-banner:active { background: var(--rust-dark); text-decoration: none; color: var(--white); }

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: 0.01em;
}
.logo-img {
    height: 42px;
    width: auto;
}
.logo span { color: var(--rust); }
.logo:hover { text-decoration: none; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.main-nav > ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.main-nav a {
    color: var(--navy);
    font-weight: 500;
    text-decoration: none;
    padding: 0.6rem 0.9rem;
    display: inline-block;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.main-nav a:hover,
.main-nav a.active {
    background: var(--off-white);
    color: var(--rust);
}

.has-dropdown { position: relative; }

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 220px;
    padding: 0.5rem;
    margin-top: 0;
    padding-top: calc(0.4rem + 0.5rem);
    transform-origin: top left;
    opacity: 0;
    transform: scale(0.97);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 140ms var(--ease-out), transform 140ms var(--ease-out), visibility 140ms;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
    pointer-events: auto;
}
.dropdown a {
    display: block;
    padding: 0.55rem 0.8rem;
    color: var(--text);
    font-weight: 400;
}
.dropdown a:hover, .dropdown a.active {
    background: var(--off-white);
    color: var(--rust);
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    padding: 8rem 1.5rem 6rem;
    text-align: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: url('../img/site/landingimg.jpeg') center / cover no-repeat;
    transform: scale(1.22);
    z-index: 0;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(26, 41, 96, 0.55) 0%,
        rgba(26, 41, 96, 0.32) 35%,
        rgba(26, 41, 96, 0.12) 55%,
        rgba(26, 41, 96, 0) 68%);
    z-index: 1;
}
.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 75%;
    background: linear-gradient(to bottom,
        rgba(246, 245, 242, 0) 0%,
        rgba(246, 245, 242, 0.02) 35%,
        rgba(246, 245, 242, 0.06) 50%,
        rgba(246, 245, 242, 0.14) 62%,
        rgba(246, 245, 242, 0.28) 72%,
        rgba(246, 245, 242, 0.48) 80%,
        rgba(246, 245, 242, 0.72) 87%,
        rgba(246, 245, 242, 0.9) 93%,
        var(--white) 100%);
    z-index: 2;
}
.hero-content {
    position: relative;
    z-index: 3;
}
.hero h1 { color: var(--white); margin-bottom: 0.4em; font-size: clamp(2.5rem, 6vw, 4rem); }
.hero p { color: rgba(255,255,255,0.9); max-width: 640px; margin: 0 auto 1.5em; font-size: 1.2rem; }
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
}

@media (max-width: 700px) {
    .hero { min-height: 85vh; padding: 6rem 1.25rem 9rem; }
    .hero-actions { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .hero-actions .btn { width: 100%; }
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms var(--ease-out), background 160ms var(--ease-out);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn-rust { background: var(--rust); color: var(--white); }
.btn-rust:hover { background: var(--rust-dark); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-dark); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }

/* ---------- Sections & cards ---------- */

.section { padding: 4rem 0; }
.section-alt { background: var(--off-white); }
.section-hero-follow { padding: 2rem 0; }
.section-hero-follow .page-content { padding: 2rem 0; }

.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title.page-title { margin-bottom: 1rem; }
.section-title p { color: var(--text-muted); max-width: 560px; margin: 0.5em auto 0; }

.race-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.race-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
/* Empêche le soulignement au survol/tap quelle que soit la capacité de pointage (souris ou tactile) */
.race-card:hover, .race-card:active,
.animal-card:hover, .animal-card:active {
    text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
    .race-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 28px rgba(36, 55, 125, 0.14);
        border-color: var(--rust);
        text-decoration: none;
    }
    .race-card.race-card-tilt:hover {
        transform: translateY(-2px) scale(1.03) rotate(1.5deg);
        box-shadow: 0 8px 18px rgba(36, 55, 125, 0.12);
        border-color: var(--border);
        text-decoration: none;
    }
    .race-grid .race-card.race-card-tilt:nth-child(even):hover {
        transform: translateY(-2px) scale(1.03) rotate(-1.5deg);
    }
}
.race-card .race-card-body { padding: 1.75rem; }
.race-card h3 { color: var(--navy); }

.menu-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
@media (max-width: 600px) {
    .menu-grid { grid-template-columns: 1fr; }
}

.menu-card {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
@media (hover: hover) and (pointer: fine) {
    .menu-card:hover {
        transform: none;
        box-shadow: none;
    }
}
/* Grille encadrée : chaque carte porte son bord droit/bas, la 1re colonne/rangée ajoute le bord gauche/haut.
   Cette technique reste correcte quel que soit le nombre de cartes (pas besoin de connaître la dernière ligne). */
@media (min-width: 601px) {
    .menu-grid .menu-card { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
    .menu-grid .menu-card:nth-child(odd) { border-left: 1px solid var(--border); }
    .menu-grid .menu-card:nth-child(-n+2) { border-top: 1px solid var(--border); }
}
@media (max-width: 600px) {
    .menu-grid .menu-card { border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
    .menu-grid .menu-card:first-child { border-top: 1px solid var(--border); }
}
.menu-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--off-white), transparent 65%);
    opacity: 0;
    transition: opacity 200ms var(--ease-out);
    pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
    .menu-card:hover::before { opacity: 1; }
}
.menu-card .race-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    padding: 2rem 1.75rem;
}
.menu-card-icon {
    display: flex;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.menu-card-title {
    position: relative;
    padding-left: 1rem;
    display: flex;
    align-items: center;
}
.menu-card-bar {
    position: absolute;
    left: 0;
    height: 1em;
    width: 3px;
    border-radius: 999px;
    background: var(--border);
    transition: height 200ms var(--ease-out), background 200ms var(--ease-out);
}
.menu-card-title-text {
    display: inline-block;
    transition: transform 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
    .menu-card:hover .menu-card-bar { height: 1.3em; background: var(--rust); }
    .menu-card:hover .menu-card-title-text { transform: translateX(6px); }
}
.menu-card-desc { color: var(--text-muted); font-size: 0.92rem; margin-top: 0.4em; max-width: 24rem; }
.race-card-img {
    height: 230px;
    background: var(--off-white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}
.race-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 50%; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.5rem;
}

/* ---------- Carrousel (Mâles / Femelles) ---------- */

.animal-carousel { position: relative; }
.animal-carousel-track {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    padding: 1.25rem 0.25rem 1.75rem;
    scrollbar-width: none;
}
.animal-carousel-track::-webkit-scrollbar { display: none; }
.animal-carousel-track .animal-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
}
.card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.carousel-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.5rem;
}
.carousel-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(36, 55, 125, 0.25);
    cursor: pointer;
    transition: background 160ms var(--ease-out), transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.carousel-nav-btn:hover { background: var(--rust); box-shadow: 0 6px 16px rgba(162, 79, 23, 0.3); }
.carousel-nav-btn:active { transform: scale(0.93); }
.carousel-nav-btn:disabled { opacity: 0.3; cursor: default; box-shadow: none; }
.carousel-nav-btn:disabled:hover { background: var(--navy); }

@media (max-width: 700px) {
    .animal-carousel-track .animal-card { flex-basis: 220px; }
}

.animal-card, .litter-card, .mating-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 280ms var(--ease-out), box-shadow 280ms var(--ease-out);
}
.animal-card {
    display: block;
    text-decoration: none;
    color: inherit;
}
@media (hover: hover) and (pointer: fine) {
    .litter-card:hover, .mating-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 28px rgba(36, 55, 125, 0.14);
        text-decoration: none;
    }
    .animal-carousel-track .animal-card:hover {
        transform: translateY(-2px) scale(1.03) rotate(1.5deg);
        box-shadow: 0 8px 18px rgba(36, 55, 125, 0.12);
        text-decoration: none;
    }
    .animal-carousel-track .animal-card:nth-child(even):hover {
        transform: translateY(-3px) scale(1.03) rotate(-1.5deg);
    }
}
.animal-card .photo, .litter-card .photo, .mating-card .photo {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--off-white);
    overflow: hidden;
}
.animal-card .photo img, .litter-card .photo img, .mating-card .photo img {
    width: 100%; height: 100%; object-fit: cover;
}
.card-body { padding: 1.2rem; }
.card-body h3 { margin-bottom: 0.2em; }
.card-meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.6em; }

.article-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2.5rem; }
.article-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 0.85rem;
    margin: -0.85rem;
    border-radius: var(--radius);
    transition: background 200ms var(--ease-out);
}
.article-card:hover, .article-card:active { text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
    .article-card:hover { background: var(--off-white); }
}
.article-card .photo {
    position: relative;
    aspect-ratio: 3/2;
    background: var(--off-white);
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.article-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.article-card .card-body { padding: 1rem 0 0; }
.article-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.5em; }
.article-card h3 { margin-bottom: 0.4em; }
.article-excerpt { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2em 0.7em;
    border-radius: 999px;
    background: var(--rust);
    color: var(--white);
}
.badge-muted { background: var(--border); color: var(--text-muted); }
.badge-future { background: var(--amber); color: var(--white); }
.badge-mating { background: var(--navy); color: var(--white); margin-left: 0.4em; }
.puppy-parents a { color: var(--navy); font-weight: 600; }
.puppy-parents a:hover { color: var(--rust); }

.puppy-meta-row { display: flex; align-items: center; gap: 0.5em; flex-wrap: wrap; }
.puppy-sex-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2em 0.7em;
    border-radius: 999px;
}
.puppy-card-male .puppy-sex-tag { background: #DCEBF6; color: #2A5D82; }
.puppy-card-femelle .puppy-sex-tag { background: #F5DEE9; color: #8F3E67; }

.page-content.page-content-wide { max-width: 1100px; }
.puppy-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.5rem;
    margin-top: 0.5rem;
}
.litter-detail-heading-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.3em 0 0.3em;
}
.litter-detail-heading-row h1 { margin-bottom: 0; }

.puppy-card .photo.gallery { display: block; margin: 0; cursor: pointer; }
.puppy-card .photo.gallery a { display: block; width: 100%; height: 100%; }
.puppy-card .photo.gallery a.gallery-extra-link { display: none; }
.litter-cover-thumb.gallery {
    display: flex;
    width: 64px;
    flex-shrink: 0;
    margin: 0;
}
.litter-cover-thumb.gallery a {
    display: block;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.litter-cover-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
    .litter-cover-thumb a:hover img { transform: scale(1.05); }
}

.reproducteur-name { text-transform: uppercase; }

.animal-meta-line { margin-top: 0; margin-bottom: 0.35em; }
.parent-thumb.gallery {
    display: inline-flex;
    width: 24px;
    flex-shrink: 0;
    vertical-align: middle;
    margin: 0;
}
.parent-thumb.gallery a {
    display: block;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.parent-thumb img { width: 100%; height: 100%; object-fit: cover; }

.portee-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin-bottom: 2rem;
}
.portee-filter label { font-weight: 600; color: var(--navy); }
.portee-filter select {
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--white);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
}

.litter-summary-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}
.litter-summary-card {
    display: flex;
    align-items: stretch;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    color: inherit;
    transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.litter-summary-card:hover, .litter-summary-card:active { text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
    .litter-summary-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 28px rgba(36, 55, 125, 0.14);
    }
}
.litter-summary-photo {
    flex: 0 0 220px;
    aspect-ratio: 4/3;
    background: var(--off-white);
    overflow: hidden;
}
.litter-summary-photo img { width: 100%; height: 100%; object-fit: cover; }
.litter-summary-body {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3em;
}
.litter-summary-body h3 { color: var(--navy); margin-bottom: 0.1em; }
@media (max-width: 700px) {
    .litter-summary-card { flex-direction: column; }
    .litter-summary-photo { flex-basis: auto; width: 100%; aspect-ratio: 16/9; }
}
.litter-availability-count { font-size: 1rem; color: var(--navy); margin-bottom: 0.2em; }
.litter-availability-count strong { color: var(--rust); font-size: 1.15em; }
.photo-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    margin-left: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.back-link {
    display: block;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}
.back-link:hover { color: var(--rust); }

.animal-detail-hero.gallery {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}
.animal-detail-hero .animal-detail-cover-link {
    flex: 1;
    min-width: 0;
    aspect-ratio: auto;
    max-height: 520px;
}
.animal-detail-hero .animal-detail-cover-link img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; }
.animal-detail-thumbs {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 130px;
    max-height: 520px;
    overflow-y: auto;
    flex-shrink: 0;
}
@media (max-width: 700px) {
    .animal-detail-hero.gallery { flex-direction: column; }
    .animal-detail-hero .animal-detail-cover-link { max-height: 320px; }
    .animal-detail-thumbs {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
        max-height: none;
    }
    .animal-detail-thumbs a { flex: 0 0 90px; }
}

.animal-info-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--off-white);
    border-radius: var(--radius);
}
.animal-info-item dt {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.2em;
}
.animal-info-item dd { margin: 0; color: var(--navy); font-weight: 600; }

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

/* ---------- Gallery + lightbox ---------- */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}
.gallery a {
    display: block;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 8px;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
    .gallery a:hover img { transform: scale(1.05); }
}

.lightbox-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 200ms var(--ease-out), visibility 200ms;
}
.lightbox-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; }
.lightbox-overlay img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 6px;
    transform: scale(0.96);
    transition: transform 200ms var(--ease-out);
}
.lightbox-overlay.open img { transform: scale(1); }
.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--white);
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    cursor: pointer;
    transition: background 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox-nav:active { transform: translateY(-50%) scale(0.92); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-overlay.single-photo .lightbox-nav { display: none; }

@media (max-width: 700px) {
    .lightbox-nav { width: 40px; height: 40px; }
    .lightbox-prev { left: 0.4rem; }
    .lightbox-next { right: 0.4rem; }
}

/* ---------- Content pages ---------- */

.page-content { max-width: 760px; margin: 0 auto; padding: 3rem 1.25rem; }
.page-content > h1 { margin-bottom: 0.3em; }
.page-content .rich-text :is(h2, h3) { margin-top: 1.2em; }
.rich-text ul { list-style: disc; margin: 0 0 1em 1.4em; padding: 0; }
.rich-text ol { list-style: decimal; margin: 0 0 1em 1.4em; padding: 0; }
.rich-text li { margin-bottom: 0.3em; }
.rich-text img { border-radius: 8px; margin: 0.5em 0; }

/* ---------- Onglets en page ---------- */

.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin: 1.5rem 0 2rem;
}
.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 0.25rem;
    margin-right: 1.25rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--rust); }

.tab-panel {
    display: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
.tab-panel.active { display: block; }
.tab-panel.active.tab-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .tab-panel { transition: none; transform: none; }
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(64px) scale(0.96);
    filter: blur(6px);
    transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out), filter 900ms var(--ease-out);
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: none;
    filter: blur(0);
}

.reveal-stagger > * {
    opacity: 0;
    transform: translateY(56px) scale(0.96);
    filter: blur(4px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out), filter 700ms var(--ease-out);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: none; filter: blur(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 110ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 220ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 330ms; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 440ms; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 550ms; }
.reveal-stagger.is-visible > *:nth-child(n+7) { transition-delay: 600ms; }

/* ---------- Typewriter title ---------- */

.typewriter-heading {
    display: inline;
}
.typewriter-title {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
}
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 0.85em;
    margin-left: 4px;
    background: var(--rust);
    animation: typewriter-blink 800ms step-end infinite;
}
.typewriter-heading.is-done .typewriter-cursor {
    animation: typewriter-blink 800ms step-end 4;
}
@keyframes typewriter-blink {
    50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .typewriter-cursor { display: none; }
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.85);
    text-align: center;
    padding: 3rem 1.5rem 2rem;
}
.footer-brand { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--white); }
.footer-brand span { color: #e9b98a; }
.site-footer a { color: var(--white); text-decoration: underline; }
.site-footer .copyright { margin-top: 1.2em; font-size: 0.7rem; color: rgba(255,255,255,0.6); }
.footer-social { margin-top: 0.6em; display: flex; justify-content: center; gap: 0.9rem; }
.social-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    color: var(--white);
}
.social-link:hover { color: #e9b98a; }

/* ---------- Contact ---------- */

.contact-info { display: flex; flex-direction: column; gap: 0.5rem; margin: 1.5rem 0; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .nav-toggle { display: flex; }

    .main-nav {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        pointer-events: none;
        transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 200ms;
    }
    .main-nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
    .main-nav > ul { flex-direction: column; align-items: stretch; padding: 1rem; gap: 0; }
    .main-nav > ul > li { width: 100%; }
    .main-nav a { padding: 0.8rem 0.5rem; }

    .dropdown {
        position: static;
        box-shadow: none;
        border: none;
        margin: 0 0 0 1rem;
        padding: 0;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        overflow: hidden;
        max-height: 0;
        transition: max-height 220ms var(--ease-in-out);
    }
    .has-dropdown.open .dropdown { max-height: 320px; }

    .race-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    body { line-height: 1.55; }
    .puppy-banner { font-size: 0.85rem; padding: 0.55rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
    .btn:hover, .btn:active,
    .race-card:hover, .animal-card:hover, .litter-card:hover, .mating-card:hover,
    .gallery a:hover img {
        transform: none;
    }
    .reveal-on-scroll,
    .reveal-stagger > * {
        opacity: 1;
        transform: none;
        filter: none;
        transition-delay: 0ms !important;
    }
}

/* ---------- Admin (back office) ---------- */

.admin-body { background: var(--off-white); font-family: 'Inter', sans-serif; }
.admin-header {
    background: var(--navy);
    color: var(--white);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-header a { color: var(--white); }
.admin-header .admin-nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.admin-wrap { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.admin-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.admin-section-link {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    color: var(--navy);
    font-weight: 600;
}
.admin-section-link:hover { border-color: var(--rust); text-decoration: none; }
.admin-section-link small { display: block; color: var(--text-muted); font-weight: 400; margin-top: 0.3em; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.4em; color: var(--navy); }
.form-group label.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5em;
    cursor: pointer;
}
.form-group label.form-checkbox input { width: auto; margin: 0; }
.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="month"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}
.form-group textarea { min-height: 100px; }
.form-row {
    display: flex;
    gap: 1rem;
}
.form-row .form-group { flex: 1; min-width: 0; }
@media (max-width: 600px) {
    .form-row { flex-direction: column; gap: 0; }
}
.form-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.btn-plain {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
}
.btn-plain:hover { border-color: var(--rust); text-decoration: none; }
.btn-danger { color: #b3261e; border-color: #f2c9c6; }
.btn-primary { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }

.crop-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.crop-modal.open { display: flex; }
.crop-modal-inner {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.crop-modal-image-wrap {
    max-width: min(80vw, 900px);
    max-height: 65vh;
}
.crop-modal-image-wrap img { display: block; max-width: 100%; }
.crop-modal-actions { display: flex; justify-content: flex-end; gap: 0.75rem; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 0.7rem; border-bottom: 1px solid var(--border); }
.admin-table thead th { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }

.alert { padding: 0.9rem 1.1rem; border-radius: 8px; margin-bottom: 1.2rem; font-weight: 500; }
.alert-error { background: #fbeceb; color: #8a2a22; border: 1px solid #f2c9c6; }
.alert-success { background: #e9f3ea; color: #2b5a34; border: 1px solid #cfe6d1; }

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    padding: 1.5rem;
}
.login-box {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 380px;
}
.login-box h1 { text-align: center; font-size: 1.5rem; }

/* Quill editor tweaks */
.ql-toolbar.ql-snow { border-radius: 8px 8px 0 0; }
.ql-container.ql-snow { border-radius: 0 0 8px 8px; min-height: 180px; font-family: 'Inter', sans-serif; font-size: 1rem; }
