/* Reset et Variables */
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --secondary: #3b82f6;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav a:hover {
    color: var(--primary);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

/* Container Principal */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.card-header {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Progress Bar */
.progress-container {
    margin: 1.5rem 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transition: width 0.5s ease;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Monde Visuel */
.world-container {
    position: relative;
    height: 400px;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 100%);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.city {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    transition: all 0.5s ease;
}

.building {
    position: absolute;
    bottom: 0;
    background: var(--dark);
    transition: background 0.5s ease;
}

.tree {
    position: absolute;
    bottom: 0;
    font-size: 3rem;
    transition: transform 0.3s ease;
}

.tree:hover {
    transform: scale(1.2);
}

.clouds {
    position: absolute;
    top: 20px;
    width: 100%;
    height: 100px;
}

.cloud {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.7;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(100px); }
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

/* Scenario Card */
.scenario-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 2rem auto;
}

.scenario-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
}

.scenario-description {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.choice-btn {
    padding: 1.5rem;
    background: var(--light);
    border: 3px solid transparent;
    border-radius: 15px;
    text-align: left;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice-btn:hover {
    background: white;
    border-color: var(--primary);
    transform: translateX(10px);
    box-shadow: var(--shadow);
}

/* Badges */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

.badge-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.badge-card.unlocked {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
}

.badge-card.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}

.badge-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.badge-name {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.badge-description {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.topic-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 5px solid var(--primary);
}

.topic-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.topic-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.topic-description {
    color: #6b7280;
    margin-bottom: 1rem;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.celebration {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-20px); }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}
