/* Variables */
:root {
    --primary-color: #053632;
    --secondary-color: #0A4F4A;
    --success-color: #34D399;
    --danger-color: #F87171;
    --background-color: #F9FAFB;
    --text-color: #1A1A1A;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* En-tête */
h1 {
    color: var(--primary-color);
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    color: var(--secondary-color);
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    letter-spacing: 2px;
}

/* Zone de scan */
#reader {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Informations produit */
.product-info {
    background: var(--background-color);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.product-info h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5em;
}

.product-info p {
    margin-bottom: 10px;
}

/* Formulaire de mise à jour */
.update-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#quantity {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1em;
    width: 100%;
}

.buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

/* Boutons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: inherit;
    width: 100%;
}

.btn.add {
    background-color: var(--success-color);
    color: white;
}

.btn.subtract {
    background-color: var(--danger-color);
    color: white;
}

.btn.reset {
    background-color: var(--primary-color);
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

/* Zone de debug */
.debug-section {
    margin-top: 30px;
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: 15px;
}

.debug-section summary {
    cursor: pointer;
    padding: 10px;
    color: var(--primary-color);
    font-weight: 600;
}

#debug-container {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: var(--border-radius);
    font-family: monospace;
    font-size: 14px;
    max-height: 300px;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    .btn {
        padding: 15px;
    }
}

.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
    animation: slideUp 0.3s ease-out;
    z-index: 1000;
}

.notification.success {
    background-color: var(--success-color);
}

.notification.error {
    background-color: var(--danger-color);
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.copyright {
    text-align: center;
    color: var(--primary-color);
    font-size: 0.9em;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-weight: 500;
}