/* ==========================================================================
   Jolibois Pneus et Mécanique — feuille de style du site
   Conception propre à ce commerce. Jetons de tokens.css uniquement.
   Signature : filet rouge de 4 px · hachure diagonale sur les bandes sombres ·
   chevron rouge en marqueur de liste · angles francs (2 px / 4 px).
   Ordre : 1 base · 2 bandes · 3 en-tête · 4 héros · 5 listes · 6 cartes ·
   7 plaques de marques · 8 figures · 9 horaire · 10 galerie · 11 contact ·
   12 bande d'action · 13 pied de page · 14 adaptations 320–1920 px
   ========================================================================== */

/* ---------- 1. Base typographique ---------------------------------------- */

body {
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
}

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

h2 {
  margin-bottom: 0.45em;
}

.wc-lead {
  max-width: 54ch;
  color: var(--c-muted);
}

.wc-section--dark .wc-lead,
.jb-hero .wc-lead {
  color: var(--c-on-dark-muted);
}

/* Le chapô du héros doit rester pleinement lisible : texte clair franc. */
.jb-hero .wc-lead {
  color: var(--c-on-dark);
}

strong {
  font-weight: 700;
}

/* ---------- 2. Bandes et têtes de section -------------------------------- */

/* Trame d'atelier : diagonale très discrète, pur CSS, sur les bandes sombres. */
.jb-hatch {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.028) 0 2px,
    rgba(255, 255, 255, 0) 2px 11px
  );
}

.wc-section-head {
  max-width: 44rem;
}

.wc-eyebrow {
  margin-bottom: 0.75rem;
}

/* Le filet : marque de section, reprise du liseré rouge de la façade. */
.jb-rule {
  display: block;
  width: 52px;
  height: 4px;
  margin: 0 0 1.1rem;
  background: var(--c-brand);
}

.wc-section--dark .jb-rule,
.jb-hero .jb-rule {
  background: var(--c-brand-on-dark);
}

/* En-tête de page intérieure */
.jb-pagehead {
  border-bottom: 1px solid rgba(41, 25, 25, 0.1);
}

.jb-pagehead .wc-section-head {
  margin-bottom: 1.5rem;
}

.jb-pagehead h1 {
  max-width: 24ch;
}

/* Liens d'ancre sous le titre de la page Services */
.jb-jump {
  margin-top: 1.5rem;
}

/* ---------- 3. En-tête ---------------------------------------------------- */

.wc-header {
  border-top: 4px solid var(--c-brand);
  border-bottom: 1px solid rgba(41, 25, 25, 0.14);
}

.wc-header__bar {
  min-height: 84px;
}

.wc-brand img {
  height: 52px;
  width: auto;
  max-height: none;
}

.wc-nav__list a:not(.wc-btn) {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ---------- 4. Héros mosaïque -------------------------------------------- */

.jb-hero {
  border-bottom: 4px solid var(--c-brand);
}

.jb-hero .wc-split {
  align-items: center;
}

.jb-hero h1 {
  max-width: 20ch;
  margin-bottom: 0.6em;
}

.jb-hero .wc-lead {
  max-width: 46ch;
}

.jb-hero .wc-actions {
  margin-top: 1.75rem;
}

.wc-mosaic {
  gap: 10px;
  max-width: 560px;
  margin-inline: auto;
}

.wc-mosaic img {
  border-radius: var(--radius-lg);
}

/* Cadrage choisi pour garder le sujet : l'enseigne à droite, le visage du mécanicien. */
.wc-mosaic img:nth-child(2) {
  object-position: 62% 42%;
}

.wc-mosaic img:nth-child(3) {
  object-position: 58% 45%;
}

/* ---------- 5. Listes de services (chevron rouge) ------------------------ */

.jb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0 2.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.jb-list li {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 0.6rem 0 0.6rem 1.8rem;
  border-bottom: 1px solid rgba(41, 25, 25, 0.12);
  font-weight: 600;
  line-height: 1.4;
}

.jb-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.15em;
  width: 8px;
  height: 8px;
  border-right: 3px solid var(--c-brand);
  border-bottom: 3px solid var(--c-brand);
  transform: translateY(-50%) rotate(-45deg);
}

.wc-section--dark .jb-list li {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.wc-section--dark .jb-list li::before {
  border-right-color: var(--c-brand-on-dark);
  border-bottom-color: var(--c-brand-on-dark);
}

/* ---------- 6. Cartes de catégorie --------------------------------------- */

/* Quatre catégories : 1 / 2 / 4 colonnes — jamais de rangée orpheline. */
.jb-cats {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 560px) {
  .jb-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .jb-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.jb-cat {
  border-radius: 0;
  border-top: 4px solid var(--c-brand);
  gap: 0;
}

.jb-cat h3 {
  margin-bottom: 0.3em;
  font-size: clamp(1.22rem, 1.1rem + 0.5vw, 1.45rem);
}

.jb-cat > p {
  color: var(--c-muted);
  margin-bottom: 0.9rem;
}

.jb-cat .jb-list {
  grid-template-columns: 1fr;
  margin-bottom: 1.25rem;
}

.jb-cat .jb-list li:first-child {
  padding-top: 0;
}

.jb-cat .jb-list li:first-child::before {
  top: 0.55em;
}

.jb-cat__more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--c-brand-ink);
  text-decoration: none;
}

.jb-cat__more::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2.5px solid currentColor;
  border-top: 2.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.jb-cat__more:hover,
.jb-cat__more:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.jb-cat__more:hover::after {
  transform: rotate(45deg) translate(2px, -2px);
}

/* ---------- 7. Plaques de marques de pneus ------------------------------- */

