@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Source+Sans+3:wght@300;400;600&family=Bebas+Neue&display=swap');

:root {
    --noir: #141414;
    --charbon: #1e1e1e;
    --gris: #2a2a2a;
    --gris-clair: #3a3a3a;
    --or: #d4a843;
    --or-vif: #f0c040;
    --blanc: #f5f0e8;
    --blanc-cassé: #e8e0d0;
    --rouge: #c0392b;
    --ombre: 0 4px 20px rgba(0,0,0,0.6);
    --ombre-or: 0 0 20px rgba(212,168,67,0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--noir);
    color: var(--blanc);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== HEADER ===== */
header {
    background: var(--charbon);
    border-bottom: 2px solid var(--or);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--ombre);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-star {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem;
    color: var(--or);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(212,168,67,0.5);
}

.logo-sub {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.65rem;
    color: var(--blanc-cassé);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: -2px;
}

nav {
    display: flex;
    gap: 6px;
    align-items: center;
}

nav a {
    color: var(--blanc-cassé);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 4px;
    transition: all 0.25s;
    border: 1px solid transparent;
}

nav a:hover, nav a.active {
    color: var(--or);
    border-color: var(--or);
    background: rgba(212,168,67,0.08);
}

nav a.btn-top {
    background: var(--or);
    color: var(--noir);
    font-weight: 600;
    border-color: var(--or);
}

nav a.btn-top:hover {
    background: var(--or-vif);
    color: var(--noir);
    box-shadow: var(--ombre-or);
}

/* Burger mobile */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--or);
    transition: all 0.3s;
}

/* ===== HERO / BANNER ===== */
.hero {
    background: linear-gradient(135deg, var(--charbon) 0%, var(--gris) 50%, var(--charbon) 100%);
    padding: 50px 20px 40px;
    text-align: center;
    border-bottom: 1px solid var(--gris-clair);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '★';
    position: absolute;
    font-size: 300px;
    color: rgba(212,168,67,0.04);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    color: var(--blanc);
    margin-bottom: 12px;
}

.hero h1 em {
    color: var(--or);
    font-style: italic;
}

.hero p {
    color: var(--blanc-cassé);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto 24px;
    opacity: 0.8;
}

/* ===== SEARCH ===== */
.search-bar {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    gap: 0;
    border: 2px solid var(--or);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--ombre-or);
}

.search-bar input {
    flex: 1;
    padding: 12px 18px;
    background: var(--gris);
    border: none;
    color: var(--blanc);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    outline: none;
}

.search-bar input::placeholder {
    color: #888;
}

.search-bar button {
    padding: 12px 20px;
    background: var(--or);
    border: none;
    color: var(--noir);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-bar button:hover {
    background: var(--or-vif);
}

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

.section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gris-clair);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--blanc);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .icon {
    color: var(--or);
    font-size: 1.2em;
}

.section-link {
    color: var(--or);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.section-link:hover {
    border-color: var(--or);
}

/* ===== GRILLE DE CARICATURES ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.grid-large {
    grid-template-columns: repeat(5, 1fr);
}

.card {
    background: var(--charbon);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--gris-clair);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--or);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), var(--ombre-or);
}

.card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/3;
    background: var(--gris);
    width: 100%;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.card:hover .card-img-wrap img {
    transform: scale(1.06);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.card:hover .card-overlay {
    opacity: 1;
}

.card-overlay a {
    color: var(--blanc);
    text-decoration: none;
    background: var(--or);
    color: var(--noir);
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
    transition: background 0.2s;
}

.card-overlay a:hover {
    background: var(--or-vif);
}

.card-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--blanc);
    margin-bottom: 6px;
}

.card-meta {
    display: none;
}

.card-badge {
    display: none;
}

/* ===== TOP RANKING ===== */
.top-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--charbon);
    border: 1px solid var(--gris-clair);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    height: 80px;
}

.top-item:hover {
    border-color: var(--or);
    background: var(--gris);
    transform: translateX(4px);
}

.top-rank {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem;
    color: var(--gris-clair);
    min-width: 56px;
    text-align: center;
    padding: 0 8px;
}

.top-item:nth-child(1) .top-rank { color: #d4a843; }
.top-item:nth-child(2) .top-rank { color: #a8a8a8; }
.top-item:nth-child(3) .top-rank { color: #c97b3a; }

.top-img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
}

.top-info {
    flex: 1;
    min-width: 0;
}

.top-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--blanc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-count {
    font-size: 0.8rem;
    color: var(--or);
    margin-top: 2px;
}

/* ===== PAGE APERCU ===== */
.apercu-wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.apercu-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 16px;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--charbon);
    border: 1px solid var(--gris-clair);
    color: var(--blanc-cassé);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-nav:hover {
    border-color: var(--or);
    color: var(--or);
}

.apercu-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    text-align: center;
    color: var(--blanc);
    margin-bottom: 24px;
}

