:root {
  --brun: #8B5A3C;
  --cuivre: #C17D4F;
  --miel: #E8B84A;
  --beige: #FAF6F0;
  --gris: #F5F1EB;
  --blanc: #FFFFFF;
}

/* Corps de page */
body {
  background: linear-gradient(to bottom, var(--beige) 0%, var(--gris) 100%);
  color: var(--brun);
  font-family: 'Georgia', serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Navbar & Footer */
.navbar, footer {
  background: linear-gradient(135deg, var(--blanc) 0%, var(--gris) 100%);
  color: var(--brun);
  box-shadow: 0 2px 10px rgba(139, 90, 60, 0.08);
}

.navbar a, footer a {
  color: var(--brun);
  text-decoration: none;
}

.navbar a:hover, footer a:hover {
  color: var(--cuivre);
}

/* Titres */
h1, h2, h3, h4, h5, h6 {
  color: var(--brun);
}

h2.text-brown {
  color: var(--brun);
}

/* Boutons */
.btn-primary {
  background-color: var(--cuivre);
  border: none;
  border-radius: 30px;
  color: white;
  padding: 10px 25px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--brun);
  transform: scale(1.05);
}

.btn-warning {
  background-color: var(--miel);
  border: none;
  color: var(--brun);
}

.btn-warning:hover {
  background-color: var(--cuivre);
  color: var(--beige);
}

.disabled-button {
  background-color: #c9c3bc !important;
  color: #fff !important;
  border-radius: 30px;
  padding: 8px 20px;
  opacity: 0.6;
  cursor: not-allowed;
}

/* Section Hero */
.hero {
  background: url('../images/acceuil/fondation-acceuil.jpg') center/cover no-repeat;
  color: var(--beige);
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
  padding: 80px 0;
}

/* ===========================
   CARTES PRODUITS MODERNES
   =========================== */

.product {
  position: relative;
  background: var(--blanc);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(139, 90, 60, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(193, 125, 79, 0.1);
}

.product:hover {
  transform: translateY(-12px);
  box-shadow: 0 16px 40px rgba(139, 90, 60, 0.2);
  border-color: rgba(232, 184, 74, 0.3);
}

/* Conteneur image avec effet */
.product-image-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: linear-gradient(135deg, #FFFCF7 0%, #FFF8ED 100%);
  cursor: pointer;
  border-bottom: 2px solid rgba(232, 184, 74, 0.1);
}

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

.product:hover .product-thumb {
  transform: scale(1.08);
}

/* Badge stock */
.stock-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, rgba(232, 184, 74, 0.95) 0%, rgba(193, 125, 79, 0.95) 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.stock-badge.out-of-stock {
  background: linear-gradient(135deg, rgba(139, 90, 60, 0.95) 0%, rgba(107, 70, 47, 0.95) 100%);
}

/* Overlay au survol */
.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(139, 90, 60, 0.9) 0%, rgba(139, 90, 60, 0.3) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 25px;
}

.product:hover .product-overlay {
  opacity: 1;
}

.product-overlay .quick-view {
  background: white;
  color: var(--brun);
  border: 2px solid var(--miel);
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.product:hover .product-overlay .quick-view {
  transform: translateY(0);
  background: var(--miel);
  color: white;
  border-color: white;
}

/* Contenu carte */
.product-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product h5 {
  margin: 0 0 10px 0;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brun);
  line-height: 1.3;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cuivre);
  margin-bottom: 15px;
}

.product .btn {
  width: 100%;
  background: linear-gradient(135deg, var(--cuivre) 0%, var(--miel) 100%);
  border: none;
  border-radius: 30px;
  padding: 14px 20px;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(193, 125, 79, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(193, 125, 79, 0.5);
  background: linear-gradient(135deg, var(--miel) 0%, var(--cuivre) 100%);
}

.product .btn:active {
  transform: translateY(0);
}

/* Icônes réseaux sociaux */
.social-icons a {
  color: var(--cuivre);
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: var(--brun);
}

/* Section filtres moderne */
#filters {
  display: none;
  background-color: var(--gris);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

#filter-toggle {
  background-color: var(--cuivre);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 8px 20px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

#filter-toggle:hover {
  background-color: var(--brun);
  transform: scale(1.05);
}

/* ===========================
   MODALE PRODUIT AGRANDIE
   =========================== */

.modal-dialog {
  max-width: 1100px !important;
  margin: 1.75rem auto;
}

.modal-content {
  background: linear-gradient(180deg, var(--beige) 0%, #fff 100%);
  border: none;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden;
}

/* Header modal */
.modal-header {
  background: linear-gradient(135deg, var(--miel) 0%, var(--cuivre) 100%);
  color: white;
  border-bottom: none;
  padding: 20px 30px;
  position: relative;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(to bottom, rgba(218, 171, 58, 0.2), transparent);
}

.modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: transform 0.2s ease;
}

.modal-header .btn-close:hover {
  transform: rotate(90deg);
  opacity: 1;
}

/* Corps modal */
.modal-body {
  padding: 30px;
}

/* Zone image agrandie */
.modal-body .col-12.col-lg-6 {
  position: relative;
  background: linear-gradient(135deg, #faf7f2 0%, #f1ebe2 100%);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}

.image-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

#modal-image {
  max-width: 100%;
  height: auto;
  max-height: 500px;
  border-radius: 12px;
  transition: transform 0.3s ease;
  cursor: zoom-in;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

#modal-image:hover {
  transform: scale(1.02);
}

/* Flèches navigation élégantes */
.arrow-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--cuivre) 0%, var(--miel) 100%);
  border: none;
  color: white;
  font-size: 1.8rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(147, 68, 26, 0.3);
}

