/* Wiki /wiki — Communauté hero (1536×640 layered) */

.gf-communaute-hero-root {
  --gf-communaute-bg: #1b3a26;
  --gf-communaute-cream: #e5ded1;
  --gf-communaute-paper: #faf6ea;
  --gf-communaute-sage: #5b6335;
  --gf-communaute-gold: #c9a962;
  --gf-communaute-accent: #e8a045;
  --gf-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --gf-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --gf-motif-scale: 0.6;
  --font-display: "Cormorant Garamond", "EB Garamond", Garamond, Georgia, serif;
  --font-body: Inter, system-ui, -apple-system, sans-serif;
  --basil-x: 51.4%;
  --basil-y: 5.5%;
  --basil-width: 48.6%;
  --basil-height: 90.6%;
  background: var(--gf-communaute-bg);
  margin: 0 0 1.5rem;
}

.gf-communaute-hero-root .gf-communaute-hero {
  width: 100%;
  aspect-ratio: 1536 / 640;
  position: relative;
  container-type: inline-size;
}

/*
 * When the hero is injected above the public Knowledge view (wiki root),
 * the view's `h-100 overflow-hidden` (meant to fill the viewport with an
 * internal scroll) miscomputes against `main`, making its content overflow
 * on top of the site footer. Let it flow naturally so the footer sits below.
 */
.gf-communaute-hero-root + .o_knowledge_public_view {
  height: auto !important;
  overflow: visible !important;
}

.gf-communaute-hero-root .gf-communaute-hero__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--gf-communaute-bg);
}

.gf-communaute-hero-root .gf-communaute-hero__bg-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("/greenforge_plants/static/src/img/communaute/hero/communaute-hero-bg-ciel-etoile-v2-sans-parterre.png");
  background-size: cover;
  background-position: center;
  filter: saturate(0.95) brightness(0.78);
  transform: scale(1.015);
}

.gf-communaute-hero-root .gf-communaute-hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(8, 24, 16, 0.9) 0%,
      rgba(12, 34, 23, 0.72) 40%,
      rgba(13, 35, 27, 0.34) 72%,
      rgba(6, 18, 18, 0.18) 100%
    ),
    radial-gradient(70% 85% at 78% 42%, rgba(94, 122, 61, 0.24), transparent 62%),
    radial-gradient(55% 70% at 12% 88%, rgba(8, 22, 14, 0.4), transparent 68%);
  z-index: 1;
}

.gf-communaute-hero-root .gf-communaute-hero__layers,
.gf-communaute-hero-root .gf-communaute-hero__basil-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gf-communaute-hero-root .gf-communaute-hero__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.gf-communaute-hero-root .gf-communaute-hero__layer object,
.gf-communaute-hero-root .gf-communaute-hero__layer svg,
.gf-communaute-hero-root .gf-communaute-hero__layer img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
}

.gf-communaute-hero-root .gf-layer--landscape-hills {
  z-index: 4;
}

.gf-communaute-hero-root .gf-layer--landscape-mountains {
  z-index: 2;
  opacity: 0;
}

.gf-communaute-hero-root .gf-layer--motifs {
  z-index: 5;
  inset: auto;
  left: 0;
  right: auto;
  bottom: 0;
  top: auto;
  width: 62%;
  aspect-ratio: 1536 / 640;
  height: auto;
  opacity: 0;
}

.gf-communaute-hero-root .gf-layer--motifs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left bottom;
  transform: scale(var(--gf-motif-scale));
  transform-origin: 0% 100%;
}

.gf-communaute-hero-root .gf-layer--constellation {
  z-index: 7;
}

.gf-communaute-hero-root .gf-communaute-hero__basil-wrap {
  z-index: 4;
}

.gf-communaute-hero-root .gf-communaute-hero__basil {
  position: absolute;
  left: var(--basil-x);
  top: var(--basil-y);
  width: var(--basil-width);
  height: var(--basil-height);
  transform-origin: 50% 92%;
  filter: drop-shadow(0 18px 28px rgba(8, 22, 14, 0.35));
  opacity: 0;
  transform: translateY(30px) rotate(-2deg);
}

.gf-communaute-hero-root .gf-communaute-hero__basil img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.gf-communaute-hero-root .gf-communaute-hero__copy {
  position: absolute;
  left: clamp(1rem, 3.8%, 3.75rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  max-width: min(50%, 680px);
  color: var(--gf-communaute-paper);
  pointer-events: none;
  padding-right: 1rem;
}

.gf-communaute-hero-root .gf-communaute-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: calc(100cqw * 10 / 1536);
  color: var(--gf-communaute-gold);
  margin-bottom: calc(100cqw * 18 / 1536);
  opacity: 0;
  transform: translateY(calc(100cqw * 16 / 1536));
}

