/*
  Theme Name: EPJB
  Author: CreaVox Sàrl
  Author URI: https://www.crea-vox.ch
  Description: Thème exclusif de L'Enquête Photographique Jura bernois.
  Version: 1.1
  Text Domain: epjb
*/

/*
 * Globals
 */
 @import url(jakarta-sans.css);
 @import url(nexa.css);

html, body {
  overscroll-behavior-y: none;
}

html {
  color: rgba(53,53,53,1)!important;
  font-size: 1rem;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:root{
  --bs-nav-link-color: white;
  --gray: rgb(50,50,50);
  --lightgray: rgb(240,240,240);
  --footer-gray: rgb(187, 185, 185);
  --caption: rgba(0, 0, 0, 0.5);
  --background: rgb(250,250,250) !important;
  --nbs-dropdown-link-active-color: black!important;
  --nbs-dropdown-link-active-bg: rgba(255,255,255, 0.5)!important;
}
::selection, ::-moz-selection {
  background: var(--lightgray);
  text-shadow: none;
}
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.5;
  background-color: var(--background);
}
*, ::after, ::before {
  box-sizing: border-box;
}
hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}
p, nav {
  font-variant-ligatures: none;
  word-spacing: 0.125rem;
}
p:last-of-type {
  margin-bottom: 0;
}
.fw-bolder {
  font-weight: 800 !important;
}
/* *********** */
.navbar-collapse {
  flex-grow: 0;
}

main {
  padding-top: 3em;
  padding-bottom: 3em;
  min-height: 70vh;
}
main a {
  color: black;
  text-decoration: none;
}
main ul {
  padding: 0;
  list-style-type: none;
}
#resume ul {
  list-style-type: square;
  padding: 0 0 0 1.5em;
}
main ul:last-child {
  margin-bottom: 0;
}
main li+li {
  margin-top:.5em;
}
article:not(#media-list) a {
  border-bottom: .09rem solid black;
  font-weight: 500;
  transition: all 0.3s ease-in;
  background: transparent;
}
article:not(#media-list) a::before, article:not(#media-list) a::after {
  content: '';
  color: transparent;
  transition: all 0.3s ease-in;
}
section:not(.lightgray) .container {
  background-color: white;
  padding: 3em;
  border-radius: 0.25rem;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
}
p+ul {
  margin-top: 1em;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Nexa', sans-serif;
  margin-bottom: 1em;
  font-weight: 900;
  hyphens: none;
}
h1 sup{
  text-transform: lowercase;
  top: -0.4em;
}
a .h3 {
  margin-bottom: 0;
}
.lead {
  font-size: 1.25em;
}
.big {
  font-size: 1.25em;
  line-height: 1.75em;
}
main ol ul {
  list-style-type: square;
  padding: .5em 2em;
}
li p {
  margin-bottom: 0;
}
footer {
  padding-bottom: 3em;
  padding-top: 3em;
  border-top: .5em solid var(--gray);
}
footer img {
  display: block;
  height: auto;
  margin-bottom: 1.5em;
}
footer .grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: end;
}
footer .grid > * {
  max-width: 180px;
  width: 100%;
}
.creator, .creator a {
  font-size: 0.7rem;
  color: var(--footer-gray);
  margin-bottom: 0;
}
header{
  min-height: 30vh;
}
header.with-slider {
  height: 100vh;
}
.carousel-item {
  height: 100vh;
  max-height: 100%;
  min-height: 350px;
  background: no-repeat center center scroll;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  position: relative;
}
.carousel-caption {
  position: absolute;
  width: fit-content;
  right: 0;
  margin-left: auto;
  bottom: 3.5em;
  height: fit-content;
}
.carousel-caption h5 {
  font-family: 'Nexa', sans-serif;
  text-transform: uppercase;
  font-size: .8em;
  margin-bottom: -.75em;
  background-color: var(--caption);
  padding: 1em 2em;
  z-index: +1;
}
.carousel-caption p {
  font-style: italic;
  font-size: .75em;
  text-align: left;
  margin-bottom: 0;
  background-color: var(--caption);
  padding: 1em 2em;
  margin-right: 1em;
  z-index: -1;
}
.carousel-indicators [data-bs-target] {
  border-radius: 50%;
  width: 1.25em;
  height: 1.25em;
  margin: 0 .5rem;
}
.download {
  border-top: .25rem solid var(--gray);
  padding: 1.5em 0;
  font-size: 1rem;
}
.download h3 {
  margin-bottom: .5rem;
}
.download p {
  margin-bottom: 0;
}
.nav {
  z-index: 999;
}
.navbar-brand svg {
  height: 4rem;
}
.navbar-toggler {
  border: 0;
}
.headLogo {
  display: flex;
  position: fixed;
  flex-wrap: wrap;
  z-index: 999;
  top: 1em;
  left: 0;
  transition: opacity 0.5s 0.3s;
  align-items: center;
  background-color: var(--caption);
  padding: 1em 3em 1em 1em;
}
.headLogo img {
  margin-right: 1em;
  margin-bottom: 1em;
}
.headLogo h1 {
  margin-bottom: 0;
  color: white;
}
#mainNav .nav-item {
  text-transform: uppercase;
  font-weight: 300;
}
.nav-link:hover::before {
  -webkit-transform: translateY(0);
  -ms-transform: translateY(0);
  transform: translateY(0);
  opacity: 1;
}
.nav-link::before {
  content: "";
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  -webkit-transform: translateY(-3px);
  -ms-transform: translateY(-3px);
  transform: translateY(-3px);
  opacity: 0;
  transition: .25s ease;
}
.nav-item {
  padding: .5em 1em .5em 0;
}
.menu-item {
  position: relative;
}
.dropdown-menu {
  border: none;
  border-top: 1px solid white;
  border-radius: 0;
}
.dropdown-menu li+li {
  border-top: 1px solid var(--gray);
}
.dropdown-item.active, .dropdown-item:active {
  color: var(--nbs-dropdown-link-active-color);
  background-color: var(--nbs-dropdown-link-active-bg);
  cursor: default;
  font-weight: 500;
}
.dropdown-item:hover {
  background-color: var(--bs-nav-link-color);
}
.dropdown-item:not(.active)::before {
  content:'';
  width: 0;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transition: 0.25s ease;
  opacity: 0;
}
.dropdown-item:not(.active):hover::before {
  content:'';
  width: 0.5em;
  background: var(--lightgray);
  opacity: 1;
}
.dropdown-menu {
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}
/* section colors */
.lightgray {
  background-color: var(--lightgray);
  padding-top: 3em;
  padding-bottom: 3em;
}
.lightgray article > div {
  position: relative;
  padding: 2em 3em 2em 0;
}
.lightgray article .dec-s::before, .lightgray article .dec-e::before, .lightgray article .dec-s::after, .lightgray article .dec-e::after {
  content: '';
  background: var(--gray);
  display: flex;
  position: absolute;
}
.lightgray article .dec-s::before, .lightgray article .dec-e::before {
  width: 2em;
  height: .5em;
}
.lightgray article .dec-s::after, .lightgray article .dec-e::after {
  height: 2em;
  width: .5em;
}
.lightgray article .dec-s::before, .lightgray article .dec-e::before {
  right: 0;
}
.lightgray article .dec-e::after, .lightgray article .dec-s::after {
  right: 0;
  border-left: .25em solid var(--gray);
}
.lightgray article .dec-s::before, .lightgray article .dec-s::after {
  top: 0;
}
.lightgray article .dec-e::before {
  bottom: 0;
}
figcaption {
  text-align: left;
  font-size: 0.75em;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  margin-top: -.5rem;
}
.artist-trombi, .gallery-item {
  position: relative;
}
:is(.artist-trombi, .gallery-item) figcaption {
  position: absolute;
  bottom: 1.5rem;
  left: .75rem;
  background: var(--bs-gray-800);
  padding: .325rem .75rem;
  color: white;
  margin: 0;
}
.artist-trombi figure {
  margin-bottom: 0;
}
.gallery-item figcaption {
  left: 0;
}
.legend {
  font-size: .9em;
  font-weight: 400;
  padding: 1rem;
  background: rgba(255,255,255,.5);
}
/* Gallery */
#gallery {
  text-align: center;
  padding-bottom: 1.5em;
}
#gallery figcaption {
  text-align: center;
}
#gallery .row {
  justify-content: space-evenly;
}
#media-list li {
  display: flex;
}
#media-list ul {
  --bs-gutter-y: 1.5rem;
}

