/* ESA Group – Avantages de l’approche transversale */
:root {
  --esa-adv-bg1: rgba(245, 249, 255, 0.75);
  --esa-adv-bg2: rgba(240, 246, 255, 0.95);
  --esa-adv-primary: #174392;
  --esa-adv-primary-rgb: 23, 67, 146;
  --esa-adv-accent: #FFCC00;
  --esa-adv-text: #1d2c4a;
  --esa-adv-muted: #3a4a6b;
  --animation-timing: cubic-bezier(0.22, 1, 0.36, 1);
}

.esa-adv-section {
  position: relative;
  padding: clamp(36px, 6vw, 84px) 4%;
  background: linear-gradient(180deg, var(--esa-adv-bg1) 0%, var(--esa-adv-bg2) 100%);
  overflow: hidden;
}
.esa-adv-section::before { /* décor subtil en arrière-plan */
  content: "";
  position: absolute; inset: -2px;
  background: radial-gradient(1000px 400px at 8% 8%, rgba(var(--esa-adv-primary-rgb),0.10), transparent 55%),
              radial-gradient(900px 350px at 92% 0%, rgba(255,204,0,0.12), transparent 60%),
              linear-gradient(135deg, rgba(23,67,146,0.04), rgba(255,204,0,0.04));
  pointer-events: none;
  z-index: 0;
}

.esa-adv-header { text-align: center; margin-bottom: clamp(22px, 4vw, 40px); position: relative; z-index: 1; }
.esa-adv-title { font-size: clamp(1.6rem, 2.4vw, 2.2rem); color: var(--esa-adv-primary); letter-spacing: 0.2px; }
.esa-adv-subtitle { color: var(--esa-adv-muted); opacity: 0.92; margin-top: 6px; }

.esa-adv-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.esa-adv-card { /* carte en glass-morphism avec reveal */
  opacity: 0; transform: translateY(12px);
  transition: opacity 420ms ease, transform 420ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}
.esa-adv-card.in-view { opacity: 1; transform: translateY(0); }

.esa-adv-card {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(18px, 2.6vw, 26px);
  border-radius: 18px;
  color: var(--esa-adv-text);
  background: rgba(255,255,255,0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(var(--esa-adv-primary-rgb), 0.14);
  border: 1px solid rgba(var(--esa-adv-primary-rgb), 0.18);
  isolation: isolate; overflow: hidden;
  transform-origin: center;
}
.esa-adv-card::before { /* léger gradient interne */
  content: ""; position: absolute; inset: 0; border-radius: 18px; z-index: -1;
  background: linear-gradient(135deg, rgba(23,67,146,0.08), rgba(255,204,0,0.08));
}
.esa-adv-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(var(--esa-adv-primary-rgb), 0.20); }

.esa-adv-top { display: flex; align-items: center; gap: 14px; }
.esa-adv-title-sm { margin: 0; font-size: clamp(1.08rem, 2.1vw, 1.26rem); color: var(--esa-adv-primary); }

.esa-adv-badge { /* carré icône animé bleu */
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  box-shadow: 0 12px 24px rgba(23,67,146,0.32), inset 0 0 0 2px rgba(255,204,0,0.25);
  background: linear-gradient(135deg, #1a4fa0, #174392);
  background-size: 200% 200%;
  animation: esaBadgeGradient 6s ease infinite;
}
.esa-adv-badge svg { width: 28px; height: 28px; }
.esa-adv-badge .icon-fill { fill: var(--esa-adv-accent); }
@keyframes esaBadgeGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.esa-adv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.esa-adv-chip { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 12px; line-height: 1; color: black; background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.655)); box-shadow: 0 1px 3px rgba(var(--esa-adv-primary-rgb), 0.12), inset 0 0 0 1px rgba(var(--esa-adv-primary-rgb), 0.18); }

