:root {
  --largeSize: 1.1rem;
  --mediumSize: 1rem;
  --smallSize: 0.75rem;
}

html{
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
    font-family: "8ight", Arial, Helvetica, sans-serif;
}
body{
    background:white;
    color:black;
    margin:0;
    overflow-x: hidden;
}

h1{
    font-size: var(--largeSize);
    font-weight: 100;
}

h2 {
    font-size: var(--largeSize);
    line-height: 2rem;
    font-weight: 100;
    margin-top:0;
}
h3 {
    font-size: var(--largeSize);
    line-height: 1.4rem;
    margin: 0;
    font-weight: 100;
    margin-top:1rem;
}

h4 {
    font-family: '8ight';
    font-size: 1.5rem;
}

a{
    text-decoration: none;
    color: black;
}

header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 1;
    position: relative;
    z-index: 5;
}

header a{
    font-size: var(--largeSize);
    padding: 0.2rem 0.5rem;
    cursor: pointer;
}

.hide{
    display: none;
}

a.filtre.hide{
    display: none;
}

.index-sidebar{
    transition: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: #DCD6C6;
    padding: 5.3rem 1rem 1rem 1rem;
    box-sizing: border-box;
    overflow-y: scroll;
    z-index: 7;
    transform: translateX(100vw);
    padding-bottom: 1rem;
}

.infos-sidebar{
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: scroll;
    transition: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    background-color: #DCD6C6;
    padding: 5.3rem 1rem 1rem 1rem;
    box-sizing: border-box;
    height: 100vh;
    z-index: 7;
    transform: translateX(100vw);
    padding-bottom: 1rem;
}

.col-infos p:last-child {
    margin-bottom: 8px;
    padding-bottom: 0;
}

.col-infos.distinctions p {
    margin: 0.25rem 0;
    display: flex;
}

span.annee-infos {
    margin-right: 1rem;
}

.infos-sidebar a{
    text-decoration: underline;
}

.col-infos.distinctions {
    margin-top: 1rem;
    padding-bottom: 6rem;
}

li.lihead {
    margin-bottom: 1rem;
}

.openIndex {
    transform: translateX(0);
}

.openInfos {
    transform: translateX(0);
}

.index-sidebar li {
    display: flex;
    position: relative;
}

.index-sidebar li {
    list-style: none;
}

.index-sidebar ul{
    padding: 0;
}

.index-sidebar p{
    margin:0.3rem 0;
}

p {
    font-size: var(--mediumSize);
    line-height: 1.1rem;
}

p.programme {
    width: 80%;
    display: none;
}

p.client {
    width: 20%;
    display: none;
}

p.localisation {
    width: 20%;
    display: none;
}

p.taille {
    width: 10%;
    display: none;
}

p.mission {
    width: 10%;
    display: none;
}

p.annee {
    width: 20%;
}

li.lihead p {
    font-size: var(--largeSize);
}

.col-infos {
    width: 100%;
    padding:0 1rem 0 0;
    box-sizing: border-box;
}

.grid {
    width: calc(100% - 8px);
    margin:6rem 4px 0 4px;
}

.cont-grid{
    margin: 0 4rem;
}

/* clearfix */
.grid:after {
  content: '';
  display: block;
  clear: both;
}


/* ---- grid-item ---- */

/* fluid 5 columns */
.grid-sizer,
.grid-item { 
    width: 50%;
    margin: 0;
    margin-top: 0;
    margin-bottom: 1rem;
    padding: 4px;
    box-sizing: border-box;
 }

 .grid-sizer img, .grid-item img {
    width: 100%;
    height: auto;
}
.grid-sizer--width2, .grid-item--width2 {
    width: 100%;
}

body.home.overflowH, body.home.overflowHmenu {
    overflow: hidden;
}

.closefilter:after {
    content: "";
    width: 1.2rem;
    height: 2px;
    background: black;
    transform: rotate(45deg);
    position: absolute;
    top: 1rem;
    left: 0.5rem;
}

.closefilter:before {
    content: "";
    width: 1.2rem;
    height: 2px;
    background: black;
    transform: rotate(-45deg);
    position: absolute;
    top: 1rem;
    left: 0.5rem;
}

#reset-filters:after {
    content: "";
    width: 1.2rem;
    height: 2px;
    background: black;
    transform: rotate(45deg);
    position: absolute;
    top: 1rem;
    left: 0.5rem;
}

