
/*** HOME SLIDER */

.home_slider.events-wrapper {
  margin-bottom: 20px;
}

.event-card {
  max-width: 300px;
  position: relative;
  /* border: 1px solid var(--color-neutral-5); */
}

.event-card img {
  object-fit: cover;
  height: auto;
  width: 100%;      /* image stretches to 100% of its container */
  max-width: 100%;  /* image will stretch 100% of its container until it reaches 100% of the width of the image file itself */
}

.event-card--content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.event-date {
  top: 0;
  left: 0;
  position: absolute;
  padding: 8px;
  background-color: var(--black);
  color: var(--white);
  border-bottom: 1px solid var(--white);
  border-right: 1px solid var(--white);
}

.date-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin: 0;
  color: var(--white);
}

.date-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.date-item {
  display: block;
}

.is-num {
  /* font-size: 3.6rem; */
  /* font-size: 3rem; // gere plus haut de facon responsive */
  line-height: 1;
  font-family: var(--font-monospace);
}

.is-txt {
  /* font-size: 2.4rem; */
  /* font-size: 2rem; // gere plus haut de facon responsive */
  /* line-height: .8; */
  line-height: 1;
  font-family: var(--font-monospace);
  text-transform: uppercase;
}

.date-arrow {
  display: flex;
  padding: 5px;
  /* border: solid 1px #fff; */
  align-items: center;
}

.event-info {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 80px 16px 8px 10px; /* bottom = 8px au lieu de 10px parce que les tags ont une margin-bottom de 2px  */
  width: 100%;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}

.event-title {
  /* font-size: 3rem; gere de facon responsive plus haut */
  line-height: 1;
  /* font-family: var(--font-bold); */
  font-weight: 700;
  /* text-transform: uppercase; */
}

.event-location {
  margin-bottom: 10px;
}


/* POUR LES TOUCHSCREENS **************************
   The hover feature determines whether the user’s primary pointing device is capable of hovering on the page.
   The possible values are:
   - hover (which would be true for a device with a mouse, for instance)
   - or none (which would be true for a tablet being used with touch input).
*/
@media only screen and (hover: none) and (pointer: coarse) {
  .home_slider.events-wrapper {
    display: flex;
    flex-direction: row; /* important sinon la regle "flex-direction: column" de events.css est applique pour screen < 500px */
    column-gap: 1rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; /* important for iOS devices (Apple) */
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }

  .home_slider.events-wrapper .event-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  /* Hide scrollbar for Chrome, Safari and Opera */
  .home_slider.events-wrapper::-webkit-scrollbar { /* for webkit browsers (Apple) */
      display: none;
  }
}


/******** TAGS ***************/

.tags {
  line-height: normal;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
}

.tags span,
span.tag_alert { /* span.ended_event >> colors are overwritten below */
  /*display: inline-block; // je ne comprends pas pourquoi il y a un espace entre le titre et les tags */
  /* display: inline-flex; */
  /* font-size: 1.3rem; // pas fluid pour l'instant */
  font-size: 1.2rem; /* pas fluid pour l'instant */
  /* font-size: var(--font-size-s); */
  font-weight: 700;
  text-transform: uppercase;
  /* padding: 3px 4px 2px 4px; */
  padding: .2rem .4rem .2rem .4rem;
  border: 1px solid var(--black);
  background-color: var(--white);
  color: var(--black);
}


span.tag_alert {
  /* border: 1px solid var(--red); REMPLACE PAR LES LIGNES CI-DESSOUS */
  border-width: 1px;
  border-style: solid;
  border-color: var(--red);
  background-color: var(--red);
  color: var(--white);
}

.tag_alert {
  display: inline-block;
}

.tag_alert .border_b { /* black border ****** CELA NE MARCHE PAS ******* */
  border-color: var(--black);
}



/******** EDITORIALS ***************/

.editorial-date {
  font-size: var(--font-size-base);
  color: #666;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  font-style: italic;
}


/******** LISTINGS ***************/

@media only screen and (max-width: 499px) { /* 1 colonne avec les images dont le width ne depasse pas 300px */
  .events-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
  }
  .event-title,
  .is-num {
    font-size: var(--event-card-332-500-2);
  }
  .is-txt {
    font-size: var(--event-card-332-500-1);
  }
  .event-location {
    font-size: var(--event-card-332-500-3);
  }

  /* EVENT CARD */
  .event-card {
    width: 100%;
    margin-bottom: 16px;
  }
}

@media only screen and (min-width: 500px) { /* 31.25rem */ /* 2 colonnes */
  .events-wrapper {
    width: 100%;
    /* margin: 50px auto 100px auto; >> INUTILE */
    margin-bottom: 100px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); */
    grid-template-rows: auto;
    grid-gap: 16px;
  }
  .event-title,
  .is-num {
    font-size: var(--event-card-500-660-2);
  }
  .is-txt {
    font-size: var(--event-card-500-660-1);
  }
  .event-location {
    font-size: var(--event-card-500-660-3);
  }

  /* EVENT CARD + MONTH CARD */
  .event-card {
    margin: 0 auto;
  }
}

@media only screen and (min-width: 660px) { /* 41.25rem */ /* 3 colonnes */
  .events-wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
  .event-title,
  .is-num {
    font-size: var(--event-card-660-970-2);
  }
  .is-txt {
    font-size: var(--event-card-660-970-1);
  }
  .event-location {
    font-size: var(--event-card-660-970-3);
  }
}

@media only screen and (min-width: 970px) { /* 60.625rem */ /* 4 colonnes */
  .events-wrapper {
    grid-template-columns: repeat(4, 1fr);
  }
  .event-title,
  .is-num {
    font-size: var(--event-card-970-1280-2);
  }
  .is-txt {
    font-size: var(--event-card-970-1280-1);
  }
  .event-location {
    font-size: var(--event-card-970-1280-3);
  }
}


/*** ANNOUNCEMENT */

.featured {
  margin-bottom: 4rem;
}
.featured figure {
  margin-bottom: 1rem;
}
.featured img {
  /* tres important pour que l'image soit responsive */
  width: 100%;
  height: auto;
}

.home_section {
  margin-bottom: 3rem;
}

@media only screen and (max-width: 599px) {
  .featured figure#large {
    display: none;
  }
}
@media only screen and (min-width: 600px) {
  .featured figure#small {
    display: none;
  }
}
