
/*** EVENT CARD + EVENT-MONTH-CARD */

.event-month-card {
  background-color: var(--white);
  max-width: 300px;
  padding: 2rem;
  /* border: 2px dashed var(--color-neutral-5); */
  border: 1px solid var(--color-neutral-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* color: var(--color-neutral-5); */
  color: var(--black);
}

.event-month-card .month-year {
  /* font-size is responsive > cf. media queries below */
  display: flex;
  flex-direction: row;
  align-items: center;
  column-gap: 1rem;
  flex-wrap: wrap;
}

.event-month-card .public-holidays {
  font-size: 1.4rem;
  color: var(--black);
}

.event-month-card .public-holidays .title {
  font-weight: 600;
  display: block;
}

.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;
}


/*** NEW MOBILE LAYOUT **************************************************************************/


@media only screen and (max-width: 410px) {
  .date-wrapper {
    display: grid;
    grid-template-columns: 24px 1fr;
    grid-column-gap: 0px;
    grid-row-gap: 4px;
  }

  .date-wrapper > time:nth-child(1) {
    grid-area: 1 / 1 / 2 / 3;
  }

  .date-wrapper > span {
    grid-area: 2 / 1 / 3 / 2;
  }

  .date-wrapper > time:nth-child(2) {
    grid-area: 2 / 2 / 3 / 3;
  }

  .date-arrow {
    padding: 0 4px 0 4px;
  }
}

@media only screen and (max-width: 768px) {

  .events-wrapper:not(.home_slider) .event-month-card {
    max-width: none;
    margin-bottom: 16px;
  }

  .events-wrapper:not(.home_slider) .event-card  {
    width: 100%;
    margin-bottom: 16px;
    max-width: calc(100vw - 32px)
  }

  .events-wrapper:not(.home_slider) .event-card a {
    display: flex;
    flex-direction: row; /* Layout the flex items horizontally */
    align-items: flex-start; /* Align items at the start of the cross-axis */
    gap: 16px; /* Add some space between the image and the content */
  }

  .events-wrapper:not(.home_slider) .event-card figure {
    margin: 0; /* Remove default margins */
    flex: 0 0 auto; /* Prevent the figure from shrinking */
  }

  .events-wrapper:not(.home_slider) .event-card--content {
    /* flex: 1; Allow the content to grow to fill available space */
    display: flex;
    flex-direction: column; /* Ensure the content is stacked vertically */
  }

  .events-wrapper:not(.home_slider) .event-info {
    position: static; /* Remove absolute positioning */
    padding: 0; /* Reset padding */
    background: none; /* Remove background */
    color: var(--black); /* Adjust text color if needed */
  }

  .events-wrapper:not(.home_slider) .event-date {
    position: static; /* Make date flow naturally with content */
    margin-bottom: 8px; /* Add spacing */
    padding: 4px;
    border: 0;
  }

  .events-wrapper:not(.home_slider) .date-group {
    flex-direction: row;
    justify-content: flex-start;
    gap: 4px;
    flex-wrap: wrap;
    /* align-items: center; */
  }

  .events-wrapper:not(.home_slider) .date-arrow {
    padding: 0 4px 0 4px;
  }

  .event-date {
    border-radius: 5px;
  }
}
/*** FIN NEW LAYOUT **************************************************************************/



/******** EVENT LISTINGS ***************/

/* EVENTS-WRAPPER */

@media only screen and (max-width: 768px) { /* 1 colonne avec les images dont le width est 140px */
  .events-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
  }
  .event-title {
    font-size: var(--space-l);
  }

  .is-num,
  .is-txt {
    font-size: var(--font-size-base);
  }
  .event-location {
    font-size: var(--font-size-s);
  }

  /* MONTH CARD */
  .event-month-card {
    width: 100%;
    margin-bottom: 16px;
  }
  .event-month-card .month-year-arrow {
    display: none;
  }
  .event-month-card .month-year {
    font-size: 4rem;
  }
  .event-month-card .public-holidays {
    margin-top: 2.5rem;
  }
}


