/* ============================================
   SILVERSTONE - Style CSS Principal
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #8B4789;
    text-decoration: none;
}

a:hover {
    color: #6B3569;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 60px;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #8B4789;
    color: white;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.cart-link:hover {
    background-color: #6B3569;
    color: white;
}

.cart-count {
    background-color: white;
    color: #8B4789;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
}

/* Navigation */
.main-nav {
    background-color: #f8f8f8;
    border-top: 1px solid #e0e0e0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px 0;
}

.main-nav a {
    color: #333;
    font-weight: 500;
    padding: 5px 10px;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #8B4789;
}

/* Main Content */
.site-main {
    min-height: calc(100vh - 400px);
    padding: 40px 0;
}

/* Produits Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: #8B4789;
    margin-bottom: 15px;
}

.product-stock {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #8B4789;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    text-align: center;
}

.btn:hover {
    background-color: #6B3569;
    color: white;
}

.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}

.btn-block {
    width: 100%;
}

/* Formulaires */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: #8B4789;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Messages */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Panier */
.cart-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.cart-table table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    background-color: #8B4789;
    color: white;
    padding: 15px;
    text-align: left;
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.cart-total {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
}

.cart-total-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 18px;
}

.cart-total-line.total {
    font-size: 24px;
    font-weight: bold;
    color: #8B4789;
    border-top: 2px solid #e0e0e0;
    margin-top: 10px;
    padding-top: 20px;
}

/* Footer */
.site-footer {
    background-color: #333;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    margin-bottom: 15px;
    color: #8B4789;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #ccc;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
}

/* Responsive */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .cart-table {
        overflow-x: auto;
    }
}