/* ============================================
   VESTIGES — Landing Page
   Palette: noir, ocre, crème vieilli, rouge sombre
   ============================================ */

:root {
    --black: #0a0a08;
    --dark: #141410;
    --dark-warm: #1a1914;
    --ochre: #c4943a;
    --ochre-dim: #a07830;
    --ochre-glow: #d4a44a;
    --cream: #e8dcc8;
    --cream-dim: #b8a890;
    --red: #b03030;
    --red-dim: #8b2222;
    --red-glow: #cc3b3b;
    --paper: #d4c8b0;
    --text: #c8bcaa;
    --text-dim: #7a7060;
    --font-serif: 'EB Garamond', 'Georgia', serif;
    --font-mono: 'Courier Prime', 'Courier New', monospace;
    --font-sans: 'Inter', -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    background: var(--black);
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* GRAIN OVERLAY */
.grain {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* CONTAINER */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* SECTIONS */
.section {
    padding: 100px 0;
    position: relative;
}

.section__label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ochre-dim);
    margin-bottom: 16px;
}

.section__title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 48px;
    line-height: 1.25;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--black);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(196, 148, 58, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(139, 32, 32, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.hero__vignette {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, var(--black) 100%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 24px;
}

.hero__classified {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInDown 1s 0.5s forwards;
}

.hero__title {
    margin-bottom: 48px;
}

.hero__title-vestiges {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--cream);
    line-height: 1;
    opacity: 0;
    animation: fadeIn 1.5s 0.8s forwards;
    text-shadow: 0 0 60px rgba(196, 148, 58, 0.15);
}

.hero__title-sub {
    display: block;
    font-family: var(--font-sans);
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    font-weight: 300;
    letter-spacing: 0.45em;
    color: var(--ochre-dim);
    margin-top: 16px;
    opacity: 0;
    animation: fadeIn 1s 1.5s forwards;
}

.hero__dispatch {
    max-width: 440px;
    margin: 0 auto 48px;
    border: 1px solid rgba(196, 148, 58, 0.15);
    padding: 28px 32px;
    position: relative;
    opacity: 0;
    animation: fadeIn 1s 2s forwards;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.hero__dispatch:hover {
    border-color: rgba(196, 148, 58, 0.3);
    box-shadow: 0 0 40px rgba(196, 148, 58, 0.06);
}

.hero__dispatch::before {
    content: '';
    position: absolute;
    top: -1px; left: 20px;
    width: 60px; height: 2px;
    background: var(--ochre-dim);
}

.hero__dispatch-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--cream);
    line-height: 1.8;
}

.hero__dispatch-text strong {
    color: var(--ochre);
    font-weight: 600;
}

.hero__cta {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--black);
    background: var(--ochre);
    padding: 16px 36px;
    text-decoration: none;
    transition: all 0.4s ease;
    opacity: 0;
    animation: fadeIn 1s 2.5s forwards;
}

.hero__cta:hover {
    background: var(--ochre-glow);
    box-shadow: 0 0 30px rgba(196, 148, 58, 0.25);
    transform: translateY(-1px);
}

