

/* --------------------------------------------------------- reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  border: none;
  box-sizing: border-box;
  list-style: none;
}

/* --------------------------------------------------------- vars */

:root{
  --basesize: 1rem;
  --midsize: 1.375rem;
  /* @link https://utopia.fyi/clamp/calculator?a=800,1240,26—32 */
  --bigmidsize: clamp(1.625rem, 0.9432rem + 1.3636vw, 2rem);
  --bigsize: 1.6875rem;
  /* @link https://utopia.fyi/clamp/calculator?a=800,1240,22—30 */
  --bigsize: clamp(1.375rem, 0.4659rem + 1.8182vw, 1.875rem);
  /* @link https://utopia.fyi/clamp/calculator?a=800,1240,32—72 */
  --huge-size: clamp(2.75rem, -0.4318rem + 6.3636vw, 4.5rem);
  --basecolor: #393954;
  --grey: #8e8eb2;;
  --accent:#1f27c0;
  --accent: #0040ff;
  --basefamily: 'Work Sans', 'serif';
  --altfamily: 'Savate', 'serif';
}
html {
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: var(--basefamily); 
  font-size: var(--basesize);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.4;  
  overflow-x: hidden;
  color: var(--basecolor);
  -webkit-overflow-scrolling: touch;
  width: 100vw;
}

/* --------------------------------------------------------- commons */

::-moz-selection {
  background: var(--accent);
  color: #fff;
}

::selection {
  background: var(--accent);
  color: #fff;
}

::-webkit-input-placeholder { color: var(--grey) }
::-moz-placeholder {  color: var(--grey) }
:-ms-input-placeholder {  color: var(--grey) }
:-moz-placeholder {  color: var(--grey) }
input[type="search"] { appearance: textfield; }


img {
  max-width: 100%;
  height: auto
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
a { 
  text-decoration: none;
  color: var(--basecolor);
  &:hover{ color: var(--accent); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
sup {
  line-height: 1;
}
/* --------------------------------------------------------- headings */

h1 { 
  font-family: var(--altfamily);
  font-size: var(--huge-size);
  line-height: 1;
  margin: .5em 0 .15em -.1em ;
  text-wrap: balance;
  }    
h2 { 
  text-wrap: balance;
  font-size: var(--bigmidsize);
  margin: 0 0 0 -.07em ;
  padding:.05em 0;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.05em;
}
h2.sub {
  font-size: 1.5em;
  margin-bottom: 1em;
}

h3{
  font-size: 1em;
  font-weight: 600;
}


/* --------------------------------------------------------- layout */

/* 
#header
nav
#page
  main 
*/
#header,
#page {
  margin: 0 0 0 max(220px, 14vw);
}
main {
  max-width: 1200px;
  position: relative;
  display: grid;
  grid-template-columns: 5fr 2fr;
  padding-right: 30px;
  gap: 30px;
  margin-bottom: 4em;
}
#page {
  position: relative;
  z-index: 2;
}
/* --------------------------------------------------------- header */
#header {
  display: block;
  padding: 30px 0 30px 2.5em;
  position: relative;
  z-index: 3;
}
#header strong { 
  font-weight: normal;
  text-transform: uppercase;
}
#header span {
    font-family: var(--altfamily);
}
#header a.logo {
  background:url(../images/logo.svg) no-repeat 0 0;
  background-size: 100% auto;
  display: block;
  height: 120px;
  width: 120px;
  cursor: url('../images/cross.png') 11 11, auto;
  transform-origin: 0 0;
  position: relative;
  z-index: 2000;
}

#header a.logo:hover { background-position:0 -120px; }
#header a.logo * { display: none}

/* --------------------------------------------------------- nav */

#nav {
  
}
#nav input,
#nav a {
  pointer-events: auto;
  text-decoration: none;
}
.menugroup {
  transition: all 250ms 50ms;
  padding-top: 90px;
  position: fixed;
  width: 220px;
  top: 0;
  z-index: 1;
  left: 0;
  text-transform: uppercase;
  font-weight: 500;
  background: white;
  height: 100dvh;
}
#header,
#page {
  transition: all 250ms;  
}
.menu {
  padding: 0 20px;
  margin-bottom: 1em; 
  line-height: 1.2;  
}
.menu ul { 
    margin-left: 1em; 
    max-height:0; 
    overflow:hidden;
    transition:max-height 300ms linear;
}
.menu li{ margin-bottom: .15em;}
.menu ul :last-child{ padding-bottom: 1em; }
.menu .active + ul { display: block; max-height: 200px;}
.menu ul.visible {
  max-height: 200px;
}

