/* ./demo — extrait du bloc <style> inline (refonte Phase 2) */

/* ── Hero : fond sombre, horizontal, ouvert ── */
.demo-hero {
background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(99, 102, 241, 0.25) 100%);
background-color: #0F172A;
padding: 160px 0 80px;
text-align: center;
position: relative;
overflow: hidden;
}

.demo-hero::before {
content: '';
position: absolute;
inset: 0;
background:
    radial-gradient(ellipse 60% 50% at 20% 40%, rgba(99, 102, 241, 0.18), transparent),
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(34, 211, 238, 0.1), transparent);
pointer-events: none;
}

.demo-hero .container { position: relative; z-index: 1; }

.demo-hero h1 {
color: #fff;
font-size: clamp(2.2rem, 5vw, 3.6rem);
font-weight: 800;
letter-spacing: -0.03em;
line-height: 1.12;
margin-bottom: 1.25rem;
max-width: 780px;
margin-left: auto;
margin-right: auto;
}

.demo-hero-sub {
color: rgba(255,255,255,0.75);
font-size: 1.15rem;
line-height: 1.7;
max-width: 560px;
margin: 0 auto 2.25rem;
}

.demo-hero .hero-cta {
display: flex;
gap: 0.85rem;
justify-content: center;
flex-wrap: wrap;
}

.demo-hero .hero-cta .btn-primary {
padding: 0.9rem 2rem;
}

.demo-hero .hero-cta .btn-outline {
padding: 0.9rem 2rem;
border-color: rgba(255,255,255,0.25);
color: #fff;
}

.demo-hero .hero-cta .btn-outline:hover {
border-color: rgba(255,255,255,0.6);
background: rgba(255,255,255,0.08);
color: #fff;
}

.demo-hero-stats {
display: flex;
justify-content: center;
gap: 3rem;
margin-top: 3rem;
padding-top: 2.25rem;
border-top: 1px solid rgba(255,255,255,0.08);
}

.demo-stat strong {
display: block;
font-size: 1.75rem;
font-weight: 800;
color: var(--accent);
line-height: 1;
margin-bottom: 0.3rem;
}

.demo-stat span {
color: rgba(255,255,255,0.55);
font-size: 0.88rem;
font-weight: 500;
}

/* ── Barre de filtres ── */
.demo-filters-bar {
padding: 1.5rem 0;
background: var(--gray-50);
border-bottom: 1px solid var(--gray-200);
position: sticky;
top: 72px;
z-index: 50;
}

.demo-filters {
display: flex;
flex-wrap: wrap;
gap: 0.55rem;
justify-content: center;
}

.demo-filter {
display: inline-flex;
align-items: center;
gap: 0.35rem;
padding: 0.55rem 1.1rem;
border-radius: 999px;
background: white;
border: 1px solid var(--gray-200);
color: var(--gray-600);
font-weight: 500;
font-size: 0.9rem;
transition: all 0.2s ease;
}

.demo-filter:hover {
color: var(--primary);
border-color: var(--primary);
background: rgba(99, 102, 241, 0.04);
}

.demo-filter.active {
color: white;
background: var(--primary);
border-color: var(--primary);
box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3);
}

.demo-filter .demo-filter-count {
font-size: 0.78rem;
opacity: 0.6;
}

/* ── Section catalogue ── */
.demo-catalogue {
padding: 4rem 0 5rem;
}

.demo-group {
margin-bottom: 4.5rem;
}

.demo-group:last-child { margin-bottom: 0; }

.demo-group-title {
display: flex;
align-items: center;
gap: 0.85rem;
margin-bottom: 2rem;
}

.demo-group-title h2 {
font-size: 1.65rem;
margin: 0;
}

.demo-group-badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 34px;
height: 34px;
border-radius: 10px;
background: rgba(79, 70, 229, 0.1);
color: var(--primary);
font-weight: 700;
font-size: 0.85rem;
}

/* ── Grille de cartes ── */
.demo-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 2rem;
}

.demo-card {
background: white;
border: 1px solid var(--gray-200);
border-radius: var(--radius-xl);
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
display: flex;
flex-direction: column;
}

.demo-card:hover {
transform: translateY(-6px);
box-shadow: var(--shadow-xl);
}

.demo-card-img {
position: relative;
aspect-ratio: 16 / 10;
overflow: hidden;
background: var(--gray-100);
}

.demo-card-img img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.45s ease;
}

.demo-card:hover .demo-card-img img {
transform: scale(1.05);
}

