@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@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; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

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

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-logo img,
.header-logo svg {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

.header-logo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: 0.5px;
}

.main-nav { display: none; }

.main-nav.open { display: flex; }

@media (min-width: 768px) {
  .main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }
  .hamburger { display: none; }
}

.main-nav a {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--color-accent); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-rdv {
  background: var(--color-accent);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}
.btn-rdv:hover { background: #d4a43d; transform: translateY(-1px); }

.btn-tel {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}
.btn-tel:hover { color: #fff; }

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 767px) {
  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.15);
  }
  .main-nav a { font-size: 1rem; }
  .btn-tel { display: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.85);
  padding: 3rem 1rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr 1fr; }
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.6; }
.footer-tagline {
  color: var(--color-accent);
  font-style: italic;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.footer-col h4 {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col a { font-size: 0.9rem; color: rgba(255,255,255,0.85); transition: color 0.2s; }
.footer-col a:hover { color: var(--color-accent); }

.footer-hours td:first-child { padding-right: 1rem; font-weight: 600; }
.footer-hours td { font-size: 0.85rem; padding: 0.1rem 0; }
.footer-hours .sunday { color: var(--color-accent); font-weight: 700; }

.footer-sunday-badge {
  margin-top: 0.75rem;
  background: var(--color-accent);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  display: inline-block;
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-bottom a:hover { color: #fff; }

/* ============================================================
   BUTTONS & CTAs
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
}
.btn-primary:hover { background: #d4a43d; }

.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

.btn-outline-white {
  background: transparent;
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

section { padding: 4rem 1rem; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--color-secondary);
  font-size: 1.0625rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }

/* ============================================================
   HERO (Accueil)
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7a3015 60%, var(--color-secondary) 100%);
  color: #fff;
  padding: 5rem 1rem 4rem;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-inner { grid-template-columns: 1fr 1fr; }
}

.hero-content h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-content h1 em { color: var(--color-accent); font-style: normal; }

.hero-content p {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-media { border-radius: 8px; overflow: hidden; }

/* ============================================================
   SUNDAY BADGE
   ============================================================ */
.sunday-banner {
  background: var(--color-accent);
  color: var(--color-primary);
  text-align: center;
  padding: 1rem 1rem;
}

.sunday-banner p {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.9rem, 2.5vw, 1.125rem);
  max-width: 800px;
  margin: 0 auto;
}

/* ============================================================
   SERVICES CARDS
   ============================================================ */
.services-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

.service-card {
  border: 1px solid color-mix(in srgb, var(--color-primary) 12%, transparent);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.service-card:hover {
  box-shadow: 0 8px 24px rgba(74,28,12,0.12);
  transform: translateY(-3px);
}

.service-card-media { overflow: hidden; }

.service-card-body { padding: 1.25rem; }
.service-card-body h3 {
  font-size: 1.0625rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.service-card-body p { font-size: 0.9rem; color: #444; line-height: 1.6; }
.service-card-body ul {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.service-card-body li {
  font-size: 0.875rem;
  color: #555;
  padding-left: 1rem;
  position: relative;
}
.service-card-body li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 0.65rem;
  top: 3px;
}

/* ============================================================
   USPs / FEATURES
   ============================================================ */
.usp-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

.usp-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: color-mix(in srgb, var(--color-primary) 4%, var(--color-bg));
  border-radius: 8px;
}
.usp-icon { font-size: 2.25rem; margin-bottom: 0.75rem; }
.usp-card h3 { font-size: 1rem; color: var(--color-primary); margin-bottom: 0.5rem; }
.usp-card p { font-size: 0.875rem; color: #555; }

/* ============================================================
   HOURS TABLE
   ============================================================ */
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 10%, transparent);
  font-size: 0.9375rem;
}
.hours-table th { font-family: var(--font-display); font-weight: 700; color: var(--color-primary); }
.hours-table tr.highlight { background: color-mix(in srgb, var(--color-accent) 15%, transparent); }
.hours-table tr.highlight td { font-weight: 600; color: var(--color-primary); }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-weight: 600; font-size: 0.9rem; color: var(--color-primary); }
.form-group input,
.form-group textarea,
.form-group select {
  border: 1.5px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
  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,
.form-group select:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-secondary) 15%, transparent);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.form-note { font-size: 0.8rem; color: #666; }

/* ============================================================
   MAP
   ============================================================ */
.map-wrapper {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid color-mix(in srgb, var(--color-primary) 12%, transparent);
}
.map-wrapper iframe { width: 100%; height: 100%; border: none; }

/* ============================================================
   GALLERY GRID
   ============================================================ */
.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }

/* ============================================================
   PAGE HERO (internal pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7a3015 100%);
  color: #fff;
  padding: 3rem 1rem 2.5rem;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: 0.5rem;
}
.page-hero p {
  color: rgba(255,255,255,0.82);
  font-size: 1.0625rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   RESERVATION PAGE
   ============================================================ */
.reservation-cta {
  text-align: center;
  padding: 4rem 1rem;
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg));
}
.reservation-cta h2 { font-size: clamp(1.5rem, 4vw, 2rem); color: var(--color-primary); margin-bottom: 0.75rem; }
.reservation-cta p { color: #555; max-width: 500px; margin: 0 auto 1.5rem; }

.planity-box {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border: 2px solid var(--color-secondary);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}
.planity-box h3 { color: var(--color-primary); margin-bottom: 0.5rem; }
.planity-box p { font-size: 0.9rem; color: #555; margin-bottom: 1.25rem; }

/* ============================================================
   TWO-COL LAYOUT (about, contact)
   ============================================================ */
.two-col {
  display: grid;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 768px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   PROSE
   ============================================================ */
.prose p { margin-bottom: 1.125rem; line-height: 1.7; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--color-primary); }

/* ============================================================
   MENTIONS LÉGALES
   ============================================================ */
.mentions-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1rem;
}
.mentions-content h2 { color: var(--color-primary); margin: 1.5rem 0 0.5rem; font-size: 1.125rem; }
.mentions-content p, .mentions-content li { font-size: 0.9375rem; line-height: 1.7; }
.mentions-content ul { padding-left: 1.25rem; list-style: disc; }

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

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #777;
}
.breadcrumb a { color: var(--color-secondary); }
.breadcrumb span { margin: 0 0.35rem; }