@media only screen and (min-width: 769px) { /* 3 colonnes */
  .events-wrapper {
    width: 100%;
    /* margin: 50px auto 100px auto; >> INUTILE */
    margin-bottom: 50px;
    display: grid;
    grid-template-columns: repeat(3, 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-660-970-2);
  }
  .is-txt {
    font-size: var(--event-card-660-970-1);
  }
  .event-location {
    font-size: var(--event-card-660-970-3);
  }

  /* EVENT CARD + MONTH CARD */
  .event-month-card .month-year {
    font-size: var(--event-card-660-970-4);
  }
}

@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);
  }

  /* EVENT CARD + MONTH CARD */
  .event-month-card .month-year {
    font-size: var(--event-card-970-1280-4);
  }
}

/* EVENTS-CALENDAR */

.event-cal {
  display: flex;
  flex-direction: column;
  row-gap: .5rem;
}


/* EVENTS-FOOTER */

.events-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.events-footer a {
  color: var(--black);
  font-weight: 700;
  /* font-size: 5rem; */
  font-size: var(--font-size-xl);
  text-decoration: none;
}

.events-footer--nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}


/* pour mettre un peu d'espace entre le message "No records" et le lien vers les archives */
.sg-event.no-results {
  margin-bottom: 50px;
}

/******** EVENT PAGE ***************/

.grid-col-m-t-d { /* responsive grid => m-t-d = mobile-tablet-desktop */
  display: grid;
  grid-gap: 16px;
}

@media only screen and (max-width: 499px) { /* 1 colonne avec une image en haut sur 100% de l'ecran (width) */
  .grid-col-m-t-d {
    grid-template-columns: minmax(0,1fr);
  }
}

@media only screen and (min-width: 500px) { /* 1 colonne avec une image en haut dont le width n'excede pas 468px */
  .grid-col-m-t-d {
    grid-template-columns: minmax(0,1fr);
  }
  .sg-event-picture img {
    max-width: 468px;
  }
}

