/* =====================================================================
   EquaSkyBlock — feuille de style unique
   Palette reprise d'Equaria (sable / nuit) + bleu ciel pour le Skyblock.
   ===================================================================== */
:root {
    --nuit: #0c0d12;
    --nuit-2: #12141b;
    --carte: #171a23;
    --carte-2: #1d2130;
    --bord: rgba(255, 255, 255, 0.08);
    --texte: #eceae4;
    --texte-doux: rgba(236, 234, 228, 0.66);
    --sable: #e6c27a;
    --sable-fonce: #c9a858;
    --ciel: #6cc4ff;
    --ciel-fonce: #2f8fd6;
    --vert: #3ecf7a;
    --rouge: #ef5b5b;
    --orange: #f0a04b;
    --violet: #b57cff;
    --rayon: 14px;
    --ombre: 0 10px 30px rgba(0, 0, 0, 0.35);
    --police: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--police);
    background: var(--nuit);
    background-image:
        radial-gradient(1200px 500px at 85% -10%, rgba(108, 196, 255, 0.10), transparent 60%),
        radial-gradient(900px 400px at -10% 10%, rgba(230, 194, 122, 0.08), transparent 60%);
    background-attachment: fixed;
    color: var(--texte);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 1140px; margin: 0 auto; padding: 32px 20px 64px; }
a { color: var(--ciel); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.5rem; margin-top: 8px; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 12px; }
.doux { color: var(--texte-doux); }
.petit { font-size: 0.88rem; }
.centre { text-align: center; }
.cache { display: none !important; }
.mono { font-family: var(--mono); }
hr { border: 0; border-top: 1px solid var(--bord); margin: 28px 0; }

/* ---------------------------------------------------------------- en-tête */
.entete {
    position: sticky; top: 0; z-index: 50;
    background: rgba(12, 13, 18, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bord);
}
.entete-int {
    max-width: 1140px; margin: 0 auto; padding: 10px 20px;
    display: flex; align-items: center; gap: 18px;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--texte); font-weight: 700; font-size: 1.1rem; }
