/* ================================================================
   Nakito Games — Feuille de style
   Palette taupe, épurée, chaleureuse, touche gaming
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
    /* Palette taupe */
    --bg:            #EFEAE3;   /* fond crème chaud */
    --surface:       #FBF9F5;   /* cartes */
    --surface-2:     #E3DBD0;   /* zones secondaires */
    --taupe:         #8A7E70;   /* taupe principal */
    --taupe-light:   #B3A798;
    --taupe-dark:    #5C544B;
    --ink:           #35302B;   /* texte principal */
    --ink-soft:      #6E655C;   /* texte secondaire */
    --accent:        #C77E4A;   /* terracotta chaleureux (CTA) */
    --accent-hover:  #B26C3B;
    --dark:          #2B2724;   /* header / footer sombre chaud */
    --dark-2:        #38332F;
    --on-dark:       #EDE7DE;
    --success:       #6E8B5E;
    --error:         #B05A4A;
    --radius:        14px;
    --shadow:        0 4px 20px rgba(53, 48, 43, .10);
    --shadow-hover:  0 10px 32px rgba(53, 48, 43, .18);
    --font:          'Outfit', system-ui, -apple-system, sans-serif;
    --mono:          'Space Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container { width: min(1120px, 92%); margin-inline: auto; }
main { flex: 1; padding-block: 2.5rem 4rem; }

h1, h2, h3 { line-height: 1.2; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; }

.muted { color: var(--ink-soft); }

/* ---------- Header ---------- */
.site-header {
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 3px solid var(--accent);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: .8rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--on-dark);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: .5px;
}
.brand:hover { color: #fff; }
.brand svg { width: 34px; height: 34px; }
.brand .tld { color: var(--accent); }

.main-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex-wrap: wrap;
}
.main-nav a {
    color: var(--on-dark);
    padding: .45rem .8rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: .95rem;
    transition: background .15s, color .15s;
}
.main-nav a:hover { background: var(--dark-2); color: #fff; }
.main-nav a.active { background: var(--dark-2); color: var(--accent); }
.main-nav .nav-cta {
    background: var(--accent);
    color: #fff;
    margin-left: .35rem;
}
.main-nav .nav-cta:hover { background: var(--accent-hover); color: #fff; }

.lang-switch {
    font-family: var(--mono);
    font-size: .8rem;
    display: flex;
    gap: .15rem;
    margin-left: .5rem;
}
.lang-switch a {
    color: var(--taupe-light);
    padding: .3rem .45rem;
    border-radius: 6px;
}
.lang-switch a.active { color: var(--accent); font-weight: 700; }

.burger {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: .4rem;
}
.burger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--on-dark);
    margin: 5px 0;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(ellipse at 80% 20%, rgba(199, 126, 74, .14), transparent 55%),
        linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 100%);
    color: var(--on-dark);
    padding: clamp(3rem, 8vw, 6rem) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p {
    max-width: 620px;
    margin: 0 auto 2rem;
    color: var(--taupe-light);
    font-size: 1.1rem;
}
.hero .pixel-deco {
    font-family: var(--mono);
    color: var(--accent);
    letter-spacing: 6px;
    font-size: .8rem;
    margin-bottom: 1rem;
    display: inline-block;
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-block;
    padding: .7rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    border: 0;
    cursor: pointer;
    font-family: var(--font);
    transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 6px 18px rgba(199, 126, 74, .35); }
