/* =========================================================
   Astralis Prime - Thème global
   Palette :
   - Fond principal : #02030a / #050816
   - Accent cyan : #31e5ff
   - Accent violet : #7c5cff
   - Accent or / mise en avant : #ffca28
   - Texte : #e5e7ff
   - Texte muted : #9ca3c4
   - Bordures : #151827
   ========================================================= */

/* Reset de base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #e5e7ff;
    background: #02030a;
}

/* Liens */
a {
    color: #31e5ff;
    text-decoration: none;
}
a:hover {
    color: #7c5cff;
}

/* =========================================================
   HEADER GLOBAL
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background:
        radial-gradient(circle at top left, rgba(79, 195, 247, 0.12), transparent),
        rgba(2, 6, 14, 0.96);
    border-bottom: 1px solid rgba(69, 90, 100, 0.55);
}

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

/* Logo métal & relief */

.site-logo .logo-inner {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
}

.logo-main {
    font-family: "Orbitron", system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: 0.22em;
    font-size: 17px;
    text-transform: uppercase;
    background: linear-gradient(180deg, #dbeafe 0%, #90caf9 30%, #2196f3 60%, #0d47a1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow:
        0 1px 1px rgba(255,255,255,0.5),
        0 3px 6px rgba(0,0,0,0.85),
        0 0 8px rgba(56, 189, 248, 0.45);
    filter: drop-shadow(0 0 4px rgba(79, 195, 247, 0.3));
    transition: all 0.25s ease;
}

.logo-sub {
    font-family: "Orbitron", system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: 0.12em;
    font-size: 11px;
    text-transform: uppercase;
    padding: 2px 8px 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff3e0 0%, #ffca28 40%, #ff9800 100%);
    color: #0d0d0d;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.5),
        0 2px 5px rgba(0,0,0,0.9),
        0 0 6px rgba(255, 202, 40, 0.6);
    border: 1px solid rgba(255, 214, 79, 0.8);
    transition: all 0.25s ease;
}

.site-logo:hover .logo-main {
    text-shadow:
        0 2px 8px rgba(79, 195, 247, 0.8),
        0 0 10px rgba(56, 189, 248, 0.8);
    transform: scale(1.03);
}

.site-logo:hover .logo-sub {
    transform: translateY(-1px);
    box-shadow:
        0 2px 9px rgba(0,0,0,1),
        0 0 12px rgba(255, 214, 102, 0.85);
}
.sidebar ul li a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #00e6ff;
    font-weight: 600;
    border-left: 3px solid #00e6ff;
}
.sidebar ul li a.active:hover {
    background: rgba(255, 255, 255, 0.15);
}
.site-header {
    position: relative;
    z-index: 100;
    background: rgba(10, 10, 25, 0.85);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
}

.logo a {
    color: #00e6ff;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.resources-bar {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #ccc;
}

.resources-bar span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

.top-nav ul {
    display: flex;
    gap: 1.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
}

.top-nav a:hover {
    color: #00e6ff;
}

.btn-logout {
    color: #ff5555;
    font-weight: 600;
}
/* ---------- Sidebar lien actif ---------- */

.sidebar a.active {
    color: #31e5ff;
    border-color: #31e5ff55;
    background: radial-gradient(circle at left, rgba(49,229,255,0.14), transparent);
    box-shadow: 0 0 12px rgba(49,229,255,0.28);
}
.sidebar a.active::before {
    background: #31e5ff;
    box-shadow: 0 0 10px #31e5ff;
}

/* ---------- Bouton menu mobile ---------- */

.ap-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 24px;
    padding: 0;
    margin-right: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.ap-menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: #e5e7ff;
    border-radius: 999px;
    transition: all 0.2s ease;
}

