/* ═══════════════════════════════════════
   SAINEBIO – style.css
   Partagé entre index.html et produits.html
═══════════════════════════════════════ */

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

:root {
  --green:       #2a7a3b;
  --green-light: #4caf50;
  --green-dark:  #1a5c28;
  --cream:       #f4f1ea;
  --cream-dark:  #e8e4d8;
  --text:        #1a1a1a;
  --text-muted:  #6b6558;
  --white:       #ffffff;
  --radius:      12px;
  --shadow:      0 4px 20px rgba(0,0,0,.08);
}

html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: var(--cream); color: var(--text); }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 60px; height: 84px;
  background: var(--white); border-bottom: 1px solid var(--cream-dark);
}

.nav-logo {
  font-size: 1.3rem; font-weight: 800; color: var(--green);
  letter-spacing: -.02em;
}
.nav-logo .logos{
    width: 80px; height: auto;
    border-radius: 100%;}
.nav-links {
  display: flex; gap: 36px;
}

.nav-links a {
  font-size: .9rem; font-weight: 500; color: var(--text-muted);
  padding-bottom: 4px; transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
  border-bottom: 2px solid var(--green);
}

.nav-right {
  display: flex; align-items: center; gap: 16px;
}

/* ============================================================
   MODE SOMBRE
   ============================================================ */
   body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}
