/* ==========================================================================
   CIN CAR, garage automobile à Mons
   Bleu de travail + blanc atelier, la plaque belge comme signature
   ========================================================================== */

:root {
  --navy: #14284B;
  --navy-2: #1C3561;
  --ink: #101A2B;
  --paper: #F3F5F8;
  --white: #FFFFFF;
  --steel: #586477;
  --line: #D6DCE4;
  --plate-red: #C8102E;
  --eu-blue: #003399;
  --signal: #FFC629;
  --signal-hover: #FFD45E;

  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Barlow", "Segoe UI", system-ui, sans-serif;

  --wrap: 70rem;
  --gutter: clamp(1.15rem, 4vw, 2.25rem);
  --space: clamp(4rem, 9vw, 6.5rem);
  --topbar-h: 4rem;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
a { color: inherit; }
img, svg, iframe { display: block; max-width: 100%; }

:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--signal); color: var(--ink); font-weight: 600;
}
.skip-link:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

/* ---------- Plaque belge ---------- */
.plate {
  display: inline-flex;
  align-items: stretch;
  background: var(--white);
  border: 2px solid var(--plate-red);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 3px var(--white);
}
.plate-eu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  background: var(--eu-blue);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1;
}
.plate-txt {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--plate-red);
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.plate-sm .plate-eu { width: 0.9rem; font-size: 0.55rem; padding-bottom: 2px; }
.plate-sm .plate-txt { font-size: 1.35rem; padding: 0.2rem 0.55rem 0.15rem; }

.plate-xl { border-width: 3px; border-radius: 10px; box-shadow: 0 0 0 5px var(--white), 0 18px 40px rgba(0, 0, 0, 0.35); }
.plate-xl .plate-eu { width: clamp(2.2rem, 5vw, 3.4rem); font-size: clamp(1rem, 2.4vw, 1.6rem); padding: 0.35rem 0 0.45rem; justify-content: space-between; }
.plate-xl .plate-eu svg { width: 70%; height: auto; }
.plate-xl .plate-txt { font-size: clamp(3.4rem, 11vw, 7.5rem); padding: 0.1em 0.3em 0.02em; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.1rem;
  padding: 0 1.35rem;
  border: 2px solid transparent;
  border-radius: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 1.15rem; height: 1.15rem; }
.btn-call { background: var(--signal); color: var(--ink); }
.btn-call:hover { background: var(--signal-hover); }
.btn-outline { border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.btn-outline:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
.btn-outline-dark { border-color: var(--ink); color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-2); }
.btn-small { min-height: 2.5rem; font-size: 1.05rem; padding: 0 1rem; }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.topbar-inner { display: flex; align-items: center; gap: 2rem; height: var(--topbar-h); }
.logo { text-decoration: none; display: inline-flex; }
.nav { display: flex; gap: 1.75rem; margin-left: auto; }
.nav a { color: rgba(255, 255, 255, 0.8); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--white); }

@media (max-width: 40rem) {
  .nav { display: none; }
  .topbar-inner { justify-content: space-between; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, 0.035) 46px 48px),
    var(--navy);
  color: var(--white);
  padding-block: clamp(3rem, 8vw, 6rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); margin-top: clamp(1.75rem, 4vw, 2.5rem); max-width: 16ch; }
.lead { margin-top: 1rem; max-width: 34rem; font-size: 1.2rem; color: rgba(255, 255, 255, 0.82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.signboard {
  background: var(--white);
  color: var(--ink);
  border-radius: 6px;
  border-top: 6px solid var(--signal);
  padding: 1.5rem;
}
.rating {
  display: grid;
  gap: 0.15rem;
  text-decoration: none;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.rating strong { font-family: var(--font-display); font-size: 1.6rem; }
.rating-count { color: var(--steel); font-size: 0.95rem; }
.rating:hover .rating-count { text-decoration: underline; }
.stars { color: #F2A900; letter-spacing: 0.1em; font-size: 1.15rem; }

.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.75rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--steel); font-size: 0.95rem; }
.facts dd { margin: 0; font-weight: 600; }
.facts a { text-decoration: none; }
.facts a:hover { text-decoration: underline; }

@media (max-width: 52rem) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--space); }
.section-tint { background: var(--paper); }
.section-head { max-width: 38rem; margin-bottom: 2.25rem; }
.section-head h2, .avis-grid h2, .acces-info h2 { font-size: clamp(2.1rem, 4.2vw, 3rem); margin-bottom: 0.75rem; }
.section-head p { color: var(--steel); font-size: 1.15rem; }

/* ---------- Bon d'intervention ---------- */
.jobcard {
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--white);
  max-width: 52rem;
}
.jobcard-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}
.jobcard-head span:last-child { color: rgba(255, 255, 255, 0.65); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; border-bottom: 1px dashed var(--line); }
.checklist input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.checklist label {
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: 1rem;
  padding: 1.15rem 1.25rem;
  cursor: pointer;
}
.checklist label::before {
  content: "";
  grid-row: span 2;
  width: 1.6rem;
  height: 1.6rem;
  margin-top: 0.15rem;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: var(--white) center / 70% no-repeat;
}
.checklist input:checked + label::before {
  background-color: var(--signal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='%23101A2B' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.checklist input:focus-visible + label { outline: 3px solid var(--signal); outline-offset: -3px; }
.checklist label:hover { background: var(--paper); }
.checklist strong { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; line-height: 1.15; }
.checklist label span { color: var(--steel); max-width: 40rem; }

.jobcard-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
}
.jobcard-foot p { font-weight: 600; }

/* ---------- Avis ---------- */
.avis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.avis-txt { color: var(--steel); font-size: 1.15rem; max-width: 34rem; margin-bottom: 1.5rem; }
.score { display: grid; justify-items: center; text-align: center; }
.score-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(6rem, 16vw, 10rem); line-height: 0.9; color: var(--navy); }
.stars-lg { font-size: 1.8rem; }
.score-sub { color: var(--steel); margin-top: 0.25rem; }
.review { margin: 0; padding: 1.25rem; background: var(--white); border-left: 4px solid var(--signal); }
.review cite { display: block; margin-top: 0.5rem; color: var(--steel); font-style: normal; }

@media (max-width: 44rem) {
  .avis-grid { grid-template-columns: 1fr; }
  .score { order: -1; justify-items: start; text-align: left; }
}

/* ---------- Accès ---------- */
.acces-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch;
}
.acces-info address { font-style: normal; font-size: 1.2rem; line-height: 1.5; margin: 0.5rem 0 1rem; }
.acces-info p { color: var(--steel); max-width: 28rem; }
.map { min-height: 22rem; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.map iframe { width: 100%; height: 100%; min-height: 22rem; border: 0; }

@media (max-width: 52rem) {
  .acces-grid { grid-template-columns: 1fr; }
}

/* ---------- Pied de page ---------- */
.footer { background: var(--ink); color: rgba(255, 255, 255, 0.7); padding-block: 1.75rem; font-size: 0.95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.credit { color: rgba(255, 255, 255, 0.45); }

/* ---------- Barre d'appel mobile ---------- */
.callbar { display: none; }
@media (max-width: 40rem) {
  .callbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3.5rem;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--signal);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    text-decoration: none;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
  }
  .callbar svg { width: 1.3rem; height: 1.3rem; }
  .footer { padding-bottom: calc(1.75rem + 3.5rem + env(safe-area-inset-bottom, 0px)); }
  .topbar .btn-call { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
