@import url("tokens.css");
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@300;400;600&display=swap");

/* ---- 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.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-text);
}
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 600; }
p { max-width: 68ch; }

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

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: .4rem .8rem;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
  font-size: .9rem;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ---- Header / Nav ---- */
.site-header {
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-secondary);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}
.nav-logo svg { width: 160px; height: auto; }
.nav-logo:hover { text-decoration: none; }

.nav-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  list-style: none;
  background: var(--color-bg);
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-top: 1px solid var(--color-secondary);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.nav-menu.is-open { display: flex; }
.nav-menu li a {
  display: block;
  padding: .9rem 1.25rem;
  color: var(--color-text);
  font-weight: 600;
  font-size: .95rem;
  border-bottom: 1px solid color-mix(in srgb, var(--color-secondary) 40%, var(--color-bg));
}
.nav-menu li a:hover,
.nav-menu li a[aria-current="page"] {
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-secondary) 20%, var(--color-bg));
  text-decoration: none;
}
.nav-toggle {
  background: none;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  padding: .35rem .55rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--color-primary);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}
.nav-phone-header {
  display: none;
  font-weight: 600;
  font-size: .9rem;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  padding: .3rem .75rem;
}

/* ---- Hero ---- */
.hero {
  padding: 3rem 0 2rem;
  background: color-mix(in srgb, var(--color-secondary) 15%, var(--color-bg));
}
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hero-text { order: 1; }
.hero-image { order: 2; }
.hero-kicker {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: .5rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero-lead {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: color-mix(in srgb, var(--color-text) 80%, var(--color-bg));
}
.hero-horaires {
  background: var(--color-secondary);
  border-radius: 8px;
  padding: .75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: .92rem;
}
.hero-horaires strong { display: block; margin-bottom: .25rem; font-family: var(--font-display); }
.cta-group { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .75rem 1.5rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s, transform .1s;
  border: 2px solid transparent;
}
.btn:hover { opacity: .9; transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ---- Sections ---- */
.section { padding: 3rem 0; }
.section-alt { background: color-mix(in srgb, var(--color-secondary) 12%, var(--color-bg)); }
.section-header { margin-bottom: 2rem; }
.section-header h2 { margin-bottom: .5rem; }
.section-header p { color: color-mix(in srgb, var(--color-text) 70%, var(--color-bg)); }

/* ---- Cards grid ---- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.card {
  background: var(--color-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
}
.card-body { padding: 1.25rem; flex: 1; }
.card-body h3 { margin-bottom: .5rem; }
.card-body p { font-size: .95rem; }

/* ---- Feature list ---- */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .75rem;
}
.feature-list li {
  padding-left: 1.4rem;
  position: relative;
  font-size: .95rem;
}
.feature-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* ---- Highlight box ---- */
.highlight-box {
  background: var(--color-secondary);
  border-left: 4px solid var(--color-primary);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.highlight-box p { font-size: .95rem; max-width: none; }

/* ---- About layout ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

/* ---- Horaires table ---- */
.horaires-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 420px;
  font-size: .95rem;
}
.horaires-table td {
  padding: .5rem .75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--color-secondary) 50%, var(--color-bg));
}
.horaires-table td:first-child { font-weight: 600; }

/* ---- Contact page ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.contact-info-block { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-info-item { display: flex; flex-direction: column; gap: .2rem; }
.contact-info-item span:first-child { font-weight: 600; font-family: var(--font-display); font-size: 1rem; }
.contact-map { border-radius: 8px; overflow: hidden; border: 2px solid var(--color-secondary); }
.contact-map iframe { width: 100%; height: 280px; display: block; border: 0; }

/* ---- Form ---- */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .3rem; }
.form-group label { font-weight: 600; font-size: .9rem; }
.form-group input,
.form-group select,
.form-group textarea {
  padding: .65rem .85rem;
  border: 2px solid color-mix(in srgb, var(--color-text) 20%, var(--color-bg));
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: .8rem; color: color-mix(in srgb, var(--color-text) 60%, var(--color-bg)); }