body.dark-mode .sb-navbar {
    background-color: rgba(18,18,18,0.97);
}
body.dark-mode .sb-navbar .nav-link { color: #ddd; }
body.dark-mode .bg-white   { background-color: #1e1e1e !important; }
body.dark-mode .text-muted { color: #999 !important; }
body.dark-mode .border     { border-color: #333 !important; }
body.dark-mode .sb-input {
    background-color: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}
body.dark-mode .sb-contact-info-card { background-color: #2a2a2a; }
body.dark-mode .sb-quality-card      { background-color: #2a2a2a !important; }

/* ============================================================
   BOUTON DARK MODE — Style visuel du bouton
   ============================================================ */
   .dark-toggle {
    background: none;
    border: 1.5px solid #ddd;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
}
.dark-toggle:hover {
    background-color: #2d6a2d;
    border-color: #2d6a2d;
    color: #fff;
}

/* Bouton en mode sombre */
body.dark-mode .dark-toggle {
    border-color: #555;
    color: #ddd;
}
body.dark-mode .dark-toggle:hover {
    background-color: #4a8c4a;
    border-color: #4a8c4a;
    color: #fff;
}

/* Panier */
.cart-btn {
  position: relative; background: none; border: none; cursor: pointer;
  padding: 8px; border-radius: 50%; transition: background .2s;
}
.cart-btn img{
    width: 22px; height: 22px;
}
.cart-btn:hover { background: var(--cream-dark); }
.cart-btn svg { width: 22px; height: 22px; color: var(--text); }

.cart-count {
  position: absolute; top: 2px; right: 2px;
  background: var(--green); color: #fff;
  font-size: .65rem; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0); transition: all .2s;
}
.cart-count.visible { opacity: 1; transform: scale(1); }

/* Dark mode btn */
.dark-btn {
  background: none; border: none; cursor: pointer;
  padding: 8px; border-radius: 50%; font-size: 1.1rem;
  transition: background .2s;
}
.dark-btn:hover { background: var(--cream-dark); }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; transition: all .3s;
}

/* ── FOOTER ── */
.footer { background: #eceade; padding: 60px 60px 0; }

.footer__top {
  display: flex; gap: 80px; padding-bottom: 48px;
  border-bottom: 1px solid #d4cfc3;
}

.footer__brand { flex: 1.2; }

.footer__logo {
  font-size: 1.35rem; font-weight: 800; color: var(--green);
  margin-bottom: 14px; display: inline-block;
}

.footer__tagline {
  font-size: .875rem; color: var(--text-muted);
  line-height: 1.65; margin-bottom: 24px;
}

.footer__socials { display: flex; gap: 10px; }

.social-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid #b8b3a8; color: #4a4641;
  transition: border-color .2s, color .2s;
}
.social-btn:hover { border-color: var(--green); color: var(--green); }
.social-btn svg { width: 17px; height: 17px; fill: currentColor; }

.footer__nav { flex: 1; }

.footer__col-title {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #4a4641; margin-bottom: 20px;
}

.footer__links { display: flex; flex-direction: column; gap: 14px; }

.footer__links a {
  font-size: .875rem; color: #5a564f; transition: color .2s;
}
.footer__links a:hover { color: var(--green); }

.footer__bottom { padding: 18px 0; text-align: center; }

.footer__copy { font-size: .8rem; color: #8a857c; }

/* ── PANIER SIDEBAR ── */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-sidebar {
  position: fixed; top: 0; right: -420px; width: 420px; height: 100vh;
  background: var(--white); z-index: 201; display: flex; flex-direction: column;
  transition: right .35s cubic-bezier(.4,0,.2,1); box-shadow: -4px 0 30px rgba(0,0,0,.15);
}
.cart-sidebar.open { right: 0; }

.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid #eee;
}
.cart-header h2 { font-size: 1.1rem; font-weight: 700; }
.cart-close {
  background: none; border: none; cursor: pointer; font-size: 1.4rem;
  color: var(--text-muted); padding: 4px 8px; border-radius: 6px;
  transition: background .2s;
}
.cart-close:hover { background: var(--cream); }

.cart-items { flex: 1; overflow-y: auto; padding: 20px 24px; }

.cart-empty {
  text-align: center; padding: 60px 0; color: var(--text-muted);
}
.cart-empty svg { width: 48px; height: 48px; margin: 0 auto 16px; opacity: .3; }
.cart-empty p { font-size: .95rem; }

.cart-item {
  display: flex; gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid #f0f0f0;
}
.cart-item-name { font-weight: 600; font-size: .95rem; }
.cart-item-price { font-size: .85rem; color: var(--text-muted); margin-top: 2px; }

.cart-item-qty {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
}
.qty-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #ddd;
  background: none; cursor: pointer; font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s;
}
.qty-btn:hover { border-color: var(--green); color: var(--green); }
.qty-num { font-size: .9rem; font-weight: 600; min-width: 20px; text-align: center; }

.remove-btn {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: #ccc; font-size: 1.1rem; transition: color .2s;
}
.remove-btn:hover { color: #e53e3e; }

.cart-footer {
  padding: 20px 24px; border-top: 1px solid #eee;
}
.cart-total {
  display: flex; justify-content: space-between;
  font-weight: 700; font-size: 1.05rem; margin-bottom: 16px;
}
.cart-total span:last-child { color: var(--green); }

.whatsapp-order-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px; border-radius: var(--radius);
  background: #25d366; color: #fff; font-weight: 700; font-size: 1rem;
  border: none; cursor: pointer; transition: background .2s;
}
.whatsapp-order-btn:hover { background: #1ebe5d; }
.whatsapp-order-btn svg { width: 20px; height: 20px; fill: #fff; }

 
    /* ── VOIR PLUS / DETAILS ── */
    .card-details {
      display: none;
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid rgba(0,0,0,0.08);
      animation: fadeIn 0.2s ease;
    }
    .card-details.open {
      display: block;
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-4px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .card-detail-row {
      display: flex;
      gap: 6px;
      margin-bottom: 6px;
      font-size: 0.82rem;
      line-height: 1.4;
    }
    .card-detail-label {
      font-weight: 600;
      white-space: nowrap;
      color: #2e7d32;
    }
    .card-detail-value {
      color: #444;
    }
    .voir-plus-btn {
      background: none;
      border: none;
      padding: 0;
      font-size: 0.82rem;
      cursor: pointer;
      color: #2e7d32;
      margin-top: 8px;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      text-decoration: none;
      transition: color 0.15s;
      width: 100%;
    }
    .voir-plus-btn:hover {
      color: #1b5e20;
    }
    .voir-plus-btn .chevron {
      display: inline-block;
      transition: transform 0.2s;
    }
    .voir-plus-btn.open .chevron {
      transform: rotate(180deg);
    }

    /* ── TAGS PAR CATEGORIE ── */
    .tag-legumes      { background: #e8f5e9; color: #2e7d32; }
    .tag-fruits       { background: #fff3e0; color: #e65100; }
    .tag-naturels     { background: #fef9c3; color: #92400e; }
    .tag-laitiers     { background: #e3f2fd; color: #1565c0; }
    .tag-ferme        { background: #fce4ec; color: #880e4f; }


/* Toast notification */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--green); color: #fff;
  padding: 12px 24px; border-radius: 50px; font-size: .9rem; font-weight: 600;
  opacity: 0; transition: all .3s; z-index: 300; pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


    /* ── HERO ── */
    .hero {
      position: relative; height: 520px; overflow: hidden;
      display: flex; align-items: flex-end;
    }
    .hero-bg {
      position: absolute; inset: 0;
      background: linear-gradient(135deg, #1a5c28 0%, #2a7a3b 40%, #3d9e52 100%);
    }
    .hero-img {
      position: absolute; right: 0; top: 0; height: 100%; width: 60%;
      object-fit: cover; opacity: .85;
    }
    .hero-overlay {
      position: absolute; inset: 0;
      background: linear-gradient(90deg, rgba(26,92,40,.92) 35%, rgba(26,92,40,.2) 80%);
    }
    .hero-content {
      position: relative; z-index: 2; padding: 60px 60px 60px;
      max-width: 560px;
    }
    .hero-content h1 {
      font-size: 2.6rem; font-weight: 800; color: #fff;
      line-height: 1.15; margin-bottom: 16px;
    }
    .hero-content p {
      font-size: 1rem; color: rgba(255,255,255,.85);
      line-height: 1.65; margin-bottom: 32px; max-width: 420px;
    }
    .hero-cta {
      display: inline-flex; align-items: center; gap: 10px;
      padding: 14px 28px; background: #fff; color: var(--green);
      font-weight: 700; font-size: .95rem; border-radius: 50px;
      transition: transform .2s, box-shadow .2s;
    }
    .hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
    .hero-cta svg { width: 18px; height: 18px; }

    /* Floating WhatsApp */
    .floating-wa {
      position: fixed; bottom: 28px; right: 28px; z-index: 50;
      width: 54px; height: 54px; border-radius: 50%;
      background: #25d366; display: flex; align-items: center; justify-content: center;
      box-shadow: 0 4px 20px rgba(37,211,102,.4); transition: transform .2s;
    }
    .floating-wa:hover { transform: scale(1.1); }
    .floating-wa svg { width: 28px; height: 28px; fill: #fff; }

    /* ── CATEGORIES ── */
    .section { padding: 80px 60px; }
    .section-eyebrow {
      display: inline-block; padding: 4px 12px; border-radius: 20px;
      border: 1.5px solid var(--green); color: var(--green);
      font-size: .72rem; font-weight: 700; letter-spacing: .1em;
      text-transform: uppercase; margin-bottom: 14px;
    }
    .section-header {
      display: flex; align-items: baseline; justify-content: space-between;
      margin-bottom: 32px;
    }
    .section-title { font-size: 1.9rem; font-weight: 800; }
    .voir-tout {
      display: flex; align-items: center; gap: 6px;
      font-size: .85rem; color: var(--green); font-weight: 600;
      transition: gap .2s;
    }
    .voir-tout:hover { gap: 10px; }
    .voir-tout svg { width: 14px; height: 14px; }

    .cat-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 260px 200px;
      gap: 14px;
    }
    .cat-card {
      position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
    }
    .cat-card:last-child { grid-column: 1 / -1; }
    .cat-card img {
      width: 100%; height: 100%; object-fit: cover;
      transition: transform .4s;
    }
    .cat-card:hover img { transform: scale(1.05); }
    .cat-overlay {
      position: absolute; inset: 0;
      background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.65) 100%);
    }
    .cat-info {
      position: absolute; bottom: 0; left: 0; padding: 20px;
    }
    .cat-info h3 { font-size: 1.2rem; font-weight: 700; color: #fff; }
    .cat-info p { font-size: .8rem; color: rgba(255,255,255,.8); margin-top: 2px; }
    .cat-explore {
      display: inline-flex; align-items: center; gap: 6px;
      margin-top: 10px; padding: 6px 14px; border-radius: 20px;
      background: rgba(255,255,255,.2); backdrop-filter: blur(4px);
      color: #fff; font-size: .78rem; font-weight: 600;
      border: 1px solid rgba(255,255,255,.3); transition: background .2s;
    }
    .cat-explore:hover { background: rgba(255,255,255,.35); }
    .cat-arrow {
      position: absolute; bottom: 20px; right: 20px;
      width: 36px; height: 36px; border-radius: 50%;
      background: rgba(255,255,255,.2); backdrop-filter: blur(4px);
      display: flex; align-items: center; justify-content: center;
      color: #fff; border: 1px solid rgba(255,255,255,.3); transition: background .2s;
    }
    .cat-arrow:hover { background: rgba(255,255,255,.35); }
    .cat-arrow svg { width: 16px; height: 16px; }

    /* ── POURQUOI ── */
    .why { background: var(--cream-dark); }
    .why-grid {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
      margin-top: 40px;
    }
    .why-card {
      background: var(--cream); border-radius: var(--radius); padding: 32px;
      box-shadow: var(--shadow);
    }
    .why-icon {
      width: 52px; height: 52px; border-radius: 14px;
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 20px; font-size: 1.4rem;
    }
    .why-icon.green { background: #e8f5e9; }
    .why-icon.teal  { background: #e0f2f1; }
    .why-icon.orange{ background: #fff3e0; }
    .why-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
    .why-card p  { font-size: .875rem; color: var(--text-muted); line-height: 1.65; }

    /* ── CTA NEWSLETTER ── */
    .cta-section {
      background: var(--green); border-radius: 20px;
      margin: 0 60px 80px; padding: 60px;
      text-align: center;
    }
    .cta-section h2 { font-size: 1.9rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
    .cta-section p  { font-size: .95rem; color: rgba(255,255,255,.8); margin-bottom: 32px; }
    .cta-form {
      display: flex; gap: 12px; max-width: 440px; margin: 0 auto;
    }
    .cta-form input {
      flex: 1; padding: 14px 18px; border-radius: var(--radius);
      border: none; font-size: .9rem; outline: none;
    }
    .cta-form button {
      padding: 14px 24px; border-radius: var(--radius);
      background: var(--green-dark); color: #fff; border: none;
      font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap;
      transition: background .2s;
    }
    .cta-form button:hover { background: #0f3d18; }

    @media (max-width: 768px) {
      .hero { height: auto; min-height: 420px; }
      .hero-content { padding: 40px 20px; }
      .hero-content h1 { font-size: 1.8rem; }
      .section { padding: 50px 20px; }
      .cat-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
      .cat-card:last-child { grid-column: auto; }
      .why-grid { grid-template-columns: 1fr; }
      .cta-section { margin: 0 20px 60px; padding: 40px 24px; }
      .cta-form { flex-direction: column; }}

 /* ── HERO PRODUITS ── */
    .hero-produits {
      background: var(--cream-dark); text-align: center;
      padding: 60px 60px 40px;
    }
    .hero-produits {
  position: relative;
  overflow: hidden;
}

.hero-produits-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.1; /* ajuste l'opacité selon ton goût */
}

.hero-produits h1,
.hero-produits p {
  position: relative;
  z-index: 1;
}
    .hero-produits h1 {
      font-size: 2.4rem; font-weight: 800; color: var(--green); margin-bottom: 14px;
    }
    .hero-produits p {
      font-size: 1rem; color: var(--text-muted); max-width: 560px; margin: 0 auto;
      line-height: 1.65;
    }

    /* ── FILTRES ── */
    .filters {
      display: flex; justify-content: center; gap: 10px;
      padding: 32px 60px 0;
    }
    .filter-btn {
      padding: 9px 22px; border-radius: 50px;
      border: 2px solid var(--green); background: transparent;
      color: var(--green); font-weight: 600; font-size: .875rem;
      cursor: pointer; transition: all .2s;
    }
    .filter-btn:hover,
    .filter-btn.active {
      background: var(--green); color: #fff;
    }

    /* ── GRILLE PRODUITS ── */
    .products {
      display: grid; grid-template-columns: repeat(4, 1fr);
      gap: 24px; padding: 40px 60px 80px;
    }

    .card {
      background: #fff; border-radius: var(--radius);
      box-shadow: var(--shadow); overflow: hidden;
      transition: transform .25s, box-shadow .25s;
      display: flex; flex-direction: column;
    }
    .card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,.12); }
    .card.hidden { display: none; }

    .card-img-wrapper { position: relative; height: 200px; overflow: hidden; }
    .card-img-wrapper img {
      width: 100%; height: 100%; object-fit: cover;
      transition: transform .4s;
    }
    .card:hover .card-img-wrapper img { transform: scale(1.06); }

    .badge-saison {
      position: absolute; top: 12px; left: 12px;
      background: var(--green); color: #fff;
      font-size: .7rem; font-weight: 700; letter-spacing: .06em;
      padding: 3px 10px; border-radius: 20px; text-transform: uppercase;
    }

    .card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }

    .card-header {
      display: flex; align-items: flex-start; justify-content: space-between;
      gap: 8px; margin-bottom: 10px;
    }
    .card-name { font-weight: 700; font-size: 1rem; line-height: 1.2; }

    .tag {
      padding: 3px 10px; border-radius: 20px;
      font-size: .7rem; font-weight: 700; white-space: nowrap; flex-shrink: 0;
    }
    .tag-fruits   { background: #e8f5e9; color: #2e7d32; }
    .tag-legumes  { background: #e3f2fd; color: #1565c0; }
    .tag-exotiques{ background: #fce4ec; color: #c62828; }

    .card-desc {
      font-size: .82rem; color: var(--text-muted);
      line-height: 1.55; flex: 1; margin-bottom: 14px;
    }

    .card-price {
      font-size: 1.15rem; font-weight: 800; color: var(--green);
      margin-bottom: 14px;
    }
    .card-price span { font-size: .8rem; font-weight: 400; color: var(--text-muted); }

    .acheter-btn {
      display: flex; align-items: center; justify-content: center; gap: 8px;
      padding: 11px; border-radius: 8px;
      background: var(--green); color: #fff;
      border: none; cursor: pointer; font-weight: 700; font-size: .875rem;
      transition: background .2s, transform .15s;
      width: 100%;
    }
    .acheter-btn:hover { background: var(--green-dark); transform: scale(1.02); }
    .acheter-btn svg { width: 16px; height: 16px; fill: #fff; }

    /* ── FLOATING CART BTN (mobile) ── */
    .floating-cart {
      display: none; position: fixed; bottom: 28px; right: 28px; z-index: 50;
      padding: 14px 22px; border-radius: 50px;
      background: var(--green); color: #fff; border: none;
      font-weight: 700; font-size: .9rem; cursor: pointer;
      box-shadow: 0 4px 20px rgba(42,122,59,.35);
      align-items: center; gap: 10px;
    }
    .floating-cart svg { width: 18px; height: 18px; fill: #fff; }

    @media (max-width: 1100px) {
      .products { grid-template-columns: repeat(3, 1fr); }
    }
    @media (max-width: 768px) {
      .hero-produits { padding: 40px 20px 30px; }
      .hero-produits h1 { font-size: 1.7rem; }
      .filters { padding: 24px 20px 0; flex-wrap: wrap; }
      .products { grid-template-columns: repeat(2, 1fr); padding: 24px 20px 60px; gap: 16px; }
      .floating-cart { display: flex; }
    }
    @media (max-width: 480px) {
      .products { grid-template-columns: 1fr; }
    }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--cream); padding: 20px;
    border-bottom: 1px solid var(--cream-dark); gap: 16px;
  }
  .footer { padding: 40px 24px 0; }
  .footer__top { flex-direction: column; gap: 40px; }
  .cart-sidebar { width: 100%; right: -100%; }
}
/* Rama ajoutes ceci dans ton fichier css(home.css)*/
/*Footer en mode sombre */
body.dark-mode .footer {
    background-color: #0f0f0f;
    color: #e0e0e0;
}
body.dark-mode .footer__tagline {
    color: #aaa;
}
body.dark-mode .footer__links a {
    color: #aaa;
}
body.dark-mode .footer__links a:hover {
    color: #6abf6a;
}
body.dark-mode .footer__copy {
    color: #777;
}
body.dark-mode .social-btn {
    color: #aaa;
}
body.dark-mode .social-btn:hover {
    color: #6abf6a;
}
body.dark-mode .cart-sidebar {
    background-color: #1e1e1e;
    color: #e0e0e0;
}
body.dark-mode .cart-header {
    border-bottom: 1px solid #333;
}
