/* =========================================================================
   MESDAMES A. - THE DARK SPACE THEATRICAL REDESIGN 
   Bespoke, framework-less architecture. 
   ========================================================================= */

:root {
    /* The Absolute Dark Palette */
    --pitch-black: #000000;
    --void-black: #050505;
    --stage-floor: #0c0c0e;

    /* The Guide */
    --red-dot: #e32626;
    --red-dot-glow: rgba(227, 38, 38, 0.4);

    /* High Contrast Text */
    --pure-white: #ffffff;
    --off-white: #ececec;
    --script-gray: #a3a3a3;
    --subtle-line: rgba(255, 255, 255, 0.1);

    /* Typography Scale */
    --font-dramatic: 'Cormorant Garamond', serif;
    --font-technical: 'Space Mono', monospace;

    /* Base Spacing & Layout */
    --space-s: 1rem;
    --space-m: 2rem;
    --space-l: 4rem;
    --space-xl: 8rem;
    --space-xxl: 16rem;

    --max-width: 1000px;
}

/* -------------------------------------------------------------------------
   RESET & FOUNDATION
   ------------------------------------------------------------------------- */

html {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

body.dark-space {
    background-color: var(--pitch-black);
    color: var(--off-white);
    font-family: var(--font-technical);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Custom Cursor override if JS applies the state */
    /* cursor: none; */
}

/* -------------------------------------------------------------------------
   TYPOGRAPHY
   ------------------------------------------------------------------------- */

.dramatic-title {
    font-family: var(--font-dramatic);
    font-size: clamp(3.5rem, 8vw, 8rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--pure-white);
    text-transform: none;
}

.section-title {
    font-family: var(--font-dramatic);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 300;
    color: var(--pure-white);
    border-bottom: 1px solid var(--subtle-line);
    padding-bottom: var(--space-s);
    margin-bottom: var(--space-l);
}

.mono-text {
    font-family: var(--font-technical);
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.text-readable {
    font-family: var(--font-dramatic);
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.8;
    color: var(--off-white);
}

.label-equipe-crea {
    font-family: var(--font-technical);
    color: var(--red-dot);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.5rem;
}

.label-avec {
    display: block;
    margin-bottom: 0.8rem;
}

.names-list {
    display: block;
    line-height: 1.8;
}

.names-list span {
    display: block;
    opacity: 0.9;
    font-size: 1.1rem;
}

.bio-focus {
    font-size: 1.3rem;
    color: var(--script-gray);
    max-width: 800px;
    margin-top: var(--space-m);
}

/* -------------------------------------------------------------------------
   THE RED DOT (The Guide)
   ------------------------------------------------------------------------- */

#red-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 14px;
    height: 14px;
    background-color: var(--red-dot);
    border-radius: 50%;
    pointer-events: none;
    z-index: 100000;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 0 20px var(--red-dot-glow);
    mix-blend-mode: screen;
}

.dot-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background-color: var(--red-dot);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: screen;
    box-shadow: 0 0 10px var(--red-dot-glow);
    opacity: 0;
    /* Base opacity, will be set via JS */
}

/* Enlarge dot when hovering interactive items (handled via JS classes) */
#red-dot.hover-active {
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: 1px solid var(--red-dot);
    box-shadow: none;
}

/* -------------------------------------------------------------------------
   LAYOUT ARCHITECTURE
   ------------------------------------------------------------------------- */

.stage-section {
    min-height: auto;
    padding: var(--space-xl) var(--space-m);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.content-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.row-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-l);
}

@media (min-width: 900px) {
    .row-layout {
        grid-template-columns: 1fr 2fr;
    }

    .compagnie-split {
        grid-template-columns: 1.7fr 1.3fr;
        align-items: start;
    }
}

.compagnie-split .bio-focus {
    margin-top: 0;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-m {
    margin-top: var(--space-m);
}

.mt-l {
    margin-top: var(--space-l);
}

.mt-xl {
    margin-top: var(--space-xl);
}

/* -------------------------------------------------------------------------
   COMPONENTS
   ------------------------------------------------------------------------- */

.page-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 3.5rem 0;
    transition: background 0.3s, padding 0.3s;
}

.page-header .content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-m);
    /* Gutter */
}

/* Navigation */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem var(--space-m);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.3s, padding 0.3s;
}

.nav-brand {
    font-family: var(--font-dramatic);
    font-size: 1.5rem;
    color: var(--pure-white);
    text-decoration: none;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nav-logo {
    height: 32px;
    width: auto;
    transition: height 0.3s;
}

@media (max-width: 768px) {
    .nav-logo {
        height: 24px;
    }
}

.nav-brand-small {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-dramatic);
    font-size: 1.2rem;
    color: var(--pure-white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

#hero,
#creations {
    min-height: 100vh;
}

/* -------------------------------------------------------------------------
   Creation Pages — Shared Styles
   (hero bg is driven by --hero-bg custom property set on <body>)
   ------------------------------------------------------------------------- */
#creation-hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--space-xl);
    /* Hero bg is applied by main.js reading data-hero-bg on <body> */
}

