/* Import du CSS de base */
@import url('index.css');
@import url('global.css');

/* Styles spécifiques à la page boutique */
.hero {
    padding: 120px 0 60px;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.feature i {
    font-size: 1.2rem;
}

/* Filtres de produits */
.product-filters {
    padding: 40px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

/* Grille de produits */
.products-grid {
    padding: 80px 0;
    background: var(--bg-primary);
}

.products-grid .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
}

.product-item {
    opacity: 1;
    transform: scale(1);
    transition: all 0.5s ease;
     max-width: 600px;
}

.product-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.product-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
   
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-badge.bestseller {
    background: var(--gradient-secondary);
    color: white;
}

.product-badge.free {
    background: var(--gradient-accent);
    color: white;
}

.product-image {
    height: 280px;
    background: var(--bg-secondary);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Preview Excel */
.excel-preview {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.excel-header {
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
}

.excel-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.excel-content {
    height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
}

.excel-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cell-ref {
    background: white;
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.formula-bar {
    flex: 1;
    background: white;
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-primary);
}

.excel-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    border-bottom: 1px solid var(--border-color);
}

.grid-row.header {
    background: #f8f9fa;
    font-weight: 600;
}

.cell {
    padding: 0.5rem 0.25rem;
    border-right: 1px solid var(--border-color);
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cell:last-child {
    border-right: none;
}

.cell.status {
    font-weight: 600;
}

.cell.status.ok {
    color: var(--secondary-color);
}

.cell.status.alert {
    color: var(--accent-color);
}

.cell.status.pending {
    color: var(--primary-color);
}

/* Informations du produit */
.product-info {
    padding: 2rem;
}

.product-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.product-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.product-features {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.feature-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.stars {
    display: flex;
    gap: 0.1rem;
}

.stars i {
    color: #fbbf24;
    font-size: 0.9rem;
}

.rating-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price.free-price {
    color: var(--secondary-color);
}

.price-old {
    font-size: 1.2rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.add-to-cart,
.download-free {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Panier */
.cart {
    position: fixed;
    top: 20%;
    right: 2rem;
    transform: translateY(-50%);
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    min-width: 300px;
    max-width: 400px;
    border: 1px solid var(--border-color);
}

.cart-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.cart-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cart-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cart-content {
    max-height: 400px;
    overflow-y: auto;
}

#cart-items {
    padding: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: var(--bg-secondary);
}

.cart-total {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.checkout-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: var(--gradient-primary);
    color: white;
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-primary {
    background: white;
    color: var(--primary-color);
}

.cta .btn-outline {
    border-color: white;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-features {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .filter-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    .products-grid .container {
        grid-template-columns: 1fr;
    }

    .product-card {
        max-width: 100%;
    }

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

    .cell {
        font-size: 0.6rem;
        padding: 0.25rem;
    }

    .cart {
        position: fixed;
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        transform: none;
        border-radius: 16px 16px 0 0;
        min-width: auto;
        max-width: none;
    }

    .cta h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 40px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .product-info {
        padding: 1.5rem;
    }

    .product-features {
        gap: 0.25rem;
    }

    .feature-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .excel-preview {
        transform: scale(0.9);
    }

    .cart {
        margin: 0;
    }

    .cart-content {
        max-height: 300px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.product-item {
    animation: fadeInUp 0.6s ease forwards;
}

.product-item:nth-child(1) { animation-delay: 0.1s; }
.product-item:nth-child(2) { animation-delay: 0.2s; }
.product-item:nth-child(3) { animation-delay: 0.3s; }
.product-item:nth-child(4) { animation-delay: 0.4s; }
.product-item:nth-child(5) { animation-delay: 0.5s; }
.product-item:nth-child(6) { animation-delay: 0.6s; }

.cart {
    animation: slideInRight 0.5s ease forwards;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* États des boutons */
.add-to-cart:hover,
.download-free:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.add-to-cart:active,
.download-free:active {
    transform: translateY(0);
}

/* Animation du panier */
.cart-bounce {
    animation: cartBounce 0.3s ease;
}

@keyframes cartBounce {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.05); }
}

