/* --- CHARTE GRAPHIQUE (Selon Cahier des charges) --- */
:root {
  /* --bg-color: #FDFBF7; /* Coquille d'oeuf / Crème */
  --bg-color: #e0d5be; /*  / Crème */
  --bg-color-secondary: #fdfbf7; /* Coquille d'oeuf */
  --primary-color: #768a76; /* Vert Sauge / Sapin adouci */
  --accent-color: #c06c58; /* Terracotta */
  --text-color: #36454f; /* Gris Charbon */
  --text-light: #fdfbf7;
  --font-title: "Lora", serif;
  --font-body: "Open Sans", sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
  font-family: var(--font-title);
  color: var(--accent-color);
}

.bg-theme-secondary {
  background-color: var(--bg-color-secondary) !important;
}

.text-terracotta {
  color: var(--accent-color) !important;
}

.list-terracotta {
  color: inherit;
  padding-left: 0; 
}
.list-terracotta li {
  margin-bottom: 0.35rem;
}
.list-terracotta li::marker {
  color: var(--accent-color);
  font-size: 1.05em;
}

.values-section .list-terracotta {
  padding-left: 1.15rem; 
}

.link-terracotta {
  color: var(--accent-color) !important;
  text-decoration: none;
}

.link-terracotta:hover {
  text-decoration: underline;
}

/* --- SERVICE CARDS (Wireframe Style) --- */
.service-card {
  border: 1px solid var(--primary-color);
  border-radius: 0.375rem; /* Standard Bootstrap card radius */
  padding: 20px 15px;
  text-align: center;
  height: 100%;
  transition: all 0.3s ease;
  background-color: var(--bg-color-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-card h5 {
  font-family: var(--font-title);
  color: var(--text-color);
  margin-bottom: 20px;
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.service-card .img-circle-wrapper {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--primary-color); /* Optionnel pour renforcer le style cercle */
}

.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.service-card:hover img {
  transform: scale(1.1);
}

.service-card p {
  font-size: 0.8rem;
  color: #6c757d;
  line-height: 1.4;
  margin-bottom: 0;
}

/* Text justification utility */

.text-justify {
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

.text-sage{
  color: var(--primary-color) !important;
} 

.link-sage {
  color: var(--primary-color) !important;
  text-decoration: none;
}

.link-sage:hover {
  text-decoration: underline;
}

.static-hero-image, .featured-image-container {
    width: 100%; 
}

@media (min-width: 992px) { 
    .static-hero-image, .featured-image-container {
        width: 70%; 
    }
}


/* --- HEADER & NAV --- */
.top-bar {
  background-color: var(--primary-color);
  color: white;
  font-size: 0.9rem;
  padding: 5px 0;
}

.navbar {
  background-color: var(--bg-color-secondary);
  padding-top: 1rem;
  padding-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.8rem;
  color: var(
    --primary-color
  ) !important; /* Le logo en vert ou terracotta selon préférence */
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1.3rem;
  }
  .navbar-brand img {
    height: 30px !important;
  }
}

.nav-link {
  color: var(--text-color) !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin: 0 10px;
}

.nav-link:hover {
  color: var(--accent-color) !important;
}

.icon-btn {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-left: 15px;
  transition: color 0.3s;
}
.icon-btn:hover {
  color: var(--accent-color);
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    background-color: var(--bg-color-secondary);
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000 !important;
    max-height: 80vh; 
    overflow-y: auto;
  }

  /* User dropdown specific fix for mobile */
  .navbar-nav div.dropdown .dropdown-menu {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    min-width: 200px;
    margin-top: 0.5rem;
  }
}

.link-all-products {
  color: var(--accent-color);
}

/* --- OMBRE CARTES --- */
.shadow-sm {
  transition: transform 0.2s, box-shadow 0.2s;
}
.shadow-sm:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* --- HERO SECTION --- */
.hero-section {
  position: relative;
  height: 60vh;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    url("https://fastly.picsum.photos/id/98/3264/2176.jpg?hmac=yRaOwMpmio9mwf43lbPEYI_5-WiPWoghJZyOKldQ43U");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.hero-content h1 {
  color: white;
  font-size: 3.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
}

.btn-custom-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 30px;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
}

.btn-custom-primary:hover {
  background-color: var(--accent-color);
  color: white;
}

.btn-custom-outline {
  background-color: transparent;
  border: 2px solid white;
  color: white;
  padding: 10px 30px;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-left: 10px;
  transition: all 0.3s;
}

.btn-custom-outline:hover {
  background-color: var(--bg-color-secondary);
  color: var(--text-color);
}

/* Sage Buttons */
.btn-sage {
  background-color: var(--primary-color);
  color: white;
  border: 1px solid var(--primary-color);
}

.btn-sage:hover {
  background-color: #5e6e5e; /* Darker sage */
  border-color: #5e6e5e;
  color: white;
}

.btn-outline-sage {
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  background-color: transparent;
}

.btn-outline-sage:hover {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.site-link {
  text-decoration: none;
  color: var(--accent-color);
}

/* --- SECTIONS --- */
.section-padding {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}
.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}
.section-title .divider {
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 0 auto;
}

/* --- CARDS (Products & Categories) --- */
.category-card {
  border: none;
  overflow: hidden;
  position: relative;
  margin-bottom: 30px;
  cursor: pointer;
}

.category-card img {
  transition: transform 0.5s ease;
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.category-card:hover img {
  transform: scale(1.05);
}

.category-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.85);
  padding: 15px;
  text-align: center;
}

