/* ═══════════════════════════════════════════════
   THE GREEN VISION – Feuille de styles commune
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Raleway:wght@300;400;500;600;700&family=Dancing+Script:wght@600&display=swap');

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

:root {
  --vert-fonce:   #071a07;
  --vert-moyen:   #0f2d0f;
  --vert-accent:  #5c8f28;
  --vert-clair:   #7ab33d;
  --or:           #c9a84c;
  --blanc:        #ffffff;
  --gris-clair:   #f4f7f0;
  --gris:         #e8ede2;
  --texte:        #2a2a2a;
  --texte-doux:   #555;
}

html { scroll-behavior: smooth; }

/* Texte accessible aux moteurs/lecteurs d'écran, invisible à l'écran */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: 'Raleway', sans-serif;
  color: var(--texte);
  background: var(--blanc);
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── NAVIGATION ───────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--vert-fonce);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 80px;
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.4); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo img {
  height: 54px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: var(--blanc);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--vert-clair);
  transform: scaleX(0);
  transition: transform .2s;
}
.nav-links a:hover { color: var(--vert-clair); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--vert-clair); }

.nav-btn {
  background: var(--vert-accent);
  color: var(--blanc) !important;
  padding: 10px 26px;
  border-radius: 50px;
  font-weight: 600;
  transition: background .2s !important;
}
.nav-btn:hover { background: var(--vert-clair) !important; }
.nav-btn::after { display: none !important; }

/* ── Menu burger (mobile) ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blanc);
  margin: 5px auto;
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.navbar.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.navbar.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO PAGES INTERNES ──────────────────────── */
.page-hero {
  margin-top: 80px;
  height: 300px;
  background: linear-gradient(135deg, var(--vert-fonce) 0%, var(--vert-moyen) 40%, #1a4010 100%);
  display: flex;
  align-items: center;
  padding: 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('photo/champs.jpg') center/cover no-repeat;
  opacity: .3;
}
.page-hero-content {
  position: relative;
  z-index: 1;
}
.page-hero-label {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--vert-clair);
  margin-bottom: 8px;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  color: var(--blanc);
  line-height: 1.2;
}
.page-hero h1 em {
  font-style: italic;
  color: var(--vert-clair);
}
.leaf-deco {
  display: inline-block;
  width: 36px;
  height: 3px;
  background: var(--vert-accent);
  vertical-align: middle;
  margin-right: 10px;
}

/* ── SECTIONS ─────────────────────────────────── */
.section { padding: 88px 80px; }
.section-sm { padding: 60px 80px; }

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--vert-accent);
  font-weight: 600;
  margin-bottom: 10px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--vert-accent);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--vert-fonce);
  margin-bottom: 32px;
  line-height: 1.25;
}
.section-title em {
  font-style: italic;
  color: var(--vert-accent);
}

/* ── CTA BANNER ───────────────────────────────── */
.cta-banner {
  background-image:
    linear-gradient(100deg, rgba(7,26,7,.96) 0%, rgba(15,45,15,.9) 55%, rgba(26,64,16,.85) 100%),
    url('photo/champs.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 64px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.cta-banner h2 {
  font-family: 'Playfair Display', serif;
  color: var(--blanc);
  font-size: 2rem;
  line-height: 1.3;
}
.cta-banner h2 em {
  font-style: italic;
  color: var(--vert-clair);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all .25s;
  white-space: nowrap;
}
.btn-gold {
  background: var(--or);
  color: var(--vert-fonce);
  border: 2px solid var(--or);
}
.btn-gold:hover { background: transparent; color: var(--or); }

.btn-green {
  background: var(--vert-accent);
  color: var(--blanc);
  border: 2px solid var(--vert-accent);
}
.btn-green:hover { background: var(--vert-clair); border-color: var(--vert-clair); }

.btn-outline {
  background: transparent;
  color: var(--blanc);
  border: 2px solid var(--blanc);
}
.btn-outline:hover { background: var(--blanc); color: var(--vert-fonce); }

.btn-outline-green {
  background: transparent;
  color: var(--vert-accent);
  border: 2px solid var(--vert-accent);
}
.btn-outline-green:hover { background: var(--vert-accent); color: var(--blanc); }

/* ── FOOTER ───────────────────────────────────── */
footer {
  background: var(--vert-fonce);
  color: rgba(255,255,255,.8);
  font-size: 0.85rem;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 64px 80px 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-logo-col img {
  height: 70px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  margin-bottom: 16px;
}
.footer-logo-col .tagline {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: 20px;
}
.social-links {
  display: flex;
  gap: 10px;
}
.social-links a {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: border-color .2s, background .2s;
}
.social-links a:hover {
  border-color: var(--vert-clair);
  background: rgba(122,179,61,.15);
}

.footer-col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vert-clair);
  margin-bottom: 20px;
  font-weight: 600;
}
.footer-col li, .footer-col p {
  margin-bottom: 10px;
  color: rgba(255,255,255,.65);
  font-size: 0.83rem;
  line-height: 1.6;
}
.footer-col a { transition: color .2s; }
.footer-col a:hover { color: var(--vert-clair); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  color: rgba(255,255,255,.65);
  font-size: 0.83rem;
}
.footer-contact-item .ico { color: var(--vert-clair); flex-shrink: 0; margin-top: 2px; }

