/* Catalogue de portes — tablette en paysage */

html, body { height: 100%; overflow: hidden; }
.cat { height: 100%; }

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 300px;
  height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--frb-bg);
  color: var(--frb-text-light);
}
.search svg { width: 22px; height: 22px; flex: none; }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 18px;
  color: var(--frb-text);
  -webkit-user-select: text;
  user-select: text;
}
.search:focus-within { box-shadow: inset 0 0 0 2px var(--frb-orange); }

/* ---------- Mise en page ---------- */
.layout { flex: 1; min-height: 0; display: flex; }

/* ---------- Filtres ---------- */
.filters {
  flex: 0 0 280px;
  overflow-y: auto;
  padding: 20px 20px 28px 24px;
  background: #fff;
  border-right: 1px solid var(--frb-gray-light);
}
.fgroup + .fgroup { margin-top: 22px; }
.fgroup h3 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--frb-orange-border);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .coll {
  font: inherit;
  border: 0;
  cursor: pointer;
  color: var(--frb-text);
}
.chip {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--frb-bg);
  font-size: 17px;
  font-weight: 600;
}
.chip[aria-pressed="true"] { background: var(--frb-orange); color: #fff; }

.collections { display: flex; flex-direction: column; gap: 4px; }
.coll {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  background: transparent;
  font-size: 18px;
  text-align: left;
}
.coll .n { font-size: 15px; color: var(--frb-text-light); }
.coll[aria-pressed="true"] { background: #FDF1E3; font-weight: 700; box-shadow: inset 4px 0 0 var(--frb-orange); }
.coll:disabled { opacity: .35; }

/* Style / Vitrage sans effet quand une option (ex. Fer forgé) est affichée */
.fgroup.inactive { opacity: .35; pointer-events: none; }

/* ---------- Résultats ---------- */
.results {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 18px 28px 40px;
  -webkit-overflow-scrolling: touch;
}
.results-head {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 46px;
  margin-bottom: 4px;
  font-size: 17px;
  color: var(--frb-text-light);
}
.reset {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #FDF1E3;
  color: var(--frb-orange-dark);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.section + .section { margin-top: 30px; }
.section h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 8px 0 14px;
  font-size: 26px;
}
.section h2 small { font-size: 16px; font-weight: 400; color: var(--frb-text-light); }
.section .note { margin: -6px 0 14px; font-size: 17px; color: var(--frb-text-light); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.06);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .12s ease;
}
.card:active { transform: scale(.97); }
.card .img {
  aspect-ratio: 5 / 9;
  padding: 14px 14px 6px;
  background: linear-gradient(#fff, #F1EFEC);
}
.card img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; display: block; }
.card .txt { padding: 10px 14px 12px; border-top: 3px solid var(--frb-orange); }
.card .name { font-size: 18px; font-weight: 700; line-height: 1.2; }
.card .code { margin-top: 2px; font-size: 14px; color: var(--frb-text-light); }
.card .cam {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--frb-orange);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.card .cam svg { width: 19px; height: 19px; }

.empty { padding: 80px 20px; text-align: center; font-size: 20px; color: var(--frb-text-light); }
.empty .reset { margin-top: 16px; }

/* ---------- Fiche détaillée ---------- */
.detail {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--frb-bg);
  animation: fade .18s ease;
}
.detail[hidden], .lightbox[hidden] { display: none; }

.detail-close { top: 18px; right: 20px; }

.detail-body {
  display: flex;
  height: 100%;
  padding: 28px 104px;
  gap: 40px;
}
.detail-door {
  flex: 0 0 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: var(--radius);
  background: linear-gradient(#fff, #EEECE8);
}
.detail-door img { max-width: 100%; max-height: 100%; object-fit: contain; }

.detail-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-top: 6px;
}
.kicker {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--frb-orange-border);
}
.detail-info h2 { margin: 4px 0 2px; font-size: 44px; line-height: 1.05; }
.detail-info .code { font-size: 19px; color: var(--frb-text-light); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag {
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--frb-gray-light);
}

.situ { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 22px; }
.situ-main {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #222;
  cursor: zoom-in;
}
.situ-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.situ-main .zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.situ-main .zoom svg { width: 18px; height: 18px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; flex: none; }
.thumb {
  flex: none;
  width: 92px;
  height: 70px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #ddd;
  cursor: pointer;
  opacity: .6;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 3px var(--frb-orange); }

.pos { margin-top: 14px; font-size: 15px; color: var(--frb-text-light); }

/* ---------- Photo en plein écran ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #111;
  animation: fade .18s ease;
}
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lb-close { top: 18px; right: 20px; }
.lb-count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 16px;
}

/* Écrans paysage plus étroits (ex. 1024 px) */
@media (max-width: 1100px) {
  .filters { flex-basis: 240px; }
  .search { width: 230px; }
  .detail-body { padding: 24px 92px; gap: 28px; }
  .detail-info h2 { font-size: 36px; }
}
