/* Épicerie — Suivi des prix — Styles */

:root {
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --border: #dee2e6;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --text: #1f2937;
    --text-muted: #6b7280;
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    text-align: center;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

main {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    min-width: 140px;
}

.control-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

select,
input[type="date"] {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--bg);
}

select[multiple] {
    min-height: 60px;
}

#btn-search {
    padding: 0.55rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-end;
    transition: background 0.15s;
}

#btn-search:hover {
    background: var(--primary-hover);
}

/* Chart */
.chart-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Table */
.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    overflow-x: auto;
}

.table-container h2 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

#price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#price-table th,
#price-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

#price-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#price-table tbody tr:hover {
    background: var(--bg);
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 640px) {
    .controls {
        flex-direction: column;
    }

    .control-group {
        min-width: 100%;
    }

    header h1 {
        font-size: 1.2rem;
    }
}