body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f6fb;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #003366;
    color: #fff;
    padding: 10px 20px;
}

.topbar h1 {
    margin: 0;
}

.topbar .btn {
    margin-left: 10px;
}

.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 4px;
    background: #00A878;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn.btn-secondary {
    background: #555;
}

.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-error {
    background: #ffe3e3;
    color: #b71c1c;
}

.alert-success {
    background: #e3ffe8;
    color: #1b5e20;
}

/* Login */
.login-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 360px;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 20px;
}

.login-card input {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
}

/* Grille des cartes */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 15px;
}

.card-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    overflow: hidden;
    transition: transform .1s, box-shadow .1s;
}

.card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #e0e0e0;
}

.card-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
}

.card-info {
    padding: 10px 12px 12px;
}

.card-info h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.card-info p {
    margin: 0;
    color: #555;
}

/* Formulaires */
.form-card .form-row {
    margin-bottom: 12px;
}

.form-card label {
    display: block;
    margin-bottom: 4px;
}

.form-card input,
.form-card textarea {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Fiche */
.card-details {
    margin-bottom: 20px;
}

.card-images .images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.card-images figure {
    margin: 0;
}

.card-images img {
    max-width: 250px;
    height: auto;
    display: block;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-images figcaption {
    text-align: center;
    margin-top: 5px;
}

