/* ==========================================================
   AL BADIAH FARM — Design futuriste
   ========================================================== */

:root {
  --bg: #0e1209;
  --bg-alt: #151a0f;
  --surface: rgba(255, 253, 240, 0.045);
  --surface-hover: rgba(255, 253, 240, 0.09);
  --border: rgba(255, 253, 240, 0.1);
  --text: #f3f1e4;
  --text-muted: #b4b099;
  --primary: #8fbc5a;
  --secondary: #e5b94e;
  --accent: #d98e4a;
  --gradient: linear-gradient(120deg, #8fbc5a, #e5b94e);
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; }

::selection { background: rgba(143, 188, 90, 0.35); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ==================== Loader ==================== */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-logo { text-align: center; }
.loader-mark {
  font-family: var(--font-display); font-size: 3rem; font-weight: 700;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block; margin-bottom: 20px;
  animation: loaderPulse 1.2s ease-in-out infinite;
}
@keyframes loaderPulse { 50% { opacity: 0.4; transform: scale(0.96); } }
.loader-bar {
  width: 180px; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,0.08); overflow: hidden; margin: 0 auto;
}
.loader-progress {
  height: 100%; width: 40%; border-radius: 3px;
  background: var(--gradient);
  animation: loaderSlide 1.1s var(--ease) infinite;
}
@keyframes loaderSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(480%); }
}

