/* ============================================================
   HERO — page d'accueil
   Fond Mérilac (image), bouton "Jouer maintenant", IP Java copiable, statut live.
   Desktop : texte à gauche, la tour Zenavia reste visible à droite.
   Mobile  : texte en bas, la ville visible en haut.
   ============================================================ */

.znv-hero {
    --hero-shade: 10, 12, 16;          /* teinte des dégradés (rgb) */
    --hero-live: #3ddc84;              /* pastille "en ligne" */
    --hero-offline: #f0a04b;
    --hero-radius: 12px;               /* arrondi commun aux panneaux et boutons */
    --hero-glass: rgba(var(--hero-shade), .5);
    --hero-glass-line: rgba(255, 255, 255, .12);

    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    margin-top: -70px;                 /* passe sous la navbar fixe (body padding-top: 70px) */
    overflow: hidden;
    /* Aperçu flou (24 px) affiché le temps que la vraie image arrive */
    background: #7d8fa6 url("data:image/webp;base64,UklGRnQAAABXRUJQVlA4IGgAAABQAwCdASoYAA4APu1iqU2ppaQiMAgBMB2JQAAENZdVII5oHgCtCF5Pv3m2Sh5HTnSmRAsm4JZ5w9K1TFEF4jYkX7P9sKvagCSjSF2Q0hMidS+wrIYNGcWkHzNhCgNinVjzC63uAgAAAA==") center / cover no-repeat;
}

/* ---------- Fond ---------- */
/* Le <picture> porte le zoom au scroll (JS), l'image garde sa lente dérive (CSS) */
.znv-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
    overflow: hidden;
}

.znv-hero-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 40%;
    transform-origin: 68% 45%;
    animation: znv-hero-drift 32s ease-in-out infinite alternate;
}

@keyframes znv-hero-drift {
    from { transform: scale(1); }
    to   { transform: scale(1.03); }  /* au-delà, l'agrandissement rend l'image floue */
}

/* Dégradés : lisibilité du texte à gauche + fondu vers la section suivante */
.znv-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg,
            rgba(var(--hero-shade), .9) 0%,
            rgba(var(--hero-shade), .72) 32%,
            rgba(var(--hero-shade), .25) 62%,
            rgba(var(--hero-shade), 0) 80%),
        linear-gradient(180deg,
            rgba(var(--hero-shade), .45) 0%,
            rgba(var(--hero-shade), 0) 22%,
            rgba(var(--hero-shade), 0) 70%,
            var(--znv-bg) 100%);
}

/* ---------- Contenu ---------- */
.znv-hero-inner {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 130px 3rem 110px;
}

.znv-hero-content {
    max-width: 720px;
}

.znv-hero-notice {
    display: inline-block;
    margin: 0 0 1rem;
    padding: .45rem .9rem;
    border-radius: 10px;
    background: rgba(240, 160, 75, .15);
    border: 1px solid rgba(240, 160, 75, .4);
    color: #ffd9ae !important;
    font-size: .875rem;
}

/* Pastille de statut */
.znv-hero-status {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 1.25rem;
    padding: .45rem .95rem;
    border-radius: 999px;
    background: var(--hero-glass);
    border: 1px solid var(--hero-glass-line);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--znv-text);
    font-size: .9rem;
    line-height: 1.2;
}

.znv-hero-status strong {
    color: #fff;
    font-weight: 700;
}

.znv-hero-status-sep {
    color: var(--znv-text-dim);
}

.znv-hero-dot {
    position: relative;
    width: 9px;
    height: 9px;
    flex: none;
    border-radius: 50%;
    background: var(--hero-live);
}

.znv-hero-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: znv-hero-pulse 2s ease-out infinite;
}

.znv-hero-status.is-offline .znv-hero-dot {
    background: var(--hero-offline);
}

.znv-hero-status.is-offline .znv-hero-dot::after {
    animation: none;
}

@keyframes znv-hero-pulse {
    from { transform: scale(1);   opacity: .7; }
    to   { transform: scale(2.6); opacity: 0; }
}

/* Titre */
.znv-hero-title {
    margin: 0 0 1.1rem;
    font-size: clamp(2.3rem, 1.3rem + 3.6vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -.01em;
    text-wrap: balance;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}

.znv-hero-lead {
    max-width: 34em;
    margin: 0 0 2rem;
    color: #eef0f4 !important;
    font-size: clamp(1rem, .95rem + .3vw, 1.15rem);
    line-height: 1.6;
    text-wrap: pretty;
}

/* ---------- Actions : "Jouer maintenant" + IP Java copiable ---------- */
.znv-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.1rem;
}

