/* ===========================
   Reset & Base
   =========================== */
body {
  margin: 0;
  font-family: 'Press Start 2P', monospace;
  background-color: #f4efe1;
  color: #2b2b2b;
  text-align: center;
}

.nostyle { color: inherit; text-decoration: none; cursor: pointer; }

/* ===========================
   Header
   =========================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #1e1e1e;
  color: #f0e6d2;
  border-bottom: 4px solid #dab785;
  padding: 10px 20px;
  box-sizing: border-box;
  z-index: 1100;
  text-align: center;
}

a {
  color: #dab785; text-decoration: none; cursor: pointer; 
}

a:hover {
  color: inherit; text-decoration: none; cursor: pointer; 
}

/* ===========================
   Header navigation
   =========================== */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  margin: 0;
  font-size: 18px;
  display: inline-block;
}

/* Liens navigation (desktop) */
.nav-links {
  display: flex;
  gap: 12px;
}

.nav-btn {
  padding: 8px 14px;
  font-size: 14px;
  background-color: #2b2b2b;
  color: #fffbe6;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}
.nav-btn:hover {
  background-color: #dab785;
  color: #2b2b2b;
}

/* Hamburger (mobile seulement) */
.hamburger {
  display: none;
  font-size: 20px;
  background: none;
  border: none;
  color: #dab785;
  cursor: pointer;
  margin-right: 10px;
}

/* Menu overlay mobile */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1200;
  color: #fff;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.mobile-menu-overlay.active {
  display: flex;
}

.mobile-menu-inner nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-link {
  font-size: 20px;
  color: #dab785;
  text-decoration: none;
}
.mobile-link:hover {
  color: #fff;
}

#closeMobileMenu {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  background: none;
  border: none;
  color: #dab785;
  cursor: pointer;
}

/* ===========================
   Barre de filtres + boutons
   =========================== */
.filters-bar {
  position: fixed;
  top: 50px;
  left: 0;
  width: 100%;
  background: #f8f8f8;
  display: right;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid #ddd;
  z-index: 1050;
  box-sizing: border-box;
}

.filters-buttons { display: flex; gap: 10px; }

#searchBar {
  padding: 10px;
  font-size: 14px;
  width: 20%;       /* <-- réduit la longueur */
  border: 2px solid #2b2b2b;
  background-color: #fffbe6;
  border-radius: 6px;
}

#toggleFilters,
#toggleView {
  padding: 10px 16px;
  font-size: 14px;
  background-color: #2b2b2b;
  color: #fffbe6;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* ===========================
   Overlay sombre
   =========================== */
.filters-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 950;
}
.filters-overlay.active { display: block; }

/* ===========================
   Menu déroulant filtres
   =========================== */
.filters-dropdown {
  position: fixed;
  top: 110px;
  left: 0;
  width: 100%;
  background: #fff;
  border-radius: 0;
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  padding: 20px;
  display: none;
  box-sizing: border-box;
}
.filters-dropdown.active { display: block; }

.filters-dropdown-inner { display: flex; flex-direction: column; gap: 16px; }

.filter-group h4 { margin: 0 0 8px 0; }
.filter-group label { display: block; margin-bottom: 4px; }

.close-btn {
  margin-top: 10px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  background: #2b2b2b;
  color: #fffbe6;
  border: none;
  border-radius: 6px;
}

/* ===========================
   Grille produits
   =========================== */
.container { padding: 150px 20px 20px; }

#productGrid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

.product-card {
  width: 200px;
  padding: 10px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s ease;
}
.product-card:hover img { transform: scale(1.05); }

#productGrid:not(.large-cards) .product-card h3 {
  font-size: 12px; /* taille réduite en compact */
  line-height: 1.2;
}

/* ===========================
   Vue “grandes cartes”
   =========================== */
#productGrid.large-cards .product-card {
  width: 280px;
  padding: 20px;
  margin: 10px;
  border-radius: 12px;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.15);
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#productGrid.large-cards .product-card:hover {
  transform: scale(1.03);
  box-shadow: 6px 6px 16px rgba(0,0,0,0.2);
}
#productGrid.large-cards .product-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}
#productGrid.large-cards .product-card h3 {
  font-size: 16px;
  margin: 0;
  line-height: 1.2;
  text-align: center;
}

/* ===========================
   Footer
   =========================== */
footer {
  background-color: #1e1e1e;
  color: #dab785;
  padding: 10px;
  margin-top: 30px;
}

/* ===========================
   Fiche produit
   =========================== */