/* ==================== Background FX ==================== */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: 0.35;
  animation: orbFloat 18s ease-in-out infinite alternate;
}
.orb-1 { width: 550px; height: 550px; top: -12%; left: -8%; background: radial-gradient(circle, #7a9b3e, transparent 65%); }
.orb-2 { width: 480px; height: 480px; top: 32%; right: -12%; background: radial-gradient(circle, #d9a441, transparent 65%); animation-delay: -6s; }
.orb-3 { width: 420px; height: 420px; bottom: -12%; left: 28%; background: radial-gradient(circle, #b5713a, transparent 65%); animation-delay: -12s; }
@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(70px, 50px) scale(1.12); }
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, black 40%, transparent 100%);
}
.noise {
  position: absolute; inset: 0; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==================== Glass ==================== */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius);
}

/* ==================== Header ==================== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0;
  transition: all 0.5s var(--ease);
}
.header.scrolled {
  padding: 10px 0;
  background: rgba(14, 18, 9, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 32px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon { width: 40px; height: 40px; display: block; transition: transform 0.5s var(--ease); }
.logo:hover .logo-icon { transform: rotate(180deg) scale(1.08); }
.logo-text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  color: var(--text); letter-spacing: 0.02em;
}
.logo-text em {
  font-style: normal;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav-link {
  position: relative; color: var(--text-muted); text-decoration: none;
  font-size: 0.92rem; font-weight: 400; padding: 8px 14px; border-radius: 10px;
  transition: color 0.35s var(--ease), background 0.35s var(--ease);
}
.nav-link::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 2px; border-radius: 2px; background: var(--gradient);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; z-index: 102; }
.burger span {
  display: block; width: 24px; height: 2px; background: var(--text);
  margin: 5px 0; border-radius: 2px; transition: all 0.4s var(--ease);
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 101;
  background: rgba(14, 18, 9, 0.96); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  opacity: 0; visibility: hidden; transition: all 0.5s var(--ease);
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-link {
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 600;
  padding: 10px 24px; opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.3s;
}
.mobile-menu.open .mobile-link { opacity: 1; transform: translateY(0); }
.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.08s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.14s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.26s; }
.mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.32s; }
.mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.38s; }
.mobile-link:hover { color: var(--primary); }

/* ==================== Buttons ==================== */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 14px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.4s;
  overflow: hidden;
}
.btn-primary {
  background: var(--gradient); color: #1d2410;
  box-shadow: 0 8px 32px rgba(143, 188, 90, 0.25);
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease);
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 44px rgba(143, 188, 90, 0.4);
}
.btn-ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface-hover); transform: translateY(-3px);
  border-color: rgba(143, 188, 90, 0.4);
}
.btn-arrow { transition: transform 0.35s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(5px); }
.btn-lg { padding: 18px 38px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-header { margin-left: 8px; padding: 11px 22px; }

/* ==================== Hero ==================== */
.hero {
  min-height: 100vh;
  min-height: 100svh; /* hauteur réelle sur mobile (barre du navigateur) */
  display: flex; align-items: center;
  position: relative; padding: 140px 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background: url('../img/hero-field.jpg') center 65% / cover no-repeat;
  animation: heroZoom 22s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 18, 9, 0.82) 0%, rgba(14, 18, 9, 0.68) 45%, var(--bg) 100%),
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(14, 18, 9, 0.25), rgba(14, 18, 9, 0.7));
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}
.hero-inner { text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 20px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  font-size: 0.85rem; color: var(--text-muted);
  margin-bottom: 36px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(143, 188, 90, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(143, 188, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(143, 188, 90, 0); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 700; line-height: 1.08; letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span {
  display: inline-block;
  transform: translateY(110%);
  animation: lineUp 1s var(--ease) forwards;
}
.hero-title .line:nth-child(1) span { animation-delay: 0.55s; }
.hero-title .line:nth-child(2) span { animation-delay: 0.7s; }
.hero-title .line:nth-child(3) span { animation-delay: 0.85s; }
@keyframes lineUp { to { transform: translateY(0); } }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  max-width: 640px; margin: 0 auto 40px;
  font-size: 1.12rem; color: var(--text-muted);
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 72px; }

.hero-stats {
  display: inline-flex; align-items: center; gap: 40px;
  padding: 24px 48px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(18px);
}
.stat { text-align: center; }
.stat-num, .stat-plus {
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 700;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }
.stat-divider { width: 1px; height: 48px; background: var(--border); }

.scroll-hint { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); }
.scroll-mouse {
  width: 26px; height: 42px; border: 2px solid var(--text-muted);
  border-radius: 14px; display: flex; justify-content: center; padding-top: 7px;
  opacity: 0.55;
}
.scroll-wheel {
  width: 4px; height: 8px; border-radius: 4px; background: var(--primary);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ==================== Marquee ==================== */
.marquee {
  overflow: hidden; padding: 22px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex; align-items: center; gap: 44px;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: var(--text-muted); white-space: nowrap;
  transition: color 0.3s;
}
.marquee-track span:hover { color: var(--primary); }
.marquee-track i { color: var(--secondary); font-style: normal; opacity: 0.7; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==================== Sections ==================== */
.section { padding: 120px 0; position: relative; }
.section-alt {
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.018) 20%, rgba(255,255,255,0.018) 80%, transparent);
}
.section-head { text-align: center; max-width: 680px; margin: 0 auto 64px; }
.section-tag {
  display: inline-block; padding: 7px 18px; border-radius: 100px;
  background: rgba(143, 188, 90, 0.1); border: 1px solid rgba(143, 188, 90, 0.25);
  color: var(--primary); font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.section-text { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 18px; }

/* ==================== Reveal animations ==================== */
.reveal {
  opacity: 0; transform: translateY(44px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ==================== About ==================== */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.about-left .btn { margin-top: 12px; }
.about-right { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.about-right .value-card:nth-child(even) { transform: translateY(44px); }
.about-right .value-card.visible:nth-child(even) { transform: translateY(24px); }
.value-card {
  padding: 28px 24px;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease),
              border-color 0.4s, background 0.4s, box-shadow 0.4s;
}
.value-card:hover {
  border-color: rgba(143, 188, 90, 0.4);
  background: var(--surface-hover);
  box-shadow: 0 18px 48px rgba(0,0,0,0.35);
}
.value-icon { font-size: 1.9rem; margin-bottom: 14px; }
.value-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 8px; }
.value-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ==================== About photo ==================== */
.about-photo {
  position: relative; margin-top: 36px;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
}
.about-photo img {
  display: block; width: 100%; height: 260px; object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.about-photo:hover img { transform: scale(1.06); }
.about-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(14, 18, 9, 0.65));
  pointer-events: none;
}
.about-photo-badge {
  position: absolute; bottom: 16px; left: 16px; z-index: 1;
  padding: 12px 20px; display: flex; flex-direction: column;
  border-radius: 14px;
}
.about-photo-badge strong {
  font-family: var(--font-display); font-size: 1.4rem;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.about-photo-badge span { font-size: 0.8rem; color: var(--text-muted); }

/* ==================== Galerie ==================== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.gallery-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 3 / 4;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease),
              border-color 0.4s, box-shadow 0.4s;
}
.gallery-card:hover {
  border-color: rgba(143, 188, 90, 0.45);
  box-shadow: 0 24px 56px rgba(0,0,0,0.45);
}
.gallery-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.6s;
  filter: saturate(0.9);
}
.gallery-card:hover img { transform: scale(1.08); filter: saturate(1.1); }
.gallery-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(14, 18, 9, 0.88));
  pointer-events: none;
}
.gallery-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 3px;
  transform: translateY(8px);
  transition: transform 0.5s var(--ease);
}
.gallery-card:hover figcaption { transform: translateY(0); }
.gallery-card strong { font-family: var(--font-display); font-size: 1.05rem; }
.gallery-card figcaption span {
  font-size: 0.82rem; color: var(--text-muted);
  opacity: 0; transition: opacity 0.5s var(--ease) 0.08s;
}
.gallery-card:hover figcaption span { opacity: 1; }

/* ==================== Services ==================== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  position: relative; padding: 40px 32px; overflow: hidden;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease),
              border-color 0.4s, box-shadow 0.4s;
}
.service-card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(143, 188, 90, 0.12), transparent 45%);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover {
  border-color: rgba(143, 188, 90, 0.35);
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.service-num {
  position: absolute; top: 20px; right: 26px;
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 700;
  color: rgba(255,255,255,0.05);
  transition: color 0.4s;
}
.service-card:hover .service-num { color: rgba(143, 188, 90, 0.18); }
.service-icon {
  width: 60px; height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(143, 188, 90, 0.1); color: var(--primary);
  margin-bottom: 24px;
  transition: transform 0.5s var(--ease), background 0.4s;
}
.service-icon svg { width: 32px; height: 32px; }
.service-card:hover .service-icon { transform: scale(1.1) rotate(-5deg); background: rgba(143, 188, 90, 0.18); }
.service-card h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 14px; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 22px; }
.service-link {
  color: var(--primary); font-weight: 500; font-size: 0.9rem;
  display: inline-block; transition: transform 0.35s var(--ease);
}
.service-card:hover .service-link { transform: translateX(6px); }

/* ==================== Produits ==================== */
.products-tabs {
  display: flex; justify-content: center; gap: 12px; margin-bottom: 48px;
}
.tab {
  padding: 13px 28px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.4s var(--ease);
}
.tab:hover { color: var(--text); border-color: rgba(143, 188, 90, 0.35); }
.tab.active {
  background: var(--gradient); color: #1d2410; border-color: transparent;
  box-shadow: 0 8px 28px rgba(143, 188, 90, 0.3);
}
.products-panel {
  display: none;
  grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.products-panel.active { display: grid; animation: panelIn 0.7s var(--ease); }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
.product-card {
  padding: 30px 24px; text-align: center;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease),
              border-color 0.4s, box-shadow 0.4s, background 0.4s;
}
.product-card:hover {
  transform: translateY(-8px) !important;
  border-color: rgba(229, 185, 78, 0.35);
  background: var(--surface-hover);
  box-shadow: 0 24px 56px rgba(0,0,0,0.4);
}
.product-visual {
  width: 76px; height: 76px; margin: 0 auto 20px;
  border-radius: 22px; font-size: 2.1rem;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pc1) 18%, transparent), color-mix(in srgb, var(--pc2) 10%, transparent));
  border: 1px solid color-mix(in srgb, var(--pc1) 30%, transparent);
  transition: transform 0.5s var(--ease);
}
.product-card:hover .product-visual { transform: scale(1.12) rotate(6deg); }
.product-card h3 { font-family: var(--font-display); font-size: 1.08rem; margin-bottom: 10px; }
.product-card p { font-size: 0.87rem; color: var(--text-muted); margin-bottom: 18px; }
.product-badge {
  display: inline-block; padding: 5px 14px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 500;
  background: rgba(229, 185, 78, 0.1); border: 1px solid rgba(229, 185, 78, 0.25);
  color: var(--secondary);
}