#reset-filters:before {
    content: "";
    width: 1.2rem;
    height: 2px;
    background: black;
    transform: rotate(-45deg);
    position: absolute;
    top: 1rem;
    left: 0.5rem;
}

.closefilter{
    position: fixed;
    right: 2rem;
    padding: 0.2rem 0.5rem;
    top: 1rem;
    display: block;
    font-size: var(--largeSize);
    z-index: 4;
    display: none;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
}

.close {
    background: white;
    position: fixed;
    left: 1rem;
    top: 0.6rem;
    padding: 0.5rem 2.5rem 0.5rem 1.5rem;
    display: none;
    cursor: pointer;
    z-index: 6;
    font-size: var(--largeSize);
}

a.filtre {
    position: fixed;
    right: 2rem;
    padding: 0.2rem 0.5rem;
    background: white;
    top: 1rem;
    display: block;
    font-size: var(--largeSize);
    z-index: 4;
    cursor: pointer;
    display: none;
}

.button {
    font-size: var(--largeSize);
    margin: 0;
    font-family: '8ight';
    background: transparent;
    border: none;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    width: 100%;
    z-index: 6;
    position: relative;
    color: black;
}

.button-group.filters-button-group {
    position: fixed;
    text-align: right;
    left: 0;
    right: 5.5rem;
    top: 0;
    display: none;
    z-index: 5;
    background-color: #DCD6C6;
    width: 100%;
    height: 100%;
    padding-top: 5rem;
}

.index-sidebar img {
    display: none;
    position: absolute;         /* positionnée dans .index-sidebar */
    transform: translateX(-50%);/* centre horizontal sans calculer la largeur */
    pointer-events: none;
    z-index: 1;
    top: 2rem;
}

.index-sidebar a:hover img{
    display: block;
}

a.logo-dechelette, main#ajax-container h1{
    font-size: var(--largeSize);
    font-weight: 100;
    position: fixed;
    background: white;
    background: white;
    top:1.9rem;
    padding: 0.2rem 0.5rem;
    text-align: center;
    min-width: max-content;
    margin: auto;
    left: 50%;
    transform: translate(-50%, -50%);
}

a.logo-dechelette{
    display: none;
}

#reset-filters {
    position: fixed;
    right: 2rem;
    padding: 0.2rem 0.5rem;
    top: 1rem;
    display: block;
    font-size: var(--largeSize);
    z-index: 4;
    display: none;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
}

.active{
    display: block;
}

.button-group.filters-button-group.active{
    display: block;
}

main#ajax-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    height: 100vh;
    z-index: 4;
    display: none;
    overflow-y: scroll;
    animation: popIn .2s;
}
@keyframes popIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

main#ajax-container.showprojet{
    display: block;
}

a.closeajax:after, a.backbutton:after {
    content: "";
    width: 1.2rem;
    height: 2px;
    background: black;
    transform: rotate(45deg);
    position: absolute;
    top: 1rem;
    left: 0.5rem;
}

a.closeajax:before, a.backbutton:before {
    content: "";
    width: 1.2rem;
    height: 2px;
    background: black;
    transform: rotate(-45deg);
    position: absolute;
    top: 1rem;
    left: 0.5rem;
}

a.closeajax{
    position: fixed;
    right: 0;
    padding: 0.2rem 0.5rem;
    top: 1rem;
    font-size: var(--largeSize);
    z-index: 6;
    display: none;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
}

a.backbutton{
    position: fixed;
    right: 0;
    padding: 0.2rem 0.5rem;
    top: 1rem;
    display: block;
    font-size: var(--largeSize);
    z-index: 6;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
}


a.closeajax.active{
    display: block;
}

.col-content{
    position: sticky;
    top:4.8rem;
    margin-top:8rem;
}

.square img {
    object-fit: contain;
    width: auto;
    height: 100%;
    width: 100%;
    height:100%;
    object-fit: contain;
}

.square{
    width: 100%;
    height: 50vw;
    margin-bottom: 1rem;
    display: inline-block;
}

.grid-item h2 {
    margin: 0;
    font-size: 1rem;
    opacity: 1;
    transition: all .2s ease;
    line-height: 0.8rem;
}

.ajax-link:hover h2 {
    opacity: 1;  
}

