/* Rapin Pneus - pneus-lausanne.ch */

@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/media/fonts/anton-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/media/fonts/archivo-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/media/fonts/space-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/media/fonts/space-mono-700.woff2') format('woff2');
}

:root {
  --paper: #f5f3ef;
  --paper-2: #ffffff;
  --ink: #161513;
  --ink-soft: #44413b;
  --rubber: #141311;
  --rubber-2: #1f1d1a;
  --on-rubber: #eceae4;
  --on-rubber-soft: #a39e92;
  --line: #e0dcd2;
  --line-dark: #37342e;
  --accent: #f2c230;
  --f-display: 'Anton', 'Arial Narrow', sans-serif;
  --f-body: 'Archivo', system-ui, sans-serif;
  --f-mono: 'Space Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-size-adjust: from-font;
}

.mono { font-family: var(--f-mono); }

h1, h2, h3 { text-wrap: balance; }

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color .15s, background-color .15s, border-color .15s cubic-bezier(0.4, 0, 0.2, 1);
}
a:hover { text-decoration-thickness: 3px; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.decoder :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--accent);
}

.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7em 1.2em;
  z-index: 100;
}
.skip:focus {
  left: 0;
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 0.95em 1.7em;
  cursor: pointer;
  transition: color .15s, background-color .15s, border-color .15s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
.btn-accent:hover {
  background: var(--paper);
  border-color: var(--paper);
}
.btn-dark:hover {
  background: var(--paper);
  border-color: var(--ink);
  color: var(--ink);
}

/* ---------- Intro (accueil) ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.intro-veil {
  position: absolute;
  inset: 0;
  background: rgba(245, 243, 239, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 1s ease;
}
.intro-badge {
  position: relative;
  width: clamp(220px, 34vw, 400px);
  height: auto;
  opacity: 0;
  transition: opacity 1s ease, transform 1s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}
.intro.is-in .intro-veil,
.intro.is-in .intro-badge { opacity: 1; }
.intro.is-out .intro-veil { opacity: 0; }
body.intro-running .logo-band { visibility: hidden; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-band {
  display: block;
  width: auto;
  height: 46px;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-block: 0.3em;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
}
.nav-phone a,
.nav-lang a {
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 0.85rem;
}
.nav-phone { margin-left: 0.5rem; }
.nav-toggle {
  display: none;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: none;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
  padding: 0.6em 1em;
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(3rem, 8vw, 6.5rem);
}
h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.5vw, 4.8rem);
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
  max-width: 10em;
}
.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  max-width: 34em;
  margin: 0 0 1.8em;
}
.hero-cta { margin: 0 0 2.2em; }
.hero-meta {
  font-size: 0.8rem;
  line-height: 1.9;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}
.hero-visual {
  position: relative;
}
.hero-visual > img:first-child {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.hero-badge {
  position: absolute;
  left: -22px;
  bottom: -26px;
  width: clamp(104px, 11vw, 148px);
  height: auto;
}

/* ---------- Decodeur ---------- */

.decoder {
  background: var(--rubber);
  color: var(--on-rubber);
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 1rem;
}
.services .kicker { color: var(--ink-soft); }
h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.02;
  text-transform: uppercase;
  margin: 0 0 0.6em;
  max-width: 16em;
}
.decoder-intro {
  max-width: 38em;
  color: var(--on-rubber-soft);
  margin: 0 0 3rem;
}
/* Scene : pneu interactif + marquage */
.decoder-stage {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
  border-block: 1px solid var(--line-dark);
  padding-block: clamp(2rem, 4vw, 3rem);
  margin-bottom: 2.5rem;
}
.decoder-tire {
  overflow: hidden;
  border-radius: 50%;
}
.tire-svg {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin-inline: auto;
}
.tire-zoom {
  transform-box: view-box;
  transform-origin: 300px 300px;
  transition: transform .55s cubic-bezier(0.3, 0.7, 0.3, 1), transform-origin .55s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.tire-svg .mark {
  fill: #b9b2a2;
  color: #b9b2a2;
  cursor: pointer;
  transition: fill .15s, color .15s;
}
.tire-svg .mark.is-hot {
  fill: var(--accent);
  color: var(--accent);
}
.tire-svg .mark-dim { fill: #5b564c; }

.marking {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1em 0.35em;
  margin: 0 0 1rem;
}
.marking-extra {
  gap: 0.1em 1.4em;
  margin-bottom: 0;
}
.tok {
  background: none;
  border: none;
  padding: 0.1em 0.05em;
  color: var(--on-rubber);
  text-align: center;
  cursor: pointer;
}
.tok-value {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  border-bottom: 4px solid transparent;
  transition: color .15s, border-color .15s cubic-bezier(0.4, 0, 0.2, 1);
}
.marking-extra .tok-value {
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
}
.tok-label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--on-rubber-soft);
  margin-top: 0.5em;
}
.tok:hover .tok-value { color: var(--accent); }
.tok[aria-expanded="true"] .tok-value {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tok-sep {
  font-family: var(--f-display);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  color: var(--line-dark);
  align-self: flex-start;
}

.tok-defs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 0 2.5rem;
  margin-top: 1.5rem;
}
.tok-def {
  border-top: 1px solid var(--line-dark);
  padding-block: 1.2rem 1.6rem;
}
.tok-def h3 {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.5em;
}
.tok-def-token {
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.4em;
}
.tok-def p {
  margin: 0;
  color: var(--on-rubber-soft);
  font-size: 0.95rem;
}
/* Mode interactif (JS actif) : une seule explication visible */
.tok-defs.js {
  display: block;
  min-height: 13em;
  margin-top: 1.5rem;
}
.tok-defs.js .tok-def { display: none; }
.tok-defs.js .tok-def.is-active { display: block; }
.tok-defs.js .tok-def p { max-width: 44em; font-size: 1.05rem; color: var(--on-rubber); }

