/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
    background: #f5f5f5;
    color: #1a1a1a;
    min-height: 100vh;
}

/* ── Header / navbar ── */
.navbar {
    background: url('../images/banniere.jpg') center/cover no-repeat;
    border-bottom: 4px solid #1a1a1a;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 140px;
}

.navbar .brand {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 2px 0 #1a1a1a;
    text-transform: uppercase;
}

.navbar .brand span {
    color: #fff;
}

.navbar .back-link {
    color: #fff;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 700;
    padding: .25rem .6rem;
    border-radius: 4px;
    background: rgba(0,0,0,.35);
    transition: background .15s;
}

.navbar .back-link:hover { background: rgba(0,0,0,.6); }

/* ── Page wrapper ── */
.container {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

/* ── Page title block ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a202c;
}

.notice {
    background: #fffbeb;
    border-left: 4px solid #f6ad55;
    padding: .6rem 1rem;
    border-radius: 0 6px 6px 0;
    font-size: .85rem;
    color: #744210;
    margin-bottom: 1.5rem;
}

/* ── Bouton ajouter ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1.2rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, opacity .15s;
    border: none;
}

.btn:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

/* ── Tableau ── */
.table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,.08), 0 4px 20px rgba(0,0,0,.06);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #fff;
}

thead th {
    padding: .85rem 1rem;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    text-align: left;
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid #edf2f7;
    transition: background .15s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f7fafc; }

tbody td {
    padding: .8rem 1rem;
    font-size: .9rem;
    vertical-align: middle;
}

/* Colonne résumé : tronquée */
.col-resume {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #718096;
    font-size: .82rem;
}

/* Colonne photo */
.col-photo img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    display: block;
}

/* Prix */
.col-prix { font-weight: 600; color: #276749; }

/* ── Boutons d'action ── */
.btn-sm {
    padding: .35rem .8rem;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: opacity .15s, transform .15s;
}

.btn-sm:hover { opacity: .82; transform: translateY(-1px); }

.btn-edit  { background: #ebf8ff; color: #2b6cb0; }
.btn-delete { background: #fff5f5; color: #c53030; }

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 1.5rem;
    font-size: .78rem;
    color: #a0aec0;
    margin-top: 2rem;
}

/* ── Formulaire ajouter ── */
.form-ajout {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
    padding: 2rem;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-ajout label {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-weight: 700;
    font-size: .9rem;
}

.form-ajout input[type="text"],
.form-ajout input[type="number"] {
    padding: .5rem .8rem;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s;
}

.form-ajout input:focus,
.form-ajout textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-ajout textarea {
    padding: .5rem .8rem;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    font-size: .95rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color .2s;
}