/* Seul élément coloré du hero après le titre */
.znv-hero-play {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 52px;
    padding: .75rem 1.6rem;
    border-radius: var(--hero-radius);
    background: linear-gradient(90deg, var(--znv-accent-2), var(--znv-accent-3));
    color: #06141a;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 221, 255, .22);
    transition: transform .2s, box-shadow .2s;
}

.znv-hero-play .bi {
    font-size: 1.25rem;
}

.znv-hero-play:hover {
    color: #06141a;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 221, 255, .32);
}

.znv-hero-play:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.znv-hero-ipchip {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-height: 52px;
    padding: .5rem 1rem;
    border-radius: var(--hero-radius);
    border: 1px solid var(--hero-glass-line);
    background: var(--hero-glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--znv-text-dim);
    font: inherit;
    cursor: pointer;
    transition: border-color .2s, background-color .2s, color .2s;
}

.znv-hero-ipchip-address {
    color: #fff;
    font-family: ui-monospace, "Cascadia Code", SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .98rem;
    font-weight: 500;
}

/* Le libellé n'apparaît qu'une fois l'adresse copiée */
.znv-hero-ipchip-label {
    display: none;
    font-size: .85rem;
    font-weight: 600;
}

.znv-hero-ipchip:hover {
    color: var(--znv-accent);
    border-color: rgba(56, 193, 233, .45);
    background: rgba(var(--hero-shade), .65);
}

.znv-hero-ipchip:focus-visible {
    outline: 2px solid var(--znv-accent);
    outline-offset: 3px;
}

.znv-hero-ipchip.is-copied {
    color: var(--hero-live);
    border-color: rgba(61, 220, 132, .5);
}

.znv-hero-ipchip.is-copied .znv-hero-ipchip-label {
    display: inline;
}

/* ---------- Lien Discord discret ---------- */
.znv-hero-discord {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    color: var(--znv-text);
    font-size: .92rem;
    font-weight: 500;
}

.znv-hero-discord .bi-discord {
    color: #8c96ff;                    /* bleu Discord, éclairci pour le fond sombre */
    font-size: 1.1rem;
}

.znv-hero-discord:hover {
    color: #fff;
}

.znv-hero-link-meta {
    color: var(--znv-text-dim);
    font-weight: 400;
}

.znv-hero-discord:focus-visible {
    outline: 2px solid var(--znv-accent);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- Indicateur de scroll ---------- */
.znv-hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: -22px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    opacity: .8;
    animation: znv-hero-bob 2.2s ease-in-out infinite;
}

.znv-hero-scroll:hover {
    color: #fff;
    opacity: 1;
}

.znv-hero-scroll:focus-visible {
    outline: 3px solid var(--znv-accent);
    outline-offset: 2px;
}

@keyframes znv-hero-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

/* ---------- Tablette ---------- */
@media (max-width: 992px) {
    .znv-hero-inner {
        padding: 120px 1.5rem 100px;
    }
}

/* ---------- Mobile : ville en haut, contenu en bas ---------- */
@media (max-width: 768px) {
    .znv-hero {
        align-items: flex-end;
    }

    .znv-hero-bg img {
        object-position: 50% 30%;
    }

    .znv-hero::before {
        background: linear-gradient(180deg,
            rgba(var(--hero-shade), .35) 0%,
            rgba(var(--hero-shade), .15) 22%,
            rgba(var(--hero-shade), .7) 48%,
            rgba(var(--hero-shade), .9) 72%,
            var(--znv-bg) 100%);
    }

    .znv-hero-inner {
        padding: max(110px, 22vh) 1rem 1.75rem;
    }

    .znv-hero-status {
        margin-bottom: 1rem;
        font-size: .82rem;
    }

    .znv-hero-title {
        margin-bottom: .8rem;
        font-size: clamp(1.9rem, 1.2rem + 3.4vw, 2.6rem);
    }

    .znv-hero-lead {
        margin-bottom: 1.25rem;
        font-size: .95rem;
        line-height: 1.5;
    }

    .znv-hero-scroll {
        display: none;
    }
}

/* Petits écrans : boutons pleine largeur */
@media (max-width: 480px) {
    .znv-hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: .6rem;
        margin-bottom: .6rem;
    }

    .znv-hero-play,
    .znv-hero-ipchip {
        justify-content: center;
    }
}

/* ---------- Moins d'animations ---------- */
@media (prefers-reduced-motion: reduce) {
    .znv-hero-bg img,
    .znv-hero-dot::after,
    .znv-hero-scroll {
        animation: none;
    }

    .znv-hero-play:hover {
        transform: none;
    }
}
