/* scroll bars */
*{
  /* For FF and non-webkit browsers */
  scrollbar-width: thin;
  scrollbar-color: var(--CTA-color) transparent;
}
*::-webkit-scrollbar {
  width: 4px;
}
*::-webkit-scrollbar-thumb {
  background-color: var(--CTA-color);
  outline: 4px solid transparent;
}

textarea:focus, input:focus {
    /*outline: none;*/
}

/* main layout */
body {
  display: flex;
  justify-content: space-between;
}

aside {
  flex-basis: 20%;
}
main {
  flex-basis: 60%;
  text-align: center;
}

body.ready aside, body.ready main {
  opacity: 1;
}

.modal a {
  color: var(--nav-color);
}

/* left part */
.left {
  font-size: 1.5rem;
}
.left nav {
  margin-bottom: 3rem;
  font-weight: bold;
  color: var(--nav-color);
}

.left nav img {
  float: left;
  height: 37px;
}

.left nav span {
  margin-left: .8rem;
}
.left nav a {
  display: inline;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--nav-color);
  cursor: pointer;
}
.left nav a:hover {
  color: var(--nav-hover-color);
}
.left nav a.featured {
  color: var(--nav-featured-color);
}

/* filters */
.left {
  display: flex;
  flex-direction: column;
}
.filter {
  margin-bottom: 2.0rem;
  flex: calc(50% - 60px) 0 0;
}
.filter header{
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

.filter section {
  margin-bottom: 1rem;
}
.filter section * { /* augmenter l'opacity de 4 à 8 */
  opacity: .8;
  transition: opacity .5s;
}
.filter section i,
.filter section.active * {
  opacity: 1;
}
.filter section.hidden {
  display: none;
}

.filter .action {
  text-align: center;
  border: 0.1rem solid var(--main-color);
  border-radius: 0.4rem;
  font-size: 3rem;
  display: inline-block;
  line-height: 1.5rem;
  height: 2rem;
  width: 2rem;
  vertical-align: -0.2rem;
  color: transparent;
  margin-right: 0.5rem;
  cursor: pointer;
}
.filter .active .action {
  color: var(--main-color);

}

.filter i {
  border: 1px solid var(--border-color);
  color: var(--border-color);
  border-radius: 50%;
  width: 1.5rem;
  font-size: 1.2rem;
  display: inline-block;
  text-align: center;
  font-style: normal;
  vertical-align: .2rem;
  margin-left: 1em;
  cursor: pointer;
  transition: all .5s;
}
.filter i:hover {
  background-color: var(--CTA-background-color);
  border: 1px solid var(--main-color);
  color: var(--main-color);
}

.filter input {
    width: 80%;
    max-width: 259px;
    margin-left: 3px;
    box-sizing: border-box;
    height: 0;
    padding: 0;
    border: 0;
    position: absolute;
}
.filter .active input {
    height: auto;
    border-bottom: 1px solid var(--border-color);
    padding: 1.0rem .5rem .5rem 0;
    position: initial;
   

}



.filter ul {
  height: 0;
  width: 80%;
  max-width: 260px;
  overflow: hidden;
  font-size: 1.2rem;
  line-height: 1.5rem;
  list-style: none;
  border-radius: 0.3rem;
  background-color: var(--select-background-color);
  overflow-y: auto;
  border: solid 0.1rem transparent;
  transition: height .5s, border .5s, margin .5s;
}
.filter .active ul {
  margin-top: 1.0rem;
  border: solid 0.1rem var(--border-color);
  height: 25vh;
  padding: 0;
}
.filter ul li {
  cursor: pointer;
  padding: .7rem 1.0rem;
  transition: all .5s;
}
.filter ul li:hover{
  background-color: var(--select-hover-color);
}
.filter ul li.active {
  background-color: var(--select-active-color);
}
.filter ul li.hidden {
  height: 0;
  opacity: 0;
  padding: 0 1.0rem;
  overflow: hidden;
}

.filter.link {
  opacity: 0;
  transition: opacity .5s;
}
.filter.link.loaded {
  opacity: 1;
}

/* diagram */
svg text {
  fill: var(--main-color);
  font-size: 1.1rem;
}
svg .viz-chord-chords {
  fill: var(--chord-fill-color);
  stroke: var(--chord-stroke-color);
}

svg .values text {
  pointer-events: none;
  stroke-width: 0.5px;
}

.groups:hover {
  cursor: pointer;
  font-weight: bold;
}

/* contextual data */
#context {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
}

#context h1 {
  font-weight: normal;
}
#context .title {
  font-size: 2.5rem;
}
#context .nb {
  font-size: 6rem;
  margin:.9rem 0;
}

#context .projects {
  margin: 2rem -15px 0 0;
  list-style: none;
  line-height: 2.5rem;
  overflow-y: scroll;
  overflow-x: hidden;
  max-height: calc(100vh - 300px);
}
#context .projects li {
  padding-right: 10px;
}