@media only screen and (min-width: 800px) { /* 2 colonnes: 1/2 + 1/2 */
  .grid-col-m-t-d {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media only screen and (min-width: 900px) { /* 2 colonnes: 2/5 + 3/5 */
  .grid-col-m-t-d {
    grid-template-columns: minmax(0,2fr) minmax(0,3fr);
  }
}

.sg-event-content {
  /*
  font-size: 2rem;
  line-height: 1.5;
  */
  /* it inherits from body >> --font-size-base, line-height */
}

.sg-event-content--title {
  margin-bottom: 1rem;
}

.sg-event-content--title h1 {
  font-weight: 500;
  /* letter-spacing: -.25rem; */
  line-height: 1;
  /* font-size: 6rem; */
  font-size: var(--font-size-2xl);
  /* text-transform: uppercase; */
}



/*
max-height: 100%; + max-width: 100%; + height: auto; + width: auto;
make the img scale to whichever dimension first reaches 100% while keeping the aspect ratio
mais l'image n'occupe pas forcement tout le width.

width: 100%; + max-height: 100%; + height: auto;
l'image occupe tout le width mais le height peut etre tres grand

object-fit: contain; + object-position: top;
l'image occupe tout le width mais il y a un espace qui peut apparaitre en dessous lorsqu'on sous-dimenssionne
*/
.sg-event-picture img {
  /*
  object-fit: contain;
  object-position: top;
  */
  width: 100%;
  max-height: 100%;
  height: auto;

}



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

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

.tags a,
.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-weight: 700;
  text-transform: uppercase;
  display: inline-flex; /* Ensures same height */
  align-items: center;  /* Align text vertically */
  justify-content: center;
  border: 1px solid var(--black);
  background-color: var(--white);
  color: var(--black);
  box-sizing: border-box;
  border-radius: 5px;
}

.tags span {
  font-size: 1.2rem; /* pas fluid pour l'instant */
  /* font-size: var(--font-size-s); */
  /* padding: 3px 4px 2px 4px; */
  padding: 0.2rem 0.4rem;
}

.tags.xl span {
  /* font-size: 1.5rem; */
  font-size: var(--font-size-s);
  padding: .5rem .5rem .4rem .5rem;
}

/* Remove inner border from <span> inside <a> */
.tags a span {
  border: none;
}

/* Ensure the entire <a> changes on hover */
.tags a:hover {
  background-color: var(--black);
  color: var(--white);
}

/* Ensure inner <span> inside <a> does NOT override the <a> */
.tags a:hover span {
  background-color: transparent; /* Prevents a second layer of background */
  color: inherit; /* Inherits white from <a> */
}

.tags a:hover:has(span.alltags) {
  border-color: var(--black);
  background-color: var(--black);
  color: var(--white);
}

/* This will work if the :has() selector is supported */
.tags a:has(span.active),
.tags a:has(span.alltags.active) {
  border-color: var(--black); /* important for span.alltags.active */
  background-color: var(--black);
  color: var(--white);
}
.tags a span.active,
.tags a span.alltags.active {
  background-color: transparent; /* Prevents a second layer of background */
  color: inherit; /* Inherits white from <a> */
}

/* Inactive spans (non-clickable) for navbar event archives calendar */
.event-cal .tags span:not(a span) {
  background-color: #f5f5f5; /* Light grey background */
  color: #888888; /* Darker grey text */
  border: 1px solid #dcdcdc; /* Lighter grey border to maintain consistency */
  cursor: default;
  pointer-events: none; /* to prevent PageSpeed to flag it as "Background and foreground colors do not have a sufficient contrast ratio." */
}

.tags a:has(span.alltags) {
  border-color: var(--red);
  background-color: var(--red);
  color: var(--white);
  padding: 0.2rem 0.4rem;
}
.tags a span.alltags {
  background-color: transparent; /* Prevents a second layer of background */
  color: inherit; /* Inherits white from <a> */
}


/******** TAGS FOR ARCHIVES (NAVIGATION BAR) ***************/

/* ─────────────────────────────────────────────────
   YEAR BAR (Coral Tones)
   ───────────────────────────────────────────────── */

/* Define the “main” color for the Year bar */
.tags.year-bar {
  --tag-color: #E63946; /* coral-600 */
}

/* 1. Non‐clickable span (light coral tint) */
.event-cal .tags.year-bar span:not(a span) {
  background-color: #FFF1F1; /* very pale coral */
  color:            #D46A6F; /* muted coral text */
  border-color:     #FFDEDE; /* light coral border */
  cursor:           default;
  pointer-events:   none;
}

/* 2. Clickable span (unselected: mid-tone coral) */
/* Override the default .tags a border/background/color */
.tags.year-bar a {
  border:           1px solid var(--tag-color);
  background-color: transparent;
}
.tags.year-bar a span {
  background-color: transparent;
  color:            var(--tag-color);
  cursor:           pointer;
}

/* Hover on clickable: white text on coral background, border matches */
.tags.year-bar a:hover {
  background-color: var(--tag-color);
  border-color:     var(--tag-color);
}
.tags.year-bar a:hover span {
  background-color: var(--tag-color);
  color:            #FFFFFF;
}

/* 3. Active span: use mid-tone coral as background, text white, border matches */
.tags.year-bar span.active {
  background-color: var(--tag-color);
  color:            #FFFFFF;
  border-color:     var(--tag-color);
  cursor:           default;
  pointer-events:   none;
}

/* When a child span is .active, ensure the anchor’s background/border also use the “main” color */
.tags.year-bar a:has(span.active) {
  background-color: var(--tag-color);
  border-color:     var(--tag-color);
}



/* ─────────────────────────────────────────────────
   MONTH BAR (Teal Tones)
   ───────────────────────────────────────────────── */

/* Define the “main” color for the Month bar */
.tags.month-bar {
  --tag-color: #2F9E8C; /* teal-600 */
}

/* 1. Non-clickable span (light teal tint) */
.event-cal .tags.month-bar span:not(a span) {
  background-color: #E8FFFB; /* very pale teal */
  color:            #58C4AE; /* muted teal text */
  border-color:     #CAF7EE; /* light teal border */
  cursor:           default;
  pointer-events:   none;
}

/* 2. Clickable span (unselected: mid-tone teal) */
.tags.month-bar a {
  border:           1px solid var(--tag-color);
  background-color: transparent;
}
.tags.month-bar a span {
  background-color: transparent;
  color:            var(--tag-color);
  cursor:           pointer;
}

/* Hover on clickable: white text on teal background, border matches */
.tags.month-bar a:hover {
  background-color: var(--tag-color);
  border-color:     var(--tag-color);
}
.tags.month-bar a:hover span {
  background-color: var(--tag-color);
  color:            #FFFFFF;
}

/* 3. Active span: use mid-tone teal as background, text white, border matches */
.tags.month-bar span.active {
  background-color: var(--tag-color);
  color:            #FFFFFF;
  border-color:     var(--tag-color);
  cursor:           default;
  pointer-events:   none;
}

/* When a child span is .active, ensure the anchor’s background/border also use the “main” color */
.tags.month-bar a:has(span.active) {
  background-color: var(--tag-color);
  border-color:     var(--tag-color);
}



/* ─────────────────────────────────────────────────
   TYPE BAR (Navy Tones)
   ───────────────────────────────────────────────── */

/* Define the “main” color for the Type bar */
.tags.type-bar {
  --tag-color: #2E3B5F; /* navy-600 */
}

/* 1. Non-clickable span (light navy tint) */
.event-cal .tags.type-bar span:not(a span) {
  background-color: #F1F3F7; /* very pale navy */
  color:            #5A6A8C; /* muted navy text */
  border-color:     #DCDDE3; /* light navy border */
  cursor:           default;
  pointer-events:   none;
}

/* 2. Clickable span (unselected: mid-tone navy) */
.tags.type-bar a {
  border:           1px solid var(--tag-color);
  background-color: transparent;
}
.tags.type-bar a span {
  background-color: transparent;
  color:            var(--tag-color);
  cursor:           pointer;
}

/* Hover on clickable: white text on navy background, border matches */
.tags.type-bar a:hover {
  background-color: var(--tag-color);
  border-color:     var(--tag-color);
}
.tags.type-bar a:hover span {
  background-color: var(--tag-color);
  color:            #FFFFFF;
}

/* 3. Active span: use mid-tone navy as background, text white, border matches */
.tags.type-bar span.active {
  background-color: var(--tag-color);
  color:            #FFFFFF;
  border-color:     var(--tag-color);
  cursor:           default;
  pointer-events:   none;
}

/* When a child span is .active, ensure the anchor’s background/border also use the “main” color */
.tags.type-bar a:has(span.active) {
  background-color: var(--tag-color);
  border-color:     var(--tag-color);
}







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);
  padding: 0.2rem 0.4rem;
}

