/* =====================================================
   Anatomie — Oriane Droubay
   Page layout fidèle aux specs Figma (1728px base)
   ===================================================== */

/* ─── Page Wrapper ──────────────────────────────────── */
.ana-page-wrapper {
    position: relative;
    width: 100%;
    background: #FFFFFF;
    overflow-x: hidden;
}

.ana-layout-container {
    position: relative;
    width: 1728px;
    height: 2902px;
    margin: 0 auto;
    background: #FFFFFF;
}

/* ─── HERO & PORTRAIT ───────────────────────────────── */
.ana-hero {
    position: absolute;
    width: 1728px;
    height: 770px;
    left: 0px;
    top: 0px;
    background-image: url('../12-%20Anatomie/Portrait%201.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Descriptif card */
.ana-descriptif {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    padding: 25px 17px;
    position: absolute;
    width: 401px;
    height: 255px;
    left: 664px;
    top: 480px; /* Shifted slightly up from 542px */
    background-image: url('../12-%20Anatomie/Descriptif.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    z-index: 50; /* Keep card on top of drawings when scrolling */
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.ana-descriptif-text {
    width: 369px;
    height: fit-content;
    font-family: 'Source Code Pro', monospace;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 18px;
    color: #101010;
    text-align: left;
    margin: 0 0 15px 0;
    white-space: pre-line;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    overflow: hidden;
}

/* BOUTON TOUT VOIR */
.ana-bouton-tout-voir {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    gap: 113px;
    width: 22px;
    height: 13px;
    flex: none;
    order: 1;
    flex-grow: 0;
}

.ana-line-1 {
    display: none;
}

.ana-arrow {
    margin: 0 auto;
    width: 22px;
    height: 13px;
    transform: rotate(0deg);
    flex: none;
    order: 1;
    flex-grow: 0;
    transition: transform 0.3s ease;
}

.ana-arrow img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.ana-descriptif:hover .ana-arrow {
    transform: translateY(8px) rotate(0deg);
}

/* ─── ASYMMETRIC GRID ───────────────────────────────── */
.ana-img-card {
    position: absolute;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    /* Transition for parallax Y updates and scroll reveal opacity */
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(calc(80px + var(--parallax-y, 0px))) scale(0.95);
}

.ana-img-card.visible {
    opacity: 1;
    transform: translateY(var(--parallax-y, 0px)) scale(1);
}

.ana-img-card.visible:hover {
    transform: scale(1.15) translateY(calc(var(--parallax-y, 0px) - 10px));
    box-shadow: 0 20px 40px rgba(16, 16, 16, 0.15);
    z-index: 10;
}

/* Corp Position 1 */
.ana-corp-position {
    width: 482px;
    height: 329px;
    left: 167px;
    top: 770px;
    background-image: url('../12-%20Anatomie/Corp-position%201.webp');
}

/* Corp 1 */
.ana-corp {
    width: 483px;
    height: 321px;
    left: 1157px;
    top: 801px;
    background-image: url('../12-%20Anatomie/Corp%201.webp');
}

/* Bouche 1 */
.ana-bouche {
    width: 497px;
    height: 329px;
    left: 246px;
    top: 1201px;
    background-image: url('../12-%20Anatomie/Bouche%201.webp');
}

/* Visage 1 */
.ana-visage {
    width: 484px;
    height: 318px;
    left: 1049px;
    top: 1245px;
    background-image: url('../12-%20Anatomie/Visage%201.webp');
}

/* Main 1 */
.ana-main {
    width: 466px;
    height: 321px;
    left: 147px;
    top: 1679px;
    background-image: url('../12-%20Anatomie/Main%201.webp');
}

/* Nez 1 */
.ana-nez {
    width: 497px;
    height: 328px;
    left: 1116px;
    top: 1636px;
    background-image: url('../12-%20Anatomie/Nez%201.webp');
}

/* ─── SÉLECTION AUTRES PROJETS ──────────────────────── */
.ana-others-section {
    position: absolute;
    left: 147px;
    top: 2081px;
    width: 1434px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ana-others-title {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    color: #101010;
    margin: 0 0 10px 0;
}

.ana-selection {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    height: 650px;
    border-radius: 8px;
    overflow: hidden;
    gap: 0;
}

.ana-selection-card {
    position: relative;
    width: 478px;
    height: 650px;
    overflow: hidden;
    flex-shrink: 0;
    text-decoration: none;
    cursor: pointer;
    display: block;
}

.ana-selection-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.ana-selection-card:hover .ana-selection-bg {
    transform: scale(1.04);
    filter: brightness(0.9);
}

.ana-selection-label {
    position: absolute;
    top: 23px;
    right: 27px;
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: #101010;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #101010;
    padding: 4px 10px;
    border-radius: 2px;
    z-index: 2;
    transition: background 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

.ana-selection-card:hover .ana-selection-label {
    background: #101010;
    color: #FFFFFF;
}

/* ─── Responsive Scaling ─────────────────────────────── */
@media (max-width: 1728px) {
    .ana-page-wrapper {
        height: calc(2902px * (100vw / 1728));
        overflow-x: hidden;
    }

    .ana-layout-container {
        transform: scale(calc(100vw / 1728));
        transform-origin: top left;
        margin: 0;
    }
}