.fiche-produit {
  max-width: 800px;
  margin: 120px auto 40px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  font-family: sans-serif;
}

.fiche-produit h1 {
  font-size: 28px;
  margin-bottom: 20px;
  text-align: center;
}

.fiche-produit .images,
.fiche-produit .infos {
  width: 100%;
  margin-bottom: 20px;
}

.fiche-produit .images img.fiche-img {
  width: 100%;
  max-width: 600px;
  height: auto;
  margin-bottom: 10px;
  border-radius: 6px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
}

.fiche-produit .infos p {
  margin-bottom: 12px;
  line-height: 1.4;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
  .filters-bar { flex-direction: row; gap: 10px; }
  #searchBar { font-size: 12px; }
  .filters-dropdown { width: 100%; top: 100px; max-height: 70vh; overflow-y: auto; text-align: left; }
  .filters-dropdown-inner .filter-group { text-align: left; }
  .filters-dropdown-inner .filter-group h4 { margin-left: 4px; }
  #productGrid.large-cards .product-card { width: 90%; padding: 15px; }
  #productGrid.large-cards .product-card img { height: auto; }
  #productGrid:not(.large-cards) {
    justify-content: space-between; /* pour bien séparer 2 cartes */
  }
  #productGrid:not(.large-cards) .product-card {
    width: 40%;      /* 2 cartes par ligne avec un petit gap */
  }
  #productGrid:not(.large-cards) .product-card img {
    height: 150px;   /* images plus petites */
  }
  #productGrid:not(.large-cards) .product-card h3 {
    font-size: 10px; /* encore plus petit sur smartphone */
  }
  .site-title { margin: 0; font-size: 10px; display: inline-block;}
  .nav-links { display: none; }
  .hamburger { display: inline-block; }
}

/* ===========================
   Organisation filtres par colonnes (PC uniquement)
   =========================== */
   
@media (min-width: 1024px) {
  /* centre et réduit la largeur du dropdown sur grand écran */
  .filters-dropdown {
    width: 80%;
    max-width: 1100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 24px;
    border-radius: 10px;
    top: 110px; /* conserve la position d'origine */
    box-sizing: border-box;
    max-height: 80vh; /* évite d'occuper tout l'écran */
    overflow-y: auto; /* scroll interne si trop long */
  }

  /* transforme l'intérieur en grille de 3 colonnes */
  .filters-dropdown-inner {
    display: grid !important;           /* override du flex existant */
    grid-template-columns: 1fr 1fr 1fr; /* 3 colonnes : Dates | Types | Jeux */
    gap: 28px;
    align-items: start;
    grid-auto-rows: min-content;
  }

  /* garde l'alignement à gauche dans chaque colonne */
  .filters-dropdown-inner .filter-group {
    text-align: left;
    margin: 0;
  }
  .filters-dropdown-inner .filter-group h4 {
    margin-bottom: 8px;
  }
  .filters-dropdown-inner .filter-group label {
    display: block;
    margin-bottom: 6px;
  }

  /* faites en sorte que le bouton Fermer soit sous la grille et aligné à droite */
  #closeFilters {
    grid-column: 1 / -1; /* occupe toutes les colonnes */
    justify-self: end;
    margin-top: 8px;
  }
}

/* ===========================
   News / About / Contact
   =========================== */

.news-page, .news-detail {
    padding: 120px 20px 40px; /* en tenant compte du header fixe */
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.news-page h1, .news-detail h1 {
    text-align: center;
    margin-bottom: 25px;
}

.news-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-card {
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
}

.news-card h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.news-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.news-excerpt {
    font-size: 20px;
    margin-bottom: 10px;
	font-family: 'Poiret One', monospace;
}
 /* =========================== Mise en page News avec image latérale =========================== */ 
 .news-card { 
	display: flex; 
	flex-direction: row; 
	align-items: flex-start; 
	gap: 20px; 
 } 
 
 .news-card .news-image {
	 flex-shrink: 0; 
	 width: 160px; 
	 height: auto; 
} 

 .news-card .news-image img {
	 width: 100%; 
	 height: auto; 
	 border-radius: 8px; 
	 box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1); 
} 

 .news-card .news-content { 
	flex: 1; 
	text-align: left; 
}
 /* Sur mobile : repasse en colonne */ 
 @media (max-width: 768px) { 
 .news-card { 
	flex-direction: column; 
	align-items: center; 
	text-align: left; 

} 
 .news-card .news-image {
	 width: 80%; 
	 margin-bottom: 12px; 
}
}