:root {
    --lpc-purple: #8268aa;
    --lpc-purple-dark: #604d83;
    --lpc-purple-soft: #eee9f5;
    --lpc-sage: #dce9df;
    --lpc-sage-dark: #56705d;
    --lpc-cream: #fbfaf7;
    --lpc-text: #302d34;
    --lpc-muted: #7e7785;
    --lpc-line: #ece8ee;
    --lpc-white: #ffffff;
    --lpc-shadow: 0 14px 40px rgba(68, 56, 76, .09);
}

* { box-sizing: border-box; }
html { background: var(--lpc-cream); }
body {
    margin: 0;
    background:
        radial-gradient(circle at 0 0, rgba(220, 233, 223, .5), transparent 28rem),
        var(--lpc-cream);
    color: var(--lpc-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(251, 250, 247, .87);
    border-bottom: 1px solid rgba(236, 232, 238, .85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: var(--lpc-text);
}
.brand:hover { color: var(--lpc-text); }
.brand-logo {
    display: block;
    width: auto;
    height: 54px;
    max-width: min(220px, 42vw);
    object-fit: contain;
}

.header-actions .btn {
    border-radius: 13px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    font-weight: 700;
    font-size: .87rem;
    border: 0;
    padding: .65rem .85rem;
    transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.header-actions .btn:hover { transform: translateY(-1px); }
.btn-primary-action {
    background: var(--lpc-purple);
    color: white;
    box-shadow: 0 8px 20px rgba(130, 104, 170, .22);
}
.btn-primary-action:hover, .btn-primary-action:focus { background: var(--lpc-purple-dark); color: white; }
.btn-primary-action.is-enabled { background: var(--lpc-sage-dark); }
.btn-light-action {
    background: white;
    color: var(--lpc-purple-dark);
    box-shadow: 0 6px 18px rgba(50, 45, 52, .08);
}
.btn-light-action:hover { background: var(--lpc-purple-soft); color: var(--lpc-purple-dark); }

.hero-shell { overflow: hidden; }
.hero-panel {
    min-height: 210px;
    border-radius: 28px;
    padding: clamp(1.5rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background:
        radial-gradient(circle at 92% 12%, rgba(255,255,255,.75) 0 7rem, transparent 7.1rem),
        linear-gradient(135deg, #ebe4f3 0%, #e4eee7 100%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.66);
    position: relative;
    overflow: hidden;
}
.hero-panel::after {
    content: "🐾";
    position: absolute;
    right: 17%;
    bottom: -32px;
    font-size: 8rem;
    opacity: .07;
    transform: rotate(-15deg);
    pointer-events: none;
}
.hero-copy { max-width: 700px; position: relative; z-index: 1; }
.hero-kicker {
    display: inline-block;
    margin-bottom: .8rem;
    color: var(--lpc-purple-dark);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 800;
}
.hero-copy h1 {
    margin: 0 0 .8rem;
    font-size: clamp(2rem, 5vw, 3.8rem);
    line-height: .98;
    letter-spacing: -.045em;
    font-weight: 800;
}
.hero-copy p { margin: 0; max-width: 620px; color: #655e69; font-size: 1rem; }
.hero-count {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 135px;
    height: 135px;
    border-radius: 50%;
    background: rgba(255,255,255,.76);
    box-shadow: 0 12px 30px rgba(70, 60, 78, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    text-align: left;
}
.hero-count strong { font-size: 2.35rem; line-height: 1; color: var(--lpc-purple-dark); }
.hero-count span { color: var(--lpc-muted); font-size: .73rem; line-height: 1.25; font-weight: 700; }
.status-message {
    min-height: 0;
    margin-top: .7rem;
    color: var(--lpc-muted);
    font-size: .82rem;
}
.status-message:empty { display: none; }

.pet-card {
    height: 100%;
    overflow: hidden;
    border-radius: 22px;
    background: var(--lpc-white);
    border: 1px solid rgba(236, 232, 238, .9);
    box-shadow: 0 8px 26px rgba(68, 56, 76, .055);
    transition: transform .22s ease, box-shadow .22s ease;
}
.pet-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--lpc-shadow);
}
.pet-photo-wrap {
    aspect-ratio: 4 / 3;
    display: block;
    position: relative;
    overflow: hidden;
    background: #f0edf1;
}
.pet-photo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .4s ease;
}
.pet-card:hover .pet-photo { transform: scale(1.035); }
.pet-photo-placeholder {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--lpc-purple-soft), var(--lpc-sage));
}
.adopt-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: .42rem .7rem;
    border-radius: 999px;
    background: rgba(255,255,255,.93);
    color: var(--lpc-sage-dark);
    font-size: .73rem;
    line-height: 1;
    font-weight: 800;
    box-shadow: 0 5px 16px rgba(50,45,52,.08);
}
.favorite-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.93);
    color: var(--lpc-purple);
    font-size: 1rem;
    box-shadow: 0 5px 16px rgba(50,45,52,.08);
}
.pet-body { padding: 1rem 1rem 1.1rem; }
.pet-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}
.pet-heading h2 {
    margin: 0 0 .22rem;
    font-size: 1.15rem;
    line-height: 1.15;
    letter-spacing: -.025em;
    font-weight: 800;
}
.pet-meta { color: var(--lpc-muted); font-size: .82rem; }
.gender-pill {
    flex: 0 0 auto;
    padding: .36rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    line-height: 1;
    font-weight: 800;
}
.gender-pill.male { background: #e8f1f7; color: #4f7892; }
.gender-pill.female { background: #f3e8ef; color: #92637f; }
.pet-description {
    margin: .9rem 0 .8rem;
    color: #746d78;
    font-size: .84rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.55rem;
}
.pet-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--lpc-purple-dark);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 800;
}
.pet-link:hover { color: var(--lpc-purple); gap: .45rem; }

