html, body {
    height: 100%; /* Important pour que 100vh fonctionne bien */
    min-height: 100vh; /* S'assure que la page fait au moins 100% de la hauteur du viewport */
}
/* --- Base Variables & Global Styles --- */
:root {
    /* Define your primary colors for easy modification */
    --color-primary-pink: #D8BFD8; /* Thistle - A soft, muted pink */
    --color-primary-green: #90EE90; /* Light Green - A soft, muted green */
    --color-text-dark: #333333;
    --color-text-medium: #555555;
    --color-text-light: #777777;
    --color-background-light: #FFFFFF;
    --color-background-offwhite: #F9F9F9;
    --color-border: #EEEEEE;
    --color-shadow-light: rgba(0, 0, 0, 0.05);
    --color-shadow-medium: rgba(0, 0, 0, 0.1);
    --color-shadow-strong: rgba(0, 0, 0, 0.15);
    --color-accent-blue: #007bff; /* Keep a subtle blue for general links if needed */
    --color-danger-red: #dc3545; /* For error messages, etc. */
    --color-success-green: #28a745; /* For success messages, etc. */

    /* New: Define content width variables */
    --content-max-width-desktop: 1440px; /* Maximum width for very large screens */
    --content-width-large: 90%; /* 90% for large screens */
    --content-width-medium: 85%; /* 85% for medium screens */
    --content-width-small: 95%; /* 95% for small screens to avoid too narrow content */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: var(--color-background-offwhite); /* Soft off-white background */
    color: var(--color-text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll when side menu is off-screen */
    display: flex;
    flex-direction: column;
}

/* Base link style */
a {
    text-decoration: none;
    color: var(--color-text-dark); /* Default links are dark for minimalist feel */
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary-pink); /* Pink on hover for elegance */
}

h1, h2, h3 {
    color: var(--color-text-dark);
    margin-bottom: 20px;
}

/* Global Button Styles */
.btn {
    padding: 12px 25px; /* Slightly larger buttons */
    border-radius: 8px; /* Softer rounded corners */
    cursor: pointer;
    font-size: 1em;
    font-weight: 600; /* Slightly bolder */
    color: var(--color-background-light); /* White text on buttons */
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary-green); /* Green primary button */
    box-shadow: 0 4px 8px var(--color-shadow-medium);
}
.btn-primary:hover {
    background-color: #7EC87E; /* Darken green on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--color-shadow-strong);
}

.btn-secondary {
    background-color: var(--color-primary-pink); /* Pink secondary button */
    box-shadow: 0 4px 8px var(--color-shadow-medium);
}
.btn-secondary:hover {
    background-color: #C8B0C8; /* Darken pink on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--color-shadow-strong);
}


/* --- Header Styles --- */
header {
    background-color: var(--color-background-light); /* White header background */
    padding: 10px 20px; /* Consistent padding */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* Full width */
    z-index: 1000;
    box-shadow: 0 2px 10px var(--color-shadow-light); /* Soft shadow */
    display: flex;
    align-items: center;
    justify-content: center; /* Center the content inside header */
}

.header-container { /* This class is used in your HTML for flex layout */
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: var(--content-width-large); /* Take 90% width */
    max-width: var(--content-max-width-desktop); /* Limit header content width */
}

.header-left .logo img {
    height: 70px; /* Logo height */
    vertical-align: middle;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header-top-text span,
.header-top-text a {
    margin-left: 20px;
    font-size: 0.9em;
    color: var(--color-text-medium);
    text-decoration: none;
}
.header-top-text a:hover {
    text-decoration: underline;
    color: var(--color-primary-pink);
}

.header-bottom-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.search-bar {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: 25px; /* More rounded search bar */
    overflow: hidden;
    background-color: var(--color-background-offwhite); /* Light background for search */
}

.search-bar input {
    border: none;
    padding: 10px 15px; /* Increased padding */
    font-size: 0.95em;
    outline: none;
    width: 220px; /* Slightly wider search input */
    background-color: transparent; /* Transparent input background */
    color: var(--color-text-dark);
}

.search-bar button {
    background-color: var(--color-primary-green); /* Green search button */
    color: var(--color-background-light);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
    border-radius: 0 25px 25px 0; /* Match search bar rounding */
}

.search-bar button:hover {
    background-color: #7EC87E; /* Darken green on hover */
}

.header-icons a {
    color: var(--color-text-dark);
    font-size: 1.6em; /* Slightly larger icons */
    margin-left: 18px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-icons a:hover {
    color: var(--color-primary-pink); /* Pink on hover for icons */
}

/* Description / Hero Section (Adjusted from #description) */
#description {
    background-color: var(--color-primary-pink); /* Pink background for description */
    color: var(--color-background-light); /* White text */
    padding: 30px 20px; /* More padding */
    text-align: center;
    width: 98vw; /* Full width */
    line-height: 1.8; /* Improved readability */
    z-index: 999; /* Below header */
    margin-top: 80px; /* Space from fixed header */
    box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.05); /* Subtle inner shadow */
    display:flex;
    font-size: 20px;
    
}

#description p{
    margin-top:80px;
}

#description img{
    width:20vw;
    height: auto;
}

/* --- Main Content Area --- */
.main-content {
    flex-grow: 1;
    padding: 40px 20px; /* More generous padding */
    width: var(--content-width-large); /* Use 90% width */
    max-width: var(--content-max-width-desktop); /* Limit max width */
    margin: 0 auto; /* Center the main content */
    padding-top: calc(80px + 40px); /* Adjust padding for fixed header */
}

.product-info-detail h1 { /* Specific for product detail page if needed */
    margin-top: 40px; /* Adjust if it clashes with header on product detail */
    text-align: center;
    font-size: 2.8em; /* Larger, more prominent title */
    color: var(--color-primary-green);
    position: relative;
    padding-bottom: 15px;
}
.product-info-detail h1::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100px; /* Underline for heading */
    height: 4px;
    background-color: var(--color-primary-pink);
    border-radius: 2px;
}


.category-section {
    margin-bottom: 60px; /* More space between sections */
    padding: 30px; /* More padding inside sections */
    background-color: var(--color-background-light);
    border-radius: 12px; /* More rounded corners */
    box-shadow: 0 6px 20px var(--color-shadow-light); /* Softer, larger shadow */
}

