@import "tokens.css";
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-primary);
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
ul { padding-left: 1.5rem; }

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-secondary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ===== SITE HEADER ===== */
.site-header {
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1rem;
}

/* Logo */
.brand-link { display: flex; align-items: center; flex-shrink: 0; }
.logo-svg    { height: 52px; width: auto; }

/* ===== MADRAS BAND ===== */
.madras-band {
  height: var(--madras-height);
  background: linear-gradient(to right,
    var(--madras-rust)  0% 33.34%,
    var(--madras-gold)  33.34% 66.67%,
    var(--madras-green) 66.67% 100%
  );
}

/* ===== NAVIGATION ===== */
/* CSS-only burger (checkbox hack) */
.nav-toggle        { display: none; }
.nav-toggle-label  {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
}
.nav-toggle-label span,
.nav-toggle-label .nav-bar-mid {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle-label:focus-within { outline: 2px solid var(--color-accent); }
.nav-toggle:checked + .nav-toggle-label span:first-child  { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked + .nav-toggle-label .nav-bar-mid      { opacity: 0; }
.nav-toggle:checked + .nav-toggle-label span:last-child   { transform: translateY(-7px) rotate(-45deg); }

.site-nav { display: none; }

@media (min-width: 768px) {
  .nav-toggle-label { display: none; }
  .site-nav         { display: flex; align-items: center; }
  .site-nav ul      { list-style: none; padding: 0; display: flex; gap: 0.25rem; }
  .site-nav a {
    color: rgba(255,255,255,0.85);
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-display);
    transition: background 0.2s, color 0.2s;
  }
  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    background: rgba(255,255,255,0.12);
    color: #fff;
  }
}

/* Mobile nav drawer */
@media (max-width: 767px) {
  .nav-toggle:checked ~ .site-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-primary);
    padding: 1rem 1.25rem 1.5rem;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  .site-nav ul  { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0; }
  .site-nav a {
    color: rgba(255,255,255,0.9);
    padding: 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: block;
    font-family: var(--font-display);
  }
  .site-nav li:last-child a { border-bottom: none; }
}

/* ===== PAGE HEADER (inner pages) ===== */
.page-header {
  background: var(--color-primary);
  color: #fff;
  padding: var(--s-7) 0 var(--s-6);
}
.page-header h1 { color: #fff; margin-bottom: var(--s-3); }
.page-header p  { color: rgba(255,255,255,0.8); font-size: 1.05rem; max-width: 640px; margin: 0; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  font-size: var(--t-small);
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--s-3);
}
.breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: underline; }
.breadcrumb a:hover { color: #fff; }

/* ===== SECTION TITLE ===== */
.section-title {
  font-family: var(--font-display);
  font-size: var(--t-h2);
  color: var(--color-primary);
  margin-bottom: var(--s-5);
  line-height: 1.2;
}
.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--s-3);
}

/* ===== BACKGROUND VARIANTS ===== */
.bg-kraft  { background: var(--color-kraft); }
.bg-white  { background: #fff; }
.bg-dark   {
  background: var(--color-dark);
  color: rgba(255,255,255,0.85);
}
.bg-dark .section-title { color: #fff; }

/* ===== SITE HERO (home page) ===== */
.site-hero {
  background: var(--color-primary);
  color: #fff;
  padding: var(--s-8) 0;
  position: relative;
  overflow: hidden;
}
.site-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(194,65,12,.25) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 680px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245,158,11,0.15);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  margin-bottom: var(--s-5);
}

.site-hero h1 { color: #fff; margin-bottom: var(--s-5); }

.hero-lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: var(--s-6);
  max-width: 600px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}

/* ===== INFO BAR ===== */
.info-bar {
  background: var(--color-secondary);
  color: #fff;
  padding: var(--s-4) 0;
}
.info-bar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  justify-content: center;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-display);
}
.info-bar__item { display: flex; align-items: center; gap: var(--s-2); }

/* ===== FEATURE GRID (home étals overview) ===== */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 560px)  { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .feature-grid { grid-template-columns: repeat(4, 1fr); } }

