/* Variables CSS pour la palette sociale/solidaire */
:root {
    --primary-color: #FFD93D; /* Jaune optimiste pour contraste */
    --secondary-color: #FF6B35; /* Orange chaleureux */
    --accent-color: #232526;
    --background-color: #181A1B;
    --card-background: rgba(30,32,34,0.85);
    --text-primary: #F8F9FA;
    --text-secondary: #B0B3B8;
    --success-color: #28A745;
    --warning-color: #FFC107;
    --border-radius: 12px;
    --shadow: 0 4px 16px rgba(0,0,0,0.25);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.35);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #181A1B 0%, #232526 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at 60% 20%, rgba(255,255,255,0.08) 0%, rgba(0,0,0,0.0) 60%),
                radial-gradient(circle at 20% 80%, rgba(255,255,255,0.10) 0%, rgba(0,0,0,0.0) 70%);
    backdrop-filter: blur(6px);
}

#app {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Section Score */
.score-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.score-section h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-per-second {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Section Clicker */
.clicker-section {
    text-align: center;
    margin-bottom: 40px;
}

.main-button {
    width: min(400px, 25vw);
    height: min(400px, 25vw);
    min-width: 200px;
    min-height: 200px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    padding: 0;
    margin: 0;
}

.main-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.main-button:active {
    transform: scale(0.95);
}

.main-button.clicked {
    animation: clickAnimation 0.1s ease;
}

@keyframes clickAnimation {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.9); }
}

.food-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
    padding: 0;
    margin: 0;
    display: block;
}

.main-button:hover .food-icon {
    transform: scale(1.1);
}

.button-text {
    color: white;
    font-size: min(1.2rem, 3vw);
    font-weight: 600;
    text-align: center;
    margin: 0;
    line-height: 1.2;
}

/* Section Améliorations */
.upgrades-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0;
}

@media (min-width: 1200px) {
    .upgrades-section {
        margin-left: -700px;
        padding-left: 0;
    }
}

.upgrades-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.upgrades-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    justify-items: start;
}

@media (max-width: 900px) {
    .upgrades-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .upgrades-grid {
        grid-template-columns: 1fr;
    }
}

.upgrade-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.upgrade-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.upgrade-card.affordable {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(40,167,69,0.10) 0%, rgba(40,167,69,0.05) 100%);
}

.upgrade-card.unaffordable {
    opacity: 0.7;
    border-color: var(--text-secondary);
}

.upgrade-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.upgrade-icon {
    font-size: 2rem;
}

.upgrade-header h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 600;
}

.upgrade-description {
    color: #fff;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.upgrade-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 600;
}

.upgrade-effect {
    color: #FFD93D;
}

.upgrade-cost {
    color: #FF6B35;
}

.upgrade-count {
    text-align: center;
    margin-bottom: 15px;
    color: #fff;
    font-weight: 500;
}

.buy-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #E55A2B 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.buy-button:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: auto;
}

footer p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    #app {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .score {
        font-size: 2.5rem;
    }
    
    .main-button {
        width: 300px;
        height: 300px;
    }
    
    .food-icon {
        width: 90px;
        height: 90px;
    }
    
    .button-text {
        font-size: 1rem;
    }
    
    .upgrades-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .upgrade-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .score {
        font-size: 2rem;
    }
    
    .main-button {
        width: 250px;
        height: 250px;
    }
    
    .food-icon {
        width: 70px;
        height: 70px;
    }
    
    .button-text {
        font-size: 0.9rem;
    }
}

/* Animations supplémentaires */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.upgrade-card {
    animation: fadeIn 0.5s ease;
}

/* Effet de particules pour le clic */
.main-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.main-button:active::before {
    width: 100%;
    height: 100%;
    opacity: 0;
} 

/* Onglet Bonus */
.bonus-tab {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 24px 20px;
    min-width: 220px;
    max-width: 260px;
    margin-left: 0;
    margin-right: 0;
    align-self: flex-start;
}
.bonus-tab h2 {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-bottom: 18px;
    text-align: center;
}
.bonus-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.bonus-list li {
    background: var(--accent-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 14px 16px 18px 16px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    text-align: center;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.bonus-list li.bonus-owned {
    background: linear-gradient(90deg, #28A745 0%, #B0F2B4 100%);
    color: #181A1B;
    opacity: 0.7;
}
.bonus-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.bonus-desc {
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 2px;
}
.bonus-cost {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 6px;
}
.buy-bonus-button {
    padding: 7px 18px;
    background: linear-gradient(90deg, #FFD93D 0%, #FF6B35 100%);
    color: #181A1B;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    margin-top: 2px;
}
.buy-bonus-button:disabled {
    background: #B0B3B8;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
}
.buy-bonus-button:not(:disabled):hover {
    background: linear-gradient(90deg, #FF6B35 0%, #FFD93D 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.03);
} 

.reset-button {
    margin-top: 18px;
    width: 100%;
    padding: 10px 0;
    background: linear-gradient(90deg, #FF6B35 0%, #FFD93D 100%);
    color: #181A1B;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
.reset-button:hover {
    background: linear-gradient(90deg, #FFD93D 0%, #FF6B35 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.03);
} 

.section-separator {
    width: 80%;
    margin: 24px auto 32px auto;
    border: none;
    border-top: 2px solid rgba(255,255,255,0.12);
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
} 

@media (min-width: 1200px) {
    .bonus-tab {
        margin-left: 80px;
    }
} 

.bonus-secret {
    color: #e53935;
    font-weight: bold;
    margin-bottom: 6px;
} 

@media (max-width: 600px) {
    main > div {
        flex-direction: column !important;
        gap: 16px !important;
        align-items: stretch !important;
    }
    .score-section, .upgrades-section, .bonus-tab {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box;
    }
    .main-button {
        width: 200px !important;
        height: 200px !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
    .food-icon {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    .button-text {
        font-size: 1rem !important;
    }
    .upgrades-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .upgrade-card {
        padding: 10px !important;
    }
    .bonus-list, .bonus-card, .bonus-tab {
        padding: 10px !important;
    }
    .buy-button, .buy-bonus-button {
        font-size: 0.95rem !important;
        padding: 8px 0 !important;
    }
    .upgrade-header h3, .bonus-title {
        font-size: 1.1rem !important;
    }
    .upgrade-description, .bonus-desc, .bonus-cost {
        font-size: 0.95rem !important;
    }
    .upgrade-count {
        font-size: 0.95rem !important;
    }
    footer {
        font-size: 0.9rem !important;
        padding: 10px !important;
    }
} 