/* ============================================================
   LANDING — Version finale (bords collés)
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0D0B18;
    color: #f0f0f0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
}

.landing {
    max-width: 1100px;
    width: 100%;
    padding: 16px 20px 40px 20px;
}

/* ============================================================
   HEADER (collé aux bords)
   ============================================================ */
.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #1a1528;
    margin-bottom: 40px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: #4d38c7;
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.login-btn {
    background: #4d38c7;
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    padding: 8px 24px;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.login-btn:hover {
    background: #3a2aa0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1528;
    padding: 4px 16px 4px 6px;
    border-radius: 40px;
    border: 1px solid #2a1f3d;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2a1f3d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #f0f0f0;
}

.logout-btn {
    background: transparent;
    border: none;
    color: #5a5a6a;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s;
    padding: 4px 8px;
}

.logout-btn:hover {
    color: #e74c3c;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    text-align: center;
    padding: 20px 0 10px 0;
}

.hero h1 {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    color: #f0f0f0;
}

.hero .subtitle {
    font-size: 18px;
    color: #a0a0b0;
    line-height: 1.6;
    margin-bottom: 36px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: #4d38c7;
    color: #fff;
    border: none;
    font-size: 18px;
    font-weight: 700;
    padding: 14px 40px;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary:hover {
    background: #3a2aa0;
    transform: scale(1.02);
}

.btn-secondary {
    background: transparent;
    color: #a0a0b0;
    border: 1px solid #2a1f3d;
    font-size: 18px;
    font-weight: 600;
    padding: 14px 40px;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #1a1528;
    color: #f0f0f0;
}

/* ============================================================
   DROPDOWN (menu déroulant des communautés)
   ============================================================ */
.dropdown-container {
    margin-top: 20px;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

.dropdown-btn {
    background: #1a1528;
    border: 1px solid #2a1f3d;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #f0f0f0;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    transition: border-color 0.2s;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-btn:hover {
    border-color: #4d38c7;
}

.dropdown-btn::after {
    content: '▼';
    font-size: 12px;
    color: #4d38c7;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: #1a1528;
    border: 1px solid #2a1f3d;
    border-radius: 12px;
    overflow: hidden;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #f0f0f0;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    border-bottom: 1px solid #0D0B18;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #2a1f3d;
}

.dropdown-item .community-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.dropdown-empty {
    padding: 16px 20px;
    color: #5a5a6a;
    text-align: center;
    font-size: 14px;
}

/* ============================================================
   FEATURES (3 cartes)
   ============================================================ */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 50px 0 40px 0;
    border-top: 1px solid #1a1528;
}

.feature-card {
    text-align: center;
    padding: 20px 16px;
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 15px;
    color: #a0a0b0;
    line-height: 1.5;
}

/* ============================================================
   SECTION CRÉATEUR (grosse, centrée, 2 lignes)
   ============================================================ */
.creator-section {
    text-align: center;
    padding: 50px 20px;
    border-top: 1px solid #1a1528;
    margin-top: 0;
}

.creator-title {
    font-size: 28px;
    font-weight: 700;
    color: #f0f0f0;
    margin-bottom: 12px;
}

.creator-link-big {
    font-size: 24px;
    font-weight: 700;
    color: #4d38c7;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
}

.creator-link-big:hover {
    color: #7B2FBE;
    text-decoration: underline;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .landing {
        padding: 12px 16px 30px 16px;
    }
    .hero h1 {
        font-size: 34px;
    }
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    .dropdown-container {
        max-width: 100%;
    }
    .header-right {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .creator-title {
        font-size: 22px;
    }
    .creator-link-big {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .landing-header {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    .hero h1 {
        font-size: 28px;
    }
    .btn-primary, .btn-secondary {
        font-size: 16px;
        padding: 12px 24px;
    }
    .feature-card {
        padding: 12px 8px;
    }
    .creator-title {
        font-size: 18px;
    }
    .creator-link-big {
        font-size: 16px;
    }
}

.state { display: none; text-align: center; padding: 30px; }
.spinner { width: 48px; height: 48px; border: 4px solid #2a1f3d; border-top: 4px solid #4d38c7; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-success { font-size: 48px; }
.icon-error { font-size: 48px; }

.dropdown-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background: #1a1528;
    border: 1px solid #2a1f3d;
    border-radius: 12px;
    overflow: hidden;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.dropdown-content.show {
    display: block;
}