#context .projects .colour, #context .projects .acronym {
  display: inline-block;
  width: calc(100% - 3rem);
  max-width: 170px;
  vertical-align: middle;
  cursor: pointer;
}
#context .projects .colour {
  width: 2rem;
  height: 2rem;
}

/* modals */
.modal {
  position: fixed;
  opacity: 0;
  z-index: -1;
  border: 0.1rem solid var(--border-color);
  border-radius: 0.4rem;
  transition: all .5s;
}
.modal.open {
  height: auto;
  opacity: 1;
  z-index: 20;
}

/* buttons */
.modal button{
  display: block;
  width: 100%;
  background-color: var(--CTA-background-color);
  border: 0;
  line-height: 2.7rem;
  color: var(--CTA-color);
  margin-top: 0.8rem;
  border-radius: 0.2rem;
  cursor: pointer;
  font-weight: bolder;
  padding: .3rem 0;
}
.modal button a {
  color: var(--CTA-color);
  text-decoration: none;
}

.modal button:hover {
  filter: invert(100%);
}

/* small floating modal */
#floating-modal {
  padding: 1.0rem;
  width: 19.0rem;
  background-color: var(--background-color);
  transform: translate(-50%, -25%);
}
#floating-modal h2{
  font-size: 1.9rem;
}
#floating-modal p{
  font-size: 1.4rem;
}

#floating-modal .colour {
  float: left;
  height: 1.2em;
  width: 1.2em;
  margin-right: 1.0rem;
}
#floating-modal .acronym {
  font-weight: bold;
  text-transform: uppercase;
}
#floating-modal .name {
  margin-top: 1.0rem;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 10.0rem;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

/* fullscreen modal */
#fixed-modal {
  background-color: rgba(255, 255, 245, .8);
  border: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
#fixed-modal .close {
  font-size: 2.5rem;
  max-width: 1200px;
  width: calc(100vw - 6.0rem);
  text-align: right;
  cursor: pointer;
  margin: 0 auto;
}
#fixed-modal .container {
  max-width: 1200px;
  width: calc(100vw - 6.0rem);
  height: calc(100vh - 6.0rem);
  box-sizing: border-box;
  border:0.1rem solid var(--border-color);
  border-radius: 0.4rem;
  margin: 0 auto 3.0rem auto;
  overflow-y: auto;
  background: #FFF;
}

/* content of large modal, could use a dedicated selector */
#fixed-modal h2{
  padding: 3.0rem 6.0rem;
  font-size: 2.5rem;
}
#fixed-modal p{
  font-size: 1.4rem;
}
#fixed-modal p.footnote {
  font-size: 1.2rem;
  color: var(--modal-label-color);
}
#fixed-modal .tag > section,
#fixed-modal .project > section {
  padding: 3.0rem 6.0rem;
  border-bottom: 1px solid var(--modal-second-color);
}

#fixed-modal h4 {
  display: block;
  font-weight: bold;
  color: var(--modal-label-color);
  margin-bottom: 1rem;
}

#fixed-modal button {
  max-width: 150px;
  float: right;
  margin-top: 0;
}

#fixed-modal ul {
  list-style-type: none;
}

/* project */
#fixed-modal .project h2 .validation {
  font-size: 1.2rem;
  font-weight: normal;
  color: var(--modal-label-color);
}
#fixed-modal .project .intro {
  border-bottom: 0;
  padding-top: 0;
}
#fixed-modal .project .budget-and-dates {
  background-color: var(--modal-second-background-color);
}
#fixed-modal .project .core-theme {
  background-color: var(--modal-second-background-color);
  border-bottom: 0;
}

#fixed-modal .project .budget-and-dates div {
  display: inline-block;
  width:30%;
}

#fixed-modal .project .participants ul li:first-child {
  /* list-style-type: '\2605'; */
  font-weight: bold;
}

#fixed-modal .desc > * {
  text-align: justify;
  font-size: 1.4rem;
}
#fixed-modal .desc > h4 {
  font-size: 1.5rem;
}
#fixed-modal .desc ul {
  list-style: inside square;
  padding-left: 2.0rem;
}

#fixed-modal .project .related-projects ul {
  columns: 2;
  padding-left: 12.5%;
}


