/* =============================================================
   Style — Auto-Services Desbonnes & Fils (Sainte-Rose)
   Template M — Lame | WebStudio Caraïbes
   Mobile-first · WCAG AA
   ============================================================= */

@import './tokens.css';

/* ── 1. Reset & base ──────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-ink);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

ul { list-style: none; }
address { font-style: normal; }

/* ── 2. Skip link ─────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: var(--color-surface);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top var(--duration) var(--ease-out);
}

.skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
  .skip-link { transition: none; }
}

/* ── 3. Container ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ── 4. Typography ────────────────────────────────────────── */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--color-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); font-weight: 700; }

/* ── 5. Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--duration) var(--ease-out),
    color var(--duration) var(--ease-out),
    border-color var(--duration) var(--ease-out),
    transform var(--duration) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-surface);
  border-color: var(--color-accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-surface);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover,
  .btn-primary:focus-visible { transform: none; }
}

.btn-outline {
  background-color: transparent;
  color: var(--color-surface);
  border-color: var(--color-surface);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background-color: var(--color-surface);
  color: var(--color-primary);
}

.btn-full { width: 100%; }

/* ── 6. Header ────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-primary);
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition:
    height var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
}

.site-header.is-scrolled {
  height: var(--header-h-small);
  box-shadow: 0 2px 16px rgb(0 0 0 / 0.28);
}

.header-inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.brand { text-decoration: none; flex-shrink: 0; }
.brand img {
  display: block;
  height: 40px;
  width: auto;
  transition: height var(--duration) var(--ease-out);
}

.site-header.is-scrolled .brand img { height: 32px; }

@media (prefers-reduced-motion: reduce) {
  .brand img { transition: none; }
}

/* ── 7. Navigation ────────────────────────────────────────── */
.main-nav { display: none; }

.main-nav.is-open {
  display: block;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background-color: var(--color-primary);
  padding: var(--space-lg) var(--container-pad);
  overflow-y: auto;
  z-index: 99;
}

.main-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.main-nav a {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-surface);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-block;
}

.main-nav a:hover,
.main-nav a:focus-visible { color: var(--color-accent); }

.main-nav a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.nav-cta {
  padding: 0.5rem 1.25rem !important;
  background-color: var(--color-accent) !important;
  color: var(--color-surface) !important;
  border-radius: 3px;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background-color: var(--color-accent-dark) !important;
  color: var(--color-surface) !important;
}

/* Nav current page indicator */
.main-nav a[aria-current="page"] {
  color: var(--color-accent);
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-surface);
  border-radius: 3px;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background-color: var(--color-surface);
  border-radius: 2px;
  transition:
    transform var(--duration) var(--ease-out),
    opacity var(--duration) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle span { transition: none; }
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 768px) {
  .main-nav {
    display: block;
    position: static;
    background: none;
    padding: 0;
  }
  .main-nav ul { flex-direction: row; align-items: center; gap: var(--space-md); }
  .main-nav a { font-size: 0.875rem; }
  .nav-toggle { display: none; }
}

/* ── 8. Visual Placeholders ───────────────────────────────── */
.visual-placeholder {
  display: block;
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-primary) 22%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--color-primary) 10%, var(--color-bg)) 55%,
      color-mix(in srgb, var(--color-secondary) 18%, var(--color-bg)) 100%
    );
}

.visual-placeholder[data-aspect="4:3"]  { aspect-ratio: 4 / 3; }
.visual-placeholder[data-aspect="1:1"]  { aspect-ratio: 1 / 1; }
.visual-placeholder[data-aspect="3:4"]  { aspect-ratio: 3 / 4; }
.visual-placeholder[data-aspect="21:9"] { aspect-ratio: 21 / 9; }

.visual-placeholder[data-tone="secondary"] {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-secondary) 22%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--color-secondary) 10%, var(--color-bg)) 55%,
      color-mix(in srgb, var(--color-primary) 16%, var(--color-bg)) 100%
    );
}

.visual-placeholder[data-tone="accent"] {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-accent, var(--color-primary)) 22%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--color-primary) 12%, var(--color-bg)) 60%,
      color-mix(in srgb, var(--color-secondary) 16%, var(--color-bg)) 100%
    );
}

