@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;
}

.ascii-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: #fff;
    z-index: 100;
}

.ascii-line {
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        transparent,
        transparent 3px,
        #1a1a1a 3px,
        #1a1a1a 6px
    );
    opacity: 0.8;
}

.info-btn {
    background: none;
    border: 1px solid #1a1a1a;
    color: #1a1a1a;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: all 0.2s ease;
    margin-left: 15px;
    padding: 0;
    line-height: 1;
    animation: infoPulse 3s ease-in-out infinite;
}

.info-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    animation: none;
}

@keyframes infoPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

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

header {
    text-align: center;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tagline {
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin-top: 10px;
    opacity: 0.6;
}

.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-tagline {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.3px;
    opacity: 0.6;
    margin-bottom: 15px;
    font-style: italic;
}

.footer-map {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.footer-map:hover {
    opacity: 0.9;
}

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;
    overflow: hidden;
}

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

.modal-image {
    width: 100%;
    height: 70vh;
    object-fit: cover;
    object-position: center;
    display: block;
}

.modal-info {
    padding: 20px 30px 30px 30px;
    text-align: center;
    max-height: 20vh;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
}

.modal-info h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0;
}

.modal-info h3 {
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 12px;
    opacity: 0.7;
    letter-spacing: 0;
}

.modal-info p {
    font-size: 0.8rem;
    line-height: 1.5;
    opacity: 0.75;
    font-weight: 400;
}

.modal-link {
    margin-top: 20px;
    margin-bottom: 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;
    }
}

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

.modal-intro.active {
    display: flex;
}

.modal-intro-content {
    background: #fff;
    padding: 0;
    border-radius: 20px;
    text-align: center;
    max-width: 600px;
    max-height: 90vh;
    position: relative;
    animation: slideIn 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-video-container {
    position: relative;
    width: 100%;
    max-height: 45vh;
    aspect-ratio: 1;
    overflow: hidden;
    flex-shrink: 1;
}

.modal-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.modal-logo {
    width: 180px;
    height: auto;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.intro-tagline {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 3px;
    color: #fff;
    opacity: 0.9;
}

#rotatingWord {
    display: inline-block;
    min-width: 80px;
    transition: opacity 0.3s ease;
}

.modal-bottom {
    padding: 35px 45px;
    flex-shrink: 1;
    min-height: 0;
}

.services {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.services p {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.5;
    opacity: 0.85;
}

/* Bandeau clients défilant */
.clients-banner {
    width: 100%;
    overflow: hidden;
    margin: 25px 0 25px 0;
    padding: 15px 0;
    background: linear-gradient(to right,
        #fff 0%,
        transparent 10%,
        transparent 90%,
        #fff 100%
    );
}

.clients-track {
    display: flex;
    align-items: center;
    gap: 40px;
    animation: scroll 30s linear infinite;
    width: fit-content;
}

.client-logo {
    height: 25px;
    max-width: 80px;
    width: auto;
    object-fit: contain;
    opacity: 0.4;
    filter: grayscale(100%);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.client-logo:hover {
    opacity: 0.8;
    filter: grayscale(0%);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.333%);
    }
}

.contact-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    border-radius: 25px;
    transition: all 0.2s ease;
}

.contact-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-intro-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    line-height: 1;
    z-index: 10;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-intro-close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .modal-intro-content {
        max-width: 90%;
    }

    .modal-bottom {
        padding: 25px 25px;
    }

    .modal-intro-content {
        max-height: 95vh;
    }

    .modal-video-container {
        max-height: 40vh;
    }

    .services p {
        font-size: 0.8rem;
    }

    .modal-logo {
        width: 140px;
    }

    .intro-tagline {
        font-size: 0.75rem;
    }

    .services p {
        font-size: 0.85rem;
    }

    .client-logo {
        height: 20px;
        max-width: 60px;
    }

    .clients-track {
        gap: 25px;
    }

    .ascii-header {
        padding: 0 15px;
    }

    .container {
        width: 90%;
    }
}
