:root {
    --primary: #6b3fa0;
    --primary-dark: #4a2a70;
    --bg: #faf7ff;
    --text: #2c2c2c;
    --danger: #c0392b;
    --success: #2e7d32;
    --border: #ddd;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.site-header {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-header .logo {
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
}

.site-header nav a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.9rem;
}

.site-header nav a:hover { text-decoration: underline; }

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

.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: #777;
    font-size: 0.85rem;
}

.flash {
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}
.flash-success { background: #e6f4ea; color: var(--success); border: 1px solid var(--success); }
.flash-error { background: #fdecea; color: var(--danger); border: 1px solid var(--danger); }

.hero { text-align: center; padding: 2rem 0; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.feature { background: white; padding: 1.2rem; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

.btn, .btn-small {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn:hover, .btn-small:hover { background: var(--primary-dark); }
.btn-small { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.btn-secondary { background: #999; }
.btn-danger { background: var(--danger); }

.form-page { max-width: 500px; background: white; padding: 1.5rem; border-radius: 10px; }
.form-page label { display: block; margin-bottom: 1rem; font-weight: 600; }
.form-page input, .form-page select, .form-page textarea {
    display: block;
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.3rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: normal;
}

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }

.stamps-table { width: 100%; border-collapse: collapse; background: white; }
.stamps-table th, .stamps-table td { padding: 0.6rem; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9rem; }
.thumb { width: 50px; height: auto; border-radius: 4px; }
.thumb-large { max-width: 300px; border-radius: 8px; margin: 1rem 0; }

.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.catalog-card { background: white; padding: 1rem; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

.stats-summary { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.stat-box { background: white; padding: 1rem 1.5rem; border-radius: 8px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.stat-box strong { display: block; font-size: 1.8rem; color: var(--primary); }

.bar-list { list-style: none; padding: 0; }
.bar-list li { margin-bottom: 0.5rem; }
.bar { height: 8px; background: var(--primary); border-radius: 4px; margin-top: 2px; }

.messagerie { display: flex; gap: 1.5rem; }
.conversations { width: 200px; background: white; padding: 1rem; border-radius: 8px; }
.thread { flex: 1; background: white; padding: 1rem; border-radius: 8px; }
.messages-list { max-height: 400px; overflow-y: auto; margin-bottom: 1rem; }
.message { padding: 0.5rem; margin-bottom: 0.3rem; border-radius: 6px; background: #f0f0f0; }
.message.mine { background: #e3d5f5; text-align: right; }
.message small { display: block; color: #999; font-size: 0.75rem; }

.filters { margin-bottom: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filters input { padding: 0.4rem; border: 1px solid var(--border); border-radius: 6px; }

.admin-menu { list-style: none; padding: 0; }
.admin-menu li { margin-bottom: 0.8rem; }
.admin-menu a { font-size: 1.1rem; text-decoration: none; color: var(--primary-dark); }

.wishlist { list-style: none; padding: 0; }
.wishlist li { background: white; padding: 0.6rem 1rem; margin-bottom: 0.4rem; border-radius: 6px; display: flex; justify-content: space-between; }
.inline-form { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.inline-form input { flex: 1; padding: 0.5rem; border: 1px solid var(--border); border-radius: 6px; }
