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

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

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

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

img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; border-radius: 2px; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
}
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.4rem); }

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  background: var(--color-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 4px 4px;
  z-index: 9999;
  font-size: 0.9rem;
}
.skip-link:focus { top: 0; }

/* Header */
header {
  background: var(--color-bg);
  border-bottom: 3px solid var(--color-secondary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.site-logo img { height: 48px; width: auto; }
.site-logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  display: none;
}

/* Nav */
nav { display: flex; align-items: center; gap: 1.5rem; }
.nav-list {
  display: none;
  list-style: none;
  gap: 1.5rem;
}
.nav-list a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-list a:hover, .nav-list a[aria-current="page"] {
  color: var(--color-primary);
}
.nav-list a[aria-current="page"] { text-decoration: underline; }

/* Burger */
.burger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--color-bg);
  border-top: 1px solid var(--color-secondary);
  padding: 1rem 1.25rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--color-text);
  font-weight: 600;
  padding: 0.65rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-secondary) 40%, var(--color-bg));
  transition: color 0.2s;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { color: var(--color-primary); }

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

/* Hero */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}
.hero h1 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.hero .lead {
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 1.5rem;
  color: color-mix(in srgb, var(--color-text) 80%, var(--color-bg));
}
.hero .tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}
.hero-visual {
  margin: 1.5rem auto 0;
  max-width: 800px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border: 2px solid var(--color-primary);
}
.btn-primary:hover { background: color-mix(in srgb, var(--color-primary) 85%, #000); border-color: color-mix(in srgb, var(--color-primary) 85%, #000); }
.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border: 2px solid var(--color-accent);
}
.btn-accent:hover { background: color-mix(in srgb, var(--color-accent) 85%, #000); border-color: color-mix(in srgb, var(--color-accent) 85%, #000); }

/* Sections */
section { padding: 3rem 0; }
.section-title {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.section-intro {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 680px;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.card {
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--color-secondary) 60%, var(--color-bg));
  overflow: hidden;
  background: var(--color-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.card-body {
  padding: 1.25rem;
}
.card-body h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.card-body p {
  font-size: 0.97rem;
  color: color-mix(in srgb, var(--color-text) 80%, var(--color-bg));
}

/* CTA Band */
.cta-band {
  background: color-mix(in srgb, var(--color-secondary) 30%, var(--color-bg));
  border-top: 4px solid var(--color-secondary);
  border-bottom: 4px solid var(--color-secondary);
  padding: 3rem 0;
  text-align: center;
}
.cta-band h2 { color: var(--color-primary); margin-bottom: 0.75rem; }
.cta-band p { margin-bottom: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Section alternée */
.section-alt {
  background: color-mix(in srgb, var(--color-secondary) 12%, var(--color-bg));
}

/* Products page */
.product-section {
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  background: var(--color-bg);
  border: 1px solid color-mix(in srgb, var(--color-secondary) 50%, var(--color-bg));
}
.product-section h3 {
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}
.product-section ul {
  list-style: none;
  margin: 1rem 0;
}
.product-section ul li {
  padding: 0.4rem 0;
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.97rem;
}
.product-section ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}
.product-section ul li strong { color: var(--color-accent); }
.product-note {
  font-size: 0.9rem;
  font-style: italic;
  color: color-mix(in srgb, var(--color-text) 60%, var(--color-bg));
  margin-top: 0.5rem;
}

/* About page */
.about-content {
  max-width: 780px;
}
.about-content p { margin-bottom: 1.25rem; }
.about-visual { margin: 2rem 0; }

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.contact-info h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.contact-info address {
  font-style: normal;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}
.contact-info .info-label {
  font-weight: 600;
  color: var(--color-accent);
}

/* Map */
.map-wrapper {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
  width: 100%;
  border: 2px solid var(--color-secondary);
}
.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Form */
.contact-form-wrapper { }
.contact-form-wrapper h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 2px solid color-mix(in srgb, var(--color-text) 25%, var(--color-bg));
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  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: 150px; resize: vertical; }
.form-rgpd {
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--color-text) 65%, var(--color-bg));
  margin-top: 1rem;
  line-height: 1.5;
}

/* Footer */
footer {
  background: var(--color-accent);
  color: #e0f2f1;
  padding: 2.5rem 0 1.5rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.footer-brand { }
.footer-brand .name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.25rem;
}
.footer-brand .tagline-footer {
  font-style: italic;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--color-secondary) 60%, #fff);
}
.footer-nav h4, .footer-contact h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
}
.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.footer-nav a {
  color: #e0f2f1;
  font-size: 0.9rem;
}
.footer-nav a:hover { color: var(--color-secondary); }
.footer-contact address {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.7;
}
.footer-bottom {
  border-top: 1px solid color-mix(in srgb, #fff 20%, var(--color-accent));
  padding-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: color-mix(in srgb, #fff 50%, var(--color-accent));
}

/* Page header (inner pages) */
.page-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 3px solid var(--color-secondary);
  margin-bottom: 2rem;
}
.page-header h1 { color: var(--color-primary); }

/* Highlight band */
.highlight-band {
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  display: inline-block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Analytics notice */
.analytics-notice {
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--color-text) 50%, var(--color-bg));
  text-align: center;
  padding: 0.5rem;
}

