/* Partie 1/4 - structure et carrousel responsive */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  height: auto;
    overflow: auto !important;
}

.container {
  display: flex;
  height: 100%;
  flex-direction: row;
}

.left-panel {
  width: 66.66%;
  overflow-y: auto;
  padding: 1rem;
  padding-top: 60px;
  border-right: 1px solid #ccc;
  background-color: #f8f8f8;
}

.right-panel {
  width: 33.33%;
  overflow-y: auto;
  padding: 1rem;
  background-color: #fff;
  position: relative;
}

/* RESPONSIVE STACK */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .left-panel,
  .right-panel {
    width: 100%;
    height: auto;
    padding: 1rem;
    border-right: none;
  }

  .left-panel {
    padding-top: 80px;
  }
}

.carousel {
  position: relative;
  width: 100%;
}

.carousel-image {
  display: none;
  width: 100%;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
}

.carousel-image.active {
  display: block;
}

.thumbnail {
  width: 60px;
  margin: 5px;
  cursor: pointer;
  border: 2px solid transparent;
}

.thumbnail:hover {
  border-color: blue;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.7);
  border: none;
  cursor: pointer;
  z-index: 2;
  padding: 10px;
}

.carousel-control.left {
  left: 10px;
}

.carousel-control.right {
  right: 10px;
}

.fullscreen-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.fullscreen-modal img {
  max-width: 90%;
  max-height: 90%;
}

.header button,
.communication button {
  font-size: 20px;
  margin: 5px;
}

/* Nouvelle section pour commentaires */
.comments-section {
  margin-top: 2rem;
  padding: 1rem;
  background-color: #f1f1f1;
  min-height: 600px;
  border-top: 1px solid #ccc;
}

/* Fonts */
@font-face {
  font-family: "ubuntu";
  font-style: italic;
  font-weight: 300;
  src: local("Lato Light Italic"), local("Lato-LightItalic"), url(https://fonts.gstatic.com/s/ubuntucondensed/v8/u-4k0rCzjgs5J7oXnJcM_0kACGMtT-Dfqw.woff2) format("woff2");
}

.brand-header {
  text-align: center;
  width: 180px;
  height: 45px;
  padding: 5px 0;
  z-index: 9999;
  background: transparent;
}

.brand-header h1 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  font-family: "Josefin Sans", sans-serif;
  background: linear-gradient(to right, #095fab 10%, #25abe8 50%, #57d75b 60%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textclip 1.5s linear infinite;
}

.brand-header p {
  margin: -5px 0 0 0;
  font-size: 14px;
  font-weight: 900;
  font-family: "Josefin Sans", sans-serif;
  background: linear-gradient(to right, #095fab 10%, #25abe8 50%, #57d75b 60%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textclip 1.5s linear infinite;
}
@keyframes textclip {
  to {
    background-position: 200% center;
  }
}

.brand-link {
  text-decoration: none;
}

/* ========== RESET RAPIDE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

/* ========== ENTÊTE FIXE ========== */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: #F2F2F2;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  clear: both;
}

.top-content {
  display: flex;
  align-items: center;
  gap: 48px;
}

.logo h1 {
  color: #fff;
  font-size: 26px;
}

.top-menu {
  display: flex;
  gap: 28px;
}

.top-menu img {
  width: 26px;
  filter: invert(1);
  cursor: pointer;
}


/* ----- SIDEBAR ----- */
.sidebar {
  width: 200px;
  padding: 20px;
  background-color: #f9f9f9;
  border-right: 1px solid #ddd;
  position: static;
  top: 145;
  left: 0;
  transition: transform 0.3s ease-in-out;
  z-index: 10000;

}

.sidebar ul {
  list-style-type: none;
  padding: 0;
}

.sidebar ul li {
  margin: 15px 0;
}

.sidebar ul li a {
  color: #333;
  text-decoration: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.sidebar ul li a:hover {
  color: #007bff;
}

.search-box {
  display: flex;
  margin-bottom: 16px;
}

.search-box input {
  flex: 1;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
}

.search-box button {
  padding: 6px 12px;
  background: #0f172a;
  color: #fff;
  border: 1px solid #0f172a;
  border-radius: 0 4px 4px 0;
}

.nav-links {
  list-style: none;
  margin-top: 8px;
}

.nav-links li {
  display: flex;
  align-items: center;
  margin: 6px 0;
  font-size: 14px;
  cursor: pointer;
}

.nav-links li img {
  width: 18px;
  margin-right: 8px;
}

/* ----- GRILLE PRODUITS ----- */
.products {
  flex: 1;
  overflow-y: none;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2px;
  margin-left: 0; 
}

.product-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
  /* min-height: 560px; */
}

.product-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.price {
  font-weight: bold;
  color: #1e293b;
}

.title {
  margin: 4px 0;
  font-size: 14px;
}

.promo, .financing {
  font-size: 12px;
  color: #64748b;
}

.actions {
  margin-top: auto;
  display: flex;
  gap: 6px;
}

.actions button,
.actions .btn-secondary {
  flex: 1;
  padding: 6px;
  font-size: 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.actions button {
  background: #059669;
  color: #fff;
}

.actions .btn-secondary {
  text-align: center;
  background: #e2e8f0;
  color: #0f172a;
  text-decoration: none;
}

.actions button:hover {
  background: #047857;
}

.actions .btn-secondary:hover {
  background: #cbd5e1;
}

/* ----- Loader ----- */
#loading {
  margin: 20px 0;
  color: #64748b;
  font-size: 14px;
}

/* ====== RESPONSIVE POUR ÉCRANS ≤768px ====== */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .sidebar {
  
    transform: translateX(-100%);
    width: 80%;
    top: 145;
    left: 0;
    background-color: #fff;
    border-right: 1px solid #ccc;
    z-index: 10000;
  }

  .sidebar.active {
    transform: translateX(0%);
  }

  .products {
    margin-left: 0;
  }

  .top-bar {
    justify-content: space-between;
    padding: 0 1rem;
  }

  .top-menu {
    gap: 16px;
  }

  .burger-icon {
    display: block;
    width: 30px;
    height: 30px;
    background: url('/static/icons/menu.svg') no-repeat center;
    background-size: contain;
    cursor: pointer;
  }
}
/* ===== Styles pour les pièces ===== */