.category-title { /* This is also used on category pages for main titles */
    text-align: center;
    font-size: 2.4em; /* Prominent category title */
    color: var(--color-text-dark);
    margin-top: 0;
    margin-bottom: 35px;
    position: relative;
    padding-bottom: 15px;
}

.category-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 90px;
    height: 3px;
    background-color: var(--color-primary-green); /* Green underline */
    border-radius: 2px;
}


/* --- Product Grid & Card Styles (Consolidated and Refined) --- */
.products-grid { /* Used for general product listings */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); /* Slightly larger min-width */
    gap: 35px; /* More space between cards */
    justify-content: center;
    margin-top: 40px;
    padding: 0; /* Padding handled by .main-content */
}

.product-card {
    background-color: var(--color-background-light);
    border-radius: 10px; /* Consistent rounded corners */
    box-shadow: 0 4px 15px var(--color-shadow-light);
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100%;
    color: var(--color-text-dark);
}

.product-card:hover {
    transform: translateY(-7px); /* More pronounced lift */
    box-shadow: 0 10px 25px var(--color-shadow-medium);
}

.product-card img {
    width: 100%;
    height: 220px; /* Consistent image height */
    object-fit: cover;
    border-bottom: 1px solid var(--color-border);
}

.product-info {
    padding: 20px; /* More padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h3 {
    font-size: 1.3em; /* Slightly larger title */
    margin: 0 0 12px 0;
    color: var(--color-text-dark);
    min-height: 2.6em; /* Ensure space for 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info p {
    font-size: 1.4em; /* Larger price */
    color: var(--color-primary-pink); /* Pink price */
    font-weight: bold;
    margin-top: auto;
    margin-bottom: 0;
}

/* Product Badges (Nouveauté, Pièce Unique) - New in this CSS */
.product-info .badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: bold;
    margin-right: 8px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-info .new-badge {
    background-color: var(--color-success-green); /* Green for new */
    color: var(--color-background-light);
}

.product-info .unique-badge {
    background-color: var(--color-primary-pink); /* Pink for unique */
    color: var(--color-background-light);
}

.product-card .btn-add-to-cart { /* Specific button for product cards */
    background-color: var(--color-primary-green);
    color: var(--color-background-light);
    padding: 12px;
    margin-top: 15px;
    width: 100%;
    border-radius: 8px;
    font-size: 1.05em;
}
.product-card .btn-add-to-cart:hover {
    background-color: #7EC87E; /* Darken green on hover */
}


.product-card-link { /* Ensure the entire card is clickable */
    text-decoration: none;
    color: inherit;
    display: block;
}

/* --- Messages (Info, Erreur) --- */
.message-info, .message-erreur {
    text-align: center;
    padding: 20px;
    margin: 30px auto;
    max-width: 700px; /* Wider messages */
    border-radius: 10px; /* Softer corners */
    font-size: 1.1em;
    box-shadow: 0 2px 8px var(--color-shadow-light);
}

.message-info {
    background-color: #e6f7ff; /* Light blue */
    color: #0056b3;
    border: 1px solid #99d9ff;
}

.message-erreur {
    background-color: #ffe6e6; /* Light red */
    color: var(--color-danger-red);
    border: 1px solid #ffb3b3;
}


/* --- Carrousel Styles (Refined and Consolidated) --- */
.carousel-container {
    position: relative;
    width: var(--content-width-large); /* Use 90% width */
    max-width: var(--content-max-width-desktop); /* Limit max width */
    margin: 60px auto; /* More vertical space */
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--color-shadow-medium); /* More prominent shadow */
    background-color: var(--color-background-light);
    padding: 30px; /* More padding */
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smoother animation */
}

.carousel-item {
    flex: 0 0 20%;
    min-width: 20%;
    box-sizing: border-box;
    text-align: center;
    padding: 20px; /* More padding */
    text-decoration: none;
    color: var(--color-text-dark);
    position: relative;
    transition: transform 0.3s ease;
}

.carousel-item img {
    width: 160px; /* Slightly larger image size */
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15); /* Softer shadow */
    border: 6px solid rgba(255, 255, 255, 0.9); /* Thicker, slightly opaque border */
    display: block;
    margin: 0 auto 15px auto;
}

.carousel-item:hover img {
    transform: scale(1.08) translateY(-8px); /* More pronounced effect */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.image-caption {
    font-size: 1.2em; /* Larger caption */
    font-weight: 700; /* Bolder */
    color: var(--color-text-dark);
    margin-top: 10px;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6); /* Darker buttons */
    color: white;
    border: none;
    padding: 12px 18px; /* Larger buttons */
    cursor: pointer;
    font-size: 1.8em; /* Larger arrow icons */
    border-radius: 8px;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-button.prev {
    left: 20px;
}

.carousel-button.next {
    right: 20px;
}

.carousel-dots {
    text-align: center;
    margin-top: 30px; /* More space below carousel */
}

.dot {
    display: inline-block;
    width: 14px; /* Larger dots */
    height: 14px;
    margin: 0 7px;
    background-color: var(--color-border); /* Light background for dots */
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active {
    background-color: var(--color-primary-green); /* Green active dot */
    transform: scale(1.3);
}

/* Small Carousel for Categories Page */
.carousel-container.small-carousel {
    width: var(--content-width-medium); /* 85% width for small carousel */
    max-width: 1000px;
    margin: 50px auto;
    padding: 0 60px; /* More space for buttons */
    background-color: var(--color-background-offwhite); /* Consistent lighter background */
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--color-shadow-light);
}

.carousel-container.small-carousel .carousel-item {
    min-width: calc(100% / 3);
    padding: 15px;
}

.carousel-container.small-carousel .carousel-item img {
    width: 100%;
    max-height: 140px; /* Slightly taller images */
    border-radius: 10px; /* Squared corners for category images */
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.carousel-container.small-carousel .carousel-item .image-caption {
    font-size: 1.1em;
    font-weight: 600;
}

.carousel-container.small-carousel .carousel-button {
    width: 45px;
    height: 45px;
    font-size: 1.5em;
    border-radius: 50%; /* Round buttons */
}


/* --- Footer Styles --- */
footer {
    background-color: var(--color-text-dark); /* Dark background for footer */
    color: var(--color-background-light); /* White text */
    padding: 40px 20px; /* More generous padding */
    text-align: center;
    width: 100%; /* Full width */
    z-index: 1000;
    box-shadow: 0 -2px 10px var(--color-shadow-light); /* Soft shadow on top */
    margin-top: auto; /* Pushes footer to the bottom */
    display: flex; /* Use flex to center content */
    justify-content: center;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    width: var(--content-width-large); /* Use 90% width */
    max-width: var(--content-max-width-desktop); /* Limit max width */
    padding: 0 20px;
    text-align: left;
}

.footer-section {
    flex: 1;
    min-width: 220px; /* Slightly larger min-width */
    margin: 0 25px 30px 25px; /* More margin */
}

.footer-section h3 {
    color: var(--color-primary-green); /* Green titles */
    font-size: 1.5em; /* Larger title */
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(144, 238, 144, 0.5); /* Semi-transparent green underline */
    padding-bottom: 8px;
}

.footer-section p {
    font-size: 0.95em; /* Slightly larger text */
    line-height: 1.7;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.85); /* Slightly muted white */
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px; /* More space between list items */
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7); /* Muted white for links */
    text-decoration: none;
    font-size: 0.98em;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--color-primary-pink); /* Pink on hover */
    text-decoration: underline;
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px; /* More space between icons */
}

