:root {
    --bg-color: #fff;
    --text-color: #000000;
    --text-color-light: #d3d3d3;
    --border-color: #000000; /* Black borders in light mode */
    --circle-color: #000000; /* Scroll button black in light mode */
    --button-bg: #000000; /* Black button */
    --button-text: #fff; /* White text */
    --button-hover-bg: #333333; /* Darker hover effect */
    --svg-fill: #000000; /* Black fill in light mode */
    --svg-stroke: #000000; /* Black stroke in light mode */
     --font-weight: 500;
}

/* Dark Mode */
.dark-mode {
    --bg-color: #000000;
    --text-color: #f1f1f1;
    --border-color: #f1f1f1; /* White border in dark mode */
    --circle-color: #f1f1f1; /* White circle in dark mode */
    --button-bg: #f1f1f1; /* White button */
    --button-text: #000000; /* Black text */
    --button-hover-bg: #d3d3d3; /* Light hover effect */
    --text-color-light: #aaaaaa;
    --svg-fill: #f1f1f1; /* Black fill in light mode */
    --svg-stroke: #f1f1f1; /* Black stroke in light mode */
     --font-weight: 500;
}


#bottom-bar.slide-out {
  transform: translateY(120%);
}


#list-wrapper {
    margin-top: 70px;
    display: block;
    width: 100%;
	padding-top: 40px;
	z-index: 100;
    position: relative;
    padding-left: 10px;
    padding-right: 10px;
}


.view-wrapper.active {
    display: block;
}

.view-wrapper {
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    position: relative; /* Pas absolute ici */
}

.view-wrapper.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: block;
}

.view-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}
.project-item.hide {
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
}
#work-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

.project-item, .project-grid-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-item.hide, .project-grid-item.hide {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}
#grid-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
     padding: 60px 0 20px;
    margin-left: 10px;
    margin-right: 10px;
}


.project-grid-item {
    text-align: left;
    display: block;
    text-decoration: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
    transform: scale(1);
    
}
.project-grid-item.hide {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.project-grid-item img {
    width: 100%;
    height: auto;
}


.project-grid-item-name {
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
    color: var(--text-color);
}
.project-grid-item-name:hover {
    font-size: 16px;
    line-height: 22px;
    color: var(--text-color);
}

.project-grid-item .project-name {
    margin-top: 8px;
    font-size: 16px;
    color: var(--text-color);
}
.container-fluid {padding-right: 0;}

.hidden {
    display: none;
}

a {text-decoration: none;}
.project-item {
    display: grid;
    grid-template-columns: repeat(2, 2fr, 1fr);
    gap: 20px;
    opacity: 1;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

a:hover {color: var(--text-color-light);}
.project-item img {
    width: 100%;
    height: auto;
}


.project-info:hover {
    opacity: 1;
    color: var(--text-color-light);
}

section {
    opacity: 1;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

        
 .intro {
            opacity: 1;
            transform: translateY(50px);
        }


.section.visible {
    opacity: 1;
}


.project-info {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    font-weight: 300;
}

.project-name {font-size: 36px; line-height: 38px; font-weight: 300;  }


#global-thumbnail {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 50vw;
  height: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  z-index: 9999;}

#global-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  padding: 0 10px;
}
.project-thumbnail {
  display: none !important;
}
#global-thumbnail.visible {
  opacity: 1;
  visibility: visible;
}
#global-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}
.grid-view #work-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 60px 10px;
}

.grid-view .project-item {
    all: unset;
    display: block;
    cursor: pointer;
    text-align: center;
}

.grid-view .project-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    opacity: 1;
    transition: none;
    padding: 0;
}

.grid-view .project-info {
    display: block;
    margin-top: 12px;
}

.grid-view .project-name {
    font-size: 16px;
    line-height: 22;
    font-weight: 400;
    color: var(--text-color);
}

/* Hide global-thumbnail in grid view */
.grid-view #global-thumbnail {
    display: none;
}

#bottom-bar {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: var(--bg-color);
  padding-top: 20px;
    padding-bottom: 20px;
  display: flex;
  justify-content: flex-start;
  z-index: 999;
    border-top: 1px solid var(--border-color);
  background: var(--bg-color);
      transition: transform 0.6s ease-in-out;
  transform: translateY(0);
    margin-left: 10px;
    margin-right: 10px;
  will-change: transform;
}