.btn-ghost {
    background: transparent;
    color: var(--on-dark);
    border: 2px solid var(--taupe);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-taupe { background: var(--taupe); color: #fff; }
.btn-taupe:hover { background: var(--taupe-dark); color: #fff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #98493B; color: #fff; }
.btn-sm { padding: .35rem .8rem; font-size: .85rem; border-radius: 8px; }
.hero .btn { margin: .3rem; }

/* ---------- Sections ---------- */
.section { padding-block: 2.5rem; }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
}
.section-head h2 { margin: 0; }
.section-head h2::before {
    content: '▸ ';
    color: var(--accent);
}

/* ---------- Grille de jeux ---------- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}
.game-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .18s, box-shadow .18s;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--surface-2);
}
.game-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.game-card .cover {
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
    overflow: hidden;
    position: relative;
}
.game-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.game-card .badge {
    position: absolute;
    top: .6rem;
    left: .6rem;
    font-family: var(--mono);
    font-size: .68rem;
    padding: .2rem .55rem;
    border-radius: 6px;
    color: #fff;
    background: var(--taupe-dark);
    letter-spacing: .5px;
}
.game-card .badge.nakito { background: var(--accent); }
.game-card .body { padding: 1rem 1.1rem 1.2rem; flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.game-card h3 a { color: var(--ink); }
.game-card h3 a:hover { color: var(--accent); }
.game-card .tagline { color: var(--ink-soft); font-size: .92rem; flex: 1; }
.game-card .meta {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--taupe);
    margin-top: .4rem;
}

/* ---------- Fiche jeu ---------- */
.game-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.game-detail .cover-lg {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
}
.game-detail .cover-lg img { width: 100%; height: 100%; object-fit: cover; }
.game-detail .info-line {
    font-family: var(--mono);
    font-size: .85rem;
    color: var(--taupe-dark);
    margin-block: .2rem;
}
.game-detail .desc { margin-block: 1.2rem; white-space: pre-line; }
.game-detail .actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.trailer-embed {
    margin-top: 2.5rem;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.trailer-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Bandeau CTA devs ---------- */
.cta-band {
    background: linear-gradient(135deg, var(--taupe) 0%, var(--taupe-dark) 100%);
    border-radius: var(--radius);
    color: #fff;
    padding: clamp(1.6rem, 4vw, 2.8rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-block: 2.5rem;
}
.cta-band h2 { color: #fff; margin: 0 0 .4rem; }
.cta-band h2::before { content: none; }
.cta-band p { max-width: 560px; color: var(--bg); margin: 0; }

/* ---------- Étapes (page devs) ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-block: 1.5rem; }
.step {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--accent);
}
.step .num {
    font-family: var(--mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: .5rem;
}

/* ---------- Formulaires ---------- */
.form-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    max-width: 560px;
    margin-inline: auto;
    border: 1px solid var(--surface-2);
}
.form-card.wide { max-width: 760px; }
.form-group { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="file"], textarea, select {
    width: 100%;
    padding: .65rem .85rem;
    border: 2px solid var(--surface-2);
    border-radius: 10px;
    background: #fff;
    font-family: var(--font);
    font-size: 1rem;
    color: var(--ink);
    transition: border-color .15s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--taupe);
}
textarea { min-height: 130px; resize: vertical; }
.form-footer { text-align: center; margin-top: 1.2rem; font-size: .95rem; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }

/* ---------- Flash ---------- */
.flash {
    padding: .8rem 1.1rem;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    font-weight: 500;
}
.flash-success { background: #E4EBDD; color: #435A36; border-left: 4px solid var(--success); }
.flash-error { background: #F0DDD7; color: #7C3A2D; border-left: 4px solid var(--error); }

/* ---------- Tableaux (compte / admin) ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--surface-2); vertical-align: middle; }
th {
    font-family: var(--mono);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--taupe);
    background: var(--surface-2);
}
tr:last-child td { border-bottom: 0; }
td .thumb { width: 72px; border-radius: 6px; aspect-ratio: 16/9; object-fit: cover; }
td form { display: inline; }
.actions-cell { display: flex; gap: .35rem; flex-wrap: wrap; }

.status-pill {
    font-family: var(--mono);
    font-size: .7rem;
    padding: .2rem .6rem;
    border-radius: 20px;
    white-space: nowrap;
}
.status-pending { background: #EFE3C8; color: #8A6D1F; }
.status-published { background: #E4EBDD; color: #435A36; }
.status-rejected { background: #F0DDD7; color: #7C3A2D; }

/* ---------- Admin ---------- */
.admin-nav {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
    border-bottom: 2px solid var(--surface-2);
    padding-bottom: .8rem;
}
.admin-nav a {
    padding: .45rem 1rem;
    border-radius: 8px;
    color: var(--taupe-dark);
    font-weight: 600;
}
.admin-nav a:hover { background: var(--surface-2); }
.admin-nav a.active { background: var(--taupe-dark); color: #fff; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; margin-bottom: 2rem; }
.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.3rem;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--taupe);
}
.stat-card.accent { border-left-color: var(--accent); }
.stat-card .num { font-size: 2.1rem; font-weight: 700; line-height: 1; }
.stat-card .label { color: var(--ink-soft); font-size: .88rem; margin-top: .3rem; }

/* ---------- Filtres ---------- */
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.filter-bar a {
    padding: .4rem 1rem;
    border-radius: 20px;
    background: var(--surface);
    color: var(--taupe-dark);
    font-weight: 600;
    font-size: .9rem;
    border: 2px solid var(--surface-2);
}
.filter-bar a:hover { border-color: var(--taupe); }
.filter-bar a.active { background: var(--taupe-dark); border-color: var(--taupe-dark); color: #fff; }

/* ---------- Prose (à propos) ---------- */
.prose { max-width: 680px; }
.prose p { margin-bottom: 1.1rem; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--dark);
    color: var(--taupe-light);
    padding: 2.5rem 0 1.5rem;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}
.site-footer .brand { font-size: 1.1rem; margin-bottom: .5rem; }
.site-footer h4 {
    font-family: var(--mono);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--taupe);
    margin-bottom: .7rem;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: .35rem; }
.site-footer a { color: var(--taupe-light); }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--dark-2);
    padding-top: 1.2rem;
    font-size: .82rem;
    font-family: var(--mono);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .burger { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark);
        flex-direction: column;
        align-items: stretch;
        padding: .8rem 4%;
        gap: .2rem;
        border-bottom: 3px solid var(--accent);
        box-shadow: 0 12px 24px rgba(0,0,0,.25);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: .75rem .8rem; }
    .main-nav .nav-cta { margin-left: 0; text-align: center; }
    .lang-switch { margin: .4rem 0 0; justify-content: center; }
    .game-detail { grid-template-columns: 1fr; gap: 1.5rem; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