/* Responsive — tablet */
@media (min-width: 640px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* Responsive — desktop */
@media (min-width: 1024px) {
  .nav-list { display: flex; }
  .burger { display: none; }
  .site-logo-text { display: block; }
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1.5fr; }
}

/* =============================================================
   MOTION PASS — Au Filet Gourmand
   Toutes les animations sont encapsulées dans
   prefers-reduced-motion: no-preference.
   ============================================================= */

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

  /* --- Keyframes --- */

  @keyframes shimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
  }

  @keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes cta-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(194,65,12,0.4); }
    50%       { box-shadow: 0 0 0 10px rgba(194,65,12,0); }
  }

  /* --- 1. Hero : apparition initiale (CSS-only) --- */
  .hero .highlight-band {
    animation: hero-fade-up 700ms ease-out both;
  }
  .hero h1 {
    animation: hero-fade-up 800ms ease-out 150ms both;
  }
  .hero .tagline {
    animation: hero-fade-up 800ms ease-out 300ms both;
  }
  .hero .lead {
    animation: hero-fade-up 800ms ease-out 450ms both;
  }
  .hero .btn {
    animation: hero-fade-up 800ms ease-out 600ms both,
               cta-pulse 1.8s ease-in-out 1.3s 3;
  }

  /* --- 2. Visual placeholders : shimmer palette créole --- */
  .visual-placeholder,
  .visual-placeholder[data-tone="secondary"],
  .visual-placeholder[data-tone="accent"],
  .visual-placeholder[data-tone="muted"] {
    background: linear-gradient(
      90deg,
      rgba(194,65,12,0.20) 0%,
      rgba(253,230,138,0.65) 30%,
      rgba(194,65,12,0.08) 50%,
      rgba(253,230,138,0.65) 70%,
      rgba(194,65,12,0.20) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
  }

  /* --- 3. Navigation : soulignement animé au hover --- */
  .nav-list a {
    position: relative;
  }
  .nav-list a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms ease;
  }
  .nav-list a:hover::after,
  .nav-list a[aria-current="page"]::after {
    transform: scaleX(1);
  }

  /* --- 4. Boutons : élévation hover --- */
  .btn {
    transition: background 0.2s, color 0.2s, border-color 0.2s,
                transform 0.2s, box-shadow 0.2s;
  }
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
  }
  .btn:active {
    transform: translateY(0);
    box-shadow: none;
  }

  /* --- 5. Logo : zoom hover --- */
  .site-logo img {
    transition: transform 250ms ease;
  }
  .site-logo:hover img,
  .site-logo:focus-visible img {
    transform: scale(1.05);
  }

  /* --- 6. Cartes : hover lift --- */
  .card {
    transition: transform 250ms ease, box-shadow 250ms ease;
  }
  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  }

  /* --- 7. Scroll reveal (classe ajoutée dynamiquement par JS) --- */
  .animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
  }
  .animate-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  /* Cascade stagger pour les cartes de la grille */
  .cards-grid .card.animate-on-scroll:nth-child(2) { transition-delay: 100ms; }
  .cards-grid .card.animate-on-scroll:nth-child(3) { transition-delay: 200ms; }

  /* Cascade stagger pour les sections produits */
  article.product-section.animate-on-scroll:nth-of-type(2) { transition-delay: 100ms; }
  article.product-section.animate-on-scroll:nth-of-type(3) { transition-delay: 200ms; }

  /* --- 8. Contact : focus ring doux sur les champs --- */
  .form-group input,
  .form-group textarea {
    transition: border-color 200ms ease, box-shadow 200ms ease;
  }

  /* --- 9. Footer nav : soulignement hover (symétrique avec header) --- */
  .footer-nav a {
    position: relative;
  }
  .footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--color-secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 280ms ease;
  }
  .footer-nav a:hover::after {
    transform: scaleX(1);
  }
}

/* Kill switch — dernier bloc, override global */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
