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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

body {
    font-family: 'Times New Roman', Times, serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.2;
    font-size: 15px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    position: relative;
}

/* Header - positionnement exact selon la maquette */
.header {
    position: fixed;
    top: 20px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 102;
}

.name {
    font-size: 15px;
    font-weight: normal;
    cursor: pointer;
    transition: none;
}

.name:hover {
    opacity: 0.2;
}

.tagline {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 15px;
    font-style: italic;
    text-align: center;
    white-space: nowrap;
}

.about-link {
    font-size: 15px;
    color: #333;
    text-decoration: none;
    transition: none;
}

.about-link:hover {
    opacity: 0.2;
}

/* Projects list - centré verticalement dans la page */
.projects-container {
    position: absolute;
    bottom: 0px;
    width: 60%;
    max-width: 1240px;
    bottom: 20px;
    transition: all 0.3s ease-in-out;
}

.projects-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.project-item-wrapper {
    margin-bottom: 0px;
}

.project-item {
    display: flex;
    font-size: 15px;
    cursor: pointer;
    transition: none;
}

.project-item:hover {
    opacity: 0.2;
}

.project-number {
    width: 30px;
    flex-shrink: 0;
    text-align: left;
}

.project-title {
    flex: 1;
    padding-left: 40px;
    padding-right: 40px;
}

.project-meta {
    text-align: right;
    white-space: nowrap;
}  

/* Footer - positionnement exact en bas à droite */
.footer {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 38%;
    font-size: 15px;
    font-style: normal;
    color: #333;
    text-align: right;
    z-index: 100;
}

.footer a {
    color: #333;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Project Detail Accordion */
.project-detail {
    max-height: 0;
    overflow: hidden;
    transition: all 0.6s ease;
    opacity: 0;
    margin-top: 0px;
    position: relative;
    z-index: 1;
}

.project-detail.active {
    max-height: 1000px;
    opacity: 1;
}

/* Carousel */
.carousel-container {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    margin: 10px 0;
}

.carousel {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
    pointer-events: none;
}

.carousel-slide {
    min-width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    color: #666;
    font-size: 18px;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    margin: 10px 0;
}

.carousel-nav-area {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    cursor: pointer;
    z-index: 2;
    visibility: hidden;
    pointer-events: auto;
}

.project-detail.active .carousel-nav-area {
    visibility: visible;
}

.carousel-nav-area.prev {
    left: 0;
}

.carousel-nav-area.next {
    right: 0;
}

/* Project detail footer */
.project-detail-footer {
    display: flex;
    font-size: 12px;
    transition: none;
    margin-bottom: 15px;
    position: relative;
    z-index: 3;
}

.project-detail-footer .project-number {
    width: 30px;
    flex-shrink: 0;
    text-align: left;
}

.project-detail-footer .project-title {
    flex: 1;
    padding-left: 40px;
    padding-right: 40px;
}

.project-detail-footer .project-meta {
    text-align: right;
    white-space: nowrap;
}

.project-detail-footer a {
    color: #333;
    text-decoration: none;
}

.project-detail-footer a:hover {
    text-decoration: underline;
}

/* About popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    z-index: 100;
    display: none;
}

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

.about-popup {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 38%;
    background-color: #f5f5f5;
    z-index: 101;
    display: none;
    overflow-y: auto;
}

.about-popup.active {
    display: block;
}

.about-content {
    margin: 0;
    padding: 20px;
    position: relative;
}

.about-text {
    font-size: 15px;
    margin-top: 120px;
}

.about-text p {
    margin-bottom: 0px;
}

.about-text h3 {
    font-size: 15px;
    font-weight: normal;
    font-style: italic;
    margin-top: 17px;
}

.about-text a {
    color: #333;
    text-decoration: none;
}

.about-text a:hover {
    text-decoration: underline;
}

address {
    font-style: normal;
}

/* Responsive pour petits écrans */
@media (max-width: 1000px) {
    .container {
        padding: 20px;
    }

    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 20px;
        background-color: #f5f5f5;
    }

    .tagline {
        position: static;
        transform: none;
        white-space: normal;
        text-align: left;
        margin-right: 40%;
        margin-bottom: 10px;
    }

    .projects-container {
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: auto;
        height: auto;
        max-height: calc(100vh - 180px);
        overflow-y: auto;
        top: 140px;
    }
    
    .project-item {
        flex-direction: column;
        margin-bottom: 20px;
    }

    .project-title {
        padding: 5px 0;
    }

    .project-meta {
        text-align: left;
    }

    .footer {
        visibility: hidden;
    }

    .carousel-container {
        width: 100%;
        height: auto;
    }
    
    .carousel-slide img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .project-detail-footer {
        flex-direction: column;
    }

    .project-detail-footer span:first-child {
        width: auto;
    }

    .project-detail-footer span:nth-child(2) {
        padding: 5px 0;
    }

    .project-detail-footer a,
    .project-detail-footer span:last-child {
        text-align: left;
    }

    .about-popup {
        margin-top: 140px;
        width: 100%;
        height: auto;
        overflow-y: auto;
    }

    .about-content {
    padding: 0px 20px;
    }

    .about-text {
    margin-top: 0px;
    }
    }


@media (max-width: 1375px) {
    .container {
        padding: 20px;
    }

    
    .footer {
        width: auto;
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 1400px) {

    .footer {
        visibility: hidden;
    }
}
