/*
 * Section: Carte évènement (2 cartes)
 * Fichier: assets/css/carte-evenement.css
 *
 * Override du composant nt-media-text pour coller à la maquette.
 * Carte 1 : image gauche, texte centré, fond blanc
 * Carte 2 : image droite, texte justifié aligné gauche, fond gris
 */

/* =====================================================================
   IMPORT DES POLICES GOOGLE FONTS
   Lato (kicker + texte) et Playfair Display (titre principal)
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;600&family=Playfair+Display:wght@400;700&display=swap');

/* =====================================================================
   SECTION WRAPPER
   Respiration verticale autour de toute la section
   ===================================================================== */
.carte-evenement-section {
  padding: clamp(34px, 5vw, 70px) 0;
}

/* Retire le padding horizontal du container Bootstrap pour que les cartes
   aillent bord à bord (correspondent à la maquette qui n'a pas de gouttières) */
.carte-evenement-section > .container {
  padding-left: 0;
  padding-right: 0;
  max-width: 100%;
}

/* =====================================================================
   ESPACEMENT ENTRE LES 2 CARTES
   Zéro gap : les cartes se collent verticalement comme sur la maquette
   ===================================================================== */
.carte-evenement__card {
  margin: 0 auto;
}

.carte-evenement__card + .carte-evenement__card {
  margin-top: 0;
}

/* =====================================================================
   VARIABLES COMMUNES AUX 2 CARTES
   Taille des textes, hauteur image, espacement interne
   ===================================================================== */
.carte-evenement__card.nt-media-text {
  --nt-mt-gap: 0px;
  --nt-mt-padding: clamp(36px, 5vw, 80px);
  --nt-mt-media-min-height: clamp(460px, 50vw, 600px);
  --nt-mt-kicker-size: 0.72rem;
  --nt-mt-kicker-letter-spacing: 0.18em;
  --nt-mt-text-size: 0.95rem;
  --nt-mt-text-line: 1.7;
}

/* Force l'image à remplir toute la hauteur de la colonne grid,
   même si le bloc texte en face est plus haut */
.carte-evenement__card .nt-media-text__media {
  min-height: clamp(460px, 50vw, 600px);
  height: 100%;
}

/* Annule tout ratio carré forcé par Bootstrap ou un autre CSS */
.carte-evenement__card .nt-media-text__img {
  aspect-ratio: unset;
  height: 100%;
  object-fit: cover;
}

/* =====================================================================
   CARTE 1 : image gauche – fond blanc – contenu CENTRÉ
   ===================================================================== */
.carte-evenement__card--1.nt-media-text {
  --nt-mt-content-bg: #f2f2f2;
}

.carte-evenement__card--1 .carte-evenement__kicker,
.carte-evenement__card--1 .nt-media-text__kicker {
  text-align: center;
}

.carte-evenement__card--1 .carte-evenement__title,
.carte-evenement__card--1 .nt-media-text__title {
  text-align: center;
}