.arrow-button:hover {
  background: linear-gradient(135deg, var(--brun) 0%, var(--cuivre) 100%);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(147, 68, 26, 0.4);
}

#prev-image {
  left: -25px;
}

#next-image {
  right: -25px;
}

/* Zone informations produit */
.modal-body .col-12.col-lg-6 {
  padding: 20px 30px;
}

#modal-title {
  color: var(--brun);
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

#modal-details {
  background: white;
  border: 2px solid var(--gris);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  line-height: 1.8;
  font-size: 1.05rem;
}

#modal-details strong {
  color: var(--cuivre);
  font-weight: 600;
}

/* Actions modal */
.modal-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(238, 230, 216, 0.5) 0%, rgba(255, 255, 255, 0.5) 100%);
  border-radius: 16px;
}

.modal-actions label {
  color: var(--brun);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}

.modal-actions .form-control {
  border-radius: 12px;
  border: 2px solid var(--gris);
  padding: 10px 15px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brun);
  max-width: 100px;
  transition: border-color 0.3s ease;
}

.modal-actions .form-control:focus {
  border-color: var(--cuivre);
  box-shadow: 0 0 0 3px rgba(182, 115, 50, 0.1);
}

#add-to-cart-modal {
  flex: 1;
  background: linear-gradient(135deg, var(--cuivre) 0%, var(--miel) 100%);
  border: none;
  border-radius: 25px;
  padding: 14px 30px;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(182, 115, 50, 0.3);
}

#add-to-cart-modal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(182, 115, 50, 0.4);
}

#add-to-cart-modal:active {
  transform: translateY(0);
}

/* Loupe zoom améliorée */
#zoom-lens {
  position: absolute;
  border: 3px solid var(--cuivre);
  border-radius: 50%;
  width: 150px;
  height: 150px;
  overflow: hidden;
  pointer-events: none;
  display: none;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3), inset 0 0 0 2px rgba(255,255,255,0.5);
  z-index: 20;
  backdrop-filter: blur(2px);
}

#zoom-lens::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 20px rgba(147, 68, 26, 0.2);
  z-index: 1;
}

#zoom-lens img {
  position: absolute;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 992px) {
  .modal-dialog {
    max-width: 90%;
    margin: 1rem auto;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .modal-body .col-12.col-lg-6 {
    min-height: 350px;
    margin-bottom: 20px;
  }
  
  #modal-title {
    font-size: 1.5rem;
  }
  
  .arrow-button {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }
  
  #prev-image {
    left: 10px;
  }
  
  #next-image {
    right: 10px;
  }
}

@media (max-width: 768px) {
  .product-image-wrapper {
    height: 250px;
  }
  
  .product h5 {
    font-size: 1.1rem;
  }
  
  .product-price {
    font-size: 1.3rem;
  }
  
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .modal-actions .form-control {
    max-width: 100%;
  }
  
  #zoom-lens {
    width: 120px;
    height: 120px;
  }
}

.filtres-moderne-wrapper {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border: 2px solid var(--gris);
}

.filtres-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--beige);
}

.filtres-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brun);
}

.filtres-title i {
  font-size: 1.5rem;
  color: var(--cuivre);
}

.filtres-title h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

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

.btn-toggle-filters {
  background: linear-gradient(135deg, var(--cuivre), var(--miel));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-toggle-filters:hover {
  background: linear-gradient(135deg, var(--miel), var(--cuivre));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(182, 115, 50, 0.3);
}

.btn-reset-filters {
  background: linear-gradient(135deg, var(--miel), #f0c05a);
  color: var(--brun);
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-reset-filters:hover {
  background: linear-gradient(135deg, var(--cuivre), var(--miel));
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(182, 115, 50, 0.3);
}

.filtres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 25px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filtre-category-box {
  background: linear-gradient(135deg, rgba(238, 230, 216, 0.3), rgba(255,255,255,0.5));
  border: 2px solid var(--gris);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.filtre-category-box:hover {
  border-color: var(--cuivre);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.filtre-category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: var(--brun);
  font-weight: 700;
  font-size: 1.1rem;
}

.filtre-category-title i {
  color: var(--cuivre);
  font-size: 1.3rem;
}

.filtre-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filtre-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.filtre-option:hover {
  background: rgba(182, 115, 50, 0.1);
}

.filtre-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--cuivre);
}

.filtre-option-label {
  flex: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--brun);
}

.filtre-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gris);
  flex-shrink: 0;
}

.filtre-option-count {
  background: var(--beige);
  color: var(--cuivre);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* RÉSULTATS */
.resultats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.resultats-header h4 {
  margin: 0;
  color: var(--brun);
  font-size: 1.3rem;
}

.filtres-actifs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filtre-badge {
  background: linear-gradient(135deg, var(--cuivre), var(--miel));
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.filtre-badge button {
  background: rgba(255,255,255,0.3);
  border: none;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 12px;
}

.filtre-badge button:hover {
  background: rgba(255,255,255,0.5);
  transform: scale(1.1);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .filtres-grid {
    grid-template-columns: 1fr;
  }
  
  .filtres-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .filtres-header-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .btn-toggle-filters,
  .btn-reset-filters {
    width: 100%;
    justify-content: center;
  }
  
  .resultats-header {
    flex-direction: column;
    align-items: flex-start;
  }
}