/* ==========================================================================
   Variables & Reset
   ========================================================================== */
:root {
    --primary-color: #0288D1;
    /* Bleu clair */
    --primary-dark: #0277bd;
    --accent-color: #FF5722;
    /* Orange/Rouge */
    --accent-dark: #e64a19;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f4f7f6;
    --white: #ffffff;
    --border-color: #eaeaea;
    --success-color: #25D366;
    /* WhatsApp Green */
    --success-dark: #128C7E;
    --danger-color: #e74c3c;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
    border-radius: 2px;
}


/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-whatsapp {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-whatsapp:hover {
    background-color: var(--success-dark);
}

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

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* ==========================================================================
   Header & Nav
   ========================================================================== */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

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

.logo .highlight {
    color: var(--accent-color);
}

.nav-list {
    display: flex;
    gap: 20px;
}

.nav-list a {
    font-weight: 500;
    transition: var(--transition);
}

.nav-list a:hover {
    color: var(--accent-color);
}

.cart-btn {
    position: relative;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 50%;
    transition: var(--transition);
}

.cart-btn:hover {
    background-color: var(--bg-color);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--accent-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(20%, -20%);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Products Section
   ========================================================================== */
.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 8px 16px;
    background-color: var(--white);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-weight: 500;
    transition: var(--transition);
}

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

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.product-img-container {
    width: 100%;
    height: 200px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    position: relative;
}

.product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.zoom-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .zoom-btn {
    opacity: 1;
}

.zoom-btn:hover {
    background-color: var(--primary-color);
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 5px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 10px;
    flex-grow: 1;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-section {
    background-color: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.about-card {
    padding: 30px 20px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.about-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.about-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent-color);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 15px;
    color: var(--text-light);
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary-color);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: #222;
    color: #eee;
    padding: 60px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-col p {
    margin-bottom: 10px;
    color: #bbb;
}

.social-link {
    display: inline-block;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-link:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #888;
    font-size: 0.9rem;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--white);
    width: 90%;
    max-width: 600px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-small {
    max-width: 400px;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    font-size: 1.5rem;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Cart Items inside Modal */
.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

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

.cart-item-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--accent-color);
    font-weight: bold;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-color);
    border-radius: 20px;
    padding: 5px 10px;
}

.qty-btn {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    color: var(--accent-color);
}

.remove-item-btn {
    color: var(--danger-color);
    font-size: 1.2rem;
}

.cart-total {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-light);
    padding: 20px 0;
}

/* Image Zoom Modal Content */
.modal-image-zoom {
    background-color: transparent;
    box-shadow: none;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.zoomed-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    object-fit: contain;
}

.modal-image-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-image-close:hover {
    color: var(--danger-color);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 250px;
    background-color: var(--white);
    color: var(--text-color);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.3s forwards;
}

.toast.toast-success {
    border-left-color: var(--success-color);
}

.toast.toast-error {
    border-left-color: var(--danger-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ==========================================================================
   Floating Buttons
   ========================================================================== */
.floating-wa-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition);
    animation: floatAnim 3s ease-in-out infinite;
}

.floating-wa-btn:hover {
    transform: scale(1.1);
    background-color: #128C7E;
}

@keyframes floatAnim {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.back-to-top-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .nav-list {
        display: none;
        /* simple mobile behavior, could implement a hamburger switch */
    }

    .hero-title {
        font-size: 2rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}