/* style.css - Styles Professionnels AZX Gaming */

/* Import de la font Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Variables CSS pour une maintenance facile */
:root {
    --primary-blue: #2563eb;
    --primary-purple: #7c3aed;
    --secondary-green: #10b981;
    --secondary-emerald: #059669;
    --accent-yellow: #f59e0b;
    --accent-orange: #ea580c;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-light: #f9fafb;
    --border-light: #e5e7eb;
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Styles pour les conteneurs d'étapes */
.step-container {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-container.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Styles pour l'indicateur d'étapes dans le header */
.step-indicator {
    transition: all 0.3s ease;
}

.step-indicator.active {
    background-color: var(--primary-blue) !important;
    transform: scale(1.2);
}

.step-indicator.completed {
    background-color: var(--secondary-green) !important;
}

/* Particules flottantes pour l'étape 2 */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    font-size: 2rem;
    opacity: 0.6;
    animation: float 8s infinite ease-in-out;
}

.particle-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.particle-2 {
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.particle-3 {
    top: 60%;
    left: 5%;
    animation-delay: 2s;
}

.particle-4 {
    top: 70%;
    right: 10%;
    animation-delay: 3s;
}

.particle-5 {
    top: 30%;
    left: 80%;
    animation-delay: 4s;
}

.particle-6 {
    top: 80%;
    left: 70%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-10px) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-15px) rotate(270deg);
        opacity: 0.7;
    }
}

/* Effet de glow pour le gagnant */
.winner-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow-pulse 2s infinite;
    z-index: -1;
}

@keyframes glow-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.9;
    }
}

/* Animation des confettis améliorée */
.confetti-container {
    position: relative;
    height: 120px;
    width: 100%;
    overflow: hidden;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: confetti-fall 4s infinite linear;
    opacity: 0.8;
}

.confetti:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    width: 6px;
    height: 12px;
    border-radius: 0;
}

.confetti:nth-child(2) {
    left: 20%;
    animation-delay: 0.3s;
    background: linear-gradient(45deg, #4ecdc4, #6ee7d8);
    transform: rotate(45deg);
}

.confetti:nth-child(3) {
    left: 35%;
    animation-delay: 0.6s;
    background: linear-gradient(45deg, #45b7d1, #74c7e3);
    width: 10px;
    height: 4px;
    border-radius: 2px;
}

.confetti:nth-child(4) {
    left: 50%;
    animation-delay: 0.9s;
    background: linear-gradient(45deg, #96ceb4, #b4ddc7);
}

.confetti:nth-child(5) {
    left: 65%;
    animation-delay: 1.2s;
    background: linear-gradient(45deg, #feca57, #ffd671);
    width: 6px;
    height: 6px;
}

.confetti:nth-child(6) {
    left: 75%;
    animation-delay: 1.5s;
    background: linear-gradient(45deg, #ff9ff3, #ffb3f7);
    transform: rotate(30deg);
    width: 8px;
    height: 3px;
}

.confetti:nth-child(7) {
    left: 85%;
    animation-delay: 1.8s;
    background: linear-gradient(45deg, #54a0ff, #74b3ff);
}

.confetti:nth-child(8) {
    left: 95%;
    animation-delay: 2.1s;
    background: linear-gradient(45deg, #5f27cd, #7c3aed);
    width: 5px;
    height: 10px;
    border-radius: 50%;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-120px) rotate(0deg) scale(1);
        opacity: 1;
    }
    25% {
        opacity: 0.8;
        transform: translateY(-60px) rotate(90deg) scale(1.1);
    }
    50% {
        opacity: 0.6;
        transform: translateY(0px) rotate(180deg) scale(0.9);
    }
    75% {
        opacity: 0.4;
        transform: translateY(60px) rotate(270deg) scale(1.05);
    }
    100% {
        transform: translateY(120px) rotate(360deg) scale(0.8);
        opacity: 0;
    }
}

/* Animation de pulsation lente pour les éléments importants */
@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s infinite;
}

/* Animation de rebond lent */
@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(-10px);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 2s infinite;
}

/* Styles pour les cartes de gains */
.gain-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 320px; /* Hauteur minimale pour les nouvelles cartes */
}

.gain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: 5;
}

.gain-card:hover::before {
    left: 100%;
}

.gain-card .bg-white {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.gain-card:hover .bg-white {
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-blue);
}

.gain-card.selected .bg-white {
    border-color: var(--secondary-green);
    transform: scale(1.03);
    box-shadow: 0 25px 50px -12px rgba(16, 185, 129, 0.25);
}

/* Effet spécial pour les cartes sélectionnées */
.gain-card.selected .bg-white::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    pointer-events: none;
}

