@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

@font-face {
    font-family: 'Heavitas';
    src: url('fonts/Heavitas.ttf') format('truetype');
    font-weight: bold;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    overflow-x: hidden;
}

.container {
    width: 70%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 0;
}

header {
    text-align: center;
    margin-bottom: 60px;
    display: flex;
    justify-content: center;
}

.header-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 60px;
    width: auto;
}

.title {
    font-family: 'Heavitas', sans-serif;
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: 6px;
    margin: 0;
}

.gallery {
    column-count: 4;
    column-gap: 0;
    margin-bottom: 60px;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    position: relative;
}

.gallery::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, #ffffff);
    pointer-events: none;
}

.tile {
    position: relative;
    width: 100%;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    break-inside: avoid;
    margin-bottom: 0;
}

/* Variation de tailles pour effect masonry */
.tile:nth-child(4n+1) {
    aspect-ratio: 1.2 / 1;
}

.tile:nth-child(4n+2) {
    aspect-ratio: 0.9 / 1;
}

.tile:nth-child(4n+3) {
    aspect-ratio: 1.1 / 1;
}

.tile:nth-child(4n+4) {
    aspect-ratio: 1 / 1;
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.4s ease, filter 0.4s ease;
}

.tile-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.tile-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.4s ease;
}

.tile:hover .tile-video video {
    filter: grayscale(0%);
}

.tile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tile:hover .tile-overlay {
    opacity: 1;
}

.tile:hover img {
    filter: grayscale(0%);
}

.tile-overlay h2 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.tile-overlay h3 {
    font-size: 0.9rem;
    font-weight: 300;
    margin-bottom: 14px;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.tile-overlay p {
    font-size: 0.8rem;
    line-height: 1.5;
    opacity: 0.85;
    font-weight: 300;
}

.tile-link {
    margin-top: 12px;
}

.tile-link a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid #fff;
    transition: opacity 0.2s ease;
    font-weight: 400;
}

.tile-link a:hover {
    opacity: 0.7;
}

footer {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.3px;
}

footer a {
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 1px solid #1a1a1a;
    transition: opacity 0.2s ease;
}

footer a:hover {
    opacity: 0.7;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #fff;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
    border-radius: 2px;
}

@keyframes slideIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.modal-info {
    padding: 30px;
    text-align: center;
}

.modal-info h2 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.modal-info h3 {
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 16px;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

.modal-info p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.75;
    font-weight: 300;
}

.modal-link {
    margin-top: 20px;
}

.modal-link a {
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 1px solid #1a1a1a;
    transition: opacity 0.2s ease;
    font-weight: 400;
}

.modal-link a:hover {
    opacity: 0.7;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
    transition: opacity 0.2s ease;
    z-index: 1001;
}

.modal-close:hover {
    opacity: 0.7;
}

.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    background: none;
    border: none;
    width: 0;
    height: 0;
    border-style: solid;
    transition: all 0.2s ease;
    z-index: 1001;
    opacity: 0.6;
}

.modal-prev {
    left: 30px;
    border-width: 20px 30px 20px 0;
    border-color: transparent #fff transparent transparent;
}

.modal-next {
    right: 30px;
    border-width: 20px 0 20px 30px;
    border-color: transparent transparent transparent #fff;
}

.modal-prev:hover,
.modal-next:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .gallery {
        column-count: 2;
    }

    .tile-overlay {
        padding: 15px;
    }

    .tile-overlay h2 {
        font-size: 1.1rem;
    }

    .tile-overlay h3 {
        font-size: 0.85rem;
    }

    .tile-overlay p {
        font-size: 0.75rem;
    }
}

@media (max-width: 600px) {
    .gallery {
        column-count: 1;
    }
}
