:root {
    --tc-fond: #FBFAF6;
    --tc-texte: #17324D;
    --tc-accent: #17324D;
    --tc-erreur: #b32121;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--tc-fond);
    color: var(--tc-texte);
}

main {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    font-size: 22px;
    margin: 0 0 16px;
}

.top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: var(--tc-accent);
    color: white;
}

    .top-bar .brand {
        font-weight: 700;
        letter-spacing: 0.5px;
    }

    .top-bar nav {
        flex: 1;
        display: flex;
        gap: 14px;
    }

    .top-bar a {
        color: white;
        text-decoration: none;
        opacity: 0.85;
    }

    .top-bar a.active {
        opacity: 1;
        font-weight: 600;
    }

    .top-bar button {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.5);
        color: white;
        border-radius: 6px;
        padding: 6px 10px;
        cursor: pointer;
    }

.page-connexion {
    max-width: 340px;
    margin: 15vh auto 0;
    padding: 20px;
}

.champ {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .champ label {
        font-size: 13px;
        opacity: 0.75;
    }

    .champ input {
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 6px;
        font-size: 16px;
    }

.bouton {
    display: inline-block;
    background: var(--tc-accent);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

    .bouton:disabled {
        opacity: 0.6;
        cursor: default;
    }

.erreur {
    color: var(--tc-erreur);
    font-size: 14px;
}

.hint {
    font-size: 14px;
    opacity: 0.75;
}

.solde-montant {
    font-size: 36px;
    font-weight: 700;
    margin: 8px 0 20px;
}

.actions-rapides {
    display: flex;
    gap: 10px;
}

.confirmation {
    padding: 16px;
    border: 1px solid #26b050;
    border-radius: 8px;
}

.qr-cadre {
    max-width: 260px;
    margin: 16px 0;
    padding: 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

    .qr-cadre svg {
        width: 100%;
        height: auto;
        display: block;
    }

.numero-affiche {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--tc-accent);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Chargement…");
    }
