@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&display=swap');

:root {
  --site-thumb: #d8cbbf;
  --site-focus: rgba(77, 38, 51, 0.45);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

::selection {
  background: rgba(107, 57, 80, 0.22);
  color: #231a18;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.65rem 1.1rem;
  border-radius: 9999px;
  background: #4d2633;
  color: #fffaf7;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(77, 38, 51, 0.25);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid #c9a43d;
  outline-offset: 3px;
}

body {
  text-rendering: optimizeLegibility;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thumb-produit {
  aspect-ratio: 1200 / 650;
  overflow: hidden;
  background: var(--site-thumb);
}

.thumb-produit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-produit-hero {
  aspect-ratio: 1200 / 650;
  width: 100%;
  max-height: min(72vh, 560px);
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--site-thumb);
}

.img-produit-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Liens & boutons : focus visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--site-focus);
  outline-offset: 2px;
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:not([class*='bg-site-primary'])::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 1px;
  background: #4d2633;
  transition: width 0.2s ease;
}

.nav-link:not([class*='bg-site-primary']):hover::after,
.nav-link:not([class*='bg-site-primary']]):focus-visible::after {
  width: 100%;
}

input[type='text'],
input[type='tel'],
input[type='url'],
textarea,
select {
  border-color: #cfc4b6;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #b8a994;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(77, 38, 51, 0.18);
  border-color: #4d2633;
}

/* Cartes catalogue / accueil : léger lift au survol */
.card-product {
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.2s ease;
}

.card-product:hover {
  transform: translateY(-3px);
}

.card-product:focus-within {
  outline: 2px solid rgba(77, 38, 51, 0.35);
  outline-offset: 3px;
}

/**
 * Bannière héros — motifs discrets (charte : prune #4d2633, crème, miel #c9a43d, terre cuite #8b4a32).
 * Le contenu reste au-dessus (::before en z-0).
 */
.hero-pattern {
  position: relative;
  isolation: isolate;
  background: linear-gradient(
    168deg,
    #fffaf7 0%,
    rgba(235, 225, 227, 0.55) 44%,
    #efe6df 100%
  );
}

.hero-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background-image:
    /* Grille de points (texture « sucre / grain fin ») */
    radial-gradient(circle at center, rgba(77, 38, 51, 0.085) 1px, transparent 1.15px),
    radial-gradient(circle at center, rgba(77, 38, 51, 0.045) 1px, transparent 1.15px),
    /* Motif discret : fines obliques croisées */
    repeating-linear-gradient(
      -36deg,
      transparent,
      transparent 44px,
      rgba(77, 38, 51, 0.028) 44px,
      rgba(77, 38, 51, 0.028) 45px
    ),
    repeating-linear-gradient(
      36deg,
      transparent,
      transparent 56px,
      rgba(139, 74, 50, 0.045) 56px,
      rgba(139, 74, 50, 0.045) 57px
    ),
    /* Halo miel — coin haut droit */
    radial-gradient(ellipse 95% 85% at 100% -8%, rgba(201, 164, 61, 0.2), transparent 58%),
    /* Halo prune — coin bas gauche */
    radial-gradient(ellipse 88% 75% at -5% 102%, rgba(77, 38, 51, 0.11), transparent 55%),
    /* Liseré lumineux haut (fournil / chaleur) */
    linear-gradient(180deg, rgba(255, 250, 247, 0.9) 0%, transparent 28%);
  background-size:
    20px 20px,
    20px 20px,
    auto,
    auto,
    100% 100%,
    100% 100%,
    100% 100%;
  background-position:
    0 0,
    10px 10px,
    0 0,
    0 0,
    0 0,
    0 0,
    0 0;
}

.hero-pattern > * {
  position: relative;
  z-index: 1;
}
