/* Initialisation et Variables */
:root {
    --primary-color: #0f172a;
    /* Bleu nuit profond */
    --secondary-color: #1e293b;
    /* Bleu nuit plus clair */
    --accent-color: #38bdf8;
    /* Bleu ciel vibrant */
    --text-color: #f8fafc;
    /* Blanc cassé */
    --text-muted: #94a3b8;
    /* Gris clair */
    --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--gradient-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 10;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-login {
    border: 1px solid var(--accent-color);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
}

.btn-login:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 1;
    animation: fadeIn 1s ease-out;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Feature Cards */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 4rem 5%;
    background-color: var(--primary-color);
}

/* HOME GRID LAYOUT (Unused now but kept for reference or removed? Better remove to clean up) */
/* .container-home { ... } */


/* Features Grid (Left Column) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.4rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* SIDEBAR HOME */
.sidebar-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    position: sticky;
    top: 6rem;
}

.sidebar-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: white;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-words-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.top-word-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
    text-decoration: none;
}

.top-word-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.rank {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-color);
    opacity: 0.8;
    min-width: 30px;
}

.word-info {
    display: flex;
    flex-direction: column;
}

.word-info .word {
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.word-info .views {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .container-home {
        grid-template-columns: 1fr;
        padding: 2rem 5%;
    }

    .sidebar-card {
        position: static;
        margin-top: 2rem;
    }
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile responsive basics */
.burger {
    display: none;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
        /* Simplification pour le moment */
    }

    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .cta-buttons {
        justify-content: center;
    }

    .burger {
        display: block;
    }

    .burger div {
        width: 25px;
        height: 3px;
        background-color: var(--text-color);
        margin: 5px;
        border-radius: 5px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    /* Évite que le haut soit coupé si le formulaire est grand */
    justify-content: center;
    padding: 7rem 5% 3rem;
    /* Espace pour la navbar (7rem) */
    background: url('https://images.unsplash.com/photo-1590074218320-b46761dc0381?q=80&w=2574&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
    background-attachment: fixed;
    /* Joli effet de parallaxe simple */
}

/* Overlay sombre pour la lisibilité sur l'image de fond */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    /* Teinte bleu nuit semi-transparente */
}

.login-card {
    background: rgba(30, 41, 59, 0.8);
    /* Glassmorphism */
    backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 450px;
    z-index: 1;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
}

.login-card h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-card p {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-color);
    font-family: var(--font-main);
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.g-recaptcha {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.btn-full {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--accent-color);
    font-weight: 600;
}