/* Portail de l'employé (/portail) : mise en page pour le téléphone, sur les couleurs du thème de l'administration (.admin-app).
   Onglets en bas de l'écran sur téléphone, en haut sur ordinateur. */

.portal-app {
    flex-direction: column;
}

.portal-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.portal-topbar {
    padding: 0 16px;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--os-ink);
    text-decoration: none;
}

    .portal-brand:hover {
        color: var(--os-ink);
    }

.portal-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--os-blue);
    color: #fff;
}

.portal-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

    .portal-brand-text strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .portal-brand-text small {
        color: var(--os-muted);
        font-size: var(--os-fs-xs);
    }

.portal-nav {
    position: sticky;
    top: var(--os-topbar);
    z-index: 15;
    display: flex;
    gap: 4px;
    padding: 6px 16px;
    overflow-x: auto;
    background: var(--os-surface);
    border-bottom: 1px solid var(--os-border);
}

    .portal-nav a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 7px 12px;
        border-radius: var(--os-radius-sm);
        color: var(--os-muted);
        font-weight: 500;
        text-decoration: none;
        white-space: nowrap;
    }

        .portal-nav a:hover {
            background: var(--os-hover);
            color: var(--os-ink);
        }

        .portal-nav a.active {
            background: var(--os-blue-soft);
            color: var(--os-blue);
        }

.portal-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.portal-empty {
    max-width: 640px;
}

.portal-hello {
    margin-bottom: 16px;
}

    .portal-hello h1 {
        margin: 0;
    }

/* Les cartes de l'accueil */
.portal-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.portal-big {
    font-size: calc(var(--os-fs) + 12px);
    font-weight: 700;
    color: var(--os-ink);
    line-height: 1.1;
}

/* Le pointage : un gros bouton facile à toucher */
.portal-clock {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

    .portal-clock .btn {
        min-width: 160px;
        min-height: 48px;
        font-size: var(--os-fs-lg);
        font-weight: 600;
    }

/* Une liste de jours (horaire, temps) */
.portal-days {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .portal-days > li {
        display: flex;
        gap: 12px;
        padding: 10px 0;
        border-bottom: 1px solid var(--os-border);
    }

        .portal-days > li:last-child {
            border-bottom: 0;
        }

        .portal-days > li.is-today {
            background: var(--os-blue-soft);
            margin: 0 calc(-1 * var(--os-pad));
            padding: 10px var(--os-pad);
        }

.portal-day {
    flex: none;
    width: 74px;
    color: var(--os-muted);
    font-size: var(--os-fs-sm);
    line-height: 1.25;
}

    .portal-day strong {
        display: block;
        color: var(--os-ink);
        font-size: var(--os-fs-lg);
    }

.portal-day-body {
    flex: 1 1 auto;
    min-width: 0;
}

.portal-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    margin: 2px 6px 2px 0;
    border-radius: 999px;
    background: var(--os-surface-3);
    color: var(--os-text);
    font-size: var(--os-fs-sm);
}

.portal-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
}

.portal-week {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

    .portal-week strong {
        flex: 1 1 auto;
        text-align: center;
    }

/* Les soldes des banques */
.portal-balances {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

    .portal-balances > div {
        padding: 12px;
        border: 1px solid var(--os-border);
        border-radius: var(--os-radius-sm);
        background: var(--os-surface-2);
    }

/* Une liste de demandes ou de talons : des lignes faciles à lire sur téléphone */
.portal-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .portal-list > li {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 6px 12px;
        padding: 10px 0;
        border-bottom: 1px solid var(--os-border);
    }

        .portal-list > li:last-child {
            border-bottom: 0;
        }

.portal-list-main {
    flex: 1 1 220px;
    min-width: 0;
}

.portal-list-side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.portal-dl {
    display: grid;
    grid-template-columns: minmax(130px, 38%) 1fr;
    gap: 6px 14px;
    margin: 0;
}

    .portal-dl dt {
        color: var(--os-muted);
        font-weight: 500;
    }

    .portal-dl dd {
        margin: 0;
        min-width: 0;
        overflow-wrap: anywhere;
    }

/* Téléphone : les onglets passent en bas de l'écran, avec l'icône au-dessus du mot. */
@media (max-width: 767px) {
    .portal-admin-link span, .portal-topbar .user-menu summary > span:not(.avatar) {
        display: none;
    }

    .portal-nav {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        justify-content: space-around;
        gap: 0;
        padding: 4px 2px calc(4px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--os-border);
        border-bottom: 0;
        box-shadow: 0 -4px 16px rgba(15, 27, 45, .06);
    }

        /* Au moins 58 px par onglet : au-delà de 6 ou 7 onglets, la barre défile de côté. */
        .portal-nav a {
            flex: 1 0 58px;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
            padding: 6px 2px;
            font-size: 11px;
        }

            .portal-nav a span {
                max-width: 100%;
                overflow: hidden;
                text-overflow: ellipsis;
            }

    .portal-content {
        padding: 14px 12px 96px;
    }

    .portal-cards {
        grid-template-columns: 1fr;
    }

    .portal-clock .btn {
        flex: 1 1 100%;
    }

    .portal-dl {
        grid-template-columns: 1fr;
        gap: 0 0;
    }

        .portal-dl dd {
            margin-bottom: 8px;
        }
}
