/* ======================================================
   GLOBAL CONTAINER
====================================================== */

.equipment-archive.container,
.equipment-single.container,
.equipment-breadcrumb-wrapper {
  max-width: 1200px;
  padding: 0 2rem;
  margin: 0 auto;
}

/* ======================================================
   BREADCRUMB
====================================================== */

.equipment-breadcrumb {
  margin: 1.5rem 0 2rem;
  font-size: 0.9rem;
}

.equipment-breadcrumb a {
  color: #555;
  text-decoration: none;
}

.equipment-breadcrumb a:hover {
  text-decoration: underline;
}

.equipment-breadcrumb span {
  font-weight: 500;
  color: #000;
}

.equipment-breadcrumb .sep {
  margin: 0 0.4rem;
  color: #999;
}

/* ======================================================
   CATEGORY GRID (HOME)
====================================================== */

.equipment-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.equipment-category-card {
  background: #fff;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  text-align: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.equipment-category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.category-icon {
  font-size: 3rem;
  padding: 2.5rem 1rem 1.5rem;
}

.equipment-category-card h2 {
  font-size: 1rem;
  padding: 1rem;
  margin: 0;
}

/* ======================================================
   MAIN LAYOUT (ARCHIVE)
====================================================== */

.equipment-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* ======================================================
   SIDEBAR
====================================================== */

.equipment-sidebar {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  position: sticky;
  top: 120px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.equipment-sidebar h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

/* Sidebar scrollbar */
.equipment-sidebar::-webkit-scrollbar {
  width: 6px;
}

.equipment-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
}

/* ======================================================
   CATEGORY LIST (SIDEBAR)
====================================================== */

.equipment-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.equipment-category-list li {
  margin-bottom: 0.4rem;
}

.equipment-category-list a {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #333;
  text-decoration: none;
  transition: background 0.2s ease;
}

.equipment-category-list a:hover {
  background: #f5f5f5;
}

.equipment-category-list li.active a {
  background: #000;
  color: #fff;
  font-weight: 500;
}

.equipment-category-list .count {
  float: right;
  background: #eee;
  color: #555;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 10px;
}

/* ======================================================
   LOCATION FILTER
====================================================== */

.equipment-location-filter {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}

.disabled-location,
.disabled-category {
  opacity: 0.4;
  pointer-events: none;
}

/* ======================================================
   SEARCH BAR
====================================================== */

.search-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-wrapper input {
  width: 100%;
  padding: 0.6rem 2rem 0.6rem 0.6rem;
}

.clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 16px;
  cursor: pointer;
}

/* ======================================================
   EQUIPMENT GRID
====================================================== */

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
}

/* ======================================================
   EQUIPMENT CARD
====================================================== */

.equipment-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.equipment-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.equipment-card-link:hover {
  text-decoration: none;
}

.equipment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

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

.equipment-card-text {
  padding: 0.9rem;
}

.equipment-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.equipment-brand {
  margin: 0 0 0.15rem;
  font-size: 0.9rem;
  color: #555;
}

.equipment-model {
  margin: 0;
  font-size: 0.85rem;
  color: #777;
}

/* ===============================
   EQUIPMENT – REMOVE LINK UNDERLINE
================================ */

/* Category cards */
.equipment-category-card,
.equipment-category-card:hover {
  border-bottom: none !important;
}

/* Equipment cards */
.equipment-card-link,
.equipment-card-link:hover {
  border-bottom: none !important;
}

/* ======================================================
   PAGINATION
====================================================== */

.ajax-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.ajax-pagination a {
  padding: 6px 10px;
  border-radius: 6px;
  background: #f2f2f2;
  color: #333;
  text-decoration: none;
}

.ajax-pagination a:hover {
  background: #ddd;
}

.ajax-pagination a.active {
  background: #000;
  color: #fff;
  font-weight: 600;
  pointer-events: none;
}

/* ======================================================
   SINGLE EQUIPMENT
====================================================== */

.equipment-single .equipment-layout {
  grid-template-columns: 1.4fr 0.9fr;
  gap: 3rem;
}

.equipment-single .equipment-media {
  display: flex;
  justify-content: flex-end;
}

.equipment-image {
  max-width: 420px;
  width: 100%;
  height: auto;
}

/* ======================================================
   SINGLE EQUIPMENT – REMARKS (COLLAPSIBLE)
====================================================== */

.equipment-single .equipment-remarks {
  margin-top: 1.2rem;
}

.equipment-single .equipment-remarks > p {
  margin-bottom: 0.4rem;
  font-weight: 500;
}

/* Conteneur repliable */
.equipment-single .remarks-content {
  line-height: 1.6;
  color: #444;

  /* état replié */
  max-height: 6.4em; /* ~4 lignes */
  overflow: hidden;

  /* fade du texte */
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0,0,0,1) 65%,
    rgba(0,0,0,0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0,0,0,1) 65%,
    rgba(0,0,0,0) 100%
  );

  transition:
    max-height 0.35s ease,
    -webkit-mask-image 0.25s ease,
    mask-image 0.25s ease;
}

/* état ouvert : texte normal */
.equipment-single .remarks-content.is-open {
  max-height: 1000px;

  -webkit-mask-image: none;
  mask-image: none;
}

/* Liste (cohérente avec technical_specs) */
.equipment-single .remarks-content ul {
  margin: 0 0 0 1.2rem;
  padding: 0;
}

.equipment-single .remarks-content li {
  margin-bottom: 0.4rem;
}

/* Bouton */
.equipment-single .remarks-toggle {
  margin-top: 0.4rem;
  display: inline-block;
}



/* ======================================================
   SKELETON LOADER
====================================================== */

.equipment-card.skeleton {
  pointer-events: none;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #e5e7eb;
  border-radius: 8px;
  margin-bottom: 12px;
}

.skeleton-text.line {
  height: 12px;
  background: #e5e7eb;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text.short {
  width: 60%;
}

@keyframes skeleton-pulse {
  0% { opacity: 1; }
  50% { opacity: 0.45; }
  100% { opacity: 1; }
}

/* ======================================================
   MOBILE
====================================================== */

@media (max-width: 1024px) {

  .equipment-layout {
    grid-template-columns: 1fr;
  }

  .equipment-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .equipment-single .equipment-layout {
    grid-template-columns: 1fr;
  }

  .equipment-single .equipment-media {
    justify-content: center;
  }
}


/* ===============================
   EQUIPMENT HEADER
================================ */

.equipment-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.equipment-menu-toggle {
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
}

/* ===============================
   EQUIPMENT MEGA MENU
================================ */

.equipment-menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  border-radius: 8px;
  margin-top: 0.5rem;
  z-index: 200;
}

.equipment-menu-panel.open {
  display: flex;
}


.equipment-menu-column {
  min-width: 220px;
  padding: 0.75rem;
  border-right: 1px solid #eee;
}

.equipment-menu-column:last-child {
  border-right: none;
}

.menu-item {
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.menu-item:hover {
  background: #f5f5f5;
}

.menu-item.has-children::after {
  content: "›";
  float: right;
  opacity: 0.5;
}

/* ===============================
   MEGA MENU PANELS
================================ */

.equipment-menu-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  z-index: 200;
}

.equipment-menu-panel.open {
  display: flex;
}

.equipment-menu-column {
  min-width: 220px;
  padding: 0.75rem;
  border-right: 1px solid #eee;
}

.equipment-menu-column:last-child {
  border-right: none;
}

.equipment-menu-column.level-2,
.equipment-menu-column.level-3 {
  display: none;
}

.menu-item {
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.menu-item:hover {
  background: #f5f5f5;
}

