/* =================================================================================
   ui-enhancements.css — Modernisation UX/visuelle (mobile-first)
   Chargé après tous les autres CSS pour overrider proprement.
   ================================================================================= */

/* ── Tokens additionnels ───────────────────────────────────────────────────────── */
:root {
  --kms-shadow-card:        0 1px 2px rgba(40, 44, 52, 0.04), 0 4px 12px rgba(40, 44, 52, 0.06);
  --kms-shadow-card-hover:  0 4px 8px rgba(40, 44, 52, 0.06), 0 16px 32px rgba(40, 44, 52, 0.12);
  --kms-shadow-glow-primary:0 8px 24px rgba(151, 81, 54, 0.28);
  --kms-radius-card:        14px;
  --kms-ease-out:           cubic-bezier(0.22, 1, 0.36, 1);
  --kms-ease-in-out:        cubic-bezier(0.4, 0, 0.2, 1);
  --kms-bg-soft:            #faf7f4;
  --kms-bg-tinted:          #f3ede7;
}

/* ── Smooth scroll global + meilleure typographie ──────────────────────────────── */
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { transition: none !important; }
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Headings : hiérarchie verticale fluide ────────────────────────────────────── */
h1, .h1 { font-size: clamp(1.75rem, 4.2vw, 2.75rem); line-height: 1.15; letter-spacing: -0.01em; }
h2, .h2 { font-size: clamp(1.5rem, 3.4vw, 2.25rem); line-height: 1.2; letter-spacing: -0.005em; }
h3, .h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.3; }

/* ════════════════════════════════════════════════════════════════════════════════
   1. CATALOGUE — 2 colonnes mobile
   ════════════════════════════════════════════════════════════════════════════════ */

/* Override la grille produit — desktop conserve l'auto-fill, mobile force 2 col */
.product-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Force chaque enfant à pouvoir rétrécir (anti-overflow grid) */
.product-grid > * { min-width: 0; }

/* Mobile : 2 colonnes serrées, anti-overflow rigoureux */
@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
  }
}

/* Petits mobiles : on garde 2 col mais avec gap minimal */
@media (max-width: 380px) {
  .product-grid {
    gap: 0.5rem;
  }
}

/* Empêche tout débordement horizontal global sur mobile */
@media (max-width: 767px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }
  .container {
    padding-inline: 0.75rem;
    max-width: 100%;
  }
}

/* Sidebar catalogue : sur mobile, prends toute la largeur et compacte */
@media (max-width: 767px) {
  .catalog-layout { grid-template-columns: 1fr !important; gap: 1rem !important; }
  .catalog-sidebar {
    background: var(--kms-bg-soft);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
  }
  .catalog-toolbar { flex-wrap: wrap; gap: 0.5rem; }
}

/* ════════════════════════════════════════════════════════════════════════════════
   2. CARTE PRODUIT — design moderne
   ════════════════════════════════════════════════════════════════════════════════ */

.product-card {
  background: #ffffff;
  border-radius: var(--kms-radius-card);
  overflow: hidden;
  box-shadow: var(--kms-shadow-card);
  transition: transform 0.35s var(--kms-ease-out), box-shadow 0.35s var(--kms-ease-out);
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  min-width: 0;          /* anti-overflow */
  max-width: 100%;       /* anti-overflow */
  width: 100%;
}

.product-card * {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--kms-shadow-card-hover);
}

/* Image : ratio 4:5 plus engageant que 1:1, transition smooth */
.product-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, #f7f3ef 0%, #efe7df 100%);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--kms-ease-out), opacity 0.3s ease;
}

.product-card:hover .product-card__media img {
  transform: scale(1.08);
}

/* Overlay subtil au hover pour distinguer image de fond */
.product-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.06) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.product-card:hover .product-card__media::after { opacity: 1; }

/* Badges modernes : pill, avec icône intégrée */
.product-card__badge {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3em 0.75em;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  z-index: 2;
}

.product-card__badge--sale {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  color: #ffffff;
}