/* ---------- Header layout ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background:
        radial-gradient(circle at top left, rgba(79, 195, 247, 0.12), transparent),
        rgba(2, 6, 14, 0.96);
    border-bottom: 1px solid rgba(69, 90, 100, 0.55);
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-resources {
    display: flex;
    gap: 8px;
    margin-left: auto;
    margin-right: 16px;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(5,10,24,0.92);
    border: 1px solid rgba(148,163,253,0.18);
}
.header-resources span {
    color: #e5e7ff;
    opacity: 0.9;
}

.site-nav {
    display: flex;
    gap: 10px;
    font-size: 11px;
    align-items: center;
}
.site-nav a {
    padding: 4px 8px;
    border-radius: 999px;
    color: #b0bec5;
    transition: all 0.18s ease;
}
.site-nav a:hover,
.site-nav a.active {
    color: #ffffff;
    background: rgba(144, 202, 249, 0.12);
}
.site-nav .nav-logout {
    color: #ff7676;
}
.site-nav .nav-logout:hover {
    background: rgba(244,67,54,0.18);
    color: #ffb3b3;
}

/* ---------- Mobile : sidebar off-canvas ---------- */

.sidebar-backdrop {
    display: none;
}

@media (max-width: 900px) {
    .ap-menu-toggle {
        display: flex;
    }

    .header-resources {
        display: none; /* si tu veux alléger en mobile */
    }

    .site-nav {
        display: none; /* nav top cachée ou à adapter en mobile */
    }

    .game-layout {
        grid-template-columns: 1fr;
        padding: 0 10px;
        margin-top: 14px;
    }

    .sidebar {
        position: fixed;
        top: 56px; /* hauteur du header approx */
        left: -260px;
        width: 220px;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
        background: radial-gradient(circle at top, rgba(15,23,42,0.95), #02030a);
        border-right: 1px solid #151827;
        border-radius: 0 18px 18px 0;
        box-shadow: 8px 0 25px rgba(0,0,0,0.7);
        transition: left 0.22s ease;
        z-index: 120;
    }

    body.sidebar-open .sidebar {
        left: 0;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 110;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .main-panel {
        margin-top: 10px;
        margin-left: 0;
    }
}

/* Navigation header */

.site-nav {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 13px;
}
.site-nav a {
    color: #b0bec5;
    padding: 4px 8px;
    border-radius: 999px;
    transition: all 0.18s ease;
}
.site-nav a:hover {
    color: #ffffff;
    background: rgba(144, 202, 249, 0.08);
    transform: translateY(-1px);
}

/* =========================================================
   FOOTER GLOBAL
   ========================================================= */

.site-footer {
    margin-top: 40px;
    backdrop-filter: blur(14px);
    background:
    radial-gradient(circle at top left, rgba(79, 195, 247, 0.12), transparent),
    rgba(2, 6, 14, 0.96);
    border-bottom: 1px solid rgba(69, 90, 100, 0.55);
    color: #90a4ae;
    font-size: 11px;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 18px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.footer-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #b0bec5;
    transition: color 0.18s ease;
}
.footer-nav a:hover {
    color: #ffffff;
}

/* =========================================================
   PAGE D'ACCUEIL - BACKGROUND GALACTIQUE
   ========================================================= */

body.ap-landing {
    background: #02030a;
    color: #e5e7ff;
    min-height: 100vh;
    overflow-x: hidden;

    /* Ajout pour sticky footer */
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 0;
}

/* Les conteneurs principaux doivent occuper l'espace disponible */
.ap-landing-main,
.game-layout {
    position: relative;
    z-index: 5;
    flex: 1 0 auto;
}

.ap-bg-stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: transparent url("/assets/img/stars_layer.webp") repeat top center;
    background-size: cover;
    opacity: 0.32;
    animation: starsMove 180s linear infinite;
    pointer-events: none;
}

@keyframes starsMove {
    from { background-position: 0 0; }
    to   { background-position: 0 12000px; }
}

.ap-bg-nebula {
    position: fixed;
    inset: -20%;
    background:
        radial-gradient(ellipse at 30% 60%, rgba(88, 166, 255, 0.22), transparent 70%),
        radial-gradient(ellipse at 70% 40%, rgba(255, 107, 249, 0.18), transparent 65%),
        radial-gradient(ellipse at 50% 90%, rgba(0, 255, 255, 0.06), transparent 70%);
    filter: blur(80px);
    z-index: 0;
    opacity: 0.9;
    animation: nebulaDrift 120s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes nebulaDrift {
    0%   { transform: translate(0, 0) scale(1);   opacity: 0.9; }
    100% { transform: translate(-80px, 60px) scale(1.1); opacity: 0.6; }
}

.ap-bg-dust {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20% 40%, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 80% 60%, rgba(171, 71, 188, 0.5), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(144, 202, 249, 0.5), transparent),
        radial-gradient(1px 1px at 10% 80%, rgba(255,255,255,0.4), transparent);
    animation: dustDrift 120s linear infinite;
    opacity: 0.25;
}

@keyframes dustDrift {
    from { background-position: 0 0; }
    to   { background-position: 2000px 2000px; }
}

/* =========================================================
   PAGE D'ACCUEIL - CONTENU
   ========================================================= */

.ap-landing-main {
    position: relative;
    z-index: 5;
    max-width: 1400px;      /* plus large sur desktop */
    width: 100%;            /* prend toute la largeur dispo */
    margin: 24px auto 40px;
    padding: 0 24px;
}

/* HERO */

.ap-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;  /* 2/3 Astralis Prime, 1/3 Théâtre galactique */
    gap: 24px;
    align-items: stretch;
    margin-bottom: 28px;
}

