/* ==========================================================================
   DÉMOS - LISTE (infinite scroll)
   ========================================================================== */

.demo-wrapper {
    background-color: #f8fafc;
    color: #0f172a;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding-bottom: 5rem;
}

.demo-wrapper h1,
.demo-wrapper h2,
.demo-wrapper h3 {
    font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- En-tête --- */
.demo-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 4rem 0 3rem;
    text-align: center;
}

.demo-hero-inner {
    max-width: 680px;
    margin: 0 auto;
}

.demo-hero .inar-badge {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.demo-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.demo-hero-subtitle {
    font-size: 1.125rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

/* --- Filtres (carte partagée : styles dans list_inar_product.css) --- */
.demo-filters {
    padding: 2rem 0 0;
}

/* --- Grille --- */
.demo-content {
    padding: 2rem 0 3rem;
}

.demo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

@media (min-width: 640px) {
    .demo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .demo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Carte démo --- */
.demo-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.demo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px -8px rgba(15, 23, 42, 0.12);
    border-color: #cbd5e1;
}

.demo-card-media {
    aspect-ratio: 400 / 250;
    background-color: #f1f5f9;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.demo-card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.demo-card-media svg {
    width: 3rem;
    height: 3rem;
}

.demo-card-body {
    padding: 0.25rem 0.5rem 0.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.demo-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.demo-card-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.demo-card-title a:hover {
    color: #2563eb;
}

.demo-card-desc {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 1.25rem;
}

.demo-card-footer {
    margin-top: auto;
}

.demo-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.6rem 1rem;
    background-color: #2563eb;
    color: #ffffff !important;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.938rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.demo-card-btn:hover {
    background-color: #1d4ed8;
}

/* --- État vide --- */
.demo-empty {
    text-align: center;
    padding: 4rem 1.5rem;
    background-color: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    color: #64748b;
}

.demo-empty.hidden {
    display: none;
}

/* --- Sentinelle (infinite scroll) --- */
.demo-sentinel {
    display: flex;
    justify-content: center;
    padding: 3rem 0 0;
}

.demo-sentinel.done,
.demo-sentinel.hidden {
    display: none;
}

.demo-spinner {
    width: auto;
    height: 5rem;
    max-width: none;
    object-fit: contain;
    background: transparent;
    opacity: 0;
}

.demo-sentinel.is-loading .demo-spinner {
    opacity: 1;
}

@keyframes demo-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Animations au scroll (réutilise l'observer de inar-animations) --- */
.inar-anim-enabled .demo-card {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.inar-anim-enabled .demo-card.in-view {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .inar-anim-enabled .demo-card {
        opacity: 1;
        transition: none;
    }
}