#creation-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.5);
}

.hero-title-group {
    position: relative;
    z-index: 2;
}

.page-header {
    z-index: 1000;
}

.footer-stage {
    background: var(--void-black);
    z-index: 100;
}

#creation-hero h1 {
    font-size: clamp(3.5rem, 9vw, 6.5rem);
    margin-bottom: var(--space-s);
}

.nav-brand-small:hover {
    opacity: 1;
}

.nav-brand-small img {
    height: 20px;
}

.header-nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.video-stage .embed-responsive {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.video-stage .embed-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--subtle-line);
    border-radius: 50%;
    color: var(--pure-white);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.nav-arrow:hover {
    border-color: var(--red-dot);
    color: var(--red-dot);
    box-shadow: 0 0 10px var(--red-dot-glow);
}

.nav-arrow.disabled {
    opacity: 0.2;
    pointer-events: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-m);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-technical);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--pure-white);
    text-decoration: none;
    margin-left: var(--space-m);
    transition: opacity 0.3s;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 2px 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 1px;
    background-color: #ffffff;
    transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 768px) {
    #main-nav {
        padding: 1rem 1.5rem;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(8px);
    }

    .nav-brand {
        font-size: 1.1rem;
        mix-blend-mode: difference;
    }

    .btn-support {
        padding: 0.4rem 0.8rem;
        font-size: 0.65rem;
        border-width: 1px;
    }

    .menu-toggle {
        display: flex;
        margin-left: 0.8rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--void-black);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--subtle-line);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        margin: 1.5rem 0;
        font-size: 1.5rem;
        font-family: var(--font-dramatic);
    }

    /* Animate toggle to X */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

.nav-links a:hover {
    opacity: 0.5;
}

/* Hero Elements */
.scroll-indicator {
    margin-top: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-s);
    font-family: var(--font-technical);
    font-size: 0.75rem;
    color: var(--script-gray);
    text-transform: uppercase;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--red-dot), transparent);
}

/* Repertoire List */
.creation-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-s);
    border-bottom: 1px solid var(--subtle-line);
    padding: var(--space-l) 0;
    transition: border-color 0.4s ease;
}

@media (min-width: 768px) {
    .creation-item {
        grid-template-columns: 200px 1fr;
        gap: var(--space-xl);
    }
}

.creation-item:hover {
    border-bottom-color: var(--red-dot);
}

.creation-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.creation-meta .accent {
    color: var(--red-dot);
}

.creation-title {
    font-family: var(--font-dramatic);
    font-size: 2.5rem;
    font-weight: 400;
    margin-top: 0.5rem;
}

.creation-details .desc {
    font-size: 1.1rem;
    color: var(--script-gray);
    margin-bottom: var(--space-m);
    max-width: 600px;
}

/* Links & Buttons */
.bespoke-link {
    font-family: var(--font-technical);
    font-size: 0.85rem;
    color: var(--pure-white);
    text-decoration: none;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.bespoke-link span {
    color: var(--red-dot);
    transition: transform 0.3s ease;
}

.bespoke-link:hover span {
    transform: translateX(10px);
}

.bespoke-btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--subtle-line);
    color: var(--pure-white);
    text-decoration: none;
    font-family: var(--font-technical);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.4s ease;
}

.bespoke-btn:hover {
    border-color: var(--red-dot);
    background: rgba(227, 38, 38, 0.05);
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-m);
}

.past-members-list {
    /* Behavior is now regular grid by default, or you can force it to take more space if wanted */
    grid-column: span 1;
}

@media (min-width: 900px) {

    .support-accordion,
    .past-members-list {
        grid-column: span 1;
    }
}

.team-member .name {
    font-family: var(--font-dramatic);
    font-size: 1.8rem;
    font-weight: 400;
}

.team-member .role {
    color: var(--red-dot);
    font-size: 0.75rem;
    display: block;
    margin-top: 0.2rem;
}



/* Footer / Contact Stage */
.footer-stage {
    background-color: var(--void-black);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.9;
}

.footer-brand img {
    width: 80px;
    height: auto;
}

.big-mail {
    display: block;
    font-family: var(--font-dramatic);
    font-size: clamp(2rem, 6vw, 5rem);
    color: var(--pure-white);
    text-decoration: none;
    margin-top: var(--space-m);
    transition: color 0.4s ease;
}

.big-mail:hover {
    color: var(--red-dot);
}

.socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-m);
}

.social-link {
    font-family: var(--font-technical);
    color: var(--pure-white);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.social-link:hover {
    text-decoration: line-through;
    text-decoration-color: var(--red-dot);
}

.dot-separator {
    color: var(--red-dot);
}

.legal {
    font-size: 0.7rem;
    color: var(--subtle-line);
}

/* -------------------------------------------------------------------------
   INTERACTION ANIMATIONS (To be triggered by JS)
   ------------------------------------------------------------------------- */
.reveal-me {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-me.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Dynamic Creations Background */
#creations {
    position: relative;
    overflow: hidden;
}

#creations-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0;
    transition: opacity 0.6s ease, background-image 0.4s ease;
}

