/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f9f7f4;
    color: #333;
    line-height: 1.6;
}

/* Color Palette */
:root {
    --primary-color: #8B9F6B;
    --secondary-color: #B8860B;
    --accent-color: #D2691E;
    --background-color: #f9f7f4;
    --text-color: #333;
    --light-text: #fff;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 20;
}

/* Ajustement de la marge du contenu principal pour éviter le chevauchement */
#content-wrapper {
	margin-top: 80px;
}
@media (max-width: 768px) {
    #content-wrapper {
		margin-top: 50px;
	}
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}


/* Navigation desktop */
.desktop-nav {
  display: flex;
  justify-content: flex-end;
  padding: 20px;
  background-color: #f8f8f8;
}

.main-links {
  display: flex;
  list-style: none;
  gap: 20px;
}

.main-links li a {
  text-decoration: none;
  color: #333;
  font-size: 1rem;
  padding: 5px 10px;
}

#catalogue-link {
  font-weight: bold;
  cursor: pointer;
}

/* Menu full width pour le catalogue (desktop) */
#catalogue-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #f8f8f8;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: none;
}

#catalogue-fullscreen.active {
  display: block;
  transform: translateX(0);
}

#close-catalogue {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.level-0 {
  display: flex;
  justify-content: space-around;
  list-style: none;
  padding: 60px 20px 20px;
  margin: 0;
  flex-wrap: wrap;
}

.level-0 > li {
  flex: 1 1 200px;
  text-align: center;
}

.level-0 > li > a {
  font-size: 1.3rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  display: block;
  padding: 10px;
  background-color: #e9e9e9;
  border-radius: 4px;
}

.level-1, .level-2, .level-3 {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  text-align: left;
}

.level-1 > li > a, .level-2 > li > a, .level-3 > li > a {
  display: block;
  padding: 8px 15px;
  color: #555;
  text-decoration: none;
  font-size: 1rem;
}

.level-2 > li > a {
  padding-left: 25px;
}
.level-3 > li > a {
  padding-left: 50px;
}

/* Navigation mobile (masquée par défaut en desktop) */
.mobile-nav {
  display: none;
}

.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000;
  position: fixed;
  top: 20px;
  right: 20px;
}

.burger-bar {
  display: block;
  width: 100%;
  height: 3px;
  background: #333;
  transition: all 0.3s ease;
}

/* Menu fullscreen mobile */
.fullscreen-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #f8f8f8;
  list-style: none;
  padding: 80px 20px 20px;
  margin: 0;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.fullscreen-menu.active {
  transform: translateX(0);
}

.fullscreen-menu > li > a {
  font-size: 1.5rem;
  padding: 10px 0;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #eee;
}

.catalogue-item > a {
  font-weight: bold;
}

.catalogue-content {
  /*display: none;*/
  width: 100%;
}

.catalogue-item.active .catalogue-content {
  display: block;
}

/* Animation du bouton burger */
.burger-menu.active .burger-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger-menu.active .burger-bar:nth-child(2) {
  opacity: 0;
}

.burger-menu.active .burger-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Responsive : mobile */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .burger-menu {
    display: flex;
  }
}



/* Hero Banner */
.hero {
    background-image: url('https://picsum.photos/1600/400');
    background-size: cover;
    background-position: center;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text);
}

.hero h1 {
    font-size: 2.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 5px;
}


/* Conteneur principal pour les deux blocs */
.home-featured {
    display: flex;
    flex-wrap: wrap;
    gap: 0rem;
    margin: 2rem 0;
}

/* Chaque bloc largeur (sauf en mobile) */
.structure-news, .featured-products {
    flex: 1 1 calc(30% - 1rem);
    min-width: 300px;
    padding: 1rem;
    box-sizing: border-box;
}
.featured-products {
    flex: 1 1 calc(70% - 1rem);
}

/* News Section */
.structure-news {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 1.5rem;
}
.news-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.news-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Tabs Section */
.featured-products {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 1.5rem;
}
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}
.tab-button {
    flex: 1;
    padding: 0.5rem;
    background: var(--background-color);
    border: none;
    cursor: pointer;
    text-align: center;
}
.tab-button.active {
    background: var(--primary-color);
    color: white;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: grid;
}


/* Responsive : empile les blocs en mobile */
@media (max-width: 768px) {
    .structure-news, .featured-products {
        flex: 1 1 100%;
    }
}


/* Breadcrumb Styles */
.breadcrumb {
    padding: 1rem;
    background-color: var(--background-color);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--text-color);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--secondary-color);
}




/* Product Grid */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
}
.page-home .products {
	padding:0;
}

.product-card {
    background-color: var(--light-text);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	position:relative;
    display: flex;
    flex-direction: column;
}

.product-card a {
   text-decoration:none;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Bandeau "NEW" (inchangé) */
.badge.new {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    background-color: #4CAF50;
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
}

/* Bandeau "Coup de cœur" (cœur en fond rouge) */
.badge.favorite-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background-color: #E91E63; /* Rouge pour le coup de cœur */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Utilisation d'un SVG pour le cœur (plus propre) */
.badge.favorite-icon::before {
    transform: rotate(15deg);
	content: "";
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.146 2.01L8 2.748z'/%3E%3C/svg%3E") no-repeat center;
    background-position: -0px 1px;
	background-size: contain;
}

.product-info {
    padding: 1rem;
	margin-bottom:3.5rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
}

.condition-badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--light-text);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
	float:right;
}

