/* ─── GROUPE — cartes empilées au scroll (accueil + page Groupe) ─── */
/* overflow-x: clip (et non hidden) : sinon <body> devient un conteneur de défilement et position: sticky ne fonctionne pas */
html:root, html:root > body { overflow-x: clip; }
section.groupe-v2.groupe-v2 {
  position: relative; overflow: clip;
  background:
    radial-gradient(60% 50% at 0% 100%, rgba(66,105,178,.25) 0%, transparent 60%),
    radial-gradient(55% 45% at 100% 0%, rgba(241,90,41,.2) 0%, transparent 60%),
    var(--teal-dark);
}
section.groupe-v2.groupe-v2::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 120px);
}
.groupe-v2 .container { position: relative; }
.groupe-v2 .eyebrow { color: rgba(255,255,255,.8); }
.groupe-v2 .eyebrow-line { background: var(--orange); }
.groupe-v2 h2.title { color: #fff; }
.groupe-v2 .subtitle { color: rgba(255,255,255,.72); }

/* Pile de cartes */
.groupe-v2 .groupe-grid {
  display: block;
  padding-bottom: 12vh;            /* laisse le temps à la 2e carte de recouvrir la 1re */
}
.groupe-v2 .entite {
  --acc: var(--blue); --acc-rgb: 66,105,178;
  position: sticky; top: 104px;
  display: grid; grid-template-columns: 1.05fr 1fr;
  min-height: 540px;
  margin-bottom: 9vh;
  border: 0; border-radius: 22px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(var(--acc-rgb),.28) 0%, transparent 60%),
    #0a2423;
  box-shadow: 0 -18px 50px rgba(0,0,0,.28), 0 30px 70px rgba(0,0,0,.35);
  transform-origin: 50% 0;
  transition: box-shadow .45s;
  will-change: transform;
}
.groupe-v2 .entite:last-child { margin-bottom: 0; }
.groupe-v2 .entite.is-creation {
  --acc: var(--orange); --acc-rgb: 241,90,41;
  top: 128px;                       /* décalage : on voit le bord de la carte précédente */
  grid-template-columns: 1fr 1.05fr;
}
.groupe-v2 .entite:hover {
  transform: none;
  box-shadow: 0 30px 70px rgba(0,0,0,.4), inset 0 0 0 2px rgba(var(--acc-rgb),.85);
}

/* Photo d'un côté */
.groupe-v2 .entite-visual {
  position: relative; height: auto; min-height: 100%;
  border-radius: 0; grid-column: 1; grid-row: 1;
}
.groupe-v2 .entite.is-creation .entite-visual { grid-column: 2; }
.groupe-v2 .entite-gradient {
  background: linear-gradient(135deg, rgba(var(--acc-rgb),.35) 0%, transparent 45%),
              linear-gradient(to top, rgba(4,22,21,.45) 0%, transparent 50%);
}

/* Barre de couleur */
.groupe-v2 .entite-accent-bar {
  position: absolute; top: 0; left: 0; z-index: 4;
  height: 6px; width: 30%;
  transition: width .7s cubic-bezier(.16,1,.3,1);
}
.groupe-v2 .entite:hover .entite-accent-bar { width: 100%; }

/* Logo posé sur la photo */
.groupe-v2 .entite-logo-wrap {
  top: 32px; left: 32px; transform: none;
  width: 108px; height: 108px;
  box-shadow: 0 0 0 6px rgba(var(--acc-rgb),.4), 0 12px 30px rgba(0,0,0,.35);
  transition: transform .45s cubic-bezier(.16,1,.3,1);
}
.groupe-v2 .entite.is-creation .entite-logo-wrap { left: auto; right: 32px; }
.groupe-v2 .entite:hover .entite-logo-wrap { transform: rotate(-6deg) scale(1.05); }
.groupe-v2 .entite-logo-wrap img { max-height: 88px; max-width: 90px; }


/* Texte */
.groupe-v2 .entite-body {
  position: relative; z-index: 3; grid-row: 1; grid-column: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 56px 56px 52px;
}
.groupe-v2 .entite.is-creation .entite-body { grid-column: 1; }
.groupe-v2 .entite-body h3 {
  color: #fff; font-size: 38px; font-weight: 800; letter-spacing: -.02em;
  margin-bottom: 16px; line-height: 1.1;
}
.groupe-v2 .entite-body h3::after {
  content: ""; display: block; width: 52px; height: 4px; margin-top: 16px;
  background: var(--acc); border-radius: 2px;
}
.groupe-v2 .entite-body p {
  color: rgba(255,255,255,.8); font-size: 15.5px; line-height: 1.75; margin-bottom: 24px;
}
.groupe-v2 .chips { gap: 8px; margin-bottom: 32px; }
.groupe-v2 .chip {
  background: rgba(255,255,255,.06); color: #fff;
  border: 1px solid rgba(255,255,255,.2); border-radius: 999px;
  padding: 6px 14px 6px 12px; font-size: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .25s, border-color .25s;
}
.groupe-v2 .chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); }
.groupe-v2 .entite:hover .chip { border-color: rgba(var(--acc-rgb),.7); background: rgba(var(--acc-rgb),.16); }
.groupe-v2 .arrow-link {
  align-self: flex-start;
  background: var(--acc); color: #fff;
  padding: 15px 24px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 10px 24px rgba(var(--acc-rgb),.4);
  transition: gap .25s, transform .25s, box-shadow .25s;
}
.groupe-v2 .arrow-link:hover { gap: 14px; transform: translateX(3px); box-shadow: 0 14px 30px rgba(var(--acc-rgb),.55); }