.product-card__badge--new {
  background: linear-gradient(135deg, #975136 0%, #7a3f28 100%);
  color: #ffffff;
}

/* Si plusieurs badges → décalage vertical */
.product-card__badge + .product-card__badge {
  top: calc(0.625rem + 1.85rem);
}

/* Quickview & compare buttons : visibles toujours sur mobile, hover only desktop */
.product-card__quickview,
.product-card__compare {
  position: absolute;
  z-index: 5;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4d4843;
  transition: all 0.25s var(--kms-ease-out);
}

.product-card__quickview { bottom: 0.625rem; right: 0.625rem; }
.product-card__compare { top: 0.625rem; right: 0.625rem; }

/* Desktop : apparaissent au hover de la carte */
@media (hover: hover) and (min-width: 768px) {
  .product-card__quickview,
  .product-card__compare {
    opacity: 0;
    transform: translateY(8px);
  }
  .product-card:hover .product-card__quickview,
  .product-card:hover .product-card__compare {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile : toujours visibles mais discrets */
@media (max-width: 767px) {
  .product-card__quickview,
  .product-card__compare {
    width: 32px;
    height: 32px;
  }
  .product-card__quickview svg,
  .product-card__compare svg {
    width: 14px;
    height: 14px;
  }
}

.product-card__quickview:hover,
.product-card__compare:hover {
  background: #975136;
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: var(--kms-shadow-glow-primary);
}

/* Info zone — hiérarchie claire */
.product-card__info {
  padding: 0.875rem 1rem 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__category {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #8a837d;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.product-card__title {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #282c34;
  line-height: 1.35;
  margin: 0 0 0.5rem;
  /* Clamp à 2 lignes pour cohérence visuelle */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.5em;
}

.product-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.product-card__current-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #975136;
  letter-spacing: -0.01em;
}

.product-card__compare-price {
  font-size: 0.8rem;
  color: #b8b2ad;
  text-decoration: line-through;
  font-weight: 500;
}

/* Mobile : tout plus compact */
@media (max-width: 767px) {
  .product-card__info {
    padding: 0.55rem 0.6rem 0.35rem;
  }
  .product-card__category {
    font-size: 0.58rem;
    margin-bottom: 0.15rem;
    letter-spacing: 0.04em;
  }
  .product-card__title {
    font-size: 0.78rem;
    line-height: 1.3;
    margin-bottom: 0.3rem;
    -webkit-line-clamp: 2;
    min-height: 2.2em;
    font-weight: 600;
  }
  .product-card__price {
    gap: 0.35rem;
    flex-wrap: wrap;
  }
  .product-card__current-price {
    font-size: 0.88rem;
    font-weight: 700;
  }
  .product-card__compare-price {
    font-size: 0.68rem;
  }
  .product-card__urgency {
    padding: 0 0.6rem 0.3rem;
  }
  .stock-urgency {
    font-size: 0.6rem !important;
    padding: 0.12em 0.45em !important;
    line-height: 1.2;
    white-space: normal;
    max-width: 100%;
  }
  /* Badges plus petits sur mobile */
  .product-card__badge {
    font-size: 0.6rem !important;
    padding: 0.2em 0.55em !important;
    top: 0.4rem !important;
    left: 0.4rem !important;
  }
  .product-card__badge + .product-card__badge {
    top: calc(0.4rem + 1.5rem) !important;
  }
}

/* Petits mobiles : encore plus compact */
@media (max-width: 380px) {
  .product-card__info {
    padding: 0.45rem 0.5rem 0.3rem;
  }
  .product-card__title { font-size: 0.74rem; min-height: 2em; }
  .product-card__current-price { font-size: 0.82rem; }
  .product-card__compare-price { font-size: 0.62rem; }
  .product-card__category { font-size: 0.55rem; }
}

/* Bouton ajouter au panier : compact mais lisible */
.product-card__actions {
  padding: 0 1rem 1rem;
}

.product-card__actions .btn {
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  transition: transform 0.2s var(--kms-ease-out), box-shadow 0.25s var(--kms-ease-out), background-color 0.2s ease;
}

.product-card__actions .btn--primary {
  background: linear-gradient(135deg, #975136 0%, #7a3f28 100%);
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(151, 81, 54, 0.18);
}

.product-card__actions .btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #a85b3c 0%, #843f25 100%);
  box-shadow: var(--kms-shadow-glow-primary);
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .product-card__actions {
    padding: 0 0.55rem 0.55rem;
  }
  .product-card__actions .btn {
    font-size: 0.68rem;
    padding: 0.5rem 0.4rem;
    gap: 0.25rem;
    border-radius: 8px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .product-card__actions .btn svg {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0;
  }
}

/* Petits mobiles : on cache l'icône pour gagner de la place */
@media (max-width: 380px) {
  .product-card__actions .btn {
    font-size: 0.65rem;
    padding: 0.45rem 0.3rem;
  }
  .product-card__actions .btn svg { display: none; }
}

/* ════════════════════════════════════════════════════════════════════════════════
   3. HERO HOME — animation d'entrée + scroll indicator
   ════════════════════════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg-img {
  animation: heroZoomIn 14s var(--kms-ease-out) forwards;
}

@keyframes heroZoomIn {
  0%   { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Overlay plus rich avec gradient diagonal */
.hero__overlay {
  background: linear-gradient(
    135deg,
    rgba(40, 44, 52, 0.78) 0%,
    rgba(40, 44, 52, 0.55) 50%,
    rgba(151, 81, 54, 0.45) 100%
  ) !important;
}

/* Animation séquentielle des éléments du hero */
.hero__badge,
.hero__title,
.hero__subtitle,
.hero__actions {
  opacity: 0;
  transform: translateY(24px);
  animation: heroFadeUp 0.9s var(--kms-ease-out) forwards;
}

.hero__badge    { animation-delay: 0.15s; }
.hero__title    { animation-delay: 0.30s; }
.hero__subtitle { animation-delay: 0.50s; }
.hero__actions  { animation-delay: 0.70s; }

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Badge hero plus moderne */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.hero__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #f5a623;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.25);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.25); }
  50%      { box-shadow: 0 0 0 8px rgba(245, 166, 35, 0.05); }
}

/* CTA primary glow pulse subtle */
.hero__actions .btn--primary {
  position: relative;
  background: linear-gradient(135deg, #975136 0%, #b8704f 100%);
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(151, 81, 54, 0.4);
}

.hero__actions .btn--primary::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, #b8704f, #975136);
  opacity: 0;
  z-index: -1;
  filter: blur(12px);
  transition: opacity 0.3s ease;
}

.hero__actions .btn--primary:hover::after { opacity: 0.6; }

.hero__actions .btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(151, 81, 54, 0.5);
}

/* Scroll indicator en bas du hero */
.hero::after {
  content: '';
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  animation: scrollHintFade 1s ease-out 1.4s forwards;
  z-index: 3;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: calc(1.5rem + 7px);
  left: 50%;
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  animation: scrollHintFade 1s ease-out 1.4s forwards, scrollDot 2s ease-in-out 2s infinite;
  z-index: 4;
}

@keyframes scrollHintFade {
  to { opacity: 1; }
}

@keyframes scrollDot {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.85; }
  50%      { transform: translate(-50%, 12px); opacity: 0.2; }
}

/* Mobile : hero un peu plus court, scroll indicator masqué (peu utile) */
@media (max-width: 767px) {
  .hero { min-height: 70vh; }
  .hero::after, .hero::before { display: none; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__title { font-size: clamp(1.8rem, 7vw, 2.4rem); }
}

/* ════════════════════════════════════════════════════════════════════════════════
   4. SECTIONS HOME — rythme visuel
   ════════════════════════════════════════════════════════════════════════════════ */

/* Alternance fond clair / fond légèrement teinté */
.section--featured,
.section--why-kms,
.section--blog-preview {
  background: var(--kms-bg-soft);
}

.section--bestsellers {
  background: linear-gradient(180deg, #ffffff 0%, var(--kms-bg-tinted) 100%);
}

/* Spacing vertical plus généreux */
.section {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

/* Section header : ligne décorative subtile */
.section-header {
  position: relative;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 720px;
}

.section-header__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem;
  background: rgba(151, 81, 54, 0.08);
  color: #975136;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}

.section-header__tag::before {
  content: '';
  width: 18px;
  height: 2px;
  background: #975136;
  border-radius: 2px;
}

.section-header__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
  font-weight: 700;
  color: #282c34;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.section-header__desc {
  color: #6b645e;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.6;
  max-width: 600px;
}

.section-header--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header--center .section-header__desc { margin-inline: auto; }

/* CTA section spacing harmonisé */
.section__cta {
  text-align: center;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

/* ════════════════════════════════════════════════════════════════════════════════
   5. CATEGORY CARDS — overlay dégradé moderne
   ════════════════════════════════════════════════════════════════════════════════ */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

@media (max-width: 767px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.category-card {
  position: relative;
  display: block;
  border-radius: var(--kms-radius-card);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  text-decoration: none;
  box-shadow: var(--kms-shadow-card);
  transition: transform 0.4s var(--kms-ease-out), box-shadow 0.4s var(--kms-ease-out);
  background: #2a2418;
}

.category-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--kms-shadow-card-hover);
}

.category-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--kms-ease-out);
}

.category-card:hover .category-card__image {
  transform: scale(1.1);
}

.category-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.78) 100%);
  color: #ffffff;
  z-index: 1;
}