.apercu-title em {
    color: var(--or);
    font-style: italic;
}

.apercu-image-wrap {
    background: var(--charbon);
    border: 2px solid var(--gris-clair);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 24px;
    text-align: center;
    padding: 10px;
    position: relative;
}

.apercu-image-wrap img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .apercu-image-wrap {
        padding: 10px 20px;
    }
}

.apercu-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-gold {
    background: var(--or);
    color: var(--noir);
}

.btn-gold:hover {
    background: var(--or-vif);
    box-shadow: var(--ombre-or);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gris-clair);
    color: var(--blanc-cassé);
}

.btn-outline:hover {
    border-color: var(--or);
    color: var(--or);
}

.btn-facebook {
    background: #1877f2;
    color: #fff;
}

.btn-facebook:hover {
    background: #166fe5;
}

.btn-pinterest {
    background: #e60023;
    color: #fff;
}

.btn-pinterest:hover {
    background: #cc001f;
}

/* ===== COMMENTS ===== */
.comments-wrap {
    background: var(--charbon);
    border: 1px solid var(--gris-clair);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 30px;
}

.comments-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--blanc);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gris-clair);
}

/* ===== JEUX ===== */
.jeux-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.jeu-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--charbon);
    border: 1px solid var(--gris-clair);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.25s;
}

.jeu-card:hover {
    border-color: var(--or);
    transform: translateY(-3px);
    box-shadow: var(--ombre-or);
}

.jeu-icon {
    font-size: 2.8rem;
    flex-shrink: 0;
}

.jeu-titre {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--or);
    margin-bottom: 6px;
}

.jeu-desc {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .jeux-wrap {
        grid-template-columns: 1fr;
    }
}

/* ===== ADSENSE ===== */
.adsense-wrap {
    margin: 10px 0 30px;
    text-align: center;
    min-height: 90px;
}

/* ===== CATEGORIES ===== */
.categories-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--charbon);
    border: 1px solid var(--gris-clair);
    border-radius: 30px;
    color: var(--blanc-cassé);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.cat-btn:hover {
    border-color: var(--or);
    color: var(--or);
    background: var(--gris);
    transform: translateY(-2px);
    box-shadow: var(--ombre-or);
}
.search-results-header {
    margin: 30px 0 20px;
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--blanc);
}

.search-results-header em {
    color: var(--or);
    font-style: italic;
}

.no-result {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.no-result .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

/* ===== TOP PAGE ===== */
.top-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 600px) {
    .top-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 900px) {
    .top-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* ===== FOOTER ===== */
footer {
    background: var(--charbon);
    border-top: 2px solid var(--or);
    margin-top: 60px;
    padding: 40px 20px 20px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.footer-logo {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem;
    color: var(--or);
    letter-spacing: 3px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    justify-content: center;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--or);
}

.footer-copy {
    color: #555;
    font-size: 0.8rem;
    margin-top: 10px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--gris-clair);
    background: var(--charbon);
    color: var(--blanc-cassé);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--or);
    color: var(--or);
}

.pagination .current {
    background: var(--or);
    border-color: var(--or);
    color: var(--noir);
    font-weight: 700;
}

/* ===== FLASH / BADGE NOUVEAU ===== */
.badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--rouge);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 2;
}

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
    .grid, .grid-large {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 60px;
    }

    nav {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--charbon);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        border-bottom: 2px solid var(--or);
        box-shadow: var(--ombre);
    }

    nav.open {
        display: flex;
    }

    nav a {
        width: 100%;
        text-align: center;
        padding: 12px;
    }

    .burger {
        display: flex;
    }

    .hero {
        padding: 30px 16px 28px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .section-link {
        align-self: flex-end;
        font-size: 0.8rem;
    }

    .grid, .grid-large {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    /* Hide 5th card in category sections on mobile (keep only 4) */
    .grid[style*="grid-template-columns: repeat(5, 1fr)"] .card:nth-child(5) {
        display: none;
    }

    .apercu-nav {
        flex-wrap: wrap;
    }

    .btn-nav {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }

    .apercu-actions {
        gap: 8px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .top-item {
        height: 70px;
    }

    .top-rank {
        font-size: 1.6rem;
        min-width: 44px;
    }
}

@media (max-width: 400px) {
    .grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .card-body {
        padding: 10px;
    }
    .card-name {
        font-size: 0.9rem;
    }
}

/* ===== UTILITAIRES ===== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }

/* ===== SKELETON LOADER ===== */
.skeleton {
    background: linear-gradient(90deg, var(--gris) 25%, var(--gris-clair) 50%, var(--gris) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== OG / FB ===== */
.fb-like-wrap {
    margin: 0 auto;
    text-align: center;
}

/* Scroll to top */
#scrolltop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--or);
    color: var(--noir);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    box-shadow: var(--ombre);
    transition: background 0.2s;
}

#scrolltop:hover {
    background: var(--or-vif);
}

#scrolltop.visible {
    display: flex;
}
