/* ═══════════════════════════════════════════════════════════════════════════
   EZEMICROASSURANCE — FEUILLE DE STYLE : CATALOGUE PRODUITS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 1. Hero Section ────────────────────────────────────────────────────── */
.products-hero {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
    color: var(--color-on-primary);
    padding: var(--space-20) 0;
    overflow: hidden;
    text-align: center;
}

.products-hero__pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 40%),
                      radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.products-hero__container {
    position: relative;
    z-index: var(--z-raised);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--gutter-mobile);
}

.products-hero__badge {
    margin-bottom: var(--space-4);
    font-size: var(--text-label-sm);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-wider);
    text-transform: uppercase;
}

.products-hero__title {
    font-family: var(--font-headline);
    font-size: var(--text-headline-xl);
    line-height: var(--lh-headline-xl);
    font-weight: var(--fw-extrabold);
    letter-spacing: var(--ls-tight);
    margin-bottom: var(--space-4);
}

.products-hero__description {
    font-size: var(--text-body-lg);
    line-height: var(--lh-body-lg);
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
}

/* ─── 2. Filters & Search ────────────────────────────────────────────────── */
.products-filters {
    background: var(--color-surface-card);
    border-bottom: 1px solid var(--color-outline-variant);
    padding: var(--space-6) 0;
    position: sticky;
    top: 79px; /* hauteur de la navbar */
    z-index: var(--z-overlay);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.products-filters__wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.products-filters__categories {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    padding-bottom: var(--space-2);
    margin-bottom: calc(-1 * var(--space-2));
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.products-filters__categories::-webkit-scrollbar {
    display: none; /* Safari & Chrome */
}

.btn--filter {
    background: var(--color-surface-low);
    color: var(--color-primary-container);
    border: 1px solid transparent;
    font-size: var(--text-label-md);
    font-weight: var(--fw-semibold);
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: var(--transition-fast);
}

.btn--filter:hover {
    background: var(--color-surface-container);
}

.btn--filter.active {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

.products-filters__search-wrapper {
    position: relative;
    flex: 1;
    max-width: 360px;
    min-width: 260px;
}

.products-filters__search-icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-outline);
    font-size: 20px;
    pointer-events: none;
}

.products-filters__search-input {
    width: 100%;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-outline-variant);
    color: var(--color-on-surface);
    font-family: var(--font-body);
    font-size: var(--text-body-md);
    padding: var(--space-3) var(--space-4) var(--space-3) var(--space-10);
    border-radius: var(--radius-btn);
    transition: var(--transition-fast);
}

.products-filters__search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface-card);
    box-shadow: 0 0 0 3px rgba(0, 54, 103, 0.1);
}

/* ─── 3. Product Grid ────────────────────────────────────────────────────── */
.products-grid-section {
    padding: var(--space-16) 0;
    background: var(--color-background);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-8);
}

.product-card {
    background: var(--color-surface-card);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--radius-card);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    transition: var(--transition-bounce);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-outline);
}

.product-card__icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
}

.product-card__icon-wrapper span {
    font-size: 32px;
}

/* Color Accents */
.product-card__icon-wrapper--primary {
    background: var(--color-primary-fixed);
    color: var(--color-primary);
}

.product-card__icon-wrapper--secondary {
    background: var(--color-secondary-container);
    color: var(--color-secondary);
}

.product-card__icon-wrapper--warning {
    background: #FEF3C7; /* Orange très clair */
    color: var(--color-warning);
}

.product-card__icon-wrapper--error {
    background: #FEE2E2; /* Rouge très clair */
    color: var(--color-error);
}

.product-card__icon-wrapper--tertiary {
    background: var(--color-tertiary-fixed);
    color: var(--color-tertiary);
}

.product-card__title {
    font-family: var(--font-headline);
    font-size: var(--text-headline-sm);
    line-height: var(--lh-headline-md);
    font-weight: var(--fw-bold);
    color: var(--color-text-heading);
    margin-bottom: var(--space-3);
}

.product-card__description {
    font-size: var(--text-body-sm);
    line-height: var(--lh-body-sm);
    color: var(--color-on-surface-variant);
    margin-bottom: var(--space-6);
    flex-grow: 1;
}

.product-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid var(--color-surface-alt);
    padding-top: var(--space-4);
    gap: var(--space-2);
}

.product-card__price {
    font-size: var(--text-label-sm);
    font-weight: var(--fw-bold);
    color: var(--color-on-surface);
}

.product-card__btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-label-sm);
    white-space: nowrap;
}

/* Empty State / No Results */
.products-grid__empty,
.products-grid__no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-16) var(--space-6);
    background: var(--color-surface-card);
    border: 1px dashed var(--color-outline-variant);
    border-radius: var(--radius-card);
}

.hidden {
    display: none !important;
}

/* ─── 4. CTA Section ─────────────────────────────────────────────────────── */
.products-cta {
    background: var(--color-surface-low);
    padding: var(--space-16) 0;
    text-align: center;
}

.products-cta__container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 var(--gutter-mobile);
}

.products-cta__title {
    font-family: var(--font-headline);
    font-size: var(--text-headline-lg);
    line-height: var(--lh-headline-lg);
    font-weight: var(--fw-extrabold);
    color: var(--color-text-heading);
    margin-bottom: var(--space-4);
}

.products-cta__description {
    font-size: var(--text-body-md);
    line-height: var(--lh-body-md);
    color: var(--color-on-surface-variant);
    margin-bottom: var(--space-8);
}

.products-cta__buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.products-cta__btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* ─── 5. Trust Section ───────────────────────────────────────────────────── */
.products-trust {
    padding: var(--space-20) 0;
    background: var(--color-surface-card);
}

.products-trust__container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-12);
    align-items: center;
}

.products-trust__image-container {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    height: 480px;
    box-shadow: var(--shadow-soft);
}

.products-trust__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.products-trust__image-container:hover .products-trust__image {
    transform: scale(1.03);
}

.products-trust__image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 54, 103, 0.2), transparent);
}

.products-trust__content {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.products-trust__title {
    font-family: var(--font-headline);
    font-size: var(--text-headline-lg);
    line-height: var(--lh-headline-lg);
    font-weight: var(--fw-extrabold);
    color: var(--color-text-heading);
}

.products-trust__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    list-style: none;
    padding: 0;
}

.products-trust__item {
    display: flex;
    gap: var(--space-4);
}

.products-trust__item-icon span {
    font-size: 28px;
    color: var(--color-secondary);
}

.products-trust__item-title {
    font-family: var(--font-headline);
    font-size: var(--text-headline-sm);
    font-weight: var(--fw-bold);
    color: var(--color-text-heading);
    margin-bottom: var(--space-1);
}

.products-trust__item-desc {
    font-size: var(--text-body-md);
    line-height: var(--lh-body-md);
    color: var(--color-on-surface-variant);
}

/* ─── 6. Responsive Design ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .products-trust__container {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }
    
    .products-trust__image-container {
        height: 360px;
    }
}

@media (max-width: 768px) {
    .products-hero {
        padding: var(--space-16) 0;
    }
    
    .products-filters__wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .products-filters__search-wrapper {
        max-width: 100%;
    }
    
    .products-cta__buttons {
        flex-direction: column;
    }
    
    .products-cta__btn {
        width: 100%;
        justify-content: center;
    }
}