.empty-state {
    padding: 4rem 1rem;
    text-align: center;
    background: white;
    border-radius: 24px;
    border: 1px solid var(--lpc-line);
}
.empty-icon { font-size: 3rem; }
.empty-state h2 { margin-top: 1rem; font-size: 1.3rem; }
.empty-state p { color: var(--lpc-muted); margin: .5rem auto 0; max-width: 520px; }

.site-footer {
    border-top: 1px solid var(--lpc-line);
    color: var(--lpc-muted);
    font-size: .8rem;
    background: rgba(255,255,255,.45);
}
.footer-link { color: var(--lpc-purple-dark); text-decoration: none; font-weight: 700; }
.footer-link:hover { color: var(--lpc-purple); }

@media (max-width: 767.98px) {
    .container { --bs-gutter-x: 1.25rem; }
    .hero-panel { min-height: auto; border-radius: 22px; }
    .hero-count { width: 96px; height: 96px; }
    .hero-count strong { font-size: 1.8rem; }
    .hero-panel::after { right: 4%; font-size: 6rem; }
}

@media (max-width: 575.98px) {
    .brand-logo { height: 44px; max-width: 155px; }
    .header-actions .btn { width: 42px; height: 42px; min-height: 42px; padding: 0; }
    .hero-panel { align-items: flex-start; }
    .hero-copy p { font-size: .92rem; }
    .hero-count { width: 84px; height: 84px; }
    .hero-count span { display: none; }
    .pet-photo-wrap { aspect-ratio: 16 / 11; }
}


/* Installation PWA - CTA mobile */
.mobile-install-wrap {
    margin-top: 1rem;
}

.mobile-install-button {
    width: 100%;
    border: 0;
    border-radius: 18px;
    padding: 15px 16px;
    display: flex;
    align-items: center;
    gap: 13px;
    text-align: left;
    background: linear-gradient(135deg, var(--lpc-purple) 0%, var(--lpc-purple-dark) 100%);
    color: #fff;
    box-shadow: 0 12px 28px rgba(96, 77, 131, .24);
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, box-shadow .15s ease;
}

.mobile-install-button:active {
    transform: scale(.985);
    box-shadow: 0 7px 18px rgba(96, 77, 131, .20);
}

.mobile-install-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255,255,255,.16);
    font-size: 1.65rem;
}

.mobile-install-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.mobile-install-copy strong {
    display: block;
    font-size: 1.03rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.01em;
}

.mobile-install-copy small {
    display: block;
    margin-top: 4px;
    font-size: .77rem;
    line-height: 1.3;
    opacity: .82;
}

.mobile-install-arrow {
    flex: 0 0 auto;
    font-size: 1.4rem;
    font-weight: 700;
    opacity: .9;
}

@media (max-width: 767.98px) {
    .hero-shell .container {
        padding-bottom: 1rem !important;
    }
}

/* v9 - cloche notifications plus visible */
.push-main-button .push-bell {
    display: inline-grid;
    place-items: center;
    line-height: 1;
    font-size: 1.2rem;
}

.push-main-button.needs-browser {
    cursor: pointer;
}