.hero__scroll-hint {
    position: absolute;
    bottom: 32px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 1s 3.5s forwards;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.hero__scroll-hint.hidden {
    opacity: 0 !important;
}

.hero__scroll-hint span {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.hero__scroll-arrow {
    width: 1px;
    height: 24px;
    background: var(--text-dim);
    position: relative;
    animation: scrollPulse 2s infinite;
}

.hero__scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -3px;
    width: 7px;
    height: 7px;
    border-right: 1px solid var(--text-dim);
    border-bottom: 1px solid var(--text-dim);
    transform: rotate(45deg);
}

/* ============================================
   UNIVERS
   ============================================ */
.section--univers {
    background: var(--dark);
    border-top: 1px solid rgba(196, 148, 58, 0.08);
}

.univers__text {
    max-width: 720px;
}

.univers__text p {
    margin-bottom: 24px;
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.9;
}

.univers__lead {
    font-size: 1.2rem !important;
    color: var(--cream) !important;
}

/* ============================================
   CONCEPT
   ============================================ */
.section--concept {
    background: var(--black);
}

.concept__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.concept__card {
    border: 1px solid rgba(196, 148, 58, 0.1);
    padding: 36px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: default;
}

.concept__card:hover {
    border-color: rgba(196, 148, 58, 0.35);
    background: rgba(196, 148, 58, 0.04);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 24px rgba(196, 148, 58, 0.06);
}

.concept__card:hover .concept__icon {
    transform: scale(1.1);
}

.concept__card:hover h3 {
    color: var(--ochre-glow);
}

.concept__icon {
    width: 48px;
    height: 48px;
    color: var(--ochre);
    margin-bottom: 20px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.concept__card h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 12px;
    transition: color 0.4s ease;
}

.concept__card p {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.8;
}

/* ============================================
   COMMENT CA MARCHE
   ============================================ */
.section--howto {
    background: var(--dark);
    border-top: 1px solid rgba(196, 148, 58, 0.08);
}

.howto__intro {
    max-width: 680px;
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.9;
    margin-bottom: 56px;
}

.howto__steps {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.howto__step {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 20px;
    margin: -20px;
    cursor: default;
}

.howto__step:hover {
    background: rgba(196, 148, 58, 0.03);
    transform: translateX(6px);
}

.howto__step:hover .howto__step-number {
    border-color: var(--ochre);
    background: rgba(196, 148, 58, 0.08);
    color: var(--ochre-glow);
}

.howto__step:hover h3 {
    color: var(--ochre-glow);
}

.howto__step-number {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ochre);
    line-height: 1;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(196, 148, 58, 0.25);
    flex-shrink: 0;
    transition: all 0.4s ease;
}

.howto__step-content h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 8px;
    transition: color 0.4s ease;
}

.howto__step-content p {
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.8;
}

/* ============================================
   FORMAT / EPISODES
   ============================================ */
.section--format {
    background: var(--dark);
    border-top: 1px solid rgba(196, 148, 58, 0.08);
}

.episodes {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 48px;
}

.episode {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    border: 1px solid rgba(196, 148, 58, 0.12);
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: default;
}

.episode:hover {
    border-color: rgba(196, 148, 58, 0.35);
    background: rgba(196, 148, 58, 0.03);
    transform: translateX(6px);
}

.episode:hover .episode__number {
    color: var(--ochre-glow);
    text-shadow: 0 0 20px rgba(196, 148, 58, 0.3);
}

.episode__number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ochre);
    line-height: 1;
    min-width: 50px;
    text-align: center;
    transition: all 0.4s ease;
}

.episode__content h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 10px;
}

.episode__content p {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.8;
}

.episode__meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ochre-dim);
}

.episode--locked {
    position: relative;
    align-items: center;
}

.episode__classified {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 6px;
    text-shadow: 0 0 20px rgba(176, 48, 48, 0.3);
}

.format__details {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
}

.format__detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--cream-dim);
}

.format__detail-icon {
    color: var(--ochre-dim);
    font-size: 0.4rem;
}

/* ============================================
   QUOTE
   ============================================ */
.section--quote {
    background: var(--black);
    padding: 80px 0;
    border-top: 1px solid rgba(196, 148, 58, 0.08);
    border-bottom: 1px solid rgba(196, 148, 58, 0.08);
}

.quote {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.quote:hover {
    transform: scale(1.02);
}

.quote p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    color: var(--cream);
    line-height: 1.6;
    margin-bottom: 20px;
}

.quote cite {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ============================================
   INSCRIPTION
   ============================================ */
.section--inscription {
    background: var(--dark);
    padding: 100px 0 120px;
}

.inscription__box {
    max-width: 540px;
    margin: 0 auto;
    border: 1px solid rgba(196, 148, 58, 0.2);
    padding: 48px 40px;
    position: relative;
    text-align: center;
    background: rgba(196, 148, 58, 0.02);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.inscription__box:hover {
    border-color: rgba(196, 148, 58, 0.35);
    box-shadow: 0 0 48px rgba(196, 148, 58, 0.06);
}

.inscription__stamp {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--red);
    background: var(--dark);
    padding: 4px 20px;
    border: 1px solid var(--red-dim);
}

.inscription__title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 16px;
    margin-top: 8px;
}

