/* =========================================
ACCUEIL (index.php)
========================================= */

.main-home {
    width: 100%;
    background-color: transparent;
    padding: 30px 0 100px;
    display: flex;
    flex-direction: column;
    gap: 110px;
}

.home-container {
    width: 87%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.monolog-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--tertiary-color);
    font-variant-numeric: tabular-nums;
}

.monolog-index {
    color: var(--secondary-color);
    font-weight: 500;
}

.monolog-meta-item {
    display: none;
}


/* =========================================
(01) HERO & SHOWREEL 16:9
========================================= */

.home-presentation .home-container {
    gap: clamp(24px, 3vw, 38px);
}

.home-presentation-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

.home-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-title > h1,
.home-title > h2 {
    font-size: clamp(2.6rem, 1.15rem + 6.2vw, 6.5rem);
    letter-spacing: -0.045em;
    color: var(--secondary-color);
    line-height: 0.94;
}

.home-title > h1 { font-weight: 500; }
.home-title > h2 { font-weight: 400; }

.home-description {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 540px;
}

.home-description > p {
    color: var(--secondary-color);
    font-size: clamp(0.92rem, 0.78rem + 0.62vw, 1.3rem);
    letter-spacing: -0.02em;
    font-weight: 400;
    line-height: 1.48;
}

.home-activities {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.home-activities > div {
    font-size: 0.74rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    padding: 4px 12px;
    border-radius: 50px;
    border: 1px solid;
}

.activities {
    border-color: var(--border-subtle);
    color: var(--secondary-color);
}

.home-showreel-wrapper {
    width: 100%;
}

.home-showreel-card {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background-color: #0c0c0c;
}

.home-showreel-card > video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.reel-controls-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
}

.reel-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #f7f7f7;
    font-variant-numeric: tabular-nums;
}

.reel-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #f7f7f7;
    transition: opacity 0.3s ease;
}

.reel-indicator.paused { opacity: 0.35; }

.reel-timecode {
    color: rgba(247, 247, 247, 0.65);
    margin-left: 4px;
}

.reel-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reel-btn {
    background-color: rgba(247, 247, 247, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(247, 247, 247, 0.2);
    color: #f7f7f7;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 5px 12px;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.reel-btn:hover {
    background-color: #f7f7f7;
    color: #0c0c0c;
    border-color: #f7f7f7;
}

.reel-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(247, 247, 247, 0.18);
    z-index: 3;
}

.reel-progress-fill {
    height: 100%;
    width: 0%;
    background-color: #f7f7f7;
    transition: width 0.15s linear;
}


/* =========================================
(02) EXPERTISE & (03) PORTFOLIO
========================================= */

.home-expertise .home-container,
.home-portfolio .home-container {
    gap: 32px;
}

.expertise-editorial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    width: 100%;
}

.expertise-description {
    font-size: clamp(0.88rem, 0.8rem + 0.35vw, 1.05rem);
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.015em;
    color: var(--secondary-color);
}

.expertise-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.expertise-row {
    display: flex;
    flex-direction: column;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    outline: none;
    transition: opacity 0.35s ease;
}

.expertise-row:first-child { padding-top: 0; }
.expertise-list:hover .expertise-row:not(:hover) { opacity: 0.32; }

.expertise-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
}

.expertise-index {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--tertiary-color);
    font-variant-numeric: tabular-nums;
    min-width: 30px;
}

.expertise-item {
    font-size: clamp(2rem, 0.95rem + 4.5vw, 5.5rem);
    font-weight: 500;
    letter-spacing: -0.05em;
    line-height: 1.04;
    color: var(--secondary-color);
    margin-right: auto;
    transition: transform 0.4s ease;
}

.expertise-row:hover .expertise-item,
.expertise-row:focus-within .expertise-item {
    transform: translateX(6px);
}

.expertise-hover-box {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.expertise-row:hover .expertise-hover-box,
.expertise-row:focus-within .expertise-hover-box {
    grid-template-rows: 1fr;
}

.expertise-hover-inner { overflow: hidden; }

.expertise-item-desc {
    padding-top: 12px;
    padding-left: 44px;
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.62;
    letter-spacing: -0.015em;
    color: var(--tertiary-color);
    max-width: 540px;
}

.view-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--tertiary-color);
    cursor: pointer;
    transition: color 0.25s ease;
}

.view-btn.active,
.view-btn:hover {
    color: var(--secondary-color);
    font-weight: 600;
}

.view-sep { color: var(--border-subtle); }

#gallery { transition: opacity 0.18s ease; }
#gallery.is-switching { opacity: 0.25; }

#gallery[data-layout="index"] {
    display: flex;
    flex-direction: column;
    row-gap: 0;
    width: 100%;
    counter-reset: portfolio-index;
}

#gallery[data-layout="index"] .project-item {
    position: relative;
    border-bottom: 1px solid var(--border-subtle);
    transition: opacity 0.3s ease;
    counter-increment: portfolio-index;
}

#gallery[data-layout="index"] .project-item:first-child {
    border-top: 1px solid var(--border-subtle);
}

#gallery[data-layout="index"]:hover .project-item:not(:hover) {
    opacity: 0.35;
}

#gallery[data-layout="index"] .project-image {
    aspect-ratio: auto;
    border-radius: 0;
    background-color: transparent;
    overflow: visible;
}

