/* Mise en page page d'accueil */
body.page-home .container {
  max-width: 1200px;
  margin-inline: auto;
}

body.page-home .h2.section-title {
  font-size: clamp(2rem, 4.5vw, 3.1rem) !important;
  text-align: center;
}

body.page-home .banner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

body.page-home .banner-col {
  flex: 1 1 280px;
  max-width: 360px;
}

body.page-home .deco-title,
body.page-home .deco-img {
  display: none !important;
}

@media (max-width: 991px) {
  body.page-home .features {
    margin-block-start: 0 !important;
    padding-block-start: 40px !important;
  }
}

body.page-home .section-title.reveal-up,
body.page-home .section-subtitle.reveal-up {
  opacity: 1 !important;
  transform: none !important;
}

body.page-home .hero {
  background-attachment: scroll !important;
}

/* ===== Modern Hero & Layout ===== */
:root {
  --hero-height: 78vh;
  --primary: #2e7d32;
  --primary-2: #4caf50;
  --accent: #1565c0;
  --muted: #6b7280;
  --glass: rgba(255,255,255,0.8);
}

.hero--modern {
  position: relative;
  color: #fff;
  overflow: hidden;
  min-height: var(--hero-height);
  display: flex;
  align-items: center;
}
.hero--modern .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  filter: saturate(1.05) contrast(0.95) brightness(0.55);
  transform: scale(1.02);
  transition: transform 0.6s ease;
}
.hero--modern:hover .hero-bg { transform: scale(1.04); }
.hero--modern::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,50,19,0.45) 0%, rgba(14,50,19,0.25) 40%, rgba(0,0,0,0.18) 100%);
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 420px; gap: 36px; align-items: center; padding: 60px 0; }
.hero-left { padding-right: 10px; }
.hero-heading { font-size: clamp(2rem, 4.5vw, 3.8rem); line-height: 1.02; margin: 12px 0 18px; font-weight: 800; }
.hero-heading strong { display: block; font-weight: 900; }
.hero-heading span { display: block; font-size: 0.9em; font-weight: 600; color: rgba(255,255,255,0.95); margin-top: 8px; }
.hero-text { font-size: 1.05rem; color: rgba(255,255,255,0.9); max-width: 60ch; margin-bottom: 20px; }
.hero-right img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.35); border: 4px solid rgba(255,255,255,0.06); }

.hero-ctas { display:flex; gap:12px; align-items:center; }
.btn { display:inline-flex; align-items:center; gap:8px; padding:12px 18px; border-radius:12px; font-weight:700; text-decoration:none; cursor: pointer; border: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; box-shadow: 0 8px 30px rgba(46,125,50,0.25); }
.btn-outline { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.12); }
.btn-dark { background: linear-gradient(135deg, #1a2e1a, #2e4a2e); color: #fff; }
.btn:hover { transform: translateY(-3px); transition: transform 0.18s ease, box-shadow 0.18s ease; box-shadow: 0 10px 20px rgba(26,46,26,0.3); }
.btn:focus { outline: 3px solid rgba(76,175,80,0.25); outline-offset: 3px; }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 0; }
  .hero-right { display: block; margin-top: 18px; }
  .hero-right img { height: 320px; }
}

/* Masquer la petite image décorative dans le hero (utile si non souhaitée) */
.hero .section-subtitle img { display: none !important; }

/* Vidéo CTA responsive */
.cta-banner .cta-video {
  max-width: 520px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  display: block;
}

/* ===== About Section Clean ===== */
.about-images-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-bottom: 40px;
}
.about-images-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-img-1, .about-img-2, .about-img-3, .about-img-4 {
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}
.about-img-1:hover, .about-img-2:hover, .about-img-3:hover, .about-img-4:hover {
  transform: translateY(-4px);
}

.about-contact-box {
  background: linear-gradient(135deg, #f4f9f8 0%, #e8f5e9 100%);
  border-left: 6px solid #2e7d32;
  padding: 35px;
  margin: 40px 0;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  position: relative;
}
.about-contact-box h3 {
  color: #2e7d32;
  margin-top: 0;
  font-size: 1.8rem;
  margin-bottom: 15px;
}
.about-contact-box p {
  color: #444;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}
.about-contact-info {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: #2e7d32;
  font-weight: 600;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.6);
  padding: 15px 20px;
  border-radius: 10px;
}
.about-contact-info span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Tabs Section ===== */
.tab-nav {
  list-style: none;
  display: flex;
  gap: 15px;
  padding: 0;
  margin: 0 !important;
}
.tab-btn {
  background: transparent;
  color: #333;
  border: 2px solid #ddd;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.tab-btn:hover {
  color: #2e7d32;
  border-color: #2e7d32;
}
.tab-btn.active {
  background: #2e7d32;
  color: #fff;
  border-color: #2e7d32;
}

.tab-content {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid rgba(0,0,0,0.03);
}

.about-tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}
.about-tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tab-text {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 30px;
  text-align: justify;
  line-height: 1.7;
}
.tab-text strong {
  color: #2e7d32;
  font-weight: 800;
}