.category-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  font-weight: 700;
  margin: 0 0 0.25rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.category-card__desc {
  font-size: 0.82rem;
  line-height: 1.4;
  opacity: 0.92;
  margin: 0;
  /* Sur mobile, on cache la description si la carte est trop petite */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 480px) {
  .category-card__desc { display: none; }
  .category-card__overlay { padding: 0.75rem 0.85rem; }
  .category-card__title { font-size: 0.95rem; }
}

/* ════════════════════════════════════════════════════════════════════════════════
   6. WHY-KMS — cartes feature modernisées
   ════════════════════════════════════════════════════════════════════════════════ */

.why-kms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.why-kms-card {
  background: #ffffff;
  border-radius: var(--kms-radius-card);
  padding: 1.5rem 1.4rem;
  text-align: center;
  box-shadow: var(--kms-shadow-card);
  border: 1px solid rgba(151, 81, 54, 0.08);
  transition: transform 0.35s var(--kms-ease-out), box-shadow 0.35s var(--kms-ease-out), border-color 0.3s ease;
}

.why-kms-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--kms-shadow-card-hover);
  border-color: rgba(151, 81, 54, 0.2);
}

.why-kms-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fbf3ec 0%, #f1e1d2 100%);
  color: #975136;
  border-radius: 16px;
  transition: transform 0.4s var(--kms-ease-out);
}