#creations .content-wrapper {
    position: relative;
    z-index: 1;
    /* Keep text above background */
}

/* Accordion Biographies */
.team-member-accordion {
    border-bottom: 1px solid var(--subtle-line);
    margin-bottom: var(--space-s);
}

.team-member-accordion[open] .team-member-header {
    border-bottom: 1px solid transparent;
}

.team-member-header {
    display: flex;
    align-items: center;
    gap: var(--space-m);
    padding: var(--space-s) 0;
    cursor: pointer;
    list-style: none;
    /* Hide default arrow */
}

.team-member-header::-webkit-details-marker {
    display: none;
}

.team-member-header .avatar {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) contrast(1.2);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.team-member-header:hover .avatar,
.team-member-accordion[open] .avatar {
    filter: grayscale(0%) contrast(1);
    transform: scale(1.05);
}

.team-member-header .name {
    font-family: var(--font-dramatic);
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
    transition: color 0.3s ease;
}

.team-member-header:hover .name,
.team-member-accordion[open] .name {
    color: var(--red-dot);
}

.team-member-bio {
    padding: var(--space-s) 0 var(--space-s) calc(60px + var(--space-m));
    color: var(--script-gray);
    line-height: 1.6;
}

.team-member-bio p {
    margin-bottom: var(--space-s);
}

.past-members-list .team-member-bio {
    padding-left: 0;
    /* Align with header */
}

/* Specific Image formatting overrides for migrated legacy content */
#creation-content img.img-fluid {
    height: auto;
    border-radius: var(--space-s);
    margin-bottom: var(--space-m);
}

#creation-content .float-sm-start {
    float: left;
    margin-right: var(--space-m);
    max-width: 40%;
}

#creation-content .float-sm-end {
    float: right;
    margin-left: var(--space-m);
    max-width: 40%;
}

#creation-content .clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* Fix missing lightbox padding in the grid generator */
.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: var(--space-l);
}

.masonry-gallery a {
    display: block;
    overflow: hidden;
    border-radius: var(--space-s);
    aspect-ratio: 3 / 2;
    /* Keeps them consistent but lets them be large */
}

.masonry-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.masonry-gallery a:hover img {
    transform: scale(1.1);
}

/* Video Stage & Scaling */
.video-stage {
    max-width: 850px;
    margin: var(--space-l) auto;
    width: 100%;
    background: var(--stage-floor);
    border: 1px solid var(--subtle-line);
    overflow: hidden;
    position: relative;
}

.video-stage video {
    width: 100% !important;
    height: auto !important;
    max-height: 80vh;
    display: block;
}

.video-stage iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.embed-responsive::before {
    display: block;
    content: "";
    padding-top: 56.25%;
    /* 16:9 */
}

.embed-responsive iframe {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Bright Support Button - Subtle Outline */
.btn-support {
    background-color: transparent;
    color: var(--pure-white);
    padding: 0.6rem 1.2rem;
    border-radius: 1px;
    text-transform: uppercase;
    font-family: var(--font-technical);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    border: 1px solid var(--red-dot);
    margin: 5px 0;
}

.btn-support:hover {
    background-color: var(--red-dot);
    color: var(--pure-white);
    box-shadow: 0 0 15px var(--red-dot-glow);
}

.nav-links .btn-support {
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
    margin-left: var(--space-s);
}

.support-accordion {
    border: 1px solid var(--red-dot);
    background: rgba(227, 38, 38, 0.05);
}

.support-accordion .avatar {
    background-color: var(--void-black);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border: 1px solid var(--subtle-line);
}

.support-accordion .avatar img {
    width: 85%;
    height: auto;
    object-fit: contain;
    filter: none !important;
    transition: transform 0.3s ease;
}

.support-accordion:hover .avatar img {
    transform: scale(1.1);
}

/* -------------------------------------------------------------------------
   CREATION HIGHLIGHTS (Metadata Bar)
   ------------------------------------------------------------------------- */
.creation-highlight-bar {
    margin: var(--space-xl) 0;
    padding: var(--space-l);
    background: rgba(227, 38, 38, 0.03);
    border: 1px solid var(--subtle-line);
    border-left: 3px solid var(--red-dot);
    border-radius: 2px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-l);
    animation: fadeIn 1.2s ease;
}

.highlight-info-group .h-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--red-dot);
}

.highlight-info-group .h-value {
    margin: 0;
    font-size: 1.4rem;
    font-family: var(--font-technical);
    color: var(--pure-white);
    line-height: 1.2;
}

.highlight-info-group .h-sub {
    font-size: 0.8rem;
    opacity: 0.6;
    font-style: italic;
    display: block;
    margin-top: 0.3rem;
}

@media (max-width: 900px) {
    .creation-highlight-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}