/* V786 — Album photo 3D intégré à la section Carte Interactive (#carte-monde) */

.lme-map-album-wrap {
  position: relative;
  width: 100%;
  margin: 6px 0 14px;
}

.lme-map-album-stage {
  position: relative;
  width: 100%;
  min-height: 475px;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 42%, #193832 0%, #0d1d22 85%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(17, 45, 40, 0.18);
  perspective: 1800px;
}

.lme-ma-book {
  position: relative;
  width: min(96%, 820px);
  height: 450px;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.lme-ma-book.is-closing {
  transform: scale(0.92);
  opacity: 0;
  pointer-events: none;
}

.lme-ma-spread {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 16px;
  background: #f8f2e7;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.48), inset 0 0 0 7px #5b402c;
  overflow: hidden;
}

.lme-ma-spread::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 16px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(60, 40, 25, 0.25), rgba(255, 255, 255, 0.35), rgba(60, 40, 25, 0.28));
  z-index: 4;
}

.lme-ma-page {
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  min-height: 0;
  background: #fbf6ed;
}

.lme-ma-frame {
  width: 100%;
  flex: 1;
  min-height: 0;
  border-radius: 9px;
  overflow: hidden;
  border: 5px solid #ffffff;
  box-shadow: 0 8px 20px rgba(35, 24, 15, 0.16);
}

.lme-ma-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  display: block;
}

.lme-ma-cap {
  flex-shrink: 0;
  line-height: 1.25;
  font-family: Georgia, serif;
  font-size: clamp(13px, 1.8vw, 17px);
  font-weight: 700;
  color: #3a2a1e;
  text-align: center;
}

.lme-ma-flipper {
  backface-visibility: hidden;
  position: absolute;
  top: 7px;
  bottom: 7px;
  right: 7px;
  width: calc(50% - 7px);
  transform-origin: left center;
  transform-style: preserve-3d;
  z-index: 6;
  pointer-events: none;
  border-radius: 0 11px 11px 0;
  background: #fbf6ed;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.22);
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  opacity: 0;
}

.lme-ma-flipper.is-flipping {
  will-change: transform, opacity;
  animation: lmeMapAlbumTurn 0.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards;
}

@keyframes lmeMapAlbumTurn {
  0% { opacity: 1; transform: rotateY(0deg); }
  50% { opacity: 1; transform: rotateY(-95deg); }
  100% { opacity: 0; transform: rotateY(-180deg); }
}

.lme-ma-cover {
  position: absolute;
  width: min(92%, 680px);
  height: 450px;
  border-radius: 14px 20px 20px 14px;
  background: linear-gradient(145deg, #163b35 0%, #0e2622 100%);
  border: 3px solid #d4aa6a;
  box-shadow: -12px 10px 0 #4d3524, 0 24px 60px rgba(0, 0, 0, 0.58);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transform: rotateY(50deg) scale(0.88);
  transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.lme-ma-cover.is-visible {
  opacity: 1;
  transform: rotateY(0deg) scale(1);
}

.lme-ma-cover-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.lme-ma-cover-head img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #f0c28b;
  object-fit: cover;
}

.lme-ma-map-box {
  width: 100%;
  flex: 1;
  margin: 10px 0 6px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, #e6f3f2 0%, #cce3e4 100%);
  border: 2px solid rgba(212, 170, 106, 0.55);
  overflow: hidden;
}

.lme-ma-pin {
  opacity: 0;
  transform-origin: bottom center;
  transform-box: fill-box;
  transform: translateY(-14px) scale(0.4);
  transition: opacity 0.22s ease, transform 0.36s cubic-bezier(0.22, 1.35, 0.36, 1);
}

.lme-ma-pin.is-lit {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.lme-ma-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.lme-ma-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #d4c4b0;
  background: #ffffff;
  color: #173734;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}

.lme-ma-btn:hover {
  background: #1f5b50;
  color: #ffffff;
  border-color: #1f5b50;
}

@media (max-width: 640px) {
  .lme-map-album-stage {
    min-height: 340px;
    padding: 14px 8px;
  }
  .lme-ma-book {
    width: 100%;
    height: 295px;
  }
  .lme-ma-cover {
    width: 100%;
    height: 295px;
  }
}
