/**
 * ED Projets - Styles
 *
 * @version 1.0.0
 */

/* ==========================================================================
   Archive - Filtres
   ========================================================================== */

.ed-projets-archive {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-xl);
}

.ed-projets-filters {
    position: relative;
    margin-bottom: var(--space-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ed-projets-filters::-webkit-scrollbar {
    display: none;
}

.ed-projets-filters__list li:last-child {
    padding-right: 30px;
}

.ed-projets-filters-wrapper {
    position: relative;
}

.ed-projets-filters-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(to right, transparent, var(--color-bg));
    pointer-events: none;
}

@media (min-width: 768px) {
    .ed-projets-filters-wrapper::after {
        display: none;
    }
}


.ed-projets-filters__list {
    display: flex;
    justify-content: flex-start;
    gap: var(--space-sm);
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.ed-projets-filters__list li {
    margin: 0;
    padding: 0;
}

.ed-projets-filters__btn {
    display: inline-block;
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: var(--font-size-filter);
    font-weight: var(--font-weight-extralight);
    padding: 8px 0;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.ed-projets-filters__btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-text);
    transition: width var(--transition-base);
}

.ed-projets-filters__btn:hover,
.ed-projets-filters__btn.is-active {
    color: var(--color-text);
    font-weight: var(--font-weight-light);
    opacity: 1;
}

.ed-projets-filters__btn.is-active::after {
    width: 100%;
}

/* ==========================================================================
   Archive - Grille
   ========================================================================== */

.ed-projets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
}

/* Tablette : 2 colonnes */
@media (min-width: 600px) {
    .ed-projets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop : 3 colonnes */
@media (min-width: 1024px) {
    .ed-projets-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   Archive - Card
   ========================================================================== */
.ed-projet-card {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin-bottom: 20px;
}

.ed-projet-card.is-hidden {
    display: none;
}

.ed-projet-card__link {
    display: block;
    text-decoration: none;
}

.ed-projet-card__link:hover {
    opacity: 1;
}

.ed-projet-card__image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #1a1a1a;
}

.ed-projet-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.ed-projet-card__link:hover .ed-projet-card__image img {
    transform: scale(1.05);
}

.ed-projet-card__hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.ed-projet-card__link:hover .ed-projet-card__hover {
    opacity: 1;
}

.ed-projet-card__hover-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ed-projet-card__hover-icon svg {
    width: 24px;
    height: 24px;
}

.ed-projet-card__content {
    padding-top: var(--space-xs);
}

.ed-projet-card__title {
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-bold);
    margin: 0 0 4px 0;
    color: var(--color-text);
}

.ed-projet-card__meta {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: var(--font-size-h3);
    font-weight: var(--font-weight-bold);
    margin: 0;
    color: var(--color-text);
}

.ed-projet-card__lieu {
    text-transform: uppercase;
}

.ed-projet-card__annee::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 1px;
    background-color: var(--color-text-muted);
    margin: 0 8px;
    vertical-align: middle;
}

@media (min-width: 768px) {
    .ed-projet-card__annee::before {
        width: 40px;
        margin: 0 12px;
    }
}

/* ==========================================================================
   Single - Slider
   ========================================================================== */

.ed-projet-single {
    padding-top: var(--space-md);
    padding-bottom: var(--space-xl);
}

.ed-projet-slider {
    margin-bottom: var(--space-md);
}

.ed-projet-slider__track {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: grab;
}

/* Ratio 4/3 */
.ed-projet-slider[data-ratio="4/3"] .ed-projet-slider__track {
    aspect-ratio: 4 / 3;
}

/* Ratio naturel (auto) */
.ed-projet-slider[data-ratio="auto"] .ed-projet-slider__track {
    aspect-ratio: auto;
    height: auto;
}

.ed-projet-slider[data-ratio="auto"] .ed-projet-slider__slide {
    height: auto;
}

.ed-projet-slider[data-ratio="auto"] .ed-projet-slider__slide img {
    height: auto;
    width: 100%;
    object-fit: contain;
}

.ed-projet-slider__track.is-dragging {
    cursor: grabbing;
}

.ed-projet-slider__wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease;
}

.ed-projet-slider__track.is-dragging .ed-projet-slider__wrapper {
    transition: none;
}

.ed-projet-slider__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.ed-projet-slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ed-projet-slider__dots {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-top: var(--space-xs);
}

.ed-projet-slider__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-text-muted);
    border: none;
    padding: 5px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    background-clip: content-box;
    box-sizing: content-box;
}

.ed-projet-slider__dot.is-active,
.ed-projet-slider__dot:hover {
    background-color: var(--color-text);
}

/* ==========================================================================
   Single - Content
   ========================================================================== */

.ed-projet-content {
    max-width: 800px;
}

.ed-projet-content__title {
    font-size: var(--font-size-h1);
    font-weight: var(--font-weight-extralight);
    margin: 0 0 var(--space-xs) 0;
}

.ed-projet-content__meta {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-bold) !important;
    margin: 0 0 var(--space-sm) 0;
    color: var(--color-text);
}

.ed-projet-content__annee::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 1px;
    background-color: var(--color-text);
    margin: 0 8px;
    vertical-align: middle;
}

@media (min-width: 768px) {
    .ed-projet-content__annee::before {
        width: 40px;
        margin: 0 12px;
    }
}

.ed-projet-content__description {
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    margin-top: var(--space-lg);
}

.ed-projet-content__description p {
    margin: 0 0 var(--space-xs) 0;
}

.ed-projet-content__description p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Single - Navigation
   ========================================================================== */

.ed-projet-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-sm);
}

.ed-projet-nav__prev,
.ed-projet-nav__next {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    color: var(--color-text);
    transition: opacity var(--transition-fast);
}

.ed-projet-nav__prev:hover,
.ed-projet-nav__next:hover {
    opacity: 0.7;
}

.ed-projet-nav__back {
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
}

.ed-projet-nav__back:hover {
    opacity: 0.7;
}

