/*
 * Accueil du visiteur : le héros (ciel, braises, arène), les trois étapes, le bandeau « la mort est définitive ».
 * Tirée d'app.css (DA-L0). Chargée juste après app.css et hud.css (bloc page_stylesheets de base.html.twig) : ses
 * règles gardent le rang qu'elles avaient dans la cascade.
 */

/* ---------- Héros (accueil) ---------- */

.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(36rem, calc(100vh - var(--header-height)), 56rem);
    padding: clamp(3rem, 8vw, 5rem) 1rem clamp(11rem, 26vw, 17rem);
    overflow: hidden;
    text-align: center;
}

.hero-compact {
    min-height: clamp(28rem, 70vh, 40rem);
}

.hero-sky {
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(ellipse 70% 55% at 50% 100%, rgb(224 112 44 / 55%), rgb(163 36 26 / 20%) 45%, transparent 75%),
        radial-gradient(ellipse 40% 40% at 50% 38%, rgb(243 211 138 / 9%), transparent 70%),
        linear-gradient(180deg, #0b0807 0%, #1a0f0a 50%, #3a160b 100%);
}

.hero-sky::before,
.hero-sky::after {
    content: '';
    position: absolute;
    top: 30%;
    width: 46vw;
    height: 70%;
    background: radial-gradient(closest-side, rgb(255 150 60 / 32%), rgb(224 112 44 / 10%) 55%, transparent);
    filter: blur(6px);
}

.hero-sky::before {
    left: -14vw;
}

.hero-sky::after {
    right: -14vw;
}

.hero-embers {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 80%);
    mask-image: linear-gradient(to top, #000 10%, transparent 80%);
    opacity: 0.75;
}

.hero-embers::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: calc(100% + 960px);
    background: url("../images/embers-W0EoGJc.svg") 0 0 / 640px 960px repeat;
}

.hero-arena {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    /* Même rapport que colosseum.svg (1600 × 360) pour ne jamais le répéter ni le déformer. */
    height: max(22.5vw, 12.6rem);
    background:
        linear-gradient(180deg, transparent 72%, #4a2a16 86%, #6b4424 93%, #3a2312 100%),
        url("../images/colosseum-x9ZLY2O.svg") center bottom / max(100%, 56rem) auto no-repeat;
}

.hero-arena::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 30%;
    background:
        url("../images/noise-5lpaXVc.svg"),
        linear-gradient(180deg, transparent, rgb(14 10 8 / 70%) 70%, var(--ink));
}

.hero-content {
    position: relative;
    max-width: 50rem;
}

.hero-emblem {
    display: block;
    width: clamp(5.5rem, 14vw, 8.25rem);
    height: auto;
    margin: 0 auto 0.75rem;
    filter: drop-shadow(0 0 24px rgb(224 112 44 / 45%)) drop-shadow(0 6px 10px rgb(0 0 0 / 60%));
}

.hero-heading {
    margin: 0 0 1.25rem;
    color: var(--gold);
}

.hero-kicker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: clamp(0.85rem, 2.2vw, 1.05rem);
    font-weight: 600;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--bronze-light);
    /* Compense l'espacement de la dernière lettre pour un centrage optique. */
    padding-left: 0.42em;
}

.hero-kicker::before,
.hero-kicker::after {
    content: '';
    width: clamp(1.5rem, 8vw, 4.5rem);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--bronze));
}

.hero-kicker::after {
    background: linear-gradient(90deg, var(--bronze), transparent);
}

