/* Importation de la police Poppins */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #cacaca;
    color: #333;
    margin: 0;
    padding: 0;
    padding-bottom: 80px; /* Laisse de l'espace pour le footer */
    text-align: center;
    transition: all 0.3s ease-in-out;
}

/* En-tête */
header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid black;
}

header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.intro {
    margin-top: 10px;
    font-size: 1rem;
    color: #ecf0f1;
}

/* Liste des cadeaux */
.wishlist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Ajuste la taille minimale des cartes */
    gap: 20px; /* Réduit l'espace entre les cartes */
    margin: 20px auto; /* Ajuste les marges */
    max-width: 1200px; /* Largeur maximale de la liste */
}

.wish-item {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.wish-item:hover {
    transform: scale(1.05);
}

/* Image wrapper avec overlay pour effet moderne */
.image-wrapper {
    position: relative; /* Pour que l'overlay s'affiche correctement */
}

.image-wrapper img {
    width: 100%;
    height: 180px; /* Ajuste selon la hauteur désirée */
    object-fit: cover; /* Remplit le cadre sans déformer l'image */
    border-bottom: 1px solid #ddd;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.8);
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease;
    pointer-events: none; /* Empêche l'interaction avec l'overlay quand il est invisible */
}

.wish-item:hover .overlay,
.wish-item.active .overlay {
    opacity: 1; /* Rendre l'overlay visible */
    pointer-events: auto; /* Permet de cliquer sur le bouton quand il est visible */
}

/* Quand l'utilisateur appuie avec son doigt (pour mobile) */
.overlay.fade-out {
    opacity: 0; /* On réduit l'opacité progressivement */
    pointer-events: none; /* Empêche toute interaction pendant la disparition */
}

.buy-btn {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.buy-btn:hover {
    background-color: #c0392b;
}

/* Footer minimaliste */
footer {
    background-color: rgba(52, 73, 94, 0.9);
    color: white;
    padding: 5px 0; /* Réduction du padding pour plus de finesse */
    font-size: 0.8rem; /* Taille de texte réduite pour plus de discrétion */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

footer p {
    font-size: 0.9rem; /* Réduit la taille de la police */
    margin: 0; /* Supprime les marges */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wishlist {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Taille encore plus petite pour les petits écrans */
        gap: 15px; /* Espacement réduit */
    }

    .wish-item h2 {
        font-size: 1rem; /* Réduction de la taille du texte du titre */
    }

    .wish-item p {
        font-size: 0.8rem; /* Réduction de la taille du texte des descriptions */
    }

    header h1 {
        font-size: 1.2rem; /* Taille réduite du titre pour mobile */
        text-shadow: 0 0 5px rgba(231, 76, 60, 0.7);
    }

    .intro {
        font-size: 0.9rem; /* Ajuste la taille du texte d'introduction pour mobile */
    }
}

header h1 {
    color: #e74c3c;
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.7), 0 0 20px rgba(231, 76, 60, 0.5);
    animation: flicker 1.5s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 12px auto 0;
  padding: 0 12px;
}

.filter-btn {
  border: 1px solid #2c3e50;
  background: #fff;
  color: #2c3e50;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease, color .2s ease;
}

.filter-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.filter-btn.active { background: #2c3e50; color: #fff; }

@media (max-width: 768px) {
  .filters { gap: 8px; }
  .filter-btn { padding: 7px 12px; font-size: .9rem; }
}

/* === Caddie (verrouillage cadeau) === */
.cart-lock-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cart-lock-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
    background: #ffffff;
}

/* === Carte verrouillée (cadeau acheté) === */
.wish-item.achete {
    position: relative;
    opacity: 0.55;
    border: 2px solid #ff3b30 !important;
}

.wish-item.achete::after {
    content: "Acheté";
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff3b30;
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* === Pop-up de confirmation verrouillage === */
.lock-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;              /* CACHÉ PAR DÉFAUT */
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lock-modal-backdrop.open {
    display: flex;              /* Devient visible uniquement quand JS ajoute .open */
}

.lock-modal {
    background: #ffffff;
    color: #333;
    border-radius: 16px;
    padding: 18px 20px 16px;
    max-width: 340px;
    width: 90%;
    box-shadow: 0 18px 40px rgba(0,0,0,0.25);
}

.lock-modal h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 600;
}

.lock-modal p {
    margin: 0 0 14px;
    font-size: 0.9rem;
    color: #555;
}

.lock-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.lock-modal-actions button {
    border-radius: 999px;
    border: none;
    padding: 7px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}

.lock-cancel {
    background: #e5e7eb;
    color: #111827;
}

.lock-confirm {
    background: #ff3b30;
    color: #ffffff;
}
/* === Animations lock / unlock (version bien visible) === */
@keyframes lockFlash {
    0% {
        background-color: white;
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    }
    30% {
        background-color: #ffe2e0; /* rouge très clair */
        box-shadow: 0 0 0 6px rgba(231, 76, 60, 0.6);
    }
    100% {
        background-color: white;
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    }
}

@keyframes unlockFlash {
    0% {
        background-color: white;
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    }
    30% {
        background-color: #e2f8ea; /* vert très clair */
        box-shadow: 0 0 0 6px rgba(46, 204, 113, 0.6);
    }
    100% {
        background-color: white;
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    }
}

.wish-item.lock-anim {
    animation: lockFlash 0.45s ease-out;
}

.wish-item.unlock-anim {
    animation: unlockFlash 0.45s ease-out;
}

/* === Countdown visible, propre et centré === */
.countdown-banner {
    margin: 10px auto;
    font-size: 1.1rem;
    display: inline-block;
    font-weight: 700;

    background: #ff3b30;
    color: #ffffff;

    padding: 8px 20px;
    border-radius: 999px;

    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    letter-spacing: 0.5px;
}