.category-overlay h5 {
  margin: 0;
  color: var(--text-color);
  font-family: var(--font-title);
}

.product-card {
  background-color: var(--bg-color-secondary);
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
  height: 100%;
}

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

.card.shadow-sm {
  background-color: var(--bg-color-secondary) !important;
}

.card.shadow-sm .list-group-item {
  background-color: var(--bg-color-secondary) !important;
}

.product-card img {
  height: 250px;
  object-fit: cover;
}


.badge-eco {
  background-color: var(--primary-color);
  font-size: 0.7rem;
}
.badge-unique {
  background-color: var(--accent-color);
  font-size: 0.7rem;
}
.product-badges .badge {
  margin-right: 0.35rem;
  display: inline-block;
}



.alert-info {
  background-color: var(--bg-color-secondary);
  border-color: var(--bg-color-secondary);
}

/* --- FOOTER --- */
footer {
  background-color: var(--primary-color);
  color: white;
  padding-top: 60px;
  padding-bottom: 20px;
}

footer h5 {
  color: var(--bg-color); /* Crème pour les titres du footer */
  margin-bottom: 20px;
}

footer a {
  color: #eee;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
  transition: opacity 0.3s;
}

footer a:hover {
  opacity: 0.7;
  color: white;
}

.social-icons a {
  display: inline-block;
  margin-right: 15px;
  font-size: 1.2rem;
}

.newsletter-form .form-control {
  border-radius: 0;
  border: none;
}
.newsletter-form .btn {
  background-color: var(--accent-color);
  color: white;
  border-radius: 0;
  border: none;
}

/* --- SEARCH PANEL & OVERLAY --- */
#search-panel {
  background-color: var(--bg-color-secondary);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease-in-out, padding 0.4s ease;
  opacity: 0;
  position: fixed;
  top: 0; /* Sera calculé en JS */
  left: 0;
  width: 100%;
  z-index: 2000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#search-panel.open {
  max-height: 200px;
  opacity: 1;
  padding-top: 20px;
  padding-bottom: 20px;
}

.search-input-group {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-input-group input {
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  padding: 10px 20px;
  padding-right: 50px;
  background-color: transparent;
  color: var(--text-color);
}

.search-input-group input:focus {
  box-shadow: none;
  border-color: var(--accent-color);
  background-color: white;
}

.search-input-group button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--primary-color);
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.search-input-group button:hover {
  background: var(--accent-color);
}

#search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1090;
  display: none;
  opacity: 0;
  transition: opacity 0.3s;
}

#search-overlay.active {
  display: block;
  opacity: 1;
}

/* --- SPECIFIC ICONS --- */
.value-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* --- BOOTSTRAP OVERRIDES --- */
.btn-primary {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  color: var(--text-light) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #a85e4c !important; /* Darker terracotta */
  border-color: #a85e4c !important;
}

.border-primary {
  border-color: var(--accent-color) !important;
}

.btn-outline-primary {
  color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
}

.btn-outline-primary:hover {
  background-color: var(--accent-color) !important;
  color: var(--text-light) !important;
}

.text-primary {
  color: var(--accent-color) !important;
}

.list-group-item-action.active {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--accent-color) !important;
}

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

/* --- ANIMATIONS --- */
/* Animation pour le badge du panier */
@keyframes cartBadgeBounce {
  0% {
    transform: translate(-50%, -50%) scale(0);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}
.cart-badge-target {
  transform: translate(-50%, -50%);
}
.cart-badge-animated {
  animation: cartBadgeBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- STYLES SPÉCIFIQUES PAGE LIVRAISON --- */

/* Ajustement Navbar pour la démo */
.navbar {
  background-color: var(--bg-color-secondary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
  color: var(--primary-color) !important;
  font-weight: 600;
}

/* Container de la carte */
#map {
  height: 500px;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--primary-color);
  z-index: 1;
}

/* Liste des tarifs stylisée */
.zone-card {
  background-color: var(--bg-color-secondary);
  border-left: 5px solid transparent;
  margin-bottom: 15px;
  padding: 20px;
  border-radius: 4px;
  transition: transform 0.3s ease, background-color 0.3s;
  cursor: pointer;
}

.zone-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  background-color: white;
}

.zone-1 {
  border-color: var(--primary-color);
}
.zone-2 {
  border-color: var(--accent-color);
}
.zone-3 {
  border-color: var(--text-color);
}

.price-tag {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: bold;
  float: right;
}

.zone-title {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: block;
}

.city-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.city-badge {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* Légende personnalisée Leaflet */
.info.legend {
  background: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  line-height: 18px;
  color: #555;
}
.info.legend i {
  width: 18px;
  height: 18px;
  float: left;
  margin-right: 8px;
  opacity: 0.7;
  border-radius: 3px; /* Carré pour représenter des surfaces */
}

/* Loading overlay pour la carte */
.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  color: var(--primary-color);
  display: none;
}


.collapse-icon {
    transition: transform 0.3s ease;
}
[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}