.visual-placeholder[data-tone="muted"] {
  background: color-mix(in srgb, var(--color-text) 8%, var(--color-bg));
}

/* Hero image placeholder fills the blade section */
.hero-image .visual-placeholder {
  aspect-ratio: auto;
  height: 100%;
  min-height: 280px;
  border-radius: 0;
}

/* Service block image placeholder fills the block side */
.service-block__image .visual-placeholder {
  aspect-ratio: auto;
  height: 100%;
  min-height: 260px;
  border-radius: 0;
}

/* Realisations figure placeholder */
.realisations-grid figure .visual-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 0;
}

/* ── 9. Hero — Diagonal blade ─────────────────────────────── */
.hero {
  position: relative;
  background-color: var(--color-primary);
  color: var(--color-surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 520px;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-xl) var(--container-pad) var(--space-lg);
  max-width: 640px;
}

.hero .eyebrow { color: var(--color-accent); }

.hero h1 {
  color: var(--color-surface);
  margin-bottom: var(--space-sm);
}

.hero-sub {
  font-size: 1.0625rem;
  color: rgb(255 255 255 / 0.82);
  margin-bottom: var(--space-lg);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

@media (min-width: 1100px) {
  .hero {
    display: grid;
    grid-template-columns: 60fr 40fr;
    align-items: stretch;
    min-height: 640px;
  }

  .hero-content {
    padding: var(--space-2xl) var(--space-xl) var(--space-2xl)
      calc((100vw - var(--container-max)) / 2 + var(--container-pad));
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero-image {
    aspect-ratio: auto;
    clip-path: polygon(8% 0%, 100% 0%, 100% 100%, 0% 100%);
  }
}

/* ── 10. Stats band ───────────────────────────────────────── */
.stats-band {
  background-color: var(--color-stats-bg);
  color: var(--color-stats-ink);
  padding: var(--space-lg) var(--container-pad);
}

.stats-grid {
  max-width: var(--container-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  text-align: center;
}

@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: var(--space-sm);
}

.stat strong {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1;
}

.stat span {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.72);
}

/* ── 11. Services ─────────────────────────────────────────── */
.services { padding-block: var(--space-xl); }

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header h2 { margin-top: 0.25rem; }

.service-block {
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
}

.service-block + .service-block { margin-top: 0.5rem; }

.service-block__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.service-block__content {
  padding: var(--space-lg) var(--container-pad);
  max-width: var(--container-max);
  margin-inline: auto;
  width: 100%;
}

.service-block__content h3 { margin-bottom: var(--space-sm); }

.service-block__content p {
  color: var(--color-ink-muted);
  margin-bottom: var(--space-sm);
}

.service-block__content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.service-block__content ul li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--color-ink-muted);
}

.service-block__content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  background-color: var(--color-accent);
  border-radius: 50%;
}

@media (min-width: 1100px) {
  .service-block {
    flex-direction: row;
    min-height: 480px;
  }

  .service-block__image {
    width: 50%;
    aspect-ratio: auto;
    flex-shrink: 0;
  }

  .service-block__content {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-xl);
    margin-inline: 0;
  }

  .service-block--reverse {
    flex-direction: row-reverse;
    background-color: var(--color-bg);
  }
}

/* ── 12. About ────────────────────────────────────────────── */
.about {
  background-color: var(--color-primary);
  color: var(--color-surface);
  padding-block: var(--space-2xl);
}

.about-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .about-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.about .eyebrow { color: var(--color-accent); }

.about-text h2 {
  color: var(--color-surface);
  margin-bottom: var(--space-md);
}

.about-text p {
  color: rgb(255 255 255 / 0.8);
  margin-bottom: var(--space-sm);
  max-width: 65ch;
}

.about-text .btn-primary { margin-top: var(--space-md); }

.about-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: var(--color-surface);
  text-align: center;
  align-self: center;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .about-badge { width: 220px; height: 220px; }
}

.badge-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
}

@media (min-width: 768px) {
  .badge-number { font-size: 4.5rem; }
}

.badge-label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* ── 13. Services page — extended cards ───────────────────── */
.services-page { padding-block: var(--space-2xl); }

.services-page .section-header { margin-bottom: var(--space-xl); }

.services-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .services-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
  .services-cards { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background-color: var(--color-surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.07);
  display: flex;
  flex-direction: column;
}

