body.home-page {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow: auto;
    display: block;
    background: #050505;
    color: #fff;
    position: relative;
}

.home-background,
.home-background-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.home-background {
    z-index: 0;
    object-fit: cover;
    object-position: center;
}

.home-background-overlay {
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48)),
        rgba(0, 0, 0, 0.42);
}

.home-shell {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 40px));
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-rows: auto auto;
    align-content: center;
    align-items: center;
    gap: 58px;
    transform: translateY(-48px);
}

.home-hero {
    display: flex;
    justify-content: center;
}

.home-logo {
    width: min(620px, 82vw);
    max-height: 180px;
    object-fit: contain;
    filter:
        drop-shadow(0 0 34px color-mix(in srgb, var(--red-main) 48%, transparent))
        drop-shadow(0 22px 50px rgba(0, 0, 0, 0.55));
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.home-tile {
    min-height: 340px;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(18, 18, 18, 0.72);
    box-shadow:
        0 0 42px color-mix(in srgb, var(--red-main) 18%, transparent),
        0 26px 70px rgba(0, 0, 0, 0.34);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    backdrop-filter: blur(16px);
}

.home-tile:hover,
.home-tile:focus-visible {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--red-main) 76%, white);
    background: rgba(28, 28, 28, 0.86);
    box-shadow:
        0 0 58px color-mix(in srgb, var(--red-main) 28%, transparent),
        0 30px 78px rgba(0, 0, 0, 0.42);
}

.home-preview {
    height: 220px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.home-preview-bar {
    height: 24px;
    border-radius: 6px 6px 0 0;
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-bottom: 0;
    position: relative;
}

.home-preview-bar::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red-main);
    box-shadow: 13px 0 0 #f2b84b, 26px 0 0 #34c759;
}

.home-preview-screen {
    flex: 1;
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 0 0 6px 6px;
    background: #050505;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.home-preview-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.16), transparent 48%);
}

.home-mini-ui {
    position: relative;
    z-index: 1;
    width: 78%;
    height: 68%;
    border-radius: 6px;
}

.home-tile-admin .home-mini-ui {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.13);
    overflow: hidden;
}

.home-admin-ui {
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.home-admin-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.home-admin-col + .home-admin-col {
    border-left: 4px solid rgba(0, 0, 0, 0.45);
}

.home-admin-line,
.home-admin-block {
    display: block;
    width: 48%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.18);
}

.home-admin-line.short {
    width: 38%;
}

.home-admin-line-accent {
    background: var(--red-main);
}

.home-admin-block {
    width: 54%;
    height: 16px;
    margin-top: 8px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.09);
}

.home-admin-block-accent {
    background: var(--red-main);
}

.home-tile-remote .home-mini-ui {
    width: 44%;
    height: 78%;
    border-radius: 18px;
    background:
        linear-gradient(#d32f2f 0 0) 50% 72% / 64% 18% no-repeat,
        linear-gradient(rgba(255, 255, 255, 0.18) 0 0) 50% 25% / 70% 5% no-repeat,
        linear-gradient(rgba(255, 255, 255, 0.12) 0 0) 50% 38% / 56% 4% no-repeat,
        linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border: 5px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.65);
}

.home-tile-facade .home-mini-ui,
.home-tile-retour .home-mini-ui {
    background:
        linear-gradient(rgba(255, 255, 255, 0.20) 0 0) 50% 42% / 54% 6% no-repeat,
        linear-gradient(rgba(255, 255, 255, 0.15) 0 0) 50% 54% / 38% 4% no-repeat,
        radial-gradient(circle at 50% 44%, rgba(211, 47, 47, 0.36), transparent 38%),
        rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.home-tile-retour .home-mini-ui {
    background:
        linear-gradient(var(--chord-color) 0 0) 33% 31% / 14% 5% no-repeat,
        linear-gradient(rgba(255, 255, 255, 0.24) 0 0) 50% 44% / 60% 5% no-repeat,
        linear-gradient(rgba(255, 255, 255, 0.16) 0 0) 50% 57% / 48% 4% no-repeat,
        rgba(255, 255, 255, 0.05);
}

.home-tile-content {
    padding: 22px;
    display: grid;
    gap: 8px;
}

.home-tile-title {
    font-family: 'Heavitas', 'Poppins', sans-serif;
    font-size: 28px;
    line-height: 1;
    text-transform: uppercase;
}

.home-tile-label {
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 980px) {
    .home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-tile {
        min-height: 300px;
    }
}

@media (max-width: 620px) {
    body.home-page {
        min-height: 100vh;
        overflow: auto;
    }

    .home-shell {
        width: min(100% - 24px, 420px);
        min-height: auto;
        padding: 28px 0 22px;
        gap: 34px;
        align-items: start;
        transform: none;
    }

    .home-page .powered-by-floating {
        position: relative;
        left: auto;
        bottom: auto;
        transform: none;
        z-index: 2;
        width: 100%;
        margin: 26px auto 34px;
    }

    .home-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .home-logo {
        width: min(360px, 86vw);
    }

    .home-tile {
        min-height: auto;
    }

    .home-preview {
        height: 180px;
    }
}