.demo-card-cat {
position: absolute;
top: 0.85rem;
left: 0.85rem;
padding: 0.35rem 0.75rem;
border-radius: 999px;
font-size: 0.75rem;
font-weight: 700;
color: white;
background: linear-gradient(135deg, var(--primary), #7c3aed);
box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.demo-card-body {
padding: 1.5rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
flex: 1;
}

.demo-card-head {
display: flex;
justify-content: space-between;
align-items: start;
gap: 0.75rem;
}

.demo-card-head h3 {
font-size: 1.1rem;
margin: 0;
line-height: 1.4;
color: var(--gray-900);
}

.demo-card-price {
flex-shrink: 0;
text-align: right;
white-space: nowrap;
}

.demo-card-price strong {
display: block;
font-size: 1.2rem;
font-weight: 800;
color: var(--primary);
line-height: 1;
}

.demo-card-price small {
color: var(--gray-500);
font-size: 0.75rem;
}

.demo-card-desc {
color: var(--gray-600);
font-size: 0.92rem;
line-height: 1.7;
margin: 0;
flex: 1;
}

.demo-card-btns {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.65rem;
margin-top: auto;
padding-top: 0.5rem;
}

.demo-card-btns .btn-outline,
.demo-card-btns .btn-primary {
text-align: center;
justify-content: center;
width: 100%;
padding: 0.75rem 0.5rem;
font-size: 0.85rem;
}

.demo-empty {
text-align: center;
padding: 4rem 2rem;
background: var(--gray-50);
border: 1px solid var(--gray-200);
border-radius: var(--radius-xl);
}

/* ── Responsive ── */
@media (max-width: 992px) {
.demo-hero { padding: 140px 0 60px; }

.demo-hero-stats { gap: 2rem; }

.demo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
}

@media (max-width: 768px) {
.demo-hero { padding: 130px 0 50px; }

.demo-hero h1 { font-size: clamp(1.75rem, 7vw, 2.5rem); }

.demo-hero-sub { font-size: 1rem; }

.demo-hero-stats {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.demo-hero .hero-cta .btn-primary,
.demo-hero .hero-cta .btn-outline {
    width: 100%;
}

.demo-filters-bar { top: 0; }

.demo-filter {
    flex: 1 1 auto;
    justify-content: center;
    font-size: 0.83rem;
    padding: 0.5rem 0.85rem;
}

.demo-card-head { flex-direction: column; }
.demo-card-price { text-align: left; }
}

@media (max-width: 640px) {
.demo-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.demo-card-btns { grid-template-columns: 1fr; }

.demo-catalogue { padding: 2.5rem 0 3rem; }
}

/* ── Dark Mode ── */
[data-theme="dark"] .demo-hero {
background: linear-gradient(135deg, rgba(2, 6, 23, 0.95) 0%, rgba(79, 70, 229, 0.2) 100%);
background-color: #020617;
}

[data-theme="dark"] .demo-filters-bar {
background: #0F172A;
border-bottom-color: #1E293B;
}

[data-theme="dark"] .demo-filter {
background: #1E293B;
border-color: #334155;
color: #CBD5E1;
}

[data-theme="dark"] .demo-filter:hover {
background: rgba(79, 70, 229, 0.12);
border-color: var(--primary);
color: var(--primary-light);
}

[data-theme="dark"] .demo-filter.active {
background: var(--primary);
border-color: var(--primary);
color: white;
}

[data-theme="dark"] .demo-catalogue {
background: #020617;
}

[data-theme="dark"] .demo-group-title h2 { color: #F1F5F9; }

[data-theme="dark"] .demo-group-badge {
background: rgba(79, 70, 229, 0.2);
color: var(--primary-light);
}

[data-theme="dark"] .demo-card {
background: #1E293B;
border-color: #334155;
}

[data-theme="dark"] .demo-card:hover {
box-shadow: 0 16px 40px rgba(0,0,0,0.4);
border-color: rgba(79, 70, 229, 0.4);
}

[data-theme="dark"] .demo-card-img { background: #0F172A; }

[data-theme="dark"] .demo-card-head h3 { color: #F1F5F9; }
[data-theme="dark"] .demo-card-desc { color: #94A3B8; }
[data-theme="dark"] .demo-card-price strong { color: var(--primary-light); }
[data-theme="dark"] .demo-card-price small { color: #64748B; }

[data-theme="dark"] .demo-empty {
background: #1E293B;
border-color: #334155;
}

[data-theme="dark"] .demo-empty h3 { color: #F1F5F9; }
[data-theme="dark"] .demo-empty p { color: #94A3B8 !important; }
