@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');
@import './tokens.css';

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}

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

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { list-style: none; }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 700; margin-bottom: 1rem; }
h2 { font-size: clamp(1.3rem, 4vw, 2rem); font-weight: 700; margin-bottom: 0.75rem; }
h3 { font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 600; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 3.5rem 0; }

/* =========================================================
   HEADER & NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 3px solid var(--color-primary);
  box-shadow: 0 2px 8px rgba(14,116,144,0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo { display: flex; align-items: center; gap: 0.5rem; }
.site-logo img, .site-logo svg { height: 40px; width: auto; }

.nav-menu {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-menu a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  color: var(--color-primary);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-primary);
}

.nav-toggle svg { width: 28px; height: 28px; }

/* =========================================================
   MOBILE NAV
   ========================================================= */
@media (max-width: 767px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 3px solid var(--color-primary);
    padding: 1.25rem 1.5rem;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  .nav-menu.is-open { display: flex; }

  .nav-menu a { font-size: 1.1rem; padding: 0.25rem 0; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--color-primary) 12%, var(--color-bg)) 0%,
    var(--color-bg) 70%
  );
  padding: 3rem 0 2.5rem;
}

.hero-inner {
  display: grid;
  gap: 2rem;
}

.hero-body { max-width: 640px; }

.hero-tagline {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  margin-bottom: 1rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: #0a5f78;
  border-color: #0a5f78;
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-accent:hover {
  background: #c84d09;
  border-color: #c84d09;
  color: #fff;
  text-decoration: none;
}

/* =========================================================
   HORAIRES BADGE
   ========================================================= */
.horaires-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: color-mix(in srgb, var(--color-secondary) 20%, var(--color-bg));
  border: 1.5px solid var(--color-secondary);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

.horaires-badge span { color: var(--color-primary); }

/* =========================================================
   SECTION TITLES
   ========================================================= */
.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.section-title { margin-bottom: 0.75rem; }

.section-intro {
  font-size: 1.05rem;
  color: #374151;
  max-width: 600px;
  margin-bottom: 2rem;
}

/* =========================================================
   SERVICES GRID
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.service-card:hover {
  box-shadow: 0 4px 18px rgba(14,116,144,0.12);
  border-color: var(--color-primary);
}

.service-card-body { padding: 1.5rem; }

.service-card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.service-card h3 { margin-bottom: 0.5rem; }

.service-card p { color: #4B5563; font-size: 0.95rem; }

.service-card .btn { margin-top: 1rem; }

/* =========================================================
   FEATURE LIST
   ========================================================= */
.feature-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.feature-list li::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

/* =========================================================
   HIGHLIGHTS STRIP
   ========================================================= */
.highlights {
  background: var(--color-primary);
  color: #fff;
  padding: 2.5rem 0;
}

.highlights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  text-align: center;
}

.highlight-item h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.25rem;
}

.highlight-item p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
  margin: 0;
}

/* =========================================================
   ABOUT STRIP (index page)
   ========================================================= */
.about-strip {
  background: color-mix(in srgb, var(--color-primary) 6%, var(--color-bg));
}

.about-strip-inner {
  display: grid;
  gap: 2rem;
}

/* =========================================================
   REVIEWS
   ========================================================= */