/* tag (and menuitem) */
#fixed-modal .tag_intro p {
  padding: 0 6rem 3rem 6rem;
  font-size: 1.5rem;    
}
#fixed-modal .tags h2 {
  padding-top: 0;
}
#fixed-modal .tags, #fixed-modal .contents {
  background-color: var(--modal-second-color);
  padding: 3.0rem 0;
  min-height: calc(100% - 6.0rem);
}
#fixed-modal .tags .tag .desc {
  border-bottom: none;
}
#fixed-modal .contents h3 {
  font-weight: normal;
  margin-left: 3rem;
}
#fixed-modal .footnote {
  margin: 3.0rem;
  color: var(--CTA-color);
}
#fixed-modal .tags .tag {
  margin: 0 3.0rem;
  padding: 3rem;
  border-bottom: 1px solid var(--modal-second-color);
}
#fixed-modal .tags .tag,
#fixed-modal .contents .content {
  background-color: #fff;
  border-radius: 4px;

}
#fixed-modal .contents .content {
  margin: 3.0rem;
}
.content{
  padding: 1rem; /*  for About, legal, credits */
}
#fixed-modal .tag .intro section {
  display: inline-block;
  width: 33%;
}

#fixed-modal .tag .desc {
  background-color: var(--modal-second-background-color);
}
#fixed-modal .tags .desc {
  background-color: #fff;
}

#fixed-modal .tag .funded-projects ul {
  columns: 2;
  padding-left: 12.5%;
}

#fixed-modal .contents ul {
  font-size: 1.4rem;
  list-style-type: square;
  padding-left: 2rem;
}

#fixed-modal .contents li {
  margin-top: .5rem;
}

/* publications */
#fixed-modal .publications ul {
    list-style-type: square;
    list-style-position: inside;
}

/* scientific voices + audio player */
/* icon for list of projects */
.has-voices {
   height: 1em;
   vertical-align: middle;
   margin-left: .3em;
}

/* tag (and menuitem) */
#fixed-modal .voices_intro p {
  padding: 0 6rem 3rem 6rem;
  font-size: 1.5rem;    
}
#fixed-modal .voices h2 {
  padding-top: 0;
}
#fixed-modal .voices {
  background-color: var(--modal-second-color);
  padding: 3.0rem 0;
  min-height: calc(100% - 6.0rem);
}
#fixed-modal .voices .voice {
  background-color: #FFF;
  margin: 0 3.0rem;
  padding: 3rem;
  border-bottom: 1px solid var(--modal-second-color);
}
#fixed-modal .voice ul.related {
  columns: 2;
  padding-left: 12.5%;
}
#fixed-modal .voice h3 {
  display: inline-block;
  margin-bottom: .5rem;
}


.embed-voices {
  background-color: var(--modal-second-background-color);
}
.embed-voices h5 {
  font-size: 16px;
  font-weight: normal;
  margin: 1em 0 .5em 0;
  display: inline-block;
}

/* for all voices */
.voice .date {
  font-weight: bold;
  font-size: 1.4rem;
  color: var(--modal-label-color);
}

.voice i {
  border: 1px solid var(--border-color);
  color: var(--border-color);
  border-radius: 50%;
  width: 1.5rem;
  font-size: 1.2rem;
  display: inline-block;
  text-align: center;
  font-style: normal;
  margin-left: .5rem;
  vertical-align: .1rem;
  cursor: pointer;
  transition: all .5s;
}
.voice i:hover {
  background-color: var(--CTA-background-color);  
  border: 1px solid var(--main-color);
  color: var(--main-color);
}

.voice .desc {
  transition: all 1s;
  overflow: hidden;
  height: 0px;
}

.voice figcaption {
  font-size: 1.4rem;
}

audio {
  width: calc(100% - 200px);
  height: 33px;
  border-radius: .2rem;
}

/* Chrome 29+ */
@media screen and (-webkit-min-device-pixel-ratio:0)
  and (min-resolution:.001dpcm) {
  audio {
    filter: sepia(.15) brightness(.94);
    background-color: #F4F4F4;
  }
}

/* Chrome 22-28 */
@media screen and(-webkit-min-device-pixel-ratio:0) {
  audio {
    filter: sepia(.15) brightness(.94);
    background-color: #F4F4F4;
  }
}

/* Chrome, Safari, and also the Edge Browser and Firefox */
@media and (-webkit-min-device-pixel-ratio:0) {
  audio {
    filter: sepia(.15) brightness(.94);
    background-color: #F4F4F4;
  }
}

/* Safari 11+ */
@media not all and (min-resolution:.001dpcm)
{ @supports (-webkit-appearance:none) and (stroke-color:transparent) {
  audio {
    filter: invert(1) sepia(.15) brightness(1.8);
  }
}}

/* Safari 10.1 */
@media not all and (min-resolution:.001dpcm){ 
@supports (-webkit-appearance:none) and (not (stroke-color:transparent)) {
  audio {
    filter: invert(1) sepia(.15) brightness(1.8);
  }
}}

/* Safari 6.1-10.0 (not 10.1) */
@media screen and (min-color-index:0) and(-webkit-min-device-pixel-ratio:0){ 
@media {
  audio {
      filter: invert(1) sepia(.15) brightness(1.8);
  }
}}

/* Firefox */
@-moz-document url-prefix() {
  audio {
    filter: invert(1) sepia(.15) brightness(1.25) contrast(.9);
    background-color: #F4F4F4;
  }
}