/* grille des pièces */
.pieces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.piece-card {
  border: 1px dashed #60a5fa;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.piece-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.p-info {
  padding: 8px;
  display: flex;
  flex-direction: column;
}

.p-title {
  font-size: 14px;
  margin-bottom: 4px;
}

.p-old {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 13px;
}

.p-price {
  font-weight: bold;
}

.p-promo {
  font-size: 12px;
  color: #16a34a;
}


/* ===== Styles panier ===== */

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 20px;
}

.cart-table th,
.cart-table td {
  border: 1px solid #e5e7eb;
  padding: 8px;
  text-align: center;
}

.cart-table th {
  background: #f3f4f6;
}

.cart-link {
  position: relative;
  display: inline-block;
}

.badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #dc2626;
  color: #fff;
  border-radius: 9999px;
  padding: 2px 6px;
  font-size: 11px;
}

/* ===== Gestion espace client ===== */

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #222;
  color: #fff;
}

.main-header a {
  color: #fff;
  margin-left: 15px;
  text-decoration: none;
}

.logo {
  font-weight: bold;
  font-size: 22px;
}

.page-wrapper {
  padding: 20px;
}

.dashboard {
  display: flex;
  gap: 20px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin: 8px 0;
}

.sidebar a {
  text-decoration: none;
  color: #333;
}

/* ===== Dashboard tableau ===== */

