/* ============================================================
   LAFT SARLU — UI Components
   ============================================================ */

/* ============================================================
   0. CORE COMPONENT DEFAULTS & MISSING CLASSES
   ============================================================ */
/* Generic Card Component */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(45, 122, 79, 0.3);
}

.card.bg-surface-alt {
  background: var(--color-surface-alt);
}

.card.bg-primary {
  background: var(--color-primary-dark);
  color: var(--color-white);
}

.card.border-primary {
  border-left: 4px solid var(--color-primary);
}

.card.border-rounded {
  border-radius: var(--radius-xl);
}

/* Button Variants */
.btn-outline-white {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-outline-white:hover {
  background: var(--color-white);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Form Inputs & Controls */
.form-input, 
select.form-input, 
textarea.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  box-sizing: border-box;
}

.form-input:focus, 
select.form-input:focus, 
textarea.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.15);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

/* Value Cards & Icon Boxes */
.value-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(45, 122, 79, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

/* Badges & Utility Helpers */
.badge-primary {
  background: rgba(45, 122, 79, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(45, 122, 79, 0.25);
}

ul.list-disc, ol.list-disc {
  list-style-type: disc;
  padding-left: 1.5rem;
}

ul.list-disc li {
  margin-bottom: 0.5rem;
}

.border-left-gold {
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
}

/* Spam protection honeypots */
.honeypot {
  display: none !important;
  visibility: hidden !important;
}

.spam-protection {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: rgba(45, 122, 79, 0.05);
  border: 1px dashed rgba(45, 122, 79, 0.3);
  border-radius: var(--radius-md, 8px);
}

/* ============================================================
   1. NAVIGATION BAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height, 80px);
  display: flex;
  align-items: center;
  z-index: var(--z-sticky, 1000);
  transition: all var(--transition-base);
  background: rgba(13, 31, 24, 0.95); /* Deep green background by default so header is 100% visible & readable on ALL pages */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.navbar.scrolled {
  background: rgba(13, 31, 24, 0.98);
  box-shadow: var(--shadow-md);
  height: 70px;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1440px;
  padding-left: clamp(1rem, 2.5vw, 2.5rem);
  padding-right: clamp(1rem, 2.5vw, 2.5rem);
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: var(--space-4);
  text-decoration: none;
}

.nav-logo img {
  height: 46px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.navbar.scrolled .nav-logo img {
  height: 40px;
}

.nav-links {
  display: flex;
  gap: clamp(0.35rem, 0.9vw, 1.1rem);
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.nav-link {
  font-size: clamp(0.72rem, 0.8vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.4rem 0;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-links .btn-gold {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.5rem 1.1rem;
  font-size: 0.78rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.nav-link:hover {
  color: var(--color-white);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-white);
}

.nav-link i {
  font-size: 0.75em;
  margin-left: 4px;
  transition: transform var(--transition-base);
}

/* Dropdown Menu */
.nav-item-dropdown {
  position: relative;
  flex-shrink: 0;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-green-950);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: var(--space-2) 0;
  min-width: 260px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  display: flex;
  flex-direction: column;
}

.nav-item-dropdown:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item-dropdown:hover .nav-link i {
  transform: rotate(180deg);
}

.nav-dropdown-item,
.nav-dropdown-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  color: rgba(255, 255, 255, 0.85);
  text-transform: none;
  font-weight: var(--font-weight-regular);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.active,
.nav-dropdown-link:hover,
.nav-dropdown-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-accent);
  padding-left: calc(var(--space-4) + 6px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background-color: var(--color-white);
  transition: all var(--transition-base);
}

/* Mobile Nav Open */
.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -7px);
}

@media (max-width: 1320px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--color-green-950);
    flex-direction: column;
    justify-content: flex-start;
    padding: calc(var(--nav-height) + 1.5rem) var(--space-6) var(--space-8);
    gap: var(--space-4);
    transition: right var(--transition-slow);
    box-shadow: var(--shadow-2xl);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1000;
  }
  .nav-links.open {
    right: 0;
  }
  
  .nav-item-dropdown {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 var(--space-4);
    display: none;
    min-width: 100%;
  }

  .nav-dropdown.active {
    display: flex;
    margin-top: var(--space-2);
  }
  
  .nav-item-dropdown:hover .nav-dropdown {
    /* Prevent hover open on mobile, use click instead */
    display: none;
  }
  .nav-item-dropdown:hover .nav-dropdown.active {
    display: flex;
  }
  
  .nav-item-dropdown:hover .nav-link i {
    transform: none; /* Let JS handle rotation on mobile */
  }
  
  .nav-link.dropdown-open i {
    transform: rotate(180deg);
  }
}