.gain-card.selected::after {
    content: '✓';
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--secondary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Styles pour la zone d'image de couverture */
.gain-card .h-48 {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Animation hover pour l'image de couverture */
.gain-card:hover .h-48 {
    transform: scale(1.05);
    transition: transform 0.4s ease;
}

/* Styles pour le contenu en bas */
.gain-card .p-6 {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Effets de hover pour les boutons */
button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: scale(0.98);
}

button:focus {
    outline: none;
}

/* Styles pour les inputs */
input {
    transition: all 0.3s ease;
    font-size: 16px; /* Prevent zoom on mobile */
}

input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input.border-red-500 {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Messages d'erreur */
.error-message {
    font-size: 14px;
    font-weight: 500;
}

/* Styles pour les gradients de fond */
.bg-gradient-to-br {
    background-attachment: fixed;
}

/* Animation de glow pour l'étape 2 */
@keyframes glow-pulse-green {
    0%, 100% {
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 50px rgba(16, 185, 129, 0.6), 0 0 80px rgba(16, 185, 129, 0.3);
    }
}

#step2 .shadow-2xl {
    animation: glow-pulse-green 3s infinite;
}

/* Animation de tremblement pour les formulaires invalides */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Animation d'entrée pour les éléments */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fade-in-up 0.6s ease-out;
}

/* Styles responsives améliorés */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Ajustement des tailles de texte sur mobile */
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    .gain-card {
        min-height: 280px;
    }
    
    .gain-card .h-48 {
        height: 10rem; /* 160px au lieu de 192px sur mobile */
    }
    
    .gain-card .p-6 {
        padding: 1.5rem;
    }
    
    /* Stack des cartes sur mobile avec plus d'espace */
    #gainCardsContainer {
        gap: 1.5rem;
    }
    
    /* Ajustement du header sur mobile */
    header .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    header nav {
        display: none;
    }
}

@media (max-width: 640px) {
    /* Menu burger pour très petits écrans */
    .step-indicator {
        display: none;
    }
    
    /* Ajustement des paddings */
    section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .bg-white.rounded-3xl {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    /* Cartes de gains sur mobile */
    .gain-card {
        min-height: 260px;
    }
    
    .gain-card .h-48 {
        height: 8rem; /* 128px sur très petits écrans */
    }
    
    .gain-card .p-6 {
        padding: 1rem;
    }
    
    /* Texte plus petit sur mobile */
    .gain-card h3 {
        font-size: 1.125rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .gain-card p {
        font-size: 0.875rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Badge de sélection plus petit sur mobile */
    .gain-card.selected::after {
        width: 28px;
        height: 28px;
        font-size: 14px;
        top: 12px;
        right: 12px;
    }
}

/* Styles pour les tooltips (optionnel) */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Amélioration des scrollbars */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f9fafb;
        --text-gray: #d1d5db;
        --text-light: #9ca3af;
        --bg-light: #1f2937;
        --border-light: #374151;
    }
}

/* Print styles */
@media print {
    header, footer, .step-indicator, button {
        display: none !important;
    }
    
    .step-container {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible pour l'accessibilité */
.focus-visible:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .bg-gradient-to-br {
        background: white !important;
        color: black !important;
    }
    
    button {
        border: 2px solid black !important;
    }
}