.bottom-bar-inner {
  display: flex;
  gap: 20px;
  align-items: center;
    vertical-align: middle; 
    justify-content: center;
  font-size: 16px;
  color: var(--text-color);
}

.view-toggle {
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
    justify-content: center;
  color: var(--text-color);
  padding-right: 20px;
}

.view-toggle.active {
  color: var(--text-color-light);
}


.view-toggle button {
  background-color: transparent; /* removes the gray */
  color: var(--text-color); /* inherit your theme */
  font-size: 16px;
    font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  outline: none;
  transition: background-color 0.3s ease;
    padding-right: 20px;
}
.view-toggle button span {
  color: var(--text-color); /* default */
}

.view-toggle button.active span {
  color: var(--text-color-light); /* active state */
}
.view-toggle button:hover {
  color: var(--text-color-light);
}

.view-toggle button:focus {
  outline: none;
  box-shadow: none;
}
.custom-select-wrapper {
  position: relative;
  display: inline-block;
  right: 10px;
}

#filterSelect {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: transparent;
  color: var(--text-color);
  font-weight: 500;
  border: 1px solid var(--border-color);
  font-size: 16px;
  padding: 5px 20px 5px 32px; /* add space for icon */
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23000' height='12' viewBox='0 0 20 20' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  border-radius: 40px;
}
.dark-mode #filterSelect {
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23f1f1f1' height='12' viewBox='0 0 20 20' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
}
.custom-select-wrapper .bi {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-color);
  font-size: 16px;
   vertical-align: middle;
}

.view-toggle button:hover i {
  color: var(--text-color-light);
}


.view-toggle button i {
  margin-right: 6px;
  font-size: 16px;
  vertical-align: middle;
}
/* Dark mode override */
.dark-mode .custom-select-wrapper .bi {
  color: var(--text-color);
}
#bottom-bar.fade-out {
  opacity: 0;
  pointer-events: none;
}

.project-grid-item {
  position: relative;
  display: block;
  overflow: hidden;
}

.project-grid-item img {
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease-in-out;
  display: block;
}

.project-grid-item .thumb-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  z-index: 1;
}

.project-grid-item:hover .thumb-hover {
  opacity: 1;
}

.project-grid-item:hover .thumb-default {
  opacity: 0;
}
/* Mobile version */
@media (max-width: 767px) {
    #list-wrapper {
        display: block;
        margin-bottom: 0;
        padding: 0;
        margin-left: 0; 
        padding-right: 0;
		background-color: var(--bg-color);
        min-height: auto;
        margin-left: 10px;
        margin-right: 10px;
        padding-bottom: 0;
    }
    
    
    .global-thumbnail {width: 100%; height: auto; position: absolute;} 
  .grid-view .project-item {
    width: 100%;
    }
    
        .grid-view #work-wrapper {
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
    }
    .project-item {
        position: relative;
        display: block;
        max-height: 100%;
        width: auto;
        opacity: 1;
        padding: 0;
        margin-bottom: 40px;
        border-bottom: 1px solid var(--border-color);
    }
    
#grid-wrapper {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-left: 10px;
    margin-right: 10px;
    padding: 60px 0 0; /* ajout de padding en bas si besoin */
    min-height: auto;
    margin-bottom: 100px;
}

    .project-name {
        font-size: 24px;
        line-height: 30px;
        color: var(--text-color);
        font-weight: 400;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    #hover-image img {max-width: 100%; height: auto; position: absolute; }
    .project-name:hover {color: var(--text-color-light);}
    .project-year,
    .project-type {font-size: 16px; color: var(--text-color-light); line-height: 22px; font-weight: 400; padding: 0; margin-top: auto; margin-bottom: auto; padding-bottom: 0;}
    .project-year {color: var(--text-color-light); bottom: 0; margin-top: auto; margin-bottom: auto; }
    .project-info {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        justify-content: flex-start;
        flex-direction: column;
        top: 0;
        bottom: 0; 
        padding: 0; 
        margin-top: auto; margin-bottom: 20px;
    }
 
    .project-thumbnail {
        position: relative;
        left: 0; 
        margin: 0;
        width: 80%;
        height: auto ;
        opacity: 1;
        transition: none;
        padding-bottom: 10px;
        padding-left: 0;
    }
    
    .project-thumbnail img {
        width: 100%;
        height: auto;
        object-fit: fill; 
        overflow: hidden; 
    }
    
    #bottom-bar {display: flex; padding-right: 20px;}
}