.reviews { background: #F9FAFB; }

.reviews-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.google-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1.5px solid #E5E7EB;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}
.google-badge:hover { border-color: var(--color-primary); text-decoration: none; }

.stars-display {
  display: inline-flex;
  gap: 2px;
}
.stars-display svg { color: #FBBF24; }

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.review-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 1.25rem;
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.review-author { font-weight: 600; font-size: 0.95rem; }
.review-date { font-size: 0.8rem; color: #6B7280; }

.review-stars { display: flex; gap: 2px; margin-bottom: 0.5rem; }
.review-stars svg { color: #FBBF24; width: 16px; height: 16px; }

.review-text { font-size: 0.9rem; color: #374151; font-style: italic; }

.reviews-attribution {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: #6B7280;
}
.reviews-attribution a { color: #6B7280; text-decoration: underline; }

/* =========================================================
   CONTACT FORM
   ========================================================= */
.contact-grid {
  display: grid;
  gap: 2.5rem;
}

.contact-form { display: grid; gap: 1rem; }

.form-group { display: grid; gap: 0.4rem; }

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #D1D5DB;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.form-legal {
  font-size: 0.8rem;
  color: #6B7280;
  line-height: 1.5;
}

/* =========================================================
   MAP
   ========================================================= */
.map-wrapper {
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid #E5E7EB;
}

.map-wrapper iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: none;
}

/* =========================================================
   CONTACT INFO
   ========================================================= */
.contact-info-list { display: grid; gap: 1rem; }

.contact-info-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.contact-info-icon {
  font-size: 1.3rem;
  min-width: 2rem;
  text-align: center;
  margin-top: 0.1rem;
}

.contact-info-item strong { display: block; font-size: 0.85rem; color: #6B7280; margin-bottom: 0.1rem; }
.contact-info-item p, .contact-info-item a { margin: 0; font-weight: 600; }
.contact-info-item a:hover { text-decoration: underline; }

/* =========================================================
   HORAIRES TABLE
   ========================================================= */
.horaires-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.horaires-table td { padding: 0.5rem 0; border-bottom: 1px solid #F3F4F6; font-size: 0.95rem; }
.horaires-table td:first-child { font-weight: 600; width: 40%; }
.horaires-table .badge-open {
  display: inline-block;
  background: color-mix(in srgb, var(--color-primary) 12%, var(--color-bg));
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
}

/* =========================================================
   PAGE HERO (inner pages)
   ========================================================= */
.page-hero {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--color-primary) 10%, var(--color-bg)) 0%,
    var(--color-bg) 100%
  );
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid #E5E7EB;
}

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  color: #6B7280;
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--color-primary); }
.breadcrumb span { color: #D1D5DB; }

/* =========================================================
   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));
}

/* =========================================================
   CTA BAND
   ========================================================= */
.cta-band {
  background: var(--color-accent);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.cta-band h2 { color: #fff; margin-bottom: 0.5rem; }
.cta-band p { color: rgba(255,255,255,0.9); margin-bottom: 1.5rem; }

.cta-band .btn-primary {
  background: #fff;
  color: var(--color-accent);
  border-color: #fff;
}
.cta-band .btn-primary:hover {
  background: #f0f0f0;
  border-color: #f0f0f0;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: #111827;
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.footer-brand p { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin-bottom: 1rem; }

.footer-tel {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-secondary);
  text-decoration: none;
}
.footer-tel:hover { color: #fff; text-decoration: none; }

.footer-nav h4,
.footer-contact h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.75rem;
}

.footer-nav ul { display: grid; gap: 0.5rem; }
.footer-nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--color-secondary); text-decoration: none; }

.footer-contact address {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.7);
}

.footer-contact a { color: var(--color-secondary); }
.footer-contact a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: rgba(255,255,255,0.8); }

/* =========================================================
   SKIP LINK
   ========================================================= */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 999;
  font-weight: 700;
}
.skip-link:focus { top: 0; }

/* =========================================================
   TABLET ≥ 640px
   ========================================================= */
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .highlights-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   DESKTOP ≥ 1024px
   ========================================================= */
@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr 1fr; align-items: center; }
  .about-strip-inner { grid-template-columns: 1fr 1fr; align-items: center; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================
   UTILITY
   ========================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   REDUCED MOTION — safety net (WCAG 2.3.1)
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

/* =========================================================
   ANIMATION PASS — ADOCLEAN motion (Lot 7+)
   All effects under prefers-reduced-motion: no-preference.
   Max duration: 800 ms reveals · 600 ms interactions.
   GPU-only: transform + opacity + background-position.
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {

  /* ── 1. Hero entrance stagger (page load) ── */
  @keyframes adoc-enter {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hero-body .hero-tagline   { animation: adoc-enter 0.55s ease-out 0.05s both; }
  .hero-body h1              { animation: adoc-enter 0.55s ease-out 0.18s both; }
  .hero-body .horaires-badge { animation: adoc-enter 0.55s ease-out 0.28s both; }
  .hero-body > p             { animation: adoc-enter 0.55s ease-out 0.36s both; }
  .hero-cta-group            { animation: adoc-enter 0.55s ease-out 0.46s both; }

  /* ── 2. Visual placeholder gradient drift ── */
  @keyframes adoc-drift {
    0%   { background-position: 0% 50%;   }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%;   }
  }

  .visual-placeholder {
    background-size: 200% 200%;
    animation: adoc-drift 9s ease-in-out infinite;
  }

  /* ── 3. Service card hover lift ── */
  .service-card {
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  }
  .service-card:hover {
    transform: translateY(-3px);
  }

  /* ── 4. CTA band button pulse ── */
  @keyframes adoc-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(255, 255, 255, 0.50); }
    55%       { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);   }
  }

  .cta-band .btn-primary {
    animation: adoc-pulse 2.5s ease-in-out infinite;
  }

  /* ── 5. Highlight numbers shimmer ── */
  @keyframes adoc-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
  }

  .highlight-item h3 {
    background: linear-gradient(
      90deg,
      var(--color-secondary) 0%,
      #fffbe6 42%,
      var(--color-secondary) 58%,
      var(--color-secondary) 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: adoc-shimmer 3.5s linear infinite;
  }

  /* ── 6. Nav animated underline ── */
  .nav-menu a:not(.btn) {
    background-image: linear-gradient(var(--color-primary), var(--color-primary));
    background-repeat: no-repeat;
    background-size: 0% 2px;
    background-position: left bottom;
    transition: color 0.2s, background-size 0.25s ease;
  }

  .nav-menu a:not(.btn):hover,
  .nav-menu a:not(.btn)[aria-current="page"] {
    background-size: 100% 2px;
  }

  /* ── Focus-visible ring ── */
  :focus-visible {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
    border-radius: 3px;
  }
}