.why-kms-card:hover .why-kms-card__icon {
  transform: rotate(-6deg) scale(1.05);
}

.why-kms-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #282c34;
}

.why-kms-card p {
  font-size: 0.9rem;
  color: #6b645e;
  line-height: 1.55;
  margin: 0;
}

/* Stats row : compteurs plus visuels */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  padding: 1.5rem 0;
  border-top: 1px solid rgba(151, 81, 54, 0.12);
  border-bottom: 1px solid rgba(151, 81, 54, 0.12);
}

@media (max-width: 580px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 0.5rem;
    padding: 1.25rem 0;
  }
}

.stats-row__item {
  text-align: center;
}

.stats-row__number {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 4.5vw, 2.5rem);
  font-weight: 700;
  color: #975136;
  line-height: 1.05;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.stats-row__label {
  display: block;
  font-size: 0.78rem;
  color: #6b645e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ════════════════════════════════════════════════════════════════════════════════
   7. BLOG CARDS
   ════════════════════════════════════════════════════════════════════════════════ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 767px) {
  .blog-grid { grid-template-columns: 1fr; gap: 1rem; }
}

.blog-card {
  background: #ffffff;
  border-radius: var(--kms-radius-card);
  overflow: hidden;
  box-shadow: var(--kms-shadow-card);
  transition: transform 0.35s var(--kms-ease-out), box-shadow 0.35s var(--kms-ease-out);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--kms-shadow-card-hover);
}

.blog-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.6s var(--kms-ease-out);
}

.blog-card:hover .blog-card__image { transform: scale(1.04); }

