/* ═══════════════════════════════════════════════════════════════════════════
   E-SHELLE AGRO — Feuille de styles principale
   Palette : Vert forêt africaine + Orange terre + Or maturité
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Identité E-Shelle Agro */
  --agro-primary:    #2D6A4F;
  --agro-secondary:  #40916C;
  --agro-accent:     #F4A261;
  --agro-earth:      #8B4513;
  --agro-gold:       #E9C46A;
  --agro-sky:        #023E8A;
  --agro-light:      #F8FAF5;
  --agro-dark:       #1B2E27;
  --agro-text:       #2C3E35;
  --agro-muted:      #6B7E74;

  /* Gradients */
  --gradient-agro:     linear-gradient(135deg, #2D6A4F 0%, #40916C 100%);
  --gradient-premium:  linear-gradient(135deg, #E9C46A 0%, #F4A261 100%);
  --gradient-hero:     linear-gradient(160deg, #1B2E27 0%, #2D6A4F 60%, #40916C 100%);
  --gradient-card:     linear-gradient(180deg, transparent 50%, rgba(27,46,39,0.9) 100%);
  --gradient-dark:     linear-gradient(135deg, #1B2E27 0%, #2D6A4F 100%);

  /* Typographie */
  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Segoe UI', sans-serif;

  /* Espacements */
  --agro-radius:    12px;
  --agro-radius-lg: 20px;
  --agro-shadow:    0 2px 12px rgba(45, 106, 79, 0.12);
  --agro-shadow-lg: 0 8px 32px rgba(45, 106, 79, 0.18);
}

/* ─── Base ──────────────────────────────────────────────────────────────── */

body {
  font-family: var(--font-body);
  color: var(--agro-text);
  background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--agro-dark);
}

/* ─── Utilitaires couleurs ──────────────────────────────────────────────── */

.bg-agro-light    { background-color: var(--agro-light) !important; }
.bg-agro-primary  { background-color: var(--agro-primary) !important; }
.bg-agro-secondary { background-color: var(--agro-secondary) !important; }
.bg-agro-accent   { background-color: var(--agro-accent) !important; }
.text-agro-primary { color: var(--agro-primary) !important; }
.text-agro-accent  { color: var(--agro-accent) !important; }
.text-agro-secondary { color: var(--agro-secondary) !important; }

/* ─── Boutons ───────────────────────────────────────────────────────────── */

.btn-agro {
  background: var(--gradient-agro);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  transition: all 0.25s ease;
  font-family: var(--font-heading);
}
.btn-agro:hover {
  background: linear-gradient(135deg, #245640 0%, #2D6A4F 100%);
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.35);
  transform: translateY(-1px);
}
.btn-agro:active { transform: translateY(0); }

.btn-agro-outline {
  color: var(--agro-primary);
  border: 2px solid var(--agro-primary);
  background: transparent;
  border-radius: 8px;
  font-weight: 600;
  padding: 0.45rem 1.25rem;
  transition: all 0.25s ease;
}
.btn-agro-outline:hover {
  background: var(--agro-primary);
  color: #fff;
}

.btn-agro-accent {
  background: var(--gradient-premium);
  color: #1B2E27 !important;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  transition: all 0.25s ease;
}
.btn-agro-accent:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 15px rgba(244, 162, 97, 0.4);
}

.btn-agro-gold {
  background: var(--gradient-premium);
  color: var(--agro-dark) !important;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  transition: all 0.25s ease;
}
.btn-agro-gold:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(233, 196, 106, 0.45);
}

/* ─── Navbar ────────────────────────────────────────────────────────────── */

.agro-navbar {
  background: #fff;
  border-bottom: 2px solid var(--agro-light);
  box-shadow: 0 2px 12px rgba(45, 106, 79, 0.08);
  padding: 0.6rem 0;
}

.agro-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}
.agro-brand-icon { font-size: 1.6rem; }
.agro-brand-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--agro-dark);
  letter-spacing: -0.5px;
}
.agro-brand-text strong { color: var(--agro-primary); }

.agro-nav-link {
  color: var(--agro-text) !important;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.4rem 0.8rem !important;
  border-radius: 6px;
  transition: all 0.2s;
}
.agro-nav-link:hover {
  color: var(--agro-primary) !important;
  background: var(--agro-light);
}