.feature-card {
  background: #fff;
  border: 1px solid rgba(59,28,0,0.12);
  border-radius: var(--radius);
  padding: var(--s-5);
}
.feature-card__icon {
  width: 52px; height: 52px;
  background: var(--color-primary);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: var(--s-4);
}
.feature-card h3 { margin-bottom: var(--s-2); font-size: 1.05rem; }
.feature-card p  { font-size: 0.9rem; color: #4B3020; }

/* ===== HERITAGE SECTION ===== */
.heritage-cols {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-7);
  align-items: center;
}
.heritage-cols > * { flex: 1; min-width: 260px; }

.heritage-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 3px solid var(--color-accent);
  background: rgba(245,158,11,0.1);
  padding: 1rem;
  text-align: center;
  gap: 0.25rem;
  margin: 0 auto;
}
.heritage-badge .year {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
}
.heritage-badge .label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-secondary);
  line-height: 1.4;
}

/* ===== PRODUCT BLOCK (étals page) ===== */
.product-block {
  background: #fff;
  border: 1px solid rgba(59,28,0,0.1);
  border-left: 4px solid var(--color-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--s-6);
  margin-bottom: var(--s-5);
}
.product-block:last-child { margin-bottom: 0; }
.product-block h2 { margin-bottom: var(--s-3); font-size: var(--t-h3); color: var(--color-primary); }
.product-block p  { color: #4B3020; }

.product-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
}
@media (min-width: 560px) { .product-list { grid-template-columns: repeat(2, 1fr); } }
.product-list li {
  padding: var(--s-2) var(--s-3);
  background: var(--color-kraft);
  border-radius: 4px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.product-list li::before { content: "✦"; color: var(--color-accent); font-size: 0.65rem; }

/* ===== TESTIMONIAL ===== */
.testimonial {
  border-left: 4px solid var(--color-accent);
  padding: var(--s-4) var(--s-5);
  font-style: italic;
  font-size: 1.05rem;
  color: #4B3020;
  background: rgba(245,158,11,0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ===== VISUAL BLOCK ===== */
.visual-block {
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(59,28,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== INFO COLS (infos / contact pages) ===== */
.info-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
}
@media (min-width: 768px) { .info-cols { grid-template-columns: 1fr 1fr; } }

/* ===== ACCESS CARD ===== */
.access-card {
  background: #fff;
  border: 1px solid rgba(59,28,0,0.1);
  border-left: 4px solid var(--color-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--s-5);
}
.access-card h3 { font-size: 1.05rem; margin-bottom: var(--s-3); color: var(--color-primary); }
.access-card p  { font-size: 0.9rem; color: #4B3020; }

/* ===== HOURS TABLE ===== */
.horaires-wrapper { overflow-x: auto; }
.horaires-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.horaires-table th {
  text-align: left;
  padding: var(--s-2) var(--s-3);
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.horaires-table td {
  padding: var(--s-2) var(--s-3);
  border-bottom: 1px solid rgba(59,28,0,0.08);
}
.horaires-table td:last-child { font-weight: 600; color: var(--color-primary); }
.horaires-table tr:last-child td { border-bottom: none; }
.horaires-note {
  margin-top: var(--s-3);
  font-size: var(--t-small);
  color: #6B5040;
  font-style: italic;
}

/* ===== CONTACT FORM ===== */
.contact-form { display: flex; flex-direction: column; gap: var(--s-4); }
.form-group   { display: flex; flex-direction: column; gap: var(--s-2); }
.form-group label {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--color-primary);
  font-family: var(--font-display);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1.5px solid rgba(59,28,0,0.25);
  border-radius: 4px;
  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 select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.18);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary, .btn.btn-primary {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}
.btn-primary:hover { background: #a73409; border-color: #a73409; }

.btn-amber, .btn.btn-amber {
  background: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}
.btn-amber:hover { background: #d97706; border-color: #d97706; }

.btn-outline-light, .btn.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

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

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.7);
  padding: var(--s-8) 0 var(--s-5);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  margin-bottom: var(--s-7);
}
@media (min-width: 640px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

.footer-brand    { }
.brand-name-footer {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--s-3);
}
.footer-brand p  { font-size: var(--t-small); color: rgba(255,255,255,0.55); }

.footer-nav h4,
.footer-contact h4 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--s-4);
}
.footer-nav ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.footer-nav a, .footer-contact a {
  color: rgba(255,255,255,0.65);
  font-size: var(--t-small);
  transition: color 0.2s;
}
.footer-nav a:hover, .footer-contact a:hover { color: #fff; }

.footer-contact-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); font-size: var(--t-small); }
.footer-contact-list a { color: var(--color-accent); font-weight: 600; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: rgba(255,255,255,0.75); }
.footer-credit strong { color: rgba(255,255,255,0.6); }

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

/* ===== CTA BAND ===== */
.cta-band {
  background: var(--color-secondary);
  color: #fff;
  padding: var(--s-8) 0;
  text-align: center;
}
.cta-band .section-title { color: #fff; text-align: center; }
.cta-band p { color: rgba(255,255,255,0.88); max-width: 540px; margin: 0 auto var(--s-6); font-size: 1.05rem; }
.cta-band .hero-ctas { justify-content: center; }

/* ===== MENTIONS LÉGALES ===== */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--s-7) var(--container-pad);
}
.legal-content h1 { margin-bottom: var(--s-6); }
.legal-content h2 { margin-top: var(--s-6); margin-bottom: var(--s-3); font-size: 1.2rem; }
.legal-content p, .legal-content ul { margin-bottom: 1rem; color: #4B3020; }

/* ═══════════════════════════════════════════════════
   ANIMATIONS — Template AH-Racine · Spice Market
   Encapsulé dans prefers-reduced-motion: no-preference
   ═══════════════════════════════════════════════════ */

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

  /* ── Keyframes ── */
  @keyframes fade-slide-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes badge-scale-in {
    from { opacity: 0; transform: scale(0.75); }
    to   { opacity: 1; transform: scale(1); }
  }

  /* ── Hero entry (stagger sur les enfants directs de .hero-content) ── */
  .hero-content > * {
    animation: fade-slide-up 0.6s ease-out both;
  }
  .hero-content > *:nth-child(1) { animation-delay: 0.05s; }
  .hero-content > *:nth-child(2) { animation-delay: 0.18s; }
  .hero-content > *:nth-child(3) { animation-delay: 0.30s; }
  .hero-content > *:nth-child(4) { animation-delay: 0.42s; }

  /* ── Scroll-reveal (activé par IntersectionObserver via .is-visible) ── */
  [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }
  [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ── Stagger : enfants révélés en cascade ── */
  [data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }
  [data-reveal-stagger].is-visible > * {
    opacity: 1;
    transform: translateY(0);
  }
  [data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 0.00s; }
  [data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 0.10s; }
  [data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 0.20s; }
  [data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 0.30s; }
  [data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: 0.40s; }
  [data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: 0.50s; }

  /* ── Heritage badge : scale-in au scroll-in ── */
  .heritage-badge {
    opacity: 0;
    transform: scale(0.78);
    transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.34,1.56,0.64,1);
  }
  .heritage-badge.is-visible {
    opacity: 1;
    transform: scale(1);
  }

  /* ── Product block hover ── */
  .product-block {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  }
  .product-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59,28,0,0.12);
    border-left-color: var(--color-accent);
  }

  /* ── Feature card hover ── */
  .feature-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
  }
  .feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59,28,0,0.12);
  }

  /* ── Access card hover ── */
  .access-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .access-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(59,28,0,0.1);
  }

  /* ── Buttons ── */
  .btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  }
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  }
  .btn:active {
    transform: scale(0.97) translateY(0);
    box-shadow: none;
  }

  /* ── Nav links : soulignement glissant ── */
  .site-nav a {
    position: relative;
  }
  .site-nav a::after {
    content: "";
    position: absolute;
    bottom: 2px; left: 0.75rem; right: 0.75rem;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
  }
  .site-nav a:hover::after { transform: scaleX(1); }
  .site-nav a[aria-current="page"]::after { transform: scaleX(1); background: rgba(245,158,11,0.55); }

  /* ── Focus visible élégant ── */
  :focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 3px;
  }

  /* ── Madras band : shimmer subtil ── */
  @keyframes madras-shimmer {
    0%  { opacity: 0.82; }
    50% { opacity: 1; }
    100%{ opacity: 0.82; }
  }
  .madras-band { animation: madras-shimmer 4s ease-in-out infinite; }

} /* fin @media prefers-reduced-motion: no-preference */

/* ── Bloc reset reduced-motion (WCAG 2.3) ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
  .heritage-badge { opacity: 1 !important; transform: none !important; }
}