/* ---- Social / footer ---- */
.footer {
  background: color-mix(in srgb, var(--color-text) 95%, var(--color-bg));
  color: color-mix(in srgb, var(--color-bg) 85%, var(--color-text));
  padding: 2.5rem 0 1.5rem;
}
.footer a { color: var(--color-secondary); }
.footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: .4rem;
}
.footer-tagline { font-size: .85rem; opacity: .7; }
.footer-col h4 {
  font-family: var(--font-display);
  color: var(--color-secondary);
  font-size: .95rem;
  margin-bottom: .75rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.footer-col ul li { font-size: .88rem; }
.footer-social { display: flex; gap: .75rem; margin-top: .5rem; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  padding: .35rem .7rem;
  border: 1px solid color-mix(in srgb, var(--color-secondary) 40%, transparent);
  border-radius: 4px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1rem;
  font-size: .78rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: space-between;
  align-items: center;
  opacity: .7;
}

/* ---- Phone CTA floating strip ---- */
.phone-strip {
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  padding: .7rem 1rem;
  font-weight: 700;
  font-size: 1.05rem;
}
.phone-strip a { color: #fff; text-decoration: none; }
.phone-strip a:hover { text-decoration: underline; }

/* ---- Page hero (inner pages) ---- */
.page-hero {
  background: color-mix(in srgb, var(--color-secondary) 20%, var(--color-bg));
  padding: 2.5rem 0 1.5rem;
  border-bottom: 2px solid var(--color-secondary);
}
.page-hero h1 { margin-bottom: .5rem; }
.page-hero p { font-size: 1.05rem; color: color-mix(in srgb, var(--color-text) 70%, var(--color-bg)); }

/* ---- Tablet+ ---- */
@media (min-width: 640px) {
  .nav-menu {
    display: flex;
    flex-direction: row;
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
  }
  .nav-menu li a {
    border: none;
    padding: .5rem .85rem;
  }
  .nav-toggle { display: none; }
  .nav-phone-header { display: inline-flex; }
  .hero-content {
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
  }
  .hero-text { flex: 1; order: 1; }
  .hero-image { flex: 1; order: 2; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Desktop ---- */
@media (min-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .contact-map iframe { height: 340px; }
}

/* ════════════════════════════════════════════════
   ANIMATIONS — Motion Pass (WEB-2487)
   ════════════════════════════════════════════════ */

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

  /* Keyframe partagée */
  @keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* 1. Hero — fade-up au chargement de la page */
  .hero-text {
    animation: fadeSlideUp 600ms ease-out both;
    animation-delay: 60ms;
  }
  .hero-image {
    animation: fadeSlideUp 600ms ease-out both;
    animation-delay: 180ms;
  }

  /* 2. Scroll-reveal — CSS scroll-driven (Chromium 115+) */
  @supports (animation-timeline: view()) {
    .section-header,
    .card,
    .about-grid > div,
    .highlight-box,
    .page-hero {
      animation: fadeSlideUp 600ms ease-out both;
      animation-timeline: view();
      animation-range: entry 0% entry 38%;
    }
  }

  /* 3. Fallback IntersectionObserver (JS ajoute data-reveal puis data-revealed) */
  [data-reveal]:not([data-revealed]) {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
  }
  [data-reveal][data-revealed] {
    opacity: 1;
    transform: translateY(0);
  }

  /* 4. Hover cards — lift subtil avec halo brand */
  .card {
    transition: transform 220ms ease, box-shadow 220ms ease;
  }
  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(194, 65, 12, 0.13);
  }

  /* 5. Visual-placeholder — glissement de gradient au survol de la carte */
  .visual-placeholder {
    transition: background-position 500ms ease;
    background-size: 200% 200%;
    background-position: 0% 0%;
  }
  .card:hover .visual-placeholder {
    background-position: 100% 100%;
  }

  /* 6. Bouton primaire — halo coloré au hover */
  .btn-primary {
    transition: opacity .15s, transform .15s, box-shadow .2s;
  }
  .btn-primary:hover,
  .btn-primary:focus {
    box-shadow: 0 4px 16px rgba(194, 65, 12, 0.36);
  }

  /* 7. Nav — soulignement animé (desktop) */
  @media (min-width: 640px) {
    .nav-menu li a {
      position: relative;
    }
    .nav-menu li a::after {
      content: '';
      position: absolute;
      bottom: 2px; left: .85rem; right: .85rem;
      height: 2px;
      background: var(--color-primary);
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 220ms ease;
    }
    .nav-menu li a:hover::after,
    .nav-menu li a[aria-current="page"]::after {
      transform: scaleX(1);
    }
  }

  /* 8. Focus-visible — halo ambre élégant */
  *:focus-visible {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
    border-radius: 2px;
    transition: outline-offset 100ms ease;
  }
}

/* Bloc accessibilité — reset obligatoire */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
