Redesign UI to match target design images

- Flat purple-gradient nav bar with POSTERG/RÉPERTOIRE/À PROPOS links
- Full-width search bar with icon, bottom-border only, below nav
- Home: white bg, media card grid (thumbnail + author/title label below)
- Répertoire: 4-column index (Années/Catégories/Étudiantes/Mots-clés)
- TFE: 2-column layout (large text left, media right)
- À Propos: 2-column, large monospace text, new apropos.php page
- Admin: dark theme (#1a1a1a), purple gradient nav, bottom-border inputs
- New shared partials: templates/nav.php, templates/search-bar.php
- Rewrote all CSS: common, main, search, tfe, apropos, admin
This commit is contained in:
Pontoporeia
2026-02-24 23:34:16 +01:00
parent eaad740574
commit 2110d2b916
22 changed files with 2459 additions and 3043 deletions

View File

@@ -1,350 +1,152 @@
body {
/* ============================================================
HOME PAGE (index.php)
============================================================ */
html, body {
margin: 0;
padding: 0;
height: 100%;
}
.home-body {
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
display: flex;
flex-direction: column;
font-family:
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
Arial, sans-serif;
background: var(--white);
}
/* Layout ratios: header 2/5, main 3/5, footer 1/5 */
header {
flex: 2;
min-height: 0;
}
main {
flex: 7;
min-height: 0;
}
footer {
/* Cards grid — scrollable main area */
.home-main {
flex: 1;
min-height: 0;
}
header, main, footer {
padding: 1rem;
margin: 0;
border-radius: 40px;
}
header {
font-family: "police1", sans-serif;
background: #9557b5ff;
color: white;
display: flex;
gap: 4%;
padding: 1.5rem 3rem;
align-items: center;
overflow-y: auto;
box-sizing: border-box;
}
header .title {
color: white;
font-size: 1.75rem;
font-weight: 700;
text-decoration: none;
white-space: nowrap;
}
header section {
flex: 1;
font-size: 0.9rem;
line-height: 1.4;
}
header section p {
margin: 0.5rem 0;
}
header section p:first-child {
font-size: 1rem;
font-weight: 600;
}
header section p:not(:first-child) {
font-size: 0.85rem;
opacity: 0.95;
}
header nav {
display: flex;
gap: 0.75rem;
}
header nav button {
background: rgba(255, 255, 255, 0.15);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
padding: 0.5rem 1rem;
border-radius: 20px;
cursor: pointer;
transition: all 0.2s;
font-size: 0.9rem;
font-family: inherit;
}
header nav button:hover {
background: rgba(255, 255, 255, 0.25);
transform: translateY(-1px);
}
header nav a {
color: white;
text-decoration: none;
}
/* Filter info banner */
.filter-info {
background: rgba(149, 87, 181, 0.9);
color: white;
padding: 0.5rem 1rem;
text-align: center;
font-size: 0.9rem;
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
}
.clear-filter {
color: white;
text-decoration: none;
padding: 0.25rem 0.75rem;
background: rgba(0, 0, 0, 0.2);
border-radius: 15px;
font-size: 0.85rem;
transition: background 0.2s;
}
.clear-filter:hover {
background: rgba(0, 0, 0, 0.4);
}
main {
background: #3c856bff;
position: relative;
padding: 1rem;
box-sizing: border-box;
overflow: hidden;
display: flex;
flex-direction: column;
overflow-x: hidden;
padding: 0;
}
.cards-container {
display: grid;
gap: 0.75rem;
flex: 1;
min-height: 0;
padding: 0.5rem;
overflow: hidden;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 0;
}
/* Default: 3 rows × 4 columns = 12 items */
.cards-container {
grid-template-rows: repeat(3, 1fr);
grid-template-columns: repeat(4, 1fr);
grid-auto-flow: row;
}
/* Small screens: 2 rows × 3 columns = 6 items */
@media (max-width: 1200px) {
@media (min-width: 1400px) {
.cards-container {
grid-template-rows: repeat(2, 1fr);
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
}
/* Medium screens: 3 rows × 4 columns = 12 items */
@media (min-width: 1201px) and (max-width: 1500px) {
.cards-container {
grid-template-rows: repeat(3, 1fr);
grid-template-columns: repeat(4, 1fr);
}
}
/* Large screens: 3 rows × 6 columns = 18 items */
@media (min-width: 1701px) {
.cards-container {
grid-template-rows: repeat(3, 1fr);
grid-template-columns: repeat(6, 1fr);
}
}
/* Extra large screens: 4 rows × 6 columns = 24 items */
@media (min-width: 2000px) {
.cards-container {
grid-template-rows: repeat(4, 1fr);
grid-template-columns: repeat(6, 1fr);
}
}
/* Mobile placeholder (will adjust later) */
@media (max-width: 768px) {
.cards-container {
grid-template-rows: repeat(2, 1fr);
grid-template-columns: repeat(2, 1fr);
}
}
/* Each card = media thumbnail + text below */
.card-link {
text-decoration: none;
color: inherit;
display: block;
height: 100%;
}
.card {
background: #eee;
border-radius: 8px;
padding: 0.5rem;
height: 100%;
display: flex;
flex-direction: column;
cursor: pointer;
border: none;
background: var(--white);
overflow: hidden;
}
.card__media {
width: 100%;
box-sizing: border-box;
transition: transform 0.2s, box-shadow 0.2s;
display: flex;
flex-direction: column;
aspect-ratio: 4/3;
overflow: hidden;
min-width: 0;
min-height: 0;
background: #e8e8e8;
position: relative;
}
.card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.card-content {
display: flex;
flex-direction: column;
gap: 0.3rem;
.card__media img,
.card__media video {
width: 100%;
height: 100%;
overflow: hidden;
object-fit: cover;
display: block;
transition: transform 0.3s ease;
}
.card .title {
font-size: 0.75rem;
font-weight: 600;
.card:hover .card__media img,
.card:hover .card__media video {
transform: scale(1.02);
}
.card__media--placeholder {
width: 100%;
height: 100%;
background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
display: flex;
align-items: center;
justify-content: center;
color: #aaa;
font-size: 2rem;
}
.card__info {
padding: 0.55rem 0.5rem 0.65rem;
font-size: 0.88rem;
line-height: 1.35;
color: var(--black);
}
.card__info .authors {
margin: 0;
line-height: 1.15;
color: #333;
font-weight: 400;
}
.card__info .title {
margin: 0;
font-weight: 400;
color: var(--text-muted);
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.card .authors {
font-size: 0.65rem;
margin: 0;
color: #666;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.card .year {
font-size: 0.65rem;
margin: 0;
color: #9557b5;
font-weight: 600;
}
.card .tags {
display: flex;
flex-wrap: wrap;
gap: 0.2rem;
margin-top: auto;
padding-top: 0.2rem;
}
.card .tag {
font-size: 0.55rem;
padding: 0.15rem 0.25rem;
background: rgba(149, 87, 181, 0.15);
color: #7a3d95;
border-radius: 2px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
font-weight: 500;
}
footer {
background: #222222ff;
overflow: hidden;
box-sizing: border-box;
}
/* Years navigation in footer */
.years-nav {
height: 100%;
/* Filter info */
.filter-info {
background: var(--purple-light);
color: var(--purple);
padding: 0.4rem 1.5rem;
font-size: 0.85rem;
display: flex;
align-items: center;
padding: 0 1rem;
gap: 1rem;
flex-shrink: 0;
}
.years-scroll {
display: flex;
gap: 0.75rem;
overflow-x: auto;
overflow-y: hidden;
scroll-behavior: smooth;
padding: 0.75rem 0;
width: 100%;
}
/* Hide scrollbar but keep functionality */
.years-scroll::-webkit-scrollbar {
height: 4px;
}
.years-scroll::-webkit-scrollbar-track {
background: transparent;
}
.years-scroll::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3);
border-radius: 2px;
}
.year-link {
color: white;
.clear-filter {
color: var(--purple);
text-decoration: none;
padding: 0.5rem 1rem;
border-radius: 20px;
white-space: nowrap;
transition: background 0.2s;
font-size: 1rem;
padding: 0.15rem 0.6rem;
background: rgba(149, 87, 181, 0.12);
border-radius: 3px;
font-size: 0.82rem;
}
.year-link:hover {
background: rgba(255, 255, 255, 0.1);
.clear-filter:hover {
background: rgba(149, 87, 181, 0.22);
}
.year-link.active {
background: #9557b5ff;
font-weight: bold;
}
/* Pagination controls */
.pagination {
/* Pagination */
.pagination-wrap {
display: flex;
align-items: center;
justify-content: center;
align-items: center;
gap: 0.5rem;
padding: 0.75rem;
background: rgba(255, 255, 255, 0.1);
border-radius: 10px;
margin-top: 1rem;
width: fit-content;
align-self: center;
padding: 1rem;
border-top: 1px solid var(--border-color);
background: var(--white);
flex-shrink: 0;
}
@@ -352,24 +154,20 @@ footer {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 2.5rem;
height: 2.5rem;
padding: 0 0.75rem;
background: rgba(255, 255, 255, 0.9);
color: #3c856b;
min-width: 2rem;
height: 2rem;
padding: 0 0.5rem;
border: 1px solid var(--border-color);
border-radius: 3px;
color: var(--black);
font-size: 0.9rem;
text-decoration: none;
border-radius: 6px;
font-size: 1.2rem;
font-weight: 600;
transition: all 0.2s;
border: 2px solid transparent;
transition: all 0.15s;
}
.pagination-btn:hover:not(.disabled) {
background: white;
border-color: #9557b5;
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
border-color: var(--purple);
color: var(--purple);
}
.pagination-btn.disabled {
@@ -379,32 +177,12 @@ footer {
}
.pagination-info {
display: flex;
align-items: center;
gap: 0.25rem;
padding: 0 1rem;
color: white;
font-size: 1rem;
font-weight: 500;
font-size: 0.9rem;
color: var(--text-muted);
padding: 0 0.5rem;
}
.page-current {
font-size: 1.25rem;
font-weight: 700;
color: #9557b5;
background: white;
padding: 0.25rem 0.75rem;
border-radius: 6px;
min-width: 2rem;
text-align: center;
}
.page-separator {
font-weight: 300;
opacity: 0.6;
padding: 0 0.25rem;
}
.page-total {
opacity: 0.8;
font-weight: 600;
color: var(--black);
}