/*
Theme Name: BRICO-CHOC
Theme URI: https://bricochoc.shop
Author: BRICO-CHOC
Author URI: https://bricochoc.shop
Description: Theme e-commerce pour la vente d'outillage et equipement professionnel. Panier avec commande WhatsApp.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bricochoc
*/

/* ========================================
   BRICO-CHOC - Theme WordPress
   Design: Dark slate + Blue accent
   ======================================== */

/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #0F172A;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; }

/* ========================================
   HEADER
   ======================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 0 24px;
}

.site-header.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header.scrolled .nav-link,
.site-header.scrolled .site-title {
  color: #0F172A !important;
}

.site-header.scrolled .header-icon {
  color: #334155 !important;
}

.site-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.site-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-title svg { color: #3B82F6; width: 24px; height: 24px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  transition: all 0.2s;
}

.nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: rgba(255,255,255,0.8);
  position: relative;
  transition: all 0.2s;
}

.header-icon:hover { background: rgba(255,255,255,0.1); color: #fff; }

.header-icon .badge {
  position: absolute;
  top: -2px; right: -2px;
  background: #3B82F6;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn { display: none; }

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
}

/* ========================================
   HERO
   ======================================== */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.9) 0%, rgba(15,23,42,0.5) 50%, rgba(15,23,42,0.3) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 800px;
}

.hero-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-label span {
  width: 48px; height: 2px;
  background: #3B82F6;
}

