/* ============================================================================
   NatureSurvi : socle de design « premium » (refonte 3D, octobre 2026)
   Feuille commune, pensée pour être reprise page par page (catalogue,
   produit, panier, jardinage, about, cgv). Toutes les classes nouvelles sont
   préfixées « ns- » pour ne jamais entrer en collision avec css/style.css ni
   avec le CSS des cartes produit dupliqué dans catalogue.html / jardinage.html.

   Classes héritées volontairement conservées (cart.js et ui-dynamic.js en
   dépendent) : .cart-count, #cartTotal, #cartCount, #navToggle, #navLinks,
   .toast-notification (+ .show, .toast-content, .toast-progress…).
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/fraunces-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ns-ink: #08100c;
  --ns-forest-0: #0b1611;
  --ns-forest-1: #10201a;
  --ns-forest-2: #173026;
  --ns-moss: #2e4a39;
  --ns-sage: #9fb89a;
  --ns-sand: #e8dfca;
  --ns-cream: #f5f0e5;
  --ns-brass: #c8a35a;
  --ns-brass-hi: #e6cb8f;
  --ns-text: #ecebe3;
  --ns-text-2: rgba(236, 235, 227, 0.74);
  --ns-text-3: rgba(236, 235, 227, 0.56);
  --ns-line: rgba(232, 223, 202, 0.14);
  --ns-line-2: rgba(232, 223, 202, 0.26);
  --ns-glass: rgba(16, 32, 26, 0.55);
  --ns-serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --ns-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ns-r: 18px;
  --ns-r-sm: 12px;
  --ns-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ns-nav-h: 64px;
  --ns-wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.ns-premium {
  font-family: var(--ns-sans);
  background: var(--ns-forest-0);
  color: var(--ns-text);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.ns-premium img { max-width: 100%; display: block; }
:where(.ns-premium) a { color: inherit; } /* spécificité nulle : ne doit pas écraser .ns-btn */
.ns-premium :focus-visible { outline: 2px solid var(--ns-brass-hi); outline-offset: 3px; border-radius: 6px; }

.ns-skip {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--ns-brass); color: var(--ns-ink); padding: 10px 16px; border-radius: 10px;
  font-weight: 700; text-decoration: none; transition: top 0.2s;
}
.ns-skip:focus { top: 12px; }

.ns-wrap { width: 100%; max-width: var(--ns-wrap); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .ns-wrap { padding: 0 32px; } }

/* ---------- Typo ---------- */
.ns-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ns-brass-hi);
}
.ns-kicker::before { content: ''; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }
.ns-h1, .ns-h2, .ns-h3 { font-family: var(--ns-serif); font-weight: 400; letter-spacing: -0.015em; color: var(--ns-cream); }
.ns-h1 { font-size: clamp(2.35rem, 7.4vw, 4.6rem); line-height: 1.04; font-variation-settings: 'opsz' 144; }
.ns-h1 em, .ns-h2 em { font-style: normal; color: var(--ns-brass-hi); }
.ns-h2 { font-size: clamp(1.85rem, 4.6vw, 3rem); line-height: 1.1; font-variation-settings: 'opsz' 110; }
.ns-h3 { font-size: 1.3rem; line-height: 1.25; }
.ns-lead { font-size: clamp(1.02rem, 1.6vw, 1.16rem); color: var(--ns-text-2); max-width: 36em; }
.ns-muted { color: var(--ns-text-3); }

