/* =========================================================================
   Pneus Ouellette — feuille de style
   Standard du détaillant de pneus, exécuté au niveau des grandes enseignes.
   ========================================================================= */

:root {
  /* Encres et surfaces — clair, parce que le visiteur est dehors en plein jour */
  --ink:            #16181c;
  --ink-2:          #3f454e;
  --ink-3:          #616872;
  --rule:           #dcdfe4;
  --rule-soft:      #eaecef;
  --surface:        #ffffff;
  --surface-2:      #f6f6f4;
  --surface-3:      #edeeeb;

  /* Marque : le rouge de l'enseigne, réservé à l'action et à l'état actif */
  --brand:          #b4121b;
  --brand-deep:     #8d0d14;
  --brand-wash:     #fdf2f2;

  /* Structure : le bleu d'acier des bandeaux */
  --steel:          #1b2430;
  --steel-2:        #2a3646;

  /* Signaux de stock */
  --ok:             #17683c;
  --ok-wash:        #eaf4ee;
  --low:            #9a5b00;
  --low-wash:       #fdf3e4;

  /* Mesure de la gomme */
  --tread:          #2a3646;
  --tread-empty:    #d7dade;

  --shadow-sm: 0 1px 2px rgba(22, 24, 28, .06), 0 2px 6px rgba(22, 24, 28, .05);
  --shadow-md: 0 2px 4px rgba(22, 24, 28, .06), 0 12px 28px rgba(22, 24, 28, .09);
  --shadow-lg: 0 4px 8px rgba(22, 24, 28, .07), 0 24px 56px rgba(22, 24, 28, .13);

  --radius:     12px;
  --radius-sm:  8px;
  --pill:       999px;

  --wrap: 1180px;
  --gut: clamp(16px, 4vw, 32px);

  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}

