* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Déclaration des polices */
@font-face {
    font-family: 'Corner Cafe';
    src: url('fonts/CornerCafe.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Avenir';
    src: url('fonts/Avenir-Book.eot');
    src: url('fonts/Avenir-Book.eot?#iefix') format('embedded-opentype'),
         url('fonts/Avenir-Book.woff2') format('woff2'),
         url('fonts/Avenir-Book.woff') format('woff'),
         url('fonts/Avenir-Book.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Avenir';
    src: url('fonts/Avenir-Medium.eot');
    src: url('fonts/Avenir-Medium.eot?#iefix') format('embedded-opentype'),
         url('fonts/Avenir-Medium.woff2') format('woff2'),
         url('fonts/Avenir-Medium.woff') format('woff'),
         url('fonts/Avenir-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Avenir';
    src: url('fonts/Avenir-Heavy.eot');
    src: url('fonts/Avenir-Heavy.eot?#iefix') format('embedded-opentype'),
         url('fonts/Avenir-Heavy.woff2') format('woff2'),
         url('fonts/Avenir-Heavy.woff') format('woff'),
         url('fonts/Avenir-Heavy.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --primary-color: #e74c3c;
    --secondary-color: #c0392b;
    --accent-color: #2ecc71;
    --dark-green: #134e5e;
    --light-green: #b6e1c3;
    --cream: #fef6e4;
    --yellow-bin: #f1c40f;
    --blue-bin: #3498db;
    --green-bin: #27ae60;
    --black-bin: #2c3e50;
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --success-color: #0A4847;
    --error-color: #DE614F;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: 0.3s ease;
    --border-radius: 20px;
}

body {
    font-family: 'Avenir', sans-serif;
    min-height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
    color: var(--text-dark);
    background-color: var(--light-green);
}

.container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    z-index: 1;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    pointer-events: none;
    z-index: -1;
}

/* Animation des nuages */
@keyframes floatingCloud {
    0% {
        transform: translateX(-150%);
    }
    100% {
        transform: translateX(150vw);
    }
}

/* Éléments de base */
.nuage {
    position: absolute;
    width: 180px;
    height: auto;
    z-index: -1;
}

/* Animation des nuages (sauf sur la page d'accueil) */
#game-screen .nuage,
#feedback-screen .nuage,
#results-screen .nuage {
    animation: floatingCloud 90s linear infinite;
}

#game-screen .nuage-1,
#feedback-screen .nuage-1,
#results-screen .nuage-1 {
    animation-duration: 120s;
}

#game-screen .nuage-2,
#feedback-screen .nuage-2,
#results-screen .nuage-2 {
    animation-delay: -60s;
    animation-duration: 100s;
}

#game-screen .nuage-3,
#feedback-screen .nuage-3,
#results-screen .nuage-3 {
    animation-delay: -30s;
    animation-duration: 80s;
}

/* Masquer la colline sur la page d'accueil */
#home-screen .hill {
    display: none;
}

.hill {
    position: absolute;
    bottom: -5vh;
    width: 120%;
    height: 35vh;
    background-color: var(--dark-green);
    border-top-left-radius: 50% 100%;
    border-top-right-radius: 50% 100%;
    z-index: 0;
    left: -10%;
}

.btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Avenir', sans-serif;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
    background-color: var(--secondary-color);
}

/* Page d'accueil */
#home-screen {
    background-image: url('images/fondjeu.jpg');
    background-size: cover;
    background-position: center;
    justify-content: center;
    overflow: hidden;
}

.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 2rem;
    padding-top: 15vh;
}

.game-title {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Corner Cafe', cursive;
    letter-spacing: 2px;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.1);
}

.slogan {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-family: 'Avenir', sans-serif;
}

.nature-element {
    position: absolute;
    z-index: 1;
}

.tree {
    bottom: 20vh;
    left: 10%;
    width: 120px;
    height: auto;
}

.bird {
    top: 40%;
    left: 20%;
    width: 80px;
    height: auto;
}

.flower {
    bottom: 25vh;
    left: 30%;
    width: 70px;
    height: auto;
}

.recycling-bin {
    bottom: 20vh;
    right: 15%;
    width: 150px;
    height: auto;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--dark-green);
    font-family: 'Avenir', sans-serif;
}

/* Barre de progression */
.progress-container {
    width: 100%;
    height: 15px;
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease-out;
    border-radius: 10px;
}

.progress-text {
    position: absolute;
    left: 50%;
    top: -25px;
    transform: translateX(-50%);
    font-size: 1.3rem;
    font-weight: bold;
    color: #E85A50;
    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.8);
    padding: 0 5px;
    z-index: 5;
}

/* Écran de jeu */
#game-screen {
    background-color: var(--light-green);
    justify-content: flex-start;
    padding-top: 2rem;
}