.logo:hover { text-decoration: none; }
.logo img { width: 40px; height: 40px; border-radius: 10px; }
.logo span b { color: var(--sable); }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a {
    color: var(--texte-doux); padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
}
.nav a:hover, .nav a.actif { color: var(--texte); background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.nav a.actif { color: var(--sable); }
.zone-compte { display: flex; gap: 8px; align-items: center; }
.burger { display: none; background: none; border: 1px solid var(--bord); color: var(--texte); border-radius: 8px; padding: 6px 10px; font-size: 1.2rem; cursor: pointer; }

@media (max-width: 860px) {
    .burger { display: block; margin-left: auto; }
    .nav, .zone-compte { display: none; }
    .entete.ouvert .entete-int { flex-wrap: wrap; }
    .entete.ouvert .nav, .entete.ouvert .zone-compte { display: flex; width: 100%; flex-direction: column; }
}

/* ---------------------------------------------------------------- boutons */
.bouton {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 10px; padding: 11px 18px;
    font: inherit; font-weight: 700; cursor: pointer;
    background: var(--sable); color: #231a06;
    transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s ease;
}
.bouton:hover { background: var(--sable-fonce); text-decoration: none; }
.bouton:active { transform: translateY(1px); }
.bouton:disabled { opacity: 0.45; cursor: not-allowed; }
.bouton.secondaire { background: rgba(255, 255, 255, 0.08); color: var(--texte); border: 1px solid var(--bord); }
.bouton.secondaire:hover { background: rgba(255, 255, 255, 0.14); }
.bouton.ciel { background: var(--ciel); color: #04223a; }
.bouton.ciel:hover { background: var(--ciel-fonce); color: #fff; }
.bouton.discord { background: #5865f2; color: #fff; }
.bouton.discord:hover { background: #4752c4; }
.bouton.danger { background: var(--rouge); color: #fff; }
.bouton.petit { padding: 7px 12px; font-size: 0.9rem; }
.bouton.large { width: 100%; }

/* ---------------------------------------------------------------- cartes & grilles */
.carte {
    background: linear-gradient(180deg, var(--carte), var(--nuit-2));
    border: 1px solid var(--bord);
    border-radius: var(--rayon);
    padding: 22px;
    box-shadow: var(--ombre);
}
.grille { display: grid; gap: 18px; }
.grille.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grille.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grille.g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grille.g5 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
@media (min-width: 1100px) { .grille.g5 { grid-template-columns: repeat(5, 1fr); } }
.section { margin-top: 44px; }
.titre-section { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.titre-section p { margin: 0; }

/* ---------------------------------------------------------------- héros */
.heros {
    display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center;
    padding: 28px 0 10px;
}
.heros h1 b { color: var(--sable); }
.heros .accroche { font-size: 1.15rem; color: var(--texte-doux); max-width: 560px; }
.heros-logo { width: 100%; max-width: 340px; justify-self: center; border-radius: 28px; box-shadow: 0 25px 60px rgba(108, 196, 255, 0.18); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 860px) { .heros { grid-template-columns: 1fr; } .heros-logo { max-width: 220px; order: -1; } }

.ip {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--carte-2); border: 1px dashed rgba(230, 194, 122, 0.5); border-radius: 10px;
    padding: 10px 14px; font-family: var(--mono); font-size: 1.05rem; cursor: pointer; color: var(--texte);
}
.ip:hover { border-color: var(--sable); }
.statut { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.point { width: 10px; height: 10px; border-radius: 50%; background: var(--rouge); box-shadow: 0 0 0 4px rgba(239, 91, 91, 0.15); }
.point.vert { background: var(--vert); box-shadow: 0 0 0 4px rgba(62, 207, 122, 0.18); }

.atout h3 { display: flex; align-items: center; gap: 10px; }
.icone { font-size: 1.5rem; }

.etapes { counter-reset: etape; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.etapes li { counter-increment: etape; display: flex; gap: 14px; align-items: flex-start; }
.etapes li::before {
    content: counter(etape); flex: 0 0 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 800; background: var(--sable); color: #231a06;
}

/* ---------------------------------------------------------------- boutique */
.offre { display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.offre .montant { font-size: 1.9rem; font-weight: 800; color: var(--sable); }
.offre .montant small { display: block; font-size: 0.9rem; color: var(--texte-doux); font-weight: 600; }
.offre .bonus { color: var(--vert); font-weight: 700; }
.offre .prix { font-size: 1.35rem; font-weight: 800; margin-top: auto; }
.offre.vedette { border-color: rgba(230, 194, 122, 0.55); }
.ruban {
    position: absolute; top: 14px; right: -34px; transform: rotate(35deg);
    background: var(--sable); color: #231a06; font-size: 0.75rem; font-weight: 800; padding: 4px 40px;
}
.accord { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--texte-doux); }
.accord input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--sable); flex: 0 0 auto; }

/* ---------------------------------------------------------------- tableaux */
.tableau-conteneur { overflow-x: auto; border-radius: var(--rayon); border: 1px solid var(--bord); }
table { width: 100%; border-collapse: collapse; background: var(--carte); }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--bord); white-space: nowrap; }
th { background: var(--carte-2); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texte-doux); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
td.nombre, th.nombre { text-align: right; font-variant-numeric: tabular-nums; }
.barre { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); min-width: 120px; overflow: hidden; }
.barre > span { display: block; height: 100%; background: var(--ciel); border-radius: 4px; }

/* ---------------------------------------------------------------- loot box */
.onglets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.onglet {
    background: var(--carte-2); color: var(--texte-doux); border: 1px solid var(--bord);
    border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 700; cursor: pointer;
}
.onglet.actif { color: #0c0d12; }
.rare { --rang: #6cc4ff; }
.epique { --rang: #b57cff; }
.legendaire { --rang: #f0a04b; }
.mythique { --rang: #ef5b5b; }
.onglet.actif.rare, .onglet.actif.epique, .onglet.actif.legendaire, .onglet.actif.mythique { background: var(--rang); border-color: var(--rang); }
.box-entete { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-left: 4px solid var(--rang, var(--sable)); padding-left: 12px; margin-bottom: 14px; }
.box-entete h3 { margin: 0; color: var(--rang, var(--sable)); }

/* ---------------------------------------------------------------- badges & états */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 700;
    background: rgba(255, 255, 255, 0.08); color: var(--texte); white-space: nowrap;
}
.badge.or { background: rgba(230, 194, 122, 0.18); color: var(--sable); }
.badge.vert { background: rgba(62, 207, 122, 0.16); color: var(--vert); }
.badge.rouge { background: rgba(239, 91, 91, 0.16); color: var(--rouge); }
.badge.ciel { background: rgba(108, 196, 255, 0.16); color: var(--ciel); }
.badge.orange { background: rgba(240, 160, 75, 0.16); color: var(--orange); }

.alerte { border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid; }
.alerte.info { background: rgba(108, 196, 255, 0.08); border-color: rgba(108, 196, 255, 0.35); }
.alerte.erreur { background: rgba(239, 91, 91, 0.08); border-color: rgba(239, 91, 91, 0.4); }
.alerte.succes { background: rgba(62, 207, 122, 0.08); border-color: rgba(62, 207, 122, 0.4); }
.alerte.avert { background: rgba(240, 160, 75, 0.08); border-color: rgba(240, 160, 75, 0.4); }

/* ---------------------------------------------------------------- formulaires */
.formulaire { max-width: 440px; margin: 20px auto; }
.champ { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.champ label { font-weight: 600; font-size: 0.92rem; }
input[type=text], input[type=email], input[type=password], input[type=search], select {
    font: inherit; color: var(--texte); background: var(--nuit-2);
    border: 1px solid var(--bord); border-radius: 10px; padding: 11px 13px; width: 100%;
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--ciel); outline-offset: 2px; }
.code-saisie { font-family: var(--mono); font-size: 1.6rem; letter-spacing: 0.35em; text-align: center; text-transform: uppercase; }
.lien-bas { margin-top: 14px; text-align: center; font-size: 0.92rem; }

/* ---------------------------------------------------------------- profil */
.profil-entete { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.avatar { width: 80px; height: 80px; border-radius: 14px; image-rendering: pixelated; background: var(--carte-2); }
.chiffre { font-size: 2rem; font-weight: 800; color: var(--sable); font-variant-numeric: tabular-nums; }
.indicateur {
    display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; padding: 9px 14px;
    font: inherit; font-weight: 700; border: 1px solid; cursor: default;
}
.indicateur.oui { background: rgba(62, 207, 122, 0.12); border-color: rgba(62, 207, 122, 0.5); color: var(--vert); }
.indicateur.non { background: rgba(239, 91, 91, 0.12); border-color: rgba(239, 91, 91, 0.5); color: var(--rouge); }
.liste-simple { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.liste-simple li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; background: var(--carte-2); border-radius: 10px; }

/* ---------------------------------------------------------------- vote */
.compteur { font-size: 2.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.progression { height: 12px; background: rgba(255, 255, 255, 0.07); border-radius: 6px; overflow: hidden; margin: 10px 0; }
.progression > span { display: block; height: 100%; background: linear-gradient(90deg, var(--ciel), var(--sable)); }

/* ---------------------------------------------------------------- textes légaux */
.texte-legal { max-width: 820px; }
.texte-legal h2 { margin-top: 28px; font-size: 1.2rem; color: var(--sable); }
.texte-legal .a-completer { background: rgba(240, 160, 75, 0.18); color: var(--orange); padding: 0 4px; border-radius: 4px; }

/* ---------------------------------------------------------------- pied de page */
.pied { border-top: 1px solid var(--bord); background: var(--nuit-2); }
.pied-int { max-width: 1140px; margin: 0 auto; padding: 28px 20px; display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; font-size: 0.9rem; color: var(--texte-doux); }
.pied-int nav { display: flex; gap: 16px; flex-wrap: wrap; }
.pied-int a { color: var(--texte-doux); }

/* ---------------------------------------------------------------- notifications */
.toast {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--carte-2); border: 1px solid var(--bord); border-radius: 12px; padding: 12px 18px;
    box-shadow: var(--ombre); opacity: 0; transition: all 0.25s ease; z-index: 100; max-width: 90vw;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.erreur { border-color: rgba(239, 91, 91, 0.6); }
.toast.succes { border-color: rgba(62, 207, 122, 0.6); }

.chargement { color: var(--texte-doux); padding: 20px; text-align: center; }