.try-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.try-block {
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  padding: clamp(1.4rem, 3vw, 2.2rem);
}
.try-block h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.4rem;
  text-transform: uppercase;
  margin: 0 0 0.5em;
}
.try-block > p {
  color: var(--on-rubber-soft);
  font-size: 0.95rem;
  margin: 0 0 1.4em;
}
.try-block label {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--on-rubber-soft);
  margin-bottom: 0.6em;
}
.input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.input-row input {
  flex: 1 1 10em;
  min-width: 0;
  background: var(--rubber-2);
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  color: var(--on-rubber);
  font-size: 1.1rem;
  padding: 0.7em 0.9em;
  text-transform: uppercase;
}
.input-row input::placeholder { color: #6b665c; text-transform: none; }
.input-row input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}
.result {
  font-size: 0.9rem;
  line-height: 1.8;
}
.result:not(:empty) {
  margin-top: 1.4rem;
  border-top: 1px solid var(--line-dark);
  padding-top: 1.2rem;
}
.result .result-intro {
  color: var(--on-rubber-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}
.result ul {
  list-style: none;
  margin: 0.6em 0 0;
  padding: 0;
}
.result li { padding-block: 0.15em; }
.result .fun { color: var(--accent); }
.result .error { color: var(--on-rubber); }

/* ---------- Prestations ---------- */

.services {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-bottom: 1px solid var(--line);
}
.services-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  margin-top: 2.5rem;
}
.service-main {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: clamp(1.8rem, 4vw, 3.2rem);
}
.service-main h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  text-transform: uppercase;
  margin: 0 0 0.6em;
}
.service-main p { max-width: 36em; }
.service-main .btn { margin-top: 0.8em; }
.service-item {
  border-top: 1px solid var(--line);
  padding-block: 1.3rem 1.5rem;
}
.service-item:last-child { border-bottom: 1px solid var(--line); }
.service-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.4em;
}
.service-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Marques ---------- */

.brands {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line);
}
.brands-intro {
  max-width: 38em;
  color: var(--ink-soft);
  margin: 0 0 2rem;
}
.brands-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.brands-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1em 1.1em;
  margin: 0;
}
.brand {
  background: none;
  border: none;
  padding: 0.1em 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: border-color .15s cubic-bezier(0.4, 0, 0.2, 1);
}
.brand:hover,
.brand[aria-expanded="true"] {
  border-bottom-color: var(--accent);
}
.brand-defs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 0 2.5rem;
  margin-top: 1.5rem;
}
.brand-def {
  border-top: 1px solid var(--line);
  padding-block: 1.1rem 1.4rem;
}
.brand-def h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.4em;
}
.brand-def p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.brand-defs.js { display: block; min-height: 8.5em; margin-top: 2rem; }
.brand-defs.js .brand-def { display: none; border-top: 1px solid var(--ink); }
.brand-defs.js .brand-def.is-active { display: block; }
.brand-defs.js .brand-def p { max-width: 40em; font-size: 1rem; }
.brands-figure {
  margin: 0;
}
.brands-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 2px;
}

