/* Variables CSS - Thème Années 80 */
:root {
    /* Palette 80s */
    --light-carmine: #EB6767;
    --mellow-apricot: #FFB778;
    --keppel: #3E9FA0;
    --midnight: #6F2578;
    --mystic-maroon: #B54383;
    
    /* Variations pour backgrounds et effets */
    --carmine-light: #FFE5E5;
    --carmine-shadow: #D14545;
    --apricot-light: #FFF0E1;
    --apricot-shadow: #E09856;
    --keppel-light: #E5F5F5;
    --keppel-shadow: #2C7778;
    --maroon-light: #F9E5F1;
    --maroon-shadow: #923661;
    
    /* Couleurs système avec esprit 80s */
    --bg-primary: #0A0A0A;
    --bg-secondary: #1A0A1A;
    --text-primary: #FFFFFF;
    --text-secondary: #E5E5E5;
    --text-accent: var(--mellow-apricot);
    --white: #FFFFFF;
    --black: #000000;
    
    /* Neon effects */
    --neon-glow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
    --retro-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Reset et base avec style rétro */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    background: linear-gradient(45deg, var(--midnight), var(--mystic-maroon), var(--keppel));
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* Effet de grille rétro en arrière-plan */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

/* Container principal */
.quiz-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    max-width: 100vw;
    position: relative;
    z-index: 1;
}

/* Header avec style néon */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 2px solid var(--light-carmine);
    position: relative;
}

.quiz-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--light-carmine);
    box-shadow: var(--neon-glow);
}

.timer-container {
    position: relative;
}

.timer-circle {
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid var(--mellow-apricot);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        var(--retro-shadow),
        inset 0 0 20px rgba(255, 183, 120, 0.2);
    position: relative;
    overflow: hidden;
}

.timer-circle::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    background: conic-gradient(var(--light-carmine) 0deg, transparent 0deg);
    border-radius: 50%;
    animation: countdown 15s linear infinite;
    z-index: -1;
}

.timer-text {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--mellow-apricot);
    text-shadow: 0 0 10px var(--mellow-apricot);
    z-index: 1;
}

.quiz-info {
    text-align: right;
    color: var(--text-primary);
}

.quiz-info h1 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.25rem;
    background: linear-gradient(45deg, var(--light-carmine), var(--mellow-apricot));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.question-number {
    font-size: 0.9rem;
    color: var(--keppel);
    text-shadow: 0 0 5px var(--keppel);
    font-weight: bold;
}

/* Section question avec effet néon */
.question-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.question-container {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid var(--mystic-maroon);
    border-radius: 0.5rem;
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 
        var(--retro-shadow),
        0 0 20px rgba(181, 67, 131, 0.3);
    text-align: center;
    position: relative;
}

.question-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--mystic-maroon), transparent);
    animation: scanLine 2s ease-in-out infinite;
}

.question-text {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Grille des réponses avec style rétro */
.answers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    flex: 1;
}

.answer-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid;
    border-radius: 0.5rem;
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 80px;
    text-align: left;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Couleurs spécifiques pour chaque réponse */
.answer-carmine {
    border-color: var(--light-carmine);
    box-shadow: 0 0 15px rgba(235, 103, 103, 0.3);
}

.answer-apricot {
    border-color: var(--mellow-apricot);
    box-shadow: 0 0 15px rgba(255, 183, 120, 0.3);
}

.answer-keppel {
    border-color: var(--keppel);
    box-shadow: 0 0 15px rgba(62, 159, 160, 0.3);
}

.answer-maroon {
    border-color: var(--mystic-maroon);
    box-shadow: 0 0 15px rgba(181, 67, 131, 0.3);
}

/* Effets hover avec néon */
.answer-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.3),
        0 0 25px currentColor;
}

.answer-btn:active {
    transform: translateY(-1px) scale(1.01);
}