.carte-evenement__card--1 .carte-evenement__text,
.carte-evenement__card--1 .nt-media-text__text {
  text-align: center;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.carte-evenement__card--1 .carte-evenement__actions {
  text-align: center;
}

/* =====================================================================
   CARTE 2 : image droite – fond gris – contenu ALIGNÉ À GAUCHE + justifié
   ===================================================================== */
.carte-evenement__card--2.nt-media-text {
  --nt-mt-content-bg: #f2f2f2;
}

.carte-evenement__card--2 .carte-evenement__kicker,
.carte-evenement__card--2 .nt-media-text__kicker {
  text-align: center;
}

.carte-evenement__card--2 .carte-evenement__title,
.carte-evenement__card--2 .nt-media-text__title {
  text-align: center;
}

/* Texte justifié comme sur la maquette (rendu "éditorial") */
.carte-evenement__card--2 .carte-evenement__text,
.carte-evenement__card--2 .nt-media-text__text {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  max-width: 26rem;
  margin-left: 0;
  margin-right: auto;
}

.carte-evenement__card--2 .carte-evenement__actions {
  text-align: left;
}

/* =====================================================================
   TYPOGRAPHIE — KICKER (petit libellé au-dessus du titre)
   Police : Lato, 14px, doré, lettres espacées
   ===================================================================== */
.carte-evenement__kicker {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #b08c57;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* =====================================================================
   TYPOGRAPHIE — TITRE PRINCIPAL
   Police : Playfair Display, 41px, noir
   ===================================================================== */
.carte-evenement__title,
.carte-evenement__card .nt-media-text__title {
  font-family: 'Playfair Display', serif;
  font-size: 35px;
  font-weight: 400;          /* Playfair Display 400 = élégant, pas trop gras */
  line-height: 1.2;
  color: #111;
  margin-bottom: 28px;
}

/* =====================================================================
   TYPOGRAPHIE — TEXTE COURANT
   Police : Lato, 13px
   ===================================================================== */
.carte-evenement__text,
.carte-evenement__card .nt-media-text__text {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  line-height: 1.75;
}

/* Paragraphes du texte */
.carte-evenement__text p {
  margin-bottom: 1em;
}

.carte-evenement__text p:last-child {
  margin-bottom: 0;
}

/* =====================================================================
   LIEN "lire la suite"
   Italique doré, même police Lato que le texte courant
   ===================================================================== */
.carte-evenement__readmore {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: #b08c57;
  text-decoration: none;
  font-style: italic;
  white-space: nowrap;
}

.carte-evenement__readmore:hover {
  text-decoration: underline;
}

/* =====================================================================
   BOUTON
   Lato uppercase, fond doré
   ===================================================================== */
.carte-evenement__actions {
  margin-top: 32px;
}

.carte-evenement__btn {
  display: inline-block;
  padding: 13px 30px;
  background: #b08c57;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 2px;
}

.carte-evenement__btn:hover {
  filter: brightness(0.92);
  color: #fff;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

/* Tablette : padding réduit, hauteur image ajustée */
@media (max-width: 991.98px) {
  .carte-evenement__card.nt-media-text {
    --nt-mt-padding: clamp(24px, 4vw, 48px);
    --nt-mt-media-min-height: clamp(320px, 44vw, 480px);
  }

  .carte-evenement__card .nt-media-text__media {
    min-height: clamp(320px, 44vw, 480px);
  }

  /* Titre légèrement réduit sur tablette */
  .carte-evenement__title,
  .carte-evenement__card .nt-media-text__title {
    font-size: 34px;
  }
}

/* Mobile : empilage vertical, tout recentré */
@media (max-width: 767.98px) {
  .carte-evenement-section > .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Titre encore réduit sur mobile pour éviter les débordements */
  .carte-evenement__title,
  .carte-evenement__card .nt-media-text__title {
    font-size: 28px;
  }

  /* La carte 2 repasse en centré sur mobile pour la lisibilité */
  .carte-evenement__card--2 .carte-evenement__kicker,
  .carte-evenement__card--2 .nt-media-text__kicker,
  .carte-evenement__card--2 .carte-evenement__title,
  .carte-evenement__card--2 .nt-media-text__title,
  .carte-evenement__card--2 .carte-evenement__actions {
    text-align: center;
  }

  .carte-evenement__card--2 .carte-evenement__text,
  .carte-evenement__card--2 .nt-media-text__text {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  margin-left: auto;
  margin-right: auto;
  max-width: none;
}

  /* =====================================================
     CORRECTION MOBILE TITRES + TEXTE (surcharge media-text.css)
     ===================================================== */

  /* Bloc 1 : titres centrés */
  .carte-evenement__card--1 .nt-media-text__kicker,
  .carte-evenement__card--1 .nt-media-text__title {
    text-align: center !important;
  }

  /* Bloc 2 : titres centrés */
  .carte-evenement__card--2 .nt-media-text__kicker,
  .carte-evenement__card--2 .nt-media-text__title {
    text-align: center !important;
  }

  /* Bloc 2 : texte justifié */
  .carte-evenement__card--2 .nt-media-text__text {
    text-align: justify !important;
    text-justify: inter-word;
    hyphens: auto;
  }
}