@media (min-width: 769px) {
    .footer-section.social {
        text-align: right;
    }
    .social-links {
        justify-content: flex-end;
    }
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px; /* Larger social icons */
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1); /* Subtle background for icons */
    border-radius: 50%;
    color: var(--color-background-light);
    font-size: 1.4em; /* Larger icon size */
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.social-links a:hover {
    background-color: var(--color-primary-pink); /* Pink hover for social icons */
    transform: translateY(-4px); /* More pronounced lift */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* --- Login Page Styles (Keep as is, adjusted for new color variables and width) --- */
.login-page-container {
    display: flex;
    min-height: 70vh;
    background-color: var(--color-background-light);
    border-radius: 12px;
    box-shadow: 0 8px 30px var(--color-shadow-light);
    margin: 50px auto;
    width: var(--content-width-medium); /* 85% width for login container */
    max-width: 1000px;
    overflow: hidden;
}

.login-image-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-background-offwhite);
}

.login-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.login-form-section {
    flex: 1;
    padding: 50px; /* More padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.login-form-section h2 {
    font-size: 2.8em; /* Larger title */
    color: var(--color-text-dark);
    margin-bottom: 40px; /* More space */
    font-weight: 700;
}

.login-form {
    width: 100%;
    max-width: 380px; /* Slightly wider form */
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 25px; /* More space between form groups */
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.15em; /* Larger label */
    color: var(--color-text-medium);
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: calc(100% - 24px); /* Account for padding */
    padding: 14px 12px; /* More padding */
    border: 1px solid var(--color-border);
    border-radius: 8px; /* Softer rounded corners */
    font-size: 1.05em;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    border-color: var(--color-primary-green); /* Green focus border */
    outline: none;
    box-shadow: 0 0 0 4px rgba(144, 238, 144, 0.25); /* Green glow */
}

.login-form .btn-primary { /* Override .btn-primary for login form */
    width: 100%;
    padding: 16px; /* Larger button */
    font-size: 1.3em;
    margin-top: 30px;
    background-color: var(--color-primary-green); /* Green login button */
    border-radius: 8px;
}

.login-form .btn-primary:hover {
    background-color: #7EC87E; /* Darken green on hover */
    transform: translateY(-3px);
}

.login-options {
    margin-top: 25px;
    font-size: 1.05em;
}

.login-options p {
    margin-bottom: 12px;
    color: var(--color-text-medium);
}

.login-options a {
    color: var(--color-primary-pink); /* Pink links */
    font-weight: 600;
}

.login-options a:hover {
    color: #C8B0C8; /* Darken pink on hover */
    text-decoration: underline;
}