.blog-card__content {
  padding: 1.25rem 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__category {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  background: rgba(151, 81, 54, 0.1);
  color: #975136;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.7rem;
  align-self: flex-start;
}

.blog-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.blog-card__title a {
  color: #282c34;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card__title a:hover { color: #975136; }

.blog-card__excerpt {
  font-size: 0.88rem;
  color: #6b645e;
  line-height: 1.55;
  margin-bottom: 0.85rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__meta {
  display: flex;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: #8a837d;
  margin-top: auto;
}

/* ════════════════════════════════════════════════════════════════════════════════
   8. CTA SECTION (bas de home)
   ════════════════════════════════════════════════════════════════════════════════ */

.section--cta {
  background: linear-gradient(135deg, #282c34 0%, #3a2418 60%, #975136 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.section--cta::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 180%;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.12) 0%, transparent 65%);
  pointer-events: none;
}

.cta-section {
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}

.cta-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 4.2vw, 2.5rem);
  margin-bottom: 1rem;
  color: #ffffff;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(0.95rem, 1.7vw, 1.1rem);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.cta-section__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .cta-section__actions { flex-direction: column; align-items: stretch; }
  .cta-section__actions .btn { width: 100%; justify-content: center; }
}

/* ════════════════════════════════════════════════════════════════════════════════
   9. BOUTONS — micro-interactions
   ════════════════════════════════════════════════════════════════════════════════ */

.btn {
  position: relative;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s var(--kms-ease-out), box-shadow 0.25s var(--kms-ease-out), background 0.2s ease, color 0.2s ease;
  will-change: transform;
}

.btn--primary {
  background: linear-gradient(135deg, #975136 0%, #7a3f28 100%);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(151, 81, 54, 0.22);
}

.btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #a85b3c 0%, #843f25 100%);
  box-shadow: var(--kms-shadow-glow-primary);
  transform: translateY(-2px);
}

.btn--primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(151, 81, 54, 0.2);
}

.btn--outline:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(151, 81, 54, 0.18);
}

.btn--outline-light {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.btn--outline-light:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.95);
  color: #282c34;
  border-color: #ffffff;
  transform: translateY(-2px);
}

/* ════════════════════════════════════════════════════════════════════════════════
   10. ANIMATIONS REVEAL — déjà déclarées en SCSS, on s'assure qu'elles sont actives
   ════════════════════════════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--kms-ease-in-out), transform 0.7s var(--kms-ease-in-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--scale { transform: scale(0.96); }
.reveal--scale.is-visible { transform: scale(1); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s var(--kms-ease-in-out), transform 0.55s var(--kms-ease-in-out);
}

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.10s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.20s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.30s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.35s; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.40s; }
.reveal-stagger.is-visible > *:nth-child(9)  { transition-delay: 0.42s; }
.reveal-stagger.is-visible > *:nth-child(10) { transition-delay: 0.44s; }
.reveal-stagger.is-visible > *:nth-child(11) { transition-delay: 0.46s; }
.reveal-stagger.is-visible > *:nth-child(12) { transition-delay: 0.48s; }

/* ════════════════════════════════════════════════════════════════════════════════
   11. CONTAINER & DIVERS
   ════════════════════════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

/* Image lazy + fade-in pour éviter le pop */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}

img[loading="lazy"].is-loaded,
img[loading="lazy"][src] {
  opacity: 1;
}

/* Liens accessibles : focus visible amélioré */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #975136;
  outline-offset: 2px;
  border-radius: 6px;
}

/* ════════════════════════════════════════════════════════════════════════════════
   12. CATEGORY PAGE & PAGINATION
   ════════════════════════════════════════════════════════════════════════════════ */

.catalog-main__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin-bottom: 1rem;
  color: #282c34;
}

@media (max-width: 767px) {
  .catalog-toolbar {
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
  }
  .catalog-toolbar__count { font-size: 0.78rem; }
  .form-select--sm { font-size: 0.78rem; }
}

/* ════════════════════════════════════════════════════════════════════════════════
   END
   ════════════════════════════════════════════════════════════════════════════════ */
