/* --- FOND --- */
body {
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  background: radial-gradient(circle at top, #b30000 0%, #004d00 90%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
  overflow-x: hidden;
}

/* --- EN-TÊTE AVEC GUIRLANDE LUMINEUSE --- */
header {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  background: transparent;
  position: relative;
  color: gold;
  text-shadow: 0 0 10px #fff;
}

header h1 {
  font-size: 2rem;
  margin: 0;
  animation: glow 2s ease-in-out infinite alternate;
}

/* Animation du titre */
@keyframes glow {
  from {
    text-shadow: 0 0 10px gold, 0 0 20px red;
  }
  to {
    text-shadow: 0 0 20px #fff, 0 0 30px gold;
  }
}

/* --- GUIRLANDE LUMINEUSE --- */
header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    gold,
    red,
    gold,
    green,
    gold,
    red,
    gold,
    green
  );
  background-size: 300% 100%;
  animation: lights 3s linear infinite;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

@keyframes lights {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 100% 0;
  }
}

/* --- GRILLE DE CADEAUX --- */
.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

/* --- CARTES --- */
.gift-card {
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 215, 0, 0.9); /* contour doré visible */
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s, border-color 0.3s;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
  backdrop-filter: blur(4px);
}

.gift-card:hover {
  transform: scale(1.04);
  border-color: gold;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* --- IMAGES HARMONISÉES --- */
.gift-card .img-wrapper {
  width: 100%;
  height: 180px; /* hauteur uniforme et compacte */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.gift-card img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.gift-card:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 0 8px gold);
}

/* --- TITRE SOUS L’IMAGE --- */
.gift-title {
  text-align: center;
  font-size: 1.05rem;
  padding: 0.8rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- MODALE --- */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease forwards;
}

/* Animation d’ouverture fluide */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content {
  background: #fff;
  color: #333;
  margin: 10% auto;
  padding: 1.5rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  position: relative;
  box-shadow: 0 0 20px gold;
}

.modal-content img {
  width: auto;
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  background: #f7f7f7;
  border-radius: 8px;
  padding: 5px;
  display: block;
  margin: 0 auto;
}

.close {
  color: #000;
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

.gift-link {
  display: inline-block;
  margin-top: 1rem;
  background: #b30000;
  color: gold;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}

.gift-link:hover {
  background: #004d00;
}

/* --- EFFET NEIGE --- */
@keyframes snow {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100vh);
  }
}

.snowflake {
  position: fixed;
  top: -10px;
  color: white;
  font-size: 1em;
  animation: snow linear infinite;
  opacity: 0.8;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  .gift-card .img-wrapper {
    height: 150px;
  }
  .gift-title {
    font-size: 1rem;
  }
  header h1 {
    font-size: 1.5rem;
  }
}