.inscription__text {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 32px;
    line-height: 1.8;
}

.inscription__text strong {
    color: var(--ochre);
}

/* FORM */
.inscription__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.form__input {
    width: 100%;
    padding: 16px 20px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: var(--cream);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(196, 148, 58, 0.15);
    outline: none;
    transition: all 0.3s ease;
}

.form__input::placeholder {
    color: var(--text-dim);
}

.form__input:focus {
    border-color: var(--ochre-dim);
    background: rgba(0, 0, 0, 0.6);
}

.form__row--duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form__select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7060' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form__select option {
    background: var(--dark);
    color: var(--cream);
    padding: 8px;
}

.form__textarea {
    resize: vertical;
    min-height: 80px;
    font-family: var(--font-sans);
    line-height: 1.6;
}

.form__submit {
    width: 100%;
    padding: 18px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--black);
    background: var(--ochre);
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    margin-top: 4px;
}

.form__submit:hover {
    background: var(--ochre-glow);
    box-shadow: 0 0 30px rgba(196, 148, 58, 0.2);
}

.form__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form__submit--done {
    background: #2a6b2a !important;
    color: var(--cream) !important;
}

/* COUNTER */
.inscription__counter {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.counter__number {
    color: var(--ochre);
    font-weight: 700;
    font-size: 0.85rem;
}

.inscription__note {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    opacity: 0.6;
    line-height: 1.8;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 40px 0;
    border-top: 1px solid rgba(196, 148, 58, 0.08);
    background: var(--black);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__brand {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--cream-dim);
}

.footer__info {
    text-align: right;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    line-height: 1.8;
}

/* ============================================
   STICKY CTA MOBILE
   ============================================ */
.sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 24px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    color: var(--black);
    background: var(--ochre);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-tap-highlight-color: transparent;
}

.sticky-cta.visible {
    transform: translateY(0);
}

.sticky-cta.at-form {
    transform: translateY(100%);
}

@media (min-width: 769px) {
    .sticky-cta { display: none !important; }
}

@media (max-width: 768px) {
    .sticky-cta { display: block; }

    /* Ajouter du padding en bas pour que le CTA ne cache pas le footer */
    .footer { padding-bottom: 60px; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* (old reveal classes removed, now using .scroll-reveal / .revealed) */

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .section { padding: 70px 0; }

    .univers__text {
        max-width: 100%;
    }

    .concept__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .concept__card { padding: 28px; }

    .episode {
        flex-direction: column;
        gap: 16px;
        padding: 24px;
    }

    .format__details {
        flex-direction: column;
        gap: 14px;
    }

    .howto__step {
        gap: 20px;
    }

    .form__row--duo {
        grid-template-columns: 1fr;
    }

    .inscription__box {
        padding: 36px 24px;
    }

    .footer .container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer__info { text-align: center; }

    .hero__dispatch {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .hero__title-vestiges {
        letter-spacing: 0.08em;
    }

    .hero__cta {
        padding: 14px 28px;
        font-size: 0.7rem;
    }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.concept__grid .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.concept__grid .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.concept__grid .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }

.howto__steps .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.howto__steps .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.howto__steps .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }

.episodes .scroll-reveal:nth-child(2) { transition-delay: 0.15s; }
.episodes .scroll-reveal:nth-child(3) { transition-delay: 0.3s; }

/* Hero fade-in variants */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s 0.3s forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1s 1.8s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 1s 2.3s forwards;
}

/* ============================================
   CONCEPT INTRO
   ============================================ */
.concept__intro {
    max-width: 680px;
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.9;
    margin-bottom: 56px;
}

/* ============================================
   HERO CLASSIFIED SUB
   ============================================ */
.hero__classified-sub {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    color: var(--text-dim);
    margin-top: 6px;
}

/* ============================================
   SUBTLE GLOW PULSE ON CLASSIFIED STAMPS
   ============================================ */
.episode__classified {
    animation: classifiedPulse 3s ease-in-out infinite;
}

@keyframes classifiedPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ============================================
   SECTION DIVIDER LINE (subtle)
   ============================================ */
.section--univers::after,
.section--concept::after,
.section--howto::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: var(--ochre-dim);
    opacity: 0.3;
}
