@font-face {
  font-family: Gothic;
  src: url(assets/fonts/GOTHIC.TTF); /* url of the font */
}

body {
  background-color: white;
  font-family: Gothic;
  margin: 0;
  padding: 0;
}

#header-block {
  position: relative;
  width: 100%;
  min-height: 100vh;
  color: black;
  /* Use flex to stack heading and paragraph and keep them at the bottom */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 30px;
  box-sizing: border-box;
  background-size: cover;
  background-position: 50% 75%;
  background-repeat: no-repeat;
}
#header-video,
.header-video-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#header-video {
  object-fit: cover;
  object-position: 50% 75%;
  z-index: 0;
}
.header-video-overlay {
  background-size: cover;
  background-position: 50% 75%;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
}
#header-block h1 {
  position: absolute;
  color: black;
  top: 0px;
  left: 0px;
  font-size: 60px;
  margin: 0px;
  padding: 10px;
  width: calc(100% - 20px);
  z-index: 2;
  border-radius: 0px 0px 30px 0px;
  background-color: rgba(255, 255, 255, 0.537);
}
#header-block h2 {
  font-size: 90px;
  margin: 0;
  line-height: 1;
  max-width: calc(100% - 60px);
  z-index: 2;
}
#header-block h3 {
  position: absolute;
  font-size: 42px;
  margin: 0;
  padding: 0px;
  max-width: calc(100% - 90px);
  border-radius: 0px 30px 0px 30px;
  z-index: 2;
}
#header-block p {
  font-size: 25px;
  font-weight: bold;
  text-align: justify;
  line-height: 1.3;
  margin: 0;
  padding-left: 5px;
  color: black;
  max-width: 100%;
  word-break: break-word;
  z-index: 2;
}

#path {
  padding: 15px 30px;
  color: black;
  font-size: 22px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

#path p {
  margin: 0;
  padding: 0;
  font-size: inherit;
}

#path .path-elmt {
  color: #555;
  text-decoration: underline;
  width: fit-content;
}
#path .path-elmt:hover {
  color: black;
  text-decoration: none;
  cursor: pointer;
}
#path .path-elmt:active {
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
}

#page-content {
  position: relative;
  width: calc(100%);
  padding: 30px;
  color: black;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  box-sizing: border-box;
  background-size: contain;
  background-position: bottom center;
  background-repeat: no-repeat;
}

/*
background test color list :
- 44, 25, 23
- 54, 46, 50
- #301d1d
- 46, 33, 33
- #704b46
*/

/*  Home  */
#list-container {
  width: 100%;
}
#gamme-list {
  position: center;
  display: grid;
  gap: 15px;
  width: calc(100%);
}
.gamme {
  background-size: cover;
  background-position: bottom;
  background-repeat: no-repeat;
  border-radius: 0px;
  display: flex;
  width: 100%;
  aspect-ratio: 4 / 1;
  /* Fallback for browsers that do not support aspect-ratio */
  height: 0;
  padding-bottom: 25%;
  position: relative;
  background-position: center;
  border-radius: 30px 0px 30px 0px;
  cursor: pointer;
}
.gamme p {
  position: absolute;
  left: 0;
  bottom: -26px;
  padding: 8px;
  color: white;
  border-top: 4px solid white;
  font-size: 26px;
  font-weight: bold;
  height: 30px;
  border-radius: 0px 0px 30px 0px;
  background-color: #ffb9b066;
  width: calc(100% - 16px);
  z-index: 5;
}
.gamme:hover p {
  background-color: #000000cc
}
.gamme:active p {
  background-color: #ffb9b0
}

/*  Gamme  */
#grid-container {
  width: calc(100%);
}
#product-grid {
  position: center;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  width: calc(100%);
  margin: 0px;
}
#product-grid .product {
  background-color: #252525;
  background-size: cover;
  background-position: bottom;
  background-repeat: no-repeat;
  border-radius: 0px;
  display: flex;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 30px 0px 30px 0px;
  /* Fallback for browsers that do not support aspect-ratio */
  height: 0;
  padding-bottom: 100%;
  position: relative;
  cursor: pointer;
}
#product-grid .product p {
  position: absolute;
  left: 0;
  bottom: -22px;
  padding: 8px;
  color: white;
  border-top: 4px solid white;
  font-size: 22px;
  font-weight: bold;
  height: 30px;
  border-radius: 0px 0px 30px 0px;
  background-color: #ffb9b066;
  width: calc(100% - 16px);
  z-index: 5;
}
#product-grid .product:hover p {
  background-color: #000000cc
}
#product-grid .product:active p {
  background-color: #ffb9b0
}

