/* ============================================================
   pages/activities.css — Damier des domaines + sections
   ============================================================ */

/* ── TEXTE D'INTRO (page-header, plusieurs paragraphes) ── */
.page-header-text {
  margin-top: 12px;
}

.page-header-text p {
  line-height: 1.7;
  margin-bottom: 14px;
}

.page-header-text p:last-child {
  margin-bottom: 0;
}

/* ── EN-TÊTES DES SECTIONS (Research / Teaching) ── */
.activities-section {
  padding-top: 64px;
  scroll-margin-top: 108px;   /* évite que la navbar fixe masque le titre */
}

.activities-section + .activities-section {
  padding-top: 32px;
  padding-bottom: 32px;
}

.activities-section-head {
  padding: 0 max(24px, calc((100% - 912px) / 2));
  margin-bottom: 32px;
}

/* ── DAMIER ── */
/* Même forme (coins arrondis) et même espacement (gap: 20px) que
   .equip-grid / a.equip-card sur equipment.html. */
.domains-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 max(24px, calc((100% - 912px) / 2));
}

#teaching-mosaic {
  grid-template-columns: repeat(3, 1fr);
}

.domain-tile {
  position: relative;
  height: 320px;
  overflow: hidden;
  cursor: pointer;
  display: block;
  text-decoration: none;
  border-radius: 12px;
}

/* ── IMAGE DE FOND ── */
.domain-tile-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}

.domain-tile:hover .domain-tile-bg {
  transform: scale(1.06);
}

/* ── OVERLAY ── */
.domain-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 15, 25, 0.85) 0%,
    rgba(10, 15, 25, 0.3) 50%,
    rgba(10, 15, 25, 0.1) 100%
  );
  transition: background 0.4s ease;
}

.domain-tile:hover .domain-tile-overlay {
  background: linear-gradient(
    to top,
    rgba(10, 15, 25, 0.92) 0%,
    rgba(10, 15, 25, 0.55) 50%,
    rgba(10, 15, 25, 0.25) 100%
  );
}

/* ── CONTENU TEXTE ── */
.domain-tile-content {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 68%;
  padding: 14px 18px;
  background: rgba(10, 15, 25, 0.45);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.domain-tile:hover .domain-tile-content {
  opacity: 1;
}

.domain-tile-num {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
  display: block;
}

.domain-tile-title {
  font-size: 1.1rem;
  font-weight: 300;
  color: white;
  line-height: 1.3;
  margin-bottom: 6px;
}

.domain-tile-title em {
  font-style: italic;
  color: var(--teal);
}

.domain-tile-desc {
  font-size: 0.82rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  margin-bottom: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, margin-bottom 0.4s ease, opacity 0.4s ease;
}

.domain-tile:hover .domain-tile-desc {
  max-height: 120px;
  margin-bottom: 16px;
  opacity: 1;
}

.domain-tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--teal);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.domain-tile:hover .domain-tile-cta {
  opacity: 1;
  transform: translateY(0);
}

/* ── NUMÉRO DÉCORATIF ── */
.domain-tile-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 3rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.08);
  line-height: 1;
  user-select: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  #teaching-mosaic { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .domains-mosaic,
  #teaching-mosaic { grid-template-columns: 1fr; }
  .domain-tile    { height: 260px; }
}