h1.single-title {
    position: fixed;
    left: 2rem;
    z-index: 1;
    top: 1rem;
    margin: 0;
    padding: 0.1rem 0.5rem;
    min-width: 22rem;
    background-color: white;
}

.specs td {
    font-size: var(--smallSize);
    line-height: 1rem;
    padding: 0.1rem 0;
    vertical-align: top;
}

tr td:first-child {
    width: 8rem;
}

.imgprojet.landscape {
  width: 100%;
  padding: 8px 0;
  display: block;
  margin: auto;
}

.imgprojet.portrait {
  width: 100%;
  padding: 8px 0;
  display: block;
  margin: auto;
}

#nav-header.hideheader {
  opacity:0;
}

#nav-header:hover{
    opacity: 1;
}

div#nav-header {
    position: fixed;
    top:1rem;
    background: white;
    padding: 0.2rem 0rem 0.2rem 0.5rem;
    left: 16.5rem;
    opacity:1;
    display: none;
}

#follow {
  position: absolute;
  text-align: left;
}

.overlay-menu{
    position: fixed;
    top: 0;
    left:0;
    display: none;
    width: 100%;
    height: 100%;
    z-index: 4;
    cursor: pointer;
}

.overlay-menu.active{
    display: block;
}

.col-img-projet {
    margin-top: 4px;
    padding-bottom: 4px;
}

.sort-button{
    cursor: pointer;
}

ul.lines-index {
    display: flex;
    flex-direction: column;
}

.project .ajax-link{
    display: flex;
    width: 100%;
}

.rotate-arrow::after{
    transform: rotate(180deg);
}

.lines-index a {
    min-height: 1.8rem;
}

.annee-title{
    position: relative;
    cursor: pointer;
}

#ajax-container {
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  overflow-y: auto;
}

#ajax-container.showprojet {
  opacity: 1;
  pointer-events: auto;
}

.closeajax {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.closeajax.active {
  opacity: 1;
  pointer-events: auto;
}

.opacityNone{
    opacity: 0;
}

.sort-button {
  position: relative;
  cursor: pointer;
  display: inline-block;
}

.sort-button::after {
  content: '';
  position: absolute;
  margin-left: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8em;
  opacity: 0;
  transition: opacity 0.2s;
}

/* Survol : affiche flèche ↑ par défaut */
.sort-button:hover::after {
  content: '↓';
  opacity: 0.4;
}

/* Sens de tri actif */
.sort-button[data-order="asc"]::after {
  content: '↓';
  opacity: 1;
}

.sort-button[data-order="desc"]::after {
  content: '↑';
  opacity: 1;
}

#mobileheader{
    position: fixed;
    top: 1rem;
    text-align: center;
    margin: auto;
    left: 0;
    right: 0;
    width: 100%;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: fit-content;
}

#mobileheader nav{
    display: none;
}

#mobileheader nav.openMobilenav{
    display: flex;
    z-index: 1;
    background-color: white;
}

a.logo-dechelette-mobile{
    position: fixed;
    top:1rem;
    background:white;
}

a.closeMobilemenu{
    position: fixed;
    top:1rem;
    display: block;
    text-align: center;
    left: 0;
    right: 0;
    text-decoration: none;
    background: white;
    font-size: var(--largeSize);
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    width: fit-content;
    margin: auto;
}

.filters-mobile {
    width: 100%;
    background-color: #DCD6C6;
    display: flex;
    flex-direction: column;
    height: 100vh;
    left: 0;
    top: 0;
    padding-top: 6rem;
    z-index: 5;
}

.button-group.filters-button-group.filters.active.filtersmodalmobile {
    background: white;
    height: inherit;
    padding-top: 0;
    top: 1rem;
    width: auto;
    margin: auto;
    left: 50%;
    transform: translate(-50%, -50%);
}

.button-group.filters-button-group.filters.active.filtersmodalmobile .button{
    background: white;
}

a.logo-dechelette-mobile.hidelogo {
    display: none;
}

.hidemobileheader {
    display: none;
}

h1.single-title.hidelogo {
    display: none;
}

a#selected-filter-title {
    font-size: var(--largeSize);
    font-weight: 100;
    position: fixed;
    background: white;
    background: white;
    top: 1.9rem;
    padding: 0.2rem 0.5rem;
    text-align: center;
    min-width: max-content;
    margin: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