.message-erreur {
    background-color: var(--color-danger-red); /* Red background */
    color: white; /* White text */
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* --- Stock & Unique Item Status --- */
.low-stock {
    color: var(--color-danger-red);
    font-weight: bold;
}

.unique-item {
    color: var(--color-primary-green); /* Green for unique */
    font-weight: bold;
}

.in-stock {
    color: var(--color-success-green);
    font-weight: normal;
}

.out-of-stock {
    color: var(--color-text-light); /* Muted gray for out of stock */
    font-weight: bold;
}

/* --- Side Menu (Off-Canvas) Styles --- */

/* Conteneur principal du menu latéral */
.side-menu {
    height: 100%; /* Pleine hauteur de l'écran */
    width: 0; /* Caché par défaut */
    position: fixed; /* Fixé par rapport au viewport */
    z-index: 2000; /* Plus haut que le reste du contenu */
    top: 0;
    right: 0; /* Vient de la droite */
    background-color: var(--color-text-dark); /* Couleur de fond foncée (ajustez si besoin) */
    overflow-x: hidden; /* Cache le contenu qui dépasse horizontalement */
    transition: 0.5s ease-in-out; /* Temps de l'animation de glissement */
    padding-top: 60px; /* Espace pour le bouton de fermeture */
    box-shadow: -5px 0 15px rgba(0,0,0,0.3); /* Ombre pour un effet de profondeur */
}

/* Quand le menu est ouvert (ajouté par JavaScript) */
.side-menu.open {
    width: 280px; /* Largeur visible du menu quand il est ouvert */
    /* Ajustez cette largeur pour mobile si besoin dans les media queries */
}

/* Bouton de fermeture du menu */
.side-menu .close-btn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
    color: var(--color-background-light); /* Couleur du bouton de fermeture */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

/* Navigation dans le menu latéral */
.side-menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-menu-nav ul li a {
    padding: 15px 25px;
    text-decoration: none;
    font-size: 1.2em;
    color: var(--color-background-light); /* Liens blancs */
    display: block;
    transition: 0.3s;
    border-bottom: 1px solid rgba(255,255,255,0.1); /* Séparateur léger */
}

.side-menu-nav ul li a:hover {
    color: var(--color-primary-green); /* Couleur verte au survol */
    background-color: rgba(255,255,255,0.1);
}

/* Overlay (fond semi-transparent) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Couleur semi-transparente */
    z-index: 1500; /* Moins que le menu, plus que le contenu */
    display: none; /* Caché par défaut */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Quand l'overlay est visible (ajouté par JavaScript) */
.overlay.visible {
    display: block;
    opacity: 1;
}

/* --- Media Queries (Refined and Adjusted for widths) --- */
@media (min-width: 1201px) { /* Desktop large */
    .main-content,
    .header-container,
    .carousel-container,
    .carousel-container.small-carousel,
    .login-page-container,
    .footer-content {
        width: var(--content-width-large); /* 90% width */
    }
}

@media (max-width: 1200px) { /* Desktop medium / Tablet landscape */
    .main-content,
    .header-container,
    .carousel-container,
    .carousel-container.small-carousel,
    .login-page-container,
    .footer-content {
        width: var(--content-width-medium); /* 85% width */
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 30px;
    }
    .carousel-item {
        flex: 0 0 25%;
        min-width: 25%;
    }
    .carousel-container.small-carousel .carousel-item {
        min-width: calc(100% / 2); /* 2 items visible */
    }
}

@media (max-width: 992px) { /* Tablet portrait */
    .header-container {
        flex-direction: column;
        align-items: center;
    }
    .header-right {
        align-items: center;
        margin-top: 15px;
    }
    .header-bottom-row {
        flex-direction: column;
        gap: 15px;
    }
    .search-bar input {
        width: 200px;
    }
    .header-icons {
        margin-top: 15px;
    }
    #description {
        margin-top: 150px; /* Adjust based on new header height on tablet */
        padding: 25px 15px;
    }
    .main-content {
        padding-top: calc(150px + 40px); /* Adjust for new header height */
    }
    .main-content,
    .header-container,
    .carousel-container,
    .carousel-container.small-carousel,
    .login-page-container,
    .footer-content {
        width: var(--content-width-small); /* 95% width */
        padding-left: 10px; /* Adjust padding for smaller screens */
        padding-right: 10px;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 25px;
    }
    .product-card img {
        height: 180px;
    }
    .product-info h3 {
        font-size: 1.2em;
    }
    .carousel-item {
        flex: 0 0 33.33%;
        min-width: 33.33%;
    }
    .carousel-item img {
        width: 140px;
        height: 140px;
    }
    .carousel-container {
        padding: 25px;
    }
    .carousel-container.small-carousel .carousel-item {
        min-width: 100%; /* 1 item visible on tablet portrait */
    }
    .login-page-container {
        flex-direction: column;
        margin: 30px 20px;
        box-shadow: none;
    }
    .login-image-section {
        height: 250px;
        border-radius: 10px 10px 0 0;
    }
    .login-form-section {
        padding: 40px 30px;
        border-radius: 0 0 10px 10px;
    }
    .login-form {
        max-width: 100%;
    }

    /* Side menu adjustments */
    .side-menu.open {
        width: 70%; /* Takes more width on tablet */
    }
}

@media (max-width: 768px) { /* Mobile */
    .category-title {
        font-size: 2em;
    }
    .products-grid {
        grid-template-columns: 1fr; /* Single column on mobiles */
        gap: 20px;
    }
    .product-card img {
        height: 200px; /* Maintain height for single column */
    }
    .product-info h3 {
        font-size: 1.2em;
    }
    .product-info p {
        font-size: 1.3em;
    }
    .carousel-item {
        flex: 0 0 50%; /* 2 items on mobiles */
        min-width: 50%;
    }
    .carousel-item img {
        width: 120px;
        height: 120px;
    }
    .carousel-container {
        width: var(--content-width-small); /* 95% width */
        padding: 20px;
    }
    .carousel-button {
        padding: 10px 15px;
        font-size: 1.5em;
    }
    .carousel-container.small-carousel {
        padding: 0 20px; /* Less padding on small carousel */
    }
    .carousel-container.small-carousel .carousel-item {
        min-width: 100%; /* 1 item visible on small mobiles */
    }
    #description {
        margin-top: 170px; /* Adjust more for very small screens */
        padding: 20px 10px;
    }
    .main-content {
        padding-top: calc(170px + 20px); /* Adjust accordingly */
    }
    .footer-section {
        min-width: unset;
        text-align: center;
    }
    .footer-section h3 {
        margin-left: auto;
        margin-right: auto;
        width: fit-content;
    }
    .footer-section ul {
        align-items: center;
    }
    .social-links {
        justify-content: center;
    }
    .login-form-section h2 {
        font-size: 1.8em;
    }
    .login-form {
        padding: 0 15px;
    }

    /* Side menu adjustments */
    .side-menu.open {
        width: 85%; /* Takes most of the width on mobile */
    }
    .side-menu .close-btn {
        font-size: 30px;
        right: 15px;
    }
    .side-menu-nav ul li a {
        font-size: 1.1em;
        padding: 12px 20px;
    }
}

/* --- Cleanup and remaining considerations --- */
/* Your .image-produit class was very specific and likely for a single element. */
/* If it's not currently used or needs to be applied to product images in grid, */
/* consider using .product-card img instead for consistency. */
.image-produit { /* Retained but consider if it's still needed */
    background-color: var(--color-primary-pink); /* Updated color */
    height: 80vh;
    width: 30vw;
    z-index: 10000; /* High z-index */
}

/* JavaScript for body padding (keep in your HTML file, typically before </body>) */
/*
<script>
    function adjustBodyPadding() {
        const header = document.querySelector('header');
        const footer = document.querySelector('footer');
        if (header) {
            document.body.style.paddingTop = header.offsetHeight + 'px';
        }
        if (footer) {
            document.body.style.paddingBottom = footer.offsetHeight + 'px';
        }
    }

    window.addEventListener('load', adjustBodyPadding);
    window.addEventListener('resize', adjustBodyPadding);
    // Optional: Add a small timeout if content loads dynamically
    // setTimeout(adjustBodyPadding, 500);
</script>
*/

/* --- Product Detail Page Specific Styles --- */

/* Conteneur principal de la page produit pour la mise en page flex */
.product-detail-page {
    /* Ces propriétés sont déjà définies globalement pour .main-content */
    /* Assure-toi que .main-content a bien: */
    /* width: var(--content-width-large); */
    /* max-width: var(--content-max-width-desktop); */
    /* margin: 0 auto; */
    padding-top: calc(80px + 40px); /* Ajustement pour l'en-tête fixe */
    min-height: 100vh; /* Pour s'assurer qu'il y a de l'espace même avec peu de contenu */
    margin-bottom:150px;
}

