:root {
    --bg: #2B2233;
    --panel: #4A3B52;
    --outline: #1A1420;
    --accent: #EF9F27;
    --text: #F1EFE8;
    --muted: #9E99A5;
    --grey: #666;
    --radius: 0;
    --shadow: 4px 4px 0 var(--outline);
    --font: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-title: 'PixelOperator', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

@font-face {
    font-family: 'PixelOperator';
    src: url('PixelOperator.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PixelOperator';
    src: url('PixelOperator-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

h1, h2, h3, h4 {
    font-family: var(--font-title);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.3;
}

@media (max-width: 484px) {
    .ei {
        flex-direction: column;
        text-align: center;

        .logo {
            width: 10rem;
        }

        .title {
            font-size: clamp(2rem, 12vw, 4rem);
        }
    }
}

.ei {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;

    .logo {
        width: 12rem;
    }

    .title {
        font-size: 80px;
        color: var(--accent);
    }
}

.italic {
    font-style: italic;
}

/* MENU */

.menu {
    display: flex;
    gap: 1rem;
    list-style-type: none;
    background-color: var(--panel);
    padding: 1rem 0rem 1.25rem 0.5rem;

    a {
        border: var(--outline) 2px solid;
        border-radius: 0.25rem;
        background-color: var(--panel);
        box-shadow: var(--shadow);
        color: var(--text);
        padding: 0.5rem 0.75rem;
        text-decoration: none;
        display: inline-block;
        transition: transform 0.05s;
    }

    a:hover {
        box-shadow: none;
        color: var(--accent);
        transform: translate(2px, 2px);
    }

    a:active {
        box-shadow: none;
        color: var(--accent);
        transform: translate(2px, 2px);
    }

    a.active {
        background-color: var(--accent);
        color: var(--outline);
        box-shadow: none;
        transform: translate(2px, 2px);
        font-weight: 700;
    }
}

/* BURGER BUTTON */

.burger {
    display: none;
    background: #4A3B52;
    border: 2px solid #1A1420;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
}

.burger span {
    display: block;
    width: 22px;
    height: 3px;
    background: #F1EFE8;
}

/* MOBILE MENU */

@media (max-width: 434px) {
    .burger {
        display: flex;
    }

    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        margin-top: 0.5rem;
        padding: 1rem;
        background: #4A3B52;
        border: 2px solid #1A1420;
        list-style: none;
    }

    .menu.open {
        display: flex !important;
    }

    .menu li {
        width: 100%;
        text-align: center;
    }
}

.panel {
    background-color: var(--panel);
    border: 3px solid var(--outline);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.game-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;

    img {
        width: 3.5rem;
    }
}

.panel h2 {
    color: var(--accent);
}

.panel h3 {
    color: var(--accent);
    font-size: 24px;
}

.screenshots {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.screenshots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
}

.screen-placeholder {
    width: 200px;
    background-color: var(--bg);
    border: 2px solid var(--outline);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.8rem;
}

button {
    border: var(--outline) 2px solid;
    border-radius: 0.25rem;
    background-color: var(--panel);
    box-shadow: var(--shadow);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.05s;
}

button:hover {
    box-shadow: none;
    color: var(--accent);
    transform: translate(2px, 2px);
    cursor: pointer;
}

button:active {
    box-shadow: none;
    color: var(--accent);
    transform: translate(2px, 2px);
}

.margin-bottom {
    margin-bottom: 1rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
    font-size: 0.85rem;
    border-top: 3px solid var(--outline);
    margin-top: 3rem;
}

/* Page jeux */
.games-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.games-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--panel);
    border: 3px solid var(--outline);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow);
}

.games-list img {
    height: 48px;
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.link,
.link:visited,
.link:active {
    color: var(--text);
}

.game-link,
.game-link:visited,
.game-link:active {
    font-family: var(--font-title);
    color: var(--text);
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 3px dotted transparent;
    transition: border-color 0.05s transform 0.05s;
    cursor: pointer;
}

.game-link:hover {
    border-bottom-color: var(--accent);
    transform: translate(2px, 2px);
}

.mentions-legales {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

a[target="_blank"]::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 0.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M1 9L9 1M9 1H3M9 1V7' stroke='%23EF9F27' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

.game-title {
    color: var(--accent);
    margin-left: 1rem;
    margin-bottom: 1rem;
    font-size: 36px;
}

.bold {
    font-weight: bold;
}

.links {
    display: flex;
    gap: 1rem;
}

.feature-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
    background: var(--panel);
    border: 3px solid var(--outline);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.feature-card h4 {
    color: var(--accent);
    margin-top: 0;
    font-size: 1.1rem;
}

.feature-card p {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}

.cta-panel {
    position: sticky;
    bottom: 0;
    z-index: 100;

    border: 3px solid var(--outline);
    border-bottom: none;
    box-shadow: var(--shadow);
    background: var(--panel);

    padding: 1rem;
    margin: 0;
    text-align: center;
}

.pixel-btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  background: var(--accent);
  color: var(--outline);
  border: 3px solid var(--outline);
  box-shadow: var(--shadow);
  font-family: var(--font-title);
  font-weight: bold;
  text-decoration: none;
  font-size: 1.1rem;
}

.pixel-btn.disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

.small-note {
  color: #6B6470;
  font-size: 0.85rem;
  margin-top: 1rem;
}

.meta {
    color: var(--grey);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.mentions-legales h4 {
    color: var(--accent);
    font-size: 1.25rem;
}

.mentions-legales h5 {
    color: var(--accent);
    font-size: 1.1rem;
    font-family: var(--font-title);
    font-weight: bold;
}

.mentions-legales ul {
    list-style-type: none;
    margin-left: 2rem;
}

/* ---------- Lightbox / Zoom ---------- */

/* Indicateur visuel au survol */
img.zoomable {
    cursor: zoom-in;
    transition: transform 0.2s ease, filter 0.2s ease;
}

img.zoomable:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}

/* Overlay */
.lightbox {
    display: none;              /* caché par défaut */
    position: fixed;
    inset: 0;                   /* top/right/bottom/left : 0 */
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

/* Affichage */
.lightbox.active {
    display: flex;
}

/* Image agrandie */
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    cursor: default;           /* pas zoom-out sur l'image elle-même */
}

/* Croix fermeture */
.lightbox .close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 42px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    padding: 10px;             /* zone tactile plus grande */
    z-index: 10000;
    user-select: none;
}