.page-current #li-en-cours,
.page-agenda #li-a-venir,
.page-horslesmurs #li-hors-les-murs,
.page-archives #li-archives,
.page-artistes #li-artistes, .active { a {color:var(--accent)}  }

.active {color:var(--accent)}  

.social {
  margin: 0;
  display: flex;
  gap: 10px;
}
.social svg {
  display: block;
  height: 22px;
  width: auto;
}
.social path { fill: var(--basecolor);}
.social a:hover path { fill: var(--accent);}

/* search */
.menu label {
  cursor: pointer;
}
.search {
  height: 1.2em;
  overflow: hidden;
  --button-width: 28px
}

.search div {
  display: flex;
  height: 1.35em;
}
.search input { width: calc(100% - var(--button-width));}
.search button { width: var(--button-width);}
[data-template="recherche"] .search label,
.search:focus-within label {
  display: none;
}
.search input,
.search button {
  font-family: inherit;
  font-size: 0.8125em;
  background: var(--accent);
  color: white;
  border: none;
  padding-inline: .5em;
  outline: none;
}
.search:focus-within input,
.search:focus-within button {
  outline: none;
}


#menulink{
  position: fixed;
  top: 3px;
  left: 3px;
  display: block;
  text-indent: -999px;
  height: 50px;
  width: 50px;
  background: url(../images/menu.svg) no-repeat 0 0;
  z-index: 11000;
  margin-bottom: 40px;
  display: none;
}

#menulink:hover {
  background: url(../images/menu.svg) no-repeat 0 -50px;
}


/* --------------------------------------------------------- home */
[data-intended-template="home"] .logo{
  transform: scale(1.4);
  position: relative;
  z-index: 2;
}
.aside-h2 {
  font-size: 1em;
  text-align: left;
  line-height: 1.1;
  margin: .5em auto 1em;
  text-transform: none;
  font-weight: bold;
  letter-spacing: .05em;
}

#aside {
  display: flex;
  flex-direction: column;
  gap: 1em;
}
#aside article {
  background: white;
}
.aside-date {
  text-transform: uppercase;
  font-weight: 600;
}
.aside-title {
  font-weight: 600;
  font-size: var(--midsize);
  line-height: 1.1;
  text-wrap: balance;
}

.is_page a {
  cursor: url('../images/plus.png') 21 21, auto;
}
.readmore {
  cursor: url('../images/bottom.png') 21 40, auto;
}
.readmore.open {
  cursor: url('../images/top.png') 21 2, auto;
}
.readmore-details {
  display: none;
}
.open .readmore-details {
  display: block;
}
.aside-image {
  display: none;
}

#lettering {
  overflow: hidden;
  position: fixed;
  /* center content: */
  display: grid;
  place-content: center;
  /* offset from body by 50px */
  inset: 0px;
  z-index: 2;
  transition: opacity 250ms ease-out;
  opacity: 1;
}
#lettering.hidden{
  opacity: 0;
  pointer-events: none;
}

#lettering svg {
  position: absolute;
  user-select: none;
  transition: transform 1s cubic-bezier(0.33, 1, 0.68, 1), opacity 250ms ease-out;
  will-change: transform;
  opacity: 0;
  cursor: pointer;
}

#lettering svg.visible {
  opacity: 1;
}


/* --------------------------------------------------------- vignettes */
#vignettes {
  position: absolute;
}
.vignette, .vignette-about {
  position: absolute;
  visibility: hidden;
  z-index: 2;
}
.is_landscape {
  width: 220px;
}
.is_portrait {
  width: 160px;
}

#text,
.exposition,
#aside article {
  outline: 10px solid white;
  position: relative;
  background: white;
}
#text:hover,
.exposition:hover,
#aside:hover article {
  z-index: 800;
}

/* -------------------------------------------------------- Expo */    