/* ============================================================
   Sommaire Flottant (Company Page)
   ============================================================ */
.company-layout {
  display: flex;
  gap: var(--space-8);
  position: relative;
  align-items: flex-start;
}

.company-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  min-width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.company-sidebar-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-dark);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-accent);
}

.company-nav-link {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
  padding: var(--space-2) 0;
  display: block;
  border-left: 2px solid transparent;
  padding-left: var(--space-2);
  text-decoration: none;
}

.company-nav-link:hover,
.company-nav-link.active {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  background: rgba(45, 122, 79, 0.05); /* very light primary */
}

.company-content {
  flex-grow: 1;
}

.company-mobile-nav {
  display: none;
}

@media (max-width: 992px) {
  .company-layout {
    flex-direction: column;
  }
  .company-sidebar {
    display: none;
  }
  .company-mobile-nav {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-sm);
    width: 100%;
  }
  .company-mobile-nav .company-nav-link {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    background: var(--color-surface-alt);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    white-space: nowrap;
    border-left: none;
  }
  .company-mobile-nav .company-nav-link.active {
    background: var(--color-primary);
    color: var(--color-white);
  }
}

/* ============================================================
   Widget Chatbot IA (Welcome Assistant)
   ============================================================ */
.chatbot-widget {
  position: fixed;
  bottom: 90px;
  right: var(--space-4);
  z-index: var(--z-modal, 9999);
  font-family: var(--font-body);
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  background: var(--color-primary-dark);
}

.chatbot-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 360px;
  max-width: 92vw;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
}

.chatbot-window.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.chatbot-header {
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h4 {
  margin: 0;
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
}

.chatbot-close {
  background: transparent;
  border: none;
  color: var(--color-white);
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.8;
}

.chatbot-close:hover {
  opacity: 1;
}

.chatbot-body {
  padding: var(--space-4);
  height: 380px;
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--color-surface-alt);
}

.chatbot-message {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  max-width: 90%;
  line-height: 1.5;
  word-break: break-word;
}

.chatbot-message.bot {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  align-self: flex-start;
  border-bottom-left-radius: 0;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.chatbot-message.bot strong {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.chatbot-message.bot a {
  color: var(--color-primary);
  text-decoration: underline;
}

.chatbot-message.user {
  background: var(--color-primary);
  color: var(--color-white);
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chatbot-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.chat-btn-option {
  background: var(--color-white);
  border: 1px solid var(--color-primary-light);
  color: var(--color-primary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.chat-btn-option:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.chatbot-footer-form {
  display: flex;
  padding: var(--space-2);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  gap: var(--space-2);
}

.chatbot-input {
  flex-grow: 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: var(--text-xs);
  outline: none;
  font-family: inherit;
}

.chatbot-input:focus {
  border-color: var(--color-primary);
}

.chatbot-send-btn {
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font-size: var(--text-xs);
  transition: background var(--transition-fast);
}

.chatbot-send-btn:hover {
  background: var(--color-primary-dark);
}

/* Animation de frappe (3 points clignotants) */
.chatbot-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px !important;
  min-height: 0 !important;
}

.chatbot-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  display: block;
  animation: typing-dot 1.2s infinite ease-in-out;
  opacity: 0.4;
}

.chatbot-typing span:nth-child(1) { animation-delay: 0s; }
.chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot {
  0%, 80%, 100% { transform: scale(1); opacity: 0.4; }
  40% { transform: scale(1.3); opacity: 1; }
}

@media (max-width: 768px) {
  .chatbot-widget {
    bottom: 90px;
    right: 15px;
  }
  .chatbot-window {
    width: calc(100vw - 30px);
    max-width: 330px;
    right: 0;
    bottom: 70px;
  }
}

/* ============================================================
   2. HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  color: var(--color-white);
  background-color: var(--color-green-950);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 31, 24, 0.9) 0%, rgba(13, 31, 24, 0.4) 50%, rgba(13, 31, 24, 0.8) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding-top: calc(var(--nav-height) + 5rem); /* Augmente l'espace entre le logo/barre et le contenu de l'accueil */
}

.hero-logo-box {
  margin-bottom: var(--space-4);
  opacity: 0.9;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
  color: var(--color-white);
}

.hero-subtitle {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-6);
  display: inline-block;
  position: relative;
}

.hero-text {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-10);
  max-width: 700px;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================================
   3. VALUE CARDS
   ============================================================ */
.value-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.value-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(45, 122, 79, 0.1);
}