.styled-table {
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.95rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-width: 900px;
  width: 100%;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.styled-table thead tr {
  background-color: #007bff;
  color: #ffffff;
  text-align: left;
}

.styled-table th,
.styled-table td {
  padding: 12px 15px;
  border: 1px solid #dddddd;
  vertical-align: top;
}

.styled-table tbody tr {
  border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
  background-color: #f3f3f3;
}

.styled-table tbody tr:hover {
  background-color: #eaf4ff;
}

/* Lien de téléchargement */
.styled-table a {
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
}

.styled-table a:hover {
  text-decoration: underline;
}

/* ===== Responsive dashboard ===== */
@media screen and (max-width: 1024px) {
  .styled-table {
    font-size: 0.85rem;
    min-width: unset;
  }

  .dashboard-container {
    flex-direction: column;
    margin: 20px;
  }

  .sidebar {
    margin-bottom: 20px;
  }

  .main-content {
    overflow-x: auto;
  }
}

/* ===== Reset box-sizing ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}



/* =================================================================== */
/*  SIDEBAR + RESPONSIVE BURGER                                        */
/* =================================================================== */

/* --- Desktop (≥ 769 px) -------------------------------------------- */
.sidebar {
  
  top: 145;
  left: 0;
  width: 260px;
  background: #f4f4f4;
  padding: 20px;
  border-right: 1px solid #ccc;
  z-index: 1000;
}

.main-container {
  display: flex;
  margin-top:80px; /* hauteur barre top */
  margin-left: 260px; /* espace laissé à la sidebar */
  height: auto;
}
/* ===== Boutons burger et fermeture ===== */
/* Masqués par défaut sur desktop */
.burger-btn,
.close-btn {
  display: none;
}

/* --- Mobile (≤ 768px) --- */
@media (max-width: 768px) {
  .burger-btn {
    display: block;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1100;
    background: #333;
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
  }

  .close-btn {
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 26px;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    background: #fff;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  /* Le contenu principal prend toute la largeur sur mobile */
  .main-container {
    margin-left: 0;
  }
}

/* =================================================================== */
/*  SECTIONS PRODUIT / LAYOUT (inchangés)                              */
/* =================================================================== */

.products {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2px;
  background: #fff;
}

.product-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

}

.info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.price {
  font-weight: bold;
  color: #1e293b;
}

.title {
  margin: 4px 0;
  font-size: 14px;
}

.promo,
.financing {
  font-size: 12px;
  color: #64748b;
}

.actions {
  margin-top: auto;
  display: flex;
  gap: 6px;
}

.actions button,
.actions .btn-secondary {
  flex: 1;
  padding: 6px;
  font-size: 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.actions button {
  background: #059669;
  color: #fff;
}

.actions .btn-secondary {
  text-align: center;
  background: #e2e8f0;
  color: #0f172a;
  text-decoration: none;
}

.actions button:hover {
  background: #047857;
}

.actions .btn-secondary:hover {
  background: #cbd5e1;
}

/** Menu Dashboard **/

/* --- Menu horizontal du dashboard --- */
.dashboard-nav {
  background-color: #0f75bc;
  border-bottom: 1px solid #ddd;
  padding: 10px 20px;
  margin-top: 60px;
}

.dashboard-nav ul {
  display: flex;
  justify-content: center;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.dashboard-nav li a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.dashboard-nav li a:hover {
  background-color: #e0e0e0;
}

/* --- Container principal --- */
.dashboard-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* --- Table d'achats --- */
.purchases-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.purchases-table th,
.purchases-table td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: left;
}

.purchases-table th {
  background-color: #f0f0f0;
}

/* ===== Animations Tailwind CSS personnalisées ===== */

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer utilities {
  .animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out both;
  }
  .animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
  }

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

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box;
  padding: 20px;
  margin-bottom:-40px;
}

.product-card {
  border-radius: 6px;
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);
  padding: 10px;
  display: flex;
  flex-direction: column;
  min-height: 460px; 
  box-sizing: border-box;
}

/* ===== PAGINATION MODERNE ===== */
.pagination {
  display: flex;
  justify-content: center;
  margin: 32px 0 16px 0;
}

