/* ========================================
   CLASSES MODULAIRES
======================================== */

.hidden {
  display: none;
}

.show {
  display: block;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

/* Classes d'état */
.is-active {
  /* À définir selon le contexte */
}

.is-open {
  display: block;
}

.is-closed {
  display: none;
}

/* === RESET GLOBAL === */
html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;  
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #242424;
  color: #eeeeee;
  line-height: 1.6;
}

main#mainContainer {
  flex: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-top: 100px;
}

#pageContainer, 
#productsSection, 
#productsGrid, 
#backButton {
  scroll-margin-top: 100px;
}

body:has(#contactMainTitle) #pageContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contactCentralCard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 400px;
}

.contactMapCard {
  height: 650px;
  min-height: 650px;
}

#googleMap {
  flex: 1;
  min-height: 550px;
  height: 100%;
}

/* === HEADER === */
#header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.5rem 1.5rem;
  align-items: center;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  max-height: 100px;
  box-sizing: border-box;
}

#headerImage {
  width: 100vw;
  height: 40vh;
}

#logo {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 80px;
  height: 80px;
  cursor: pointer;
  transition: transform 0.3s ease;
  border-radius: 8px;
  object-fit: contain;
}

#logo:hover {
  transform: scale(1.05);
}

/* === NAVIGATION PRINCIPALE === */
#navLinks {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
}

.btnHeader {
  color: #e0e0e0;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  white-space: nowrap;
  position: relative;
  border-bottom: 3px solid transparent;
}

.btnHeader:hover {
  color: #dbcc46;
  background: rgba(219, 204, 70, 0.1);
  border-bottom: 3px solid #f5a623;
}

.actualMenu {
  color: #dbcc46;
  background: rgba(219, 204, 70, 0.15);
  border: 2px solid #dbcc46;
  border-radius: 10px;
}

/* === SUBMENU BOUTIQUE === */
#btnProduitsNav {
  position: relative;
}

#submenuProduits {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
  border: 2px solid #dbcc46;
  border-radius: 12px;
  padding: 0.8rem;
  display: none;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 1001;
  margin-top: 0.5rem;
}

#submenuProduits.open {
  display: flex;
}

.submenuItem,
#submenuProduits .submenuItem,
.submenuItem {
  padding: 0.7rem 1rem;
  color: #e0e0e0;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  border-bottom: 1px solid #333;
  margin-bottom: 0.5rem;
}

.submenuItem:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.submenuItem:hover,
#submenuProduits .submenuItem:hover,
.submenuItem:hover {
  background: #dbcc46;
  color: #1b1b1b;
  transform: translateX(5px);
}

/* === BARRE DE RECHERCHE === */
#headerSearchContainer {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  width: 100%;
  max-width: 500px;
  justify-self: center;
  padding: 0 0.5rem;
  box-sizing: border-box;
}

#headerSearchInput {
  width: 100%;
  padding: 0.6rem 1rem;
  background: #1b1b1b;
  border: 2px solid #333;
  border-radius: 8px;
  color: #eeeeee;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

#headerSearchInput:hover {
  border-color: #dbcc46;
}

#headerSearchInput:focus {
  outline: none;
  border-color: #f5a623;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.1);
}

#headerSearchInput::placeholder {
  color: #888;
}

#headerSearchContainer::before {
  display: none;
}

#headerSearchResults {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
  border: 2px solid #dbcc46;
  border-radius: 12px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 1002;
}

#headerSearchResults.show {
  display: block;
}

#headerSearchResults::-webkit-scrollbar {
  width: 8px;
}

#headerSearchResults::-webkit-scrollbar-track {
  background: #1b1b1b;
  border-radius: 4px;
}

#headerSearchResults::-webkit-scrollbar-thumb {
  background: #dbcc46;
  border-radius: 4px;
}

#headerSearchResults::-webkit-scrollbar-thumb:hover {
  background: #f5a623;
}