/* --- Surfaces du navigateur : elles portent aussi le dessin ------------- */
::selection { background: #ffd9db; color: var(--ink); }
:root { accent-color: var(--brand); caret-color: var(--brand); }
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
* { scrollbar-color: #b9bec6 var(--surface-2); scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb {
  background: #b9bec6; border-radius: var(--pill);
  border: 3px solid var(--surface-2);
}
::-webkit-scrollbar-thumb:hover { background: #98a0aa; }

a { color: var(--brand-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand); }

img, svg { max-width: 100%; }
svg { display: block; }

h1, h2, h3 { margin: 0; font-family: var(--cond); font-weight: 700; letter-spacing: -.015em; line-height: 1.05; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =======================================================================
   Bandeau de service
   ======================================================================= */
.util {
  background: var(--steel);
  color: #c9d1dc;
  font-size: 14px;
  letter-spacing: .01em;
}
.util .wrap { display: flex; gap: 24px; align-items: center; min-height: 40px; padding-block: 10px; flex-wrap: wrap; }
.util-item { display: inline-flex; align-items: center; gap: 8px; }
.util svg { width: 15px; height: 15px; stroke: #8f9dae; }
.util strong { color: #fff; font-weight: 600; }
.util-spacer { margin-inline-start: auto; }
@media (max-width: 720px) { .util { display: none; } }

/* =======================================================================
   En-tête
   ======================================================================= */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.masthead .wrap { display: flex; align-items: center; gap: 20px; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 auto; }
.brand-name {
  font-family: var(--cond); font-weight: 700; font-size: 27px;
  line-height: .96; letter-spacing: -.02em; text-transform: uppercase; color: var(--ink);
}
.brand-since { display: block; font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: .04em; color: var(--brand); }

.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a {
  padding: 9px 14px; border-radius: var(--radius-sm);
  font-size: 15.5px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 900px) { .nav { display: none; } }

.call {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--brand); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 16px;
  padding: 11px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.call:hover { background: var(--brand-deep); color: #fff; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.call:active { transform: translateY(0); }
.call svg { width: 17px; height: 17px; stroke: currentColor; }
.masthead .call { margin-inline-start: 0; }
@media (max-width: 900px) { .masthead .call { margin-inline-start: auto; } }
@media (max-width: 420px) { .call span { display: none; } }

/* =======================================================================
   Recherche — le cœur de la page
   ======================================================================= */
.search-band {
  background:
    linear-gradient(180deg, var(--steel) 0%, var(--steel-2) 100%);
  color: #fff;
  padding: clamp(38px, 6vw, 68px) 0 clamp(30px, 5vw, 52px);
}
.search-band h1 {
  font-size: clamp(34px, 6.2vw, 62px);
  color: #fff;
  max-width: 17ch;
  text-wrap: balance;
}
.search-band .lede {
  margin-top: 14px;
  font-size: clamp(16.5px, 2vw, 19px);
  color: #b9c4d2;
  max-width: 54ch;
}

.finder { margin-top: 30px; max-width: 720px; }
.finder-label {
  display: block; font-size: 13px; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: #93a2b4; margin-bottom: 9px;
}
.finder-row { display: flex; gap: 10px; }
.finder-field { position: relative; flex: 1 1 auto; }
.finder-field svg {
  position: absolute; inset-block-start: 50%; inset-inline-start: 16px;
  translate: 0 -50%; width: 20px; height: 20px; stroke: var(--ink-3); pointer-events: none;
}
#q {
  width: 100%;
  font-family: var(--cond);
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
  background: #fff;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 15px 16px 15px 48px;
  box-shadow: var(--shadow-md);
  transition: border-color .15s ease, box-shadow .15s ease;
}
#q::placeholder { color: #5f6773; font-weight: 500; }
#q:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-lg); }

.finder-hint { margin-top: 11px; font-size: 14.5px; color: #93a2b4; }

.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.size-chip {
  font-family: var(--cond); font-size: 17px; font-weight: 600; letter-spacing: .01em;
  color: #dbe3ec; background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.16); border-radius: var(--pill);
  padding: 6px 14px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.size-chip:hover { background: rgba(255,255,255,.17); color: #fff; border-color: rgba(255,255,255,.3); }

/* Compteurs réels */
.tallies { display: flex; flex-wrap: wrap; gap: 0; margin-top: 34px; border-top: 1px solid rgba(255,255,255,.14); }
.tally { padding: 18px 28px 4px 0; margin-right: 28px; }
.tally b {
  display: block; font-family: var(--cond); font-weight: 700;
  font-size: clamp(28px, 4vw, 38px); line-height: 1; color: #fff;
}
.tally span { font-size: 13.5px; color: #93a2b4; letter-spacing: .02em; }

/* =======================================================================
   Résultats
   ======================================================================= */
.results-band { padding: clamp(26px, 4vw, 44px) 0 clamp(40px, 6vw, 72px); background: var(--surface-2); }

.results-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding-bottom: 16px; border-bottom: 2px solid var(--ink); margin-bottom: 0;
}
.results-head h2 { font-size: clamp(22px, 3vw, 30px); }
.results-count { font-size: 15px; color: var(--ink-3); margin-inline-start: auto; }

.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: minmax(148px, 1.1fr) minmax(140px, 1.2fr) 132px 116px auto;
  gap: 18px; align-items: center;
  padding: 17px 4px;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  transition: background .14s ease;
}
.row:hover { background: rgba(255,255,255,.75); }

.r-dim {
  font-family: var(--cond); font-weight: 700; font-size: 27px;
  letter-spacing: -.01em; line-height: 1; color: var(--ink);
}
.r-brand { font-weight: 600; font-size: 16.5px; color: var(--ink); }
.r-sub { font-size: 13.5px; color: var(--ink-3); margin-top: 2px; }

/* Jauge de gomme, en 32e — la mesure du métier */
.gauge { display: flex; align-items: center; gap: 10px; }
.gauge-bars { display: flex; gap: 2px; align-items: flex-end; height: 22px; }
.gauge-bars i {
  display: block; width: 4px; border-radius: 1px; background: var(--tread-empty);
}
.gauge-bars i.on { background: var(--tread); }
.gauge-val { font-family: var(--cond); font-weight: 600; font-size: 17px; color: var(--ink-2); white-space: nowrap; }

.stock { font-size: 14.5px; font-weight: 600; }
.stock.ok  { color: var(--ok); }
.stock.low { color: var(--low); }
.stock small { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink-3); }

.r-price { text-align: right; }
.r-price b {
  font-family: var(--cond); font-weight: 700; font-size: 26px; line-height: 1; color: var(--ink);
}
.r-price span { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

@media (max-width: 860px) {
  .row { grid-template-columns: 1fr auto; grid-template-areas: "dim price" "brand price" "gauge stock"; row-gap: 8px; padding: 16px 2px; }
  .r-dim { grid-area: dim; font-size: 24px; }
  .r-meta { grid-area: brand; }
  .gauge { grid-area: gauge; }
  .stock { grid-area: stock; text-align: right; }
  .r-price { grid-area: price; }
}

.empty {
  padding: 42px 4px; text-align: center; color: var(--ink-2);
}
.empty h3 { font-size: 23px; margin-bottom: 8px; }
.empty p { color: var(--ink-3); max-width: 46ch; margin-inline: auto; }
.near { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.near button {
  font-family: var(--cond); font-size: 17px; font-weight: 600;
  background: #fff; color: var(--ink); border: 1px solid var(--rule);
  border-radius: var(--pill); padding: 7px 15px; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.near button:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }

.note {
  margin-top: 22px; font-size: 13.5px; color: var(--ink-3);
  border-top: 1px solid var(--rule); padding-top: 16px; max-width: 70ch;
}

/* =======================================================================
   Sections de contenu
   ======================================================================= */
.band { padding: clamp(48px, 7vw, 88px) 0; }
.band-tint { background: var(--surface-2); }
.band h2 { font-size: clamp(27px, 4vw, 42px); max-width: 20ch; text-wrap: balance; }
.band .lede { margin-top: 14px; font-size: 18px; color: var(--ink-2); max-width: 62ch; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 30px; margin-top: 40px; }
.step-n {
  font-family: var(--cond); font-weight: 700; font-size: 15px; letter-spacing: .1em;
  color: var(--brand); text-transform: uppercase;
  padding-bottom: 10px; border-bottom: 2px solid var(--brand); display: inline-block;
}
.step h3 { font-size: 21px; margin-top: 14px; }
.step p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1px; margin-top: 40px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.service { background: var(--surface); padding: 28px 26px; }
.service svg { width: 26px; height: 26px; stroke: var(--brand); margin-bottom: 14px; }
.service h3 { font-size: 20px; }
.service p { margin-top: 7px; color: var(--ink-2); font-size: 15.5px; }

/* Coordonnées */
.visit { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 880px) { .visit { grid-template-columns: 1fr; } }

.facts { margin-top: 30px; border-top: 1px solid var(--rule); }
.fact { display: grid; grid-template-columns: 132px 1fr; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.fact dt { font-size: 13px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.fact dd { margin: 0; font-size: 17px; color: var(--ink); }
.fact dd a { font-weight: 600; }
.fact .unknown { color: var(--ink-3); font-size: 15.5px; }

.map-frame {
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
  background: var(--surface-3); box-shadow: var(--shadow-sm);
}
.map-frame iframe { display: block; width: 100%; height: 380px; border: 0; }

/* =======================================================================
   Pied de page
   ======================================================================= */
.foot { background: var(--steel); color: #9aa8b8; padding: 46px 0 34px; font-size: 15px; }
.foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr; gap: 26px; } }
.foot h3 { font-family: var(--cond); font-size: 17px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: #fff; margin: 0 0 12px; }
.foot a { color: #cfd8e3; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.foot .brand-name { color: #fff; }
.foot .legal { margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13.5px; color: #91a0b0; }

/* Barre d'appel mobile */
.callbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  display: none; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--rule);
}
.callbar .call { flex: 1 1 auto; justify-content: center; }
.callbar .ghost {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-weight: 600; background: #fff;
}
.callbar .ghost svg { width: 17px; height: 17px; stroke: var(--ink-2); }
@media (max-width: 720px) { .callbar { display: flex; } body { padding-bottom: 74px; } }

/* Le seul moment animé de la page : l'inscription des résultats */
@keyframes settle {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.row { animation: settle .34s cubic-bezier(.16,.84,.44,1) both; }
.row:nth-child(1) { animation-delay: 0ms; }
.row:nth-child(2) { animation-delay: 26ms; }
.row:nth-child(3) { animation-delay: 52ms; }
.row:nth-child(4) { animation-delay: 78ms; }
.row:nth-child(5) { animation-delay: 104ms; }
.row:nth-child(n+6) { animation-delay: 128ms; }
@media (prefers-reduced-motion: reduce) { .row { animation: none; } }

.near-label { margin-top: 26px; font-size: 14px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-3); }
.near { margin-top: 12px; }

.more { padding: 20px 4px 4px; font-size: 15px; color: var(--ink-2); }

/* =======================================================================
   Barre de filtres
   ======================================================================= */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)) auto;
  gap: 14px 18px;
  align-items: end;
  padding: 20px 22px;
  margin-bottom: 26px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.filter { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.filter label {
  font-size: 12.5px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3);
}
.filter select {
  appearance: none;
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23616872' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 17px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 11px 40px 11px 13px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.filter select:hover { border-color: #c3c8cf; }
.filter select:focus-visible { border-color: var(--brand); }
#f-taille { font-family: var(--cond); font-size: 20px; font-weight: 600; letter-spacing: .01em; }

.filter-reset {
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
  padding: 12px 18px; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.filter-reset:hover { background: var(--surface-3); border-color: #c3c8cf; }

@media (max-width: 640px) {
  .filters { grid-template-columns: 1fr; padding: 16px; }
  .filter-reset { width: 100%; }
}

/* =======================================================================
   Recherche par véhicule
   ======================================================================= */
.vehicle {
  padding: 20px 22px;
  margin-bottom: 14px;
  background: var(--steel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.vehicle-title {
  font-family: var(--cond); font-size: 20px; font-weight: 600;
  color: #fff; margin-bottom: 16px; letter-spacing: .005em;
}
.vehicle-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) auto;
  gap: 14px 18px; align-items: end;
}
.vehicle .filter label { color: #93a2b4; }
.vehicle .filter select {
  background-color: #fff;
  border-color: transparent;
}
.vehicle .filter select:disabled {
  background-color: rgba(255,255,255,.14);
  color: #8ea0b4;
  cursor: not-allowed;
}
.vehicle .filter-reset {
  background: rgba(255,255,255,.1); color: #dbe3ec;
  border-color: rgba(255,255,255,.22);
}
.vehicle .filter-reset:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.36); }
.vehicle-note { margin-top: 14px; font-size: 15px; color: #b9c4d2; }
.vehicle-note b { color: #fff; font-weight: 600; }
.vehicle-note:empty { display: none; }

@media (max-width: 640px) {
  .vehicle { padding: 16px; }
  .vehicle-row { grid-template-columns: 1fr; }
  .vehicle .filter-reset { width: 100%; }
}
