/* Navigation autonome. Source SCSS volontairement compatible CSS, sans dépendance Sass. */
#mobile-menu-toggle {
  display: none;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  cursor: pointer;
}

#mobile-menu-toggle .burger-line {
  display: block;
  width: 28px;
  height: 3px;
  margin: 0;
  border-radius: 1px;
  background: currentColor;
  transform: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#mobile-menu-toggle.open .burger-line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
#mobile-menu-toggle.open .burger-line:nth-child(2) {
  opacity: 0;
}
#mobile-menu-toggle.open .burger-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

#bones-primary-navigation {
  display: block;
  position: static;
  top: auto;
  right: auto;
  box-sizing: border-box;
  width: 100%;
  padding: 0;
  background: #fff;
  box-shadow: none;
}

#mobile-menu-toggle:focus-visible,
#bones-primary-navigation a:focus-visible {
  outline: 3px solid #323944;
  outline-offset: 3px;
}

/* Use the compact menu before the desktop navigation no longer fits beside the logo. */
@media screen and (max-width: 1029px) {
  .header #inner-header {
    position: relative;
  }
  .bones-navigation-enhanced #mobile-menu-toggle {
    display: flex;
    position: absolute;
    top: 48px;
    right: 10px;
    z-index: 1001;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  #bones-primary-navigation {
    clear: both;
    padding: 12px 0;
  }
  .bones-navigation-enhanced #bones-primary-navigation {
    display: none !important;
  }
  .bones-navigation-enhanced #bones-primary-navigation.active {
    display: block !important;
  }
  #bones-primary-navigation a {
    min-height: 44px;
  }
}

@media screen and (min-width: 1030px) {
  #bones-primary-navigation li:focus-within > ul {
    visibility: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  #mobile-menu-toggle .burger-line {
    transition: none;
  }
}

@media print {
  #mobile-menu-toggle,
  #bones-primary-navigation {
    display: none !important;
  }
}

@media screen and (max-width: 1029px) {
  .header #inner-header { height: auto; min-height: 140px; }
  .header #logo { width: 96px; position: static; float: none; height: auto; line-height: normal; padding-top: 15px; }
  .header #right { float: none; width: 100%; padding: 0; }
  .header .lang-switcher { position: absolute; top: 12px; right: 10px; width: auto; }
  #bones-primary-navigation { float: none; text-align: left; }
  #bones-primary-navigation > ul { margin: 0; float: none; width: 100%; height: auto; }
  #bones-primary-navigation li { float: none; display: block; }
  #bones-primary-navigation li ul { position: static; visibility: visible; width: auto; background: transparent; }
}

/* One continuous footer background, with credits in a separate colophon. */
.footer, .footer #inner-footer, .footer #colophon { background-color: #000; color: #f8f9fa; }
.footer #inner-footer { padding: 1.5em 0; }
.footer .newsletter-widget { float: none; width: 100%; }
.footer #colophon { clear: both; border-top: 1px solid #444; padding: 1em; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5em 2em; }
.footer #colophon p { margin: 0; }
.footer #colophon a { color: #f8f9fa; }
.footer #inner-footer #sib-container a { color: #263746; text-decoration: underline; }

@media screen and (min-width: 768px) {
  .gallery-past-grid { display: flex; flex-wrap: wrap; }
  .gallery-past-grid > article { float: none; }
}

/* Same presentation card and lateral shadow as the Collector Box introduction. */
.gallery-description { box-shadow: -5px 0 5px -2px #ccc; }

/* A missing date leaves the same visible black band underneath the card. */
.home-big-format > .article-footer .event_date,
.home-small-format > .article-footer .event_date { min-height: 1.5em; }

/* Event cover fills its grid cell, preserving the top of the artwork. */
.event-cover-card { display: grid; grid-template-columns: minmax(0, 1fr); }
.event-cover-card::before, .event-cover-card::after { display: none; }
.event-cover-card > .entry-content,
.event-cover-card > .home-big-thumb { float: none; width: 100%; min-width: 0; }
.event-cover-card > .home-big-thumb { position: relative; aspect-ratio: 15 / 11; margin: 0; overflow: hidden; }
.event-cover-card > .home-big-thumb > a { position: absolute; inset: 0; display: block; }
.event-cover-card > .home-big-thumb img { display: block; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; object-fit: cover; object-position: center top; }
.event-cover-card > .customHr,
.event-cover-card > .article-footer { grid-column: 1 / -1; }
@media screen and (min-width: 768px) {
  .event-cover-card { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .event-cover-card > .home-big-thumb { aspect-ratio: auto; min-height: 27.5rem; }
}
@media screen and (min-width: 1030px) {
  .event-cover-card { grid-template-columns: minmax(0, 3fr) minmax(0, 4fr); }
}

/* Keep an isolated Gallery feature at the start of its row. */
#home-small-format.gallery-featured > article:only-child { float: left; }

/* A bounded image viewport on every card; preserve image proportions. */
.home-big-format > .home-big-thumb,
.home-small-format > .home-small-thumb,
.home-small-format > .passed_events_thumb {
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-bottom: 0;
  aspect-ratio: 15 / 11;
}
.home-small-format > .passed_events_thumb { aspect-ratio: 19 / 13; }
.home-big-format > .home-big-thumb > a,
.home-small-format > .home-small-thumb > a,
.home-small-format > .passed_events_thumb > a {
  position: absolute;
  inset: 0;
  display: block;
}
.home-big-format > .home-big-thumb img,
.home-small-format > .home-small-thumb img,
.home-small-format > .passed_events_thumb img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: cover;
  object-position: center top;
}
@media (min-width: 768px) {
  .home-small-format > .home-small-thumb,
  .home-small-format > .passed_events_thumb { aspect-ratio: auto; }
  .event-cover-card > .home-big-thumb { aspect-ratio: auto; }
}

/* Straight lower corners on content blocks and their black bands. */
.hentry,
.hentry > .article-footer {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