/* ---------- Boutons ---------- */
.ns-btn {
  --b-bg: transparent; --b-fg: var(--ns-cream); --b-bd: var(--ns-line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd);
  font: 600 0.95rem/1 var(--ns-sans); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: transform 0.35s var(--ns-ease), background 0.25s, border-color 0.25s, box-shadow 0.35s var(--ns-ease);
  -webkit-tap-highlight-color: transparent;
}
.ns-btn:hover { transform: translateY(-2px); border-color: var(--ns-brass); }
.ns-btn--gold {
  --b-bg: linear-gradient(135deg, var(--ns-brass-hi), var(--ns-brass) 55%, #a9843f);
  --b-fg: #1a1408; --b-bd: transparent;
  background: var(--b-bg);
  box-shadow: 0 10px 30px -10px rgba(200, 163, 90, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.ns-btn--gold:hover { box-shadow: 0 16px 40px -12px rgba(230, 203, 143, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.ns-btn--glass { --b-bg: rgba(245, 240, 229, 0.06); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ns-btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.86rem; }
.ns-btn .ns-arrow { transition: transform 0.35s var(--ns-ease); }
.ns-btn:hover .ns-arrow { transform: translateX(4px); }

/* ---------- Barre d'info ---------- */
.ns-topbar {
  background: var(--ns-ink); color: var(--ns-text-3); font-size: 0.76rem; letter-spacing: 0.02em;
  border-bottom: 1px solid var(--ns-line);
}
.ns-topbar .ns-wrap { display: flex; justify-content: center; gap: 22px; min-height: 34px; align-items: center; flex-wrap: wrap; }
.ns-topbar span + span::before { content: '·'; margin-right: 22px; color: var(--ns-brass); }
@media (max-width: 640px) {
  .ns-topbar span:nth-child(n+2) { display: none; }
}

/* ---------- Navigation ---------- */
.ns-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(8, 16, 12, 0.72);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--ns-line);
}
.ns-nav .ns-wrap { display: flex; align-items: center; justify-content: space-between; height: var(--ns-nav-h); gap: 16px; }
.ns-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ns-cream); }
.ns-logo-mark {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(200, 163, 90, 0.55); color: var(--ns-brass-hi);
  background: radial-gradient(circle at 30% 25%, rgba(230, 203, 143, 0.18), transparent 70%);
}
.ns-logo-mark svg { width: 18px; height: 18px; }
.ns-logo-text { font-family: var(--ns-serif); font-size: 1.12rem; letter-spacing: 0.01em; line-height: 1; }
.ns-logo-text small { display: block; font-family: var(--ns-sans); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ns-text-3); margin-top: 4px; }

.ns-nav-links { display: flex; gap: 2px; list-style: none; align-items: center; }
.ns-nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  color: var(--ns-text-2); font-size: 0.9rem; transition: color 0.2s, background 0.2s;
}
.ns-nav-links a:hover, .ns-nav-links a.active { color: var(--ns-cream); background: rgba(245, 240, 229, 0.07); }
.ns-nav-right { display: flex; align-items: center; gap: 8px; }

.ns-cart {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px;
  border-radius: 999px; border: 1px solid var(--ns-line-2); text-decoration: none;
  color: var(--ns-cream); font-size: 0.86rem; font-variant-numeric: tabular-nums;
  transition: border-color 0.2s, background 0.2s;
}
.ns-cart:hover { border-color: var(--ns-brass); background: rgba(200, 163, 90, 0.08); }
.ns-cart svg { width: 18px; height: 18px; }
/* cart.js pose display:flex/none en style inline sur .cart-count : on ne force pas display ici */
.ns-cart .cart-count {
  align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--ns-brass); color: var(--ns-ink);
  font-size: 0.72rem; font-weight: 700;
}

.ns-burger {
  display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--ns-line-2);
  background: transparent; color: var(--ns-cream); cursor: pointer; align-items: center; justify-content: center;
}
.ns-burger svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .ns-burger { display: inline-flex; }
  .ns-nav-links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(8, 16, 12, 0.97); border-bottom: 1px solid var(--ns-line); padding: 8px 16px 18px;
    display: none;
  }
  .ns-nav-links.open { display: flex; }
  .ns-nav-links a { padding: 14px 8px; border-radius: 0; border-bottom: 1px solid var(--ns-line); font-size: 1rem; }
  .ns-cart-total { display: none; }
}
@media (max-width: 380px) { .ns-logo-text small { display: none; } }