.tab-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 15px;
  list-style: none;
  padding: 0;
  margin-bottom: 40px;
}
.tab-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f9fbf9;
  padding: 15px 20px;
  border-radius: 12px;
  transition: all 0.3s ease;
}
.tab-list li:hover {
  background: #e8f5e9;
  transform: translateY(-2px);
}
.tab-item-icon {
  color: #4caf50;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.tab-list p {
  margin: 0;
  color: #333;
  font-weight: 600;
  font-size: 0.95rem;
}

.about-cta {
  text-align: center;
  margin-top: 30px;
}

@media (max-width: 640px) {
  .about-images-grid {
    grid-template-columns: 1fr;
  }
  .tab-nav {
    flex-direction: column;
  }
  .tab-content {
    padding: 30px 20px;
  }
}

/* ===== Features cards modernisées ===== */
.features-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; padding: 0; margin: 0; }
.features-item { list-style: none; background: linear-gradient(135deg, #fff 0%, #f9fdf9 100%); padding: 32px; border-radius: 16px; display:flex; gap:20px; align-items:flex-start; box-shadow: 0 10px 40px rgba(76,175,80,0.08); transition: all 0.3s ease; border: 1px solid rgba(76,175,80,0.1); }
.features-item .item-icon { width:64px;height:64px;border-radius:12px;background:linear-gradient(135deg,#4caf50,#2e7d32);display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.8rem;flex-shrink: 0; box-shadow: 0 8px 24px rgba(76,175,80,0.2); }
.features-item .item-title{margin:0 0 8px 0;font-size:1.25rem;font-weight:800;color:#1a1a1a;letter-spacing:0.3px}
.features-item .item-text{margin:0;color:#666;font-size:1rem;line-height:1.65;text-align:justify;hyphens:auto}
.features-item:hover { transform: translateY(-8px); box-shadow: 0 28px 56px rgba(76,175,80,0.15); border-color: rgba(76,175,80,0.3); }
.features-item:hover .item-icon { transform: scale(1.08) translateY(-4px); box-shadow: 0 12px 32px rgba(46,125,50,0.25); }

/* Messages newsletter (section verte) — pas le footer contact */
body.page-home #newsletterMessage,
body.page-home .home-alert-error {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.95);
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 600;
}

/* Footer contact : texte simple comme sur les autres pages */
body.page-home #contactResult:empty {
  display: none;
  margin: 0;
  padding: 0;
}

body.page-home .flash-msg.error {
  background: #fee2e2;
  color: #b91c1c;
  border-left: 4px solid #ef4444;
}

body.page-home .home-alert-banner {
  background: linear-gradient(135deg, #fff1f2 0%, #fee2e2 100%);
  color: #991b1b;
  border-bottom: 1px solid #fecaca;
  padding: 12px 0;
  font-weight: 700;
}

body.page-home .home-alert-banner .container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Simple reveal animation */
.reveal-up { opacity:0; transform: translateY(12px); transition: all 0.55s cubic-bezier(.2,.8,.2,1); }
.reveal-up.in-view { opacity:1; transform:none; }

/* Small layout tweaks */
.banner-row { gap: 26px; }

/* Ensure hero spacing with fixed navbar */
.nav-spacer { height: calc(var(--hero-height) + 20px); }

/* ===== Gallery styles & lightbox ===== */
.home-gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: stretch; }
.home-gallery-item { overflow: hidden; border-radius: 12px; background: #fff; display: block; position: relative; }
.home-gallery-item img { width: 100%; height: 180px; object-fit: cover; display: block; transition: transform 0.45s cubic-bezier(.2,.8,.2,1); }
.home-gallery-item:hover img { transform: scale(1.06); }
.home-empty-msg { text-align:center; color: var(--muted); padding: 28px 0; }

/* Lightbox */
#apdcn-lightbox { position: fixed; inset: 0; display: none; align-items:center; justify-content:center; z-index:2000; background: rgba(0,0,0,0.8); }
#apdcn-lightbox.open { display:flex; }
#apdcn-lightbox .lb-backdrop { position: relative; max-width: 92vw; max-height: 92vh; width: auto; height: auto; display:flex; align-items:center; justify-content:center; }
#apdcn-lightbox .lb-img { max-width: 100%; max-height: 86vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(4,32,12,0.6); }
#apdcn-lightbox .lb-close { position: absolute; top: -28px; right: -28px; background: var(--primary); color:#fff; border: none; width:44px; height:44px; border-radius:50%; font-size:22px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
#apdcn-lightbox .lb-close:focus { outline: 3px solid rgba(76,175,80,0.25); }

@media (max-width:640px) {
  .home-gallery-item img { height: 140px; }
  .hero-heading { font-size: clamp(1.6rem, 6vw, 2.6rem); }
}

/* Typography & accessible focus */
body.page-home { -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
.section-subtitle { display:inline-flex; align-items:center; gap:10px; color: rgba(255,255,255,0.9); font-weight:600; }
.hero-left .section-subtitle { font-size: 0.95rem; opacity:0.95; }

/* Features hover */
.features-item:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(12,70,12,0.08); transition: all 0.25s ease; }
.features-item .item-icon { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.features-item:hover .item-icon { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(46,125,50,0.12); }

@media (prefers-reduced-motion: reduce) {
  .reveal-up, .hero--modern .hero-bg, .features-item { transition: none !important; transform: none !important; }
}