.pagination ul {
  display: flex;
  list-style: none;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.pagination li {
  display: inline;
}

.pagination a,
.pagination span {
  display: inline-block;
  min-width: 36px;
  padding: 8px 14px;
  border-radius: 22px;
  border: none;
  background: #f3f4f6;
  color: #1e293b;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  font-size: 15px;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  user-select: none;
}

.pagination a:hover,
.pagination li:not(.active):not(.disabled) a:hover {
  background: #0369a1;
  color: #fff;
}

.pagination .active span,
.pagination li.active span {
  background: #0ea5e9;
  color: #fff;
  cursor: default;
  font-weight: 700;
}

.pagination .disabled span,
.pagination li.disabled span {
  background: #e5e7eb;
  color: #a1a1aa;
  cursor: not-allowed;
}
.pagination {
  width: 100vw;
  max-width: 100%;
  position: relative;
  left: 0;
  right: 0;
  bottom: 0;
  background: none;
  margin-left: 0 !important;
}
.pagination ul {
  justify-content: center;
}
.pagination {
  display: flex;
  justify-content: center;
  margin: 32px 0 16px 0;
  width: 100vw;
  max-width: 100%;
  position: relative;
  left: 0;
  right: 0;
  bottom: 0;
  background: none;
}
.pagination ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.pagination li {
  display: inline;
}
.pagination a,
.pagination span {
  display: inline-block;
  min-width: 36px;
  padding: 8px 14px;
  border-radius: 22px;
  border: none;
  background: #f3f4f6;
  color: #1e293b;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  font-size: 15px;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  user-select: none;
}
.pagination a:hover,
.pagination li:not(.active):not(.disabled) a:hover {
  background: #0369a1;
  color: #fff;
}
.pagination .active span,
.pagination li.active span {
  background: #0ea5e9;
  color: #fff;
  cursor: default;
  font-weight: 700;
}
.pagination .disabled span,
.pagination li.disabled span {
  background: #e5e7eb;
  color: #a1a1aa;
  cursor: not-allowed;
}

/* --- Correction items cachés (layout grille produits) --- */
.main-container > section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.products {
    margin-left: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden;
}
@media (max-width: 900px) {
    .products {
        margin-left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        box-sizing: border-box;
    }
}
/* --------- Prix & sidebar --------- */
.price-filter-block {
    background: #f5f7fa;
    border-radius: 13px;
    margin: 17px 0 28px 0;
    padding: 18px 16px 13px 16px;
    box-shadow: 0 2px 12px rgba(40,60,100,0.06);
}
.price-filter-block h3 {
    font-size: 1.16em;
    color: #3571a5;
    margin-bottom: 8px;
    font-weight: 700;
}
.price-filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 7px;
}
.price-filter-row input[type="number"] {
    width: 72px;
    padding: 3px 7px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #cad9e9;
    background: #fff;
}
.price-filter-row button,
.price-range-row button {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 5px 10px;
    margin: 0 2px;
    border-radius: 5px;
    font-size: 0.96em;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.16s;
}
.price-filter-row button:hover,
.price-range-row button.selected,
.price-range-row button:hover {
    background: #0f75bc;
}
.price-range-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.price-range-row button {
    background: #e5e9f4;
    color: #355177;
    border: 1px solid #b7cbe7;
    font-weight: 500;
    transition: background 0.16s, color 0.16s;
}
.price-range-row button.selected {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
@media (max-width: 900px) {
    .price-filter-block { padding: 13px 8px 8px 8px; }
    .price-filter-row { gap: 6px; }
    .price-range-row { gap: 3px; }
}

.old-price {
    text-decoration: line-through;
    color: #9ca3af;
    margin-right: 6px;
    font-size: 0.9em;
}

.current-price {
    font-weight: bold;
    color: #1e293b;
}


/* Structure scroll unique */
.main-container {
    display: flex;
    flex-direction: row;
    margin-top: 0;  /* hauteur top-bar si présente */
    margin-left: 0;
    height: auto;
    width: 101%;
}

/* Sidebar dans le flux */
.sidebar {
    width: 100%;
    max-width: 340px;
    background: #f4f4f4;
    padding: 20px;
    border-right: 1px solid #ccc;
    margin-bottom: 30px;
    position: static;
}

/* Footer pagination toujours visible */
#bottom-footer {
    margin-top: 40px;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
}


/* Responsive : sidebar en haut, largeur totale */
@media (max-width: 900px) {
    .sidebar {
        max-width: 100vw;
        width: 100vw;
        border-right: none;
    }
}