/* ==================== Timeline ==================== */
.timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 0; }
.timeline-line {
  position: absolute; left: 27px; top: 10px; bottom: 10px; width: 2px;
  background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden;
}
.timeline-progress {
  width: 100%; height: 0%;
  background: var(--gradient);
  transition: height 0.2s linear;
}
.timeline-item {
  position: relative; display: flex; gap: 28px; padding-bottom: 36px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); border: 2px solid rgba(143, 188, 90, 0.4);
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  color: var(--primary); z-index: 1;
  box-shadow: 0 0 0 6px var(--bg);
  transition: all 0.5s var(--ease);
}
.timeline-item:hover .timeline-dot {
  background: var(--gradient); color: #1d2410; border-color: transparent;
  box-shadow: 0 0 0 6px var(--bg), 0 0 30px rgba(143, 188, 90, 0.5);
  transform: scale(1.08);
}
.timeline-card {
  flex: 1; padding: 26px 30px;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), border-color 0.4s, background 0.4s;
}
.timeline-item:hover .timeline-card {
  border-color: rgba(143, 188, 90, 0.3); background: var(--surface-hover);
}
.timeline-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 8px; }
.timeline-card p { color: var(--text-muted); font-size: 0.93rem; }

/* ==================== CTA ==================== */
.cta-section { padding: 60px 0 120px; }
.cta-box {
  position: relative; text-align: center;
  padding: 80px 48px; overflow: hidden;
  background: url('../img/cta-port.jpg') center / cover no-repeat;
}
.cta-box::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14, 18, 9, 0.88), rgba(14, 18, 9, 0.82));
}
.cta-glow {
  position: absolute; top: -60%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(143, 188, 90, 0.22), transparent 65%);
  animation: ctaGlow 5s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes ctaGlow { to { opacity: 0.5; transform: translateX(-50%) scale(1.15); } }