body.overflowH #mobileheader nav .filter-btn-mobile {
  display: none !important;
}

p.projet {
    width: 80%;
}

.col-infos h2 {
    margin-top: 2rem;
}

.logo-dechelette:hover + #nav-header.hideheader{
    opacity:1;
}

html.ajax-loading, html.ajax-loading * {
  cursor: progress !important; /* ou 'wait' si tu préfères */
}


@font-face {
    font-family: '8ight';
    src: url('/assets/fonts/8ight-Regular.woff') format('woff');
    src: url('/assets/fonts/8ight-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: '8ight';
    src: url('/assets/fonts/8ight-RegularItalic.woff') format('woff');
    src: url('/assets/fonts/8ight-RegularItalic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@media screen and (min-width:48rem){
    .col-infos p:last-child {
        padding-bottom: 4rem;
    }
    p.projet {
        width: 25%;
    }
    :root {
        --largeSize: 1.2rem;
        --mediumSize: 1rem;
        --smallSize: 0.75rem;
    }
     .grid-item.grid-sizer--width2, .grid-item.grid-item--width2{
        width: 50%;
    }
    .grid-sizer, .grid-item{
        width: 25%;
    }
    .grid {
        width: calc(100% - 16px);
        margin:8rem 8px 0 8px;
    }
    .grid-sizer,
    .grid-item { 
        padding: 8px;
        box-sizing: border-box;
    }
       p.client {
        display: block;
    }
    p.programme {
        width: 30%;
        display: block;
    }
    p.annee {
        width: 10%;
    }
    .infos-sidebar{
        flex-direction: row;
    }
    .col-infos {
        width: 50%;
    }
    .col-content{
        margin-top:0;
    }
    .col-img-projet {
        margin-top: 8px;
        padding-bottom: 8px;
    }
    .imgprojet.portrait {
        width: 60%;
        padding: 8px 0;
        display: block;
        margin: auto;
    }
    .grid-item h2 {
        margin: 0;
        font-size: var(--mediumSize);
        opacity: 0;
        transition: all .2s ease;
        line-height: 0.8rem;
    }
}

@media screen and (min-width:69rem){
    .grid-item.grid-sizer--width2,.grid-item.grid-item--width2{
        width: 40%;
    }
    .grid-sizer, .grid-item{
        width: 20%;
    }
    .index-sidebar{
        width: calc(100% - 7.5rem);
        padding: 0.3rem 1rem 1rem 1rem;
        transition: all .2s ease-in-out;
        overflow: visible;
    }
    .infos-sidebar{
        width: calc(100% - 7.5rem);
        padding: 0.3rem 1rem 1rem 1rem;
        transition: all .2s ease-in-out;
    }
    div#nav-header {
        display: block;
    }
    a.logo-dechelette{
        display: block;
    }
    a.filtre {
        display: block;
    }
    #mobileheader{
      display: none;
    }
    .closeMobilemenu{
        display: none;
    }
    .button-group.filters-button-group {
        position: fixed;
        text-align: right;
        left: inherit;
        right: 5.5rem;
        top: 1rem;
        display: none;
        z-index: 4;
        background-color: white;
        width: inherit;
        height: inherit;
        padding-top: 0;
    }
    .button{
        width: inherit;
    }
    a.closeajax{
        position: fixed;
        right: 2rem;
        padding: 0.2rem 0.5rem;
        top: 1rem;
        display: block;
        font-size: var(--largeSize);
        z-index: 5;
        display: none;
        cursor: pointer;
        width: 2rem;
        height: 2rem;
    }
    a.logo-dechelette, main#ajax-container h1{
        left:2rem;
        text-align: left;
        transform: none;
        top: 1rem;
    }
    a.closeMobilemenu{
       display: none;
    }
    .button-group.filters-button-group.filters.active.filtersmodalmobile {
        padding-top: 0;
        left: inherit;
        transform: inherit;
    }
    header:hover {
        opacity: 1!important;
    }
    .overflowH header{
    opacity:0;
    }
    h1.single-title:hover{
        display: none;
        opacity: 0;
    }
    a#selected-filter-title {
       display: none;
    }
}

@media screen and (min-width:91rem){
    p.taille{
        display: block;
    }
}

@media screen and (min-width:81rem){
    p.mission{
        display: block;
    }
}

@media screen and (min-width:71rem){
    p.localisation{
        display: block;
    }
}