.searchResultItem {
  padding: 1rem;
  border-bottom: 1px solid #333;
  cursor: pointer;
  transition: all 0.3s ease;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.searchResultItem:last-child {
  border-bottom: none;
}

.searchResultItem:hover {
  background: rgba(219, 204, 70, 0.1);
}

.searchResultName {
  color: #dbcc46;
  font-weight: 600;
  font-size: 1rem;
  grid-column: 1 / 3;
}

.searchResultRef {
  color: #b0b0b0;
  font-size: 0.85rem;
}

.searchResultPrice {
  color: #f5a623;
  font-weight: 700;
  text-align: right;
  font-size: 0.95rem;
}

.searchResultStock {
  grid-column: 1 / 3;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.3rem;
}

.searchResultStockTrue {
  color: #4CAF50;
}

.searchResultStockFalse {
  color: #f44336;
}

/* === ACTIONS UTILISATEUR === */
#userActions {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: row;
  gap: 0.8rem;
  justify-content: center;
  align-items: center;
}

.headerBtnRight {
  background: linear-gradient(135deg, #dbcc46 0%, #f5a623 100%);
  color: #1b1b1b;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(219, 204, 70, 0.3);
}

.headerBtnRight:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(219, 204, 70, 0.5);
}

#allProductsBtn {
  background: rgba(219, 204, 70, 0.2);
  font-weight: 700;
  border: 1px solid #dbcc46;
  margin-bottom: 0.8rem;
}

#allProductsBtn:hover {
  background: #dbcc46;
  color: #1b1b1b;
}

/* === RESPONSIVE HEADER === */
@media (max-width: 992px) {
  #header {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    padding: 0.8rem 1rem;
    max-height: none;
    gap: 0.8rem;
  }
  
  #logo {
    grid-column: 1;
    grid-row: 1;
    width: 60px;
    height: 60px;
  }
  
  #userActions {
    grid-column: 2;
    grid-row: 1;
    flex-direction: row;
    justify-self: end;
    gap: 0.5rem;
  }
  
  .headerBtnRight {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }
  
  #navLinks {
    grid-column: 1 / 3;
    grid-row: 2;
    gap: 1rem;
    justify-content: flex-start;
  }
  
  .btnHeader {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  #headerSearchContainer {
    grid-column: 1 / 3;
    grid-row: 3;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  #header {
    padding: 0.6rem 0.8rem;
    gap: 0.6rem;
  }
  
  #logo {
    width: 50px;
    height: 50px;
  }
  
  #navLinks {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .btnHeader {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }
  
  #userActions {
    gap: 0.3rem;
  }
  
  .headerBtnRight {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
  
  #submenuProduits {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-height: 60vh;
    overflow-y: auto;
    border-radius: 0;
    margin-top: 0;
    border-left: none;
    border-right: none;
  }
  
  #submenuProduits.open {
    display: flex;
    flex-direction: column;
  }
  
  .submenuItem {
    padding: 1rem;
    font-size: 1rem;
  }
  
  #headerSearchInput {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }
  
  #headerImage {
    max-height: 150px;
  }
}

@media (max-width: 480px) {
  #header {
    padding: 0.5rem;
  }
  
  #navLinks {
    justify-content: space-between;
  }
  
  .btnHeader {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
  
  #userActions {
    flex-direction: column;
    gap: 0.3rem;
  }
  
  .headerBtnRight {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
  }
  
  #headerImage {
    max-height: 150px;
  }
}

/* === BOUTONS COMPOSANTS === */
.component_btn-Neutral--M {
  background-color: #3a3a3a;
  color: #f5f5f5;
  padding: 0.6rem;
  border-radius: 10px;
}

.component_btn-Neutral--M:hover {
  background-color: #505050;
}

.component_btn-Confirm--M:hover {
  background-color: #ffb84d;
}

