
/* =========================================================
   LIBURU — STYLE COMMUN DES MENUS DE JEUX
   Fichier : site/css/css-games-menu.css
   Référence visuelle : Sumot
   ========================================================= */

:root {
    --games-bg: #10101d;
    --games-card: linear-gradient(145deg, #201e35, #171625);
    --games-card-hover: #25213c;
    --games-primary: #7c5cff;
    --games-primary-dark: #6650df;
    --games-cyan: #45d9ff;
    --games-text: #f5f5ff;
    --games-muted: #b8b8d0;
    --games-border: #35334f;
    --games-success: #35d49a;
    --games-warning: #ffd580;
    --games-danger: #ff5470;
}

/* ---------- Base ---------- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--games-bg);
    color: var(--games-text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: var(--games-cyan);
}

h1,
h2,
h3,
p {
    overflow-wrap: break-word;
}

/* ---------- Conteneur principal ---------- */

.games-container,
.sumot-container,
.demineur-conteneur {
    width: min(100% - 32px, 1000px);
    margin: 0 auto;
    padding: 80px 0 40px;
}

/* ---------- Bouton de retour ---------- */

.games-back,
.sumot-back,
.demineur-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--games-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.games-back:hover,
.sumot-back:hover,
.demineur-back:hover {
    color: var(--games-cyan);
    text-decoration: none;
}

/* Prend également en charge le bouton commun actuel du site. */
.btn-fixed {
    z-index: 10;
}

/* ---------- En-tête ---------- */

.games-header,
.sumot-header,
.demineur-entete {
    margin: 0 0 40px;
    text-align: center;
}

.games-header h1,
.sumot-header h1,
.demineur-entete h1 {
    margin: 0 0 12px;
    font-size: clamp(42px, 8vw, 68px);
    font-weight: 900;
    letter-spacing: 5px;
    line-height: 1.15;
    background: linear-gradient(
        90deg,
        var(--games-primary),
        var(--games-cyan)
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.games-header p,
.sumot-header p,
.demineur-description {
    max-width: 680px;
    margin: 0 auto;
    color: var(--games-muted);
    font-size: 17px;
    line-height: 1.7;
}

/* Icône principale facultative */

.games-main-icon,
.demineur-icone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    border: 1px solid var(--games-border);
    border-radius: 18px;
    background: #302852;
    font-size: 35px;
}

/* ---------- Grille des cartes ---------- */

.games-menu,
.sumot-menu,
.demineur-cartes {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(min(100%, 260px), 1fr)
    );
    gap: 22px;
    align-items: stretch;
}

/* ---------- Cartes ---------- */

.games-card,
.sumot-card,
.demineur-carte {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 28px 22px;
    border: 1px solid var(--games-border);
    border-radius: 20px;
    background: var(--games-card);
    color: inherit;
    text-align: center;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

a.games-card:hover,
a.sumot-card:hover,
a.demineur-carte:hover {
    transform: translateY(-5px);
    border-color: var(--games-primary);
    background: var(--games-card-hover);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    text-decoration: none;
}

.games-card:focus-visible,
.sumot-card:focus-visible,
.demineur-carte:focus-visible {
    outline: 2px solid var(--games-cyan);
    outline-offset: 4px;
}

/* ---------- Icônes des cartes ---------- */

.games-card-icon,
.sumot-card-icon,
.demineur-carte-icone {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    margin-bottom: 18px;
    border: 1px solid rgba(124, 92, 255, 0.18);
    border-radius: 18px;
    background: #302852;
    font-size: 35px;
}

/* ---------- Titres et descriptions des cartes ---------- */

.games-card h2,
.sumot-card h2,
.demineur-carte h2 {
    margin: 0 0 12px;
    color: var(--games-text);
    font-size: 23px;
    line-height: 1.35;
}

.games-card p,
.sumot-card p,
.demineur-carte p {
    flex-grow: 1;
    margin: 0;
    color: var(--games-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* ---------- Boutons des cartes ---------- */

.games-card-button,
.sumot-card-button,
.demineur-bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 22px;
    padding: 12px 20px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        var(--games-primary),
        var(--games-primary-dark)
    );
    color: white;
    font-weight: bold;
    line-height: 1.4;
    text-align: center;
}

.games-card:hover .games-card-button,
.sumot-card:hover .sumot-card-button,
.demineur-carte:hover .demineur-bouton {
    filter: brightness(1.08);
}

/* Variante pour un défi */

.games-card-challenge .games-card-icon,
.sumot-card-defi .sumot-card-icon,
.demineur-carte-defi .demineur-carte-icone {
    background: #30304e;
}

.games-card-challenge .games-card-button,
.sumot-card-defi .sumot-card-button {
    background: linear-gradient(90deg, #168cb4, #5964e8);
}

/* ---------- Cartes verrouillées ---------- */

.games-card-locked,
.demineur-carte-verrouillee {
    opacity: 0.65;
    cursor: not-allowed;
}

.games-card-locked:hover,
.demineur-carte-verrouillee:hover {
    transform: none;
    border-color: var(--games-border);
    background: var(--games-card);
    box-shadow: none;
}

.games-card-locked .games-card-button,
.games-card-lock-label,
.demineur-bouton-verrouille {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 22px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 213, 128, 0.2);
    border-radius: 10px;
    background: rgba(255, 213, 128, 0.08);
    color: var(--games-warning);
    font-size: 14px;
    font-weight: bold;
}

/* ---------- Message d'information / inscription ---------- */

.games-info,
.sumot-info,
.demineur-info {
    grid-column: 1 / -1;
    padding: 22px;
    border: 1px solid var(--games-border);
    border-radius: 16px;
    background: #201e35;
    color: #d0cfe4;
    text-align: center;
    font-size: 15px;
    line-height: 1.7;
}

.games-info p,
.sumot-info p {
    margin: 0 0 12px;
}

.games-info strong,
.demineur-info strong {
    color: var(--games-text);
}

.games-info .btn,
.sumot-info .btn {
    display: inline-block;
    margin-top: 10px;
}

/* ---------- Bouton d'action générique ---------- */

.games-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        var(--games-primary),
        var(--games-primary-dark)
    );
    color: white;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

.games-button:hover {
    filter: brightness(1.1);
    text-decoration: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
    .games-container,
    .sumot-container,
    .demineur-conteneur {
        width: min(100% - 24px, 1000px);
        padding-top: 90px;
    }

    .games-header,
    .sumot-header,
    .demineur-entete {
        margin-bottom: 28px;
    }

    .games-header h1,
    .sumot-header h1,
    .demineur-entete h1 {
        font-size: clamp(36px, 10vw, 52px);
        letter-spacing: 3px;
    }

    .games-menu,
    .sumot-menu,
    .demineur-cartes {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .games-card,
    .sumot-card,
    .demineur-carte {
        padding: 24px 20px;
    }

    .games-info,
    .sumot-info,
    .demineur-info {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
