/* ==========================================================================
   STYLE.CSS - Système de Design E-commerce Premium & Responsive
   ========================================================================== */

/* 1. Reset et Typographies */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Nuancier & Palette Couleur */
    --color-bg-dark: #090d16;
    --color-bg-card: #121826;
    --color-text-light: #f3f4f6;
    --color-text-gray: #9ca3af;
    --color-primary: #0284c7; /* Bleu Electrique */
    --color-primary-glow: rgba(2, 132, 199, 0.4);
    --color-accent: #059669; /* Émeraude */
    --color-accent-glow: rgba(5, 150, 105, 0.3);
    --color-danger: #ef4444;
    --color-success: #10b981;
    --color-warning: #f59e0b;

    /* Typographies */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Effets et Bordures */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --box-shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --glass-background: rgba(18, 24, 38, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
}

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

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 2. Utilitaires de Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 3. Header / Navigation */
header {
    background: var(--glass-background);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    font-size: 14px;
    padding: 2px 8px;
    border-radius: var(--border-radius-sm);
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.2);
    -webkit-text-fill-color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-gray);
}

.nav-link:hover, .nav-link.active {
    color: var(--color-text-light);
}

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

.cart-icon {
    position: relative;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.cart-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

/* 4. Section Hero */
.hero {
    position: relative;
    padding: 160px 0 100px 0;
    background: radial-gradient(circle at 10% 20%, rgba(2, 132, 199, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(5, 150, 105, 0.1) 0%, transparent 40%);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    color: var(--color-accent);
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: 54px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-title span {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--color-text-gray);
    font-size: 18px;
    margin-bottom: 35px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* Boutons Stylisés */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    box-shadow: 0 4px 20px var(--color-primary-glow);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.btn-primary:hover::after {
    left: 120%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(2, 132, 199, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-pulse {
    animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.hero-visual {
    position: relative;
    border-radius: var(--border-radius-lg);
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    padding: 10px;
    box-shadow: var(--box-shadow-premium);
}

.hero-visual img {
    border-radius: calc(var(--border-radius-lg) - 10px);
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* 5. Section Avantages E-commerce */
.features {
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.01);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
}

.feature-icon {
    font-size: 32px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.feature-info p {
    color: var(--color-text-gray);
    font-size: 14px;
}

/* 6. Catalogue Produits Grid */
.products-section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px auto;
}

.section-title {
    font-size: 36px;
    margin-bottom: 15px;
}

.section-desc {
    color: var(--color-text-gray);
}

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

.product-card {
    background: var(--color-bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(2, 132, 199, 0.3);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.7);
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.05);
}

.product-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

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

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--color-text-light);
}

.product-desc {
    color: var(--color-text-gray);
    font-size: 13px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.product-price {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--color-accent);
}

.product-weight {
    font-size: 12px;
    color: var(--color-text-gray);
}

/* 7. Page Produit Fiche de Vente */
.product-detail-section {
    padding: 140px 0 80px 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
}

.gallery-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-img-wrapper {
    border-radius: var(--border-radius-lg);
    background: var(--color-bg-card);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: var(--box-shadow-premium);
}

.main-img-wrapper img {
    width: 100%;
    height: 480px;
    object-fit: cover;
}

.detail-info h1 {
    font-size: 38px;
    line-height: 1.2;
    margin-bottom: 15px;
}

.detail-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 15px;
}

.detail-price-weight {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.detail-price {
    font-size: 32px;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--color-accent);
}

.detail-weight {
    color: var(--color-text-gray);
    font-size: 14px;
}

.detail-desc-long {
    color: var(--color-text-gray);
    margin-bottom: 30px;
}

.trust-elements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 35px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
}

/* Section d'Upsell / Offres Quantité */
.upsell-section {
    margin-bottom: 35px;
}

.upsell-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upsell-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upsell-option {
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}

.upsell-option:hover {
    border-color: rgba(2, 132, 199, 0.5);
    background: rgba(2, 132, 199, 0.02);
}

.upsell-option.selected {
    border-color: var(--color-accent);
    background: rgba(16, 185, 129, 0.05);
}

.upsell-badge {
    position: absolute;
    top: -8px;
    right: 15px;
    background: var(--color-accent);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.upsell-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upsell-option.selected .upsell-radio {
    border-color: var(--color-accent);
}

.upsell-option.selected .upsell-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--color-accent);
    border-radius: 50%;
}

.upsell-info {
    flex-grow: 1;
}

.upsell-name {
    font-weight: 600;
    font-size: 15px;
}

.upsell-prices {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}

.upsell-current-price {
    font-weight: 700;
    color: var(--color-accent);
}

.upsell-old-price {
    text-decoration: line-through;
    color: var(--color-text-gray);
    font-size: 13px;
}

/* Formulaire COD Express */
.cod-form-container {
    background: var(--color-bg-card);
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 15px 40px rgba(2, 132, 199, 0.15);
}

.form-header {
    text-align: center;
    margin-bottom: 25px;
}

.form-header h3 {
    font-size: 22px;
    margin-bottom: 5px;
}

.form-header p {
    color: var(--color-text-gray);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-light);
}

.form-control {
    width: 100%;
    padding: 14px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: white;
    font-family: var(--font-body);
    font-size: 15px;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.3);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

/* 8. Pied de Page / Footer */
footer {
    background: #060910;
    border-top: 1px solid var(--glass-border);
    padding: 80px 0 30px 0;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-about p {
    color: var(--color-text-gray);
    margin-top: 15px;
    font-size: 14px;
    max-width: 320px;
}

.footer-links-title {
    font-size: 16px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

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

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--color-text-gray);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--color-text-light);
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-gray);
    font-size: 13px;
}

/* 9. Page de Confirmation (Checkout) */
.confirm-box {
    max-width: 550px;
    margin: 150px auto 80px auto;
    background: var(--color-bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    text-align: center;
    box-shadow: var(--box-shadow-premium);
}

.confirm-icon {
    font-size: 55px;
    color: var(--color-success);
    margin-bottom: 20px;
}

.confirm-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.confirm-desc {
    color: var(--color-text-gray);
    margin-bottom: 30px;
}

.order-summary-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.summary-row.total {
    border-top: 1px solid var(--glass-border);
    padding-top: 10px;
    font-weight: 700;
    font-size: 16px;
    color: var(--color-accent);
}

/* 10. Dashboard Administrateur local */
.admin-section {
    padding: 130px 0 80px 0;
}

.admin-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.admin-card {
    background: var(--color-bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 30px;
    margin-bottom: 30px;
}

.admin-table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 14px;
}

th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text-gray);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.status-badge.new {
    background: rgba(2, 132, 199, 0.1);
    color: var(--color-primary);
}

.status-badge.confirmed {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.status-badge.delivered {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.setup-guide {
    background: rgba(2, 132, 199, 0.05);
    border: 1px dashed var(--color-primary);
    border-radius: var(--border-radius-md);
    padding: 25px;
    margin-bottom: 30px;
}

.setup-guide h4 {
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
}

.setup-guide ol {
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.code-block {
    background: #030712;
    padding: 15px;
    border-radius: var(--border-radius-sm);
    font-family: monospace;
    font-size: 12px;
    color: #10b981;
    overflow-x: auto;
    margin-top: 10px;
    border: 1px solid var(--glass-border);
}

/* 11. Media Queries (Responsivité Smartphone) */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .hero-title {
        font-size: 42px;
    }
    .hero-btns {
        justify-content: center;
    }
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .main-img-wrapper img {
        height: 380px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Cache les liens de nav sur mobile pour simplifier */
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