.gf-communaute-hero-root .gf-communaute-hero__eyebrow-line {
  display: inline-block;
  width: calc(100cqw * 28 / 1536);
  height: 1px;
  background: currentColor;
}

.gf-communaute-hero-root .gf-communaute-hero__eyebrow-text {
  font-family: var(--font-body);
  font-size: clamp(0.625rem, calc(100cqw * 11 / 1536), 0.75rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.gf-communaute-hero-root .gf-communaute-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, calc(100cqw * 58 / 1536), 3.65rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
  color: var(--gf-communaute-paper);
}

.gf-communaute-hero-root .gf-communaute-hero__title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(calc(100cqw * 24 / 1536));
}

/* Liseret doré animé sous le mot accentué du titre (harmonisé sur Selection) */
.gf-communaute-hero-root .gf-communaute-hero__title-em {
  position: relative;
  font-style: normal;
  font-weight: 500;
}

.gf-communaute-hero-root .gf-communaute-hero__title-em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100cqw * -4 / 1536);
  height: calc(100cqw * 3 / 1536);
  border-radius: 2px;
  background: var(--gf-communaute-gold);
  transform-origin: left;
  transform: scaleX(0);
}

.gf-communaute-hero-root .gf-communaute-hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, calc(100cqw * 17 / 1536), 1.0625rem);
  font-weight: 400;
  line-height: 1.55;
  margin: calc(100cqw * 18 / 1536) 0 0;
  max-width: 26em;
  color: rgba(244, 236, 216, 0.78);
  opacity: 0;
  transform: translateY(calc(100cqw * 16 / 1536));
}

.gf-communaute-hero-root .gf-communaute-hero__subtitle b {
  color: var(--gf-communaute-paper);
  font-weight: 500;
}

.gf-communaute-hero-root .gf-communaute-hero__live-pill {
  margin-top: calc(100cqw * 22 / 1536);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: rgba(244, 236, 216, 0.08);
  border: 1px solid rgba(244, 236, 216, 0.12);
  backdrop-filter: blur(2px);
  opacity: 0;
  transform: translateY(calc(100cqw * 16 / 1536));
}

.gf-communaute-hero-root .gf-communaute-hero__avatars {
  display: inline-flex;
  align-items: center;
}

.gf-communaute-hero-root .gf-communaute-hero__av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--gf-communaute-bg);
  margin-left: -8px;
  opacity: 0;
  transform: scale(0.4);
  flex-shrink: 0;
}

.gf-communaute-hero-root .gf-communaute-hero__av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gf-communaute-hero-root .gf-communaute-hero__av:first-child {
  margin-left: 0;
}

.gf-communaute-hero-root .gf-communaute-hero__live-stat {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.15;
}

.gf-communaute-hero-root .gf-communaute-hero__live-count {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--gf-communaute-paper);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.gf-communaute-hero-root .gf-communaute-hero__live-num {
  display: inline-block;
  min-width: 2.4ch;
  text-align: right;
}

.gf-communaute-hero-root .gf-communaute-hero__live-now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(244, 236, 216, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 2px;
}

.gf-communaute-hero-root .gf-communaute-hero__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6fbf73;
  box-shadow: 0 0 0 0 rgba(111, 191, 115, 0.55);
}