.tag_alert {
  display: inline-block;
  font-size: var(--font-size-xs)
}

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

.sg-event-content--date {
  display: flex;
  flex-direction: column;
  /* font-size: 3rem; */
  font-size: var(--font-size-m);
  line-height: 1;
  /*
  border-top: 2px solid #e44218;
  border-bottom: 2px solid #e44218;
  text-transform: uppercase;
  */
}

.sg-event-content--date span.date_prefix {
  font-weight: 400;
  /* font-size: 1.6rem; */
  font-size: var(--font-size-s);
  line-height: 1;
  text-transform: uppercase;
  color: var(--color-neutral-7);
}

.mb-1 {
  margin-bottom: 1rem;
}
.mb-2 {
  margin-bottom: 2rem;
}

.sg-event-content--info  {
  font-size: var(--font-size-s);
}


.sg-event-content--descro {
  /* font-size: 2.4rem; */
  font-size: var(--font-size-base);
  line-height: 1.5;
}

.event-info-wrapper {
  display: grid;
  grid-template-columns: min-content 1fr;
  grid-template-rows: auto;
  gap: 5px 5px;
}

/* pour aligner le text dans le div */
.event-info-wrapper > div {
  align-self: center; /* column-axis */
}

.event-info-wrapper a {
  text-decoration: none;
  color: inherit;
}