.ap-hero-text h1 {
    font-size: 34px;
    line-height: 1.2;
    margin: 0 0 10px;
    color: #ffffff;
}

.ap-hero-text p {
    font-size: 15px;
    color: #b0bec5;
    max-width: 560px;
}

/* Carte holo info */

.ap-holo-card {
    padding: 16px 16px 14px;
    border-radius: 18px;
    background: radial-gradient(circle at top, rgba(79, 195, 247, 0.16), rgba(2, 6, 18, 0.98));
    border: 1px solid rgba(144, 202, 249, 0.22);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(14px);
    font-size: 13px;
    color: #cfd8dc;
}
.ap-holo-card h2 {
    margin: 0 0 6px;
    font-size: 15px;
    color: #90caf9;
}
.ap-holo-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ap-holo-card li {
    margin-bottom: 4px;
}

/* =========================================================
   AUTH ROW : Form onglets + Pack + Transmission
   ========================================================= */

.ap-auth-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 26px;
    align-items: stretch;
}

/* Carte formulaire avec onglets */

.ap-auth-tabs-container {
    background: rgba(5, 10, 24, 0.96);
    border-radius: 18px;
    padding: 16px 16px 14px;
    border: 1px solid rgba(148, 163, 253, 0.18);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
    font-size: 12px;
}

/* Onglets */

.ap-auth-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: radial-gradient(circle at top, rgba(148,163,253,0.16), transparent);
    margin-bottom: 10px;
}

.ap-auth-tabs .tab {
    border: none;
    padding: 5px 14px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 999px;
    color: #9ca8ff;
    background: transparent;
    transition: all 0.18s ease;
}

.ap-auth-tabs .tab.active {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}

/* Formulaires */

.ap-auth-forms {
    position: relative;
    min-height: 230px;
    margin-top: 4px;
}

.ap-auth-form {
    display: none;
    animation: apFadeIn 0.18s ease-out;
    flex-direction: column;
}

.ap-auth-form.active {
    display: flex;
}

@keyframes apFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ap-auth-form h2 {
    margin: 0 0 6px;
    font-size: 17px;
    color: #e5e7ff;
}

.ap-auth-form label {
    display: block;
    margin-top: 6px;
    margin-bottom: 3px;
    font-size: 11px;
    color: #9ca3af;
}

.ap-auth-form input {
    width: 100%;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid rgba(148,163,253,0.25);
    background: rgba(5,10,24,0.98);
    color: #e5e7ff;
    font-size: 13px;
}

.ap-auth-form input:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 8px rgba(96,165,250,0.35);
}