/* ---------- Guides (accueil) ---------- */

.guides {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 3rem;
  margin-top: 2rem;
}
.guide-link {
  display: block;
  border-top: 1px solid var(--ink);
  padding-block: 1.4rem 2rem;
  text-decoration: none;
}
.guide-link h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.35rem;
  text-transform: uppercase;
  margin: 0 0 0.4em;
  border-bottom: 3px solid transparent;
  display: inline;
  transition: border-color .15s cubic-bezier(0.4, 0, 0.2, 1);
}
.guide-link:hover h3 { border-bottom-color: var(--accent); }
.guide-link p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0.6em 0 0;
}

/* ---------- Pages guides ---------- */

.guide { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem); }
.breadcrumb {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
}
.guide-head { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.guide-head .lead { margin-bottom: 0; }
.guide-figure {
  margin: clamp(2rem, 5vw, 3rem) 0 0;
}
.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 2;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.guide-figure figcaption {
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 0.7rem;
  max-width: 52em;
}
.guide-section {
  max-width: 46em;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.guide-section h2 {
  border-top: 1px solid var(--ink);
  padding-top: 1.2rem;
  margin-bottom: 0.8em;
}
.guide-section p { max-width: 42em; }
.guide-section ul {
  padding-left: 1.2em;
  max-width: 42em;
}
.guide-section li { margin-block: 0.5em; }
.note {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1.1rem 1.4rem;
  margin-block: 1.5rem;
  max-width: 42em;
}
.table-wrap { overflow-x: auto; margin-block: 1.5rem; }
table {
  border-collapse: collapse;
  width: 100%;
  max-width: 42em;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  border: 1px solid var(--line);
  padding: 0.65em 0.9em;
  vertical-align: top;
}
thead th {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--paper-2);
}

/* ---------- Bande CTA ---------- */

.cta-strip {
  background: var(--accent);
  color: var(--ink);
}
.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 2rem;
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.cta-title {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  margin-bottom: 0.3em;
}
.cta-grid p { margin: 0; max-width: 34em; }
.cta-action { text-align: right; }
.cta-phone {
  font-family: var(--f-mono);
  font-size: 0.9rem;
  display: inline-block;
  margin-top: 0.9em;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--rubber);
  color: var(--on-rubber-soft);
  font-size: 0.95rem;
}
.site-footer a { color: var(--on-rubber); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
}
.footer-badge {
  width: 116px;
  height: auto;
  margin-bottom: 1.1rem;
}
.footer-h {
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0.3em 0 1em;
}
.hours { font-size: 0.85rem; max-width: none; }
.hours th, .hours td {
  border: none;
  padding: 0.25em 1.5em 0.25em 0;
  font-weight: 400;
}
.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav li { margin-block: 0.5em; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line-dark);
  padding-block: 1.3rem;
  font-size: 0.75rem;
}
.footer-base p { margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid,
  .services-grid,
  .cta-grid,
  .footer-grid,
  .decoder-stage,
  .brands-grid {
    grid-template-columns: 1fr;
  }
  .tire-svg { max-width: 380px; }
  .guide-figure img { aspect-ratio: 16 / 9; }
  .cta-action { text-align: left; }
}

@media (max-width: 860px) {
  .logo-band { height: 38px; }
  .hero-badge { left: 10px; bottom: -22px; }
  .nav-toggle { display: block; }
  .nav-phone { display: none; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  body.nav-open .site-nav { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem clamp(16px, 4vw, 48px) 1.2rem;
  }
  .site-nav li { border-top: 1px solid var(--line); }
  .site-nav li:first-child { border-top: none; }
  .site-nav a {
    display: block;
    padding-block: 0.8em;
    border-bottom: none;
  }
  .site-nav a[aria-current="page"] { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
  .nav-phone { margin-left: 0; }
}

@media (max-width: 480px) {
  .tok-value { font-size: clamp(1.7rem, 11vw, 2.4rem); }
  .tok-sep { font-size: clamp(1.7rem, 11vw, 2.4rem); }
  .marking-extra .tok-value { font-size: 1.3rem; }
  .tok-label { font-size: 0.55rem; letter-spacing: 0.06em; }
  .marking { gap: 0.1em 0.5em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