.service-card__placeholder {
  flex-shrink: 0;
}

.service-card__body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.service-card__body h3 { color: var(--color-primary); }

.service-card__body p { color: var(--color-ink-muted); font-size: 0.9375rem; }

.service-card__body ul {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.service-card__body ul li {
  padding-left: 1.25rem;
  position: relative;
  color: var(--color-ink-muted);
  font-size: 0.875rem;
}

.service-card__body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  background-color: var(--color-accent);
  border-radius: 50%;
}

/* ── 14. About page extended ──────────────────────────────── */
.about-page { padding-block: var(--space-2xl); }

.about-page-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

@media (min-width: 1100px) {
  .about-page-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-2xl);
  }

  .about-page-text { flex: 1; }
  .about-page-aside { flex: 0 0 320px; }
}

.about-page h2 { margin-bottom: var(--space-md); }

.about-page p {
  color: var(--color-ink-muted);
  margin-bottom: var(--space-sm);
  max-width: 65ch;
}

.about-page h3 {
  font-size: 1.125rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.values-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  background-color: var(--color-surface);
  border-radius: 6px;
  padding: var(--space-sm) var(--space-md);
  box-shadow: 0 1px 8px rgb(0 0 0 / 0.05);
}

.value-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.1rem;
}

.value-item h4 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.value-item p {
  font-size: 0.875rem;
  color: var(--color-ink-muted);
  margin-bottom: 0;
}

.info-card {
  background-color: var(--color-primary);
  color: var(--color-surface);
  border-radius: 8px;
  padding: var(--space-lg);
}

.info-card h3 {
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.info-card p {
  font-size: 0.9375rem;
  color: rgb(255 255 255 / 0.8);
  margin-bottom: 0.4rem;
}

.info-card a {
  color: var(--color-accent);
  font-weight: 700;
}

.info-card strong { color: var(--color-surface); }

/* ── 15. Contact ──────────────────────────────────────────── */
.contact {
  background-color: var(--color-bg);
  padding-block: var(--space-2xl);
}

.contact-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

@media (min-width: 1100px) {
  .contact-inner { flex-direction: row; align-items: flex-start; }
  .contact-info { flex: 1; max-width: 520px; }
  .contact-form { flex: 1; max-width: 540px; }
}

.contact-info .eyebrow { color: var(--color-accent); }
.contact-info h2 { margin-bottom: var(--space-sm); }

.contact-info > p {
  color: var(--color-ink-muted);
  margin-bottom: var(--space-md);
  max-width: 55ch;
}

.contact-info address p {
  margin-bottom: 0.4rem;
  font-size: 0.9375rem;
  color: var(--color-ink-muted);
}

.contact-info address a {
  color: var(--color-accent-dark);
  font-weight: 700;
}

.map-wrapper {
  margin-top: var(--space-md);
  border-radius: 8px;
  overflow: hidden;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  background-color: var(--color-surface);
  padding: var(--space-lg);
  border-radius: 8px;
  box-shadow: 0 4px 24px rgb(0 0 0 / 0.07);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-ink);
  letter-spacing: 0.02em;
}

.field label span { color: var(--color-accent-dark); margin-left: 2px; }

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-ink);
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: 4px;
  transition:
    border-color var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
  appearance: none;
}

@media (prefers-reduced-motion: reduce) {
  .field input,
  .field textarea { transition: none; }
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 22%, transparent);
}

.field textarea { resize: vertical; min-height: 120px; }

/* ── 16. Page hero (inner pages) ──────────────────────────── */
.page-hero {
  background-color: var(--color-primary);
  color: var(--color-surface);
  padding: var(--space-xl) var(--container-pad);
  text-align: center;
}

.page-hero h1 { color: var(--color-surface); margin-bottom: 0.5rem; }
.page-hero p { color: rgb(255 255 255 / 0.75); max-width: 55ch; margin-inline: auto; }

/* ── 17. Footer ───────────────────────────────────────────── */
.site-footer {
  background-color: var(--color-primary);
  color: rgb(255 255 255 / 0.72);
  padding-block: var(--space-xl);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .footer-brand { flex: 1 1 220px; }
  .footer-nav   { flex: 1 1 180px; }
  .footer-legal { flex: 1 1 220px; text-align: right; }
}