.game-header {
    width: 100%;
    text-align: center;
    padding: 1rem 2rem;
    z-index: 2;
}

.game-header h2 {
    color: #E85A50;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Corner Cafe', cursive;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    letter-spacing: 1px;
}

.game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 2rem;
    z-index: 2;
}

.waste-item-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    min-height: 250px;
}

.waste-item {
    background-color: transparent;
    cursor: grab;
    transition: transform 0.2s;
    text-align: center;
    min-width: 300px;
    min-height: 200px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    touch-action: none;
    user-select: none;
    gap: 30px;
}

.waste-item img {
    max-width: 180px;
    max-height: 180px;
}

.waste-name {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    text-align: center;
    font-family: 'Corner Cafe', cursive;
}

.bins-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding: 1rem;
    margin-top: auto;
    margin-bottom: 2rem;
    z-index: 3;
}

.bin {
    position: relative;
    transition: transform var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 10px;
    width: 180px;
}

.bin:hover {
    transform: scale(1.05);
}

.bin img {
    width: 100%;
    height: auto;
}

.bin-label {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    text-align: center;
    font-family: 'Avenir', sans-serif;
}

/* Écran de feedback */
#feedback-screen {
    background-color: var(--light-green);
    justify-content: center;
    background-image: linear-gradient(to bottom, #76C5AB, #A6D8C3);
}

.feedback-content {
    background-color: #FFEFD3;
    padding: 0;
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 90%;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.feedback-header {
    width: 100%;
    background-color: var(--success-color);
    color: white;
    padding: 1rem;
    text-align: center;
}

.feedback-wrong .feedback-header {
    background-color: var(--error-color);
}

.feedback-correct .feedback-header {
    background-color: var(--success-color);
}

#feedback-title {
    font-size: 2.25rem;
    font-family: 'Corner Cafe', cursive;
    letter-spacing: 1px;
    line-height: 1.2;
    text-transform: uppercase;
    color: white;
}

/* Layout pour les écrans de feedback */
.feedback-layout {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    padding: 2rem;
    gap: 2rem;
}

.feedback-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.feedback-right {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.feedback-icon {
    width: 100%;
    max-width: 220px;
    height: auto;
    margin-bottom: 1rem;
}

.bin-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-dark);
    text-align: center;
    font-family: 'Avenir', sans-serif;
}

.feedback-waste {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    font-family: 'Corner Cafe', cursive;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    color: var(--text-dark);
}

.feedback-message {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-family: 'Avenir', sans-serif;
    line-height: 1.5;
    font-weight: 500;
    color: var(--text-dark);
}

.pollution-time {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    font-family: 'Avenir', sans-serif;
    color: var(--error-color);
}

#next-btn {
    margin: 1rem 0 2rem 0;
    align-self: center;
}

/* Écran de résultats */
#results-screen {
    background-color: var(--primary-color);
    justify-content: center;
}

.results-content {
    width: 90%;
    max-width: 600px;
    text-align: center;
    color: white;
    z-index: 2;
}

.results-content h2 {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: #FFEFD3;
    font-family: 'Corner Cafe', cursive;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.results-content p {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
    font-family: 'Avenir', sans-serif;
}

#total-pollution, #error-count {
    font-weight: bold;
    margin: 1.5rem 0;
    font-size: 2rem;
    padding: 1rem;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    font-family: 'Avenir', sans-serif;
}

/* Animation pour le drag and drop */
.dragging {
    opacity: 0.8;
    transform: scale(1.1) !important;
    z-index: 1000;
}

.bin-highlight {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .game-title {
        font-size: 3.5rem;
    }
    
    .slogan {
        font-size: 1.2rem;
    }
    
    .waste-name {
        font-size: 1.5rem;
    }
    
    .bins-container {
        flex-wrap: wrap;
    }
    
    .bin {
        margin: 10px;
    }
    
    .feedback-layout {
        flex-direction: column-reverse;
        align-items: center;
    }
    
    .feedback-left {
        width: 100%;
        align-items: center;
        text-align: center;
    }
    
    .feedback-right {
        margin-bottom: 2rem;
    }
    
    #feedback-title {
        font-size: 2rem;
        text-align: center;
    }
    
    #feedback-message {
        text-align: center;
    }
    
    .btn-feedback {
        align-self: center;
    }
    
    .feedback-icon {
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 2.5rem;
    }
    
    .waste-item img {
        max-width: 100px;
        max-height: 100px;
    }
    
    .bin {
        width: 70px;
    }
    
    .bin-label {
        font-size: 0.7rem;
    }
}

/* Suppression des accents pour Corner Cafe */
.game-title, 
#feedback-title, 
.waste-name, 
.game-header h2, 
.results-content h2,
.feedback-waste {
    text-transform: uppercase;
}

/* Logo du jeu */
.logo-container {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 10;
}

.game-logo {
    width: 100px;
    height: auto;
} 