.agro-search-form { position: relative; max-width: 480px; }
.agro-search-form .form-control {
  border-color: #e0ebe5;
  background: var(--agro-light);
}
.agro-search-form .form-control:focus {
  border-color: var(--agro-primary);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
  background: #fff;
}

.agro-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e0ebe5;
  border-radius: 0 0 12px 12px;
  box-shadow: var(--agro-shadow-lg);
  z-index: 1050;
  max-height: 400px;
  overflow-y: auto;
}

.agro-dropdown {
  border: 1px solid #e0ebe5;
  border-radius: var(--agro-radius);
  box-shadow: var(--agro-shadow-lg);
}
.agro-dropdown .dropdown-item { font-size: 0.9rem; padding: 0.5rem 1rem; }
.agro-dropdown .dropdown-item:hover {
  background: var(--agro-light);
  color: var(--agro-primary);
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */

.agro-hero {
  background: var(--gradient-hero);
  padding: 4rem 0;
  overflow: hidden;
  position: relative;
}
.agro-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(64, 145, 108, 0.3) 0%, transparent 70%);
  pointer-events: none;
}
.min-vh-60 { min-height: 60vh; }

.agro-hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.agro-hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  max-width: 520px;
  line-height: 1.6;
}
.agro-hero-badge .badge {
  font-size: 0.85rem;
}
.agro-trust-badges { color: rgba(255,255,255,0.9); }
.agro-trust-item { font-size: 0.9rem; white-space: nowrap; }

/* Hero visual */
.agro-hero-visual {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.agro-hero-circle {
  width: 220px;
  height: 220px;
  background: rgba(255,255,255,0.1);
  border: 3px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}
.agro-hero-emoji { font-size: 6rem; }
.agro-hero-float {
  position: absolute;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 30px;
  padding: 0.5rem 1rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.agro-hero-float-1 { top: 20%; right: 0; }
.agro-hero-float-2 { top: 45%; left: 0; }
.agro-hero-float-3 { bottom: 25%; right: 5%; }
.agro-hero-float-4 { top: 10%; left: 20%; }

/* ─── Sections ──────────────────────────────────────────────────────────── */

.agro-section { padding: 4rem 0; }
.agro-section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--agro-dark);
  position: relative;
}
.agro-section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--gradient-agro);
  border-radius: 2px;
  margin-top: 6px;
}

/* ─── Catégories ─────────────────────────────────────────────────────────── */

.agro-categories-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--agro-secondary) transparent;
}

.agro-category-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  min-height: 110px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: var(--agro-radius);
  padding: 1rem 0.5rem;
  text-decoration: none;
  color: var(--agro-text);
  transition: all 0.25s ease;
  box-shadow: var(--agro-shadow);
  text-align: center;
}
.agro-category-card:hover {
  border-color: var(--agro-primary);
  transform: translateY(-4px);
  box-shadow: var(--agro-shadow-lg);
  color: var(--agro-primary);
}
.agro-category-icon { font-size: 2.2rem; }
.agro-category-nom  { font-weight: 600; font-size: 0.8rem; margin-top: 0.3rem; line-height: 1.2; }

/* ─── Cartes produits ────────────────────────────────────────────────────── */

.agro-product-card {
  background: #fff;
  border-radius: var(--agro-radius);
  border: 1px solid #e8f0eb;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--agro-shadow);
  display: flex;
  flex-direction: column;
}
.agro-product-card:hover {
  box-shadow: var(--agro-shadow-lg);
  transform: translateY(-4px);
  border-color: var(--agro-secondary);
}

.agro-product-img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.agro-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.agro-product-card:hover .agro-product-img { transform: scale(1.04); }
.agro-product-img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--gradient-agro);
  display: flex;
  align-items: center;
  justify-content: center;
}
.agro-product-emoji { font-size: 4rem; }

