Actualiser css/admin.css

This commit is contained in:
2026-06-20 21:23:46 +02:00
parent 0375308337
commit cc1ee12dd0
+134 -108
View File
@@ -230,7 +230,8 @@
background: var(--surface-card);
border: 1px solid var(--border);
border-radius: 12px;
overflow: hidden;
overflow-y: auto; /* Permet le défilement vertical */
max-height: 75vh; /* Évite que le tableau prenne toute la page */
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
@@ -242,16 +243,16 @@
}
.admin-table thead th {
position: sticky;
top: 0;
z-index: 10;
background: var(--surface);
color: var(--muted);
font-weight: 600;
padding: 1rem 0.8rem;
border-bottom: 1px solid var(--border);
text-align: left;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.08em;
white-space: nowrap;
/* Ajout d'une ombre subtile sous l'en-tête */
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.admin-table thead th:nth-child(1),
@@ -267,8 +268,15 @@
}
.admin-table thead th:nth-child(3),
.admin-table tbody td:nth-child(3) {
width: 30%;
.admin-table tbody td:nth-child(3) strong {
color: var(--text);
font-weight: 600;
font-size: 1rem;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 250px; /* Ajustable selon tes besoins */
}
.admin-table thead th:nth-child(4),
@@ -301,11 +309,12 @@
}
.admin-table tbody tr {
transition: background 0.2s;
transition: all 0.2s ease;
}
.admin-table tbody tr:hover {
background: var(--surface-hover);
transform: scale(1.005); /* Très léger zoom au survol */
}
.admin-table tbody tr:last-child td {
@@ -778,129 +787,146 @@ input[type="checkbox"]:checked::after {
flex-wrap: wrap;
}
.form-grid {
grid-template-columns: 1fr;
}
/* On rend le conteneur transparent pour laisser les "cartes" respirer */
.table-container {
background: transparent;
border: none;
box-shadow: none;
overflow-y: visible;
max-height: none;
}
.admin-table,
.admin-table thead,
.admin-table tbody,
.admin-table th,
.admin-table td,
.admin-table tr {
.admin-table tbody {
display: block;
width: 100%;
}
/* Masquer l'en-tête classique du tableau */
.admin-table thead {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
display: none;
}
/* --- TRANSFORMATION DES LIGNES EN CARTES (GRID) --- */
.admin-table tbody tr {
display: grid;
/* Définition des colonnes : Checkbox | Affiche | Contenu | Actions */
grid-template-columns: 30px 80px 1fr 40px;
grid-template-areas:
"check poster title actions"
"check poster year actions"
"check poster director actions"
"check poster badges actions";
gap: 0.3rem 0.8rem;
background: var(--surface-card);
border: 1px solid var(--border);
border-radius: 10px;
margin-bottom: 0.8rem;
padding: 0.8rem;
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.admin-table tbody tr:hover {
background: var(--surface-card);
transform: none;
}
.admin-table td {
display: flex;
border-radius: 12px;
margin-bottom: 1rem;
padding: 1rem 0.8rem;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
align-items: center;
justify-content: space-between;
padding: 0.4rem 0;
border-bottom: 1px solid rgba(255,255,255,0.04);
font-size: 0.88rem;
}
.admin-table td:last-child {
border-bottom: none;
padding-bottom: 0;
/* Nettoyage des styles de cellules bureau */
.admin-table td {
display: block;
padding: 0;
border: none;
text-align: left;
}
.admin-table td:first-child {
justify-content: flex-end;
padding-bottom: 0.6rem;
border-bottom: 1px solid var(--border);
margin-bottom: 0.4rem;
}
.admin-table td:nth-child(2) {
justify-content: center;
padding: 0.6rem 0;
}
.thumb, .thumb-ph {
width: 70px;
height: 100px;
}
.admin-table td:nth-child(3) {
flex-direction: column;
align-items: flex-start;
padding: 0.5rem 0;
}
.admin-table td:nth-child(3) strong {
font-size: 1.05rem;
line-height: 1.3;
}
.admin-table td:nth-child(4)::before {
content: 'Année';
font-size: 0.7rem;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-right: 0.5rem;
}
.admin-table td:nth-child(5)::before {
content: 'Réal.';
font-size: 0.7rem;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-right: 0.5rem;
}
.admin-table td:nth-child(6) {
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
padding: 0.6rem 0;
}
/* Nettoyage des anciens préfixes ("Année", "Réal.") */
.admin-table td:nth-child(4)::before,
.admin-table td:nth-child(5)::before,
.admin-table td:nth-child(6)::before {
content: 'Informations';
font-size: 0.7rem;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.05em;
display: none;
}
/* 1. Checkbox */
.admin-table td:nth-child(1) {
grid-area: check;
display: flex;
justify-content: center;
margin-bottom: 0;
}
/* 2. Affiche */
.admin-table td:nth-child(2) {
grid-area: poster;
display: flex;
justify-content: center;
}
.thumb, .thumb-ph {
width: 80px;
height: 115px;
margin: 0;
border-radius: 8px;
}
/* 3. Titre */
.admin-table td:nth-child(3) {
grid-area: title;
align-self: end;
}
.admin-table td:nth-child(3) strong {
font-size: 1.1rem;
line-height: 1.2;
color: var(--gold);
white-space: normal; /* Le titre peut passer à la ligne sur mobile */
}
/* 4. Année */
.admin-table td:nth-child(4) {
grid-area: year;
font-size: 0.85rem;
color: var(--muted);
}
.admin-table td:nth-child(4)::before {
content: '🗓 ';
opacity: 0.7;
}
/* 5. Réalisateur */
.admin-table td:nth-child(5) {
grid-area: director;
font-size: 0.85rem;
color: var(--muted);
}
.admin-table td:nth-child(5)::before {
content: '🎬 ';
opacity: 0.7;
}
/* 6. Informations (Étoiles ou Format) */
.admin-table td:nth-child(6) {
grid-area: badges;
align-self: start;
margin-top: 0.4rem;
}
/* 7. Actions (Modifier / Supprimer) */
.admin-table td:nth-child(7) {
justify-content: flex-end;
gap: 0.5rem;
padding-top: 0.6rem;
grid-area: actions;
display: flex;
flex-direction: column;
gap: 0.8rem;
justify-content: center;
align-items: flex-end;
padding-top: 0;
}
.tbl-actions {
flex-direction: column;
gap: 0.8rem;
}
/* Boutons d'action plus faciles à cliquer sur écran tactile */
.tbl-actions button {
background: var(--surface);
border: 1px solid var(--border);
padding: 0.6rem;
border-radius: 8px;
font-size: 1.2rem;
}
.search-box {