/* Illustration High Phone. Les cadrages haut et bas partagent le tirage 480 × 768. */
.hp-controle {
  --hp-controle-boitier: url("images/iphone-de-face.jpg");
  --hp-controle-paysage: url("images/cabane-sur-la-cote.jpg");
  grid-column: 1 / -1;
  min-width: 0;
  color: #f3eee7;
}

@supports (background-image: image-set(url("") type("image/webp"))) {
  .hp-controle {
    --hp-controle-boitier: image-set(url("images/iphone-de-face.webp") type("image/webp"),
                                     url("images/iphone-de-face.jpg") type("image/jpeg"));
    --hp-controle-paysage: image-set(url("images/cabane-sur-la-cote.webp") type("image/webp"),
                                     url("images/cabane-sur-la-cote.jpg") type("image/jpeg"));
  }
}

.hp-controle-planche {
  margin: 0;
  border-top: 1px solid #4b4237;
}

.hp-controle-planche figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  padding-block: .9rem;
}

.hp-controle-planche figcaption strong {
  font: 500 1.65rem/1.15 "Cormorant Garamond", Georgia, serif;
}

.hp-controle-planche figcaption span {
  color: #cfb993;
  font-size: .75rem;
}

.hp-controle-vues {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
}

.hp-controle-vue {
  min-width: 0;
  border: 1px solid #3a3533;
  border-radius: .85rem;
  overflow: hidden;
  background: #151316;
}

.hp-controle-photo {
  position: relative;
  overflow: hidden;
  background: #312922 var(--hp-controle-boitier) center top / 100% auto no-repeat;
}

.hp-controle-verre,
.hp-controle-materiel {
  position: absolute;
  display: block;
}

.hp-controle-verre {
  background: linear-gradient(155deg, #35374333, #12151f54),
              var(--hp-controle-paysage) center / cover no-repeat;
}

.hp-controle-vue[data-vue="duo"] .hp-controle-photo {
  background: #312922;
}

.hp-controle-vue[data-vue="duo"] .hp-controle-verre {
  inset: 12% 10% 6%;
  border: 4px solid #716d69;
  border-radius: 1rem;
}

/* Duo ouvert, écran interne de face. Le volume + est le plus proche du bord droit. */
.hp-device[data-duo] {
  width: 11.5rem;
  height: 8.6rem;
}

.hp-device[data-duo] .earpiece {
  display: none;
}

.hp-device[data-duo] .key-plus,
.hp-device[data-duo] .key-moins {
  top: -6px;
  left: auto;
  right: 11%;
  width: 12%;
  height: 4px;
}

.hp-device[data-duo] .key-moins {
  right: 28%;
}

.hp-device[data-duo] :is(.key-plus, .key-moins).is-lit::after {
  top: auto;
  bottom: 7px;
  right: 50%;
  width: 1px;
  height: 1.4rem;
}

.hp-device[data-duo]::after {
  content: "";
  position: absolute;
  top: 62%;
  right: -5px;
  width: 3px;
  height: 14%;
  background: #666360;
  border-radius: 3px;
}

.hp-controle-vue[data-vue="face"] .hp-controle-verre {
  top: 13%;
  bottom: 0;
  left: 15.6%;
  right: 15.6%;
  border-radius: 15% 15% 0 0 / 19% 19% 0 0;
}

/* Conserver l’optique photographiée devant le paysage. */
.hp-controle-vue[data-vue="face"] .hp-controle-materiel {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--hp-controle-boitier) center top / 100% auto no-repeat;
  -webkit-clip-path: inset(15.5% 40% 74.7% 39.7% round 99px);
  clip-path: inset(15.5% 40% 74.7% 39.7% round 99px);
}

.hp-controle-vue[data-vue="principal"] .hp-controle-photo {
  background-position: center bottom;
}

.hp-controle-vue[data-vue="principal"] .hp-controle-verre {
  top: 0;
  right: 17.5%;
  bottom: 37.333%;
  left: 17.5%;
  background-position: center bottom;
}

/* Reconstitution du menton en verre et de la bague du bouton du SE. */
.hp-controle-vue[data-vue="principal"] .hp-controle-materiel {
  top: 67%;
  left: 44.8%;
  width: 10.4%;
  height: 16.64%;
  border-radius: 50%;
  background: linear-gradient(140deg, #38342f, #bbb5a8 22%, #282623 47%, #67625a 79%, #bfb7aa);
  box-shadow: 0 1px 2px #000;
}

.hp-controle-vue[data-vue="principal"] .hp-controle-materiel::after {
  content: "";
  position: absolute;
  top: 4.5%;
  right: 4.5%;
  bottom: 4.5%;
  left: 4.5%;
  border-radius: 50%;
  background: linear-gradient(145deg, #080808, #171616);
  box-shadow: inset 0 1px 2px #000;
}

.hp-controle-photo svg {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}

.hp-controle-legende {
  align-self: center;
  padding: 1rem 1.15rem;
}

.hp-controle-legende strong {
  font-weight: 600;
  font-size: 1rem;
}

#guide-pilier .hp-controle-legende p {
  margin: .35rem 0 0;
  line-height: 1.55;
}

.hp-controle-limite {
  margin: 1rem 0 0;
  padding-inline-start: .9rem;
  border-inline-start: 2px solid #c9a96e;
}

.hp-controle-limite strong {
  color: #e6cfaa;
}

#commande[data-controle="duo"] .hp-controle-vue:not([data-vue="duo"]),
#commande[data-controle="face"] .hp-controle-vue:not([data-vue="face"]),
#commande[data-controle="principal"] .hp-controle-vue:not([data-vue="principal"]),
#commande:is([data-controle="duo"], [data-controle="face"], [data-controle="principal"]) .hp-controle-limite,
#commande[data-controle="ancien"] .hp-controle-planche {
  display: none;
}

@media (min-width: 48rem) {
  #commande[data-controle="duo"] .hp-controle-vue[data-vue="duo"],
  #commande[data-controle="face"] .hp-controle-vue[data-vue="face"],
  #commande[data-controle="principal"] .hp-controle-vue[data-vue="principal"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-controle,
  .hp-controle * {
    animation: none;
    transition: none;
  }
}