/* ===== Styles pour notifications toast ===== */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.hide {
    opacity: 0;
    transform: translateY(20px);
}
/* Toast notifications stylées modernes */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 11000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none; /* Evite d’intercepter les clics sauf sur les toasts */
  max-width: 320px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.toast {
  background-color: #059669; /* Vert doux */
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  opacity: 0;
  transform: translateX(100%);
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: default;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.hide {
  opacity: 0;
  transform: translateX(100%);
}

.toast .close-btn {
  margin-left: 15px;
  background: transparent;
  border: none;
  color: #e0e0e0;
  font-size: 18px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  transition: color 0.2s;
}

.toast .close-btn:hover {
  color: #fff;
}


#bid-list {
margin-top: 10px;
max-height: 200px;
overflow-y: auto;
border: 1px solid #ccc;
padding: 5px;
}
#bid-list li {
padding: 3px 0;
border-bottom: 1px solid #eee;
}
#bid-form {
margin-top: 20px;
}
#bid-form input[type=number] {
width: 150px;
padding: 5px;
margin-right: 10px;
}
#bid-form button {
padding: 6px 12px;
background-color: #059669;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
#bid-form button:hover {
background-color: #047857;
}


/* ===== Pagination propre, centrée, sans puces ===== */
.pagination-container {
  text-align: center;
  margin: 32px 0 16px 0;
}

.pagination-list {
  list-style: none;  /* Supprime les puces */
  padding: 0;
  margin: 0 auto;
  display: inline-flex;  /* Alignement horizontal */
  gap: 8px;
  font-family: Arial, sans-serif;
}

.pagination-list li {
  display: inline;
}

.pagination-list li a,
.pagination-list li span {
  display: inline-block;
  min-width: 36px;
  padding: 8px 14px;
  border-radius: 22px;
  border: 1px solid #2563eb;
  background: #f3f4f6;
  color: #1e293b;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  user-select: none;
  transition: background 0.15s, color 0.15s;
}

.pagination-list li a:hover:not(.disabled) {
  background-color: #2563eb;
  color: white;
}

.pagination-list li.active span {
  background-color: #2563eb;
  color: white;
  cursor: default;
  font-weight: 700;
}

.pagination-list li.disabled span {
  background: #e5e7eb;
  color: #a1a1aa;
  cursor: not-allowed;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
}

.main-container {
  margin-left: 0 !important;
  width: 100% !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed !important;
    top: 145;
    left: 0;
    width: 80vw !important;
    max-width: 320px !important;
    height: 100vh !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease-in-out !important;
    z-index: 1100 !important;
    background: #fff !important;
    overflow-y: auto !important;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
  }

  .sidebar.active {
    transform: translateX(0) !important;
  }

  .burger-btn {
    display: block !important;
    position: fixed !important;
    top: 15px !important;
    left: 15px !important;
    z-index: 1200 !important;
  }

  .main-container > section {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .products {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    padding: 10px !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }
}

.product-card {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.products, .product-card, .sidebar, .main-container {
  box-sizing: border-box !important;
}
/* Desktop layout fixe */
@media (min-width: 769px) {
  .sidebar {
    position: fixed !important;
    top: 145px; /* hauteur de la top-bar */
    left: 0;
    width: 260px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    background: #f4f4f4;
    border-right: 1px solid #ccc;
    margin-bottom: 0;
    z-index: 1000;
  }
  .main-container {
    margin-left: 260px !important;
    display: flex !important;
    flex-direction: row !important;
    height: auto;
    width: auto;
  }
  .main-container > section {
    flex: 1;
    margin-left: 0 !important;
  }
  /* Burger masqué sur desktop */
  .burger-btn {
    display: none !important;
  }
}

/* Mobile layout */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column !important;
    margin-left: 0 !important;
    width: 100% !important;
  }
  .sidebar {
    position: fixed !important;
    top: 145px; /* hauteur top-bar */
    left: 0;
    width: 80vw !important;
    max-width: 320px !important;
    height: calc(100vh - 60px);
    background: #fff !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease-in-out !important;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    z-index: 1100 !important;
    overflow-y: auto !important;
  }
  .sidebar.active {
    transform: translateX(0) !important;
  }
  .main-container > section {
    width: 100% !important;
    margin: 0 !important;
  }
  /* Burger visible et bien positionné */
  .burger-btn {
    display: block !important;
    position: fixed !important;
    top: 15px !important;
    left: 190px !important; /* juste à droite du logo */
    z-index: 1200 !important;
    background: #333;
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
  }
}

