@font-face {
  font-family: "Sofia";
  src: url("./fonts/Sofia.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

html,
body {
  font-family: "Sofia", sans-serif;
  background-color: transparent;
  font-size: 14px;
  margin: 0;
  padding: 0;
}

.hidden {
  display: none !important;
}

p {
  font-weight: 300;
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  font-family: "Sofia", sans-serif;
}

a {
  color: #132573;
}

body:not(.has-touch) a:hover {
  color: #4054b3;
  transition: all 0.4s ease-out;
}

/* GLOBAL CONTAINER */
.external-container {
  width: 100%;
  position: relative;
  display: block;
}

/* FOND DE CARTE */
.map-container {
  background: url("../img/2026_carte.png") no-repeat top center;
  border-radius: 20px;
  background-size: contain;
  max-width: 100%;
  width: 100%;
  aspect-ratio: 1920 / 1058;
  position: relative;
}

/* CONTENEUR CARTES POSTALES (Desktop overlay) */
.postcards {
  position: absolute;
  top: 5%;
  left: 3%;
  width: 32%;
  z-index: 10;
  pointer-events: none;
}

.postcard {
  pointer-events: auto;
  width: 100%;
  height: 400px;
  perspective: 1000px;
  cursor: pointer;
}

.postcard-inner-intro {
  position: relative;
  width: 100%;
  min-height: 250px;
  height: auto;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.postcard-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}

/* Animation Flip */
.postcard-inner {
  position: relative;
  width: 100%;
  min-height: 410px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.postcard.flipped .postcard-inner {
  transform: rotateY(180deg);
  height: auto;
  min-height: 410px;
}

.postcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
  /* box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); */
}

.postcard-image {
  width: 95%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.15);
}

.postcard.flipped .postcard-back {
  position: relative;
}
/* DOS DE LA CARTE */
.postcard-back {
  position: absolute;
  inset: 0;
  background: #f7f1e8;
  transform: rotateY(180deg);
  padding: 1.5rem;
  box-sizing: border-box;
}

/* Sur ordinateur : le texte coule sur 2 colonnes automatiquement */
.postcard-back-content {
  column-count: 2;
  column-gap: 2.5rem;
  column-rule: 1px solid rgba(0, 0, 0, 0.15); /* La ligne verticale séparatrice */
  line-height: 1.5;
  column-fill: balance;
  min-height: 360px;
  /* overflow-y: auto; Sécurité si un texte est vraiment trop long */
}

h2 {
  margin: 0 0 15px 0;
  font-weight: 700;
  font-size: 18px;
  color: #132573;
}

.link-title {
  font-weight: 500;
  margin-bottom: 8px;
  display: inline-block;
}

.link-title:hover {
  text-decoration: underline;
}

.cta-container {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  justify-content: center;
}

.cta {
  padding: 8px 20px;
  background-color: #132573;
  color: #fff;
  border-radius: 32px;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.3s;
  text-align: center;
}

.cta:hover {
  background-color: #fff;
  color: #4054b3;
  box-shadow: 0 0 0 2px #4054b3;
}

.small {
  font-size: 12px;
  color: #3a3a3a;
}

/************************
 * PINS GENERAL DESIGN
 ************************/
.pin {
  position: absolute;
  cursor: pointer;
  transform: translate(-50%, -100%);
  z-index: 10;
}

.pin svg {
  width: 28px;
  height: auto;
  transition: transform 0.2s;
}

.pin.selected svg,
body:not(.has-touch) .pin:hover svg {
  transform: scale(1.2);
}

.pin.selected path,
body:not(.has-touch) .pin:hover path {
  fill: #be1932;
}

/************************
 * COORDONNÉES DES PINS (Desktop / Universelles)
 ************************/
#pin-montmartre {
  left: 88%;
  top: 53%;
}
#pin-minier {
  left: 64%;
  top: 14%;
}
#pin-soulages {
  left: 59%;
  top: 69%;
}
#pin-bertrand {
  left: 58%;
  top: 42%;
}
#pin-architecture {
  left: 84%;
  top: 57%;
}
#pin-gainsbourg {
  left: 87%;
  top: 60%;
}
#pin-auvers {
  left: 60%;
  top: 23%;
}
#pin-eure {
  left: 57%;
  top: 21%;
}
#pin-bourget {
  left: 61.5%;
  top: 24%;
}
#pin-lalique {
  left: 76%;
  top: 28%;
}
#pin-pontigny {
  left: 65%;
  top: 35%;
}
#pin-monnet {
  left: 59%;
  top: 27%;
}
#pin-limoges {
  left: 55%;
  top: 52%;
}
#pin-ales {
  left: 64%;
  top: 70%;
}
#pin-mulhouse {
  left: 77%;
  top: 38%;
}
#pin-cadillac {
  left: 51%;
  top: 61%;
}
#pin-monaco {
  left: 77%;
  top: 71%;
}
#pin-prehistoire {
  left: 54%;
  top: 58%;
}
#pin-famm {
  left: 75%;
  top: 74%;
}
#pin-ferrat {
  left: 66%;
  top: 63%;
}
#pin-verne {
  left: 46.8%;
  top: 38%;
}
#pin-lumieres {
  left: 70%;
  top: 35%;
}
#pin-jagu {
  left: 43%;
  top: 24%;
}