.ap-auth-form .btn.full {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    padding: 8px 14px;
    width: 100%;
    border-radius: 10px;
    border: none;
    background: linear-gradient(90deg, #2563eb, #7c5cff);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ap-auth-form .btn.full:hover {
    box-shadow: 0 0 16px rgba(37,99,235,0.6);
    transform: translateY(-1px);
}

/* Lien "mot de passe oublié" */

.ap-auth-links {
    margin-top: 4px;
    text-align: right;
}
.ap-auth-links a {
    font-size: 10px;
    color: #90caf9;
    text-decoration: none;
    opacity: 0.9;
}
.ap-auth-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* reCAPTCHA wrapper (centré, intégré) */

.ap-recaptcha-wrap {
    margin-top: 6px;
    display: flex;
    justify-content: flex-start;
    transform-origin: left center;
    transform: scale(0.95);
}

/* Alerts */

.alert {
    padding: 6px 9px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 11px;
}
.alert-error {
    background: rgba(244, 67, 54, 0.08);
    border: 1px solid rgba(244, 67, 54, 0.5);
    color: #ef9a9a;
}
.alert-success {
    background: rgba(76, 175, 80, 0.08);
    border: 1px solid rgba(129, 199, 132, 0.6);
    color: #c8e6c9;
}

/* Blocs à droite : Pack & Transmission */

.ap-home-card {
    background: radial-gradient(circle at top left, rgba(56,189,248,0.06), transparent),
                rgba(5,10,24,0.96);
    border-radius: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(148,163,253,0.16);
    font-size: 12px;
    color: #cbd5f5;
    box-shadow: 0 14px 36px rgba(0,0,0,0.55);
}

.ap-home-card h3 {
    margin: 0 0 6px;
    font-size: 14px;
    color: #e5e7ff;
}

.ap-home-card .small {
    font-size: 11px;
    color: #9ca3af;
}

.ap-news-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
}
.ap-news-list li {
    margin-bottom: 3px;
    color: #9ca8ff;
    font-size: 11.5px;
}

/* Journal de bord */

.ap-journal-section {
    margin-top: 18px;
}

.ap-journal-card {
    background: rgba(5,10,24,0.97);
    border-radius: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(148,163,253,0.18);
    box-shadow: 0 14px 40px rgba(0,0,0,0.6);
    font-size: 12px;
}

/* =========================================================
   LAYOUT JEU (game.php, etc.)
   ========================================================= */

.game-layout {
    width: 100%;
    max-width: 100%;
    margin: 16px 0 32px;
    padding: 0 24px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
}


/* Sidebar */

.sidebar {
    padding: 14px 14px 18px;
    background: linear-gradient(to bottom, #050816, #02030a);
    border-radius: 18px;
    border: 1px solid #151827;
    box-shadow: 0 14px 40px rgba(0,0,0,0.55);
    position: sticky;
    top: 72px;
    align-self: flex-start;
}

.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar li {
    margin-bottom: 6px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border-radius: 10px;
    font-size: 12px;
    color: #9ca3c4;
    border: 1px solid transparent;
    transition: all 0.16s ease;
}

.sidebar a::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #151827;
    transition: all 0.16s;
}

.sidebar a:hover {
    color: #e5e7ff;
    border-color: #31e5ff33;
    background: radial-gradient(circle at left, rgba(49,229,255,0.06), transparent);
}

.sidebar a.active {
    color: #31e5ff;
    border-color: #31e5ff55;
    background: radial-gradient(circle at left, rgba(49,229,255,0.12), transparent);
}
.sidebar a.active::before {
    background: #31e5ff;
    box-shadow: 0 0 8px #31e5ff;
}

/* Main panel */

.main-panel {
    margin-left: 4px;
    padding: 16px 18px 22px;
    background: linear-gradient(to bottom right, #050816, #02030a);
    border-radius: 20px;
    border: 1px solid #151827;
    box-shadow: 0 16px 60px rgba(0,0,0,0.6);
    position: relative;
    overflow: hidden;
}

.main-panel::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at top right, rgba(49,229,255,0.02), transparent),
        radial-gradient(circle at bottom left, rgba(124,92,255,0.02), transparent);
    pointer-events: none;
}

.main-panel h1,
.main-panel h2,
.main-panel h3 {
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 20px;
    margin: 0 0 10px;
}
h2 {
    font-size: 15px;
    margin: 16px 0 8px;
    color: #d1d5ff;
}
h3 {
    font-size: 13px;
    margin: 10px 0 6px;
    color: #9ca3ff;
}

/* Barre de ressources */

.resources-bar {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 14px;
    padding: 7px 9px;
    border-radius: 999px;
    background: rgba(3,7,18,0.92);
    border: 1px solid #151827;
    box-shadow: 0 8px 30px rgba(0,0,0,0.55);
    font-size: 10px;
    position: relative;
    z-index: 2;
}

