/* =========================================
   Station Pneus Mobile — styles-mobile.css
   Mobile-first responsive stylesheet to paste as-is.

   HOW TO USE (2 steps):
   1) In <head>, add:
      <meta name="viewport" content="width=device-width, initial-scale=1" />
      <link rel="stylesheet" href="styles-mobile.css" />
   2) Keep your HTML using the class names below (header, brand, nav, contact, hero, section, grid-2, grid-3, footer, etc.)

   Tip: Ensure all buttons/links use class="btn" for big tap targets.
   ========================================= */

/* 1) CSS Reset (mobile-first) */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }

/* 2) Theme tokens */
:root {
  --bg: #0f0f10;            /* near-black */
  --surface: #141417;       /* card bg */
  --surface-2: #1b1b20;     
  --text: #f7f7f7;          /* primary text */
  --muted: #c8c8ce;         /* secondary text */
  --brand: #ffd100;         /* black/yellow brand */
  --brand-ink: #2b2b2b;
  --accent: #ffb300;        /* CTAs hover */
  --ring: rgba(255, 209, 0, 0.4);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* 3) Base layout & typography */
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.container {
  width: min(1100px, 100%);
  margin-inline: auto;
  padding: 16px;           /* mobile gutter */
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
p { margin: 0 0 1em; color: var(--muted); }

/* 4) Accessibility helpers */
.btn, button, a[role="button"] {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  min-height: 48px;        /* fat-finger safe */
  padding: 0 16px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  text-decoration: none; border: none; cursor: pointer;
  box-shadow: var(--shadow);
}
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.btn:hover { background: var(--accent); }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* 5) Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15,15,16,0.8);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #2a2a30;
}
.header .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* brand | nav-toggle | contact */
  align-items: center;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img.logo { width: 44px; height: 44px; object-fit: contain; }
.brand .name { font-weight: 800; letter-spacing: .2px; }
.brand .name .title { font-size: clamp(18px, 4.5vw, 28px); display: block; }
.brand .name .subtitle { font-size: 12px; color: var(--muted); margin-top: -2px; }

/* Contact block (right on desktop, hidden on tiny screens) */
.contact { justify-self: end; text-align: right; }
.contact a { display: inline-block; font-weight: 700; }
.contact .phone { display: block; font-size: 14px; }
.contact .email { display: none; font-size: 12px; color: var(--muted); }

/* 6) Mobile nav (no JS, checkbox hack) */
#nav-toggle { display: none; }
.nav-toggle {
  justify-self: center; /* sits in the middle column */
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #2a2a30; padding: 10px 14px; border-radius: 999px;
  background: var(--surface-2); color: var(--text); cursor: pointer; user-select: none;
}
.nav-toggle .bars { width: 18px; height: 2px; background: currentColor; position: relative; display: inline-block; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
}
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }

.nav {
  display: none; /* hidden by default on mobile */
  grid-column: 1 / -1;
}
#nav-toggle:checked ~ .nav { display: block; }
.nav ul { list-style: none; margin: 0; padding: 8px 0 0; }
.nav li { border-top: 1px solid #2a2a30; }
.nav a { display: block; padding: 14px 2px; font-weight: 600; color: var(--text); }

/* 7) Hero (top section) */
.hero {
  padding: 28px 0 14px;
}
.hero .title { font-size: clamp(28px, 7vw, 50px); font-weight: 900; }
.hero .lead { font-size: clamp(15px, 4.2vw, 18px); }
.hero .cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* 8) Sections & grids */
.section { padding: 28px 0; }
.section .section-title { font-size: clamp(18px, 5vw, 28px); font-weight: 800; margin-bottom: 12px; }

.grid-2, .grid-3 {
  display: grid; gap: 12px;
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

/* Cards in grids */
.feature { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.feature .icon { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 900; }

/* 9) Lists & price table (compact on mobile) */
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px dashed #2a2a30; display: flex; justify-content: space-between; gap: 10px; }
.list .left { color: var(--text); }
.list .right { color: var(--brand); font-weight: 700; }

/* 10) Footer */
.footer { padding: 24px 0 40px; color: var(--muted); }
.footer .links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer .fine { font-size: 12px; margin-top: 10px; }

/* 11) Utilities */
.hide-sm { display: none; }
.center { text-align: center; }
.stack { display: grid; gap: 12px; }
.spaced { margin-top: 14px; }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid #2a2a30; font-size: 12px; }

/* 12) Media queries — scale up progressively */
@media (min-width: 480px) {
  .contact .email { display: inline-block; margin-left: 10px; }
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 40px 0 20px; }
}

@media (min-width: 840px) {
  /* Desktop header layout: brand left, nav center, contact right */
  .header .wrap {
    grid-template-columns: 1fr auto 1fr; /* keep columns */
  }
  .nav-toggle { display: none; }
  .nav { display: block !important; grid-column: auto; justify-self: center; }
  .nav ul { display: flex; gap: 18px; padding: 0; }
  .nav li { border: none; }
  .nav a { padding: 10px 0; }

  .contact { display: block; }
  .brand img.logo { width: 56px; height: 56px; }

  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1080px) {
  .container { padding: 24px; }
  .hero .title { font-size: 56px; }
}

/* 13) Forms */
.input, input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #2a2a30; background: var(--surface); color: var(--text);
}
.input:focus, textarea:focus, select:focus { outline: 3px solid var(--ring); outline-offset: 2px; }

/* 14) Helpers for your header structure used earlier */
/* Example HTML skeleton you can follow (for reference only):
<header class="header">
  <div class="container wrap">
    <div class="brand">
      <img src="/images/logo-long.png" alt="Station Pneus Mobile" class="logo" />
      <div class="name">
        <span class="title">Station Pneus Mobile</span>
        <span class="subtitle">Service mobile – Estrie</span>
      </div>
    </div>

    <label for="nav-toggle" class="nav-toggle"><span class="bars"></span> Menu</label>
    <input type="checkbox" id="nav-toggle" />

    <nav class="nav" aria-label="Navigation principale">
      <ul>
        <li><a href="/">Accueil</a></li>
        <li><a href="/services">Services</a></li>
        <li><a href="/prix">Prix</a></li>
        <li><a href="/contact">Contact</a></li>
      </ul>
    </nav>

    <div class="contact">
      <a class="phone" href="tel:+18195551234">📞 819‑555‑1234</a>
      <a class="email" href="mailto:info@stationpneusmobile.com">info@stationpneusmobile.com</a>
    </div>
  </div>
</header>
*/

/* 15) Performance tips */
/* - Compress images (WebP/AVIF when possible).
   - Use <img width height> attributes to reduce layout shift.
   - Serve this CSS with caching (e.g., styles-mobile.css?v=1). */