#h2-expo {
  margin-top: 8em;
}
.bigtext {
  background: white;
  font-size: var(--bigsize);
  margin-top: .5em;
}
.bigtext p,
.bigtext ul,
.bigtext blockquote {
  margin-bottom: .5em;
}
.exposition .infos {
  font-weight: 600;
  font-size: var(--midsize);
}

.details {
  margin: 1em 0;
  font-weight: 700;
  /* font-size: .8125rem; */
  /* letter-spacing: .05em; */
}
.details a {
  text-decoration: underline;
}
.mentions {
  margin: .5em 0;
}

/* -------------------------------------------------------- Rendez-vous */    

.readmore-link {
  text-decoration: underline;  
}

.edition-details {
  margin: 1em 0;
  /* display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px; */
}
.edition-details p {
  margin: 0;
}

.rendezvou {
  
  border-bottom: 2px solid #000;
  margin: 2em 0 1em;
  padding-bottom: 1em;
}
.rendezvou .date {
  text-transform: uppercase;
}
.rendezvou h2 {
text-transform: none;
  font-size: var(--midsize);
}
/* -------------------------------------------------------- Publics */    

.half {
  column-count: 2;
  column-gap: 40px;
}
.half-item {
  break-inside: avoid;
}
.half h2 {
  text-transform: none;
  font-size: var(--midsize);
}
.half-intro, .half-item {
  margin-bottom: 1em;
}
.half p{
  margin-bottom: 1em;
  break-inside: avoid;
}


/* -------------------------------------------------------- Ressources */    
.half-item p + .download {
  margin-top: -1em;
  display: block;
}

.download {
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: underline;
}

/* -------------------------------------------------------- Recherche */    
.recherche h2 {
  text-transform: none;
  margin: 1em 0 .25em;
}
.recherche h3 {
  text-transform: uppercase;
  margin: 1em 0 .25em;
}
.result-item {
  margin-bottom: 1em;
}

/* -------------------------------------------------------- À propos */  
.about h2 {
  text-transform: none;
  margin: 1em 0 .25em;
}
.about-infos {
  border-top: 2px solid #000;
  margin: 2em 0 1em;
}
.about-details {
  text-transform: uppercase;
  font-weight: 600;
  column-count: 2;
  column-gap: 40px;
  border-bottom: 2px solid #000;
  padding: 1em 0;
}
.about p,
.about ul {
  break-inside: avoid;
}
.about a {
  text-decoration: underline;
}

.about form p {
  display: flex;
  gap: 20px;
}
.about form p input {
  all: unset;
  padding: .2em;
}
.about input[type=email] { 
  flex: 1;
  background: #ddd;
}
.about input[type=submit] { 
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 600;
}

/* -------------------------------------------------------- Listes expos */    
.sub {
  font-family: var(--basefamily); 
  text-transform: uppercase;
  font-size: var(--midsize);
  font-weight: 700;
  margin: 1em 0;
}
.sub.year {
  margin-top: 2em;
}
.list-item {
  margin: 1em 0;
  padding: 1em 0 0;
  border-top: 2px solid #434363;
}
.list-item h3 {  
  font-family: var(--altfamily);
  font-size: clamp(2.25rem, -0.0227rem + 4.5455vw, 3.5rem);
  line-height: 1;
  margin: .15em 0 .15em -.1em ;
  text-wrap: balance;
}
.categories {
  display: flex;
  gap: 1em;
}
.categories span {
  text-transform: uppercase;
  font-size: var(--midsize);
  font-weight: 700;
}
.list-item h4 {  
  font-size: var(--bigsize);  
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.1;
  margin-block: .25em;
}
.pagination ul {
  display: flex;
  border-top: 2px solid #434363;
  padding: 1em 0 0;
  gap: 1em;
  font-size: var(--midsize);
  font-weight: 600;
}

.artists li {
  display: inline;
  font-size: var(--bigsize);
}
.artists li:not(:first-child)::after {
  content: ", ";
}
.artists li:last-of-type::after {
  content: "…";
}