/* Formes géométriques néon */
.answer-shape {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Triangle néon carmine */
.neon-triangle {
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 24px solid var(--light-carmine);
    filter: drop-shadow(0 0 8px var(--light-carmine));
}

/* Cercle néon apricot */
.neon-circle {
    width: 28px;
    height: 28px;
    background: var(--mellow-apricot);
    border-radius: 50%;
    box-shadow: 
        0 0 15px var(--mellow-apricot),
        inset 0 0 15px rgba(255, 183, 120, 0.3);
}

/* Diamond néon keppel */
.neon-diamond {
    width: 24px;
    height: 24px;
    background: var(--keppel);
    transform: rotate(45deg);
    box-shadow: 0 0 15px var(--keppel);
}

/* Carré néon maroon */
.neon-square {
    width: 24px;
    height: 24px;
    background: var(--mystic-maroon);
    border-radius: 4px;
    box-shadow: 0 0 15px var(--mystic-maroon);
}

/* États des réponses */
.answer-btn.selected {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
}

.answer-btn.correct {
    background: rgba(62, 159, 160, 0.2);
    border-color: var(--keppel);
    animation: correctPulse 0.6s ease;
}

.answer-btn.incorrect {
    background: rgba(235, 103, 103, 0.2);
    border-color: var(--light-carmine);
    animation: incorrectShake 0.6s ease;
}

/* Overlay feedback rétro */
.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.feedback-overlay.hidden {
    display: none;
}

.feedback-content {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--mellow-apricot);
    border-radius: 0.5rem;
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 
        var(--retro-shadow),
        0 0 30px rgba(255, 183, 120, 0.4);
}

.feedback-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px currentColor;
}

.feedback-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(45deg, var(--light-carmine), var(--mellow-apricot));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feedback-text {
    color: var(--text-secondary);
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Animations rétro */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes countdown {
    from { background: conic-gradient(var(--light-carmine) 360deg, transparent 360deg); }
    to { background: conic-gradient(var(--light-carmine) 0deg, transparent 0deg); }
}

@keyframes scanLine {
    0%, 100% { transform: translateX(-100%); opacity: 0; }
    50% { transform: translateX(100%); opacity: 1; }
}

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

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes neonFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Animation d'entrée des boutons */
.answer-btn {
    animation: slideInNeon 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    opacity: 0;
    transform: translateX(100px);
}

.answer-btn:nth-child(1) { animation-delay: 0.1s; }
.answer-btn:nth-child(2) { animation-delay: 0.2s; }
.answer-btn:nth-child(3) { animation-delay: 0.3s; }
.answer-btn:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInNeon {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive - Tablette */
@media (min-width: 768px) {
    .quiz-container {
        padding: 2rem;
        max-width: 700px;
        margin: 0 auto;
    }
    
    .answers-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .question-text {
        font-size: 1.6rem;
    }
    
    .timer-circle {
        width: 90px;
        height: 90px;
    }
    
    .timer-text {
        font-size: 1.8rem;
    }
    
    .quiz-info h1 {
        font-size: 2.5rem;
    }
}

/* Responsive - Desktop */
@media (min-width: 1024px) {
    .quiz-container {
        max-width: 900px;
        padding: 3rem;
    }
    
    .question-text {
        font-size: 2rem;
    }
    
    .answer-btn {
        font-size: 1.2rem;
        padding: 2rem 1.5rem;
        min-height: 90px;
    }
    
    .answer-shape {
        width: 36px;
        height: 36px;
    }
    
    .neon-triangle {
        border-left-width: 18px;
        border-right-width: 18px;
        border-bottom-width: 30px;
    }
    
    .neon-circle {
        width: 36px;
        height: 36px;
    }
    
    .neon-diamond,
    .neon-square {
        width: 30px;
        height: 30px;
    }
}

/* Mode sombre amélioré pour l'accessibilité */
@media (prefers-contrast: high) {
    :root {
        --neon-glow: 0 0 3px currentColor, 0 0 6px currentColor;
    }
    
    .answer-btn {
        border-width: 3px;
    }
}

/* Réduction des animations pour accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

