@media (hover: none) and (pointer: coarse) {

    .match-detail-close {
        display: none;
    }
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/
@media (max-width: 800px) {

    :root {
        --footer-h: 48px;
    }

    .app-footer {
        left: 0;
        right: 0;
        bottom: var(--safe-bottom);

        transform: none;

        width: 100%;
    }

    .app-header__inner {
        padding: 10px;
    }

    .page {
        padding:
            14px
            10px
            calc(
                var(--footer-h)
                + var(--safe-bottom)
                + 12px
            );
    }

    .weeks-strip {
        margin: auto 5px;
    }

    .ranking-sheet {
        top: auto;
        bottom: 0;

        width: 100%;

        height:
            calc(
                100dvh
                - var(--safe-top)
                - 12px
            );

        max-height: none;

        border-radius: 18px 18px 0 0;
    }

    .sheet-handle {
        display: block;
        width: 42px;
        height: 5px;
        margin: 8px auto 4px;
        border-radius: 99px;
        background: #d2d5d9;
    }

    .ranking-sheet__header {
        position: relative;
        min-height: 46px;

        display: flex;
        align-items: center;
        justify-content: center;

        text-transform: uppercase;
    }

    .ranking-sheet__title {
        width: 100%;
        text-align: center;
        font-size: 17px;
        font-weight: 800;
    }

    .sheet-close {
        display: none;
    }

    .ranking-sheet__content {
        height: calc(100% - 58px);
        max-height: none;

        overflow-y: auto;

        padding:
            0 10px
            calc(
                12px
                + var(--safe-bottom)
            );
    }

    .results-wrap {
        margin-top:
            calc(
                var(--header-h)
                + var(--safe-top)
                + var(--strip-h)
                + 10px
            );

        min-height:
            calc(
                100dvh
                - var(--header-h)
                - var(--safe-top)
                - var(--strip-h)
                - var(--safe-bottom)
                - var(--footer-h)
                - 10px
            );

        padding-bottom:
            calc(
                var(--footer-h)
                + var(--safe-bottom)
            );
        
    }

    .entity-detail-layer {
        bottom:
            calc(
                var(--footer-h)
                + var(--safe-bottom)
            );

        padding-bottom: 0;
    }

    .teams-page {
        padding:
            calc(
                var(--safe-top)
                + 12px
            )
            0
            20px;
    }
}


/*
|--------------------------------------------------------------------------
| Web / tablette large
|--------------------------------------------------------------------------
*/
@media (min-width: 801px) {

    :root {
        --footer-h: 58px;
        --outside-bg: #e3e6eb;
        --site-border: #d5d9df;
    }
    
    html,
    body {
        background:
            var(--outside-bg);
    }

    .app-main {
        width: 100%;
        max-width: var(--max-width);

        min-height: 100dvh;

        margin:
            0 auto;

        background:
            var(--gris);

        border-left:
            1px solid var(--site-border);

        border-right:
            1px solid var(--site-border);

        box-shadow:
            0 0 18px
            rgba(0, 0, 0, .05);
        padding: 0 20px;
    }
    
    .page {
        padding-bottom:
            calc(
                var(--footer-h)
                + 20px
            );
    }
    .team-detail-layer__top {
        position: sticky;
        top: 0;
        z-index: 5;

        margin: 0;

        padding-top: 0;

        background: var(--gris);

        box-shadow:
            0 3px 10px
            rgba(0, 0, 0, .06);        
    }

    .team-detail-layer__title {
        width: 100%;
        min-height: 60px;

        display: flex;
        align-items: center;
        gap: 8px;

        padding: 6px 12px;

        background: transparent;
    }

    .team-detail-layer
    .team-directory-tabs {
        width: calc(100% + 80px);
        max-width: calc(var(--max-width) + 80px);

        margin: 0;
        padding: 0 8px;

        background: transparent;
    }
    .app-footer {
        border-radius: 14px 14px 0 0;
        width: calc(100% - 32px);
	    max-width: var(--max-width);

	   left: 50%;
	   right: auto;

	   transform: translateX(-50%);
    }

    .app-footer__item {
        flex-direction: row;
        gap: 8px;
    }

    .app-footer__item i {
        font-size: 16px;
    }

    .app-footer__item span {
        font-size: 12px;
    }

    /*
     * Largeur du contenu web.
     * On garde les écrans de navigation
     * compacts au centre de la page.
     */
    .teams-page,
    .favorites-page {
        width: min(calc(100% - 32px), var(--max-width));
        margin-left: auto;
        margin-right: auto;
    }

    .teams-page__header,
    .teams-directory {
        width: 100%;
       max-width: var(--max-width);
        margin-left: auto;
        margin-right: auto;
    }

    .team-detail-layer__top,
    .team-detail-layer .team-directory-content {
        width: 100%;
        max-width: var(--max-width);

        margin-left: auto;
        margin-right: auto;
    }

    .team-overview-new,
    .buteurs-list {
        width: 100%;
        max-width: var(--max-width);
        margin-left: auto;
        margin-right: auto;
    }

    .ranking-table {
        grid-template-columns:
            28px
            minmax(0, 1fr)
            36px
            216px
            45px;
    }

    .ranking-stats-viewport {
        width: 216px;
        overflow: visible;
        touch-action: auto;
    }

    .ranking-stats-track {
        width: 216px;

        grid-template-columns:
            repeat(6, 36px);

        transform: none !important;
    }

    .ranking-stats-track .ranking-column {
        width: 36px;
    }

    .entity-detail-layer {
        width: calc(100% - 32px);
        max-width: var(--max-width);

        margin-left: auto;
        margin-right: auto;

        padding-bottom: 0;
    }

    .ranking-sheet {
        width: calc(100% - 32px);
        max-width: var(--max-width);
    } 
    
}
