/* Espace administrateur (complète style.css) */

.card-login { max-width: 420px; margin-top: 6vh; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

body.admin { display: block; padding: 0; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--bord);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--violet-fonce); font-weight: 600; }
.brand img { border-radius: 8px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-right form { margin: 0; }
.who { color: var(--gris); font-size: .9rem; }

.btn-ghost {
    display: inline-block;
    padding: 9px 14px;
    border: 1.5px solid var(--bord);
    border-radius: 10px;
    background: #fff;
    color: var(--violet-fonce);
    font: 500 .9rem Inter, system-ui, sans-serif;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--violet); background: var(--violet-pale); }
.btn-small { width: auto; margin: 0; padding: 10px 18px; font-size: .92rem; }

.admin-main { max-width: 1240px; margin: 0 auto; padding: 24px; }
.admin-main h1 { text-align: left; margin-bottom: 18px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 10px 30px -18px rgba(106, 35, 112, .4); }
.stat-n { display: block; font: 700 1.7rem "Playfair Display", Georgia, serif; color: var(--violet-fonce); }
.stat-l { color: var(--gris); font-size: .88rem; }

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 10px 30px -18px rgba(106, 35, 112, .4);
}
.filters .f-search { flex: 1 1 280px; }
.filters input[type=search], .filters select {
    width: 100%;
    font: inherit;
    padding: 10px 12px;
    border: 1.5px solid var(--bord);
    border-radius: 10px;
    background: #fff;
    color: var(--texte);
}
.filters input:focus, .filters select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(142, 58, 140, .15); }
.f-export { margin-left: auto; }

.count { color: var(--gris); margin: 16px 2px 10px; font-size: .92rem; }

.table-wrap { background: #fff; border-radius: 14px; box-shadow: 0 10px 30px -18px rgba(106, 35, 112, .4); overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
.list th {
    text-align: left;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gris);
    padding: 12px 14px;
    border-bottom: 1.5px solid var(--bord);
    background: #fcf9fc;
}
.list td { padding: 12px 14px; border-bottom: 1px solid #f0e8f0; vertical-align: top; }
.list tbody tr:last-child td { border-bottom: 0; }
.list tbody tr:hover { background: #fdfafd; }
.list a { color: var(--violet-fonce); text-decoration: none; }
.list a:hover { text-decoration: underline; }
.nowrap { white-space: nowrap; }
.muted { color: var(--gris); }
.about { max-width: 320px; line-height: 1.45; }
.about summary { cursor: pointer; }
.about details[open] summary { margin-bottom: 6px; color: var(--gris); }

.badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 500; vertical-align: 1px; }
.badge-f { background: #fbe7f3; color: #9b2c6f; }
.badge-h { background: #e9eefb; color: #2f4a8a; }
.yes { color: var(--ok); font-weight: 500; }

.empty { background: #fff; border-radius: 14px; padding: 40px; text-align: center; color: var(--gris); }

.pager { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }

@media (max-width: 900px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .topbar { padding: 10px 14px; }
    .who { display: none; }
    .admin-main { padding: 16px 12px; }
    /* Tableau en fiches sur mobile */
    .table-wrap { background: transparent; box-shadow: none; }
    .list thead { display: none; }
    .list, .list tbody, .list tr, .list td { display: block; }
    .list tr { background: #fff; border-radius: 14px; margin-bottom: 12px; padding: 6px 0; box-shadow: 0 10px 30px -18px rgba(106, 35, 112, .4); }
    .list td { border: 0; padding: 6px 16px; }
    .list td::before { content: attr(data-label); display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gris); }
    .about { max-width: none; }
    .f-export { margin-left: 0; }
}

.back-link { color: var(--violet-fonce); text-decoration: none; font-weight: 500; }
.back-link:hover { text-decoration: underline; }
