/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Courier New", monospace;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== NAV ===== */
.top-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 22px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
}

.links a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    transition: opacity 0.2s, color 0.4s ease;
}
.links a:hover { opacity: 0.65; }

.prod-logo img {
    width: 130px;
    display: block;
    transition: filter 0.4s ease;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    height: 100svh;
    color: #fff;
}

.background-container {
    position: absolute;
    inset: 0;
}

.bg-slide {
    position: absolute;
    inset: 0;
    background-size: 115%;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease;
}
.bg-slide.active { opacity: 1; }

/* gradient overlay for legibility */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.15) 0%,
        rgba(0,0,0,0.0) 40%,
        rgba(0,0,0,0.55) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px 60px 70px;
}

.hero h1 {
    font-family: 'Georgia', serif;
    font-size: clamp(2.2rem, 6vw, 4.8rem);
    font-weight: normal;
    letter-spacing: 0.06em;
    margin-bottom: 36px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
    line-height: 1.1;
}

/* ===== CTA BUTTONS ===== */
.buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: "Courier New", monospace;
    font-size: 0.82rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px 28px;
    border-radius: 2px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.cta-primary {
    background: #fff;
    color: #000;
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}
.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}

.cta-secondary {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.cta-secondary:hover {
    background: rgba(255,255,255,0.12);
    border-color: #fff;
    transform: translateY(-2px);
}

.cta-icon {
    font-size: 1rem;
    line-height: 1;
}

/* ===== LETTER SECTION ===== */
.letter-section {
    background: #fff;
    color: #000;
    padding: 120px 12% 160px;
}

.letter-content {
    max-width: 680px;
    margin: 0 auto;
}

.doc-title {
    margin: 60px 0 20px;
    font-weight: bold;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.doc-text {
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: justify;
}

.letter-right {
    max-width: 220px;
    margin-left: auto;
    font-size: 0.8rem;
    line-height: 2;
}

.gradient-text {
    background: linear-gradient(to bottom, #000, #555, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== FILM PAGE ===== */
body.film-page {
    background: #fff;
    color: #000;
}

/* Nav on film page — dark text since background is white */
body.film-page .top-nav {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #f0e8ff;
}
body.film-page .top-nav .prod-logo img {
    filter: invert(1);
}
body.film-page .links a {
    color: #000;
}
body.film-page .links a:hover {
    color: #9d4edd;
    opacity: 1;
}

/* ===== INLINE LINKS ===== */
.inline-link {
    color: #3a0ca3;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px solid #9d4edd;
    padding-bottom: 1px;
    transition: color 0.2s;
}
.inline-link:hover { color: #9d4edd; }

.film-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 140px 40px 80px;
}

/* ===== CINEMA TITLE ===== */
.cinema-title-wrapper {
    text-align: center;
    margin-bottom: 56px;
    overflow: hidden;
}

.ascii-art.cinema-title {
    /* font-size en vw = suit exactement la largeur de l'écran */
    font-size: clamp(3px, 1.55vw, 14px);
    line-height: 1.35;
    white-space: pre;
    font-family: "Courier New", monospace;
    background: linear-gradient(to bottom, #3a0ca3, #9d4edd, #3a0ca3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    text-align: left;
    width: fit-content;
    margin: 0 auto 16px;
}

.cinema-subtitle {
    font-family: "Courier New", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: #9d4edd;
    text-transform: uppercase;
    opacity: 0.7;
}

/* ===== VIDEO ===== */
.video-wrapper {
    max-width: 800px;
    margin: 0 auto 56px;
    position: relative;
    padding-bottom: 56.25%;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0,0,0,0.15);
}
.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== FILM TEXT ===== */
.film-text {
    max-width: 640px;
    margin: 0 auto;
}
.film-text p {
    font-size: 0.78rem;
    line-height: 1.6;
    margin-bottom: 16px;
    color: #222;
}

/* ===== BRAILLE ART ===== */
.purple-art {
    background: linear-gradient(to bottom, #3a0ca3, #9d4edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin: 48px 0;
    font-size: clamp(0.5rem, 2vw, 0.9rem);
    line-height: 1.3;
    white-space: pre;
    overflow: hidden;
}

/* ===== KO-FI BLOCK ===== */
.kofi-block {
    text-align: center;
    margin: 48px auto;
    padding: 36px 24px;
    border: 1px solid #e8e0f5;
    border-radius: 4px;
    max-width: 420px;
    background: linear-gradient(135deg, #faf8ff 0%, #f3eeff 100%);
}

.kofi-label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #9d4edd;
    margin-bottom: 14px;
    font-weight: bold;
}

.kofi-link {
    display: inline-block;
    color: #3a0ca3;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    border-bottom: 1.5px solid #9d4edd;
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}
.kofi-link:hover {
    color: #9d4edd;
    border-color: #3a0ca3;
}

/* ===== CREDITS ===== */
.credits {
    margin-top: 80px;
    border-top: 1px solid #eee;
    padding-top: 60px;
}

.credits h3 {
    margin: 36px 0 10px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #9d4edd;
}
.credits h3:first-child { margin-top: 0; }

.credits p {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #333;
}

/* ===================================================
   RESPONSIVE — MOBILE
=================================================== */

@media (max-width: 768px) {

    /* NAV */
    .top-nav {
        padding: 14px 16px;
        background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
        flex-wrap: wrap;
        gap: 8px;
    }
    .prod-logo img { width: 80px; }
    .links {
        display: flex;
        gap: 0;
    }
    .links a {
        margin-left: 12px;
        font-size: 0.62rem;
        letter-spacing: 0.05em;
    }

    /* HERO */
    .hero-overlay {
        padding: 24px 24px 48px;
    }
    .hero h1 {
        font-size: clamp(1.8rem, 8vw, 2.8rem);
        margin-bottom: 28px;
    }
    .buttons {
        gap: 12px;
        flex-direction: column;
        align-items: flex-start;
    }
    .cta-btn {
        font-size: 0.75rem;
        padding: 13px 22px;
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }

    /* LETTER */
    .letter-section {
        padding: 80px 6% 100px;
    }
    .doc-text {
        font-size: 0.85rem;
    }
    .letter-right {
        margin-left: 0;
        margin-bottom: 32px;
    }

    /* FILM PAGE */
    .film-container {
        padding: 110px 20px 60px;
    }

    .purple-art {
        font-size: 0.42rem;
    }

    .kofi-block {
        padding: 28px 16px;
    }

    .credits {
        margin-top: 56px;
        padding-top: 40px;
    }
}

@media (max-width: 420px) {
    .top-nav {
        padding: 12px 14px;
    }
    .prod-logo img { width: 70px; }
    .links a {
        margin-left: 10px;
        font-size: 0.55rem;
        letter-spacing: 0.02em;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 9vw, 2.2rem);
    }

    .purple-art {
        font-size: 0.35rem;
    }

    .letter-section {
        padding: 70px 5% 80px;
    }
}

/* ===== FOOTER ===== */
.site-footer {
    background: #000;
    color: #fff;
    font-family: "Courier New", monospace;
    padding: 56px 8% 28px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-left img {
    width: 90px;
    opacity: 0.9;
    display: block;
}

.footer-center {
    text-align: center;
    flex: 1;
}

.footer-title {
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.18em;
    margin-bottom: 6px;
}

.footer-sub {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    opacity: 0.5;
}

.footer-right {
    display: flex;
    gap: 24px;
    align-items: center;
}

.footer-right a {
    color: #fff;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.footer-right a:hover { opacity: 1; }

.footer-bottom {
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    opacity: 0.35;
}

/* Footer responsive */
@media (max-width: 600px) {
    .site-footer {
        padding: 40px 6% 24px;
    }
    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }
    .footer-right {
        gap: 16px;
    }
}

/* ===== NAV ADAPTIVE (index.html) ===== */
.top-nav {
    transition: background 0.4s ease;
}

/* Quand la nav passe sur la section blanche */
.top-nav.nav-dark {
    background: transparent;
    border-bottom: none;
}

.top-nav.nav-dark .links a {
    color: #000;
}
.top-nav.nav-dark .links a:hover {
    opacity: 0.5;
}

/* Le logo s'inverse aussi : blanc → noir */
.top-nav.nav-dark .prod-logo img {
    filter: invert(1);
}
