:root {
    --bg: #eef1f5;
    --fg: #151718;
    --accent: #3b82f6;
    --card: #ffffffcc;
    --radius: 2em;
    --shadow: 0 8px 30px rgba(0,0,0,0.08);
    --blur: 16px;
    --smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --green: #10b981;
    --red: #ef4444;
}

.dark {
    --bg: #0c0e11;
    --fg: #f0f0f0;
    --card: #1a1c20cc;
    --shadow: 0 8px 30px rgba(0,0,0,0.5);
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--fg);
    transition: background 0.5s var(--smooth), color 0.5s var(--smooth);
}

header {
    padding: 2em 1em;
    background: var(--card);
    backdrop-filter: blur(var(--blur));
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 900px;
    margin: auto;
    padding: 1em;
}

.card {
    background: var(--card);
    padding: 2em;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2em;
    backdrop-filter: blur(var(--blur));
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

button {
    padding: 0.9em 1.6em;
    border: none;
    border-radius: var(--radius);
    background: var(--accent);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.25s var(--smooth);
    box-shadow: 0 4px 18px rgba(59,130,246,0.35);
}
button:hover { transform: translateY(-2px); opacity: 0.9; }
button:active { transform: scale(0.97); }

/* --- QUIZ STYLES (Conservés) --- */
.quiz-question { font-size: 1.4rem; font-weight: 600; margin-bottom: 1.5em; }
.quiz-option { background: var(--bg); color: var(--fg); padding: 1.2em; border-radius: var(--radius); cursor: pointer; margin-bottom: 1em; border: 2px solid transparent; transition: 0.25s var(--smooth); box-shadow: var(--shadow); }
.quiz-option:hover { transform: scale(1.03); border-color: var(--accent); }
.quiz-option.correct { background: #22c55e !important; color: white; border-color: #22c55e !important; transform: scale(1.03); }
.quiz-option.wrong { background: #ef4444 !important; color: white; border-color: #ef4444 !important; transform: scale(1.03); }
.progress { height: 14px; background: rgba(0,0,0,0.15); border-radius: 2em; overflow: hidden; margin-bottom: 1.8em; }
.progress-bar { height: 100%; width: 0%; background: var(--accent); transition: width 0.5s var(--smooth); box-shadow: 0 2px 10px rgba(59,130,246,0.5); }
#quiz-end { text-align: center; font-size: 1.5rem; font-weight: 700; padding: 2em; animation: fadeIn 0.5s ease; }

/* --- NAVIGATION STYLES (Conservés) --- */
nav { display: flex; justify-content: center; gap: 10px; padding: 1em 0; position: sticky; bottom: 0; background: var(--card); backdrop-filter: blur(var(--blur)); z-index: 100; }
nav button { background: var(--card); color: var(--fg); border: 2px solid var(--fg); transition: 0.25s; box-shadow: none; font-weight: 600; }
nav button.active { background: var(--accent); color: white; border-color: var(--accent); box-shadow: 0 4px 18px rgba(59,130,246,0.35); }

/* --- VILLAGE MAP STYLES (Conservés) --- */
.village-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; padding: 2em 0; }
.building { background: var(--accent); color: white; text-align: center; padding: 2.5em 1em; border-radius: var(--radius); cursor: pointer; font-weight: 700; transition: transform 0.3s var(--smooth), box-shadow 0.3s; box-shadow: 0 6px 20px rgba(59,130,246,0.4); min-height: 80px; display: flex; align-items: center; justify-content: center; }
.building:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(59,130,246,0.5); }

/* --- SECTIONS (TO HIDE/SHOW) (Conservés) --- */
.section { display: none; }
.section.active { display: block; }

/* -------------------------------------- */
/* --- NOUVEAUX STYLES POUR LE JEU 1 --- */
/* -------------------------------------- */

.drag-items-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    min-height: 120px;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px dashed rgba(0,0,0,0.1);
    border-radius: var(--radius);
}

.draggable-item {
    padding: 10px 15px;
    background: var(--accent);
    color: white;
    border-radius: 1em;
    cursor: grab;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: opacity 0.3s;
}
.draggable-item:active { cursor: grabbing; }

.drop-zones-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.drop-zone {
    min-height: 200px;
    background: var(--bg);
    border: 3px solid var(--fg);
    border-radius: var(--radius);
    padding: 15px;
    text-align: center;
    transition: background-color 0.3s, border-color 0.3s;
}

/* Effet de glisser au-dessus */
.drop-zone.hover {
    border-color: var(--accent);
    background-color: rgba(59,130,246,0.1);
}

/* Effet après un drop correct ou incorrect */
#game-feedback.correct { color: var(--green); }
#game-feedback.wrong { color: var(--red); }