.reserve-btn {
    background-color: var(--accent-color);
    color: var(--light-text);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 3px;
	cursor:pointer;
	margin-left:10px;
	float:right;
}


/* Category Page Styles */
.category-header {
    padding: 2rem;
    text-align: center;
    background-color: var(--background-color);
}

.category-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.category-header p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.category-sort {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 2rem;
    background-color: var(--background-color);
}

.sort-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sort-group label {
    font-weight: 600;
    color: var(--text-color);
}

.sort-group select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: var(--light-text);
    width: 200px;
}

.category-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--background-color);
}

.pagination a {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--light-text);
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}

/* Responsive Design */
@media (max-width: 767px) {
    .category-sort {
        justify-content: center;
    }

    .category-header h1 {
        font-size: 1.5rem;
    }

    .sort-group select {
        width: 100%;
    }
}



/* Sous-catégories */
.subcategories {
    padding: 2rem;
    background-color: var(--background-color);
    text-align: center;
}

.subcategories h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.subcategory-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centre les éléments horizontalement */
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.subcategory-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s;
    width: 150px; /* Largeur fixe pour uniformiser les cartes */
}

.subcategory-card:hover {
    transform: translateY(-5px);
}

.subcategory-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.subcategory-card h3 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 767px) {
    .subcategory-grid {
        gap: 1rem;
    }

    .subcategory-card {
        width: 120px; /* Réduction de la largeur pour mobile */
    }

    .subcategory-card img {
        height: 120px; /* Réduction de la hauteur pour mobile */
    }
}




/* Product Detail Page Styles */
.product-detail {
    display: flex;
    flex-direction: column;
    padding: 1rem; /* Réduction du padding pour mobile */
	padding-top:0;
	gap: 1rem;
}

@media (min-width: 768px) {
    .product-detail {
        flex-direction: row;
        gap: 2rem;
    }
}

.product-gallery {
    flex: 1;
    overflow-x: hidden; /* Évite le scroll horizontal */
	position:relative;
}

.main-image {
    width: 100%;
    max-width: 100%; /* Assure que l'image ne dépasse pas de la largeur de l'écran */
    height: auto;
    border-radius: 5px;
    cursor: pointer;
}

.thumbnail-images {
    display: flex;
    gap: 0.5rem; /* Réduction de l'espacement entre les miniatures */
    margin-top: 1rem;
    overflow-x: auto; /* Permet le scroll horizontal si nécessaire */
    padding-bottom: 0.5rem; /* Espace pour le scroll */
    -webkit-overflow-scrolling: touch; /* Permet un scroll fluide sur iOS */
}

.thumbnail-images img {
    width: 80px; /* Réduction de la taille des miniatures */
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0; /* Empêche les miniatures de rétrécir */
}

.thumbnail-images::-webkit-scrollbar {
    display: none; /* Masque la barre de scroll */
}

.product-info-detail {
    flex: 1;
    padding: 1rem;
}

.product-info-detail h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem; /* Réduction de la taille de la police pour mobile */
    margin-bottom: 0.75rem;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Empêche le scroll */
    background-color: rgba(0, 0, 0, 0.9);
    touch-action: pan-y; /* Permet le scroll vertical uniquement */
}

.lightbox-content {
    max-width: 95%;
    max-height: 80vh;
    margin: auto;
    display: block;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    touch-action: none; /* Désactive le touch-action pour permettre le swipe */
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #f1f1f1;
    font-size: 30px; /* Réduction de la taille pour mobile */
    font-weight: bold;
    cursor: pointer;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 12px; /* Réduction du padding */
    margin-top: -30px;
    color: white;
    font-weight: bold;
    font-size: 24px; /* Réduction de la taille des flèches */
    user-select: none;
}

.next {
    right: 10px;
}

.prev {
    left: 10px;
}


/* Style de base pour tous les écrans (mobile d'abord) */
.form-columns {
    display: flex;
    flex-direction: column; /* Par défaut, les colonnes sont empilées verticalement */
    gap: 15px;
}

.form-column {
    flex: 1;
}

/* Style pour desktop (écrans ≥ 768px) */
@media (min-width: 768px) {
    .form-columns {
        flex-direction: row; /* Passe en 2 colonnes sur desktop */
    }
}

/* Style des boutons (inchangé) */
.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Style de la modale (inchangé) */
.modal {
    display: none;
    position: fixed;
    z-index: 30;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 8px;
    overflow-y: auto;
}
#reservationForm {
	margin-top:10px;
}
/* Autres styles (inchangés) */
.btn-close-modal {
    color: #aaa;
    float: right;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 7px;
    border: none;
    border-radius: 20px;
}

.form-group {
    margin-bottom: 15px;
	min-height:65px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

.btn-reserve, .btn-close-modal {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-reserve {
    background-color: #4CAF50;
    color: white;
}

.suggestions-container {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    max-height: 200px;
    overflow-y: auto;
    width: calc(50% - 12px); /* Correspond à la largeur de la colonne */
    z-index: 1000;
    display: none; /* Masqué par défaut */
}

.suggestions-container div {
    padding: 8px;
    cursor: pointer;
}

.suggestions-container div:hover {
    background-color: #f0f0f0;
}



/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 767px) {
    .main-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav a {
        margin: 0.5rem 0;
        padding: 0.5rem;
    }

    .menu-toggle {
        display: block;
    }
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }
}