/* Le conteneur qui va gérer les deux colonnes (image et infos) */
.product-detail-container {
    display: flex; /* Active Flexbox */
    flex-wrap: wrap; /* Permet aux éléments de passer à la ligne sur les petits écrans */
    justify-content: center; /* Centre les éléments au cas où ils ne prennent pas toute la largeur */
    gap: 5%; /* Espace de 5% entre les deux colonnes (50% + 5% + 45% = 100%) */
    align-items: flex-start; /* Aligne les éléments en haut */
    padding: 30px; /* Padding interne pour ce conteneur */
    background-color: var(--color-background-light); /* Fond blanc pour le conteneur */
    border-radius: 12px; /* Coins arrondis */
    box-shadow: 0 8px 30px var(--color-shadow-light); /* Ombre douce */
    margin-bottom: 50px; /* Ajoute un peu d'espace avant le footer */
}

/* Section de l'image (colonne de gauche) */
/* C'est ICI que tu dois changer les sélecteurs pour correspondre à ton HTML */
.product-image-large { /* Utilise ta classe HTML: product-image-large */
    flex: 0 0 50%; /* Ne grandit pas, ne rétrécit pas, prend 50% de la largeur de base */
    max-width: 50%; /* S'assure de ne pas dépasser 50% */
    text-align: center; /* Centre l'image principale si elle est plus petite */
    padding: 20px; /* Espace interne */
    box-sizing: border-box; /* Inclut padding dans la largeur */
}

/* Style pour l'image elle-même à l'intérieur de ce conteneur */
.product-image-large .image-produit { /* Utilise ta classe HTML: image-produit */
    width: 100%; /* L'image principale remplit son conteneur */
    max-height: 600px; /* Limite la hauteur de l'image */
    object-fit: contain; /* L'image s'adaptera sans être coupée */
    border-radius: 8px; /* Coins arrondis pour l'image */
    box-shadow: 0 4px 15px var(--color-shadow-light); /* Ombre pour l'image */
    display: block; /* S'assure que l'image est un bloc pour centrage ou marges */
    margin: 0 auto; /* Centre l'image si elle est plus petite que son conteneur */
}

/* Section des informations du produit (colonne de droite) */
.product-info-detail {
    flex: 0 0 45%; /* Ne grandit pas, ne rétrécit pas, prend 45% de la largeur de base */
    max-width: 45%; /* S'assure de ne pas dépasser 45% */
    padding: 20px; /* Espace interne */
    box-sizing: border-box; /* Inclut padding dans la largeur */
    display: flex;
    flex-direction: column; /* Pour empiler les éléments verticalement */
    justify-content: flex-start; /* Aligner les éléments au début */
}

.product-info-detail h1 { /* Le titre du produit */
    font-size: 2.5em; /* Grand titre du produit */
    color: var(--color-text-dark);
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.2;
    text-align: left; /* Aligne le titre à gauche */
}

.product-info-detail .product-price {
    font-size: 2.2em; /* Très grand prix */
    color: var(--color-primary-pink); /* Prix en rose */
    font-weight: bold;
    margin-bottom: 25px;
    display: flex;
    align-items: baseline;
    gap: 15px;
    text-align: left; /* Aligne le prix à gauche */
}

/* Tu n'as pas d'ancien prix dans ton HTML pour l'instant, mais si tu en ajoutes, ce style sera utile */
.product-info-detail .product-price .old-price {
    font-size: 0.7em; /* Plus petit que le prix actuel */
    color: var(--color-text-light);
    text-decoration: line-through; /* Barré pour l'ancien prix */
    font-weight: normal;
}

.product-info-detail .product-stock {
    margin-bottom: 25px;
    text-align: left; /* Aligne le stock à gauche */
}

.product-info-detail .product-stock p {
    margin: 0; /* Supprime les marges par défaut des paragraphes */
    font-size: 1.1em;
    color: var(--color-text-dark);
}

.product-info-detail .product-description {
    font-size: 1.05em;
    line-height: 1.7;
    color: var(--color-text-dark);
    margin-bottom: 30px;
    text-align: left; /* Aligne la description à gauche */
}

.product-info-detail .product-description h3 {
    font-size: 1.4em;
    color: var(--color-text-dark);
    margin-top: 0;
    margin-bottom: 15px;
    text-align: left; /* Aligne le titre de description à gauche */
}


.product-actions {
    display: flex;
    flex-direction: column; /* Empile les boutons verticalement */
    gap: 15px; /* Espace entre les boutons */
    margin-top: auto; /* Pousse les boutons vers le bas de la colonne */
    padding-top: 20px; /* Ajoute un peu de padding au-dessus des boutons */
    border-top: 1px solid var(--color-border); /* Séparateur visuel */
}

.product-actions .btn {
    width: 100%; /* Les boutons prennent toute la largeur disponible */
    padding: 18px; /* Plus grand bouton */
    font-size: 1.4em; /* Texte plus grand sur le bouton */
    border-radius: 10px; /* Plus arrondis */
    font-weight: 700; /* Plus gras */
    text-transform: uppercase;
}

.product-actions .btn-add-to-cart {
    background-color: var(--color-primary-green); /* Couleur verte pour "Ajouter" */
    color: var(--color-background-light);
}

.product-actions .btn-add-to-cart:hover {
    background-color: #7EC87E; /* Vert plus foncé au survol */
    transform: translateY(-3px);
    box-shadow: 0 8px 18px var(--color-shadow-medium);
}

.product-actions .btn-buy-now {
    background-color: var(--color-primary-pink); /* Couleur rose pour "Acheter" */
    color: var(--color-background-light);
}

.product-actions .btn-buy-now:hover {
    background-color: #C8B0C8; /* Rose plus foncé au survol */
    transform: translateY(-3px);
    box-shadow: 0 8px 18px var(--color-shadow-medium);
}