.hero-label p {
  color: #3B82F6;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 22px);
  color: rgba(255,255,255,0.75);
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-cta {
  display: inline-block;
  padding: 16px 40px;
  background: #3B82F6;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 8px;
  transition: all 0.3s;
  border: none;
}

.hero-cta:hover {
  background: #2563EB;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59,130,246,0.4);
}

/* ========================================
   SECTIONS
   ======================================== */
.section { padding: 100px 24px; }
.section-gray { background: #F1F5F9; }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: clamp(28px, 4vw, 48px);
  color: #0F172A;
  margin-bottom: 16px;
}

.section-line {
  width: 60px; height: 4px;
  background: #3B82F6;
  margin: 0 auto;
  border-radius: 2px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

/* ========================================
   CATEGORIES
   ======================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.category-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.category-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s;
}

.category-card:hover img { transform: scale(1.1); }

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.85) 0%, rgba(15,23,42,0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.category-card-title {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.category-card-link {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin-top: 8px;
  transition: color 0.2s;
}

.category-card:hover .category-card-link { color: #3B82F6; }

/* ========================================
   PRODUCTS GRID
   ======================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
  transition: all 0.3s;
}

.product-card:hover {
  border-color: rgba(59,130,246,0.2);
  box-shadow: 0 10px 30px -10px rgba(15,23,42,0.15);
}

.product-image {
  position: relative;
  height: 220px;
  background: #F8FAFC;
  overflow: hidden;
}

.product-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

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

.product-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: #F97316;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.product-actions {
  position: absolute;
  top: 12px; right: 12px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s;
}

.product-card:hover .product-actions { opacity: 1; }

.product-action-btn {
  width: 36px; height: 36px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

.product-action-btn:hover { background: #3B82F6; color: #fff; }

.product-info { padding: 20px; }

.product-title {
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-desc {
  font-size: 14px;
  color: #334155;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-old-price {
  color: #94A3B8;
  text-decoration: line-through;
  font-size: 14px;
}

.product-price {
  color: #3B82F6;
  font-size: 20px;
  font-weight: 700;
}

/* ========================================
   BUDGET FILTER
   ======================================== */
.budget-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.budget-filter-btn {
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid #E2E8F0;
  background: #fff;
  color: #334155;
  transition: all 0.3s;
}

.budget-filter-btn:hover {
  border-color: #3B82F6;
  color: #3B82F6;
}

.budget-filter-btn.active {
  background: #3B82F6;
  color: #fff;
  border-color: #3B82F6;
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(59,130,246,0.3);
}

/* ========================================
   WHATSAPP BAR
   ======================================== */
.whatsapp-bar {
  background: #0F172A;
  padding: 24px;
  text-align: center;
}

.whatsapp-bar a { color: #25D366; font-weight: 700; }
.whatsapp-bar a:hover { text-decoration: underline; }

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: #0F172A;
  color: #fff;
}

.footer-newsletter {
  padding: 80px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-newsletter-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.footer-newsletter h2 {
  font-size: clamp(24px, 3vw, 36px);
  margin-bottom: 16px;
}

.footer-newsletter p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
  font-size: 18px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 16px 24px;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
}

.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }

.newsletter-form button {
  padding: 16px 32px;
  background: #3B82F6;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.footer-links {
  padding: 60px 24px;
}

.footer-links-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.footer-col h4 {
  font-size: 18px;
  margin-bottom: 20px;
}

.footer-col a,
.footer-col span {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.footer-col a:hover { color: #fff; }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.footer-social a:hover { background: #3B82F6; }

.footer-bottom {
  padding: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-bottom p,
.footer-bottom a {
  color: rgba(255,255,255,0.4);
  font-size: 14px;
}

.footer-bottom a:hover { color: #fff; }

/* ========================================
   CART SIDEBAR
   ======================================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  backdrop-filter: blur(4px);
}

.cart-sidebar {
  position: fixed;
  top: 0; right: 0;
  width: 100%; max-width: 420px;
  height: 100vh;
  background: #fff;
  z-index: 2001;
  display: flex;
  flex-direction: column;
}

.cart-header {
  padding: 24px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
}

.cart-close {
  padding: 8px;
  border-radius: 8px;
}

.cart-close:hover { background: #F1F5F9; }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.cart-empty {
  text-align: center;
  padding: 60px 24px;
  color: #334155;
}

.cart-empty svg {
  width: 64px; height: 64px;
  color: #CBD5E1;
  margin: 0 auto 16px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #F8FAFC;
  border-radius: 12px;
  margin-bottom: 12px;
}

.cart-item-img {
  width: 80px; height: 80px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  color: #3B82F6;
  font-weight: 700;
  margin-top: 4px;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.cart-item-qty button {
  width: 28px; height: 28px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.cart-item-qty button:hover { border-color: #3B82F6; }

.cart-item-qty span {
  font-size: 14px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.cart-item-remove {
  color: #94A3B8;
  padding: 4px;
  align-self: flex-start;
}

.cart-item-remove:hover { color: #EF4444; }

.cart-footer {
  padding: 24px;
  border-top: 1px solid #E2E8F0;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-total span { color: #334155; }

.cart-total strong {
  font-size: 24px;
  color: #0F172A;
}

.cart-checkout {
  width: 100%;
  padding: 16px;
  background: #3B82F6;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.cart-checkout:hover { background: #2563EB; }

/* ========================================
   CONTACT PAGE
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.contact-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #E2E8F0;
  transition: all 0.3s;
}

.contact-card:hover {
  box-shadow: 0 10px 30px -10px rgba(15,23,42,0.15);
}

.contact-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.contact-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.contact-card a,
.contact-card p {
  color: #334155;
  font-size: 14px;
}

/* ========================================
   ORDER PAGE
   ======================================== */
.order-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
}

@media (max-width: 1024px) {
  .order-grid { grid-template-columns: 1fr; }
}

.order-form-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid #E2E8F0;
  position: sticky;
  top: 100px;
}

.order-form-card h2 {
  font-size: 20px;
  margin-bottom: 24px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  font-size: 15px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3B82F6;
}

.btn-whatsapp {
  width: 100%;
  padding: 16px;
  background: #25D366;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-whatsapp:hover { background: #128C7E; }

/* ========================================
   SINGLE PRODUCT
   ======================================== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; }
}

.product-gallery {
  background: #F8FAFC;
  border-radius: 16px;
  overflow: hidden;
}

.product-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-detail-info h1 {
  font-size: 32px;
  margin-bottom: 16px;
}

.product-detail-price {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.product-detail-price .old {
  color: #94A3B8;
  text-decoration: line-through;
  font-size: 20px;
}

.product-detail-price .current {
  color: #3B82F6;
  font-size: 36px;
  font-weight: 700;
}

.product-detail-desc {
  color: #334155;
  margin-bottom: 24px;
  line-height: 1.7;
}

.specs-list {
  margin-bottom: 32px;
}

.specs-list h4 {
  font-size: 16px;
  margin-bottom: 12px;
}

.specs-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-size: 14px;
  margin-bottom: 8px;
}

.specs-list li::before {
  content: '';
  width: 6px; height: 6px;
  background: #3B82F6;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ========================================
   ADMIN DASHBOARD (WordPress)
   ======================================== */
.wp-admin-bar { display: none !important; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .section { padding: 60px 16px; }
  .hero-title { font-size: 36px; }
  .newsletter-form { flex-direction: column; }
  .footer-links-inner { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .order-form-card { position: static; }
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Utility */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none; }
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
