/* =========================================================================
   AGRIAVENIR — STYLES DÉDIÉS
   Cohérence visuelle avec LIFT, T18 et le Design System Portfolio
   ========================================================================= */

body.agri-page {
  background-color: var(--color-bg);
  color: #ffffff;
  overflow-x: hidden;
}

/* =============================================
   COMMONS : LABELS & SÉPARATEURS
   ============================================= */
.agri-section-label-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.agri-label-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.agri-vertical-bar {
  width: 2px;
  height: 18px;
  background-color: var(--color-primary);
  flex-shrink: 0;
}

.agri-horizontal-dash {
  width: 25px;
  height: 2px;
  background-color: var(--color-primary);
  flex-shrink: 0;
}

.agri-section-label {
  font-family: monospace, var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 2.5px;
  color: #ffffff;
  text-transform: uppercase;
}

/* =============================================
   HERO SECTION (Plein écran 100vh)
   ============================================= */
.agri-hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  min-height: 100vh;
  width: 100%;
  padding: 0 8vw;
  background-color: var(--color-bg);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.agri-hero-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  z-index: 1;
}

.agri-hero-meta {
  display: flex;
  gap: 15px;
  font-family: monospace, "Courier New", Courier;
  font-size: 1rem;
  letter-spacing: 1.5px;
}

.agri-hero-date {
  color: #ffffff;
}

.agri-hero-status {
  color: rgba(255, 255, 255, 0.45);
}

.agri-hero-title {
  font-family: var(--font-heading) !important;
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: normal !important;
  color: #ffffff;
  line-height: 1.1;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* =============================================
   CONTEXTE SECTION (Style LIFT épuré)
   ============================================= */
.agri-context-section {
  padding: 140px 8vw;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 80px;
  align-items: start;
  background-color: #0f0f0f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.agri-context-text p {
  font-family: 'Filson Pro', var(--font-body), sans-serif;
  font-size: 1.25rem;
  line-height: 1.8;
  color: #cccccc;
  font-weight: normal;
  margin-top: 0;
  max-width: 850px;
}

.agri-context-text p:last-child {
  margin-bottom: 0;
}

/* =============================================
   DÉMARCHE & NUAGE DE MOTS SÉMANTIQUE
   ============================================= */
.agri-demarche-section {
  padding: 120px 8vw 140px;
  background-color: #0c0c0c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  box-sizing: border-box;
}

.agri-demarche-header {
  margin-bottom: 50px;
}

.agri-wordcloud {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 22px;
  padding: 60px 50px;
  background: radial-gradient(circle at 50% 30%, rgba(88, 128, 87, 0.1) 0%, rgba(0, 25, 0, 0.25) 100%), rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 40px rgba(0, 0, 0, 0.4);
}

.agri-wordcloud::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 30%;
  width: 40%;
  height: 60%;
  background: radial-gradient(circle, rgba(88, 128, 87, 0.15) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
}

/* Effet focus : quand on survole le nuage, les autres mots s'estompent subtilement */
.agri-wordcloud:hover .agri-word:not(:hover) {
  opacity: 0.35;
  filter: blur(0.3px);
  transform: scale(0.97);
}

.agri-word {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: default;
  user-select: none;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  line-height: 1.15;
  white-space: nowrap;
}

.agri-word:hover {
  opacity: 1 !important;
  filter: none !important;
  transform: scale(1.12) translateY(-3px) !important;
  border-color: rgba(88, 128, 87, 0.6) !important;
  background-color: rgba(88, 128, 87, 0.22) !important;
  box-shadow: 0 12px 30px rgba(0, 25, 0, 0.6);
  z-index: 5;
}

/* Tiers de hiérarchie sémantique */
.agri-word-xl {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.3rem;
  font-weight: 700;
  color: #fffdf6;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
}

.agri-word-xl.agri-word-accent {
  color: #fffdf6;
  background: rgba(88, 128, 87, 0.15);
  border-color: rgba(88, 128, 87, 0.35);
}

.agri-word-lg {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: #e6dec8;
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.02);
}

.agri-word-lg.agri-word-italic {
  font-style: italic;
  color: #8eb88c;
}

.agri-word-md {
  font-family: 'Filson Pro', var(--font-body), sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: #d1c8b8;
  padding: 5px 12px;
}

.agri-word-md.agri-word-italic {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  color: #c9a882;
}

.agri-word-sm {
  font-family: 'Filson Pro', var(--font-body), sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #888888;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.04);
}

.agri-word-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #588057;
  margin-right: 10px;
  display: inline-block;
  box-shadow: 0 0 8px rgba(88, 128, 87, 0.8);
}

/* =============================================
   GRILLE DES LOGOTYPES (Ordre planche)
   ============================================= */
.agri-logo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background-color: #000000;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.agri-logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease;
}

/* Bloc pleine largeur pour le logo vertical : la botte de terre prend 100% de la largeur */
.agri-logo-block-top {
  grid-column: 1 / -1;
  padding: 90px 0 0 0;
  background-color: #fffdf6;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.agri-logo-block-half {
  padding: 120px 5vw;
}

