@import url('tokens.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

/* =========================================
   Visual placeholder (WEB-715)
   ========================================= */
.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;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: clamp(1rem, 2vw, 1.2rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =========================================
   Header & Nav
   ========================================= */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-secondary);
}

header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-link img {
  height: 48px;
  width: auto;
}

#nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
#nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.25s, opacity 0.25s;
}

#nav-menu {
  display: none;
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-secondary);
  padding: 1rem 1.25rem;
  gap: 0.25rem;
  flex-direction: column;
}
#nav-menu.is-open { display: flex; }
#nav-menu a {
  display: block;
  padding: 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-secondary);
}
#nav-menu a:hover,
#nav-menu a[aria-current="page"] {
  color: var(--color-primary);
  text-decoration: none;
}

@media (min-width: 768px) {
  #nav-toggle { display: none; }
  #nav-menu {
    display: flex !important;
    position: static;
    border: none;
    padding: 0;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
    background: transparent;
  }
  #nav-menu a {
    border: none;
    padding: 0;
    font-size: 0.95rem;
  }
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none !important;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
}

/* =========================================
   Hero — editorial banner style
   ========================================= */
.hero {
  position: relative;
  overflow: hidden;
}
.hero .visual-placeholder {
  border-radius: 0;
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 1.25rem;
  background: linear-gradient(to top,
    rgba(28,25,23,0.80) 0%,
    rgba(28,25,23,0.35) 60%,
    transparent 100%
  );
}
.hero-content h1 { color: #fff; }
.hero-content .hero-sub {
  color: rgba(255,255,255,0.88);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  margin: 0.75rem 0 1.5rem;
  max-width: 640px;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}
.hero-ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .hero-content { padding: 3.5rem 4rem; }
}

/* =========================================
   Section layout
   ========================================= */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.6rem;
}

.section-title {
  margin-bottom: 0.5rem;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  margin-top: 0.5rem;
}

.section-lead {
  font-size: 1.1rem;
  color: color-mix(in srgb, var(--color-text) 70%, var(--color-bg));
  margin-top: 1rem;
  max-width: 680px;
}

/* Alternating diptyque layout */
.diptyque {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 4rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}
.diptyque.reverse .diptyque-media { order: 0; }
@media (min-width: 768px) {
  .diptyque {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
  .diptyque.reverse .diptyque-media { order: 2; }
}

.diptyque-text h2 { margin-bottom: 1rem; }
.diptyque-text p { color: color-mix(in srgb, var(--color-text) 80%, var(--color-bg)); }
.diptyque-text .btn { margin-top: 1.5rem; }

/* =========================================
   Product cards grid
   ========================================= */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 480px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  border: 1px solid var(--color-secondary);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.card-media { position: relative; }
.card-body {
  padding: 1.25rem;
  flex: 1;
}
.card-body h3 { margin-bottom: 0.4rem; }
.card-body p {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--color-text) 70%, #fff);
}
.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  background: var(--color-secondary);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 0.5rem;
}

/* =========================================
   Highlight band
   ========================================= */
.band {
  background: var(--color-secondary);
  padding: 3.5rem 1.25rem;
  text-align: center;
}
.band-inner {
  max-width: 720px;
  margin: 0 auto;
}
.band h2 { margin-bottom: 1rem; }
.band p { font-size: 1.05rem; color: color-mix(in srgb, var(--color-text) 80%, var(--color-bg)); }
.band .btn { margin-top: 1.5rem; }

/* =========================================
   Adresses multi-sites strip
   ========================================= */
.sites-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) { .sites-strip { grid-template-columns: repeat(3, 1fr); } }

.site-card {
  border-left: 4px solid var(--color-primary);
  background: #fff;
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.site-card h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.site-card p { font-size: 0.9rem; margin: 0.2rem 0; color: color-mix(in srgb, var(--color-text) 70%, #fff); }
.site-card .badge-active {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--color-primary);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 0.5rem;
}

/* =========================================
   Stats row
   ========================================= */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (min-width: 768px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }
.stat-box {
  background: #fff;
  border: 1px solid var(--color-secondary);
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
}
.stat-box .stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  display: block;
}
.stat-box .stat-label {
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--color-text) 60%, #fff);
  margin-top: 0.35rem;
}

/* =========================================
   Form & Contact
   ========================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid color-mix(in srgb, var(--color-text) 20%, #fff);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--color-text);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.contact-info h3 { margin-bottom: 1rem; }
.contact-info-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.contact-info-item .ci-icon {
  font-size: 1.25rem;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-info-item .ci-text { font-size: 0.95rem; }
.contact-info-item .ci-text strong { display: block; margin-bottom: 0.1rem; }

.map-wrapper {
  margin-top: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* =========================================
   Hours table
   ========================================= */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}
.hours-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--color-secondary);
}
.hours-table td:first-child { font-weight: 600; width: 40%; }
.hours-table tr:last-child td { border-bottom: none; }