/* ---------- Sections ---------- */
.ns-section { padding: 88px 0; position: relative; }
@media (min-width: 900px) { .ns-section { padding: 128px 0; } }
.ns-section--deep { background: var(--ns-ink); }
.ns-section--light { background: var(--ns-cream); color: #1d2a22; }
.ns-section--light .ns-h2, .ns-section--light .ns-h3 { color: #13221a; }
.ns-section--light .ns-lead { color: #4b5a50; }
.ns-section--light .ns-kicker { color: #7a5c22; }
.ns-section--light .ns-h2 em { color: #7a5c22; }
.ns-head { display: grid; gap: 18px; margin-bottom: 48px; max-width: 720px; }

/* ---------- Réassurance ---------- */
.ns-assure { border-top: 1px solid var(--ns-line); border-bottom: 1px solid var(--ns-line); background: var(--ns-forest-1); }
.ns-assure ul {
  list-style: none; display: grid; grid-template-columns: repeat(2, 1fr);
}
.ns-assure li {
  display: flex; gap: 12px; align-items: flex-start; padding: 20px 14px; font-size: 0.86rem; color: var(--ns-text-2);
  border-right: 1px solid var(--ns-line); border-bottom: 1px solid var(--ns-line);
}
.ns-assure li:nth-child(2n) { border-right: 0; }
.ns-assure li:nth-last-child(-n+2) { border-bottom: 0; }
.ns-assure strong { display: block; color: var(--ns-cream); font-weight: 600; font-size: 0.92rem; }
.ns-assure svg { flex: none; width: 22px; height: 22px; color: var(--ns-brass-hi); margin-top: 2px; }
.ns-assure a { color: var(--ns-brass-hi); }
@media (min-width: 900px) {
  .ns-assure ul { grid-template-columns: repeat(4, 1fr); }
  .ns-assure li { padding: 26px 22px; border-bottom: 0; }
  .ns-assure li:nth-child(2n) { border-right: 1px solid var(--ns-line); }
  .ns-assure li:last-child { border-right: 0; }
}

/* ---------- Cartes produit premium ---------- */
.ns-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .ns-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }

.ns-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--ns-r);
  background: linear-gradient(180deg, rgba(245, 240, 229, 0.06), rgba(245, 240, 229, 0.02));
  border: 1px solid var(--ns-line); overflow: hidden;
  transition: transform 0.5s var(--ns-ease), border-color 0.3s, box-shadow 0.5s var(--ns-ease);
}
.ns-card:hover { transform: translateY(-6px); border-color: rgba(200, 163, 90, 0.45); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.ns-card-media {
  position: relative; aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 40%, #fbf8f1, #e9e1cf);
  overflow: hidden;
}
.ns-card-media img { width: 100%; height: 100%; object-fit: contain; padding: 10%; mix-blend-mode: multiply; transition: transform 0.7s var(--ns-ease); }
.ns-card:hover .ns-card-media img { transform: scale(1.05); }
.ns-card-tag {
  position: absolute; left: 12px; top: 12px; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(16, 32, 26, 0.88); color: var(--ns-sand); padding: 5px 9px; border-radius: 999px;
}
.ns-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 18px; flex: 1; }
.ns-card-cat { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ns-text-3); }
.ns-card-name { font-family: var(--ns-serif); font-size: 1.06rem; line-height: 1.25; color: var(--ns-cream); font-weight: 400; }
.ns-card-name a { text-decoration: none; }
.ns-card-name a::after { content: ''; position: absolute; inset: 0; z-index: 1; } /* toute la carte est cliquable */
.ns-card-ship { font-size: 0.74rem; color: var(--ns-text-3); line-height: 1.35; }
.ns-card-price { margin-top: auto; padding-top: 8px; font-variant-numeric: tabular-nums; color: var(--ns-brass-hi); font-weight: 600; }
.ns-card-price small { color: var(--ns-text-3); font-weight: 400; font-size: 0.78rem; margin-right: 4px; }
.ns-card-actions { display: flex; gap: 8px; margin-top: 10px; position: relative; z-index: 2; }
.ns-card-actions .ns-btn { flex: 1; min-height: 40px; padding: 0 10px; font-size: 0.82rem; }
.ns-add.is-added { border-color: var(--ns-brass); background: rgba(200, 163, 90, 0.16); color: var(--ns-brass-hi); }
@media (max-width: 420px) {
  .ns-card-body { padding: 12px 12px 14px; }
  .ns-card-name { font-size: 0.96rem; }
  .ns-card-actions { flex-direction: column; }
}

/* ---------- Arrivée du texte (en-têtes) ---------- */
.ns-in { opacity: 0; transform: translateY(18px); animation: ns-in 1s var(--ns-ease) forwards; animation-delay: calc(0.15s + var(--d, 0) * 0.12s); }
@keyframes ns-in { to { opacity: 1; transform: none; } }
.ns-in--soft { opacity: 1; animation-name: ns-in-soft; }
@keyframes ns-in-soft { from { transform: translateY(14px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ns-in { animation: none; opacity: 1; transform: none; } }

/* ---------- Apparition au scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ns-ease), transform 0.9s var(--ns-ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------- Toast panier (créé par cart.js) ---------- */
.toast-notification {
  position: fixed; left: 50%; bottom: 20px; z-index: 400; width: min(92vw, 420px);
  transform: translate(-50%, 140%); opacity: 0;
  background: rgba(16, 32, 26, 0.96); color: var(--ns-cream); border: 1px solid rgba(200, 163, 90, 0.45);
  border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8); overflow: hidden;
  transition: transform 0.45s var(--ns-ease), opacity 0.3s;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.toast-notification.show { transform: translate(-50%, 0); opacity: 1; }
.toast-content { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.toast-icon { font-size: 1.1rem; }
.toast-text { display: flex; flex-direction: column; font-size: 0.86rem; line-height: 1.35; flex: 1; min-width: 0; }
.toast-text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast-text span { color: var(--ns-text-3); }
.toast-action { color: var(--ns-brass-hi); font-size: 0.84rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.toast-progress { height: 2px; background: var(--ns-brass); transform-origin: left; animation: ns-toast 3.5s linear forwards; }
@keyframes ns-toast { to { transform: scaleX(0); } }
@media (min-width: 768px) { .toast-notification { left: auto; right: 24px; bottom: 24px; transform: translateY(140%); } .toast-notification.show { transform: none; } }

/* ---------- Pied de page (contenu inchangé : propriété de l'agent administratif) ---------- */
.ns-premium footer { background: var(--ns-ink); color: var(--ns-text-3); padding: 72px 0 28px; border-top: 1px solid var(--ns-line); }
.ns-premium .footer-inner { max-width: var(--ns-wrap); margin: 0 auto; padding: 0 20px 36px; display: grid; gap: 36px; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--ns-line); }
.ns-premium .footer-brand-col { grid-column: 1 / -1; }
.ns-premium .footer-brand { font-family: var(--ns-serif); font-size: 1.3rem; color: var(--ns-cream); margin-bottom: 12px; }
.ns-premium .footer-desc { font-size: 0.84rem; line-height: 1.75; }
.ns-premium .footer-desc strong { color: var(--ns-text-2); font-weight: 600; }
.ns-premium .footer-col h4 { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ns-brass-hi); margin-bottom: 14px; font-weight: 600; }
.ns-premium .footer-col a { display: block; color: var(--ns-text-2); text-decoration: none; font-size: 0.86rem; margin-bottom: 9px; }
.ns-premium .footer-col a:hover { color: var(--ns-cream); }
.ns-premium .footer-col p { color: var(--ns-text-3) !important; }
.ns-premium .social-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.ns-premium .social-links a { font-size: 0.8rem; color: var(--ns-text-2); text-decoration: none; padding: 6px 12px; border: 1px solid var(--ns-line-2); border-radius: 999px; }
.ns-premium .social-links a:hover { border-color: var(--ns-brass); color: var(--ns-cream); }
.ns-premium .footer-bottom { max-width: var(--ns-wrap); margin: 22px auto 0; padding: 0 20px; text-align: center; font-size: 0.74rem; color: var(--ns-text-3); }
@media (min-width: 900px) {
  .ns-premium .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; padding: 0 32px 40px; }
  .ns-premium .footer-brand-col { grid-column: auto; }
}
