/* 🌟 Styles Généraux */
body {
    font-family: "Poppins", sans-serif;
    background: url('/assets/opinioqr/background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #ffffff;
    text-align: center;
    padding: 20px;
    margin: 0;
    overflow-x: hidden;
}

/* 🏆 Logo */
#logoContainer {
    text-align: center;
    margin-bottom: 10px;
}

#opinioqrLogo {
    width: 80px;
    max-width: 120px;
    display: block;
    margin: 0 auto;
}

/* ✅ Texte principal */
#gameText {
    font-size: 22px;
    font-weight: bold;
    font-family: "Pacifico", cursive;
    color: #E3C08D;
    text-shadow: 2px 2px 8px rgba(227, 192, 141, 0.6);
    margin-bottom: 15px;
}

/* 🎴 Cartes */
#cardsWrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

/* ✅ STYLE DES CARTES AVEC UNE BORDURE ET EFFET PREMIUM (TAILLE RÉDUITE) */
.card {
    width: 85px; /* 📌 Réduction de la largeur */
    height: 120px; /* 📌 Réduction de la hauteur */
    background: linear-gradient(145deg, #A67B5B, #6D4C31);
    border: 3px solid #E3C08D;
    border-radius: 10px; /* 📌 Coins légèrement arrondis */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px; /* 📌 Réduction de la taille du texte */
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    transition: all 0.4s ease-in-out;
    box-shadow: 0px 3px 12px rgba(227, 192, 141, 0.3);
    position: relative;
}

/* ✅ EFFET DE SURVOL (ADAPTÉ) */
.card:hover {
    transform: scale(1.05);
    box-shadow: 0px 7px 20px rgba(227, 192, 141, 0.5);
}

/* ✅ STYLE QUAND UNE CARTE EST RÉVÉLÉE */
.card.revealed {
    background: #E3C08D;
    color: #000;
    transform: rotateY(180deg);
    border-color: #FFD700;
}

/* ✅ ANIMATION DE RÉVÉLATION */
.card.revealed::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    top: 0;
    left: 0;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.card.revealed:hover::before {
    opacity: 1;
}

/* ✅ Correction de l'inversion du texte */
.card.revealed span {
    display: block;
    transform: rotateY(180deg); /* Annule l'effet de retournement du texte */
}



#resultModal {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7); /* 🛠️ Fond plus opaque */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    visibility: hidden;
}

#resultModal.active {
    opacity: 1;
    transform: scale(1);
    visibility: visible; /* ✅ Corrige le problème de non-affichage */
}


/* Ajout d'un fond pour le contenu */
#modalContent {
    background: rgba(20, 20, 20, 0.95); /* 🛠️ Fond foncé et opaque */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.2);
    text-align: center;
    width: 90%;
    max-width: 400px;
}

/* Texte plus visible */
#resultMessage {
    font-size: 18px;
    font-weight: bold;
    color: #E3C08D; /* Marron clair */
    margin-bottom: 15px;
}


#wheelIndicator {
    position: absolute;
    font-size: 40px; /* ✅ Taille ajustable */
    color: #E3C08D; /* ✅ Couleur dorée */
    top: 67%; /* ✅ Centrer verticalement */
    left: calc(42% + 175px); /* ✅ Placer la flèche SUR la roue à droite */
    transform: translateY(-50%) rotate(90deg); /* ✅ Rotation pour pointer vers la roue */
    z-index: 5; /* ✅ Toujours visible */
    text-shadow: 0px 0px 10px #E3C08D; /* ✅ Effet lumineux */
}


/* ✅ Champs de saisie centrés */
.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.input-container input {
    width: 90%;
    padding: 14px 20px;
    border: 2px solid transparent;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    background: #1C1C1C;
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease-in-out;
    box-shadow: inset 0px 0px 10px rgba(255, 255, 255, 0.1);
}

.input-container input:focus {
    border: 2px solid #E3C08D;
    box-shadow: 0px 0px 10px rgba(227, 192, 141, 0.7);
}

/* ✅ Bouton email stylisé */
#submitEmail {
    background: linear-gradient(90deg, #A67B5B, #6D4C31);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    width: 80%;
    max-width: 200px;
    display: block;
    margin: 15px auto 10px;
    text-align: center;
}

#submitEmail:hover {
    background: linear-gradient(90deg, #E3C08D, #A67B5B);
    transform: scale(1.05);
}

#submitEmail:active {
    transform: scale(0.95);
}


#emailNotification {
    font-size: 14px;
    color: #E3C08D; /* Marron clair */
    margin-top: 5px;
    text-align: center;
    font-weight: normal;
    opacity: 0.8;
}

.result-primary {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff; /* Blanc */
}

.result-secondary {
    font-size: 16px;
    font-weight: normal;
    color: #E3C08D; /* Marron clair */
}

.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.modal h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.modal p {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
}

.modal img {
    width: 100px;
    height: auto;
    margin-bottom: 15px;
}

.instagram-button {
    display: inline-block;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    display: block;
    width: fit-content;
    margin: 10px auto;
}

/* Animation de pulsation pour attirer l'attention */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#instagramModal .instagram-button {
    animation: pulse 1.5s infinite ease-in-out;
}

/* Animation d'apparition de la modale */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ✅ Styles pour la modale Instagram */
#instagramModal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 1000;
}

/* ✅ Quand la modale est active */
#instagramModal.active {
    opacity: 1;
    visibility: visible;
}

/* ✅ Fermeture correcte */
#instagramModal:not(.active) {
    display: none; /* Cache complètement la modale lorsqu'elle n'est pas active */
}


/* ✅ Animation de la modale */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#instagramModal.active .modal-content {
    animation: fadeIn 0.3s ease-in-out;
}


/* ✅ Séparer le texte et le compte à rebours en deux lignes */
#countdown span {
    display: block;
    font-size: 28px; /* Compte à rebours encore plus grand */
    font-weight: bold;
    color: #FFFFFF; /* Blanc */
    margin-top: 10px;
}

/* 📱 Ajustements mobiles */

@media screen and (max-width: 480px) {
    #gameText {
        font-size: 20px; /* 📌 Augmenter la taille du texte */
        font-family: "Playfair Display", serif; /* 🎨 Changer la police */
        text-align: center;
        color: #E3C08D; /* 🟡 Marron clair */
        text-shadow: 2px 2px 10px rgba(227, 192, 141, 0.8);
        margin-bottom: 15px;
    }
}

.card-logo {
    width: 40px;
    height: auto;
    margin-bottom: 5px;
}

#gameContainer.centered {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

