*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: system-ui, sans-serif;
    background: #f5f5f5;
    color: #222;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

.app-header h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Formulaire d'ajout */
.add-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.add-form input {
    flex: 1;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.add-form input:focus { border-color: #4a90e2; }

.add-form button {
    padding: 0.75rem 1.25rem;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.add-form button:active { background: #357abd; }

/* Liste vide */
.empty {
    text-align: center;
    color: #999;
    padding: 2rem 0;
}

/* Articles */
.item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    gap: 0.5rem;
}

.item--bought {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.item--bought .item__name {
    color: #4caf50;
    font-weight: 600;
}

.item--unavailable {
    background: #ffebee;
    border-left: 4px solid #f44336;
}

.item--unavailable .item__name {
    color: #c62828;
    font-weight: 600;
}

.item__name {
    flex: 1;
    font-size: 1rem;
    word-break: break-word;
}

.item__actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.btn {
    border: none;
    background: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    line-height: 1;
}

.btn:active { opacity: 0.6; }

/* Desktop */
@media (min-width: 480px) {
    .app-header h1 { font-size: 2rem; }
    .btn { font-size: 1.4rem; }
}