/* Position logo */
.brand-header {
   width: 180px;
  height: 60px;
  z-index: 1300;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

/* Ajuster le top-bar pour laisser de la place */
.top-bar {
  height: 60px;
  line-height: 60px;
  padding-left: 180px; /* décaler contenu à droite du logo */
  display: flex;
  align-items: center;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #f2f2f2;
  z-index: 1200;
}
/* Desktop : sidebar fixe */
@media (min-width: 769px) {
  .sidebar {
    position: fixed !important;
    top: 145px; /* hauteur top-bar */
    left: 0;
    width: 260px;
    height: calc(100vh - 60px);
    background: #f4f4f4 !important;
    border-right: 1px solid #ccc !important;
    overflow-y: auto !important;
    margin-bottom: 0 !important;
    z-index: 1000 !important;
    transform: none !important;
  }
  .main-container {
    margin-left: 260px !important;
    display: flex !important;
    flex-direction: row !important;
  }
  .main-container > section {
    flex: 1;
    margin-left: 0 !important;
  }
  .burger-btn {
    display: none !important;
  }
}

/* Mobile : sidebar cachée, menu burger visible */
@media (max-width: 768px) {
  .sidebar {
    position: fixed !important;
    top: 145px;
    left: 0;
    width: 80vw !important;
    max-width: 320px !important;
    height: calc(100vh - 60px);
    background: #fff !important;
    border-right: 1px solid #ccc !important;
    overflow-y: auto !important;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease-in-out !important;
    z-index: 1100 !important;
  }
  .sidebar.active {
    transform: translateX(0) !important;
  }
  .main-container {
    margin-left: 0 !important;
    flex-direction: column !important;
  }
  .main-container > section {
    width: 100% !important;
    margin: 0 !important;
  }
  .burger-btn {
    display: block !important;
    position: fixed !important;
    top: 15px !important;
    left: 10px !important; /* harmonisé avec JS */
    z-index: 1200 !important;
    background: #333;
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
  }
  .close-btn {
    display: block !important;
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    font-size: 26px !important;
    background: none !important;
    border: none !important;
    color: #333 !important;
    cursor: pointer !important;
    z-index: 1150 !important;
  }
}

/* Correction affichage recherche visible */
.search-box {
  display: flex !important;
  margin-bottom: 16px !important;
}

/* Eviter double affichage logo */
.brand-header h1 {
  color: transparent !important; /* cacher la version en style.css */
}


/* ----- GRILLE PRODUITS ----- */
.services {
  flex: 1;
  overflow-y: none;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2px;
  background: #fff;
  margin-left: 0; 
}

.services-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
 
}

.services-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

/* Forcer l'entête à prendre toute la largeur 
.header-container, .header-main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    border: solid red 1px;
    box-sizing: border-box !important;
    
}
*/
.header-row {
    display: flex;
    justify-content: space-between; /* ou space-around/center selon tes besoins */
    align-items: center;
    padding: 0.75rem 0;
    

}

/* Zone entête desktop : logo, recherche, panier sur une seule ligne */
.header-row.header-brand-search {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1rem;
}

/* Logo PPP */
.brand-header {
    flex: 0 0 auto;
    margin-right: 1rem;
}

/* Formulaire recherche max 60% */
.header-search-form {
    flex: 1 1 60%;
    max-width: 60%;
    margin: 0 1rem;
}

/* Panier à droite */
.cart-link {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}
/* Aligner logo, recherche et panier sur une ligne */
.header-row.header-brand-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}

/* Logo PPP */
.brand-header {
    flex: 0 0 auto;
    margin-right: 1rem;
}

/* Barre de recherche max 60% */
.header-search-form {
    flex: 1 1 60%;
    max-width: 60%;
    margin: 0 1rem;
    display: flex;
}

/* Panier */
.cart-link {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

/* Conteneur du carrousel */
.carousel {
  position: relative;
  width: 100%;
  max-width: 900px; /* ou la largeur souhaitée */
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}

/* Images du carrousel : même taille fixe, centrées, pas de décalage */
.carousel img.carousel-image {
  flex: 0 0 100%; /* une image visible à la fois, largeur 100% du carrousel */
  height: 80%;  /* hauteur fixe max (ajustable) */
  object-fit: contain; /* conserve proportions, pas de découpe */
  cursor: pointer;
  user-select: none;
  transition: opacity 0.3s ease;
  display: none; /* masquées par défaut */
}

/* Image active visible */
.carousel img.carousel-image.active {
  display: block;
}

/* Boutons de contrôle du carrousel */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(15, 157, 88, 0.7);
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 0.3rem 0.8rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  user-select: none;
  transition: background-color 0.3s ease;
}