#gallery[data-layout="index"] .project-image > img,
#gallery[data-layout="index"] .project-card h4 > i {
    display: none;
}

#gallery[data-layout="index"] .project-content-overlay {
    position: relative;
    height: auto;
    padding: 18px 0;
    background: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    pointer-events: auto;
}

#gallery[data-layout="index"] .project-card h4 {
    order: 1;
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    justify-content: flex-start;
    gap: 12px;
}

#gallery[data-layout="index"] .project-card h4::before {
    content: "(0" counter(portfolio-index) ")";
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--tertiary-color);
    font-variant-numeric: tabular-nums;
}

#gallery[data-layout="index"] .meta-project {
    order: 2;
    align-self: center;
    gap: 6px;
}

#gallery[data-layout="index"] .meta-project > span {
    font-size: 0.68rem;
    color: var(--secondary-color);
    background-color: transparent;
    border: 1px solid var(--border-subtle);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 50px;
    padding: 4px 10px;
}


/* =========================================
BOUTON BANNIÈRE CTA
========================================= */

.home-cta-banner {
    width: 100%;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    color: var(--secondary-color);
    background-color: var(--primary-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.home-cta-banner:hover {
    border-color: var(--secondary-color);
}

.cta-dots,
.cta-box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cta-dots {
    width: 18px;
    color: var(--secondary-color);
}

.cta-dots svg {
    width: 100%;
    height: auto;
    display: block;
}

.cta-text {
    font-family: "Crimson Pro", serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.2rem;
    letter-spacing: -0.015em;
    color: var(--secondary-color);
    text-align: center;
    line-height: 1.1;
}

.cta-box {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.cta-box i {
    font-size: 0.95rem;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-cta-banner:hover .cta-box {
    border-color: var(--secondary-color);
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.home-cta-banner:hover .cta-box i {
    transform: rotate(45deg);
}


/* =========================================
ANIMATIONS D'APPARITION AU SCROLL (REVEAL)
========================================= */

.reveal-on-scroll {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}


/* =========================================
MEDIA QUERIES
========================================= */

@media screen and (min-width: 600px) {
    .monolog-meta-item { display: inline-block; }
}

@media screen and (min-width: 768px) {
    .main-home { padding: 45px 0 130px; gap: 145px; }
    .monolog-topbar, .view-btn { font-size: 0.82rem; }

    .home-presentation-meta {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        column-gap: 20px;
        row-gap: 0;
        align-items: end;
    }

    .home-title { grid-column: 1 / 7; }
    .home-description { grid-column: 7 / 13; max-width: none; gap: 14px; }

    .expertise-editorial-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 24px;
        align-items: start;
    }

    .expertise-sidebar { grid-column: 1 / 5; top: 105px; }
    .expertise-item-desc { font-size: 0.92rem; }
    .expertise-list { grid-column: 6 / 13; }

    #gallery[data-layout="index"] .project-card h4 { font-size: 1.3rem; }

    #gallery[data-layout="index"] .project-image > img {
        display: block;
        position: absolute;
        right: 200px;
        top: 50%;
        width: 240px;
        height: auto;
        aspect-ratio: 16 / 10;
        border-radius: 8px;
        pointer-events: none;
        opacity: 0;
        transform: translateY(-50%) scale(0.92);
        transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 10;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    }

    #gallery[data-layout="index"] .project-item:hover .project-image > img {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    .home-cta-banner { margin-top: 28px; padding: 16px 24px; border-radius: 14px; }
    .cta-text { font-size: 1.35rem; }
}

@media screen and (min-width: 1024px) {
    .main-home { padding: 60px 0 155px; gap: 195px; }
    .home-expertise .home-container, .home-portfolio .home-container { gap: 40px; }
    .monolog-topbar, .view-btn { font-size: 0.84rem; }
    .monolog-topbar { padding-bottom: 16px; }

    .home-presentation-meta { column-gap: 24px; }
    .home-title { grid-column: 1 / 8; }
    .home-description { grid-column: 8 / 13; gap: 16px; }
    .home-activities > div { font-size: 0.76rem; padding: 5px 13px; }

    .home-showreel-card { border-radius: 16px; }
    .reel-controls-bar { padding: 18px 24px; }
    .reel-status { font-size: 0.78rem; }
    .reel-btn { font-size: 0.74rem; padding: 6px 14px; }

    .expertise-row { padding: 22px 0; }
    .expertise-index { font-size: 0.8rem; min-width: 34px; }
    .expertise-item-desc { padding-left: 48px; font-size: 0.95rem; }

    #gallery[data-layout="index"] .project-content-overlay { padding: 20px 0; }
    #gallery[data-layout="index"] .project-card h4 { font-size: 1.45rem; gap: 14px; }
    #gallery[data-layout="index"] .project-card h4::before { font-size: 0.8rem; }
    #gallery[data-layout="index"] .meta-project > span { font-size: 0.72rem; padding: 4px 11px; }
    #gallery[data-layout="index"] .project-image > img { right: 260px; width: 290px; }

    .home-cta-banner { margin-top: 40px; padding: 22px 30px; border-radius: 20px; }
    .cta-dots { width: 25px; }
    .cta-text { font-size: 1.7rem; }
    .cta-box { width: 31px; height: 31px; }
}

@media screen and (min-width: 1280px) {
    .main-home { gap: 220px; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}