/* Réinitialisation */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d5c4 100%);
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23d7ccc8" fill-opacity="0.1"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #3e2723;
}

.header {
    background: linear-gradient(135deg, #8d6e63 0%, #6d4c41 100%);
    color: #fff;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.container {
    flex: 1;
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
}

.game-area {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border: 3px solid #8d6e63;
}

.postcard-container {
    text-align: center;
    margin-bottom: 2rem;
}

.postcard-img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border: 8px solid #d7ccc8;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    transform: rotate(-1deg);
    transition: transform 0.3s ease;
}

.postcard-img:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Barre de progression */
.progress-container {
    margin: 1rem 0;
    background: rgba(141, 110, 99, 0.2);
    border-radius: 10px;
    overflow: hidden;
    height: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8d6e63, #a1887f);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 10px;
    min-width: 120px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #8d6e63;
}

.stat-label {
    color: #666;
    margin-top: 0.5rem;
}

.input-area {
    text-align: center;
    margin: 2rem 0;
}

/* Slider pour l'année */
.year-slider-container {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
}

.year-display {
    font-size: 4rem;
    font-weight: bold;
    color: #8d6e63;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    font-family: 'Georgia', serif;
}

.year-slider {
    width: 100%;
    max-width: 500px;
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #d7ccc8 0%, #8d6e63 50%, #6d4c41 100%);
    outline: none;
    border-radius: 10px;
    margin: 0 auto;
    display: block;
}

.year-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    background: #8d6e63;
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.year-slider::-webkit-slider-thumb:hover {
    background: #6d4c41;
    transform: scale(1.2);
}

.year-slider::-webkit-slider-thumb:active {
    transform: scale(1.3);
}

.year-slider::-moz-range-thumb {
    width: 30px;
    height: 30px;
    background: #8d6e63;
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.year-marks {
    display: flex;
    justify-content: space-between;
    max-width: 500px;
    margin: 0.5rem auto 0;
    color: #666;
    font-size: 0.9rem;
}

.btn {
    font-size: 1.2rem;
    padding: 0.75rem 2rem;
    margin: 0.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: 'Georgia', serif;
}

.btn-primary {
    background: #8d6e63;
    color: white;
}

.btn-primary:hover {
    background: #6d4c41;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #bcaaa4;
    color: white;
}

.btn-secondary:hover {
    background: #a1887f;
}

.feedback {
    text-align: center;
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    display: none;
}

.feedback.show {
    display: block;
    animation: slideIn 0.5s ease;
}

.feedback.correct {
    background: #c8e6c9;
    color: #2e7d32;
    border: 3px solid #4caf50;
}

.feedback.incorrect {
    background: #ffcdd2;
    color: #c62828;
    border: 3px solid #f44336;
}

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

.footer {
    background: #8d6e63;
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.coffee-btn {
    display: inline-block;
    background: #ffdd57;
    color: #3e2723;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.coffee-btn:hover {
    background: #ffd740;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.hidden {
  
  /* Style pour le décompte */
.feedback.countdown {
    background: linear-gradient(135deg, #fff9c4 0%, #ffecb3 100%);
    color: #f57c00;
    border: 3px solid #ffb74d;
    font-size: 1.8rem;
    animation: pulse 1s ease infinite;
}

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

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .game-area {
        padding: 1rem;
    }
    
    .stats {
        flex-direction: column;
    }
}