/* -------------------------------------------------------- css slideshow */    
.exposition {
  min-width: 0
}
.cssslideshow {
  width: 100%;
  display: flex;
  overflow: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  display: flex;
  scroll-behavior: smooth;
}
.cssslideshow figure {
  width: 100%;
  position: relative;
  scroll-snap-align: start;
  flex-shrink: 0;
  min-width: 0
}
.cssslideshow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.cssslideshow a {
  position: absolute;
  height: 100%;
  width: 33%;
  top: 0;
}
.cssslideshow span {
  visibility: hidden;
}
.cssslideshow figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1.4em;
  height: 1.4em;
  background: white url(../images/credits.svg) no-repeat .5em .5em;
  padding-left: 1.5em;
}
.cssslideshow figcaption:hover {
  width: auto;
  height: auto;
  background: white;
  padding-left: .5em;
}
.next {right: 0; cursor: url('../images/next.png')  33 21, auto;}
.prev { left: 0; cursor: url('../images/prev.png') 33 21, auto;}


/* -------------------------------------------------------- Slideshow */    
.slideshow-item { width: 100%;}
.slideshow {z-index: 0;}
.slideshow img { display: block;}
.slideshow.flickity-enabled.with-caption + h1 { 
  position: relative;
  margin-top: -4rem; 
  z-index: 1;
  /* padding: .15em 12rem .25em 0; */
}
.caption {
    position: relative;
    top: 100%;
    z-index: 800;
    float: right;
    height: 80px;
    width: 12em;
    padding-right: 16px;
    margin:10px 0 0 0;
    color: var(--basecolor);
    line-height: 1.2;
    cursor: default;
}
.caption div { display:none; font-size: .75em;}
.caption.with-caption { background:url(../images/credits.svg) no-repeat 100% 0;}
.caption.with-caption:hover div { display:block; }
.caption.with-caption:hover{
    background:url(../images/credits.svg) no-repeat 100% -200px;
}

.flickity-prev-next-button.previous {
  left: 0px;
  cursor: url('../images/prev.png') 33 21, auto;
}
.flickity-prev-next-button.next{
  right: 0px;
  cursor: url('../images/next.png')  33 21, auto;
}
.flickity-prev-next-button {
  top: 0;
  width: 33%;
  height: calc(100% - 80px - 10px);
  border-radius: 0;
  transform: none;
}
.flickity-button {
  position: absolute;
  background: none;
  border: none;
}
.flickity-button:hover{ background: none;}
.flickity-button svg {display: none;}



/* -------------------------------------------------------- Edit */    
.edit {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
  z-index: 1000;
  padding: 6px;
  background: black;
  opacity: .2;
  border-radius: 9px;
  -webkit-transition: 150ms;
  transition: 150ms; }
  .edit:hover {
    opacity: 1; }
  .edit svg {
    width: 100%;
    height: auto; }
  .edit path {
    fill: white; }


/* -------------------------------------------------------- Helpers */    

.visually-hidden {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: 0;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}



/* -------------------------------------------------------- MQ */    
@media screen and (min-width:1300px){
    /* :root{
      --bigsize: 1.6875rem;
    } */
}


@media screen and (max-width:1100px){
  #nav { width: 180px;}
  #page { margin: 0 0 0 180px; }
}

@media screen and (max-width:1000px){
  #page { margin: 0 30px 0 70px; }
  .main { 
    padding-right: 0;
  }  
  .menugroup { 
    transform: translate3d(-180px,0,0);
    -webkit-overflow-scrolling: touch;
    pointer-events: auto;
  }
  .menu-visible #page,
  .menu-visible #header { transform: translate3d(180px,0,0)}
  .menu-visible .menugroup { transform: translate3d(0,0,0) ; }
  #menulink {
    display: block;
  }
  
  
}

@media screen and (max-width:890px){
  [data-intended-template="home"] .logo { transform: scale(1);}
  .main { grid-template-columns: 1fr; }
  .vignette,
  .vignette-about {display: none}
  #header a.logo { margin: auto;}
  #header {
    margin: 0;
    padding: 50px 30px;
  }

}

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

  #page { margin: 0 0 0 20px; }
 
  .main section,
  .main aside { width: 100%; padding: 0 20px 0 0;}
  #header {
      text-align: center;
    }
    h1 { 
      /* font-size: 2em; */
    }    
    aside .h2-actus,
    h2 { 
        font-size: 1.5em;
    }

    .half {
      column-count:1;
      column-gap :0;    
    }
  
}