.cta-glow { z-index: 1; }
.cta-box h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700;
  margin-bottom: 18px; position: relative;
}
.cta-box p { color: var(--text-muted); max-width: 540px; margin: 0 auto 36px; position: relative; }
.cta-box .btn { position: relative; }

/* ==================== Contact ==================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; }
.contact-list { list-style: none; margin-top: 32px; display: flex; flex-direction: column; gap: 22px; }
.contact-list li { display: flex; align-items: center; gap: 18px; }
.contact-icon {
  width: 50px; height: 50px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 1.25rem;
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.contact-list li:hover .contact-icon { transform: scale(1.1); border-color: rgba(143, 188, 90, 0.4); }
.contact-list strong { display: block; font-weight: 600; font-size: 0.95rem; }
.contact-list a, .contact-list span:not(.contact-icon) { color: var(--text-muted); text-decoration: none; font-size: 0.92rem; transition: color 0.3s; }
.contact-list a:hover { color: var(--primary); }

.contact-form { padding: 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { position: relative; margin-bottom: 18px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 16px 18px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem;
  outline: none; resize: vertical;
  transition: border-color 0.35s, background 0.35s, box-shadow 0.35s;
}
.form-group select { appearance: none; color: var(--text-muted); cursor: pointer; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: rgba(143, 188, 90, 0.55);
  background: rgba(143, 188, 90, 0.04);
  box-shadow: 0 0 0 4px rgba(143, 188, 90, 0.1);
}
.form-group label {
  position: absolute; left: 18px; top: 16px;
  color: var(--text-muted); font-size: 0.95rem; pointer-events: none;
  transition: all 0.3s var(--ease);
}
.form-group input:focus + label, .form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label, .form-group textarea:not(:placeholder-shown) + label {
  top: -9px; left: 12px; font-size: 0.72rem; color: var(--primary);
  background: #151a0f; padding: 0 8px; border-radius: 4px;
}
.form-success {
  display: none; margin-top: 16px; text-align: center;
  color: var(--primary); font-weight: 500;
}
.form-success.show { display: block; animation: panelIn 0.5s var(--ease); }

/* ==================== Scroll progress ==================== */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 200; background: transparent; pointer-events: none;
}
#scrollProgressBar {
  height: 100%; width: 0%;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(229, 185, 78, 0.6);
  transition: width 0.1s linear;
}

