- Remplace la table trop large par une carte de révision centrée - Une paire à la fois : noms wrappés, score, prix moyens - Valider/Rejeter via fetch() sans rechargement de page - Passage automatique à la paire suivante après chaque action - Compteurs mis à jour en temps réel (en attente/validées/rejetées) - Message de fin avec lien vers /compare quand tout est traité - Ajout tests pytest pour la page /matches Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
201 lines
4.1 KiB
CSS
201 lines
4.1 KiB
CSS
/* Personnalisations légères par-dessus Pico CSS */
|
|
|
|
/* Grille de cartes statistiques : 2 colonnes min, 4 max */
|
|
.stat-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
|
gap: 1rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
/* Cartes avec le grand chiffre mis en avant */
|
|
.stat-card {
|
|
text-align: center;
|
|
padding: 1.25rem 1rem;
|
|
}
|
|
|
|
.stat-card h3 {
|
|
font-size: 2rem;
|
|
margin-bottom: 0.25rem;
|
|
color: var(--pico-primary);
|
|
}
|
|
|
|
.stat-card p {
|
|
margin: 0;
|
|
font-size: 0.9rem;
|
|
color: var(--pico-muted-color);
|
|
}
|
|
|
|
/* Contraindre la hauteur des canvas Chart.js */
|
|
.chart-container {
|
|
position: relative;
|
|
max-height: 350px;
|
|
margin: 1rem 0;
|
|
}
|
|
|
|
/* Couleurs pour les écarts de prix dans la table compare */
|
|
.diff-positive {
|
|
color: #c0392b; /* rouge = Leclerc plus cher */
|
|
}
|
|
|
|
.diff-negative {
|
|
color: #27ae60; /* vert = Picnic plus cher (économie) */
|
|
}
|
|
|
|
/* Débordement horizontal pour les grandes tables */
|
|
.overflow-auto {
|
|
overflow-x: auto;
|
|
}
|
|
|
|
/* Badge pour les correspondances fuzzy dans la table compare */
|
|
.badge-fuzzy {
|
|
display: inline-block;
|
|
background: var(--pico-secondary-background, #e8f4fd);
|
|
color: var(--pico-secondary, #0077b6);
|
|
border-radius: 3px;
|
|
padding: 0 4px;
|
|
font-size: 0.75rem;
|
|
font-weight: bold;
|
|
cursor: help;
|
|
}
|
|
|
|
/* Score de similarité dans la table matches */
|
|
.match-score {
|
|
display: inline-block;
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.score-high { background: #d4edda; color: #155724; }
|
|
.score-medium { background: #fff3cd; color: #856404; }
|
|
.score-low { background: #f8d7da; color: #721c24; }
|
|
|
|
/* ── Carte de révision match (page /matches) ── */
|
|
|
|
.match-card {
|
|
max-width: 780px;
|
|
margin: 0 auto;
|
|
padding: 1.5rem 2rem;
|
|
}
|
|
|
|
/* Barre de progression + score */
|
|
.match-progress {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1.25rem;
|
|
font-size: 0.9rem;
|
|
color: var(--pico-muted-color);
|
|
}
|
|
|
|
/* Les deux colonnes Picnic / Leclerc */
|
|
.match-sides {
|
|
display: grid;
|
|
grid-template-columns: 1fr auto 1fr;
|
|
gap: 1rem;
|
|
align-items: center;
|
|
margin-bottom: 1.75rem;
|
|
}
|
|
|
|
.match-side {
|
|
background: var(--pico-card-background-color, #f8f9fa);
|
|
border-radius: 8px;
|
|
padding: 1rem 1.25rem;
|
|
min-height: 120px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.match-side-picnic { border-left: 4px solid #4a9eff; }
|
|
.match-side-leclerc { border-left: 4px solid #ff6b35; }
|
|
|
|
.match-store-label {
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
color: var(--pico-muted-color);
|
|
}
|
|
|
|
/* Nom du produit : petit, word-wrap pour les noms longs */
|
|
.match-name {
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
line-height: 1.35;
|
|
word-break: break-word;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.match-price {
|
|
font-size: 0.85rem;
|
|
color: var(--pico-muted-color);
|
|
margin-top: auto;
|
|
}
|
|
|
|
.match-vs {
|
|
font-size: 1.4rem;
|
|
color: var(--pico-muted-color);
|
|
text-align: center;
|
|
user-select: none;
|
|
}
|
|
|
|
/* Boutons d'action */
|
|
.match-buttons {
|
|
display: flex;
|
|
gap: 1rem;
|
|
justify-content: center;
|
|
}
|
|
|
|
.match-buttons button {
|
|
flex: 1;
|
|
max-width: 280px;
|
|
margin: 0;
|
|
}
|
|
|
|
/* Garder .btn-validate / .btn-reject pour rétrocompat éventuelle */
|
|
.btn-validate {
|
|
background: var(--pico-primary);
|
|
color: white;
|
|
border: none;
|
|
padding: 4px 10px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.btn-reject {
|
|
padding: 4px 10px;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.match-actions {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* Formulaire de filtre de dates */
|
|
.date-filter {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 1.5rem;
|
|
padding: 0.75rem 1rem;
|
|
background: var(--pico-card-background-color, #f8f9fa);
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.date-filter input[type="month"] {
|
|
width: auto;
|
|
margin: 0;
|
|
padding: 4px 8px;
|
|
}
|
|
|
|
.date-filter button,
|
|
.date-filter a {
|
|
margin: 0;
|
|
padding: 4px 12px;
|
|
font-size: 0.9rem;
|
|
}
|