alpinux-static/app/static/app.css
Alpinux 64989e83c8 feat: upload de fichiers dans l'app Flask CDN
Ajoute la route POST /upload (admin uniquement) et la zone de dépôt
dans browse.html — glisser-déposer ou sélection multiple, destination
= dossier courant du navigateur.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 20:35:29 +02:00

167 lines
13 KiB
CSS

:root {
--blue: #1a6bbf;
--blue-dark: #0f4e8f;
--blue-light: #e8f1fb;
--bg: #f3f6fb;
--text: #1a1a2e;
--muted: #666;
--border: #dce6f3;
--radius: 10px;
--shadow: 0 2px 12px rgba(26,107,191,.1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #e8eef7; padding: .1rem .4rem; border-radius: 4px; font-size: .88em; }
/* ── Header ─────────────────────────────────────────────────────── */
header { background: var(--blue-dark); color: #fff; }
.header-inner { max-width: 1100px; margin: 0 auto; padding: .8rem 1.5rem; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-size: 1.1rem; text-decoration: none; white-space: nowrap; }
.brand strong { font-weight: 800; }
.brand-sub { opacity: .7; font-weight: 300; }
.brand img { border-radius: 5px; }
.header-nav { display: flex; gap: .2rem; flex: 1; }
.header-nav a { color: rgba(255,255,255,.8); padding: .4rem .8rem; border-radius: 6px; font-size: .9rem; transition: background .15s; }
.header-nav a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.header-nav a.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.header-user { margin-left: auto; display: flex; align-items: center; gap: 1rem; color: rgba(255,255,255,.85); font-size: .9rem; white-space: nowrap; }
.btn-logout { color: rgba(255,255,255,.75); font-size: .85rem; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; padding: .3rem .7rem; }
.btn-logout:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
/* ── Mise en page ─────────────────────────────────────────────── */
main { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem 3rem; display: flex; flex-direction: column; gap: 1.5rem; }
/* ── Carte générique ──────────────────────────────────────────── */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 1.8rem; }
.card h2 { font-size: 1.05rem; color: var(--blue-dark); margin-bottom: 1rem; }
/* ── Statistiques globales ────────────────────────────────────── */
.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat-box { flex: 1; min-width: 160px; background: var(--blue-light); border-radius: 8px; padding: 1.2rem 1.5rem; }
.stat-box .label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .4rem; }
.stat-box .value { font-size: 1.9rem; font-weight: 700; color: var(--blue-dark); line-height: 1; }
/* ── Grille de dossiers ───────────────────────────────────────── */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.folder-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; text-decoration: none; color: var(--text); transition: box-shadow .15s, transform .1s; border: 2px solid transparent; }
.folder-card:hover { box-shadow: 0 4px 20px rgba(26,107,191,.2); transform: translateY(-2px); text-decoration: none; border-color: var(--blue-light); }
.folder-card .icon { font-size: 1.8rem; }
.folder-card .name { font-weight: 700; color: var(--blue-dark); }
.folder-card .meta { font-size: .82rem; color: var(--muted); }
/* ── Fil d'Ariane ─────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: .35rem; font-size: .88rem; flex-wrap: wrap; margin-bottom: .8rem; }
.breadcrumb a { color: var(--blue); }
.breadcrumb .sep { color: var(--muted); }
.breadcrumb .current { color: var(--text); font-weight: 600; }
/* ── Tableau de fichiers ──────────────────────────────────────── */
.file-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.file-table th { text-align: left; padding: .55rem .8rem; background: var(--blue-light); color: var(--blue-dark); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.file-table td { padding: .5rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.file-table tr:last-child td { border-bottom: none; }
.file-table tr:hover td { background: #f8faff; }
.col-icon { width: 2.2rem; text-align: center; font-size: 1.05rem; }
.col-name { display: flex; align-items: center; gap: .7rem; }
.col-name a { color: var(--text); font-weight: 500; }
.col-name a:hover { color: var(--blue); text-decoration: underline; }
.thumb-sm { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); flex-shrink: 0; }
.type-badge { display: inline-block; font-size: .7rem; background: var(--blue-light); color: var(--blue-dark); border-radius: 3px; padding: .1rem .35rem; font-family: monospace; }
.col-size { color: var(--muted); font-size: .85rem; white-space: nowrap; width: 7rem; }
.col-date { color: var(--muted); font-size: .82rem; white-space: nowrap; width: 11rem; }
/* ── Aperçu de fichier ────────────────────────────────────────── */
.preview-header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
/* ── Navigation précédent/suivant ────────────────────────────────────── */
.preview-nav { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.nav-arrow { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; font-size: 1.5rem; line-height: 1; background: var(--blue-light); color: var(--blue-dark); text-decoration: none; transition: background .15s; }
.nav-arrow:hover { background: var(--blue); color: #fff; text-decoration: none; }
.nav-arrow--off { background: #f0f0f0; color: #ccc; cursor: default; }
.nav-pos { font-size: .78rem; color: var(--muted); padding: 0 .3rem; white-space: nowrap; }
.preview-header h1 { font-size: 1.1rem; font-weight: 700; }
.back-link { color: var(--muted); font-size: .9rem; flex-shrink: 0; }
.back-link:hover { color: var(--blue); text-decoration: none; }
.preview-meta { display: flex; gap: 1.5rem; align-items: center; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.preview-meta strong { color: var(--text); }
.preview-image-wrap { text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.preview-image-wrap img { max-width: 100%; max-height: 72vh; border-radius: 6px; border: 1px solid var(--border); }
.preview-text-wrap { background: #111827; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.text-bar { background: #1f2937; color: #d1d5db; padding: .6rem 1.2rem; font-size: .85rem; display: flex; align-items: center; gap: .8rem; }
.preview-text-wrap pre { color: #a3e635; font-family: 'Courier New', monospace; font-size: .82rem; line-height: 1.6; padding: 1.2rem; overflow: auto; max-height: 72vh; white-space: pre-wrap; word-break: break-word; margin: 0; }
/* ── Recherche (header) ───────────────────────────────────────────── */
.header-search { display: flex; align-items: center; gap: .3rem; }
.header-search input { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 6px; color: #fff; padding: .35rem .7rem; font-size: .88rem; width: 180px; outline: none; transition: background .15s, width .2s; }
.header-search input::placeholder { color: rgba(255,255,255,.5); }
.header-search input:focus { background: rgba(255,255,255,.2); width: 240px; }
.header-search button { background: none; border: none; color: rgba(255,255,255,.8); cursor: pointer; font-size: 1rem; padding: .3rem .4rem; line-height: 1; }
.header-search button:hover { color: #fff; }
/* ── Formulaire de recherche ──────────────────────────────────────── */
.search-form { display: flex; flex-direction: column; gap: .8rem; }
.search-row { display: flex; gap: .8rem; flex-wrap: wrap; }
.search-field { display: flex; flex-direction: column; gap: .3rem; }
.search-field label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.search-field input { border: 1px solid var(--border); border-radius: 6px; padding: .5rem .8rem; font-size: .9rem; color: var(--text); background: #fff; outline: none; }
.search-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,107,191,.12); }
.search-field--grow { flex: 1; min-width: 200px; }
.search-options { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--muted); cursor: pointer; }
.checkbox-label input { accent-color: var(--blue); }
.search-count { font-size: .88rem; color: var(--muted); margin-bottom: .8rem; }
.file-path { display: block; font-size: .78rem; color: var(--muted); font-family: monospace; }
.content-match { display: block; font-size: .8rem; color: #555; font-style: italic; margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 500px; }
/* ── Statistiques (iframe) ────────────────────────────────────────── */
.stats-frame-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.stats-frame { width: 100%; height: calc(100vh - 120px); min-height: 600px; border: none; display: block; }
.inline-pre { background: #111827; color: #a3e635; font-family: 'Courier New', monospace; font-size: .82rem; padding: 1rem 1.2rem; border-radius: 8px; white-space: pre-wrap; word-break: break-all; }
/* ── Boutons ──────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.4rem; border-radius: 6px; font-size: .9rem; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); text-decoration: none; color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 2rem; font-style: italic; }
/* ── Vues / suppression (browse) ─────────────────────────────────────── */
.col-hits { width: 4.5rem; text-align: right; white-space: nowrap; }
.col-del { width: 2.4rem; text-align: center; }
.hits-badge { display: inline-block; font-size: .75rem; border-radius: 10px; padding: .1rem .45rem; font-weight: 600; }
.hits-active { background: #dcfce7; color: #15803d; }
.hits-zero { background: #f3f4f6; color: #9ca3af; }
.btn-del { background: none; border: none; cursor: pointer; font-size: .95rem; opacity: .4; padding: .2rem; line-height: 1; transition: opacity .15s; }
.btn-del:hover { opacity: 1; }
/* ── Upload ───────────────────────────────────────────────────────── */
.upload-card h2 { margin-bottom: .8rem; }
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; border: 2px dashed var(--border); border-radius: var(--radius); padding: 2rem 1.5rem; cursor: pointer; background: var(--bg); transition: border-color .15s, background .15s; text-align: center; position: relative; margin-bottom: 1rem; }
.drop-zone:hover, .drop-zone:focus-within { border-color: var(--blue); background: var(--blue-light); }
.drop-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-icon { font-size: 2rem; pointer-events: none; }
.drop-text { font-size: .9rem; color: var(--muted); line-height: 1.5; pointer-events: none; }
.drop-names { font-size: .82rem; color: var(--blue-dark); font-style: italic; word-break: break-all; pointer-events: none; }
/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 700px) {
.header-inner { flex-wrap: wrap; }
.header-nav { order: 3; width: 100%; }
.header-search { order: 4; width: 100%; }
.header-search input { width: 100%; }
.header-user { order: 2; }
.col-date { display: none; }
.stat-box .value { font-size: 1.4rem; }
}