/* ═══════════════════════════════════════════════
   ATELIER VÉLO DU VERNET
   Direction: "L'Atelier" — warm workshop aesthetic
   Fonts: Bricolage Grotesque + DM Sans
   ═══════════════════════════════════════════════ */

/* --- TOKENS --- */
:root {
  --bg-dark:       #1a1714;
  --bg-warm:       #faf5eb;
  --bg-mid:        #2a2520;
  --terra:         #2a5da8;
  --terra-light:   #4a82c8;
  --amber:         #d4a035;
  --sage:          #4a6a4a;
  --cream:         #f0ead6;
  --text-dark:     #1a1714;
  --text-light:    #f0ead6;
  --text-muted:    #706a60;
  --text-muted-on-dark: #a8a090;
  --radius:        10px;
  --font-display:  'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:     'DM Sans', system-ui, sans-serif;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--bg-warm);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* --- ACCESSIBILITY --- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

*:focus-visible {
  outline: 2px solid var(--terra-light);
  outline-offset: 3px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* --- GRAIN OVERLAY --- */
.grain {
  position: fixed;
  inset: -100%;
  width: 300%;
  height: 300%;
  z-index: 9999;
  pointer-events: none;
  filter: url(#grain-filter);
  opacity: 0.022;
}

/* --- SCROLL REVEAL --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 23, 20, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(240, 234, 214, 0.06);
}

#services,
#horaires,
#contact {
  scroll-margin-top: 5.5rem;
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.9rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--cream);
}

.nav-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--terra);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  border-radius: 8px;
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.2;
  color: var(--cream);
  opacity: 0.85;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--cream);
  opacity: 0.6;
  transition: opacity 0.25s;
  letter-spacing: 0.02em;
}
.nav-links a:hover { opacity: 1; }

/* Status badge */
.status-indicator {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  line-height: 1;
}
.status-indicator.is-open {
  background: var(--sage);
  color: var(--cream);
  animation: pulse-glow 2s ease-in-out infinite;
}
.status-indicator.is-closed {
  background: rgba(240, 234, 214, 0.08);
  color: var(--text-muted-on-dark);
}

/* Nav toggle (hamburger) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(90, 124, 90, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(90, 124, 90, 0); }
}

/* ═══════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════ */
.hero {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 8vw, 6rem);
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow behind text */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 140%;
  background: radial-gradient(ellipse, rgba(42, 93, 168, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terra-light);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero-title span { display: block; }
.hero-title-accent { color: var(--terra-light); }

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--cream);
  opacity: 0.65;
  max-width: 420px;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.8rem 1.75rem;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--terra);
  color: var(--cream);
  border-color: var(--terra);
}
.btn-primary:hover {
  background: var(--terra-light);
  border-color: var(--terra-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(42, 93, 168, 0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(240, 234, 214, 0.2);
}
.btn-ghost:hover {
  border-color: rgba(240, 234, 214, 0.5);
  transform: translateY(-2px);
}

/* --- Bike wheel animation --- */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bike {
  width: 100%;
  max-width: 320px;
  opacity: 0;
  animation: wheel-reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards,
             wheel-spin 60s linear 1.5s infinite;
}

@keyframes wheel-reveal {
  from { opacity: 0; transform: scale(0.85) rotate(-30deg); }
  to   { opacity: 0.2; transform: scale(1) rotate(0deg); }
}

@keyframes wheel-spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════
   MARQUEE
   ═══════════════════════════════════════════════ */
.marquee {
  background: var(--terra);
  color: var(--cream);
  padding: 0.75rem 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.marquee-track {
  display: inline-flex;
  animation: marquee-scroll 30s linear infinite;
}
.marquee-track span {
  flex-shrink: 0;
  padding-right: 0;
}

@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════ */
.about {
  background: var(--bg-warm);
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.4fr 0.6fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about-label h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-dark);
}

.label-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terra);
  border: 1.5px solid var(--terra);
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.about-body p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.about-body p:last-child { margin-bottom: 0; }
.about-body strong { color: var(--text-dark); font-weight: 500; }

/* ═══════════════════════════════════════════════
   SECTION HEADINGS
   ═══════════════════════════════════════════════ */
.section-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  color: var(--cream);
  margin-bottom: 2.5rem;
}
.section-heading--dark { color: var(--text-dark); }

/* ═══════════════════════════════════════════════
   SERVICES
   ═══════════════════════════════════════════════ */
.services {
  background: var(--bg-dark);
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: var(--bg-mid);
  border: 1px solid rgba(240, 234, 214, 0.05);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s,
              box-shadow 0.35s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--terra);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 234, 214, 0.1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.service-card:hover::before { transform: scaleX(1); }

.service-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--terra);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -0.04em;
}