/* --- Media Queries for Product Detail Page (ajustées pour tes classes) --- */
@media (max-width: 992px) { /* Tablet Portrait & smaller desktops */
    .product-detail-container {
        flex-direction: column; /* Empile les colonnes verticalement */
        gap: 0; /* Plus de gap quand c'est en colonne */
        padding: 20px;
    }

    .product-image-large, /* Tes classes */
    .product-info-detail {
        flex: 0 0 100%; /* Prend toute la largeur */
        max-width: 100%;
        padding: 0; /* Enlève le padding ici, il est sur le conteneur principal */
    }

    .product-image-large {
        margin-bottom: 30px; /* Espace entre l'image et les infos */
    }

    .product-image-large .image-produit {
        max-height: 400px; /* Ajuste la hauteur max de l'image */
    }

    .product-info-detail {
        text-align: center; /* Centre le texte sur les petits écrans */
        padding: 20px 0; /* Un peu de padding vertical */
    }

    .product-info-detail h1 {
        font-size: 2em;
        text-align: center; /* Centre le titre sur les petits écrans */
    }
    .product-info-detail .product-price {
        font-size: 1.8em;
        justify-content: center; /* Centre le prix */
    }
    .product-info-detail .product-stock,
    .product-info-detail .product-description {
        text-align: center; /* Centre le texte */
    }
    .product-info-detail .product-description h3 {
        text-align: center; /* Centre le titre de description */
    }

    .product-actions {
        align-items: center; /* Centre les boutons */
    }
    .product-actions .btn {
        width: 80%; /* Occupe plus de largeur sur mobile */
        max-width: 350px;
    }
}

@media (max-width: 768px) { /* Mobile */
    .product-detail-container {
        padding: 15px;
    }
    .product-image-large .image-produit {
        max-height: 300px;
    }
    .product-info-detail h1 {
        font-size: 1.8em;
    }
    .product-info-detail .product-price {
        font-size: 1.6em;
    }
}




/* --- Styles pour la page Panier (panier.php) --- */

.cart-page {
    padding: 20px;
    max-width: 1000px; /* Un peu plus large pour le tableau */
    margin: 40px auto 60px auto;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.cart-page h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em; /* Un peu plus grand */
    font-weight: 700;
}

.empty-cart-message {
    text-align: center;
    font-size: 1.3em;
    color: #666;
    margin-top: 40px;
    margin-bottom: 30px;
}

.empty-cart-message + p .btn-primary {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background-color: #A2D2FF;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.empty-cart-message + p .btn-primary:hover {
    background-color: #89c0ef;
    transform: translateY(-2px);
}

/* Styles du tableau récapitulatif du panier */
.cart-table {
    width: 100%;
    border-collapse: collapse; /* Supprime l'espace entre les bordures de cellules */
    margin-bottom: 30px;
    font-size: 0.95em;
    border: 1px solid #e0e0e0; /* Bordure générale du tableau */
    border-radius: 8px;
    overflow: hidden; /* Pour que les bordures arrondies s'appliquent */
}

.cart-table thead {
    background-color: #f0f8ff; /* Couleur de fond pour l'en-tête */
    color: #333;
    border-bottom: 2px solid #A2D2FF;
}

.cart-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
    text-transform: uppercase;
}

.cart-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.cart-table tbody tr:last-child {
    border-bottom: none; /* Pas de bordure sur la dernière ligne du corps */
}

.cart-table tbody tr:nth-child(even) {
    background-color: #fdfdfd; /* Légère alternance de couleur pour la lisibilité */
}

.cart-table tbody tr:hover {
    background-color: #f5f5f5;
}

.cart-table td {
    padding: 15px;
    vertical-align: middle; /* Aligne le contenu au milieu */
    color: #555;
}

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

.item-thumbnail {
    width: 60px; /* Plus petit pour le tableau */
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.item-title a {
    font-weight: bold;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.item-title a:hover {
    color: #A2D2FF;
    text-decoration: underline;
}

.item-quantity-cell {
    text-align: center;
    font-weight: bold;
    color: #007bff;
}

.item-price-cell {
    text-align: right;
    color: #28a745;
    font-weight: 500;
}

.item-subtotal-cell {
    text-align: right;
    font-weight: bold;
    color: #007bff; /* Ou une autre couleur d'accentuation */
    font-size: 1.1em;
}

.cart-table .remove-from-panier-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.3s ease;
}

.cart-table .remove-from-panier-btn:hover {
    background-color: #c82333;
}

.cart-summary {
    background-color: #e9f5ff;
    border: 1px solid #cce5ff;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
    text-align: right;
    font-size: 1.1em;
}

.cart-summary p {
    margin-bottom: 10px;
    color: #444;
}

.cart-summary h3 {
    margin-top: 20px;
    font-size: 1.8em; /* Plus grand pour le total final */
    color: #28a745;
    font-weight: bold;
    border-top: 1px dashed #cce5ff;
    padding-top: 15px;
}

.shipping-info {
    font-size: 0.9em;
    color: #777;
    margin-top: -5px;
    margin-bottom: 15px;
}

.checkout-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 15px 35px; /* Plus grand */
    border-radius: 6px;
    cursor: not-allowed;
    font-size: 1.2em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
    opacity: 0.7;
    display: inline-flex; /* Pour centrer l'icône et le texte */
    align-items: center;
    gap: 10px;
}

