/* =============================================
   Finitions : animations douces, lisibilité téléphone.
   Mêmes couleurs que le site. Se charge en dernier.
   ============================================= */

html { scroll-padding-top: 84px; }

/* ---- Boutons : réaction au toucher et léger reflet ---- */
.btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:active { transform: scale(0.97); }

.btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}

@media (hover: hover) {
  .btn--primary:hover { box-shadow: 0 10px 24px rgba(74, 55, 40, 0.22); transform: translateY(-1px); }
  .btn--primary:hover::after { animation: polish-shine 0.9s ease; }
}

/* Le bouton fixe du bas brille de temps en temps pour attirer l'œil, sans insister */
.mobile-cta .btn--primary::after { animation: polish-shine 1.1s ease 2.5s 2; }

@keyframes polish-shine { to { left: 130%; } }

/* ---- Cartes : elles se soulèvent au survol ---- */
.home-path,
.benefit,
.timeline__item,
.mp3-card,
.shop-card,
.mc-item {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .home-path:hover,
  .mp3-card:hover,
  .shop-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(74, 55, 40, 0.12); }
}

/* Images de la boutique : léger zoom */
.mp3-card img,
.shop-card img { transition: transform 0.6s ease; }

@media (hover: hover) {
  .mp3-card:hover img,
  .shop-card:hover img { transform: scale(1.04); }
}

/* ---- Apparition des sections plus douce ---- */
.reveal {
  transform: translateY(18px);
  transition: opacity 0.75s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---- Accueil : la photo et le nom s'affichent tout de suite ---- */
.hero .reveal { opacity: 1; transform: none; }
.hero__photo { background: #3d2b1f; }
.hero__photo img { animation: polish-fade 0.7s ease both; }
.hero__title { animation: polish-rise 0.8s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero__promise { animation: polish-rise 0.8s 0.25s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

@keyframes polish-fade { from { opacity: 0; } }
@keyframes polish-rise { from { opacity: 0; transform: translateY(14px); } }

/* ---- Titres de section : petit trait animé ---- */
.section__label::after { transition: width 0.6s ease; }

/* ---- Contact (/message) : le formulaire d'abord sur téléphone ---- */
@media (max-width: 760px) {
  .page-message .booking { display: flex; flex-direction: column; gap: 1.25rem; }
  .page-message .booking__form { order: -1; }
  .page-message .booking__intro > .section__label,
  .page-message .booking__intro > h2,
  .page-message .booking__intro > p { display: none; }
  .page-message .page-hero { padding-bottom: 1rem; }
  .page-message .booking__info { margin-top: 0; }
  .page-message .contact-item { padding: 0.6rem 0; }
}

/* ---- Qui suis-je : histoire en version courte, à déplier ---- */
@media (max-width: 760px) {
  .is-clampable { position: relative; }

  .is-clampable.is-clamped .clamp-text {
    display: -webkit-box;
    -webkit-line-clamp: var(--clamp-lines, 3);
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .page-avent-sale .clamp-toggle { display: block; margin: 0.5rem auto 0; color: #f2d08a; }

  .clamp-toggle {
    margin-top: 0.35rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--aqua-dark, #4f7d6e);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
  }
}

.clamp-toggle[hidden] { display: none; }

/* ---- Boutique : la barre du bas devient le panier ---- */
@media (max-width: 760px) {
  body.has-cart-bar .mp3-cart-fab { display: none !important; }
}

/* ---- Calendrier de l'Avent : texte lisible et portes qui s'allument ---- */
@media (max-width: 760px) {
  .page-avent-sale .avent-lead {
    max-width: 34em;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    font-size: 1rem;
    line-height: 1.6;
  }
}

.avent-doors {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.35rem;
  max-width: 520px;
  margin: 1.4rem auto 0;
  padding: 0;
  list-style: none;
}

.avent-doors li {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border-radius: 7px;
  border: 1px solid rgba(242, 208, 138, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 245, 228, 0.75);
  font-family: var(--font-heading, Georgia, serif);
  font-size: 0.9rem;
  transition: background 0.4s, color 0.4s, box-shadow 0.4s, transform 0.4s;
}

.avent-doors li.is-lit {
  background: rgba(242, 208, 138, 0.22);
  color: #fff3d6;
  box-shadow: 0 0 14px rgba(242, 208, 138, 0.55), inset 0 0 8px rgba(242, 208, 138, 0.35);
  transform: translateY(-2px);
}

.avent-doors li:last-child { border-color: rgba(242, 208, 138, 0.8); color: #f2d08a; }

/* ---- Respect du réglage « réduire les animations » ---- */
@media (prefers-reduced-motion: reduce) {
  .btn, .btn::after, .hero__photo img, .hero__title, .hero__promise, .reveal, .avent-doors li { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

@supports not (aspect-ratio: 3 / 4) {
  .avent-doors li { min-height: 2.6rem; }
}
