SPB Git

spb/auto-ka Public

Python 82.8% TypeScript 11.9% CSS 5.1%
20.5 KB · 457 lines css
Raw Blame History
1/* -----------------------------------------------------------------------------2  Auto-Ka — Agrégateur de voitures usagées à vendre (province de Québec)3  Auteur : Simon-Pierre Boucher — contact@spboucher.ai4  styles.css : système de design « éditorial sharp » — thème clair5    · Typo display Space Grotesk / texte Inter / micro-étiquettes JetBrains Mono6    · Signature : bordures encre + ombres décalées (néo-brutalisme raffiné)7    · Accent orange racing #ff5a2a sur encre charbon8----------------------------------------------------------------------------- */9:root {10  --paper: #f4f2ec;11  --surface: #ffffff;12  --surface-2: #faf8f4;13  --ink: #17181c;14  --ink-2: #4c4f57;15  --ink-3: #8b8e96;16  --line: rgba(23, 24, 28, 0.14);17  --line-strong: rgba(23, 24, 28, 0.85);18  --accent: #ff5a2a;19  --accent-deep: #cc3f16;20  --accent-soft: #ffe8de;21  --good: #1c7a4d;22  --good-soft: #e2f4e9;23  --amber: #e8a33d;24  --amber-soft: #fdf3e2;25  --danger: #b3423a;26  --r-card: 10px;27  --r-ctl: 6px;28  --shadow-flat: 0 1px 2px rgba(23, 24, 28, 0.05);29  --shadow-off: 6px 6px 0 var(--ink);30  --shadow-off-soft: 8px 8px 0 rgba(23, 24, 28, 0.08);31  --font-display: "Space Grotesk", system-ui, sans-serif;32  --font-body: "Inter", system-ui, sans-serif;33  --font-mono: "JetBrains Mono", ui-monospace, monospace;34}3536* { box-sizing: border-box; }37html { scroll-behavior: smooth; }38body {39  margin: 0;40  background: var(--paper);41  color: var(--ink);42  font-family: var(--font-body);43  font-size: 15px;44  line-height: 1.55;45  -webkit-font-smoothing: antialiased;46  padding-bottom: env(safe-area-inset-bottom);47}48/* grain subtil — texture signature */49body::before {50  content: "";51  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.35;52  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.02 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");53}54#root { position: relative; z-index: 1; }5556h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.03em; margin: 0; }57a { color: inherit; text-decoration: none; }58button { font-family: inherit; }59img { display: block; }60::selection { background: var(--accent); color: #fff; }6162.mono { font-family: var(--font-mono); }63.kicker {64  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;65  text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-deep);66  display: inline-flex; align-items: center; gap: 8px;67}68.kicker::before { content: ""; width: 22px; height: 2px; background: var(--accent); }6970.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }71@media (max-width: 640px) { .container { padding: 0 16px; } }7273/* ================= Header ================= */74.header {75  position: sticky; top: 0; z-index: 50;76  background: rgba(244, 242, 236, 0.88);77  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);78  border-bottom: 2px solid var(--ink);79}80.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }81.brand {82  font-family: var(--font-display); font-weight: 700; font-size: 26px;83  letter-spacing: -0.04em; display: flex; align-items: center; line-height: 1;84}85.brand .ka {86  background: var(--ink); color: var(--accent); padding: 2px 7px 4px;87  border-radius: 6px; margin-left: 3px; transform: rotate(-2deg);88  transition: transform 0.2s ease;89}90.brand:hover .ka { transform: rotate(0deg); }91.brand-tag {92  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3);93  letter-spacing: 0.08em; text-transform: uppercase; margin-left: 12px;94}95@media (max-width: 860px) { .brand-tag { display: none; } }96.nav { margin-left: auto; display: flex; gap: 4px; }97.nav a {98  padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;99  color: var(--ink-2); border: 1.5px solid transparent;100  transition: all 0.15s ease; min-height: 40px; display: inline-flex; align-items: center;101}102.nav a:hover { border-color: var(--ink); color: var(--ink); }103.nav a.active { background: var(--ink); color: var(--accent); }104@media (max-width: 640px) {105  .nav a { padding: 8px 11px; font-size: 13px; }106}107108/* ================= Ticker ================= */109.ticker {110  background: var(--ink); color: var(--accent); overflow: hidden;111  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em;112  text-transform: uppercase; padding: 7px 0; white-space: nowrap;113  border-bottom: 1px solid rgba(255, 90, 42, 0.25);114}115.ticker-track { display: inline-flex; gap: 0; animation: ticker 40s linear infinite; will-change: transform; }116.ticker span { padding: 0 26px; position: relative; }117.ticker span::after { content: "◆"; position: absolute; right: -6px; opacity: 0.5; font-size: 8px; top: 3px; }118@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }119@media (prefers-reduced-motion: reduce) {120  .ticker-track { animation: none; }121  * { transition-duration: 0.01ms !important; }122}123124/* ================= Hero ================= */125.hero { padding: 46px 0 8px; }126.hero h1 {127  font-size: clamp(30px, 5vw, 52px); font-weight: 700; line-height: 1.04;128  max-width: 820px;129}130.hero h1 em { font-style: normal; color: var(--accent-deep); position: relative; }131.hero p.sub {132  margin: 14px 0 0; color: var(--ink-2); font-size: 16.5px; max-width: 640px;133}134.hero-stats { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }135.hstat { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }136.hstat b { display: block; font-family: var(--font-display); font-size: 26px; color: var(--ink); letter-spacing: -0.02em; }137138/* ================= Filtres ================= */139.filters {140  background: var(--surface); border: 2px solid var(--ink);141  border-radius: var(--r-card); box-shadow: var(--shadow-off);142  padding: 16px; margin: 26px 0 8px;143  display: grid; gap: 10px;144  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));145}146.filters .full { grid-column: 1 / -1; }147.f-field { display: flex; flex-direction: column; gap: 4px; }148.f-field label {149  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;150  letter-spacing: 0.12em; color: var(--ink-3); font-weight: 600;151}152.f-field select, .f-field input {153  border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl);154  background: var(--surface); font: inherit; font-size: 14px;155  padding: 9px 10px; min-height: 40px; color: var(--ink);156}157.f-field select:focus, .f-field input:focus {158  outline: 2px solid var(--accent); outline-offset: 1px;159}160.f-actions { display: flex; align-items: flex-end; gap: 8px; }161.btn {162  font-family: var(--font-display); font-weight: 600; font-size: 14.5px;163  border: 2px solid var(--ink); border-radius: var(--r-ctl);164  background: var(--ink); color: #fff; cursor: pointer;165  padding: 9px 18px; min-height: 40px;166  transition: transform 0.12s ease, box-shadow 0.12s ease;167}168.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--accent); }169.btn.ghost { background: transparent; color: var(--ink); }170.btn.ghost:hover { box-shadow: 4px 4px 0 var(--ink); }171172.result-bar {173  display: flex; align-items: center; gap: 14px; margin: 22px 0 14px; flex-wrap: wrap;174}175.result-bar h2 { font-size: 20px; }176.result-bar .count { color: var(--accent-deep); }177.sort-box { margin-left: auto; display: flex; align-items: center; gap: 8px; }178.sort-box label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; color: var(--ink-3); }179.sort-box select {180  border: 1.5px solid var(--line-strong); border-radius: var(--r-ctl);181  background: var(--surface); font: inherit; font-size: 13.5px; padding: 7px 9px;182}183184/* ================= Grille véhicules ================= */185.vgrid {186  display: grid; gap: 22px;187  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));188  padding-bottom: 30px;189}190.vcard {191  background: var(--surface); border: 2px solid var(--ink);192  border-radius: var(--r-card); overflow: hidden; position: relative;193  display: flex; flex-direction: column;194  transition: transform 0.15s ease, box-shadow 0.15s ease;195  box-shadow: var(--shadow-flat);196}197.vcard:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-off); }198.vcard .photo {199  aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; overflow: hidden;200}201.vcard .photo img { width: 100%; height: 100%; object-fit: cover; }202.vcard .photo .nopic {203  position: absolute; inset: 0; display: grid; place-items: center;204  color: var(--ink-3); font-size: 40px;205}206.vcard .year-chip {207  position: absolute; top: 10px; left: 10px;208  background: var(--ink); color: #fff; font-family: var(--font-mono);209  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;210}211.vcard .drop-chip {212  position: absolute; top: 10px; right: 10px;213  background: var(--good); color: #fff; font-family: var(--font-mono);214  font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;215}216.vcard .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }217.vcard h3 { font-size: 16.5px; line-height: 1.25; }218.vcard .price {219  font-family: var(--font-display); font-weight: 700; font-size: 21px;220  color: var(--accent-deep); letter-spacing: -0.02em;221}222.vcard .price small { font-size: 12px; color: var(--ink-3); font-weight: 500; }223.vcard .specs {224  display: flex; flex-wrap: wrap; gap: 6px;225}226.spec-chip {227  font-family: var(--font-mono); font-size: 10.5px;228  background: var(--surface-2); border: 1px solid var(--line);229  padding: 3px 8px; border-radius: 999px; color: var(--ink-2);230}231.vcard .foot {232  margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line);233  font-size: 12px; color: var(--ink-3);234  display: flex; justify-content: space-between; gap: 8px;235}236237/* ================= Pagination ================= */238.pager { display: flex; justify-content: center; gap: 10px; padding: 8px 0 46px; align-items: center; }239.pager .mono { font-size: 12px; color: var(--ink-2); }240241/* ================= Fiche véhicule ================= */242.vdetail { padding: 34px 0 60px; }243.vd-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }244.vd-head h1 { font-size: clamp(24px, 3.6vw, 38px); line-height: 1.1; max-width: 760px; }245.vd-price {246  margin-left: auto; text-align: right;247}248.vd-price .p {249  font-family: var(--font-display); font-weight: 700; font-size: 34px;250  color: var(--accent-deep); letter-spacing: -0.02em;251}252.vd-price .was { font-size: 14px; color: var(--ink-3); text-decoration: line-through; }253.vd-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 28px; }254@media (max-width: 900px) { .vd-cols { grid-template-columns: 1fr; } }255256.gallery { border: 2px solid var(--ink); border-radius: var(--r-card); overflow: hidden; background: var(--surface); }257.gallery .main { aspect-ratio: 4 / 3; background: var(--surface-2); }258.gallery .main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }259.gallery .thumbs {260  display: flex; gap: 6px; padding: 8px; overflow-x: auto; border-top: 2px solid var(--ink);261  background: var(--surface-2);262}263.gallery .thumbs img {264  width: 84px; height: 60px; object-fit: cover; border-radius: 4px;265  cursor: pointer; border: 2px solid transparent; flex: 0 0 auto;266}267.gallery .thumbs img.sel { border-color: var(--accent); }268269.panel {270  background: var(--surface); border: 2px solid var(--ink);271  border-radius: var(--r-card); box-shadow: var(--shadow-off-soft);272  padding: 18px 20px; margin-bottom: 18px;273}274.panel h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }275.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }276.spec-table td { padding: 7px 0; border-bottom: 1px dashed var(--line); }277.spec-table td:first-child { color: var(--ink-3); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }278.spec-table td:last-child { text-align: right; font-weight: 600; }279.spec-table tr:last-child td { border-bottom: none; }280281.cta-source {282  display: block; text-align: center; font-family: var(--font-display);283  font-weight: 700; font-size: 16px; background: var(--accent); color: #fff;284  border: 2px solid var(--ink); border-radius: var(--r-ctl);285  padding: 13px 18px; margin-top: 4px;286  transition: transform 0.12s ease, box-shadow 0.12s ease;287}288.cta-source:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }289.cta-note { font-size: 11.5px; color: var(--ink-3); text-align: center; margin-top: 8px; font-family: var(--font-mono); }290291.desc { white-space: pre-line; color: var(--ink-2); font-size: 14.5px; }292.feat-list {293  display: flex; flex-wrap: wrap; gap: 6px; max-height: 340px; overflow-y: auto;294}295.price-history { font-size: 13px; }296.price-history .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }297.price-history .down { color: var(--good); font-weight: 700; }298.price-history .up { color: var(--danger); font-weight: 700; }299300/* ================= Sections / pages annexes ================= */301.page { padding: 40px 0 70px; }302.page h1 { font-size: clamp(26px, 4vw, 40px); margin-bottom: 8px; }303.page .lead { color: var(--ink-2); max-width: 640px; margin-bottom: 28px; }304305.src-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }306.src-card {307  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-card);308  padding: 16px 18px; display: flex; flex-direction: column; gap: 6px;309  transition: transform 0.14s ease, box-shadow 0.14s ease; box-shadow: var(--shadow-flat);310}311.src-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-off); }312.src-card h3 { font-size: 16px; }313.src-card .meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }314.src-card .n { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--accent-deep); }315316.stat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 30px; }317.stat-tile {318  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-card);319  padding: 18px; box-shadow: var(--shadow-off-soft);320}321.stat-tile b { display: block; font-family: var(--font-display); font-size: 30px; letter-spacing: -0.02em; }322.stat-tile span { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }323324.bar-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; font-size: 13.5px; }325.bar-row .lbl { width: 170px; flex: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }326.bar-row .bar { height: 16px; background: var(--accent); border: 1.5px solid var(--ink); border-radius: 3px; min-width: 2px; }327.bar-row .val { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); }328329/* ================= Graphiques (Charts.tsx) ================= */330.stats-head { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }331.pdf-btn { margin-left: auto; background: var(--accent); border-color: var(--ink); font-size: 15px; }332.pdf-btn:hover { box-shadow: 4px 4px 0 var(--ink); }333.stat-tile.hero-tile b { color: var(--accent-deep); }334335.chart-wrap { position: relative; }336.chart { width: 100%; height: auto; display: block; }337.chart .mark { transition: opacity 0.12s ease; cursor: default; }338.chart .mark:hover { opacity: 0.75; }339.c-val { font-family: var(--font-mono); font-size: 11px; font-weight: 600; fill: var(--ink); }340.c-lbl { font-family: var(--font-mono); font-size: 10px; fill: var(--ink-3); }341.c-cat { font-size: 12px; font-weight: 600; fill: var(--ink-2); }342.donut-total { font-family: var(--font-display); font-size: 22px; font-weight: 700; fill: var(--ink); }343344.chart-tip {345  position: absolute; transform: translate(-50%, -100%); pointer-events: none;346  background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.35;347  padding: 6px 10px; border-radius: 6px; white-space: nowrap; z-index: 5;348  box-shadow: 0 4px 14px rgba(23,24,28,0.25);349}350.chart-tip b { color: var(--accent); }351352.donut-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center; }353.donut-wrap .chart-data { grid-column: 1 / -1; }354@media (max-width: 560px) { .donut-wrap { grid-template-columns: 1fr; } }355.donut-legend { display: flex; flex-direction: column; gap: 6px; }356.dl-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }357.dl-swatch { width: 13px; height: 13px; border-radius: 3px; border: 1px solid rgba(23,24,28,0.3); flex: 0 0 auto; }358.dl-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }359.dl-val { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }360361.chart-data { margin-top: 10px; font-size: 12.5px; }362.chart-data summary {363  cursor: pointer; font-family: var(--font-mono); font-size: 11px;364  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3);365}366.chart-data table { width: 100%; border-collapse: collapse; margin-top: 8px; }367.chart-data th, .chart-data td {368  text-align: left; padding: 4px 8px; border-bottom: 1px dashed var(--line);369}370.chart-data th { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; color: var(--ink-3); }371372/* ================= Cartes véhicules — raffinements ================= */373.vcard .photo img { transition: transform 0.35s ease; }374.vcard:hover .photo img { transform: scale(1.04); }375376/* ================= Adaptatif téléphone ================= */377@media (max-width: 640px) {378  .hero { padding: 30px 0 4px; }379  .hero p.sub { font-size: 15px; }380  .hero-stats { gap: 18px; margin-top: 16px; }381  .hstat b { font-size: 21px; }382383  /* filtres : 2 colonnes compactes, recherche et actions pleine largeur */384  .filters {385    grid-template-columns: repeat(2, minmax(0, 1fr));386    padding: 12px; gap: 8px;387    box-shadow: 4px 4px 0 var(--ink);388  }389  .f-actions { grid-column: 1 / -1; }390  .f-actions .btn { width: 100%; }391  .f-field select, .f-field input { font-size: 16px; }  /* évite le zoom iOS */392393  .result-bar { gap: 8px; margin: 16px 0 12px; }394  .result-bar h2 { font-size: 17px; }395  .sort-box { margin-left: 0; width: 100%; }396  .sort-box select { flex: 1; }397398  .vgrid { gap: 14px; grid-template-columns: 1fr; }399  .vcard:hover { transform: none; box-shadow: var(--shadow-flat); }400401  /* fiche véhicule : entête et prix empilés */402  .vdetail { padding: 20px 0 40px; }403  .vd-head { flex-direction: column; gap: 8px; }404  .vd-head h1 { font-size: 23px; }405  .vd-price { margin-left: 0; text-align: left; }406  .vd-price .p { font-size: 28px; }407  .gallery .thumbs img { width: 68px; height: 50px; }408  .panel { padding: 14px 14px; }409  .spec-table td:last-child { word-break: break-all; }  /* VIN longs */410  .desc { font-size: 14px; }411  .feat-list { max-height: 260px; }412413  /* stats : bouton PDF pleine largeur, tuiles 2 colonnes */414  .stats-head { flex-direction: column; align-items: stretch; }415  .pdf-btn { margin-left: 0; text-align: center; }416  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }417  .stat-tile { padding: 13px; }418  .stat-tile b { font-size: 22px; }419420  /* graphiques : défilement horizontal plutôt que texte illisible */421  .chart-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }422  .chart.vbars { min-width: 540px; }423  .chart.hbars { min-width: 460px; }424  .donut-wrap { overflow-x: visible; }425426  .src-grid { grid-template-columns: 1fr; }427  .page { padding: 26px 0 50px; }428}429430@media (max-width: 400px) {431  .brand { font-size: 22px; }432  .nav a { padding: 7px 9px; font-size: 12.5px; }433  .header-inner { gap: 8px; }434}435436.notice { text-align: center; padding: 90px 20px; }437.notice .big { font-size: 52px; margin-bottom: 12px; }438.notice p { color: var(--ink-2); }439440.skeleton {441  background: linear-gradient(100deg, var(--surface-2) 40%, #fff 50%, var(--surface-2) 60%);442  background-size: 200% 100%; animation: sk 1.4s infinite;443  border-radius: var(--r-card); border: 2px solid var(--line);444}445@keyframes sk { from { background-position: 130% 0; } to { background-position: -30% 0; } }446447/* ================= Footer ================= */448.footer {449  background: var(--ink); color: #c9cbd1; margin-top: 30px;450  padding: 42px 0 30px; border-top: 3px solid var(--accent);451}452.fbrand { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: #fff; margin-bottom: 14px; }453.fbrand .ka { background: var(--accent); color: var(--ink); padding: 1px 6px 3px; border-radius: 5px; margin-left: 2px; display: inline-block; transform: rotate(-2deg); }454.frow { font-size: 13.5px; max-width: 560px; line-height: 1.6; }455.fmono { font-family: var(--font-mono); font-size: 11px; color: #82858d; margin-top: 22px; }456.fmono a { text-decoration: underline; }457