﻿/* ==========================================================================
   CarteMerePC.fr — Style principal
   Basé sur Bootstrap 5.3 + personnalisations SSD
   ========================================================================== */

/* Footer sticky */
.footer-sticky {
    width: 100%;
    flex-shrink: 0;
}

/* ---- Variables ---- */
:root {
    --primary-color:    #4f46e5;
    --primary-dark:     #3730a3;
    --secondary-color:  #64748b;
    --success-color:    #10b981;
    --warning-color:    #f59e0b;
    --danger-color:     #ef4444;
    --info-color:       #3b82f6;
    --light-color:      #f8fafc;
    --dark-color:       #1e293b;
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

/* ---- Global ---- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #334155;
}
.font-weight-medium   { font-weight: 500; }
.font-weight-semibold { font-weight: 600; }

/* ---- Hero ---- */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}
.bg-gradient-primary { background: var(--gradient-primary); }

/* ---- Cards Produit ---- */
.product-card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    transition: all .3s ease;
    border-radius: 12px;
    overflow: hidden;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
}
.product-card .card-img-top {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem;
}
.product-card .card-body { padding: 1.25rem; }
.product-card .card-title a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.4;
}
.product-card .card-title a:hover { color: var(--primary-color); }

/* ---- Specs / badges ---- */
.product-specs .badge {
    font-size: .75rem;
    padding: .375rem .5rem;
    font-weight: 500;
}

/* ---- SSD Interface badges (couleur) ---- */
.badge-pcie5  { background-color: var(--danger-color)  !important; color: #fff; }
.badge-pcie4  { background-color: var(--warning-color) !important; color: #1e293b; }
.badge-pcie3  { background-color: var(--info-color)    !important; color: #fff; }
.badge-sata   { background-color: var(--success-color) !important; color: #fff; }

/* ---- Speed bar (barre de débit) ---- */
.speed-bar {
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    overflow: hidden;
}
.speed-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--gradient-primary);
    transition: width .4s ease;
}

/* ---- Stat cards ---- */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    transition: transform .3s ease;
}
.stat-card:hover { transform: translateY(-2px); }

/* ---- Brand cards ---- */
.brand-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    transition: all .3s ease;
}
.brand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0,0,0,.1);
    border-color: var(--primary-color);
}
.brand-link {
    text-decoration: none;
    transition: all .3s ease;
    display: block;
    padding: 1rem;
    border-radius: 12px;
    background: white;
    border: 1px solid #e2e8f0;
}
.brand-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0,0,0,.1);
    text-decoration: none;
}
.brand-logo {
    height: 60px;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter .3s ease;
}
.brand-link:hover .brand-logo { filter: grayscale(0%); }

/* ---- Navigation ---- */
.navbar-brand { font-weight: 700; font-size: 1.5rem; }
.nav-link { font-weight: 500; transition: color .3s ease; }

/* ---- Buttons ---- */
.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: .5rem 1.25rem;
    transition: all .3s ease;
}
.btn-lg { padding: .75rem 2rem; font-size: 1.1rem; }
.btn-primary { background: var(--gradient-primary); border: none; }
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,.4);
}
.btn-outline-primary { color: var(--primary-color); border-color: var(--primary-color); }
.btn-outline-primary:hover { background: var(--primary-color); border-color: var(--primary-color); transform: translateY(-1px); }
.btn-success { background: var(--success-color); border: none; }
.btn-success:hover { background: #059669; transform: translateY(-1px); }

/* ---- Forms ---- */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: .75rem 1rem;
    transition: all .3s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}
.form-control-lg, .form-select-lg { padding: .875rem 1.25rem; font-size: 1rem; }

/* ---- Badges ---- */
.badge { font-weight: 500; border-radius: 6px; }
.badge.bg-primary  { background: var(--primary-color)   !important; }
.badge.bg-info     { background: var(--info-color)      !important; }
.badge.bg-secondary{ background: var(--secondary-color) !important; }
.badge.bg-success  { background: var(--success-color)   !important; }
.badge.bg-warning  { background: var(--warning-color)   !important; }

/* ---- Footer ---- */
footer { background: var(--dark-color) !important; }
footer a:hover { color: var(--primary-color) !important; }

/* ---- Filters (sidebar catalogue) ---- */
.filter-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    margin-bottom: 2rem;
}
.filter-section h4 { margin-bottom: 1rem; font-weight: 600; color: var(--dark-color); }
.catalog-filters {
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    min-height: 100vh;
}

/* ---- Price table ---- */
.price-comparison { background: #f8f9fa; border-radius: 8px; padding:1rem; }
.price-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: .5rem;
    background: white;
}
.price-item:last-child { margin-bottom: 0; }
.store-logo { height: 30px; object-fit: contain; }

/* ---- Compare table ---- */
.compare-table th { white-space: nowrap; }
.compare-table td { vertical-align: middle; }

/* ---- Pagination ---- */
.pagination .page-link { color: var(--primary-color); border: 1px solid #dee2e6; padding: .5rem .75rem; }
.pagination .page-link:hover { background: var(--primary-color); border-color: var(--primary-color); color: white; }
.pagination .page-item.active .page-link { background: var(--primary-color); border-color: var(--primary-color); }

/* ---- Breadcrumb ---- */
.breadcrumb { background: none; padding: 0; margin-bottom: 1.5rem; }
.breadcrumb-item a { color: var(--primary-color); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* ---- Utilities ---- */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Animations ---- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
.animate-on-scroll { opacity: 0; animation: fadeInUp .6s ease forwards; }
.loading { opacity: .6; pointer-events: none; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-section .display-4 { font-size: 2rem; }
    .hero-section .lead      { font-size: 1rem; }
    .product-card .card-body { padding: 1rem; }
    .stat-card               { padding: 1.5rem .75rem; }
    .btn-lg                  { padding: .5rem 1.5rem; font-size: 1rem; }
    .compare-table           { font-size: .85rem; }
}