.esa-adv-visual { /* conteneur image responsive avec parallax */
  position: relative; border-radius: 14px; overflow: hidden;
  aspect-ratio: 16 / 10; /* bonne proportion visuelle */
  background: rgba(255,255,255,0.5);
}
.esa-adv-visual img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 380ms var(--animation-timing), filter 380ms var(--animation-timing); }
.esa-adv-visual:hover img { transform: scale(1.06); filter: saturate(1.06) contrast(1.02); }

.esa-adv-body { color: var(--esa-adv-muted); }
.esa-adv-footer { display: flex; align-items: center; justify-content: flex-end; }
.esa-adv-cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--esa-adv-accent); text-decoration: none; }
.esa-adv-cta i { transition: transform 180ms ease; }
.esa-adv-card:hover .esa-adv-cta i { transform: translateX(4px); }

/* Accessibilité – réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
  .esa-adv-card, .esa-adv-visual img { transition: none !important; transform: none !important; }
  .esa-adv-badge { animation: none !important; }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .esa-adv-section { background: linear-gradient(180deg, rgba(20, 26, 38, 0.85) 0%, rgba(20, 26, 38, 0.92) 100%); }
  .esa-adv-title { color: #e7edf7; }
  .esa-adv-subtitle { color: #bdc7d6; }
  .esa-adv-card { color: #e7edf7; background: rgba(32, 36, 48, 0.65); border-color: rgba(231, 237, 247, 0.1); }
  .esa-adv-body { color: #c9d2e1; }
}

/* Nos Entités – design épuré (entx-*) */
#expertise { padding: 4rem 1rem; background: linear-gradient(180deg, rgba(245,249,255,0.85) 0%, rgba(240,246,255,0.95) 100%); }
#entitiesGrid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; max-width: 1100px; margin: 0 auto; }
@media (max-width: 1024px) { #entitiesGrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { #entitiesGrid { grid-template-columns: 1fr; } }

.entx-card {
  background: #ffffff;
  border: 1px solid #e6edf7;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(23,67,146,.12);
  color: #1d2c4a;
  opacity: 0; transform: translateY(10px);
  transition: transform 420ms cubic-bezier(0.22,1,0.36,1), opacity 420ms ease, box-shadow 280ms ease;
}
.entx-card.in { opacity: 1; transform: none; }
.entx-card:hover { box-shadow: 0 16px 38px rgba(23,67,146,.18); }

.entx-media { background: #f6f9ff; border-top-left-radius: 16px; border-top-right-radius: 16px; overflow: hidden; }
.entx-media img { width: 100%; height: 128px; aspect-ratio: 3/2; object-fit: cover; display: block; }
.entx-body { padding: 1rem 1rem 0.75rem; }
.entx-title { margin: 0; font-size: 1.08rem; color: #1d2c4a; }
.entx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.entx-chip { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 12px; line-height: 1; color: #1d2c4a; background: #f0f6ff; border: 1px solid #e1e9f5; }
.entx-summary { margin-top: 6px; color: #2b3a55; font-size: 0.98rem; }
.entx-actions { padding: 0.75rem 1rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entx-toggle { padding: 8px 12px; border-radius: 10px; border: 1px solid #e6edf7; background: #f8fbff; color: #1d2c4a; cursor: pointer; font-weight: 600; }
.entx-toggle[aria-expanded="true"] { background: #eef5ff; }
.entx-cta { color: #FFCC00; font-weight: 600; text-decoration: none; }

.entx-panel { margin: 0 1rem 1rem; padding: 0.75rem 0; border-top: 1px dashed #e6edf7; max-height: 0; opacity: 0; transition: max-height 260ms ease, opacity 220ms ease; }
.entx-desc { color: #2b3a55; margin-bottom: 0.5rem; }
.entx-services h4 { margin: 0.25rem 0 0.5rem; color: #1d2c4a; }
.entx-services ul { list-style: none; padding: 0; margin: 0; }
.entx-services li { display: flex; align-items: center; gap: 8px; color: #1d2c4a; }
.entx-contact { display: flex; align-items: center; gap: 12px; margin-top: 0.5rem; color: #1d2c4a; }
.entx-contact a { color: #1d2c4a; text-decoration: none; }
.entx-contact i { color: #174392; }