.footer-map {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
  opacity: .8;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 80px;
  font-size: 0.76rem;
  color: rgba(255,255,255,.4);
}
.footer-bottom a {
  color: rgba(255,255,255,.4);
  transition: color .2s;
}
.footer-bottom a:hover { color: var(--vert-clair); }
.footer-bottom-links { display: flex; gap: 24px; }

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 1024px) {
  .navbar { padding: 0 24px; }
  .section, .section-sm, .cta-banner { padding-left: 32px; padding-right: 32px; }
  .footer-main { grid-template-columns: 1fr 1fr; padding: 48px 32px 32px; }
  .footer-bottom { padding: 20px 32px; flex-direction: column; gap: 8px; text-align: center; }
  .page-hero { padding: 0 32px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 80px; left: 0; right: 0;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: var(--vert-fonce);
    padding: 24px 20px 32px;
    box-shadow: 0 18px 32px rgba(0,0,0,.35);
    border-top: 1px solid rgba(255,255,255,.08);
    opacity: 0;
    transform: translateY(-12px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity .35s ease, transform .35s ease, visibility .35s;
  }
  .navbar.menu-open .nav-links {
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-links a { font-size: 1rem; padding: 8px 0; display: block; }
  .nav-links .nav-btn { margin-top: 10px; padding: 10px 32px; }
  .section, .section-sm { padding: 60px 20px; }
  .cta-banner { flex-direction: column; text-align: center; padding: 48px 20px; background-attachment: scroll; }
  .page-hero { padding: 0 20px; height: 220px; }
  .page-hero h1 { font-size: 1.8rem; }
  .footer-main { grid-template-columns: 1fr; padding: 40px 20px; }
  .footer-bottom { padding: 16px 20px; }
}

/* ═══════════════════════════════════════════════
   ANIMATIONS & TRANSITIONS
   ═══════════════════════════════════════════════ */

/* ── Fondu entre les pages ── */
body { animation: pageEnter .65s ease both; }
body.page-exit { opacity: 0; transition: opacity .38s ease; }
@keyframes pageEnter { from { opacity: 0; } to { opacity: 1; } }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Apparition au défilement ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity .9s cubic-bezier(.22,.61,.36,1),
    transform .9s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Effet Ken Burns (heros de pages) ── */
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: kenburns 18s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}

/* ── Diaporama hero (accueil) ── */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2.2s ease-in-out;
  animation: kenburns 22s ease-in-out infinite alternate;
}
.hero-slide.active { opacity: 1; }

.hero-dots {
  position: absolute;
  bottom: 36px;
  right: 48px;
  display: flex;
  gap: 10px;
  z-index: 2;
}
.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .4s, border-color .4s, transform .4s;
}
.hero-dots button.active {
  background: var(--vert-clair);
  border-color: var(--vert-clair);
  transform: scale(1.3);
}

/* ── Cartes projets (accueil + page Projets) ── */
.projets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.projet-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--vert-moyen);
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(7,26,7,.08);
  transition:
    transform .55s cubic-bezier(.22,.61,.36,1),
    box-shadow .55s ease;
}
.projet-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(7,26,7,.25);
}
.projet-card-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(.22,.61,.36,1), filter .6s ease;
}
.projet-card:hover .projet-card-bg {
  transform: scale(1.09);
  filter: saturate(1.15) brightness(1.03);
}
.projet-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,26,7,.85) 0%, rgba(7,26,7,.2) 60%, transparent 100%);
  transition: background .5s ease;
}
.projet-card-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 24px;
  transform: translateY(8px);
  transition: transform .55s cubic-bezier(.22,.61,.36,1);
}
.projet-card:hover .projet-card-label { transform: translateY(0); }
.projet-card-label span {
  background: rgba(92,143,40,.9);
  color: var(--blanc);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 6px;
}
.projet-card-label h3 {
  font-family: 'Playfair Display', serif;
  color: var(--blanc);
  font-size: 1.15rem;
}
.projet-card-label p {
  color: rgba(255,255,255,.78);
  font-size: 0.8rem;
  line-height: 1.5;
  margin-top: 4px;
}
.projet-card.pop { animation: fadeUp .55s ease both; }

@media (max-width: 900px) {
  .projets-grid { grid-template-columns: 1fr; }
}

/* ── Images éditoriales (zoom doux au survol) ── */
.histoire-img img,
.apropos-teaser-img img {
  transition: transform .9s cubic-bezier(.22,.61,.36,1);
}
.histoire-img:hover img,
.apropos-teaser-img:hover img { transform: scale(1.025); }

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(7,26,7,.93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  cursor: zoom-out;
  transition: opacity .45s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  transform: scale(.95);
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
}
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 20px; right: 32px;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s;
}
.lightbox-close:hover { opacity: 1; }

/* ── Bandeau cookies ── */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  max-width: 480px;
  width: calc(100% - 40px);
  background: var(--vert-fonce);
  border: 1px solid rgba(122,179,61,.3);
  border-radius: 12px;
  padding: 24px 26px;
  z-index: 3000;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,.61,.36,1);
}
.cookie-banner.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.cookie-banner h4 {
  font-family: 'Playfair Display', serif;
  color: var(--blanc);
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.cookie-banner p {
  color: rgba(255,255,255,.7);
  font-size: 0.83rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.cookie-banner p a { color: var(--vert-clair); text-decoration: underline; }
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-banner-actions button {
  font-family: 'Raleway', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 50px;
  cursor: pointer;
  transition: all .25s;
}
.cookie-accept {
  background: var(--vert-accent);
  color: var(--blanc);
  border: 2px solid var(--vert-accent);
}
.cookie-accept:hover { background: var(--vert-clair); border-color: var(--vert-clair); }
.cookie-refuse {
  background: transparent;
  color: rgba(255,255,255,.75);
  border: 2px solid rgba(255,255,255,.35);
}
.cookie-refuse:hover { border-color: var(--blanc); color: var(--blanc); }

/* ── Accessibilité : mouvement réduit ── */
@media (prefers-reduced-motion: reduce) {
  .page-hero-bg, .hero-slide { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  body { animation: none; }
  html { scroll-behavior: auto; }
}
