/* Variables globales (inspirées du site) */
:root {
    --color-primary: #ffcc33;
    --color-primary-dark: #f0b800;
    --color-text: #333;
    --color-bg-light: #fffcf5;
    --font-main: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: #fff2beff;
    color: var(--color-text);
    text-align: center;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Hero (Redefined at bottom) */

/* Grille de simulations */
.simulations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 20px 10% 60px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Carte de simulation */
.simulation-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.simulation-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 204, 51, 0.2);
}

.simulation-card.coming-soon {
    filter: grayscale(100%);
    opacity: 0.8;
    pointer-events: none;
    cursor: default;
    position: relative;
}

.simulation-card.coming-soon::after {
    content: "Bientôt disponible";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.simulation-card.coming-soon:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card-image {
    height: 220px;
    background-color: #222;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Placeholder visuel pour le système solaire si pas d'image */
.solar-system-preview {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000 100%);
    position: relative;
}

.solar-system-preview::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #ffcc33;
    border-radius: 50%;
    box-shadow: 0 0 30px #ffcc33;
}

.solar-system-preview::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Preview Tableau Périodique */
.periodic-table-preview {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pt-block {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.pt-block::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 40%;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
}

.pt-block.p1 {
    background: #ff6b6b;
    transform: translateY(-20px) rotate(-10deg);
}

.pt-block.p2 {
    background: #feca57;
    width: 50px;
    height: 50px;
    z-index: 2;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.pt-block.p3 {
    background: #48dbfb;
    transform: translateY(20px) rotate(10deg);
}

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h2 {
    font-size: 1.5rem;
    margin: 0 0 10px;
    color: var(--color-text);
}

.card-content p {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-tag {
    display: inline-block;
    padding: 6px 12px;
    background-color: #fff2beff;
    color: #d4a017;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    align-self: flex-start;
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
    .simulations-hero {
        padding: 40px 20px 20px;
    }

    .simulations-hero h1 {
        font-size: 2.5rem;
    }

    .simulations-hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .simulations-grid {
        padding: 20px 5%;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .simulations-hero {
        padding-top: 30px;
    }

    .simulations-hero h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .simulations-grid {
        grid-template-columns: 1fr;
        /* Force single column */
        gap: 30px;
        /* More space between stacked cards */
        padding: 0 15px;
    }

    .simulation-card {
        margin-top: 10px;
    }

    .card-image {
        height: 180px;
    }

    .card-content {
        padding: 20px;
    }

    .card-content h2 {
        font-size: 1.25rem;
    }

    .card-tag {
        font-size: 0.8rem;
        padding: 4px 10px;
    }

    .card-content p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
}

/* --- HEADER SIMULATIONS (Homogenized) --- */
.simulations-hero {
    padding: 50px 0 20px 0;
    text-align: center;
}

.simulations-header {
    text-align: center;
    margin-bottom: 20px;
    /* Reduced margin */
}

.simulations-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 106, 0, 0.1);
    color: #ff6a00;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 106, 0, 0.2);
}

.simulations-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    color: #222;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.simulations-subtitle {
    font-size: 1rem;
    color: #222;
    font-weight: 400;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

.gradient-text {
    background: linear-gradient(135deg, #ff6a00, #ff9500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .simulations-hero {
        padding: 30px 0 10px 0;
    }

    .simulations-header h1 {
        font-size: 2.5rem;
        letter-spacing: -0.5px;
    }

    .simulations-header {
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .simulations-subtitle {
        font-size: 1rem;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .simulations-hero {
        padding-top: 20px;
    }

    .simulations-badge {
        margin-bottom: 15px;
        padding: 6px 16px;
        font-size: 0.8rem;
    }

    .simulations-header h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }
}

/* --- FILTERS NAV --- */
.categories-nav {
    padding: 15px 0 25px 0;
    background: transparent;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 8px 18px;
    border: 1px solid rgba(255, 106, 0, 0.3);
    background: rgba(255, 255, 255, 0.8);
    color: #666;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
}

.nav-btn:hover,
.nav-btn.active {
    background: #ff6a00;
    color: white;
    border-color: #ff6a00;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 106, 0, 0.2);
}