/* RSE — Figma / WhatsApp maquette */

.section--rse {
  --rse-green: #7fb041;
  --rse-green-mid: #76a32f;
  --rse-green-soft: #e8f2d9;
  --rse-text: #1a2e4c;
  --rse-body: #6b7280;
  --rse-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --rse-shadow-card: 0 12px 36px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  background: #ffffff !important;
  padding-top: 90px !important;
  padding-bottom: 64px !important;
}

/* Rapprocher Qualité (note de bas) et RSE */
.section--quality:has(+ .section--rse) {
  padding-bottom: 2.25rem !important;
}

.section--quality + .section--rse {
  padding-top: 1.75rem !important;
}

.section--rse .rse-container {
  position: relative;
  z-index: 1;
  max-width: min(1140px, calc(100% - 48px));
}

/* Hero block — texte + piliers en flux ; image à droite hors flux (évite le vide à gauche) */
.rse-hero-block {
  position: relative;
  padding-right: min(49%, 500px);
  margin-bottom: 1.15rem;
  min-height: min(440px, 46vw);
}

.rse-copy {
  min-width: 0;
  max-width: 30rem;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
}

.rse-copy__eyebrow {
  color: var(--rse-green);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  display: inline-block;
  line-height: 1.2;
}

.rse-copy__title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 2.8vw, 2.55rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1.05rem;
}

/* Responsabilité / sociétale (RSE) — each on its own line */
.rse-copy__title .section-title__lead-text {
  color: var(--rse-text);
  display: block;
  margin-bottom: 0.35rem;
}

.rse-copy__title .section-title__accent {
  color: var(--rse-green);
  display: block;
}

.rse-copy .section-lead__title,
.rse-copy .h3.section-lead__title {
  color: var(--rse-green-mid);
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1.25vw, 1.175rem);
  font-weight: 700;
  margin: 0 0 0.95rem;
  line-height: 1.35;
}

.rse-copy .section-lead {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--rse-body);
  margin: 0;
  max-width: 34em;
}

.rse-layout__visual {
  position: absolute;
  top: -1.35rem;
  right: 0;
  z-index: 1;
  width: min(50%, 480px);
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  overflow: visible;
  pointer-events: none;
}

.rse-layout__visual > * {
  pointer-events: auto;
}

/* Hero image — circle, remontée légère pour alignement avec le titre */
.rse-hero-visual {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1 / 1;
  margin-inline-end: -4%;
  margin-top: -1.35rem;
}

.rse-hero-visual__glow {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 48% 48%,
    rgba(127, 176, 65, 0.28) 0%,
    rgba(127, 176, 65, 0.1) 42%,
    transparent 70%
  );
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
}

.rse-hero-visual__dotgrid {
  position: absolute;
  left: 2%;
  top: 10%;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(6, 4px);
  gap: 10px 11px;
  pointer-events: none;
}

.rse-hero-visual__dot {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: rgba(150, 170, 130, 0.42);
}

.rse-hero-visual__deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}

.rse-hero-visual__figure {
  position: absolute;
  inset: 6%;
  margin: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 50%;
}

.rse-hero-visual__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

/* 5 pillar cards — juste sous le texte, alignés avec le bas de l’image */
.rse-pillars {
  position: relative;
  z-index: 2;
  margin: 0.65rem 0 1.25rem !important;
  gap: 0.85rem !important;
}

.rse-pillar {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.35rem 0.55rem 1.15rem;
  text-align: center;
  box-shadow: var(--rse-shadow);
  border: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 128px;
}

.rse-pillar__icon {
  color: var(--rse-green);
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.rse-pillar__icon svg {
  width: 40px;
  height: 40px;
}

.rse-pillar__label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--rse-green-mid);
  margin: 0;
  max-width: 11em;
}

/* Detail cards */
.rse-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.rse-detail-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.75rem 1.65rem 1.65rem 1.55rem;
  box-shadow: var(--rse-shadow-card);
  border: none !important;
  display: flex;
  gap: 1.35rem;
  align-items: flex-start;
}

.rse-detail-card__icon {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--rse-green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rse-green-mid);
}

.rse-detail-card__icon svg {
  width: 40px;
  height: 40px;
}

.rse-detail-card__body {
  min-width: 0;
  flex: 1;
  padding-top: 0.1rem;
}

.rse-detail-card__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rse-green-mid);
  line-height: 1.3;
}

.rse-detail-card__body p {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  color: var(--rse-body);
  line-height: 1.75;
}

.rse-detail-card__body p:last-child {
  margin-bottom: 0;
}

.rse-detail-card .checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rse-detail-card .checklist li {
  position: relative;
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
  padding-left: 1.1rem;
  color: var(--rse-body);
  line-height: 1.65;
}

.rse-detail-card .checklist li:last-child {
  margin-bottom: 0;
}

.rse-detail-card .checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rse-green);
}

@media (min-width: 1200px) {
  .rse-hero-block {
    padding-right: min(50%, 520px);
    min-height: min(460px, 42vw);
  }

  .rse-hero-visual {
    max-width: 480px;
    margin-top: -1.5rem;
  }
}

@media (min-width: 981px) {
  .rse-pillars.cards-grid--5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1024px) {
  .section--rse {
    padding-top: 56px !important;
    padding-bottom: 52px !important;
  }

  .rse-hero-block {
    padding-right: 0;
    min-height: 0;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .rse-layout__visual {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    justify-content: center;
    order: -1;
    pointer-events: auto;
  }

  .rse-copy {
    max-width: none;
  }

  .rse-pillars {
    margin: 0 0 1rem !important;
  }

  .rse-hero-visual {
    width: 100%;
    max-width: 340px;
    margin-inline: auto;
    margin-top: 0;
  }

  .rse-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .rse-pillars.cards-grid--5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .section--rse {
    padding-top: 44px !important;
    padding-bottom: 44px !important;
  }

  .rse-pillar {
    min-height: 118px;
  }

  .rse-detail-card {
    padding: 1.65rem 1.35rem;
  }

  .rse-detail-card__icon {
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 640px) {
  .rse-pillars.cards-grid--5 {
    grid-template-columns: 1fr 1fr;
  }
}