@media (prefers-reduced-motion: no-preference) {
  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-communaute-hero__basil {
    animation:
      gf-communaute-basil-in 1100ms var(--gf-ease-out) 500ms forwards,
      gf-communaute-basil-sway 7.5s var(--gf-ease-in-out) 1600ms infinite;
  }

  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-layer--motifs {
    animation: gf-communaute-motifs-in 1400ms 600ms var(--gf-ease-out) forwards;
  }

  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-communaute-hero__eyebrow {
    animation: gf-communaute-rise 700ms 200ms var(--gf-ease-out) both;
  }

  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-communaute-hero__title-word {
    animation: gf-communaute-rise 900ms var(--gf-ease-out) forwards;
    animation-delay: var(--word-delay, 300ms);
  }

  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-communaute-hero__subtitle {
    animation: gf-communaute-rise 800ms 850ms var(--gf-ease-out) forwards;
  }

  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-communaute-hero__title-em::after {
    animation: gf-communaute-underline-in 850ms 1150ms var(--gf-ease-out) forwards;
  }

  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-communaute-hero__live-pill {
    animation: gf-communaute-rise 800ms 1100ms var(--gf-ease-out) forwards;
  }

  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-communaute-hero__av {
    animation: gf-communaute-av-pop 500ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }

  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-communaute-hero__av--1 { animation-delay: 1300ms; }
  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-communaute-hero__av--2 { animation-delay: 1400ms; }
  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-communaute-hero__av--3 { animation-delay: 1500ms; }
  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-communaute-hero__av--4 { animation-delay: 1600ms; }

  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-communaute-hero__live-dot {
    animation: gf-communaute-live-ping 2.2s var(--gf-ease-out) infinite 1.8s;
  }

  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-layer--landscape-hills {
    animation: gf-communaute-landscape-rise 1100ms var(--gf-ease-out) both;
  }

  .gf-communaute-hero-root .gf-communaute-hero--animate .gf-layer--landscape-mountains {
    animation: gf-communaute-landscape-rise 1100ms 500ms var(--gf-ease-out) forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gf-communaute-hero-root .gf-communaute-hero__basil,
  .gf-communaute-hero-root .gf-communaute-hero__basil img,
  .gf-communaute-hero-root .gf-layer--motifs,
  .gf-communaute-hero-root .gf-layer--landscape-hills,
  .gf-communaute-hero-root .gf-layer--landscape-mountains,
  .gf-communaute-hero-root .gf-communaute-hero__eyebrow,
  .gf-communaute-hero-root .gf-communaute-hero__title-word,
  .gf-communaute-hero-root .gf-communaute-hero__subtitle,
  .gf-communaute-hero-root .gf-communaute-hero__live-pill,
  .gf-communaute-hero-root .gf-communaute-hero__av {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .gf-communaute-hero-root .gf-communaute-hero__title-em::after {
    transform: scaleX(1);
  }
}

@media (max-width: 991.98px) {
  .gf-communaute-hero-root .gf-communaute-hero__copy {
    max-width: 52%;
  }

  .gf-communaute-hero-root {
    --basil-width: 52%;
    --basil-x: 46%;
  }
}

@media (max-width: 575.98px) {
  .gf-communaute-hero-root .gf-communaute-hero {
    aspect-ratio: 4 / 3;
    min-height: 280px;
  }

  .gf-communaute-hero-root .gf-communaute-hero__copy {
    left: 5%;
    top: 8%;
    transform: none;
    max-width: 90%;
  }

  .gf-communaute-hero-root {
    --basil-width: 52%;
    --basil-x: 43%;
    --basil-y: 23%;
    --basil-height: 64%;
  }

  .gf-communaute-hero-root .gf-communaute-hero__layers {
    z-index: auto;
  }

  .gf-communaute-hero-root .gf-communaute-hero__basil-wrap {
    z-index: 10;
    transform: translateY(10%);
  }

  .gf-communaute-hero-root .gf-communaute-hero__basil {
    overflow: hidden;
  }

  .gf-communaute-hero-root .gf-layer--landscape-mountains {
    z-index: 5;
  }

  .gf-communaute-hero-root .gf-layer--landscape-hills {
    z-index: 6;
  }

  .gf-communaute-hero-root .gf-layer--landscape-mountains img {
    transform: translateY(18%);
  }

  .gf-communaute-hero-root .gf-layer--landscape-hills img {
    transform: translateY(31%);
  }

  .gf-communaute-hero-root .gf-layer--constellation {
    z-index: 12;
    transform: translateY(18%);
  }

  .gf-communaute-hero-root .gf-layer--motifs {
    bottom: 0;
    width: 72%;
    z-index: 12;
  }

  .gf-communaute-hero-root .gf-communaute-hero__copy {
    z-index: 14;
  }
}

@keyframes gf-communaute-av-pop {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }

  60% {
    opacity: 1;
    transform: scale(1.15);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes gf-communaute-live-ping {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 191, 115, 0.55);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(111, 191, 115, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(111, 191, 115, 0);
  }
}

@keyframes gf-communaute-basil-in {
  from {
    opacity: 0;
    transform: translateY(30px) rotate(-2deg);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotate(-1.2deg);
  }
}

@keyframes gf-communaute-basil-sway {
  0%, 100% {
    opacity: 1;
    transform: translateY(0) rotate(-1.2deg);
  }

  50% {
    opacity: 1;
    transform: translateY(0) rotate(1.4deg);
  }
}

@keyframes gf-communaute-motifs-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 0.9;
    transform: translateY(0);
  }
}

@keyframes gf-communaute-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gf-communaute-underline-in {
  to {
    transform: scaleX(1);
  }
}

@keyframes gf-communaute-landscape-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