#configuration-container {
  background-color: white;
  width: calc(100%);
  display: flex;
  gap: 15px;
  align-items: stretch;
}
#configuration-container #viewer {
  position: relative;
  width: calc(55%);
  min-height: 0;
  box-sizing: border-box;
  border: 3px solid #ffb9b0;
  background-color: #ffb9b082;
  overflow: hidden;
  border-radius: 30px 0px 30px 0px;
  flex-shrink: 0;
}
#configuration-container #viewer > canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#configuration-container #viewer > :not(canvas) {
  z-index: 1;
}
#configuration-container #viewer #OC-but {
  position: absolute;
  top: 16px;
  left: 16px;
  height: 60px;
  width: 160px;
  display: flex;
  align-items: center;
  background-color: #ffb9b066;
  background-image: url(assets/image/open_icon.webp);
  background-size: 40px;
  background-position: 10px center;
  background-repeat: no-repeat;
  border-radius: 25px 0px 25px 0px;
  cursor: pointer;
  user-select: none;
  transition: background-image 0.5s;
}
#configuration-container #viewer #OC-but:hover {
  background-color: #ffb9b0e0;
}
#configuration-container #viewer #OC-but p {
  margin: 0;
  position: center left;
  padding: 12px 10px 10px 60px;
  letter-spacing: 0.8px;
  font-size: 26px;
  font-weight: bold;
  color: white;
}
#configuration-container #viewer #ref-buttons {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
#configuration-container #viewer #ref-buttons p {
  font-size: 18px;
  color: black;
  text-align: left;
  margin: 0;
  padding-right: 6px;
  white-space: nowrap;
}
#configuration-container #viewer #ref-buttons button {
  background-color: #ffb9b066;
  border-radius: 22px 0px 22px 0px;
  border: none;
  font-family: Gothic;
  font-size: 18px;
  height: 44px;
  min-width: 44px;
  padding: 10px;
  margin-left: 0;
  color: white;
  cursor: pointer;
}
#configuration-container #viewer #ref-buttons button:hover {
  background-color: #ffb9b0e0;
}
#configuration-container #viewer #ref-buttons button.active {
  font-weight: bold;
  background-color: #ffb9b0;
}
#configuration-container #viewer #ref-buttons button:not(.active) {
  font-weight: normal;
}

#configuration-container #viewer #chair-button {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 70px;
  height: 70px;
  border-radius: 30px 0px 30px 0px;
  background-image: url(assets/image/chair_icon.png);
  background-size: 50px;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #ffb9b066;
  display: flex;
  cursor: pointer;
}
#configuration-container #viewer #chair-button:hover {
  background-color: #ffb9b0e0;
}
#configuration-container #viewer #chair-button.active {
  background-image: url(assets/image/chair_icon_active.png);
  background-color: #ffb9b0;
}

#configuration-container #viewer #config-ref {
  position: absolute;
  bottom: 5px;
  left: 20px;
  color: rgb(66, 66, 66);
  padding: 0;
  font-size: 17px;
}

#configuration-container #panel-container {
  flex: 1;
  min-width: 0;
  container-type: inline-size;
  --panel-max-height: calc(9/(22*0.45) * 100cqi);
  max-height: var(--panel-max-height);
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 0px 30px 0px 30px;
  border: 3px solid #ffb9b0;
  background-color: white;
}
#configuration-container #panel {
  width: 100%;
  max-height: var(--panel-max-height);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 16px;
}
#configuration-container #panel p {
  margin: 0;
  font-size: 18px;
  color: rgb(66, 66, 66);
}
#configuration-container #panel .custom-grid {
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  width: 100%;
  max-height: var(--panel-max-height);
  box-sizing: border-box;
}
#configuration-container #panel .custom-grid .custom-item {
  aspect-ratio: 1 / 1;
  background-color: #e6e6e6;
  border-radius: 0% 30% 0% 30%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: transform .12s ease, box-shadow .12s ease, scale .12s ease-in, border-radius .12s ease;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  padding: 6px;
}

#configuration-container #panel .custom-grid .custom-item:hover {
  transform: translateY(-3px);
  transform: scale(1.15);
  border-radius: 30% 0% 30% 0%;
  box-shadow: 0px 0px 0px 3px #ffb9b0;
}

@media (max-width: 700px) {
  #configuration-container #panel .custom-grid {
    max-height: var(--panel-max-height);
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
  }
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: white;
}

::-webkit-scrollbar-thumb {
  background-color: #ffdddd;
  border-radius: 0px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #ffb9b0;
}