.agri-block-label {
  position: absolute;
  top: 45px;
  left: 5vw;
  z-index: 2;
}

.agri-logo-block-top .agri-block-label {
  left: 8vw;
  top: 45px;
}

/* Thème sombre pour label sur bloc fond clair */
.agri-label-dark .agri-section-label {
  color: #2a2118;
}
.agri-label-dark .agri-horizontal-dash {
  background-color: #2a2118;
}

/* Images dans la grille des logos (SVG 100% Vectoriel) */
.agri-logo-img-horiz {
  max-width: 440px;
  width: 85%;
  height: auto;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Pleine largeur pour le logo central avec sa colline terrienne */
.agri-logo-img-main {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
  vertical-align: bottom;
}

.agri-logo-block-top:hover .agri-logo-img-main {
  transform: none; /* Reste bien calé à 100% sans déborder */
}

.agri-logo-img-badge {
  max-width: 320px;
  width: 75%;
  height: auto;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.agri-logo-block:hover .agri-logo-img-horiz,
.agri-logo-block:hover .agri-logo-img-badge {
  transform: scale(1.04);
}

/* =============================================
   PALETTE CHROMATIQUE (Positionnée à la fin)
   ============================================= */
.agri-colors-section {
  padding: 130px 8vw 150px;
  background-color: #0f0f0f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.agri-colors-header {
  margin-bottom: 60px;
}

.agri-colors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.agri-color-card {
  background-color: #151515;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.agri-color-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.agri-color-swatch {
  width: 100%;
  height: 180px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 15px 20px;
}

.agri-color-swatch-badge {
  font-family: monospace;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  color: #ffffff;
  letter-spacing: 1px;
}

.agri-color-info {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agri-color-name {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: bold;
  color: #ffffff;
}

.agri-color-hex {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--color-primary);
  letter-spacing: 1px;
}

.agri-color-desc {
  font-family: 'Filson Pro', var(--font-body), sans-serif;
  font-size: 0.88rem;
  color: var(--color-text-dim);
  line-height: 1.5;
  margin: 6px 0 0;
}

/* =============================================
   GRILLE DES MOCKUPS (Même D.A. que les logos)
   ============================================= */
.agri-mockup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background-color: #000000;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.agri-mockup-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  transition: transform 0.4s ease;
}

.agri-mockup-block-half {
  aspect-ratio: 4 / 3;
}

.agri-mockup-block-full {
  grid-column: 1 / -1;
  padding: 120px 8vw;
  min-height: 540px;
}

.agri-mockup-block .agri-block-label {
  position: absolute;
  top: 45px;
  left: 5vw;
  z-index: 2;
}

.agri-mockup-block-full .agri-block-label {
  left: 8vw;
  top: 45px;
}

/* Images dans la grille des mockups */
.agri-mockup-img-half {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: zoom-in;
}

.agri-mockup-block:hover .agri-mockup-img-half {
  transform: scale(1.03);
}

.agri-mockup-img-portrait {
  max-width: 465px;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: zoom-in;
}

.agri-mockup-block-full:hover .agri-mockup-img-portrait {
  transform: scale(1.03);
}

/* =============================================
   LIGHTBOX PLEIN ÉCRAN
   ============================================= */
.agri-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.agri-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.agri-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  cursor: zoom-out;
}

.agri-lightbox-content {
  position: relative;
  z-index: 10001;
  max-width: 90vw;
  max-height: 90vh;
}

.agri-lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.agri-lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

.agri-lightbox-close:hover {
  color: var(--color-primary);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .agri-context-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .agri-colors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .agri-logo-grid {
    grid-template-columns: 1fr;
  }

  .agri-logo-block-top {
    padding: 70px 0 0 0;
  }

  .agri-logo-block-half {
    padding: 100px 8vw;
  }

  .agri-block-label,
  .agri-logo-block-half .agri-block-label {
    left: 8vw;
  }

  .agri-colors-grid {
    grid-template-columns: 1fr;
  }

  .agri-wordcloud {
    padding: 30px 18px;
    gap: 10px 14px;
    border-radius: 14px;
  }

  .agri-word-xl {
    font-size: 1.55rem;
    padding: 6px 14px;
  }

  .agri-word-lg {
    font-size: 1.25rem;
    padding: 5px 12px;
  }

  .agri-word-md {
    font-size: 1.05rem;
  }

  .agri-word-md.agri-word-italic {
    font-size: 1.15rem;
  }

  .agri-word-sm {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

  .agri-mockup-grid {
    grid-template-columns: 1fr;
  }

  .agri-mockup-block-half {
    aspect-ratio: 4 / 3;
  }

  .agri-mockup-block .agri-block-label,
  .agri-mockup-block-full .agri-block-label {
    left: 8vw;
    top: 30px;
  }

  .agri-mockup-block-full {
    padding: 90px 8vw 60px;
    min-height: auto;
  }
}