/************************
 * ANIMATIONS DES PINS
 ************************/
.pin {
  animation: bounce 1s both;
}

body:not(.has-touch) .pin:hover .img-pin {
  animation: little-bounce 1.5s both infinite;
}

@keyframes bounce {
  0% {
    opacity: 0;
    transform: translate(-50%, -2000px);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -70px);
  }
  80% {
    transform: translate(-50%, -110px);
  }
  100% {
    transform: translate(-50%, -100%);
  }
}

@keyframes little-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/************************
 * MEDIA QUERY RESPONSIVE (Tablette & Mobile)
 ************************/
@media screen and (max-width: 940px) {
  .external-container {
    display: flex;
    flex-direction: column;
  }

  /* Swappe la carte de fond vers la version mobile alternative */
  .map-container {
    background-image: url("../img/2026_carte_responsive.png");
    width: 100%;
    aspect-ratio: 1026 / 894;
  }

  /* Sort les cartes de la superposition absolue pour les empiler en dessous de la carte */
  .postcards {
    position: static;
    width: 90%;
    margin: 20px auto;
    pointer-events: auto;
  }

  .postcard {
    max-width: 550px;
    margin: 0 auto;
    height: 280px;
  }

  .postcard-intro {
    margin-top: 10px;
  }

  .pin svg {
    width: 20px;
  }
  #pin-montmartre {
    left: 83%;
    top: 53%;
  }
  #pin-minier {
    left: 45%;
    top: 15%;
  }
  #pin-soulages {
    left: 40%;
    top: 68%;
  }
  #pin-bertrand {
    left: 35%;
    top: 44%;
  }
  #pin-architecture {
    left: 78%;
    top: 58%;
  }
  #pin-gainsbourg {
    left: 81%;
    top: 61%;
  }
  #pin-auvers {
    left: 40%;
    top: 27%;
  }
  #pin-eure {
    left: 35%;
    top: 25%;
  }
  #pin-bourget {
    left: 43%;
    top: 29%;
  }
  #pin-lalique {
    left: 65%;
    top: 31%;
  }
  #pin-pontigny {
    left: 54%;
    top: 39%;
  }
  #pin-monnet {
    left: 38%;
    top: 32%;
  }
  #pin-limoges {
    left: 33%;
    top: 54%;
  }
  #pin-ales {
    left: 47%;
    top: 72%;
  }
  #pin-mulhouse {
    left: 66%;
    top: 40%;
  }
  #pin-cadillac {
    left: 31%;
    top: 67%;
  }
  #pin-monaco {
    left: 66%;
    top: 72%;
  }
  #pin-prehistoire {
    left: 31%;
    top: 60%;
  }
  #pin-famm {
    left: 63%;
    top: 76%;
  }
  #pin-ferrat {
    left: 51%;
    top: 63%;
  }
  #pin-verne {
    left: 19.8%;
    top: 41%;
  }
  #pin-lumieres {
    left: 59%;
    top: 38%;
  }
  #pin-jagu {
    left: 14%;
    top: 26%;
  }
}

@media screen and (max-width: 480px) {
  .pin svg {
    width: 16px;
  }
  h2 {
    font-size: 14px;
  }
}