.component_btn-Error--M {
  background-color: #d9534f;
  color: #fff;
}

.component_btn-Error--M:hover {
  background-color: #e66a65;
}

/* === FOOTER === */
#footerContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-around;
  align-items: flex-start;
  background: #1b1b1b;
  color: #eeeeee;
  padding: 2rem;
  border-top: 4px solid #dbcc46;
  box-sizing: border-box;
}

.footerSection {
  flex: 1 1 250px;
  background: #242424;
  padding: 1.2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.mainTitle {
  display: flex;
  justify-content: center;
  color: #f5a623;
  margin-bottom: 1rem;
  font-size: 2rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
}

[id^="link-"] {
  cursor: pointer;
  margin: 0.4rem 0;
  transition: color 0.2s ease;
}

[id^="link-"]:hover {
  color: #00aaff;
}

#footerHours div,
#footerContact div {
  margin: 0.4rem 0;
  font-size: 0.95rem;
  color: #cccccc;
}

#footerBottom {
  width: 100%;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid #333;
  color: #aaaaaa;
  box-sizing: border-box;
}

#footerRoot {
  background-color: #1e1e1e;
  color: #fff;
  padding: 20px 10px;
  font-family: 'Segoe UI', sans-serif;
  margin-top: 5rem;
}

#btnProduits {
  background-color: #dbcc46;
  color: #1b1b1b;
  width: 10rem;
  margin: 0 auto;
  border-radius: 10px;
  padding: 1rem;
}

#footerLinksContainer {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

#footerLinksContainer > div {
  padding: 1rem;
}

#footerLinks a.footerLink {
  display: block;
  color: #ddd;
  text-decoration: none;
  margin: 4px 0;
  transition: color 0.2s ease;
}

#footerLinks a.footerLink:hover {
  color: #fff;
  text-decoration: underline;
}

/* === ÉTATS GÉNÉRAUX === */
.inStock {
  color: #4CAF50;
  font-weight: bold;
}

.outOfStock {
  color: #f44336;
  font-weight: bold;
}

.btnOutOfStock:hover {
  background-color: #666;
  transform: none;
}

/* === DROPDOWN GÉNÉRIQUE === */
.dropdown {
  position: absolute;
  background: #242424;
  border: 1px solid #dbcc46;
  border-radius: 8px;
  padding: 0.5rem 0;
  display: none;
  flex-direction: column;
  min-width: 150px;
  z-index: 1000;
}

.dropdownItem {
  padding: 0.8rem 1.2rem;
  color: #eeeeee;
  cursor: pointer;
  transition: background 0.2s;
}

.dropdownItem:hover {
  background: #dbcc46;
  color: #1b1b1b;
}



/* GESTION ERREURS PRODUITS */

/* === PAGE D'ERREUR PRODUIT === */
/* === PAGE D'ERREUR PRODUIT === */
.productErrorCard {
    max-width: 600px;
    margin: 100px auto;
    padding: 40px;
    background: #1e1e1e; /* Changé pour thème sombre */
    color: #e0e0e0; /* Ajouté */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); /* Ajusté */
    text-align: center;
}

.productErrorCard h2 {
    color: #ffffff; /* Changé */
    margin-bottom: 20px;
}

.errorMessage {
    margin: 20px 0;
    color: #b0b0b0; /* Changé */
    line-height: 1.6;
}

.errorDetail {
    font-size: 14px;
    color: #808080; /* Changé */
    font-style: italic;
    margin-top: 10px;
}

.errorSuggestions {
    margin: 30px 0;
    text-align: left;
    padding: 20px;
    background: #2a2a2a; /* Changé */
    border-radius: 8px;
}

.errorSuggestions h3 {
    margin-bottom: 15px;
    color: #e0e0e0; /* Changé */
}

.errorSuggestions li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #d0d0d0; /* Ajouté */
}

.errorSuggestions li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #4a9eff; /* Votre couleur d'accent */
}