.checkout-btn:hover:not([disabled]) {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* --- Responsive pour le panier --- */
@media (max-width: 768px) {
    .cart-page {
        padding: 15px;
        margin: 20px auto;
    }

    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td, .cart-table th {
        display: block; /* Empile les éléments du tableau */
        width: 100%;
    }
    
    .cart-table thead {
        display: none; /* Cache l'en-tête du tableau sur mobile */
    }

    .cart-table tr {
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
    }

    .cart-table td {
        text-align: right;
        padding-left: 50%; /* Crée un espace pour le pseudo-élément */
        position: relative;
        border: none; /* Supprime les bordures de cellule internes */
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .cart-table td::before {
        content: attr(data-label); /* Utilise l'attribut data-label */
        position: absolute;
        left: 15px;
        width: calc(50% - 30px); /* Ajuste la largeur du label */
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        text-align: left;
        color: #333;
    }

    .cart-item-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .item-thumbnail {
        margin-bottom: 5px;
    }
    .item-title {
        width: 100%; /* S'assure que le titre prend toute la largeur */
    }

    .cart-table .remove-from-panier-btn {
        width: calc(100% - 30px); /* Pleine largeur avec padding */
        margin: 10px 15px 0 15px;
        padding: 10px;
    }

    .cart-summary {
        padding: 15px;
        text-align: center;
    }

    .checkout-btn {
        width: 100%;
        padding: 12px 20px;
    }
}






/* Conteneur des notifications */
#notification-container {
    position: fixed; /* Reste en place même en scrollant */
    top: 20px; /* 20px du haut */
    left: 50%; /* Centre horizontalement */
    transform: translateX(-50%); /* Ajustement pour un centrage parfait */
    z-index: 10000; /* Assure que c'est au-dessus de tout le reste */
    display: flex;
    flex-direction: column; /* Les messages s'empilent verticalement */
    gap: 10px; /* Espace entre les messages */
    pointer-events: none; /* Permet de cliquer à travers le conteneur si vide */
}

/* Style d'un message individuel (toast) */
.toast-message {
    background-color: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0; /* Commence invisible */
    transform: translateY(-20px); /* Commence un peu au-dessus */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Animation d'apparition */
    max-width: 350px; /* Limite la largeur */
    text-align: center;
    font-size: 0.95em;
    pointer-events: auto; /* Permet d'interagir avec le toast (si on ajoute une croix de fermeture) */
}

/* Classes pour différents types de messages */
.toast-success {
    background-color: #28a744; /* Vert pour le succès */
}

.toast-error {
    background-color: #dc3545; /* Rouge pour l'erreur */
}

.toast-info {
    background-color: #007bff; /* Bleu pour l'info */
}

/* État visible du toast (ajouté par JS) */
.toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Bouton de fermeture optionnel */
.toast-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    margin-left: 10px;
    font-weight: bold;
}


/* Pour le badge PROMO */
.promo-badge {
    position: absolute;
    top: 10px; /* Ajustez selon votre design */
    left: 10px; /* Ajustez selon votre design */
    background-color: red; /* Couleur du badge */
    color: white;
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 10; /* Assurez-vous qu'il est au-dessus de l'image */
}

/* Conteneur pour les prix - pour un meilleur alignement */
.price-display {
    display: flex; /* Permet aux prix de s'aligner horizontalement */
    align-items: baseline; /* Alignement vertical */
    gap: 10px; /* Espace entre l'ancien et le nouveau prix */
    flex-wrap: wrap; /* Permet aux prix de passer à la ligne si l'espace est insuffisant */
}
.product-card .product-info {
    /* Gardez vos styles existants pour le .product-info ici.
       Si vous voulez que le titre soit centré avec les prix, vous pouvez laisser
       'text-align: center;' ici, mais supprimez les autres propriétés flexbox de centrage
       si elles ne sont pas désirées pour le titre. */
    text-align: center !important; /* Peut être laissé pour centrer le texte du titre */
    /* ... autres styles ... */
}
.price-display {
    display: flex;          /* Permet aux prix (ancien et nouveau) de s'aligner horizontalement */
    align-items: baseline;  /* Aligne les prix sur leur ligne de base pour une meilleure lisibilité */
    gap: 10px;              /* Espace entre l'ancien et le nouveau prix */
    flex-wrap: wrap;        /* Permet aux prix de passer à la ligne si l'espace est insuffisant */
    justify-content: center; /* **C'est ici que le centrage horizontal des prix est appliqué** */
    margin-top: 5px; /* Un petit espace au-dessus des prix */
    margin-bottom: 5px; /* Un petit espace en dessous des prix */
}

/* Style pour l'ancien prix barré */
.old-price {
    text-decoration: line-through !important;
    color: #999 !important;
    font-size: 0.9em !important;
}
.promo-price {
    color: #e60000 !important;
    font-weight: bold !important;
    font-size: 1.2em !important;
}

/* (Optionnel) Style pour le prix normal quand il n'y a pas de promo */
.normal-price {
    font-weight: bold;
    color: #333; /* Couleur par défaut pour les prix non promo */
}

/* (Optionnel) Style pour le badge promo, si vous voulez l'ajuster */
.promo-badge {
    position: absolute; /* Ou relative/static selon le conteneur parent */
    top: 10px; /* Ajustez selon votre design */
    left: 10px; /* Ajustez selon votre design */
    background-color: #ff0000; /* Un rouge vif pour le badge */
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.75em;
    font-weight: bold;
    z-index: 10; /* Assurez-vous qu'il est au-dessus de l'image */
    text-transform: uppercase;
}

/* Assurez-vous que le conteneur du produit est en position relative pour que le badge absolute fonctionne */
.product-card {
    position: relative; /* Très important pour le positionnement du .promo-badge */
    /* ... vos autres styles de .product-card ... */
}

/* --- Styles pour le Carrousel d'Images sur la page Produit --- */

