/* ============================================================
   ROYAUME EMPIRE — Feuille de style
   Thème : Noir & Or, inspiré du logo
   Police : Arial
   ============================================================ */

/* ── Variables ── */
:root {
    --bg:           #0a0800;
    --bg-card:      #120f02;
    --bg-input:     #1a1503;
    --bg-hover:     #1f1a04;

    --border:       #3a2e08;
    --border-focus: #c9920a;

    --gold:         #d4a017;
    --gold-bright:  #f0c040;
    --gold-pale:    #f5dfa0;
    --gold-dim:     #7a5c0a;

    --text:         #f8f4e8;
    --text-muted:   #c8aa6a;
    --text-soft:    #e0cc90;

    --green:        #22c55e;
    --red:          #ef4444;
    --cyan:         #d4a017;
    --blue-discord: #5865f2;
    --blue-paypal:  #0070ba;

    --radius:       8px;
    --radius-lg:    12px;
    --shadow:       0 2px 12px rgba(0, 0, 0, 0.6);
    --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.7);
}

/* ── Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

/* ── Body ── */
body {
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 70% 40% at 50% 0%,  rgba(180, 130, 10, 0.18) 0%, transparent 65%),
        radial-gradient(ellipse 30% 30% at 90% 80%,  rgba(150, 100, 5,  0.10) 0%, transparent 60%);
    min-height: 100vh;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}


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

header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
    height: 60px;
    background: rgba(10, 8, 0, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
}

header img {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    image-rendering: pixelated;
}

header h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-bright);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Navigation */
nav.nav {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin-left: auto;
    list-style: none;
}

nav.nav li { list-style: none; }

nav.nav a {
    position: relative;
    display: block;
    padding: 0.4rem 0.85rem;
    color: #c8aa6a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius);
    overflow: hidden;
    transition: color 0.15s, background 0.15s;
}

nav.nav a:hover {
    color: var(--gold-bright);
    background: var(--bg-hover);
}

nav.nav a.active {
    color: var(--gold-bright);
    background: rgba(212, 160, 23, 0.12);
}

nav.nav a::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 55%;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: transform 0.2s ease;
}

nav.nav a:hover::after,
nav.nav a.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Zone utilisateur */
.user-nav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.82rem;
    color: #e0cc90;
}

.user-badge .avatar {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #92400e, var(--gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #1a0a00;
    flex-shrink: 0;
}

.balance-badge {
    padding: 0.3rem 0.75rem;
    background: rgba(212, 160, 23, 0.1);
    border: 1px solid rgba(212, 160, 23, 0.3);
    border-radius: var(--radius);
    font-size: 0.82rem;
    color: var(--gold-bright);
    font-weight: 700;
}