@media (max-width: 575.98px) {
    .header-actions .push-main-button {
        width: 58px;
        height: 58px;
        min-width: 58px;
        min-height: 58px;
        padding: 0;
        border-radius: 18px;
        box-shadow: 0 10px 25px rgba(130, 104, 170, .34);
    }

    .header-actions .push-main-button .push-bell {
        font-size: 1.75rem;
    }

    .header-actions .push-main-button:not(.is-enabled)::after {
        content: "";
        position: absolute;
        width: 12px;
        height: 12px;
        right: -2px;
        top: -2px;
        border-radius: 50%;
        background: #e85d75;
        border: 3px solid var(--lpc-cream);
    }

    .header-actions .push-main-button {
        position: relative;
    }
}

/* Navigateur intégré Messenger / Facebook / Instagram */
body.inapp-open {
    overflow: hidden;
}

.inapp-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.inapp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(35, 29, 39, .56);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.inapp-sheet {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    max-height: min(88vh, 720px);
    overflow-y: auto;
    margin: 0 10px max(10px, env(safe-area-inset-bottom));
    padding: 24px 20px 22px;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(28, 22, 32, .28);
    text-align: center;
}

.inapp-close {
    position: absolute;
    right: 14px;
    top: 12px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f3f0f5;
    color: var(--lpc-text);
    font-size: 1.5rem;
    line-height: 1;
}

.inapp-icon {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    margin: 3px auto 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--lpc-purple-soft), var(--lpc-sage));
    font-size: 2rem;
}

.inapp-sheet h2 {
    margin: 0 auto .75rem;
    max-width: 440px;
    font-size: 1.35rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.02em;
}

.inapp-sheet > p {
    margin: 0 auto 1.2rem;
    max-width: 460px;
    color: var(--lpc-muted);
    font-size: .92rem;
    line-height: 1.5;
}

.inapp-primary-button,
.inapp-secondary-button {
    width: 100%;
    border: 0;
    border-radius: 16px;
    min-height: 54px;
    padding: 13px 18px;
    font-weight: 800;
}

.inapp-primary-button {
    background: var(--lpc-purple);
    color: #fff;
    box-shadow: 0 10px 24px rgba(130, 104, 170, .24);
    font-size: 1rem;
}

.inapp-secondary-button {
    margin-top: 12px;
    background: var(--lpc-purple-soft);
    color: var(--lpc-purple-dark);
}

.inapp-tip {
    margin: 11px 2px 0;
    color: var(--lpc-muted);
    font-size: .82rem;
    line-height: 1.45;
}

.inapp-steps {
    display: grid;
    gap: 10px;
    text-align: left;
}

.inapp-steps > div {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px;
    border-radius: 15px;
    background: #faf8fc;
}

.inapp-steps span {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--lpc-purple);
    color: #fff;
    font-weight: 800;
    font-size: .82rem;
}

.inapp-steps p {
    margin: 4px 0 0;
    color: #665f6b;
    font-size: .86rem;
    line-height: 1.4;
}

.inapp-copy-status {
    min-height: 20px;
    margin-top: 8px;
    color: var(--lpc-sage-dark);
    font-size: .82rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .inapp-overlay {
        align-items: center;
    }
    .inapp-sheet {
        margin: 20px;
    }
}


/* v10 - aide d'installation directement sous le CTA mobile */
.install-inline-help {
    display: none;
    margin: .65rem .15rem 0;
    padding: .8rem .95rem;
    border-radius: 13px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(130, 104, 170, .16);
    color: #655e69;
    font-size: .84rem;
    line-height: 1.45;
    box-shadow: 0 6px 18px rgba(68, 56, 76, .05);
}
.install-inline-help.is-visible { display: block; }


@media (display-mode: standalone) {
    #installButton,
    #installMobileButton,
    .mobile-install-wrap {
        display: none !important;
    }
}

/* Installation PWA : masquage prioritaire, y compris face aux utilitaires Bootstrap. */
.install-hidden { display: none !important; }
@media (min-width: 768px) {
  #installButton:not(.install-hidden) { display: inline-flex !important; }
}
@media (max-width: 767.98px) {
  #installMobileButton:not(.install-hidden) { display: flex !important; }
}

/* v15 - aide d'installation desktop directement sous le bouton */
.desktop-install-wrap {
    position: relative;
}

.install-inline-help-desktop {
    position: absolute;
    top: calc(100% + .55rem);
    right: 0;
    width: min(360px, 80vw);
    z-index: 30;
    margin: 0;
}
