/* =========================
   TRAVAUX.CSS
========================= */

/* ─── Corps de page ─────────────────────────────────────────── */

.tr-body {
  background: var(--bg-page);
  padding: 56px 0 80px;
}

/* ─── Intro ─────────────────────────────────────────────────── */

.tr-intro {
  text-align: center;
  margin-bottom: 48px;
}

/* h2 Marcellus → hérite de base.css, pas de font-size */
.tr-intro__heading {
  margin: 0 0 20px;
}

/* p → hérite de base.css */
.tr-intro__text {
  line-height: 1.7;
  margin: 0;
  max-width: 680px;
  margin-inline: auto;
}

/* ─── Grille de cartes ──────────────────────────────────────── */

.tr-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 64px;
}

/* ─── Carte : photo en haut + corps sur fond décoratif ─────── */

.tr-card {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

/* Photo du haut */
.tr-card__visual {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

/* Corps : fond décoratif à 40% via ::before, contenu z-index: 1 */
.tr-card__body {
  flex: 1;
  position: relative;
  background-color: var(--bg-page);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 20px 28px;
  gap: 16px;
}

.tr-card__body::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--tr-card-fond);
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: 0;
}

/* Tous les enfants directs au dessus du fond */
.tr-card__body > * {
  position: relative;
  z-index: 1;
}

/* h3 Roboto Bold → px explicites */
.tr-card__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

/* p → hérite de base.css */
.tr-card__text {
  line-height: 1.7;
  color: var(--text);
  margin: 0;
  flex: 1;
}

/* ─── Section basse [texte | image | texte] ─────────────────── */

.tr-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.tr-bottom__left,
.tr-bottom__right {
  max-width: 560px;
  width: 100%;
}

.tr-bottom__img {
  width: 100%;
  max-width: 380px;
}

.tr-bottom__img img {
  width: 100%;
  height: auto;
  display: block;
}

/* h3 Roboto Bold → px explicites */
.tr-bottom__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.3;
}

/* p → hérite de base.css */
.tr-bottom__text {
  line-height: 1.75;
  margin: 0;
}

/* ─── Tablettes 768px ───────────────────────────────────────── */

@media (min-width: 768px) {
  .tr-body {
    padding: 72px 0 96px;
  }

  .tr-cards {
    gap: 36px; /* plus de gap */
    margin-bottom: 72px;
  }

  /* Cartes plus étroites que la pleine largeur */
  .tr-card {
    width: 85%;
    max-width: 560px;
  }

  .tr-card__visual {
    aspect-ratio: 4 / 3;
  }

  .tr-card__title {
    font-size: 26px;
  }

  .tr-bottom__title {
    font-size: 26px;
  }

  .tr-bottom__img {
    max-width: 440px;
  }
}

@media (min-width: 820px) {
  .tr-cards {
    gap: 44px; /* encore plus */
  }

  .tr-card {
    max-width: 600px;
  }

  .tr-card__title {
    font-size: 28px;
  }

  .tr-bottom__title {
    font-size: 28px;
  }
}

@media (min-width: 992px) {
  .tr-body {
    padding: 80px 0 100px;
  }

  .tr-cards {
    gap: 52px; /* encore plus */
    margin-bottom: 80px;
  }

  .tr-card {
    max-width: 660px;
  }

  /* h3 = 32px à 992px comme demandé */
  .tr-card__title {
    font-size: 32px;
  }

  .tr-bottom__title {
    font-size: 32px;
  }

  .tr-bottom__img {
    max-width: 500px;
  }
}

/* ─── Desktop 1200px ────────────────────────────────────────── */

@media (min-width: 1200px) {
  .tr-body {
    padding: 88px 0 110px;
  }

  .tr-intro {
    margin-bottom: 56px;
  }

  /* 3 colonnes égales */
  .tr-cards {
    flex-direction: row;
    align-items: stretch;
    gap: 28px;
    margin-bottom: 88px;
  }

  .tr-card {
    flex: 1;
    width: auto;
    max-width: none;
  }

  .tr-card__visual {
    aspect-ratio: 4 / 3;
  }

  .tr-card__title {
    font-size: 20px;
  }

  /* Section basse horizontale */
  .tr-bottom {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }

  .tr-bottom__left {
    flex: 1;
    max-width: none;
    text-align: left;
  }

  .tr-bottom__right {
    flex: 1;
    max-width: none;
    text-align: right; /* aligné à droite en desktop */
  }

  .tr-bottom__img {
    flex: 0 0 480px;
    max-width: 480px;
  }

  .tr-bottom__title {
    font-size: 20px;
  }
}