.product-detail-container {
    display: flex;
    flex-wrap: wrap; /* Permet aux éléments de s'enrouler sur les petits écrans */
    gap: 30px; /* Espace entre la galerie d'images et les infos produit */
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-image-gallery {
    flex: 1 1 500px; /* Permet à la galerie de prendre au moins 500px de large, et de grandir/réduire */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.gallery-main-image {
    width: 100%;
    max-width: 500px; /* Taille maximale pour l'image principale */
    border-radius: 8px;
    overflow: hidden; /* Pour s'assurer que l'image ne dépasse pas le cadre si elle est trop grande */
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.gallery-main-image img {
    width: 100%;
    height: auto;
    display: block; /* Supprime l'espace sous l'image */
    object-fit: contain; /* S'assure que l'image est entièrement visible sans être coupée */
    max-height: 500px; /* Limiter la hauteur pour éviter des images trop grandes */
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
    max-width: 500px; /* Aligne la largeur des miniatures avec l'image principale */
    overflow-x: auto; /* Permet de défiler si plus de 3 miniatures sont ajoutées un jour */
    padding-bottom: 5px; /* Pour la barre de défilement si overflow-x est actif */
}

.thumbnail-image {
    width: 80px; /* Taille des miniatures */
    height: 80px;
    object-fit: cover; /* Recadre les miniatures pour qu'elles remplissent l'espace */
    border: 2px solid #eee;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.thumbnail-image:hover {
    border-color: #a7d9b9; /* Couleur au survol */
    transform: scale(1.05);
}

.thumbnail-image.active {
    border-color: #28a745; /* Couleur de la bordure pour l'image active */
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3); /* Légère ombre pour l'image active */
}

/* Ajustements pour les écrans plus petits */
@media (max-width: 768px) {
    .product-detail-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .product-image-gallery {
        flex: 1 1 auto; /* Reprend toute la largeur disponible */
        width: 100%;
    }

    .gallery-main-image {
        max-width: 100%; /* S'adapte à la largeur de l'écran */
    }

    .gallery-thumbnails {
        flex-wrap: wrap; /* Les miniatures peuvent passer à la ligne */
        justify-content: center;
    }

    .thumbnail-image {
        width: 70px;
        height: 70px;
    }
}

.item-image{
    height:10px;
    width: auto;
}

/* --- Styles généraux pour la page Panier --- */
.main-content.cart-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cart-page h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 600;
}

.empty-cart-message {
    text-align: center;
    font-size: 1.2em;
    color: #555;
    margin-top: 50px;
}



.btn.btn-primary:hover {
    background-color: #45a049;
}

.message-info, .message-erreur {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 1em;
    text-align: center;
}

.message-info {
    background-color: #e7f3fe;
    color: #0c5460;
    border: 1px solid #b8daff;
}

.message-erreur {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- Liste des articles du panier --- */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #fdfdfd;
    transition: box-shadow 0.2s ease-in-out;
}

.cart-item:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* --- Image du produit dans le panier --- */
.item-image {
    flex-shrink: 0; /* Empêche l'image de rétrécir */
    width: 100px; /* Taille fixe pour l'image */
    height: 100px;
    overflow: hidden;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Assure que l'image couvre l'espace sans déformation */
    display: block;
}

/* --- Détails du produit --- */
.item-details {
    flex-grow: 1; /* Permet aux détails de prendre l'espace restant */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-title {
    font-size: 1.2em;
    font-weight: 500;
    color: #333;
}

.item-title a {
    text-decoration: none;
    color: #333;
}

.item-title a:hover {
    color: #007bff; /* Couleur de survol pour les liens */
    text-decoration: underline;
}

.item-price {
    font-size: 1.1em;
    color: #555;
}

/* Styles pour les prix (déjà présents, mais confirmation) */
.old-price-cart {
    text-decoration: line-through;
    color: #999;
    margin-right: 5px;
}

.promo-price-cart {
    color: #d9534f; /* Rouge pour la promo */
    font-weight: bold;
}

.item-subtotal {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.subtotal-display, #cart-total-price, #cart-final-total {
    color: #007bff; /* Bleu pour les totaux */
    font-weight: bold;
}

.stock-info {
    font-size: 0.85em;
    color: #777;
    margin-left: 10px;
}

/* --- Contrôles de quantité (déjà présents, mais affinés) --- */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.quantity-control button {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 1em;
    transition: background-color 0.2s ease;
}

.quantity-control button:hover {
    background-color: #e0e0e0;
}

.quantity-display {
    width: 40px; /* Largeur fixe pour la quantité */
    text-align: center;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 3px;
    background-color: #fff;
    font-size: 1em;
}

/* --- Bouton Supprimer --- */
.btn.btn-danger.remove-from-panier-btn {
    background-color: #dc3545; /* Rouge pour supprimer */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0; /* Empêche le bouton de rétrécir */
}

.btn.btn-danger.remove-from-panier-btn:hover {
    background-color: #c82333;
}

/* --- Résumé du panier --- */
.cart-summary {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
    text-align: right;
}

.cart-summary p, .cart-summary h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #333;
}

.cart-summary h3 {
    font-size: 1.6em;
    font-weight: 700;
    margin-top: 20px;
    color: #28a745; /* Vert pour le total final */
}

.checkout-btn {
    background-color: #28a745; /* Vert pour l'action principale de paiement */
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.3em;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    width: auto; /* Ajuste la largeur au contenu */
    margin-top: 20px;
    display: inline-flex; /* Pour aligner l'icône et le texte */
    align-items: center;
    gap: 10px; /* Espace entre l'icône et le texte */
}

.checkout-btn:hover {
    background-color: #218838;
    opacity: 0.9;
}

.checkout-btn[disabled] {
    cursor: not-allowed !important;
    background-color: #6c757d; /* Gris pour désactivé */
    opacity: 0.7;
}

/* --- Styles pour les toasts (notifications) --- */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-message {
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    margin-top:10vh;
}

.toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-info {
    background-color: #17a2b8; /* Cyan */
}

.toast-success {
    background-color: #28a745; /* Vert */
}

.toast-error {
    background-color: #dc3545; /* Rouge */
}

.toast-close-btn {
    cursor: pointer;
    margin-left: 15px;
    font-size: 1.2em;
}

/* --- Adaptabilité (Responsive Design) --- */
@media (max-width: 768px) {
    .main-content.cart-page {
        margin: 20px;
        padding: 15px;
    }

    .cart-page h1 {
        font-size: 2em;
    }

    .cart-item {
        flex-direction: column; /* Empile les éléments sur mobile */
        align-items: flex-start;
        gap: 10px;
    }

    .item-image {
        width: 80px;
        height: 80px;
        margin-bottom: 5px; /* Espace sous l'image */
    }

    .item-details {
        width: 100%; /* Prend toute la largeur disponible */
        align-items: flex-start;
    }

    .quantity-control {
        width: 100%;
        justify-content: center; /* Centre les contrôles de quantité */
        margin-top: 10px;
    }

    .btn.btn-danger.remove-from-panier-btn {
        width: 100%; /* Bouton supprimer pleine largeur */
        margin-top: 10px;
    }

    .cart-summary {
        padding: 15px;
        text-align: center; /* Centre le texte du résumé */
    }

    .checkout-btn {
        width: 100%;
        font-size: 1.1em;
    }

    #notification-container {
        top: 10px;
        right: 10px;
        left: 10px; /* S'étend sur toute la largeur */
        width: auto;
    }
}

@media (max-width: 480px) {
    .main-content.cart-page {
        margin: 10px;
        padding: 10px;
    }

    .cart-page h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .item-title {
        font-size: 1.1em;
    }

    .item-price, .item-subtotal {
        font-size: 1em;
    }
}

