/* Category CSS - Vente De Conteneur */
/* Variables cohérentes avec la charte graphique */
:root {
    --primary-color: #ffd700;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --border-color: #ecf0f1;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

/* Page principale */
.category-page {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--light-gray) 0%, #ffffff 100%);
    min-height: 80vh;
}

/* Hero Section */
.category-hero {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
    margin-bottom: 3rem;
    overflow: hidden;
    position: relative;
}

.category-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.category-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}

/* Informations de catégorie */
.category-info {
    flex: 1;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.category-badge i {
    font-size: 1.1rem;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.category-description {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 600px;
}

.category-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.category-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    font-weight: 500;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.category-stats .stat:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.category-stats .stat i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* Actions de catégorie */
.category-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.category-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    min-width: 200px;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e6c200 100%);
    color: var(--text-dark);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, #e6c200 0%, var(--primary-color) 100%);
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Section produits */
.category-products {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
    padding: 2rem;
    margin-bottom: 3rem;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.products-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

/* Contrôles des produits */
.products-controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.search-filter .filter-form {
    display: flex;
    gap: 1rem;
}

.search-group {
    display: flex;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.search-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.search-input {
    padding: 0.75rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    min-width: 250px;
    background: transparent;
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.search-btn:hover {
    background: #e6c200;
}

.sort-select {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    color: var(--text-dark);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

/* Aucun produit */
.no-products {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-products-icon {
    margin-bottom: 1.5rem;
}

.no-products-icon i {
    font-size: 4rem;
    opacity: 0.5;
}

.no-products h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.no-products p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Grille de produits */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Carte produit */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* Image produit */
.product-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--light-gray);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Badges produit */
.product-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}

.badge.featured {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e6c200 100%);
    color: var(--text-dark);
}

.badge i {
    font-size: 0.7rem;
}

/* Overlay produit */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-overlay .btn {
    background: var(--primary-color);
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: none;
}

.product-overlay .btn:hover {
    background: white;
    transform: scale(1.05);
}

/* Contenu produit */
.product-content {
    padding: 1.5rem;
}

.product-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
}

.product-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-description {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Notation produit */
.product-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.2rem;
}

.stars i {
    font-size: 0.9rem;
}

.stars i.filled {
    color: var(--primary-color);
}

.stars i.empty {
    color: var(--border-color);
}

.rating-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Spécifications produit */
.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.product-specs .spec {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--light-gray);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.product-specs .spec i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* Footer produit */
.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-cart {
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
}

.btn-cart:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Autres catégories */
.other-categories {
    padding: 4rem 0;
    background: var(--light-gray);
    margin-top: 3rem;
}

.other-categories .section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

.categories-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-suggestion-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.category-suggestion-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.category-suggestion-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-suggestion-image {
    height: 160px;
    overflow: hidden;
    position: relative;
}

.category-suggestion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-suggestion-card:hover .category-suggestion-image img {
    transform: scale(1.1);
}

.category-suggestion-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.category-suggestion-info {
    padding: 1.5rem;
}

.category-suggestion-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.category-suggestion-info p {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.category-suggestion-info .product-count {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e6c200 100%);
    color: var(--text-dark);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.categories-navigation {
    text-align: center;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.product-card:nth-child(4) {
    animation-delay: 0.4s;
}

.product-card:nth-child(5) {
    animation-delay: 0.5s;
}

.product-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .category-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .category-actions {
        align-items: center;
        flex-direction: row;
        justify-content: center;
    }

    .products-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-input {
        min-width: 200px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .category-page {
        padding: 1rem 0;
    }

    .category-hero {
        margin-bottom: 2rem;
    }

    .category-header {
        padding: 2rem 1.5rem;
    }

    .category-title {
        font-size: 2rem;
    }

    .category-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .category-stats .stat {
        justify-content: center;
    }

    .category-actions {
        flex-direction: column;
        width: 100%;
    }

    .category-actions .btn {
        width: 100%;
    }

    .category-products {
        padding: 1.5rem;
    }

    .products-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .products-header h2 {
        text-align: center;
    }

    .search-group {
        flex-direction: column;
        border-radius: var(--border-radius);
    }

    .search-input {
        min-width: auto;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }

    .search-btn {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

    .categories-slider {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .other-categories {
        padding: 3rem 0;
    }

    .other-categories .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .category-header {
        padding: 1.5rem 1rem;
    }

    .category-title {
        font-size: 1.75rem;
    }

    .category-badge {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .category-products {
        padding: 1rem;
    }

    .product-content {
        padding: 1rem;
    }

    .product-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .product-actions {
        justify-content: center;
    }

    .categories-slider {
        grid-template-columns: 1fr;
    }

    .category-suggestion-info {
        padding: 1rem;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible pour accessibilité */
.btn:focus-visible,
.search-input:focus-visible,
.sort-select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}