Files
mon-petit-cinema/css/admin.css
T
2026-06-21 09:51:35 +02:00

193 lines
10 KiB
CSS

/* ══════════════════════════════════════════════════════════════
admin.css — Backoffice Mon Cinéma (Refonte Ergonomique)
═══════════════════════════════════════════════════════════════ */
:root {
--bg: #0a0a0c; --surface: #121216; --surface-card: #1a1a20;
--border: #2a2a35; --text: #e8e8ed; --muted: #8a8a9a;
--gold: #c9a84c; --gold-dim: rgba(201, 168, 76, 0.2);
--shadow-sm: 0 4px 12px rgba(0,0,0,0.4); --shadow-lg: 0 10px 30px rgba(0,0,0,0.6);
--radius: 10px; --radius-lg: 14px;
}
body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 2rem; }
* { box-sizing: border-box; }
/* HEADER */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.header-titles h1 { margin: 0; font-size: 1.8rem; font-family: serif; }
.header-titles h1 span { color: var(--gold); }
.header-titles p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.9rem; }
.header-actions { display: flex; gap: 0.6rem; }
.btn-action { padding: 0.6rem 1rem; background: var(--surface-card); border: 1px solid var(--border); color: var(--text); border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; transition: all 0.2s; }
.btn-action:hover { border-color: var(--gold); color: var(--gold); }
.btn-action.secondary { background: var(--gold); color: #000; border: none; font-weight: 600; }
.btn-action.secondary:hover { background: #b5953f; }
/* ONGLETS CENTRÉS */
.tabs-container { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.tab-btns { display: inline-flex; background: var(--surface); padding: 0.4rem; border-radius: 12px; border: 1px solid var(--border); }
.tab-btn { background: transparent; border: none; color: var(--muted); padding: 0.6rem 1.2rem; border-radius: 8px; cursor: pointer; font-size: 0.95rem; display: flex; align-items: center; gap: 0.4rem; transition: all 0.2s; }
.tab-btn:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.tab-btn.active { background: var(--surface-card); color: var(--gold); box-shadow: var(--shadow-sm); font-weight: 600; }
/* TOOLBAR */
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.search-box { position: relative; flex: 1; max-width: 400px; }
.search-box i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { width: 100%; padding: 0.7rem 1rem 0.7rem 2.8rem; background: var(--surface-card); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 0.95rem; outline: none; }
.search-box input:focus { border-color: var(--gold); }
.admin-count { color: var(--muted); font-size: 0.9rem; }
/* TABLEAU (Fixe, sans scroll horizontal) */
.table-container { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); max-height: 65vh; overflow-y: auto; }
.admin-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.admin-table thead th { background: var(--surface); color: var(--muted); padding: 0.9rem 1rem; border-bottom: 2px solid var(--border); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; text-align: left; position: sticky; top: 0; z-index: 10; }
.admin-table tbody td { padding: 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-table tbody tr:hover td { background: var(--surface); }
.admin-table tbody tr:last-child td { border-bottom: none; }
/* Largeurs fixes pour éviter le débordement */
.admin-table thead th:nth-child(1), .admin-table tbody td:nth-child(1) { width: 50px; text-align: center; }
.admin-table thead th:nth-child(2), .admin-table tbody td:nth-child(2) { width: auto; }
.admin-table thead th:nth-child(3), .admin-table tbody td:nth-child(3) { width: 80px; }
.admin-table thead th:nth-child(4), .admin-table tbody td:nth-child(4) { width: 25%; }
.admin-table thead th:nth-child(5), .admin-table tbody td:nth-child(5) { width: 20%; }
.admin-table thead th:nth-child(6), .admin-table tbody td:nth-child(6) { width: 110px; text-align: right; }
.tbl-stars .half-star { color: var(--muted); }
.badge-format { background: var(--surface); padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.8rem; border: 1px solid var(--border); }
.tbl-actions { display: inline-flex; gap: 0.5rem; }
.tbl-actions button { background: transparent; border: 1px solid var(--border); color: var(--muted); cursor: pointer; padding: 0.4rem; border-radius: 6px; transition: all 0.2s; }
.tbl-actions button:hover { color: var(--gold); border-color: var(--gold); }
.tbl-actions button.del:hover { color: #ff4757; border-color: #ff4757; background: rgba(255,71,87,0.1); }
/* PAGINATION */
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.5rem; padding: 1rem 0; }
.pagination button { background: var(--surface-card); border: 1px solid var(--border); color: var(--muted); padding: 0.5rem 0.8rem; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.pagination button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.pagination button.active { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 600; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-info { color: var(--muted); font-size: 0.85rem; margin-right: 0.5rem; }
/* MODALES */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 1000; }
.overlay.open { opacity: 1; visibility: visible; }
.modal { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; width: 90%; max-width: 600px; position: relative; transform: translateY(20px); transition: all 0.3s ease; max-height: 90vh; overflow-y: auto; }
.overlay.open .modal { transform: translateY(0); }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 1.2rem; }
.modal-close:hover { color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.form-grid input, .form-grid textarea { width: 100%; padding: 0.7rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text); outline: none; }
.form-grid input:focus, .form-grid textarea:focus { border-color: var(--gold); }
.form-grid textarea { grid-column: span 2; min-height: 80px; resize: vertical; }
input[type="checkbox"] { accent-color: var(--gold); width: 16px; height: 16px; cursor: pointer; }
/* ══════════════════════════════════════════════════════════════
RESPONSIVE MOBILE (Transformation en Cartes)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
.admin-header {
flex-direction: column;
align-items: flex-start;
}
.header-actions {
width: 100%;
flex-wrap: wrap;
}
.form-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
.form-group[style*="grid-column: span 2"] {
grid-column: span 1 !important;
}
}
@media (max-width: 768px) {
/* Nettoyage du conteneur tableau */
.table-container {
background: transparent;
border: none;
box-shadow: none;
overflow-y: visible;
max-height: none;
}
.admin-table, .admin-table tbody {
display: block;
width: 100%;
}
.admin-table thead {
display: none; /* Masquer l'en-tête sur mobile */
}
/* Transformation des lignes en Grid Layout de cartes */
.admin-table tbody tr {
display: grid;
grid-template-columns: 40px 80px 1fr;
grid-template-areas:
"check poster title"
"check poster year"
"check poster director"
"check poster badges"
"actions actions actions";
gap: 0.4rem 1rem;
background: var(--surface-card);
border: 1px solid var(--border);
border-radius: var(--border-radius-md);
margin-bottom: 1rem;
padding: 1rem;
box-shadow: var(--shadow-sm);
align-items: center;
}
.admin-table td {
display: block;
padding: 0;
border: none;
text-align: left;
}
.admin-table td:nth-child(1) { grid-area: check; }
.admin-table td:nth-child(2) { grid-area: poster; }
.thumb, .thumb-ph {
width: 80px; height: 115px; margin: 0;
}
.admin-table td:nth-child(3) { grid-area: title; align-self: end; }
.admin-table td:nth-child(3) strong {
font-size: 1.1rem; color: var(--gold);
}
.admin-table td:nth-child(4) { grid-area: year; font-size: 0.85rem; color: var(--muted); }
.admin-table td:nth-child(4)::before { content: '🗓 '; }
.admin-table td:nth-child(5) { grid-area: director; font-size: 0.85rem; color: var(--muted); }
.admin-table td:nth-child(5)::before { content: '🎬 '; }
.admin-table td:nth-child(6) { grid-area: badges; margin-top: 0.5rem; }
.admin-table td:nth-child(7) {
grid-area: actions;
display: flex;
justify-content: stretch;
margin-top: 1rem;
padding-top: 1rem;
border-top: 1px dashed var(--border);
}
.tbl-actions {
width: 100%;
justify-content: space-between;
}
.tbl-actions button {
flex: 1; /* Boutons actions prennent toute la largeur dispo en bas */
height: 44px; /* Plus facile à cliquer sur mobile */
}
}