.hero-title {
    display: block;
    margin-top: 0.1em;
    font-size: clamp(4rem, 17vw, 10rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0.12em;
    padding-left: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    background: linear-gradient(180deg, #fff3cf 0%, #f3d38a 30%, #c9973f 58%, #8a5a22 74%, #e9bd6c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 #3a210c) drop-shadow(0 0 28px rgb(224 112 44 / 45%));
}

.hero-tagline {
    max-width: 38rem;
    margin: 0 auto 2.2rem;
    font-size: clamp(1.08rem, 2.4vw, 1.3rem);
    font-style: italic;
    line-height: 1.55;
    color: var(--sand);
    text-shadow: 0 2px 12px rgb(0 0 0 / 85%);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* ---------- Les trois étapes ---------- */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: clamp(1rem, 3vw, 1.75rem);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.step {
    position: relative;
    overflow: hidden;
    padding: 2.25rem 1.6rem 2rem;
    text-align: center;
    background:
        url("../images/noise-5lpaXVc.svg"),
        radial-gradient(ellipse 90% 60% at 50% 0%, rgb(224 112 44 / 12%), transparent 70%),
        linear-gradient(180deg, var(--stone-2), var(--ink-2));
    border: 1px solid var(--line);
    border-top: 2px solid var(--bronze);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px rgb(0 0 0 / 45%), inset 0 1px 0 rgb(243 211 138 / 8%);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.step:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: 0 24px 50px rgb(0 0 0 / 55%), 0 0 40px rgb(224 112 44 / 10%);
}

.step-number {
    position: absolute;
    top: 0.2rem;
    right: 0.9rem;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 4.25rem;
    line-height: 1;
    color: rgb(201 151 63 / 10%);
}

.step-icon {
    display: block;
    width: 4.75rem;
    height: 4.75rem;
    margin: 0 auto 1.25rem;
    padding: 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: radial-gradient(circle, rgb(224 112 44 / 16%), rgb(0 0 0 / 30%) 70%);
    box-shadow: 0 0 0 5px rgb(14 10 8 / 70%), 0 0 0 6px rgb(201 151 63 / 25%);
}

.step-title {
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 0.6rem;
}

.step-text {
    margin: 0;
    color: var(--sand-dim);
}

/* ---------- Bandeau : la mort est définitive ---------- */

.doom {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(3.5rem, 9vw, 6rem) 1rem;
    text-align: center;
    background:
        url("../images/noise-5lpaXVc.svg"),
        radial-gradient(ellipse 60% 80% at 50% 50%, rgb(163 36 26 / 45%), transparent 75%),
        linear-gradient(180deg, #120807, #2a0a07 50%, #120807);
    border-top: 1px solid rgb(163 36 26 / 55%);
    border-bottom: 1px solid rgb(163 36 26 / 55%);
}

.doom::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: repeating-linear-gradient(-55deg, transparent 0 22px, rgb(0 0 0 / 18%) 22px 23px);
    -webkit-mask-image: radial-gradient(ellipse at center, transparent 30%, #000 80%);
    mask-image: radial-gradient(ellipse at center, transparent 30%, #000 80%);
}

.doom-inner {
    max-width: 42rem;
    margin: 0 auto;
}

.doom-icon {
    display: block;
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1.25rem;
    filter: drop-shadow(0 0 18px rgb(208 64 46 / 55%));
}

.doom-title {
    font-size: clamp(1.7rem, 5vw, 2.8rem);
    color: #ffe3c4;
    text-shadow: 0 0 30px rgb(208 64 46 / 55%), 0 3px 0 #3a0a06;
    margin-bottom: 1rem;
}

.doom-text {
    margin: 0 auto 2rem;
    font-size: clamp(1.05rem, 2.3vw, 1.2rem);
    font-style: italic;
    color: #ead2c2;
}

/* ---------- Écurie (accueil connecté) ---------- */

.stable {
    max-width: 40rem;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3rem);
}

.stable .section-title {
    margin-bottom: 1.25rem;
}

.stable-empty {
    margin: 0;
    color: var(--sand-dim);
    font-style: italic;
}

@media (max-width: 40rem) {
    .hero-actions .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .hero-sky::after {
        animation-delay: -1.3s;
        animation-duration: 2.7s;
    }

    .hero-embers::before {
        animation: embers-rise 40s linear infinite;
    }

    .hero-content > * {
        animation: rise-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    .hero-content > :nth-child(2) {
        animation-delay: 0.12s;
    }

    .hero-content > :nth-child(3) {
        animation-delay: 0.24s;
    }

    .hero-content > :nth-child(4) {
        animation-delay: 0.36s;
    }
}

@keyframes embers-rise {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(0, -960px, 0);
    }
}