/* ============================================================
   MISE EN PAGE
   ============================================================ */

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    animation: pageEnter 0.32s ease both;
}

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

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-bright);
    margin-bottom: 0.4rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-sub {
    font-size: 0.9rem;
    color: #c8aa6a;
    text-align: center;
    margin-bottom: 2rem;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

code {
    font-family: 'Courier New', monospace;
    font-size: 0.88em;
    background: rgba(212, 160, 23, 0.1);
    border: 1px solid rgba(212, 160, 23, 0.2);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    color: var(--gold-pale);
}


/* ============================================================
   BOUTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0) scale(0.97);
    opacity: 1;
}

/* Bouton principal : or sur fond sombre */
.btn-primary {
    background: linear-gradient(135deg, #92400e, var(--gold));
    color: #1a0a00;
    font-weight: 800;
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(212, 160, 23, 0.5); }

/* Contour or */
.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1.5px solid var(--border-focus);
}
.btn-outline:hover {
    background: rgba(212, 160, 23, 0.08);
    box-shadow: 0 4px 16px rgba(212, 160, 23, 0.2);
}

.btn-discord {
    background: var(--blue-discord);
    color: white;
}
.btn-discord:hover { box-shadow: 0 4px 18px rgba(88, 101, 242, 0.4); }

.btn-paypal {
    background: var(--blue-paypal);
    color: white;
}
.btn-paypal:hover { box-shadow: 0 4px 18px rgba(0, 112, 186, 0.4); }

.btn-danger {
    background: var(--red);
    color: white;
}
.btn-danger:hover { box-shadow: 0 4px 18px rgba(239, 68, 68, 0.35); }

.btn-gold {
    background: var(--gold-bright);
    color: #1a0a00;
    font-weight: 800;
}
.btn-gold:hover { box-shadow: 0 4px 18px rgba(240, 192, 64, 0.5); }

.btn-cyan {
    background: linear-gradient(135deg, #92400e, var(--gold));
    color: #1a0a00;
    font-weight: 800;
}
.btn-cyan:hover { box-shadow: 0 4px 18px rgba(212, 160, 23, 0.45); }

.btn-green {
    background: var(--green);
    color: white;
}
.btn-green:hover { box-shadow: 0 4px 18px rgba(34, 197, 94, 0.35); }

.btn-sm   { padding: 0.35rem 0.85rem; font-size: 0.8rem; }
.btn-lg   { padding: 0.75rem 2rem; font-size: 0.95rem; }
.btn-full { width: 100%; }


/* ============================================================
   CARTES
   ============================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 160, 23, 0.4);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
}

.card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.65rem;
}

.card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-pale);
    margin-bottom: 0.4rem;
}

.card p {
    color: #c8aa6a;
    font-size: 0.88rem;
    line-height: 1.6;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}


/* ============================================================
   HERO
   ============================================================ */

.hero {
    text-align: center;
    padding: 3.5rem 1rem 2.5rem;
}

.hero-icon {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    border: 2px solid var(--gold);
    box-shadow: 0 0 20px rgba(212, 160, 23, 0.3);
    margin-bottom: 1.25rem;
}

.hero h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--gold-bright);
    margin-bottom: 0.75rem;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-subtitle {
    font-size: 1rem;
    color: #c8aa6a;
    max-width: 580px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.ip-box {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.ip-text {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gold-pale);
    letter-spacing: 0.04em;
}


/* ============================================================
   BOUTIQUE — Plans
   ============================================================ */

.shop-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.25rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.plan-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.12);
}

.plan-card.featured {
    border-color: var(--gold-bright);
    box-shadow: 0 0 16px rgba(212, 160, 23, 0.15);
}

.plan-card.featured::before {
    content: 'Populaire';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #92400e, var(--gold-bright));
    color: #1a0a00;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.18rem 0.7rem;
    border-radius: 20px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-label  { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.6rem; }
.plan-amount { font-size: 1.9rem; font-weight: 800; color: var(--text); margin-bottom: 0.15rem; }
.plan-ingame { font-size: 1.1rem; font-weight: 700; color: var(--gold-bright); margin-bottom: 0.4rem; }
.plan-desc   { font-size: 0.8rem; color: #c8aa6a; margin-bottom: 1.1rem; line-height: 1.5; }

/* Cadeau quotidien */
.daily-claim-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid rgba(212, 160, 23, 0.3);
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    transition: border-color 0.2s;
}

.daily-claim-box:hover {
    border-color: rgba(212, 160, 23, 0.5);
}

.daily-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-pale);
    margin-bottom: 0.2rem;
}

.daily-info p {
    font-size: 0.85rem;
    color: #c0aa70;
}

.daily-timer {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-bright);
}


/* ============================================================
   MODALES
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(5, 4, 0, 0.85);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.97);
    transition: transform 0.2s;
}

.modal-overlay.open .modal { transform: scale(1); }

.modal h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-bright);
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.modal-sub {
    font-size: 0.85rem;
    color: #c8aa6a;
    margin-bottom: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.15s;
}

.modal-close:hover { color: var(--gold); }

.modal-toggle {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.83rem;
    color: #c8aa6a;
}

.modal-toggle a {
    color: var(--gold);
    cursor: pointer;
    text-decoration: underline;
}


/* ============================================================
   FORMULAIRES
   ============================================================ */

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

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #e0cc90;
    margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 0.9rem;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.12);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-error {
    display: none;
    padding: 0.55rem 0.85rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    font-size: 0.83rem;
    color: #fca5a5;
    margin-bottom: 0.9rem;
}
.form-error.show { display: block; }

