/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

.checkout-btn {
    background-color: #28a745;
}

.checkout-btn:hover {
    background-color: #218838;
}

.remove-btn {
    color: #dc3545;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo h1 {
    color: #333;
    font-size: 24px;
}

.search-bar {
    display: flex;
    width: 40%;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

.search-bar button {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.user-actions a {
    margin-left: 15px;
    color: #333;
    font-weight: 500;
}

.user-actions a i {
    margin-right: 5px;
}

/* Navigation */
nav {
    background-color: grey;
    padding: 15px 0;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Hero section */
.hero {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    margin-bottom: 40px;
}

.hero-content h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 25px;
}

/* Produits */
.products {
    display: flex;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.filters {
    width: 25%;
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-right: 20px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h4 {
    margin-bottom: 10px;
    font-size: 16px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.products-list {
    flex: 1;
}

.products-list h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 10px 15px;
    font-size: 18px;
}

.product-card .price {
    padding: 0 15px 15px;
    font-weight: bold;
    color: #007bff;
}

.product-card .btn {
    display: block;
    margin: 0 15px 15px;
    text-align: center;
}

/* Détails produit */
.product-details {
    display: flex;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
    gap: 40px;
}

.product-images {
    width: 50%;
}

.product-images .main-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.product-info {
    width: 50%;
}

.product-info h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.product-info .price {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 20px;
}

.product-info .description {
    margin-bottom: 30px;
    line-height: 1.8;
}

.add-to-cart .quantity,
.add-to-cart .size {
    margin-bottom: 20px;
}

.add-to-cart label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.add-to-cart input[type="number"],
.add-to-cart select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Panier */
.cart {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.cart table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cart th, .cart td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cart th {
    background-color: #f8f9fa;
    font-weight: 500;
}

.cart tfoot td {
    font-weight: 500;
}

.total-label {
    text-align: right;
}

.total-price {
    font-weight: bold;
    color: #007bff;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
}

/* Formulaire d'authentification */
.auth-form {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.auth-form h2 {
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.alert {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Paiement */
.payment {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
    display: flex;
    gap: 40px;
}

.order-summary {
    width: 40%;
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.order-summary h3 {
    margin-bottom: 20px;
}

.order-summary ul {
    list-style: none;
    margin-bottom: 20px;
}

.order-summary ul li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.order-summary .total {
    font-weight: bold;
    font-size: 18px;
    color: #007bff;
}

.payment-form {
    flex: 1;
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Confirmation */
.confirmation {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.confirmation-message {
    text-align: center;
    margin-bottom: 40px;
}

.confirmation-message h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #28a745;
}

.confirmation-message p {
    font-size: 18px;
    margin-bottom: 10px;
}

.order-details {
    background-color: white;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.order-details h3 {
    margin-bottom: 20px;
}

.order-details p {
    margin-bottom: 10px;
}

.ordered-products {
    background-color: white;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.confirmation-actions {
    text-align: center;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 40px 20px 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 30px;
}

.footer-section {
    width: 30%;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .search-bar {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .products {
        flex-direction: column;
    }
    
    .filters {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .product-details {
        flex-direction: column;
    }
    
    .product-images, .product-info {
        width: 100%;
    }
    
    .payment {
        flex-direction: column;
    }
    
    .order-summary {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-section {
        width: 100%;
        margin-bottom: 20px;
    }
}