.value-card:hover::before {
  transform: scaleX(1);
}

.value-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--color-green-50);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: var(--space-6);
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.value-icon i,
.value-icon svg {
  font-size: 1.5rem;
  line-height: 1;
}

.value-card:hover .value-icon {
  background: var(--color-primary);
  color: var(--color-white);
  transform: scale(1.1) rotate(-4deg);
}

.value-title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
}

.value-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

/* ============================================================
   4. SECTOR & ACTIVITY CARDS (GRID ILLUSTRÉE)
   ============================================================ */
.sector-card {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  height: 350px;
  transition: all var(--transition-slow);
}

.sector-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.sector-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 31, 24, 0.95) 0%, rgba(13, 31, 24, 0.4) 60%, rgba(13, 31, 24, 0.1) 100%);
  z-index: 2;
  transition: opacity var(--transition-base);
}

.sector-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--space-8);
  z-index: 3;
  color: var(--color-white);
}

.sector-num {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-accent);
  opacity: 0.5;
  margin-bottom: var(--space-2);
  display: block;
}

.sector-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
}

.sector-desc {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), opacity var(--transition-slow);
  opacity: 0;
  line-height: var(--leading-normal);
}

.sector-card:hover {
  box-shadow: var(--shadow-xl);
}

.sector-card:hover .sector-img {
  transform: scale(1.1);
}

.sector-card:hover .sector-desc {
  max-height: 120px;
  opacity: 1;
}

/* ============================================================
   5. PRODUCT CARDS
   ============================================================ */
.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-spring);
}

.product-img-box {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: var(--color-neutral-50);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.product-slide.active {
  opacity: 1;
}

.product-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2;
}

.product-content {
  padding: var(--space-6);
}

.product-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
}

.product-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-6);
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
}

.product-price {
  font-size: var(--text-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-card:hover .product-img {
  transform: scale(1.08);
}

/* ============================================================
   6. TESTIMONIAL CARDS
   ============================================================ */
.testimonial-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  position: relative;
  transition: all var(--transition-base);
}

.testimonial-rating {
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.testimonial-text {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  font-style: italic;
  margin-bottom: var(--space-6);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.testimonial-name {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
}

.testimonial-role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(45, 122, 79, 0.15);
}

/* ============================================================
   7. STATS & WHY US SECTION
   ============================================================ */
.stat-item {
  text-align: center;
  padding: var(--space-6);
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-6xl);
  font-weight: var(--font-weight-black);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

/* ============================================================
   8. FAQ ACCORDION
   ============================================================ */
.faq-item {
  border-bottom: 1px solid var(--color-border-strong);
  margin-bottom: var(--space-2);
}

.faq-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-6) 0;
  text-align: left;
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  transition: color var(--transition-fast);
}

.faq-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--color-neutral-800);
  transition: transform var(--transition-base);
}

.faq-icon::before {
  width: 12px;
  height: 2px;
}

.faq-icon::after {
  width: 2px;
  height: 12px;
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base) ease-out, padding var(--transition-base) ease-out;
  padding-bottom: 0;
}