/* =========================================
   Reviews section
   ========================================= */
.reviews-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.reviews-rating-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid var(--color-secondary);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.stars { color: #F59E0B; letter-spacing: 0.05em; }

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) { .reviews-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }

.review-card {
  background: #fff;
  border: 1px solid var(--color-secondary);
  border-radius: 8px;
  padding: 1.25rem;
}
.review-card .review-author {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.review-card .review-date {
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--color-text) 50%, #fff);
  margin-bottom: 0.5rem;
}
.review-card .review-text {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.reviews-attribution {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: color-mix(in srgb, var(--color-text) 50%, #fff);
}

/* =========================================
   Breadcrumb
   ========================================= */
.breadcrumb {
  font-size: 0.85rem;
  padding: 0.75rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
  color: color-mix(in srgb, var(--color-text) 50%, #fff);
}
.breadcrumb a { color: color-mix(in srgb, var(--color-text) 50%, #fff); }
.breadcrumb a:hover { color: var(--color-primary); }

/* =========================================
   Page hero (inner pages)
   ========================================= */
.page-hero {
  background: var(--color-secondary);
  padding: 3rem 1.25rem 2rem;
  text-align: center;
}
.page-hero h1 { margin-bottom: 0.5rem; }
.page-hero p { font-size: 1.05rem; color: color-mix(in srgb, var(--color-text) 70%, #fff); }

/* =========================================
   Footer
   ========================================= */
footer {
  background: var(--color-accent);
  color: rgba(255,255,255,0.85);
  padding: 2.5rem 1.25rem 1.5rem;
  margin-top: 4rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 600px) { .footer-inner { grid-template-columns: repeat(3, 1fr); } }

footer h4 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}
footer p, footer address { font-style: normal; font-size: 0.9rem; margin-bottom: 0.35rem; }
footer a { color: rgba(255,255,255,0.75); font-size: 0.9rem; }
footer a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Scroll reveal — see animation pass block below */

/* =========================================
   Utility
   ========================================= */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* bg cream section */
section.bg-cream { background: color-mix(in srgb, var(--color-secondary) 30%, var(--color-bg)); }

/* =========================================
   Animation pass — WEB-4903
   Template Maison Artisane · ambre / or
   ========================================= */

/* Reduce-motion killswitch (WCAG 2.3.3 — non-négociable) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

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

  /* ---- 1. Scroll reveal (IntersectionObserver via main.js) ---- */
  [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  [data-reveal].revealed {
    opacity: 1;
    transform: none;
  }

  /* Stat-box : entrée avec rebond léger */
  .stat-box[data-reveal] {
    transform: translateY(16px) scale(0.97);
    transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.34, 1.2, 0.64, 1);
  }

  /* ---- 2. Hero content — entrée en stagger ---- */
  .hero-content > * {
    opacity: 0;
    transform: translateY(14px);
    animation: hero-fade-in 0.65s ease forwards;
  }
  .hero-content .hero-eyebrow { animation-delay: 0.10s; }
  .hero-content > h1           { animation-delay: 0.25s; }
  .hero-content .hero-sub      { animation-delay: 0.38s; }
  .hero-content .hero-ctas     { animation-delay: 0.52s; }

  @keyframes hero-fade-in {
    to { opacity: 1; transform: none; }
  }

  /* ---- 3. Section title underline bar grow-in ---- */
  .section-title::after {
    width: 0;
    transition: width 0.45s ease 0.15s;
  }
  .section-title.revealed::after {
    width: 48px;
  }

  /* ---- 4. Card hover lift + placeholder gradient shimmer ---- */
  .card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(180, 83, 9, 0.13);
  }

  .card .visual-placeholder,
  .diptyque-media .visual-placeholder {
    background-size: 200% 200%;
    background-position: 0% 0%;
    transition: background-position 0.65s ease;
  }
  .card:hover .visual-placeholder,
  .diptyque-media:hover .visual-placeholder {
    background-position: 100% 100%;
  }

  /* ---- 5. Site-card hover lift ---- */
  .site-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }
  .site-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(180, 83, 9, 0.10);
  }

  /* ---- 6. Boutons hover lift ---- */
  .btn {
    transition: background 0.2s, color 0.2s, border-color 0.2s,
                transform 0.18s ease, box-shadow 0.18s ease;
  }
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.18);
  }
  .btn:active { transform: none; box-shadow: none; }

}

/* Nav underline animé — desktop + motion autorisé (combined media query) */
@media (prefers-reduced-motion: no-preference) and (min-width: 768px) {
  #nav-menu a {
    background-image: linear-gradient(var(--color-primary), var(--color-primary));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 2px;
    transition: background-size 0.28s ease, color 0.18s;
    padding-bottom: 2px;
  }
  #nav-menu a:hover,
  #nav-menu a[aria-current="page"] {
    background-size: 100% 2px;
    text-decoration: none;
  }
}

/* Focus-visible — accessible quelle que soit la préférence motion */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 3px;
}
