/**
 * ═══════════════════════════════════════════════════════════
 *  CROPSIDE V2 - STYLES PAGE D'ACCUEIL (LANDING)
 *  Index page avec news et leaderboard
 * ═══════════════════════════════════════════════════════════
 */

/* ═══ ANIMATIONS ═══ */
@keyframes glow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(90, 143, 106, 0.5); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(90, 143, 106, 0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ═══ RESET LANDING ═══ */
.landing-page {
    font-family: 'Fredoka', 'Inter', sans-serif;
    background: var(--color-dark);
    color: var(--color-light);
    height: 100vh;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.landing-page img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

/* ═══ LAYOUT PRINCIPAL ═══ */
.landing-app {
    display: grid;
    grid-template-columns: 1fr 380px;
    height: 100vh;
}

/* ═══ SECTION GAUCHE - HERO ═══ */
.landing-main {
    background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-dark) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.landing-main::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(90, 143, 106, 0.15) 0%, transparent 50%);
    animation: glow 10s ease-in-out infinite;
}

.hero {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 500px;
}

.hero .logo {
    width: 120px;
    margin-bottom: 15px;
    filter: drop-shadow(0 10px 30px rgba(90, 143, 106, 0.3));
    animation: float 4s ease-in-out infinite;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--color-light) 0%, var(--color-sage) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .tagline {
    font-size: var(--font-base);
    color: var(--color-sage);
    font-weight: 500;
    margin-bottom: 20px;
}

.hero p {
    color: rgba(245, 239, 224, 0.8);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: var(--font-sm);
}

/* ═══ STATUS ONLINE ═══ */
.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 239, 224, 0.12);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: var(--font-sm);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-sage);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* ═══ BOUTONS CTA ═══ */
.cta {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.landing-page .btn {
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--font-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.landing-page .btn-primary {
    background: linear-gradient(135deg, var(--color-forest) 0%, var(--green-dark) 100%);
    color: white;
    box-shadow: 0 8px 30px rgba(90, 143, 106, 0.4);
}

.landing-page .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(90, 143, 106, 0.5);
}

.landing-page .btn-secondary {
    background: rgba(245, 239, 224, 0.12);
    color: var(--color-cream);
    border: 2px solid rgba(245, 239, 224, 0.25);
}

.landing-page .btn-secondary:hover {
    background: rgba(245, 239, 224, 0.2);
    border-color: rgba(245, 239, 224, 0.35);
}

/* ═══ STATS BAR ═══ */
.stats-bar {
    position: absolute;
    bottom: 20px;
    left: 30px;
    right: 30px;
    display: flex;
    gap: 30px;
    justify-content: center;
    z-index: 1;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: var(--font-xl);
    font-weight: 700;
    color: var(--color-sage);
}

.stat-label {
    font-size: 10px;
    color: rgba(166, 139, 91, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ═══ SECTION DROITE - SIDEBAR NEWS ═══ */
.landing-sidebar {
    background: var(--color-dark);
    border-left: 1px solid var(--color-teal);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.sidebar-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-teal);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: var(--font-base);
    font-weight: 600;
    color: var(--color-light);
}

.sidebar-header span {
    font-size: var(--font-xs);
    color: var(--color-teal-mid);
}

/* ═══ NEWS FEED ═══ */
.news-feed {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    min-height: 0;
}

.news-card {
    background: var(--color-teal);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--color-teal-mid);
    transition: border-color 0.3s;
}

.news-card:hover {
    border-color: var(--color-sage);
}

.news-card:last-child {
    margin-bottom: 0;
}

.news-card-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--color-teal-mid);
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-type {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-type.feature { background: var(--color-sage); color: var(--color-dark); }
.news-type.bugfix { background: var(--red); color: #fff; }
.news-type.improvement { background: var(--color-teal-mid); color: #fff; }
.news-type.balance { background: var(--gold); color: var(--color-dark); }

.news-version {
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--color-sage);
}

.news-date {
    font-size: var(--font-xs);
    color: var(--color-teal-mid);
    margin-left: auto;
}

.news-card-body {
    padding: 15px;
}

.news-title {
    font-size: var(--font-sm);
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-light);
}

.news-content {
    font-size: var(--font-xs);
    color: var(--color-light);
    opacity: 0.8;
    line-height: 1.6;
}

.news-content h1 {
    font-size: var(--font-base);
    font-weight: 700;
    color: var(--color-light);
    margin: 0 0 8px 0;
}

.news-content h2 {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--color-light);
    margin: 0 0 6px 0;
}

.news-content p {
    margin: 0 0 8px 0;
}

.news-content ul, .news-content ol {
    margin: 0 0 8px 0;
    padding-left: 18px;
}

.news-content li {
    margin-bottom: 3px;
}

.news-content b, .news-content strong {
    color: var(--color-light);
}

.news-content u {
    text-decoration-color: var(--color-sage);
}

/* ═══ LEADERBOARD ═══ */
.leaderboard {
    border-top: 1px solid var(--color-teal);
    padding: 15px;
    flex-shrink: 0;
}

.leaderboard h3 {
    font-size: var(--font-xs);
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-teal-mid);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lb-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--color-teal);
    border-radius: var(--radius-sm);
}

.lb-rank {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: var(--font-xs);
    font-weight: 700;
    background: var(--color-teal-mid);
    color: var(--color-light);
}

.lb-row:nth-child(1) .lb-rank { background: linear-gradient(135deg, #ffd700, #b8860b); color: #000; }
.lb-row:nth-child(2) .lb-rank { background: linear-gradient(135deg, #c0c0c0, #808080); color: #000; }
.lb-row:nth-child(3) .lb-rank { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; }

.lb-name {
    flex: 1;
    font-size: var(--font-xs);
    font-weight: 500;
    color: var(--color-light);
}

.lb-score {
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--color-sage);
}

.lb-empty {
    color: var(--color-teal-mid);
    font-size: var(--font-sm);
    text-align: center;
    padding: 10px;
}

/* ═══ NEWS EMPTY ═══ */
.news-empty {
    color: var(--color-teal-mid);
    text-align: center;
    padding: 40px;
    font-size: var(--font-sm);
}

/* ═══ LOADING ═══ */
.landing-page .loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--color-teal-mid);
    gap: 8px;
    font-size: var(--font-xs);
}

.landing-page .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-teal-mid);
    border-top-color: var(--color-sage);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
    .landing-page {
        height: auto;
        overflow: auto;
    }

    .landing-app {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        height: auto;
    }

    .landing-main {
        padding: 30px 20px;
        min-height: 50vh;
    }

    .stats-bar {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        margin-top: 30px;
    }

    .landing-sidebar {
        border-left: none;
        border-top: 1px solid var(--color-teal);
        height: auto;
    }

    .news-feed {
        max-height: 300px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero .logo {
        width: 100px;
    }
}

@media (max-width: 500px) {
    .cta {
        flex-direction: column;
    }

    .landing-page .btn {
        width: 100%;
        text-align: center;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: 15px;
    }

    .stat {
        flex: 1;
        min-width: 70px;
    }
}