/* ============================================================
   SOCIAL PROOF
   ============================================================ */
.social-proof {
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg));
  padding: 3rem 1rem;
  text-align: center;
}
.social-proof p {
  max-width: 680px;
  margin: 0 auto 1.25rem;
  color: #444;
  line-height: 1.7;
}

/* ============================================================
   ANIMATIONS — Lot 7 / WEB-4899
   ============================================================ */

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

  /* 1 — Hero load animation (H1 + tagline + CTA glissent vers le haut) */
  @keyframes hero-rise {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
  }
  .hero-content h1  { animation: hero-rise 0.6s ease-out both; }
  .hero-content > p { animation: hero-rise 0.6s ease-out 0.15s both; }
  .hero-cta         { animation: hero-rise 0.6s ease-out 0.30s both; }
  .hero-media       { animation: hero-rise 0.7s ease-out 0.10s both; }

  /* 2 — Stagger service cards & USP cards (extends IntersectionObserver .fade-in) */
  .services-grid .service-card:nth-child(2).fade-in { transition-delay: 0.10s; }
  .services-grid .service-card:nth-child(3).fade-in { transition-delay: 0.20s; }
  .usp-grid .usp-card:nth-child(2).fade-in { transition-delay: 0.10s; }
  .usp-grid .usp-card:nth-child(3).fade-in { transition-delay: 0.20s; }
  .usp-grid .usp-card:nth-child(4).fade-in { transition-delay: 0.30s; }

  /* 3 — Sunday banner brightness pulse (4 s, subtil) */
  @keyframes sunday-pulse {
    0%, 100% { filter: brightness(1); }
    50%       { filter: brightness(1.07); }
  }
  .sunday-banner { animation: sunday-pulse 4s ease-in-out infinite; }

  /* 4 — Visual placeholder zoom au hover de la carte parente */
  .visual-placeholder { transition: transform 0.35s ease; }
  .service-card:hover .visual-placeholder { transform: scale(1.04); }

  /* 5 — CTA Planity hover renforcé (scale + ombre cuivre) */
  .btn-rdv {
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  }
  .btn-rdv:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(194,123,43,0.45);
  }
  .btn-primary { transition: background 0.2s, transform 0.2s, box-shadow 0.2s; }
  .btn-primary:hover { box-shadow: 0 6px 18px rgba(74,28,12,0.22); }

  /* 6 — Header compact après 80 px de scroll */
  .site-header { transition: box-shadow 0.3s ease; }
  .site-header.scrolled { box-shadow: 0 3px 14px rgba(0,0,0,0.38); }
  .site-header .header-inner { transition: height 0.3s ease; }
  .site-header.scrolled .header-inner { height: 52px; }

  /* USP card hover lift */
  .usp-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
  .usp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74,28,12,0.10);
  }
}

/* Focus visible ring (a11y — toujours visible, non conditionnel) */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Safety net — désactive toutes animations/transitions pour reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