/* ==================== Particles ==================== */
#particles {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }

/* ==================== Word rotator ==================== */
.rotator { display: inline-block; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), filter 0.45s; }
.rotator.swap-out { opacity: 0; transform: translateY(-24px) skewY(-3deg); filter: blur(6px); }
.rotator.swap-in { opacity: 0; transform: translateY(28px) skewY(3deg); filter: blur(6px); transition: none; }

/* ==================== Témoignages ==================== */
.testimonials { max-width: 780px; margin: 0 auto; }
.testimonial-viewport { overflow: hidden; border-radius: var(--radius); }
.testimonial-track {
  display: flex;
  transition: transform 0.8s var(--ease);
}
.testimonial {
  flex: 0 0 100%; text-align: center;
  padding: 48px 56px; margin: 0;
}
.testimonial-stars {
  color: var(--secondary); font-size: 1.2rem; letter-spacing: 6px;
  margin-bottom: 22px;
  text-shadow: 0 0 18px rgba(229, 185, 78, 0.5);
}
.testimonial blockquote {
  font-size: 1.15rem; line-height: 1.8; color: var(--text);
  margin-bottom: 26px; font-style: italic;
}
.testimonial figcaption strong {
  display: block; font-family: var(--font-display); font-size: 1.05rem;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.testimonial figcaption span { font-size: 0.85rem; color: var(--text-muted); }
.testimonial-dots {
  display: flex; justify-content: center; gap: 10px; margin-top: 28px;
}
.testimonial-dots button {
  width: 10px; height: 10px; border-radius: 100px; border: none; cursor: pointer;
  background: rgba(255, 253, 240, 0.18);
  transition: all 0.45s var(--ease);
}
.testimonial-dots button.active {
  width: 32px; background: var(--gradient);
  box-shadow: 0 0 14px rgba(229, 185, 78, 0.5);
}

/* ==================== Certifications ==================== */
.certs { margin-top: 72px; text-align: center; }
.certs-label {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--text-muted); margin-bottom: 26px;
}
.certs-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cert-pill {
  padding: 11px 22px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 500; font-size: 0.9rem;
  color: var(--text-muted);
  animation: certFloat 4s ease-in-out infinite;
  transition: all 0.4s var(--ease);
}
.cert-pill:nth-child(odd) { animation-delay: -2s; }
.cert-pill:nth-child(3n) { animation-delay: -1s; }
.cert-pill:hover {
  color: var(--text); border-color: rgba(143, 188, 90, 0.45);
  background: var(--surface-hover); transform: translateY(-4px) scale(1.04);
  animation-play-state: paused;
}
@keyframes certFloat { 50% { transform: translateY(-6px); } }

/* ==================== FAQ ==================== */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  overflow: hidden;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease),
              border-color 0.4s, background 0.4s;
}
.faq-item.open { border-color: rgba(143, 188, 90, 0.4); background: var(--surface-hover); }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 26px; background: none; border: none; cursor: pointer;
  color: var(--text); text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  transition: color 0.3s;
}
.faq-question:hover { color: var(--primary); }
.faq-icon {
  position: relative; flex-shrink: 0; width: 22px; height: 22px;
}
.faq-icon::before, .faq-icon::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 14px; height: 2px; border-radius: 2px;
  background: var(--primary);
  transform: translate(-50%, -50%);
  transition: transform 0.45s var(--ease);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.open .faq-icon::before { transform: translate(-50%, -50%) rotate(180deg); }
.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.55s var(--ease);
}
.faq-answer p {
  padding: 0 26px 24px; color: var(--text-muted); font-size: 0.95rem;
}

/* ==================== Back to top ==================== */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 90;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient); color: #1d2410; border: none; cursor: pointer;
  box-shadow: 0 10px 32px rgba(143, 188, 90, 0.35);
  opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.8);
  transition: all 0.5s var(--ease);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.back-to-top:hover { transform: translateY(-4px) scale(1.06); box-shadow: 0 16px 40px rgba(143, 188, 90, 0.5); }