/* Tablette / mobile : cartes l'une sous l'autre, sans empilement */
@media (max-width: 980px) {
  .groupe-v2 .groupe-grid { padding-bottom: 0; }
  .groupe-v2 .entite,
  .groupe-v2 .entite.is-creation {
    position: relative; top: auto;
    grid-template-columns: 1fr; min-height: 0; margin-bottom: 28px; border-radius: 16px;
  }
  .groupe-v2:not(.groupe-v2--light) .entite { transform: none !important; filter: none !important; }
  .groupe-v2 .entite-visual,
  .groupe-v2 .entite.is-creation .entite-visual { grid-column: 1; grid-row: 1; height: 260px; min-height: 0; }
  .groupe-v2 .entite-body,
  .groupe-v2 .entite.is-creation .entite-body { grid-column: 1; grid-row: 2; padding: 34px 24px 30px; }
  .groupe-v2 .entite.is-creation .entite-logo-wrap { right: auto; left: 22px; }
  .groupe-v2 .entite-logo-wrap { width: 86px; height: 86px; top: 22px; left: 22px; }
  .groupe-v2 .entite-logo-wrap img { max-height: 70px; max-width: 72px; }
  .groupe-v2 .entite-body h3 { font-size: 28px; }
}

/* En-tête de section sur la page Groupe */
.groupe-v2 .svc-eyebrow-dark { color: rgba(255,255,255,.8); }
.groupe-v2 .svc-eyebrow-dark .line { background: var(--orange); }
.groupe-v2 .svc-head-center h2 { color: #fff; }
.groupe-v2 .svc-head-center p { color: rgba(255,255,255,.72); }

/* ─── Partie texte des cartes en blanc ─── */
.groupe-v2 .entite { background: #fff; }
.groupe-v2 .entite-body h3 { color: var(--text); }
.groupe-v2 .entite-body p { color: var(--muted); }
.groupe-v2 .chip {
  background: rgba(var(--acc-rgb),.08); color: var(--acc);
  border-color: rgba(var(--acc-rgb),.25);
}
.groupe-v2 .entite:hover .chip { background: rgba(var(--acc-rgb),.14); border-color: rgba(var(--acc-rgb),.5); }


/* ─── Variante claire, cartes plein écran (accueil) ─── */
section.groupe-v2.groupe-v2--light { background: #fff; }
section.groupe-v2.groupe-v2--light::before { display: none; }
.groupe-v2--light .eyebrow { color: var(--text); }
.groupe-v2--light h2.title { color: var(--text); }
.groupe-v2--light .subtitle { color: var(--muted); }
.groupe-v2--light .svc-eyebrow-dark { color: var(--text); }
.groupe-v2--light .svc-head-center h2 { color: var(--text); }
.groupe-v2--light .svc-head-center p { color: var(--muted); }

@media (min-width: 981px) {
  .groupe-v2--light .groupe-grid {
    width: 100vw; margin-left: calc(50% - 50vw);
    padding-bottom: 8vh;
  }
  .groupe-v2--light .entite,
  .groupe-v2--light .entite.is-creation {
    top: 84px;
    min-height: calc(100vh - 84px);
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: 0 -24px 60px rgba(26,41,40,.10);
    filter: none !important;
  }
  .groupe-v2--light .entite + .entite { margin-top: 6vh; }
  .groupe-v2--light .entite:hover { box-shadow: 0 -24px 60px rgba(26,41,40,.12); }
  .groupe-v2--light .entite-body {
    padding: 8vh max(56px, calc((100vw - 1320px) / 2 + 48px)) 8vh 72px;
    max-width: none; justify-content: center;
  }
  .groupe-v2--light .entite.is-creation .entite-body {
    padding: 8vh 72px 8vh max(56px, calc((100vw - 1320px) / 2 + 48px));
  }
  .groupe-v2--light .entite-body > * { max-width: 560px; }
  .groupe-v2--light .entite-body h3 { font-size: clamp(38px, 3.4vw, 54px); }
  .groupe-v2--light .entite-body p { font-size: 17px; }
  .groupe-v2--light .entite-logo-wrap { top: 40px; left: 40px; }
  .groupe-v2--light .entite.is-creation .entite-logo-wrap { left: auto; right: 40px; }
}
@media (max-width: 980px) {
  .groupe-v2--light .entite { box-shadow: 0 16px 40px rgba(26,41,40,.10); }
}

/* ─── Accueil : photo plein écran + encart blanc en bas à gauche ─── */
@media (min-width: 981px) {
  .groupe-v2--light .entite,
  .groupe-v2--light .entite.is-creation {
    display: block; background: var(--teal-dark);
  }
  .groupe-v2--light .entite-visual,
  .groupe-v2--light .entite.is-creation .entite-visual {
    position: absolute; inset: 0; height: auto; min-height: 0; z-index: 0;
  }
  .groupe-v2--light .entite-bg { transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
  .groupe-v2--light .entite:hover .entite-bg { transform: scale(1.03); }
  .groupe-v2--light .entite-gradient {
    background: linear-gradient(to top, rgba(4,22,21,.35) 0%, transparent 45%);
  }
  .groupe-v2--light .entite-accent-bar { z-index: 4; }

  /* Encart */
  .groupe-v2--light .entite-body,
  .groupe-v2--light .entite.is-creation .entite-body {
    position: absolute; z-index: 3;
    left: max(32px, calc((100vw - 1320px) / 2 + 24px)); bottom: 40px;
    width: min(640px, calc(100vw - 64px));
    padding: 48px 52px 46px;
    background: #fff; border-radius: 4px;
    box-shadow: 0 24px 60px rgba(4,22,21,.25);
    display: block;
  }
  .groupe-v2--light .entite-body > * { max-width: none; }
  .groupe-v2--light .entite-body h3 { font-size: clamp(32px, 2.6vw, 42px); margin-bottom: 14px; }
  .groupe-v2--light .entite-body p { font-size: 16px; margin-bottom: 22px; }
  .groupe-v2--light .chips { margin-bottom: 28px; }

  /* Logo en haut à gauche de la photo */
  .groupe-v2--light .entite-logo-wrap,
  .groupe-v2--light .entite.is-creation .entite-logo-wrap {
    top: 48px; left: max(32px, calc((100vw - 1320px) / 2 + 24px)); right: auto; z-index: 3;
  }
}

/* Encart : moins haut, plus large */
@media (min-width: 981px) {
  .groupe-v2--light .entite-body,
  .groupe-v2--light .entite.is-creation .entite-body {
    width: min(820px, calc(100vw - 64px));
    padding: 32px 44px 34px;
  }
  .groupe-v2--light .entite-body h3 { font-size: clamp(28px, 2.2vw, 36px); margin-bottom: 10px; }
  .groupe-v2--light .entite-body h3::after { margin-top: 12px; }
  .groupe-v2--light .entite-body p { font-size: 15.5px; line-height: 1.65; margin-bottom: 16px; }
  .groupe-v2--light .chips { margin-bottom: 20px; }
}

/* ─── Mobile / tablette : cartes empilées au scroll aussi (variante claire) ─── */
@media (max-width: 980px) {
  .groupe-v2--light .groupe-grid { padding-bottom: 4vh; }
  .groupe-v2--light .entite,
  .groupe-v2--light .entite.is-creation {
    position: sticky; top: 76px;
    display: block; min-height: 0; height: calc(100svh - 180px); max-height: 720px; min-height: 520px;
    margin-bottom: 4vh; border-radius: 18px; overflow: hidden;
    background: var(--teal-dark); filter: none !important;
    box-shadow: 0 -14px 34px rgba(26,41,40,.14);
  }
  .groupe-v2--light .entite.is-creation { top: 88px; margin-bottom: 0; }
  .groupe-v2--light .entite-visual,
  .groupe-v2--light .entite.is-creation .entite-visual { position: absolute; inset: 0; height: auto; }
  .groupe-v2--light .entite-logo-wrap,
  .groupe-v2--light .entite.is-creation .entite-logo-wrap { top: 16px; left: 16px; right: auto; width: 72px; height: 72px; }
  .groupe-v2--light .entite-logo-wrap img { max-height: 58px; max-width: 60px; }
  .groupe-v2--light .entite-body,
  .groupe-v2--light .entite.is-creation .entite-body {
    position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3;
    background: #fff; border-radius: 12px; padding: 22px 20px 20px;
    box-shadow: 0 16px 40px rgba(4,22,21,.25);
  }
  .groupe-v2--light .entite-body h3 { font-size: 24px; margin-bottom: 8px; }
  .groupe-v2--light .entite-body h3::after { margin-top: 10px; width: 40px; }
  .groupe-v2--light .entite-body p { font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
  .groupe-v2--light .chips { gap: 6px; margin-bottom: 16px; }
  .groupe-v2--light .chip { font-size: 11px; padding: 4px 10px 4px 9px; }
  .groupe-v2--light .arrow-link { padding: 12px 18px; font-size: 13px; }
}
@media (max-width: 420px) {
  .groupe-v2--light .chips .chip:nth-child(n+5) { display: none; }
}

/* Mobile : moins d'espace sous le bloc des entités */
@media (max-width: 980px) {
  section.groupe-v2.groupe-v2--light { padding-bottom: 28px; }
  .groupe-v2--light .groupe-grid { padding-bottom: 0; }
}