.footer-brand img { margin-bottom: 0.75rem; }

.footer-brand p { font-size: 0.875rem; line-height: 1.6; }
.footer-brand a { color: var(--color-accent); font-weight: 700; }

.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

.footer-nav a {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(255 255 255 / 0.72);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-nav a:hover,
.footer-nav a:focus-visible { color: var(--color-accent); }

.footer-nav a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.footer-legal { font-size: 0.8125rem; line-height: 1.7; }
.footer-legal a { color: var(--color-accent); }
.footer-legal strong { color: var(--color-surface); }

/* ── 18. Animation-ready hooks ────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  [data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity 0.55s var(--ease-out),
      transform 0.55s var(--ease-out);
  }

  [data-animate="fade-up"].is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  [data-animate="slide-in"] {
    opacity: 0;
    transform: translateX(-32px);
    transition:
      opacity 0.55s var(--ease-out),
      transform 0.55s var(--ease-out);
  }

  .service-block--reverse[data-animate="slide-in"] {
    transform: translateX(32px);
  }

  [data-animate="slide-in"].is-visible {
    opacity: 1;
    transform: translateX(0);
  }

  [data-animate="count-up"] {
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
  }

  [data-animate="count-up"].is-visible {
    opacity: 1;
  }
}

/* ── 18b. Animation pass — Template M Lame (AnimationDesigner) ── */

/* Filet de sécurité reduced-motion global */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-motion: no-preference) {

  /* ① Hero — lame image : slide depuis la droite, entrée page load */
  .hero-image {
    animation: lame-slide-in 0.8s var(--ease-out) 0.08s both;
  }
  @keyframes lame-slide-in {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  /* ② Stats — enrichissement count-up : translateY + stagger */
  [data-animate="count-up"] {
    transform: translateY(20px);
    transition:
      opacity    0.5s var(--ease-out),
      transform  0.5s var(--ease-out);
  }
  [data-animate="count-up"].is-visible { transform: translateY(0); }

  .stat:nth-child(1)[data-animate] { transition-delay: 0s;    }
  .stat:nth-child(2)[data-animate] { transition-delay: 0.10s; }
  .stat:nth-child(3)[data-animate] { transition-delay: 0.20s; }
  .stat:nth-child(4)[data-animate] { transition-delay: 0.30s; }

  /* ③ Service blocks — stagger d'entrée */
  .service-block:nth-of-type(1)[data-animate] { transition-delay: 0s;    }
  .service-block:nth-of-type(2)[data-animate] { transition-delay: 0.14s; }
  .service-block:nth-of-type(3)[data-animate] { transition-delay: 0.28s; }

  /* ④ About badge — pop rotatif quand la section devient visible */
  [data-animate="fade-up"].is-visible .about-badge {
    animation: badge-pop 0.55s var(--ease-out) 0.28s both;
  }
  @keyframes badge-pop {
    from { transform: scale(0.72) rotate(-5deg); }
    to   { transform: scale(1)    rotate(0deg);  }
  }

  /* ⑤ Visual placeholders — glissement doux du dégradé (9 s, discret) */
  .visual-placeholder {
    background-size: 200% 200%;
    animation: grad-drift 9s ease-in-out infinite alternate;
  }
  @keyframes grad-drift {
    from { background-position: 0%   center; }
    to   { background-position: 100% center; }
  }

  /* ⑥ Service cards — hover lift */
  .service-card {
    transition:
      transform   0.30s var(--ease-out),
      box-shadow  0.30s var(--ease-out);
  }
  .service-card:hover,
  .service-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgb(0 0 0 / 0.13);
  }

  /* ⑥b. Scroll-driven fade-in (Chromium 115+) — opacity uniquement,
          sans conflit avec le hover transform */
  @supports (animation-timeline: view()) {
    .service-card {
      animation: card-fade linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
    @keyframes card-fade {
      from { opacity: 0; }
      to   { opacity: 1; }
    }
  }

}

/* ── 19. Focus ring ───────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* ── 20. Print ────────────────────────────────────────────── */
@media print {
  .site-header, .nav-toggle, .hero-image, .map-wrapper, .contact-form { display: none; }
  body { color: #000; background: #fff; }
}