.faq-body p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* Active State */
.faq-item.active .faq-header {
  color: var(--color-primary);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-item.active .faq-body {
  max-height: 300px;
  padding-bottom: var(--space-6);
}

/* ============================================================
   9. GALLERY & MASONRY
   ============================================================ */
.gallery-grid {
  columns: 3 280px;
  column-gap: var(--space-6);
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: var(--space-6);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--color-neutral-50);
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 31, 24, 0.7);
  opacity: 0;
  transition: opacity var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: var(--space-6);
  text-align: center;
}

.gallery-item-title {
  color: var(--color-white);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-1);
}

.gallery-item-cat {
  color: var(--color-accent);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  color: var(--color-white);
  font-size: var(--text-3xl);
  cursor: pointer;
  background: none;
  border: none;
}

/* ============================================================
   10. CONTACT FORM
   ============================================================ */
.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: var(--space-6);
  position: relative;
}

.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  color: var(--color-text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background: var(--color-surface-alt);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-white);
  box-shadow: 0 0 0 4px rgba(45, 122, 79, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-error-msg {
  color: #dc2626;
  font-size: var(--text-xs);
  margin-top: var(--space-1);
  display: none;
}

.form-control.invalid {
  border-color: #dc2626;
  background: #fef2f2;
}

.form-control.invalid:focus {
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.form-success-box {
  background: #f0fdf4;
  border: 1px solid #b3f5c4;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  color: #15803d;
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-6);
  display: none;
}

/* ============================================================
   11. WHATSAPP FLOATING BUTTON
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: var(--color-white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: var(--z-overlay);
  transition: transform var(--transition-spring);
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* Pulse animation */
.whatsapp-float::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ============================================================
   12. FOOTER
   ============================================================ */
.footer {
  background: var(--color-green-950);
  color: var(--color-white);
  padding-top: var(--space-20);
  padding-bottom: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: var(--space-12);
  margin-bottom: var(--space-16);
}

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  /* ---- Empêcher tout débordement horizontal ---- */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }
  body, html {
    overflow-x: hidden;
  }

  /* ---- Coupure des textes longs ---- */
  h1, h2, h3, h4, h5, h6, p, a, li, span, div {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  /* ---- Hero section ---- */
  .hero-content {
    padding-top: calc(var(--nav-height) + 2rem);
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
  }
  .hero-title {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
    line-height: 1.2;
  }
  .hero-subtitle {
    font-size: 1rem;
    letter-spacing: 0.05em;
  }
  .hero-text {
    font-size: 0.9rem;
    margin-bottom: var(--space-6);
    max-width: 100%;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: var(--space-2);
  }
  .hero-actions .btn {
    width: 100%;
    text-align: center;
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
    white-space: normal;
  }

  /* ---- Sector cards ---- */
  .sector-card {
    height: 280px;
  }
  .sector-content {
    padding: var(--space-4);
  }
  .sector-title {
    font-size: var(--text-lg);
  }
  .sector-desc {
    font-size: var(--text-xs);
  }

  /* ---- Section titles ---- */
  .section-title {
    font-size: clamp(1.4rem, 6vw, 2rem);
  }
  .section-subtitle {
    font-size: 0.9rem;
  }

  /* ---- Footer newsletter ---- */
  .footer-newsletter-form {
    flex-direction: column;
    gap: var(--space-2);
  }
  .footer-newsletter-input {
    width: 100%;
  }
}


.footer-brand-logo {
  height: 60px;
  width: auto;
  margin-bottom: var(--space-6);
}

.footer-brand-desc {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
  max-width: 320px;
}

.footer-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--space-6);
  position: relative;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 30px;
  height: 2px;
  background: var(--color-accent);
}

.footer-links {
  display: flex;
  flex-col: column;
  gap: var(--space-3);
}

.footer-link {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-white);
  padding-left: var(--space-1);
}

.footer-contact-item {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-4);
}

.footer-contact-icon {
  color: var(--color-accent);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.footer-newsletter-text {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-4);
}

.footer-newsletter-form {
  display: flex;
  gap: var(--space-2);
}

.footer-newsletter-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-size: var(--text-sm);
}

.footer-newsletter-input:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-6);
}

/* ============================================================
   13. PRELOADER & SCREEN LOADER
   ============================================================ */