.jb-brands {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.jb-brands li {
  max-width: none;
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 60px;
  padding: 0.55rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  color: var(--c-on-dark);
}

@media (min-width: 560px) {
  .jb-brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 860px) {
  .jb-brands { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1120px) {
  .jb-brands { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------- 8. Figures (photos avec légende) ----------------------------- */

.jb-figure {
  margin: 0;
}

.jb-figure img {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 560 / 374;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.jb-figure figcaption {
  max-width: 46ch;
  margin-top: 0.85rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--c-brand);
  color: var(--c-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.wc-section--dark .jb-figure figcaption {
  border-left-color: var(--c-brand-on-dark);
  color: var(--c-on-dark-muted);
}

/* ---------- 9. Horaire --------------------------------------------------- */

.jb-hours-wrap {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.wc-hours {
  max-width: 480px;
  border-top: 1px solid rgba(41, 25, 25, 0.12);
}

.wc-hours th,
.wc-hours td {
  padding: 0.8rem 0.9rem;
  border-bottom-color: rgba(41, 25, 25, 0.12);
  font-size: 1.02rem;
}

.wc-hours th {
  font-family: var(--font-head);
  font-weight: 600;
}

.wc-hours td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wc-hours tr.is-today td {
  color: var(--c-ink);
}

/* Le kit place cette étiquette à 0,8 rem : on remonte à 14 px minimum. */
.wc-hours__today {
  font-size: 0.875rem;
  padding: 0.12rem 0.5rem;
  letter-spacing: 0.02em;
}

.jb-note {
  max-width: 46ch;
  margin: 0;
  padding-left: 0.9rem;
  border-left: 3px solid var(--c-brand);
  color: var(--c-muted);
}

.jb-note + .wc-actions {
  margin-top: 1.75rem;
}

.jb-list + .jb-note {
  margin-top: 1.5rem;
}

.wc-section--dark .jb-note {
  border-left-color: var(--c-brand-on-dark);
  color: var(--c-on-dark-muted);
}

/* ---------- 10. Galerie --------------------------------------------------- */

.wc-gallery {
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wc-gallery img {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
}

.wc-gallery a {
  border-radius: var(--radius);
  background: var(--c-surface-alt);
}

@media (min-width: 1024px) {
  .wc-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- 11. Contact et formulaire ------------------------------------ */

.jb-contact-grid {
  align-items: start;
}

.jb-contact-grid h3 {
  margin-top: 2.25rem;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.wc-contact {
  gap: 1.35rem;
  padding: 0;
  margin: 0 0 2rem;
}

.wc-contact dt {
  font-family: var(--font-head);
}

.wc-contact dd {
  font-size: 1.1rem;
  line-height: 1.45;
}

.jb-formcard {
  border-top: 4px solid var(--c-brand);
  background: var(--c-surface);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  box-shadow: 0 1px 0 rgba(41, 25, 25, 0.1), 0 14px 32px rgba(41, 25, 25, 0.07);
}

.jb-formcard h2 {
  margin-top: 0;
}

.wc-form {
  max-width: none;
}

.wc-form input,
.wc-form select,
.wc-form textarea {
  border-radius: var(--radius);
  border-color: #6b5a5b;
}

.wc-form [type="submit"] {
  margin-top: 0.35rem;
}

.jb-form-status {
  margin: 0;
  padding-left: 0.9rem;
  border-left: 3px solid var(--c-brand);
  font-weight: 600;
  color: var(--c-ink);
}

/* ---------- 12. Bande d'action ------------------------------------------- */

.jb-cta h2 {
  margin-bottom: 0.3em;
}

.jb-cta p {
  margin-bottom: 0;
  max-width: 48ch;
}

.jb-cta .wc-actions {
  justify-content: flex-start;
}

@media (min-width: 860px) {
  .jb-cta .wc-actions { justify-content: flex-end; }
}

/* ---------- 13. Pied de page --------------------------------------------- */

.wc-footer {
  border-top: 4px solid var(--c-brand);
}

.jb-foot__brand img {
  height: 46px;
  width: auto;
  margin-bottom: 0.9rem;
}

.jb-foot__brand p {
  color: var(--c-on-dark-muted);
  margin-bottom: 0;
  max-width: 28ch;
}

.wc-footer h3 {
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.wc-footer ul a {
  text-decoration: none;
  font-weight: 600;
}

.wc-footer ul a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.jb-foot__cta {
  margin-top: 1rem;
}

/* ---------- 14. Adaptations 320–1920 px ---------------------------------- */

@media (max-width: 859.98px) {
  .jb-hero .wc-split { gap: 2rem; }
  .jb-cta .wc-actions { margin-top: 1.5rem; }
}

@media (max-width: 599.98px) {
  .wc-header__bar { min-height: 72px; }
  .wc-brand img { height: 44px; }
  .jb-hero { padding-block: 2rem 2.5rem; }
  .jb-hero h1 { max-width: none; }
  .wc-hours th,
  .wc-hours td { padding: 0.7rem 0.4rem; }
}

@media (max-width: 479.98px) {
  .jb-hero .wc-actions,
  .jb-cta .wc-actions,
  .jb-pagehead .wc-actions:not(.jb-jump) {
    flex-direction: column;
    align-items: stretch;
  }
  .jb-hero .wc-actions .wc-btn,
  .jb-cta .wc-actions .wc-btn,
  .jb-pagehead .wc-actions:not(.jb-jump) .wc-btn {
    width: 100%;
  }
  /* Les liens d'ancre restent en pastilles côte à côte : ils ne doivent pas
     repousser l'action principale sous la ligne de flottaison. */
  .jb-jump .wc-btn {
    padding-inline: 1rem;
  }
}

@media (min-width: 1500px) {
  .wc-container { max-width: 1240px; }
}