.service-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted-on-dark);
  line-height: 1.6;
}

/* Accent card */
.service-card--accent {
  background: var(--terra);
  border-color: var(--terra);
}
.service-card--accent .service-num { color: var(--cream); opacity: 0.3; }
.service-card--accent p { color: var(--cream); }
.service-card--accent::before { background: var(--amber); }

/* ═══════════════════════════════════════════════
   HORAIRES
   ═══════════════════════════════════════════════ */
.horaires {
  background: var(--bg-warm);
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.horaires-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
}

.horaires-bars {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 48px 1fr 80px;
  align-items: center;
  gap: 1rem;
}

.bar-day {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bar-track {
  height: 10px;
  background: rgba(26, 23, 20, 0.06);
  border-radius: 50px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: var(--fill);
  background: linear-gradient(90deg, var(--terra), var(--terra-light));
  border-radius: 50px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Animate bar fill only when visible */
.bar-row:not(.is-visible) .bar-fill { width: 0; }

.bar-time {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--terra);
  text-align: right;
}
.bar-time--closed { color: var(--text-muted); font-weight: 500; }
.bar-row--closed .bar-day,
.bar-row--closed .bar-time { color: var(--text-muted); }

/* ═══════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════ */
.contact {
  background: var(--bg-dark);
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.contact-card {
  background: var(--bg-mid);
  border: 1px solid rgba(240, 234, 214, 0.05);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: border-color 0.3s;
}
.contact-card:hover { border-color: rgba(240, 234, 214, 0.12); }

.contact-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(42, 93, 168, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terra);
  margin-bottom: 1.25rem;
}

.contact-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.contact-card p {
  font-size: 0.9rem;
  color: var(--text-muted-on-dark);
  line-height: 1.6;
}

.contact-phone a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--cream);
  transition: color 0.2s;
}
.contact-phone a:hover { color: var(--terra-light); }

.contact-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: #6ba0e0;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.contact-link:hover { color: var(--cream); }

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(240, 234, 214, 0.05);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--cream);
}
.footer-brand .nav-logo-mark {
  width: 32px;
  height: 32px;
  font-size: 0.65rem;
  border-radius: 6px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted-on-dark);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { display: none; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .nav-toggle { display: flex; }
  .nav-inner { flex-wrap: wrap; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(240, 234, 214, 0.06);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { opacity: 0.85; padding: 0.5rem 0; }

  #services,
  #horaires,
  #contact {
    scroll-margin-top: 6rem;
  }

  .bar-row { grid-template-columns: 40px 1fr 64px; gap: 0.6rem; }
  .bar-day { font-size: 0.75rem; }
  .bar-time { font-size: 0.75rem; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 400px) {
  .hero-title { font-size: 2.4rem; }
  .service-card { padding: 1.5rem 1.25rem; }
}

/* ═══════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .marquee-track {
    animation: none;
  }
  .hero-bike {
    animation: none;
    opacity: 0.2;
  }
  .bar-fill {
    transition: none;
  }
  .status-indicator.is-open {
    animation: none;
  }
}

@media print {
  .grain, .marquee, .hero-bike, .nav { display: none; }
  .hero { background: #fff; color: #000; padding: 2rem 0; }
  .services, .contact { background: #fff; color: #000; }
  .service-card, .contact-card { border: 1px solid #ccc; }
  .section-heading { color: #000; }
}