.resources-bar span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(10,16,32,1);
    color: #e5e7ff;
}

.resources-bar span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(to bottom, #31e5ff, #7c5cff);
    box-shadow: 0 0 8px rgba(49,229,255,0.8);
}

/* Tables génériques */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin: 8px 0 4px;
    position: relative;
    z-index: 1;
}

.table th,
.table td {
    padding: 6px 7px;
    border-bottom: 1px solid #151827;
}

.table th {
    text-align: left;
    font-weight: 500;
    color: #9ca3c4;
    background: rgba(5,8,22,0.96);
    position: sticky;
    top: 0;
    backdrop-filter: blur(6px);
    z-index: 2;
}

.table tr:nth-child(even) td {
    background: rgba(4,7,18,0.7);
}
.table tr:hover td {
    background: rgba(16,24,40,0.96);
}

/* Galaxie / planètes */

.galaxy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}
.galaxy-table th,
.galaxy-table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.planet-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.planet-thumb {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 12px rgba(0,0,0,0.7);
}
.badge-self {
    background: #3498db;
    color: white;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.7rem;
    margin-left: 4px;
}

/* Formulaires génériques jeu */

.form-card {
    margin: 10px 0 14px;
    padding: 10px 11px;
    border-radius: 14px;
    background: radial-gradient(circle at top, rgba(49,229,255,0.02), transparent),
                #02030a;
    border: 1px solid #151827;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
}

label {
    font-size: 10px;
    color: #9ca3c4;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 6px 7px;
    border-radius: 9px;
    border: 1px solid #151827;
    background: #02030a;
    color: #e5e7ff;
    font-size: 11px;
    outline: none;
    transition: all 0.14s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #31e5ff;
    box-shadow: 0 0 10px rgba(49,229,255,0.26);
}

textarea {
    resize: vertical;
}

/* Boutons jeu */

.btn,
.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #31e5ff55;
    background: radial-gradient(circle at top, rgba(49,229,255,0.16), #050816);
    color: #e5e7ff;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.16s ease;
}
.btn-sm {
    padding: 4px 9px;
    font-size: 9px;
}
.btn:hover,
.btn-sm:hover {
    background: radial-gradient(circle at top, rgba(124,92,255,0.22), #050816);
    border-color: #31e5ffcc;
    box-shadow: 0 0 14px rgba(49,229,255,0.45);
}

/* Textes utilitaires */

.small { font-size: 10px; color: #9ca3c4; }
.muted { font-size: 9px; color: #6b7280; }

/* Alerts jeu */

.info {
    margin: 6px 0 10px;
    padding: 7px 9px;
    border-radius: 10px;
    background: radial-gradient(circle at left, rgba(49,229,255,0.14), transparent);
    border-left: 2px solid #31e5ff;
    font-size: 10px;
    color: #c7d2fe;
}
.warn {
    margin: 6px 0 10px;
    padding: 7px 9px;
    border-radius: 10px;
    background: radial-gradient(circle at left, rgba(240,84,84,0.14), transparent);
    border-left: 2px solid #f05454;
    font-size: 10px;
    color: #fecaca;
}

/* === Barre de ressources dans le header === */
.resources-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.95rem;
    font-weight: 500;
    color: #e0e7ff;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 8px;
    padding: 6px 12px;
    margin-left: auto;
}

.resources-bar span {
    white-space: nowrap;
}

@media (max-width: 720px) {
    .resources-bar {
        flex-direction: column;
        align-items: flex-end;
        font-size: 0.85rem;
        gap: 4px;
        padding: 8px;
    }
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 960px) {
    .ap-hero {
        grid-template-columns: 1fr;
    }
    .ap-auth-row {
        grid-template-columns: 1fr;
    }
    .ap-landing-main {
        padding: 0 14px;
    }
}

@media (max-width: 900px) {
    .game-layout {
        grid-template-columns: 1fr;
        padding: 0 12px;
    }
    .sidebar {
        position: static;
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 14px;
    }
    .sidebar ul {
        display: flex;
        gap: 4px;
    }
    .sidebar li {
        margin-bottom: 0;
    }
    .main-panel {
        margin-left: 0;
        margin-top: 10px;
    }
}