.carousel-control:hover,
.carousel-control:focus {
  background-color: #0f9d58;
  outline: none;
}

.carousel-control.left {
  left: 10px;
}

.carousel-control.right {
  right: 10px;
}

/* Miniatures sous le carrousel */
.thumbnails {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.thumbnails img.thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: opacity 0.3s ease, border-color 0.3s ease;
}

.thumbnails img.thumbnail:hover,
.thumbnails img.thumbnail:focus,
.thumbnails img.thumbnail.active {
  opacity: 1;
  border-color: #0f9d58;
  outline: none;
}

/* Responsive : sur petits écrans, on limite la taille */
@media (max-width: 600px) {
  .carousel {
    max-width: 100%;
  }
  .carousel img.carousel-image {
    max-height: 250px;
  }
  .thumbnails img.thumbnail {
    width: 40px;
    height: 40px;
  }
}

.products .product-card {
  position: relative;
  /* ... autres styles ... */
}

.products .favorite-form {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
  margin: 0;
}

.products .favorite-form button.btn-favorite {
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 50%;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.4rem;
  color: #0f9d58;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background-color 0.3s ease;
}

.products .favorite-form button.btn-favorite:hover {
  background: #0f9d58;
  color: white;
}
.container {
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}


/* --- En-tête principal prend toute la largeur du container --- */
.header-main {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  background: #fff;        /* Conserve le fond blanc */
  box-shadow: 0 2px 12px #e6f3ff33;  /* Conserve l’ombre */
  border-bottom: 1px solid #e4ecfa;  /* Ligne de séparation */
  padding: 0;
  z-index: 20000;
  
}

/* --- Ligne(s) interne(s) de l’en-tête en flexbox --- */
.header-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;  /* Alignement habituel */
  gap: 0.8rem;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 8px 0;
  box-sizing: border-box;
}

/* Responsivité du container en petit écran */
@media (max-width: 768px) {
  .header-container {
    max-width: 95vw;
    padding: 0 0.5rem;
  }

  .header-row {
    justify-content: center; /* Centre les éléments si besoin */
    flex-wrap: wrap;
  }
}

/* Footer  */

/* Pied de page */
.footer {
  background: linear-gradient(135deg, #0f9d58, #2563eb, #38ef7d);
  color: white;
  padding: 40px 20px;
  font-family: 'Roboto', sans-serif;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}

/* Chaque volet */
.footer-pane {
  flex: 1 1 220px;
  min-width: 220px;
}

.footer-pane h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(255,255,255,0.6);
  padding-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Listes stylées */
.footer-pane ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-pane ul li {
  margin-bottom: 0.8rem;
}

.footer-pane ul li a {
  color: #d0f0e4;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-pane ul li a:hover,
.footer-pane ul li a:focus {
  color: #ffffff;
  text-decoration: underline;
}

/* Adresse */
.footer-pane.address address {
  font-style: normal;
  line-height: 1.6;
  color: #e0f7f1;
}

.footer-pane.address a {
  color: #b3f0d3;
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s ease;
}

.footer-pane.address a:hover,
.footer-pane.address a:focus {
  color: #ffffff;
  text-decoration: underline;
}

/* Table des heures */
.footer-pane.hours table {
  width: 100%;
  border-collapse: collapse;
  color: #d4f5e9;
}

.footer-pane.hours td {
  padding: 6px 0;
  font-weight: 500;
}

.footer-pane.hours td:first-child {
  opacity: 0.8;
}

/* Réseaux sociaux */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-links li a {
  font-weight: 600;
  color: #b3f0d3;
  position: relative;
  padding-left: 24px;
  transition: color 0.3s ease;
}

/* Icônes simples avec emojis (vous pouvez remplacer par SVG ou font icons) */
.social-links li a::before {
  content: attr(aria-label);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1;
  color: #fff;
  user-select: none;
  /* Vous pouvez remplacer par des icônes font-awesome ou SVG */
}

/* Responsive */
@media (max-width: 900px) {
  .footer-container {
    flex-direction: column;
    gap: 30px;
  }
}