.event-info-wrapper a:hover {
  text-decoration: underline;
}

/* pour aligner les svg dans le div (DEJA FAIT DANS styles.css > .svg-icons)
.event-info-wrapper > div > svg {
  display: block;
  margin: auto;
}
 */

/* pour aligner les svg en haut */
.event-info-wrapper > div.vertical-align-top {
  /* margin: .5rem auto auto auto; */
  margin: .1rem auto auto auto;
}


.sg-event-artists--item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr)); /* l'espace est partage en 2 */
  grid-gap: 32px;
  padding-bottom: 1.5rem;
  padding-top: 1.5rem;
}

.artist-content h2 {
  font-weight: 500;
  line-height: 1;
  font-size: 4rem;
  /* text-transform: uppercase; */
}

.b-t-2 {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--black);
}

#sg-event-nav {
  display: flex;
  width: 100%;
  justify-content: space-between;
}

#sg-event-nav > div {
  display: flex;
  column-gap: 8px;
}


/******** LINE-UP - LISTE DES ARTISTES OU OEUVRES (films etc...) ***************/

.sg-event-lineup-subtitle {
  font-size: var(--font-size-s);
  margin-bottom: 1rem;
}

.sg-event-lineup-subtitle-time {
  margin-bottom: 1rem;
}

.lineup_section {
  background-color: #0073e6;
  color: #ffffff;
}

@media only screen and (max-width: 800px) {
  .lineup_section div:first-of-type {
    display: none;
  }

  .lineup_section {
    text-align: center;
  }
}

/* different layouts to display artist picture and content */
@media only screen and (min-width: 500px) and (max-width: 799px) {
  .float-l { /* float-l = float-left */
    float: left;
    margin-right: 2rem;
  }
  .inline {
    display: inline;
  }
  .clearfix::after { /* clearfix is for the container that has a float element */
    content: "";
    display: block;
    clear: both;
  }
}
@media only screen and (min-width: 800px) {
  .sg-event-lineup-picture {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Y axis */
    align-items: flex-end; /* X axis */
    gap: 1rem;
  }
}

/* left margin for the pictures in order to align the big event picture with the small pictures of the artists */
@media only screen and (min-width: 1218px) and (max-width: 1279px) { /* ca marche */
  .sg-event-lineup-picture {
    margin-right: calc((((100vw - 48px) / 5) * 2) - 468px);
  }
}
@media only screen and (min-width: 1280px) {
  .sg-event-lineup-picture {
    margin-right: 25px;
  }
}
ul#lineup-anchor {
  list-style-type: disc;
  list-style-position: outside;
  margin-left: 24px;
  margin-bottom: 4rem;
}
ul#lineup-anchor li {
  margin-bottom: 1rem;
}

.sg-event-lineup-picture figcaption {
  font-size: var(--font-size-xs);
  color: var(--neutral);
}



/******** EVENT PROGRAMME ***************/

/* regle qui ne s'applique pas au premier div */
div.programme_section ~ div.programme_section {
  margin-top: 3rem;
}

.programme_section {
  margin-bottom: 1.5rem;
  background-color: #202830;
  /* [OLD 12-10-2024] background-color: #0073e6; */
  color: #ffffff;
}

@media only screen and (max-width: 800px) {
  .programme_section div:first-of-type {
    display: none;
  }

  .programme_section {
    text-align: center;
  }
}

@media only screen and (max-width: 799px) {
  .nogap {
    grid-gap: 0;
  }
}

@media only screen and (min-width: 800px) {
  .prog-time {
    text-align: right;
  }

  .prog-mt-1 > p {
    margin-top: var(--space-2xs);
  }
}

.prog-title {
  font-weight: 600;
}

.prog-content > p {
  font-size: var(--font-size-s);
}