.agro-product-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.agro-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  line-height: 1.4;
}
.agro-badge.bio       { background: rgba(45,106,79,0.9); color: #fff; }
.agro-badge.equitable { background: rgba(244,162,97,0.9); color: #fff; }
.agro-badge.vedette   { background: rgba(233,196,106,0.9); color: #1B2E27; }

.agro-product-stock {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}
.stock-ok     { background: rgba(45,106,79,0.85); color: #fff; }
.stock-cmd    { background: rgba(244,162,97,0.85); color: #fff; }
.stock-autre  { background: rgba(2,62,138,0.85);  color: #fff; }

.agro-product-body {
  padding: 0.9rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.agro-product-categorie { font-size: 0.72rem; color: var(--agro-muted); margin-bottom: 0.2rem; }
.agro-product-nom       { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.2rem; line-height: 1.3; }
.agro-product-nom a     { color: var(--agro-dark); text-decoration: none; }
.agro-product-nom a:hover { color: var(--agro-primary); }
.agro-product-vendeur   { font-size: 0.8rem; color: var(--agro-secondary); font-weight: 500; }
.agro-product-vendeur a { color: inherit; }
.agro-product-location  { font-size: 0.78rem; }
.agro-product-moq       { font-size: 0.78rem; }

.agro-product-prix { margin-top: auto; }
.agro-prix-montant {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--agro-primary);
  font-family: var(--font-heading);
}
.agro-prix-unite { font-size: 0.78rem; color: var(--agro-muted); }
.agro-prix-nego  { font-size: 0.75rem; color: var(--agro-secondary); }
.agro-product-note { color: var(--agro-muted); }
.agro-product-incoterms { }

/* ─── Cartes acteurs ─────────────────────────────────────────────────────── */

.agro-actor-card {
  background: #fff;
  border-radius: var(--agro-radius);
  border: 1px solid #e8f0eb;
  padding: 1.2rem 0.8rem;
  transition: all 0.25s ease;
  box-shadow: var(--agro-shadow);
}
.agro-actor-card:hover {
  box-shadow: var(--agro-shadow-lg);
  transform: translateY(-3px);
  border-color: var(--agro-secondary);
}

.agro-actor-logo-wrap {
  position: relative;
  display: inline-block;
}
.agro-actor-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--agro-light);
}
.agro-actor-logo-placeholder {
  width: 70px;
  height: 70px;
  background: var(--gradient-agro);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  font-family: var(--font-heading);
  margin: 0 auto;
}
.agro-actor-logo-placeholder-sm {
  width: 50px;
  height: 50px;
  background: var(--gradient-agro);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  font-family: var(--font-heading);
}
.agro-actor-verified {
  position: absolute;
  bottom: 2px;
  right: 2px;
  color: #28a745;
  font-size: 1rem;
  background: #fff;
  border-radius: 50%;
  line-height: 1;
}
.agro-actor-nom   { font-weight: 700; font-size: 0.88rem; color: var(--agro-dark); }
.agro-actor-type  { font-size: 0.78rem; }
.agro-actor-pays  { font-size: 0.78rem; color: var(--agro-muted); }
.agro-actor-note  { color: var(--agro-muted); }

/* ─── Appels d'offre ─────────────────────────────────────────────────────── */

.agro-ao-card {
  display: block;
  background: #fff;
  border: 1px solid #e8f0eb;
  border-left: 4px solid var(--agro-primary);
  border-radius: var(--agro-radius);
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: var(--agro-text);
  transition: all 0.2s ease;
  box-shadow: var(--agro-shadow);
}
.agro-ao-card:hover {
  border-left-color: var(--agro-accent);
  box-shadow: var(--agro-shadow-lg);
  color: var(--agro-text);
}
.agro-ao-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

/* ─── Stats section ──────────────────────────────────────────────────────── */

.agro-stats-section {
  background: var(--gradient-agro);
  padding: 4rem 0;
}
.agro-stat-item { padding: 1rem; }
.agro-stat-nb {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  font-family: var(--font-heading);
  line-height: 1;
}
.agro-stat-label {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  margin-top: 0.4rem;
}

/* ─── CTA section ────────────────────────────────────────────────────────── */

.agro-cta-section {
  background: var(--gradient-dark);
  padding: 5rem 0;
}
.text-white-75 { color: rgba(255,255,255,0.75) !important; }

/* ─── Dashboard ──────────────────────────────────────────────────────────── */

.agro-dash-card {
  background: #fff;
  border: 1px solid #e8f0eb;
  border-radius: var(--agro-radius);
  padding: 1.5rem;
  box-shadow: var(--agro-shadow);
  transition: all 0.2s ease;
}
.agro-dash-card:hover { box-shadow: var(--agro-shadow-lg); }

.agro-kpi-card {
  background: var(--gradient-agro);
  color: #fff;
  border-radius: var(--agro-radius);
  padding: 1.5rem;
  text-align: center;
}
.agro-kpi-nb {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
  line-height: 1;
}
.agro-kpi-label { font-size: 0.85rem; opacity: 0.85; margin-top: 0.3rem; }

/* ─── Cartes génériques ──────────────────────────────────────────────────── */

.agro-card {
  border: 1px solid #e8f0eb;
  border-radius: var(--agro-radius);
  box-shadow: var(--agro-shadow);
}
.agro-card-header {
  background: var(--agro-light);
  border-bottom: 1px solid #e8f0eb;
  padding: 0.8rem 1.2rem;
  font-weight: 600;
  color: var(--agro-dark);
}

/* ─── Filtres sidebar ────────────────────────────────────────────────────── */

.agro-filter-sidebar {
  background: #fff;
  border: 1px solid #e8f0eb;
  border-radius: var(--agro-radius);
  padding: 1.2rem;
  box-shadow: var(--agro-shadow);
}
.agro-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #e8f0eb;
}
.agro-filter-group {
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #f0f5f2;
}
.agro-filter-group:last-of-type { border-bottom: none; }
.agro-filter-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--agro-dark);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Galerie produit ────────────────────────────────────────────────────── */

.agro-gallery-main {
  border-radius: var(--agro-radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--agro-light);
}
.agro-gallery-img-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.agro-gallery-placeholder {
  width: 100%;
  height: 100%;
  background: var(--gradient-agro);
  display: flex;
  align-items: center;
  justify-content: center;
}
.agro-gallery-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.agro-gallery-thumb.active,
.agro-gallery-thumb:hover { border-color: var(--agro-primary); }

/* ─── Price display ──────────────────────────────────────────────────────── */

.agro-price-display { line-height: 1.2; }
.agro-price-main {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--agro-primary);
  font-family: var(--font-heading);
}
.agro-price-per { font-size: 0.9rem; color: var(--agro-muted); }
.agro-product-info-card { border-color: var(--agro-primary); border-width: 2px; }

/* ─── Badges inline ──────────────────────────────────────────────────────── */

.badge-bio {
  background: rgba(45, 106, 79, 0.15) !important;
  color: var(--agro-primary) !important;
  font-weight: 600;
}
.badge-equitable {
  background: rgba(244, 162, 97, 0.15) !important;
  color: #c0652b !important;
  font-weight: 600;
}
.badge-plan-mini { font-size: 1rem; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.agro-footer { background: var(--gradient-dark); }
.agro-footer-brand { display: flex; align-items: center; }
.agro-footer-link {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 2;
  display: block;
  transition: color 0.2s;
}
.agro-footer-link:hover { color: var(--agro-accent); }
.agro-social-btn {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
}
.agro-social-btn:hover {
  background: var(--agro-accent);
  color: var(--agro-dark);
  border-color: var(--agro-accent);
}

/* ─── Pagination ─────────────────────────────────────────────────────────── */

.agro-pagination .page-link {
  color: var(--agro-primary);
  border-color: #e8f0eb;
}
.agro-pagination .page-item.active .page-link {
  background-color: var(--agro-primary);
  border-color: var(--agro-primary);
}

/* ─── Alerts ─────────────────────────────────────────────────────────────── */

.agro-alert {
  border-left: 4px solid var(--agro-primary);
  border-radius: var(--agro-radius);
}
.agro-alert.alert-success  { border-left-color: #28a745; }
.agro-alert.alert-warning  { border-left-color: var(--agro-accent); }
.agro-alert.alert-error,
.agro-alert.alert-danger   { border-left-color: #dc3545; }

/* ─── Empty states ───────────────────────────────────────────────────────── */

.agro-empty-state { text-align: center; padding: 3rem 1rem; }
.agro-empty-icon  { font-size: 4rem; display: block; }

/* ─── Premium badges ─────────────────────────────────────────────────────── */

.plan-silver  { background: linear-gradient(135deg, #C0C0C0, #E8E8E8); }
.plan-gold    { background: var(--gradient-premium); }
.plan-platinum { background: linear-gradient(135deg, #8B7FFF, #5B4FDD); color: #fff !important; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 576px) {
  .agro-hero { padding: 2.5rem 0; }
  .agro-section { padding: 2.5rem 0; }
  .agro-product-card { border-radius: 10px; }
  .agro-category-card { width: 100px; min-height: 90px; }
  .agro-category-icon { font-size: 1.8rem; }
  .agro-stats-section { padding: 2.5rem 0; }
  .agro-price-main { font-size: 1.4rem; }
}

@media (max-width: 768px) {
  .agro-product-body { padding: 0.7rem; }
  .agro-prix-montant { font-size: 0.95rem; }
}