/*Popup */
.epjbpop {
  padding: 2em;
  font-size: 1.25em;
}
.epjbpop h1 {
  font-size: 1.75em;
  margin: 0 0 1em 0 !important;
}
.epjbpop .btn-stack {
  display: grid;
  margin-top: 2em;
}
.is-pdf, .is-docx, .is-zip {
  display: flex;
  align-items: center;
  margin-bottom: .5rem;
}
:is(.is-pdf, .is-docx, .is-zip)::before {
  position: relative;
  display: inline-flex;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: .75rem;
}
.is-pdf::before {
  content: url(../imgs/icon/pdf.svg);
}
.is-docx::before {
  content: url(../imgs/icon/docx.svg);
}
.is-zip::before {
  content: url(../imgs/icon/zip.svg);
}
/* video embed reset */
:is(.wp-embed-aspect-4-3, .wp-embed-aspect-16-9, .wp-embed-aspect-16-10) {
  width: 100% !important;
}
:is(.wp-embed-aspect-4-3, .wp-embed-aspect-16-9, .wp-embed-aspect-16-10) .wp-block-embed__wrapper iframe {
  width: 100%;
  height: auto;
}
.wp-embed-aspect-4-3 iframe { aspect-ratio: 4 / 3; }
.wp-embed-aspect-16-9 iframe { aspect-ratio: 16 / 9; }
.wp-embed-aspect-16-10 iframe { aspect-ratio: 16 / 10; }

/* special backgrounds */
main:has(section.ltdv) {
  position: relative;
  overflow: hidden;
}

main:has(section.ltdv)::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.9)), url(../imgs/nJZMmrWA.jpeg);
  background-size: cover;
  background-position: center;
  filter: blur(3px);
  transform: scale(1.05);
  z-index: -1;
}

/* Media Queries */
/*@media (hover: hover) and (pointer: fine) {
  article:not(#media-list) a:hover {
    border-bottom: 0;
    transition: all 0.3s ease-in;
  }
  article:not(#media-list) a:not(.pdf):hover::before, article:not(#media-list) a:not(.pdf):hover::after {
    display: inline-flex;
    color: black;
    font-size: 1.25em;
  }
  article:not(#media-list) a:not(.pdf):hover::before {
    content: '[';
    padding-right: 0.25em;
    line-height: 0;
  }
  article:not(#media-list) a:not(.pdf):hover::after {
    content: ']';
    padding-left: 0.25em;
    line-height: 0;
  }
}*/
@media (min-width: 768px) { 
  footer .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 992px) {
  footer .grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (min-width: 1280px) {
  html {
    font-size: 120%;
  }
}