/* styles.css - Styles communs pour les quiz RGPD */

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* ÉCRAN DE CHARGEMENT */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 30px;
}

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

.loading-text {
    color: white;
    font-size: 1.2em;
    text-align: center;
    margin-bottom: 10px;
}

.loading-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
    text-align: center;
}

.loading-dots {
    display: inline-block;
    width: 20px;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Loader avec des points qui rebondissent */
.bounce-loader {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.bounce-loader div {
    width: 12px;
    height: 12px;
    background: #4CAF50;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.bounce-loader div:nth-child(1) { animation-delay: -0.32s; }
.bounce-loader div:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* PAGE D'ACCUEIL */
.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* En-tête page d'accueil */
.container > .header {
    text-align: center;
    color: white;
    margin-bottom: 50px;
    background: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.container > .header h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    color: white;
}

.container > .header p {
    font-size: 1.3em;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    color: white;
}

/* Grille des modules */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* Container pour centrer le Module 3 */
.module-3-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.module-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    max-width: 400px;
    width: 100%;
}

.module-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.module-icon {
    font-size: 3em;
    text-align: center;
    margin-bottom: 20px;
}

.module-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.module-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.module-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #888;
}

.module-available {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.module-available .module-title,
.module-available .module-description {
    color: white;
}

.module-available .module-stats {
    border-top-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
}

.module-coming-soon {
    background: #f5f5f5;
    opacity: 0.7;
    cursor: not-allowed;
}

.module-coming-soon:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.coming-soon-badge {
    background: #ff9800;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8em;
    display: inline-block;
    margin-top: 10px;
}

.footer {
    text-align: center;
    color: rgba(255,255,255,0.8);
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* PAGES DE QUIZ */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* En-tête des pages de quiz */
.quiz-container .header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.quiz-container .header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: white;
}

.quiz-container .header p {
    font-size: 1.1em;
    opacity: 0.9;
    color: white;
}

.shuffle-badge {
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 8px 16px;
    margin-top: 15px;
    font-size: 0.9em;
    display: inline-block;
}

.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.back-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.quiz-section {
    padding: 30px;
}

.question-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid #4CAF50;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.question-number {
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.question-text {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    border-color: #4CAF50;
    background: #f0f8f0;
}

.option.selected {
    border-color: #4CAF50;
    background: #e8f5e8;
}

.option.correct {
    border-color: #4CAF50;
    background: #d4edda;
    color: #155724;
}

.option.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
}

.explanation {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border-left: 4px solid #2196F3;
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.explanation.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.controls {
    text-align: center;
    margin-top: 30px;
}

.btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

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

.progress {
    background: #e0e0e0;
    height: 8px;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 4px;
    width: 0%;
}

.score {
    text-align: center;
    font-size: 1.2em;
    margin: 20px 0;
    color: #333;
}

.results-section {
    padding: 30px;
    display: none;
}

.final-score {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    border: 2px solid #4CAF50;
}

.final-score h2 {
    color: #4CAF50;
    margin-bottom: 20px;
    font-size: 2em;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #4CAF50;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: bold;
    margin: 20px auto;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container > .header h1 {
        font-size: 2.2em;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .module-3-container {
        grid-column: 1;
        margin-top: 0;
    }
    
    .module-card {
        padding: 25px;
        max-width: none;
    }
    
    .quiz-container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .quiz-section {
        padding: 20px;
    }
    
    .btn {
        padding: 10px 20px;
        margin: 5px;
    }
    
    .back-link {
        position: static;
        margin-bottom: 20px;
        display: inline-block;
    }
}

@media (max-width: 480px) {
    .module-stats {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}