/* ============================================================
   Avrile — Pôles
   Deux panneaux côte à côte, image par défaut → couleur au hover.
   Curseur personnalisé "en savoir plus" au survol.
   ============================================================ */

.avr-poles {
  padding: clamp(80px, 9vw, 150px) var(--avr-space-gutter);
  background: var(--avr-bg);
  position: relative;
  width: 100%;
}

.avr-poles__anchor {
  position: absolute;
  top: -70px;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* ----------------------------------------------------------
   Curseur personnalisé — visuellement identique à avr-btn-primary
---------------------------------------------------------- */
.avr-poles__cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.avr-poles__cursor.is-active {
  opacity: 1;
}

.avr-poles .avr-poles__cursor[data-card="0"] {
  background: var(--avr-color-white);
  color: var(--avr-color-raisin);
}

.avr-poles .avr-poles__cursor[data-card="1"] {
  background: var(--avr-color-ink);
  color: var(--avr-color-white);
}

/* ----------------------------------------------------------
   En-tête — label + heading
---------------------------------------------------------- */
.avr-poles__head-row {
  width: 100%;
  max-width: var(--avr-max-content);
  margin: 0 auto clamp(44px, 5.5vw, 80px);
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.avr-poles__eyebrow {
  padding-top: 12px;
  display: block;
}

.avr-poles__heading {
  margin: 0;
  font-family: var(--avr-font-italic);
  font-weight: var(--avr-weight-regular);
  font-style: italic;
  font-size: clamp(31px, 3.6vw, 55px);
  line-height: 1.1;
  letter-spacing: -0.005em;
  color: var(--avr-fg);
  max-width: 900px;
  text-wrap: balance;
}

.avr-poles__heading em {
  font-style: italic;
  font-family: var(--avr-font-italic);
  font-size: 1em;
  color: var(--avr-fg);
}

/* ----------------------------------------------------------
   Panneaux — grille fixe 2 colonnes égales
---------------------------------------------------------- */
.avr-poles__panels {
  width: 100%;
  max-width: var(--avr-max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ----------------------------------------------------------
   Panneau individuel
---------------------------------------------------------- */
.avr-poles__panel {
  position: relative;
  height: clamp(560px, 80vh, 760px);
  border-radius: var(--avr-radius-sm);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(24px, 2.4vw, 40px);
  color: var(--avr-color-white);
  cursor: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.avr-poles__panel[data-i="0"] {
  background: var(--avr-color-raisin);
}

.avr-poles__panel[data-i="1"] {
  background: var(--avr-color-cyan);
}

/* ----------------------------------------------------------
   Lien overlay — couvre toute la carte
---------------------------------------------------------- */
.avr-poles__link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* ----------------------------------------------------------
   Photo de fond + teinture
---------------------------------------------------------- */
.avr-poles__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.avr-poles__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.avr-poles__tint {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 12, 14, 0.42) 0%, rgba(20, 12, 14, 0.06) 38%, rgba(20, 12, 14, 0) 70%);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.avr-poles__panel:hover .avr-poles__photo img,
.avr-poles__panel:hover .avr-poles__tint {
  opacity: 0;
}

/* ----------------------------------------------------------
   En-tête de carte : num + titre
---------------------------------------------------------- */
.avr-poles__card-head {
  position: relative;
  z-index: 1;
  width: 100%;
  align-items: flex-start;
}

.avr-poles__card-id {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 14px;
}

.avr-poles__num {
  font-family: var(--avr-font-italic);
  font-style: italic;
  font-weight: var(--avr-weight-regular);
  font-size: var(--avr-text-h3);
  line-height: 1;
  flex-shrink: 0;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.4);
}

.avr-poles__title {
  margin: 0;
  font-weight: var(--avr-weight-medium);
  font-style: normal;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--avr-color-white);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.4);
}

.avr-poles__panel:hover .avr-poles__num,
.avr-poles__panel:hover .avr-poles__title {
  text-shadow: none;
}

/* ----------------------------------------------------------
   Pied de carte — chips + texte descriptif
   margin-top: auto ancre au bas du panneau.
   Le texte s'ouvre vers le haut en repoussant les chips.
---------------------------------------------------------- */
.avr-poles__foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.avr-poles__chips {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.avr-poles__body {
  font-family: var(--avr-font-body);
  font-size: clamp(15px, 1.1vw, 17px);
  font-weight: var(--avr-weight-regular);
  line-height: 1.6;
  color: var(--avr-color-white);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-top: 0;
  transition: max-height 0.5s var(--avr-ease-reveal), opacity 0.4s ease, padding-top 0.5s ease;
}

.avr-poles .avr-poles__panel:hover .avr-poles__body {
  max-height: 180px;
  opacity: 1;
  padding-top: 16px;
}

body[data-builder-window="iframe"] .avr-poles .avr-poles__body {
  max-height: 180px;
  opacity: 1;
  padding-top: 16px;
}

/* ----------------------------------------------------------
   Responsive
---------------------------------------------------------- */
@media (max-width: 880px) {
  .avr-poles__head-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .avr-poles__panels {
    grid-template-columns: 1fr;
  }

  .avr-poles__panel {
    min-height: 440px;
    cursor: pointer;
  }

  .avr-poles .avr-poles__body {
    max-height: 180px;
    opacity: 1;
    padding-top: 16px;
  }
}

.avr-poles__panel:nth-child(2).avr-in { transition-delay: 100ms; }