.form-success {
    display: none;
    padding: 0.55rem 0.85rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: var(--radius);
    font-size: 0.83rem;
    color: #86efac;
    margin-bottom: 0.9rem;
}
.form-success.show { display: block; }


/* ============================================================
   SUPPORT — Tickets
   ============================================================ */

.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.ticket-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.ticket-form h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-pale);
    margin-bottom: 1.25rem;
}

.tickets-list { display: flex; flex-direction: column; gap: 0.65rem; }

.ticket-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.ticket-badge {
    font-size: 0.7rem;
    padding: 0.18rem 0.55rem;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-open    { background: rgba(34, 197, 94, 0.15);  color: #86efac; border: 1px solid rgba(34, 197, 94, 0.25); }
.badge-closed  { background: rgba(100, 100, 80, 0.2);  color: #9ca3af; border: 1px solid rgba(100, 100, 80, 0.25); }
.badge-pending { background: rgba(212, 160, 23, 0.15); color: var(--gold-bright); border: 1px solid rgba(212, 160, 23, 0.3); }


/* ============================================================
   FUN — Mini-jeux
   ============================================================ */

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

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.game-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-pale);
    margin-bottom: 0.6rem;
}

#cps-area {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.75rem 0;
    background: var(--bg-input);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    user-select: none;
    color: #c8aa6a;
    font-size: 0.9rem;
    transition: background 0.1s, border-color 0.1s;
}

#cps-area:active { background: rgba(212, 160, 23, 0.08); }

#cps-area.active-game {
    border-color: var(--border-focus);
    color: var(--gold-pale);
    background: rgba(212, 160, 23, 0.06);
}

.cps-score {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gold-bright);
    margin: 0.4rem 0;
}

.ping-result { font-size: 1.75rem; font-weight: 800; margin: 0.75rem 0; }
.ping-good   { color: var(--green); }
.ping-ok     { color: var(--gold-bright); }
.ping-bad    { color: var(--red); }

.ping-bar {
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin: 0.4rem 0;
    background: var(--bg-input);
}

.ping-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s;
    background: linear-gradient(90deg, var(--green), var(--gold), var(--red));
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    margin: 0.75rem 0;
}

.memory-card {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    user-select: none;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: background 0.15s;
}

.memory-card.flipped  { background: rgba(212, 160, 23, 0.12); border-color: var(--border-focus); }
.memory-card.matched  { background: rgba(34, 197, 94, 0.15);  border-color: var(--green); }
.memory-card.hidden-face { color: transparent; }

#reaction-box {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.75rem 0;
    border-radius: var(--radius);
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background 0.1s;
}

.reaction-waiting { background: var(--bg-input);                border: 1.5px dashed var(--border); color: #c8aa6a; }
.reaction-ready   { background: rgba(239, 68, 68, 0.15);        border: 1.5px solid var(--red);     color: #fca5a5; }
.reaction-go      { background: rgba(34, 197, 94, 0.15);        border: 1.5px solid var(--green);   color: #86efac; }


/* ============================================================
   TOAST
   ============================================================ */

.toast {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    max-width: 280px;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text);
    box-shadow: var(--shadow-card);
    transform: translateY(8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s, opacity 0.2s;
}

.toast.show    { transform: translateY(0); opacity: 1; pointer-events: all; }
.toast.success { border-color: rgba(34, 197, 94, 0.4); }
.toast.error   { border-color: rgba(239, 68, 68, 0.4); }


/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }


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

@media (max-width: 768px) {
    header { flex-wrap: wrap; height: auto; padding: 0.75rem 1rem; }
    nav.nav a { padding: 0.35rem 0.55rem; font-size: 0.75rem; }
    .hero { padding: 2rem 0.5rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .support-grid { grid-template-columns: 1fr; }
}
