/* ====================================================
   04-components.css
   Briques réutilisables : boutons, badges (sticker),
   cartes produit, options de service, FAQ, champs de formulaire.
   ==================================================== */

/* --- Boutons --- */

.button {
  min-height: 44px;
  padding: 10px 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 13px;
  background: var(--orange);
  color: var(--background-deep);
  text-decoration: none;
  font-family: var(--heading);
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1;
  transition:
    background .2s,
    transform .2s var(--ease),
    scale .2s var(--ease);
}

.button::before {
  content: "›";
}

.button::after {
  content: "‹";
}

.button:hover {
  background: var(--gold);
  transform: translateY(-2px);
}

.button:active {
  scale: .96;
}

.button-dark {
  background: var(--background-deep);
  color: var(--cream);
}

.button-dark:hover {
  background: #34281E;
}

/* --- Sticker (badge en forme d'étoile) --- */

.sticker {
  display: grid;
  place-items: center;
  width: clamp(66px, 9vw, 130px);
  aspect-ratio: 1;
  padding: 13px;
  background: var(--gold);
  color: var(--background-deep);
  clip-path: var(--burst-shape);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(13px, 1.7vw, 24px);
  line-height: 1;
  text-align: center;
  rotate: var(--tilt, 0deg);
}

/* --- Options du sélecteur de service --- */

.service-option {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--cream);
  text-align: left;
  text-transform: uppercase;
  font-family: var(--heading);
  font-size: clamp(14px, 1.4vw, 20px);
  transition: background .25s var(--ease);
}

.service-option:hover {
  background: rgba(250, 246, 240, .08);
}

.service-option[aria-pressed="true"] {
  background: var(--gold);
  color: var(--background-deep);
}

.service-option:focus-visible {
  outline-offset: 1px;
}

/* --- FAQ --- */

.faq details {
  background: var(--background-deep);
  border-radius: clamp(20px, 2.5vw, 36px);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq summary {
  min-height: 60px;
  padding: clamp(18px, 2vw, 29px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  list-style: none;
  font-family: var(--heading);
  font-size: clamp(21px, 2.6vw, 37px);
  line-height: 1.04;
  transition: color .25s ease;
}

.faq summary:hover {
  color: var(--orange);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "↓";
  font-family: var(--body);
  font-size: 25px;
  flex-shrink: 0;
}

.faq details[open] summary::after {
  content: "↑";
}

.faq details p {
  padding: 0 clamp(18px, 2vw, 29px) 25px;
  line-height: 1.6;
  color: var(--muted);
  font-size: clamp(14px, 1.4vw, 20px);
}

/* --- Champs de formulaire --- */

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field select {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid #715020;
  border-radius: 8px;
  background: var(--cream);
  color: var(--background-deep);
  font-size: 16px;
}

.form-wide {
  grid-column: 1 / -1;
}

.form-note {
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.form-status {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
}

/* --- Carte produit --- */

.product-card {
  overflow: hidden;
  border-radius: clamp(20px, 2.6vw, 38px);
  background: var(--background-deep);
  transition:
    translate .35s var(--ease),
    box-shadow .35s var(--ease);
}

.product-card:hover {
  translate: 0 -8px;
  box-shadow: 0 26px 50px rgba(0, 0, 0, .35);
}

.product-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--cream);
}

.product-image img {
  transition: transform .5s var(--ease);
}

.product-card:hover img {
  transform: scale(1.06);
}

.product-body {
  padding: clamp(18px, 2vw, 26px) clamp(16px, 1.8vw, 24px) clamp(20px, 2.2vw, 28px);
}

.product-card h3 {
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.15;
  font-weight: 500;
  text-wrap: balance;
}

.product-card .product-body p {
  margin-top: 10px;
  font-size: clamp(13px, 1.25vw, 17px);
  line-height: 1.55;
  color: var(--muted);
}

/* --- Mobile : composants --- */

@media (max-width: 900px) {
  .product-card h3 {
    font-size: clamp(18px, 3.5vw, 24px);
  }

  .product-card .product-body p {
    font-size: clamp(13px, 1.6vw, 16px);
  }
}

@media (max-width: 640px) {
  .product-card {
    border-radius: 18px;
  }

  .product-body {
    padding: 16px 14px 20px;
  }

  .product-card h3 {
    font-size: 22px;
    line-height: 1.2;
  }

  .product-card .product-body p {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.55;
  }
}

/* ====================================================
   Carte témoignage vidéo
   ==================================================== */

.testimonial-card {
  overflow: hidden;
  border-radius: clamp(20px, 2.6vw, 38px);
  background: var(--background-deep);
  transition:
    translate .35s var(--ease),
    box-shadow .35s var(--ease);
}

.testimonial-card:hover {
  translate: 0 -8px;
  box-shadow: 0 26px 50px rgba(0, 0, 0, .35);
}

.testimonial-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #48311F;
}

.testimonial-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0;
  background: rgba(13, 13, 13, .25);
  transition: background .3s var(--ease), opacity .3s var(--ease);
}

.testimonial-play:hover {
  background: rgba(13, 13, 13, .15);
}

.testimonial-play-btn {
  width: clamp(52px, 5.5vw, 68px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orange);
  display: grid;
  place-items: center;
  transition:
    transform .35s var(--ease),
    background .25s var(--ease);
}

.testimonial-play-btn::after {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--cream);
  margin-left: 5px;
}

.testimonial-play:hover .testimonial-play-btn {
  transform: scale(1.08);
  background: var(--gold);
}

/* Pendant la lecture : l'overlay s'efface, les contrôles natifs prennent le relais. */
.testimonial-card.is-playing .testimonial-play {
  opacity: 0;
  pointer-events: none;
}

/* Fichier vidéo absent : la carte affiche un état volontaire. */
.testimonial-card.is-missing .testimonial-play {
  display: none;
}

.testimonial-card.is-missing .testimonial-media::after {
  content: "VIDÉO À AJOUTER";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--heading);
  font-size: clamp(18px, 2vw, 26px);
  letter-spacing: .06em;
  color: var(--muted);
  background: rgba(13, 13, 13, .6);
}

.testimonial-body {
  padding: clamp(14px, 1.6vw, 23px);
}

.testimonial-tag {
  display: inline-block;
  font-family: var(--heading);
  font-size: clamp(13px, 1.2vw, 16px);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--background-deep);
  background: var(--orange);
  padding: 6px 14px;
  border-radius: 999px;
  line-height: 1.2;
}

.testimonial-name {
  margin-top: 14px;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 600;
  color: var(--cream);
}

.testimonial-quote {
  margin-top: 8px;
  font-size: clamp(13px, 1.3vw, 16px);
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 600px) {
  .testimonial-card {
    border-radius: 18px;
  }
}

@media (max-width: 700px) {
  .testimonial-media {
    aspect-ratio: 4 / 3;
  }

  .testimonial-play-btn {
    width: 56px;
  }
}