/* FLAMEO - App styles */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: #f5f7fa;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

h1:focus { outline: none; }

/* Scrollbar fine */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

/* MudBlazor overrides */
.mud-main-content {
    padding-top: 56px !important;
}

.mud-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

/* Text truncate */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Invisible helper */
.invisible { visibility: hidden; pointer-events: none; }

/* Loading progress (page initiale) */
.loading-progress {
    position: relative;
    display: block;
    fill: none;
    stroke: rgba(255,255,255,0.4);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
    width: 60px;
    height: 60px;
    margin: auto;
}

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

.loading-progress-text {
    display: none;
}

/* Error UI */
#blazor-error-ui {
    background: #fdecea;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-top: 1px solid #f44336;
    color: #b71c1c;
}

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

/* Safe area pour iPhone */
@supports (padding: max(0px)) {
    .mud-main-content {
        padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
    }
}

/* MudCard rounded */
.mud-card { border-radius: 16px !important; }
