/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    color: #333;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e0e0e0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #FFD700, #FF6B35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-main {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #FF1744, #FF6B35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    letter-spacing: 2px;
}

.auth-links {
    display: flex;
    gap: 15px;
}

.auth-link {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #FF1744;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 20px;
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.1), rgba(255, 107, 53, 0.1));
    border: 2px solid rgba(255, 23, 68, 0.2);
    background-clip: padding-box;
    transition: all 0.3s ease;
}

.auth-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 23, 68, 0.3);
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.2), rgba(255, 107, 53, 0.2));
}

/* Main Content */
.main-content {
    padding: 20px 15px;
    max-width: 600px;
    margin: 0 auto;
}

.game-intro {
    text-align: center;
    margin-bottom: 30px;
    background: #ffffff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
}

.game-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #FF1744, #FF6B35, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-description {
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Game Module */
.game-module {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
}

.timer-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.timer {
    background: linear-gradient(45deg, #FF1744, #FF6B35);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.products-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #ffffff;
    border-radius: 15px;
    border: 2px solid #f0f0f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.product-item:hover {
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100px;
    height: 72px;
    background: #f8f8f8;
    padding: 2px;
    /*border-radius: 5px;*/
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.validate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.validate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.6);
}

.validate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Footer */
.footer {
    background-color: #ffffff;
    color: #333;
    padding: 20px 15px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #FF1744;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #FF6B35;
}

.copyright {
    font-size: 0.8rem;
    color: #999;
}

/* Popups */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background: rgba(0, 0, 0, 0.8);*/
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.popup h3 {
    color: #FF1744;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.popup p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-cancel, .btn-confirm {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.btn-confirm {
    background: linear-gradient(45deg, #FF1744, #FF6B35);
    color: white;
}

.btn-cancel:hover, .btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes moveUp {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

@keyframes moveDown {
    0% { transform: translateY(0); }
    50% { transform: translateY(20px); }
    100% { transform: translateY(0); }
}



/* Responsive Desktop */
@media (min-width: 768px) {
    .header {
        padding: 15px 30px;
    }
    
    .logo-icon {
        font-size: 3rem;
    }
    
    .logo-main {
        font-size: 2.2rem;
    }
    
    .auth-text {
        display: inline;
    }
    
    .main-content {
        max-width: 600px;
        padding: 30px;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .product-item {
        padding: 20px;
    }
    
    .product-image {
        width: 100px;
        height: 72px;
        font-size: 2.5rem;
    }
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .auth-text {
        display: none;
    }
    
    .footer-links {
        gap: 15px;
    }
    
    .footer-links a {
        font-size: 0.8rem;
    }
}

/* Loading State */
.loading-state {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #FF6B35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: #666;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Error State */
.error-state {
    background: rgba(255, 107, 107, 0.05);
    border: 2px solid #FF6B6B;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    color: #D32F2F;
    margin-bottom: 20px;
}

.retry-btn {
    background: linear-gradient(45deg, #FF6B35, #FF1744);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
}

/* Result page specific styles */
.result-item {
    position: relative;
}

.result-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.result-badge.wrong {
    background: linear-gradient(45deg, #FF1744, #D32F2F);
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #FF1744;
    margin: 5px 0;
}

.merchant-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(45deg, #FF6B35, #FFD700);
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.merchant-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.result-summary {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    border: 2px solid #f0f0f0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.result-summary.success {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.02);
}

.result-summary.failure {
    border-color: #FF1744;
    background: rgba(255, 23, 68, 0.02);
}

.result-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.result-title.success {
    color: #4CAF50;
}

.result-title.failure {
    color: #FF1744;
}

.play-again-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
    margin-top: 20px;
}

.play-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(76, 175, 80, 0.6);
}

/* Logo cliquable */
.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.logo-link:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(255, 23, 68, 0.3));
}

.logo-link:active {
    transform: scale(0.98);
}

/* Animation du logo au hover */
.logo-link:hover .logo-icon {
    animation: logoShake 0.5s ease-in-out;
}

@keyframes logoShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* Amélioration responsive pour le logo */
@media (max-width: 480px) {
    .logo-link:hover {
        transform: scale(1.02); /* Réduction de l'effet sur mobile */
    }
}

/* Accessibilité */
.logo-link:focus {
    outline: 2px solid #FF1744;
    outline-offset: 2px;
    border-radius: 10px;
}

.logo-link:focus:not(:focus-visible) {
    outline: none;
}

/* Amélioration de la transition du timer en mode urgence */
.timer.urgent {
    animation: pulseUrgent 0.5s infinite;
}

@keyframes pulseUrgent {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4);
    }
    50% { 
        transform: scale(1.08); 
        box-shadow: 0 6px 20px rgba(255, 23, 68, 0.8);
    }
}


/* Social Sharing Module */
.social-sharing {
    background: #ffffff;
    padding: 25px 20px;
    border-radius: 20px;
    text-align: center;
    margin: 30px auto;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
}

.sharing-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #FF1744;
}

.sharing-subtitle {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.social-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.social-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: white;
}

.social-button span {
    display: none;
}

.social-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-button:hover span {
    display: inline;
}

.facebook { background-color: #3b5998; }
.instagram { background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d); }
.tiktok { background-color: #000000; }

/* Responsive */
@media (min-width: 768px) {
    .social-button span {
        display: inline;
    }
    
    .social-button {
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .social-buttons {
        gap: 8px;
    }
    
    .social-button {
        padding: 12px;
        font-size: 1.2rem;
    }
    
    .social-button span {
        display: none;
    }
}

.game-module h2 {
    color: #FF1744;
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.4rem;
}

.game-module h3 {
    color: #FF6B35;
    margin: 20px 0 12px;
    font-size: 1.2rem;
}

.game-module p, .game-module li {
    line-height: 1.6;
    margin-bottom: 10px;
    color: #555;
}

.game-module ul {
    margin: 15px 0 20px 25px;
    list-style-type: none; /* Désactive les puces par défaut */
    padding-left: 0; /* Supprime le padding par défaut */
}

.game-module li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px; /* Espace pour notre puce personnalisée */
}

.game-module li:before {
    content: "•";
    color: #FF6B35;
    position: absolute;
    left: 0;
    font-size: 1.2em; /* Légèrement plus gros que le texte */
    line-height: 1; /* Alignement parfait */
}

.game-module strong {
    color: #333;
    font-weight: 600;
}

/* Responsive ajustements */
@media (max-width: 768px) {
    .game-module h2 {
        font-size: 1.3rem;
    }
    
    .game-module h3 {
        font-size: 1.1rem;
    }
    
    .game-module ul {
        margin-left: 20px;
    }
}