.loader-screen {
  position: fixed;
  inset: 0;
  background: var(--color-green-950);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: var(--z-loader);
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.loader-logo {
  height: 80px;
  width: auto;
  margin-bottom: var(--space-6);
  animation: logo-fade 1.5s infinite alternate;
}

.loader-bar {
  width: 150px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.loader-progress {
  width: 0%;
  height: 100%;
  background: var(--color-accent);
  transition: width 1s ease-out;
}

@keyframes logo-fade {
  0% { opacity: 0.4; transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1.02); }
}

/* ============================================================
   GALLERY VIDEO-LIKE ITEM — Effet Ken Burns + Icône Play
   ============================================================ */
@keyframes kenBurns {
  0%   { transform: scale(1)    translateX(0)     translateY(0); }
  25%  { transform: scale(1.08) translateX(-1%)   translateY(-1%); }
  50%  { transform: scale(1.12) translateX(1%)    translateY(1%); }
  75%  { transform: scale(1.06) translateX(-0.5%) translateY(0.5%); }
  100% { transform: scale(1)    translateX(0)     translateY(0); }
}

@keyframes pulsPlay {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.15); }
}

.gallery-item--video {
  min-height: 220px;
}

.gallery-item--video img {
  animation: kenBurns 8s ease-in-out infinite;
  transform-origin: center center;
  will-change: transform;
}

.gallery-item--video:hover img {
  animation-play-state: paused;
  transform: scale(1.05);
}

/* Icône play toujours visible sur ces items */
.gallery-item--video .gallery-item-overlay {
  opacity: 1;
  background: rgba(13, 31, 24, 0.45);
}

.gallery-item--video:hover .gallery-item-overlay {
  background: rgba(13, 31, 24, 0.75);
}

/* Cercle play centré */
.gallery-item--video .play-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  animation: pulsPlay 2s ease-in-out infinite;
  flex-shrink: 0;
}

.gallery-item--video .play-icon svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  margin-left: 4px; /* Décalage visuel pour centrer le triangle */
}

/* Badge VIDEO coin supérieur gauche */
.gallery-item--video .video-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: rgba(201, 168, 76, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  z-index: 10;
  backdrop-filter: blur(4px);
}

/* ────────────────────────────────────────────────────────────
   TOAST NOTIFICATION SYSTEM
   ──────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--color-surface);
  color: var(--color-text);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--color-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  border-left-color: var(--color-primary);
}

.toast-error {
  border-left-color: #ef4444;
}

.toast-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
}

.toast-message {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
}

/* ============================================================
   Recherche Globale du Site Public (Site Search)
   ============================================================ */
.site-search-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 0.75rem;
}

#site-search-input {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: var(--radius-full, 20px);
  padding: 0.4rem 0.85rem 0.4rem 2.2rem;
  font-size: 0.85rem;
  color: #ffffff !important;
  caret-color: #c9a84c;
  width: 180px;
  transition: all 0.25s ease;
}

#site-search-input::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
  opacity: 1;
}

#site-search-input:focus {
  outline: none;
  width: 240px;
  border-color: #c9a84c;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

#site-search-input:focus::placeholder {
  color: rgba(255, 255, 255, 0.35) !important;
}

.site-search-icon {
  position: absolute;
  left: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-muted, #8e9bb0);
  pointer-events: none;
}

#site-search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-height: 400px;
  overflow-y: auto;
  background: #0d1117;
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  z-index: 99999;
  display: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease;
  cursor: pointer;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(201, 168, 76, 0.12);
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #c9a84c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.search-result-sub {
  font-size: 11.5px;
  color: #7e8fa5;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-badge {
  flex-shrink: 0;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(201, 168, 76, 0.15);
  color: #c9a84c;
  border: 1px solid rgba(201, 168, 76, 0.3);
  padding: 2px 7px;
  border-radius: 999px;
}

.search-result-empty {
  padding: 16px;
  font-size: 13px;
  color: #7e8fa5;
  text-align: center;
}

.search-result-item i {
  color: #c9a84c;
  font-size: 1rem;
}

.search-result-title {
  font-weight: 700;
  font-size: 0.85rem;
}

.search-result-sub {
  font-size: 0.72rem;
  color: #8e9bb0;
}

.search-no-results {
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #8e9bb0;
}