.back-to-top svg { width: 22px; height: 22px; }

/* ==================== Reveal variants ==================== */
.reveal-left { opacity: 0; transform: translateX(-56px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.reveal-right { opacity: 0; transform: translateX(56px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.reveal-left.visible, .reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ==================== Sélecteur de langue ==================== */
.lang-switch {
  display: flex; gap: 3px; padding: 4px;
  border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.lang-btn {
  padding: 6px 12px; border-radius: 100px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 0.78rem;
  color: var(--text-muted);
  transition: all 0.4s var(--ease);
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  background: var(--gradient); color: #1d2410;
  box-shadow: 0 4px 14px rgba(143, 188, 90, 0.3);
}

/* ==================== Arabe & RTL ==================== */
html[lang="ar"] {
  --font-display: 'Tajawal', sans-serif;
  --font-body: 'Tajawal', sans-serif;
}
html[lang="ar"] body { font-weight: 400; }
html[lang="ar"] .hero-title { letter-spacing: 0; line-height: 1.25; }
html[lang="ar"] .section-title { letter-spacing: 0; line-height: 1.3; }
html[lang="ar"] .testimonial blockquote { font-style: normal; }

[dir="rtl"] .btn-arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .btn-arrow { transform: scaleX(-1) translateX(5px); }
[dir="rtl"] .service-card:hover .service-link { transform: translateX(-6px); }
[dir="rtl"] .footer-col a:hover { transform: translateX(-4px); }
[dir="rtl"] .timeline-line { left: auto; right: 27px; }
[dir="rtl"] .about-photo-badge { left: auto; right: 16px; }
[dir="rtl"] .service-num { right: auto; left: 26px; }
[dir="rtl"] .form-group label { left: auto; right: 18px; }
[dir="rtl"] .form-group input:focus + label,
[dir="rtl"] .form-group input:not(:placeholder-shown) + label,
[dir="rtl"] .form-group textarea:focus + label,
[dir="rtl"] .form-group textarea:not(:placeholder-shown) + label { left: auto; right: 12px; }
[dir="rtl"] .faq-question { text-align: right; }
[dir="rtl"] .nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .burger { margin-left: 0; }
@media (max-width: 920px) {
  [dir="rtl"] .burger { margin-left: 0; margin-right: auto; }
}
@media (max-width: 768px) {
  [dir="rtl"] .timeline-line { right: 23px; }
}
@media (max-width: 380px) {
  [dir="rtl"] .timeline-line { right: 20px; }
  .lang-btn { padding: 5px 9px; font-size: 0.72rem; }
}

/* ==================== Footer ==================== */
.footer { border-top: 1px solid var(--border); padding: 64px 0 0; background: rgba(255,255,255,0.015); }
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 18px; max-width: 300px; }
.footer-col h4 { font-family: var(--font-display); font-size: 1rem; margin-bottom: 18px; }
.footer-col a {
  display: block; color: var(--text-muted); text-decoration: none;
  font-size: 0.9rem; margin-bottom: 12px;
  transition: color 0.3s, transform 0.3s var(--ease);
}
.footer-col a:hover { color: var(--primary); transform: translateX(4px); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 24px; padding-bottom: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.85rem;
}

/* ==========================================================
   RESPONSIVE — couverture complète des tailles d'écran
   ========================================================== */

/* ---- Très grands écrans (2K / 4K) ---- */
@media (min-width: 1600px) {
  .container { max-width: 1360px; }
  html { font-size: 17px; }
}
@media (min-width: 2200px) {
  .container { max-width: 1600px; }
  html { font-size: 19px; }
}

/* ---- Laptops étroits / grandes tablettes paysage ---- */
@media (max-width: 1180px) {
  .products-panel { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
  .btn-header { display: none; }
  .about-photo img { height: 300px; }
}

/* ---- Tablettes / navigation burger ---- */
@media (max-width: 920px) {
  .nav { display: none; }
  .lang-switch { margin-left: auto; }
  [dir="rtl"] .lang-switch { margin-left: 0; margin-right: auto; }
  .burger { display: block; margin-left: 0; }
  .header-inner { gap: 16px; }
}

/* ---- Tablettes portrait & grands mobiles ---- */
@media (max-width: 768px) {
  html { scroll-padding-top: 72px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 44px; }
  .hero { padding: 120px 0 70px; }
  .hero-stats { flex-direction: column; gap: 20px; padding: 28px; width: 100%; max-width: 380px; }
  .stat-divider { width: 48px; height: 1px; }
  .hero-cta { margin-bottom: 56px; }
  .scroll-hint { display: none; }
  .products-panel { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .gallery-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .gallery-card { aspect-ratio: 4 / 3; }
  .gallery-card figcaption span { opacity: 1; }
  .gallery-card figcaption { transform: translateY(0); }
  .form-row { grid-template-columns: 1fr; }
  .about-right { grid-template-columns: 1fr; }
  .about-right .value-card:nth-child(even),
  .about-right .value-card.visible:nth-child(even) { transform: none; }
  .about-photo img { height: 230px; }
  .contact-form { padding: 28px 22px; }
  .cta-box { padding: 56px 24px; }
  .testimonial { padding: 36px 24px; }
  .testimonial blockquote { font-size: 1rem; }
  .back-to-top { bottom: 18px; right: 18px; width: 46px; height: 46px; }
  .timeline-line { left: 23px; }
  .timeline-dot { width: 48px; height: 48px; font-size: 1rem; }
  .timeline-item { gap: 20px; }
  .timeline-card { padding: 22px 22px; }
  .footer { padding-top: 48px; }
}

/* ---- Mobiles standards ---- */
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .section { padding: 64px 0; }
  .logo-text { font-size: 1.05rem; }
  .logo-icon { width: 34px; height: 34px; }
  .hero { padding: 110px 0 60px; }
  .hero-badge { font-size: 0.75rem; padding: 8px 14px; text-align: center; margin-bottom: 28px; }
  .hero-sub { font-size: 1rem; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-cta .btn { justify-content: center; }
  .marquee-track { gap: 28px; }
  .marquee-track span { font-size: 0.92rem; }
  .products-tabs { flex-wrap: wrap; gap: 10px; }
  .tab { padding: 11px 20px; font-size: 0.88rem; }
  .section-title { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .section-text { font-size: 0.97rem; }
  .value-card { padding: 22px 20px; }
  .service-card { padding: 32px 22px; }
  .faq-question { padding: 18px 18px; font-size: 0.94rem; }
  .faq-answer p { padding: 0 18px 20px; font-size: 0.9rem; }
  .cta-box { padding: 48px 18px; }
  .cta-box p { font-size: 0.95rem; }
  .btn-lg { padding: 16px 28px; font-size: 0.98rem; }
  .contact-list li { gap: 14px; }
  .contact-icon { width: 44px; height: 44px; font-size: 1.1rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .footer-brand { display: flex; flex-direction: column; align-items: center; }
  .footer-bottom { flex-direction: column; align-items: center; gap: 6px; text-align: center; }
  .certs-row { gap: 10px; }
  .cert-pill { padding: 9px 16px; font-size: 0.8rem; }
  .mobile-link { font-size: 1.5rem; }
}

/* ---- Petits mobiles (iPhone SE, etc.) ---- */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .hero-title { font-size: 2.2rem; }
  .hero-badge { font-size: 0.68rem; }
  .hero-stats { padding: 22px 16px; }
  .stat-num, .stat-plus { font-size: 2rem; }
  .btn { padding: 13px 22px; font-size: 0.9rem; }
  .testimonial { padding: 28px 16px; }
  .testimonial blockquote { font-size: 0.93rem; }
  .timeline-dot { width: 42px; height: 42px; box-shadow: 0 0 0 4px var(--bg); }
  .timeline-line { left: 20px; }
  .about-photo-badge { padding: 10px 14px; }
  .about-photo-badge strong { font-size: 1.15rem; }
}

/* ---- Téléphones en paysage (hauteur réduite) ---- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 110px 0 60px; }
  .scroll-hint { display: none; }
  .hero-stats { flex-direction: row; width: auto; }
  .mobile-menu { gap: 2px; }
  .mobile-link { font-size: 1.15rem; padding: 6px 20px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
