.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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.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: #1b6ec2;
            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, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* --- Design system global (port de index.css React) --- */
:root {
  --color-bg: #e9edf3;
  --color-surface: #ffffff;
  --color-border: #dfe3e8;
  --color-input-border: #b8c0cc;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.1), 0 1px 2px rgba(15, 23, 42, 0.06);
  --color-text: #1f2430;
  --color-text-muted: #6b7280;
  --color-primary: #2f6fed;
  --color-primary-dark: #1e54c0;
  --color-success: #1f9d55;
  --color-danger: #d64545;
  --color-warning: #b8860b;
}

:root[data-theme="dark"] {
  --color-bg: #0f1117;
  --color-surface: #1a1d27;
  --color-border: #2d3141;
  --color-input-border: #3d4358;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.45);
  --color-text: #e8eaf0;
  --color-text-muted: #8b93a7;
  --color-success: #34d06a;
  --color-danger: #f06060;
  --color-warning: #f0c040;
}

body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; margin: 0; background: var(--color-bg); color: var(--color-text); }
main { padding: 1.5rem; }
main.full-width { padding: 0; min-height: 100vh; }
a { color: var(--color-primary); }
button { font-family: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; background: var(--color-surface); }
th, td { border-bottom: 1px solid var(--color-border); padding: 0.5rem 0.75rem; text-align: left; font-size: 0.9rem; }
th { background: #eef1f6; font-weight: 600; position: sticky; top: 0; }
input, textarea { font-family: inherit; font-size: 0.9rem; padding: 0.4rem 0.5rem; border: 1px solid var(--color-input-border); border-radius: 4px; background: var(--color-surface); color: var(--color-text); }
select { font-family: inherit; font-size: 0.9rem; padding: 0.3rem 0.2rem 0.4rem 0.4rem; border: 1px solid var(--color-input-border); border-radius: 4px; background: var(--color-surface); color: var(--color-text); }
.btn { border: 1px solid var(--color-border); background: var(--color-surface); padding: 0.45rem 0.9rem; border-radius: 6px; font-size: 0.9rem; font-weight: 500; color: var(--color-text); }
.btn:hover { filter: brightness(0.97); }
.btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-danger { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }

/* Variantes non préfixées `.btn` — pages migrées utilisant encore `<button class="danger">`/`class="secondary"` seuls */
button.danger, .danger:is(button, a) { background: var(--color-danger); border: 1px solid var(--color-danger); color: #fff; padding: 0.45rem 0.9rem; border-radius: 6px; font-size: 0.9rem; font-weight: 500; cursor: pointer; }
button.danger:hover, .danger:is(button, a):hover { filter: brightness(0.92); }
button.secondary, .secondary:is(button, a) { background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text); padding: 0.45rem 0.9rem; border-radius: 6px; font-size: 0.9rem; font-weight: 500; cursor: pointer; }
button.secondary:hover, .secondary:is(button, a):hover { filter: brightness(0.97); }

.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 1rem; box-shadow: var(--shadow-card); }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.2); }
.page-title { margin: 0 0 1rem 0; font-size: 1.4rem; }
.toolbar { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.spacer { flex: 1; }

.error-banner, p.error { background: #fbe7e7; color: var(--color-danger); border: 1px solid #f3c9c9; border-radius: 6px; padding: 0.6rem 0.9rem; margin-bottom: 1rem; font-size: 0.9rem; }
.success-banner, p.success { background: #e3f6e9; color: var(--color-success); border: 1px solid #bfe6cd; border-radius: 6px; padding: 0.6rem 0.9rem; margin-bottom: 1rem; font-size: 0.9rem; }

.login-page { height: 100%; min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2f6fed, #1e3a8a); }
.login-card { width: 340px; background: var(--color-surface); padding: 2rem; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.login-card h1 { margin-top: 0; font-size: 1.4rem; }
.field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; margin-bottom: 1rem; }
.field-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.login-card button[type=submit] { width: 100%; padding: 0.6rem; }
.login-card button.secondary { width: 100%; margin-top: 0.5rem; background: transparent; }
.login-hint { color: var(--color-text-muted); font-size: 0.9rem; }
.error { color: var(--color-danger); font-size: 0.9rem; }

/* --- Signup en libre-service --- */
.signup-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2f6fed, #1e3a8a); padding: 2rem 1rem; }
.signup-card { width: 560px; max-width: 100%; background: var(--color-surface); padding: 2rem; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); text-align: center; }
.signup-card h1 { margin-top: 0; font-size: 1.4rem; }
.signup-card form { text-align: left; }
.signup-card button[type=submit] { width: 100%; padding: 0.7rem; margin-top: 0.5rem; }
.signup-plans { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.signup-plan { flex: 1 1 140px; border: 2px solid var(--color-border); border-radius: 8px; padding: 1rem; cursor: pointer; text-align: center; background: none; font-family: inherit; }
.signup-plan.selected { border-color: var(--color-primary); background: rgba(47,111,237,0.06); }
.signup-plan .plan-name { font-weight: 600; margin-bottom: 0.3rem; }
.signup-plan .plan-price { font-size: 1.3rem; font-weight: 700; }
.signup-plan .plan-detail { color: var(--color-text-muted); font-size: 0.8rem; margin-top: 0.3rem; }
.signup-section-title { font-weight: 600; margin: 1.25rem 0 0.5rem; }

.dashboard-page section { margin-top: 1.5rem; }
.dashboard-cards { display: flex; gap: 1rem; }
.big-number { font-size: 2rem; font-weight: 600; margin: 0.3rem 0 0; }

/* --- Layout / Sidebar --- */
.layout { display: flex; height: 100vh; }

.sidebar { width: 220px; background: #171a21; color: #d7dae0; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar h1 { font-size: 1rem; padding: 1rem; margin: 0; border-bottom: 1px solid #2a2e38; }
.sidebar nav { display: flex; flex-direction: column; padding: 0.5rem; gap: 0.15rem; overflow-y: auto; }

.nav-group { display: flex; flex-direction: column; gap: 0; margin-bottom: 0.15rem; }
.nav-group-btn { display: flex; align-items: center; justify-content: space-between; background: none; border: none; color: #d7dae0; cursor: pointer; font-size: 0.9rem; font-weight: 600; padding: 0.55rem 0.75rem; border-radius: 6px; width: 100%; text-align: left; }
.nav-group-btn:hover, .nav-group-btn.active { background: #2a2e38; }
.nav-group-chevron { font-size: 1rem; line-height: 1; transition: transform 0.18s ease; display: inline-block; color: #6b7280; }
.nav-group-chevron.open { transform: rotate(90deg); }
.nav-group-items { display: flex; flex-direction: column; gap: 0.05rem; padding: 0.1rem 0 0.1rem 0.75rem; }

.nav-subitem { color: #b0b7c3 !important; text-decoration: none; padding: 0.4rem 0.65rem; border-radius: 5px; font-size: 0.85rem; display: block; border-left: 2px solid #2a2e38; }
.nav-subitem:hover, .nav-subitem.active { background: #2a2e38; color: #d7dae0 !important; border-left-color: var(--color-primary, #2f6fed); }

.sidebar-footer { margin-top: auto; padding: 0.75rem; border-top: 1px solid #2a2e38; font-size: 0.8rem; }

.main-content { flex: 1; overflow-y: auto; padding: 1.5rem; min-width: 0; }
/* Pages migrées gardant un <h1> nu au lieu de .page-title */
.main-content > h1, .main-content > div > h1 { margin: 0 0 1rem 0; font-size: 1.4rem; font-weight: 600; }

/* ── Écran de rotation (portrait sur mobile/tablette) ───────────────────── */
.rotate-notice { display: none; }

@media screen and (orientation: portrait) and (max-width: 1024px) {
  .layout { display: none; }
  .rotate-notice {
    display: flex;
    position: fixed;
    inset: 0;
    background: #171a21;
    color: #d7dae0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1rem;
    text-align: center;
    padding: 2rem;
    z-index: 9999;
  }
  .rotate-notice svg { width: 56px; height: 56px; opacity: 0.7; animation: rotate-hint 2s ease-in-out infinite; }
  @keyframes rotate-hint {
    0%, 100% { transform: rotate(0deg); }
    40%       { transform: rotate(90deg); }
    60%       { transform: rotate(90deg); }
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .sidebar { width: 180px; }
  .sidebar h1 { font-size: 0.8rem; padding: 0.6rem 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar nav { padding: 0.25rem; gap: 0.05rem; }
  .nav-group-btn { font-size: 0.78rem; padding: 0.4rem 0.6rem; }
  .nav-subitem { font-size: 0.75rem; padding: 0.3rem 0.5rem; }
  .nav-group-items { padding-left: 0.5rem; }
  .sidebar-footer { padding: 0.5rem 0.6rem; font-size: 0.72rem; }
  .sidebar-footer .btn { padding: 0.3rem 0.5rem; font-size: 0.75rem; }
  .main-content { padding: 0.75rem; }
  .table-responsive, .card > table, table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { font-size: 0.8rem; padding: 0.35rem 0.5rem; }
  h2 { font-size: 1.1rem; }
  h3 { font-size: 1rem; }
  .toolbar { gap: 0.35rem; margin-bottom: 0.6rem; }
  .card { padding: 0.75rem; margin-bottom: 0.75rem; }
  .form-group { margin-bottom: 0.6rem; }
}

/* --- Persons page + modal --- */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.page-header button { background: var(--color-primary); color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; }
.search-box { width: 100%; max-width: 360px; padding: 0.5rem; margin-bottom: 1rem; border: 1px solid var(--color-border); border-radius: 4px; }
.actions { display: flex; gap: 0.4rem; }
.actions button { padding: 0.3rem 0.6rem; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: 4px; cursor: pointer; }
.actions button.danger { color: var(--color-danger); border-color: var(--color-danger); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--color-surface); padding: 1.5rem; border-radius: 8px; width: 480px; max-width: 92vw; max-height: 90vh; overflow-y: auto; }
.modal h2 { margin-top: 0; }
.field-row { display: flex; gap: 1rem; }
.field-row .field { flex: 1; }
/* Champ + boutons sur une même ligne : mêmes hauteurs que les champs voisins (padding vertical 0.4rem). */
.field-inline { display: flex; gap: 0.4rem; align-items: stretch; }
.field-inline .btn { padding-top: 0.4rem; padding-bottom: 0.4rem; white-space: nowrap; }
.field select, .field textarea { padding: 0.5rem; border: 1px solid var(--color-input-border); border-radius: 4px; font-family: inherit; }
.field.checkbox label { display: flex; align-items: center; gap: 0.4rem; font-weight: normal; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1rem; }
.modal-actions button.secondary { background: transparent; border: 1px solid var(--color-border); padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; }
.modal-actions button[type=submit] { background: var(--color-primary); color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; }

/* --- Person detail page --- */
.back-link { color: var(--color-primary); text-decoration: none; font-size: 0.85rem; }
.subtitle { color: var(--color-text-muted); margin: 0.2rem 0 0.8rem; }
.tabs { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--color-border); margin-bottom: 1rem; }
.tabs .tab { background: none; border: none; padding: 0.6rem 1rem; cursor: pointer; font-size: 0.95rem; color: var(--color-text-muted); border-bottom: 2px solid transparent; }
.tabs .tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }
.tab-content h2 { font-size: 1.1rem; margin-top: 1.5rem; }
.tab-content h2:first-child { margin-top: 0; }
.row-cancelled { opacity: 0.5; text-decoration: line-through; }
.link-btn { padding: 0.3rem 0.6rem; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: 4px; text-decoration: none; color: var(--color-text); font-size: 0.85rem; }

/* --- Agenda --- */
.agenda-range { display: flex; align-items: center; gap: 0.8rem; }
.agenda-range button { padding: 0.4rem 0.8rem; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: 4px; cursor: pointer; }
.agenda-month-label { font-weight: 600; text-transform: capitalize; min-width: 140px; text-align: center; }
.agenda-day { margin-bottom: 1.2rem; }
.agenda-day h3 { text-transform: capitalize; font-size: 0.95rem; color: #444; border-bottom: 1px solid var(--color-border); padding-bottom: 0.3rem; }
.agenda-day ul { list-style: none; margin: 0; padding: 0; }
.agenda-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; border-left: 4px solid #999; background: var(--color-surface); margin-bottom: 0.3rem; border-radius: 0 4px 4px 0; cursor: pointer; }
.agenda-item.agenda-lesson { border-left-color: #10b981; }
.agenda-item.agenda-event { border-left-color: var(--color-primary); }
.agenda-item.agenda-contest { border-left-color: #f59e0b; }
.agenda-time { font-variant-numeric: tabular-nums; color: var(--color-text-muted); width: 3.5rem; }
.agenda-type-badge { font-size: 0.7rem; text-transform: uppercase; background: var(--color-bg); padding: 0.1rem 0.4rem; border-radius: 3px; color: var(--color-text-muted); }
.agenda-sublabel { color: var(--color-text-muted); font-size: 0.85rem; }

/* --- Events registrations modal --- */
.modal-wide { width: 640px; }
.add-registration { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.add-registration select { flex: 1; padding: 0.5rem; border: 1px solid var(--color-border); border-radius: 4px; }
.add-registration button { background: var(--color-primary); color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; }
.add-registration button:disabled { opacity: 0.5; cursor: default; }

/* --- Checkout (caisse) --- */
.checkout-layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.catalog-panel { flex: 1.4; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
.catalog-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; padding: 0.7rem; background: var(--color-surface); border: 2px solid #ddd; border-radius: 6px; cursor: pointer; text-align: left; }
.catalog-tile:hover { border-color: var(--color-primary); }
.catalog-tile-name { font-size: 0.85rem; font-weight: 600; }
.catalog-tile-price { color: var(--color-text-muted); font-size: 0.85rem; }
.cart-panel { flex: 1; background: var(--color-surface); padding: 1rem; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.cart-panel .field { margin-bottom: 0.8rem; }
.cart-panel select, .cart-panel input[type=number] { padding: 0.4rem; border: 1px solid var(--color-border); border-radius: 4px; width: 100%; }
.cart-table { margin-bottom: 0.8rem; }
.qty-input { width: 4rem !important; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; padding: 0.6rem 0; border-top: 1px solid var(--color-border); margin-bottom: 1rem; }
.payment-line { align-items: center; margin-bottom: 0.5rem; }
.payment-line select { flex: 1.5; }
.payment-line input { flex: 1; }
.checkout-btn { width: 100%; margin-top: 1rem; padding: 0.7rem; background: var(--color-success); color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 1rem; }
.checkout-btn:disabled { opacity: 0.6; }
.success { color: var(--color-success); }

/* --- Payments filters --- */
.filters { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: flex-end; }
.filters .field { display: flex; flex-direction: column; gap: 0.2rem; }
.filters input, .filters select { padding: 0.4rem; border: 1px solid var(--color-border); border-radius: 4px; }
.totals-line { font-weight: 600; margin-top: 0.5rem; }

/* --- Users / Groups --- */
.checkbox-list { display: flex; flex-direction: column; gap: 0.3rem; max-height: 180px; overflow-y: auto; border: 1px solid #eee; border-radius: 4px; padding: 0.5rem; }
.checkbox-list-item { display: flex; align-items: center; gap: 0.4rem; font-weight: normal; }

/* --- Statistics --- */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stats-card { background: var(--color-surface); padding: 1rem; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); grid-column: span 1; }
.stats-card:last-child { grid-column: 1 / -1; }
.stats-card h2 { margin-top: 0; font-size: 1rem; }
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; overflow-x: auto; padding-top: 0.5rem; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 20px; }
.bar { width: 14px; background: var(--color-primary); border-radius: 2px 2px 0 0; min-height: 2px; }
.bar-revenue { background: var(--color-success); }
.bar-label { font-size: 0.6rem; color: var(--color-text-muted); margin-top: 0.2rem; writing-mode: vertical-rl; transform: rotate(180deg); }
.distribution-list { display: flex; flex-direction: column; gap: 0.5rem; }
.distribution-row { display: flex; align-items: center; gap: 0.6rem; }
.distribution-label { width: 140px; font-size: 0.85rem; flex-shrink: 0; }
.distribution-bar-track { flex: 1; background: #f0f0f0; border-radius: 4px; height: 14px; overflow: hidden; }
.distribution-bar-fill { background: var(--color-primary); height: 100%; }
.distribution-count { width: 2.5rem; text-align: right; font-size: 0.85rem; color: var(--color-text-muted); }

/* --- Settings --- */
.settings-section { background: var(--color-surface); padding: 1.2rem; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); margin-bottom: 1rem; }
.settings-section h2 { margin-top: 0; font-size: 1rem; }
.settings-page button[type=submit] { background: var(--color-primary); color: #fff; border: none; padding: 0.6rem 1.2rem; border-radius: 4px; cursor: pointer; }

/* --- Mail templates --- */
.template-hint { font-size: 0.8rem; color: var(--color-text-muted); }

/* --- Mailbox --- */
.mailbox-layout { display: flex; gap: 1rem; height: calc(100vh - 160px); min-height: 400px; }
.mailbox-folders { display: flex; flex-direction: column; gap: 0.3rem; width: 160px; flex-shrink: 0; }
.mailbox-folder, .mailbox-folders button { text-align: left; padding: 0.5rem 0.8rem; border: none; background: var(--color-surface); border-radius: 4px; cursor: pointer; }
.mailbox-folder.active { background: var(--color-primary); color: #fff; }
.mailbox-list { width: 320px; flex-shrink: 0; overflow-y: auto; background: var(--color-surface); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.mailbox-row { display: flex; flex-direction: column; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--color-border); cursor: pointer; gap: 0.1rem; }
.mailbox-row:hover { background: var(--color-bg); }
.mailbox-row.selected { background: #eff6ff; }
.mailbox-row.unread .mailbox-subject { font-weight: 700; }
.mailbox-from { font-size: 0.8rem; color: var(--color-text-muted); }
.mailbox-subject { font-size: 0.9rem; }
.mailbox-date { font-size: 0.75rem; color: var(--color-text-muted); }
.mailbox-detail { flex: 1; background: var(--color-surface); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); padding: 1rem; overflow-y: auto; }
.mailbox-meta { font-size: 0.85rem; color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); padding-bottom: 0.6rem; margin-bottom: 0.6rem; }
.mailbox-attachments { font-size: 0.85rem; color: var(--color-text-muted); }
.mailbox-body { margin-bottom: 1rem; }

/* --- Check-in --- */
.scan-panel { background: var(--color-surface); padding: 1rem; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); margin-bottom: 1.5rem; }
.scan-panel .field-row { align-items: flex-end; gap: 1rem; }
.scan-panel .field { flex: 1; }
.scan-panel button { padding: 0.5rem 1.2rem; background: var(--color-primary); color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.scan-warning { color: #b45309; }
.row-unverified { background: #fff7ed; }

/* --- Ambassadors --- */
.ambassadors-page code { background: var(--color-bg); padding: 0.1rem 0.4rem; border-radius: 3px; }

/* --- Badges (suggestions, contests) --- */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 10px; background: var(--color-bg); color: var(--color-text-muted); }
.badge-new { background: #dbeafe; color: var(--color-primary-dark); }
.badge-progress { background: #fef3c7; color: #92400e; }
.badge-done { background: #dcfce7; color: #166534; }
.badge-success { background: #e3f6e9; color: var(--color-success); }
.badge-danger { background: #fbe7e7; color: var(--color-danger); }
.badge-warning { background: #fdf3d8; color: var(--color-warning); }
.link-remove { background: none; border: none; cursor: pointer; color: inherit; font-size: 0.7rem; padding: 0; }

/* --- Contests --- */
.add-result-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.8rem; padding: 0.6rem; background: var(--color-bg); border-radius: 6px; }
.add-result-row input { padding: 0.4rem; border: 1px solid var(--color-border); border-radius: 4px; }
.add-result-row button { padding: 0.4rem 0.8rem; border-radius: 4px; cursor: pointer; }

/* --- Audit --- */
.badge-danger { background: #fee2e2; color: #b91c1c; }
.menu-access-page select { padding: 0.4rem; border: 1px solid var(--color-border); border-radius: 4px; }

/* --- Support --- */
.support-card { background: var(--color-surface); padding: 1.2rem; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); max-width: 420px; }
.support-card button { margin-top: 0.8rem; padding: 0.5rem 1rem; background: var(--color-primary); color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.support-card button.danger { background: var(--color-danger); }

/* --- Person portal --- */
.person-portal-menu-wrap { position: relative; }
.person-portal-menu-overlay { position: fixed; inset: 0; z-index: 9; background: transparent; }
.person-portal-menu {
	position: absolute; top: calc(100% + 0.25rem); left: 0;
	background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
	display: flex; flex-direction: column; min-width: 200px; z-index: 10; overflow: hidden;
}
.person-portal-menu a { padding: 0.6rem 1rem; color: var(--color-text); text-decoration: none; font-size: 0.9rem; }
.person-portal-menu a:hover { background: var(--color-bg, #f5f6f8); }
.person-portal-menu a.active { font-weight: 600; background: var(--color-primary-soft, #eef3ff); }
.portal-card { background: var(--color-surface); padding: 1rem; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); margin-bottom: 1rem; }
.portal-card h2 { margin-top: 0; font-size: 1rem; }
.portal-alert { border-left: 4px solid var(--color-danger); }
.portal-event-row { display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid var(--color-border); }
.portal-card button { background: var(--color-primary); color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; }

/* --- Kiosk --- */
.kiosk-page { max-width: 640px; margin: 0 auto; padding-top: 2rem; text-align: center; }
.kiosk-page h1 { font-size: 1.8rem; }
.kiosk-page .back-link { display: inline-block; margin-bottom: 1rem; }
.kiosk-menu { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.kiosk-tile { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; width: 160px; padding: 1.5rem 1rem; background: var(--color-surface); border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); text-decoration: none; color: var(--color-text); font-size: 1.1rem; }
.kiosk-tile-icon { font-size: 2.5rem; }
.kiosk-card { background: var(--color-surface); padding: 1.5rem; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); text-align: left; margin-bottom: 1rem; }
.kiosk-card button[type=submit] { width: 100%; margin-top: 1rem; padding: 0.7rem; background: var(--color-primary); color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 1rem; }
.qr-camera-video { width: 100%; max-height: 60vh; border-radius: 4px; background: #000; }
.kiosk-scan-choice { display: flex; flex-direction: column; gap: 0.75rem; }
.kiosk-scan-choice .btn { width: 100%; padding: 0.7rem; font-size: 1rem; text-align: center; }

/* --- Superadmin companies --- */
.superadmin-companies code { background: var(--color-bg); padding: 0.1rem 0.4rem; border-radius: 3px; }

/* --- Item debts (facturation caisse) --- */
.color-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--color-border); }

/* --- Card print --- */
.print-only { display: none; }
.card-page { display: grid; align-content: start; box-sizing: border-box; overflow: hidden; break-after: page; page-break-after: always; }
.card-page-back { direction: rtl; } /* colonnes inversées : le verso s'aligne sur le recto en recto/verso */
.card-page-back .member-card { direction: ltr; }
.member-card { border: 1px dashed #999; padding: 3mm; box-sizing: border-box; overflow: hidden; }
.member-card-logo-back { max-width: 80%; max-height: 60%; }
.member-card-name { font-weight: 600; font-size: 1.1rem; }
.member-card-barcode { font-family: monospace; letter-spacing: 0.1em; margin-top: 0.5rem; }
@media print {
    @page { size: A4; margin: 0; }
    .no-print { display: none !important; }
    .print-only { display: block !important; }
    .sidebar, .top-bar, .toolbar, .language-switcher, .help-fab, .help-overlay, .help-panel { display: none !important; }
    html, body { height: auto !important; background: #fff !important; }
    .layout { display: block !important; height: auto !important; }
    .main-content { display: block; overflow: visible !important; height: auto !important; padding: 0 !important; }
    .card { box-shadow: none; }
}

/* --- Landing (choix client/personnel/kiosque) --- */
.landing-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #2f6fed, #1e3a8a); padding: 1.5rem; }
.landing-card { background: var(--color-surface); padding: 2.5rem; border-radius: 12px; text-align: center; max-width: 480px; width: 100%; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.landing-card h1 { margin-top: 0; }
.landing-choices { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.landing-btn { display: block; font-size: 1.1rem; padding: 1rem; border-radius: 8px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); text-decoration: none; }
.landing-btn:hover { background: var(--color-bg); }
.landing-btn-primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.landing-btn-primary:hover { background: var(--color-primary-dark); }

/* --- Superadmin tabs --- */
.superadmin-tabs { padding: 0 1.5rem; background: #1f2937; border-bottom: 1px solid #374151; }
.superadmin-tabs .tab { color: #9ca3af; padding: 0.7rem 0.2rem; }
.superadmin-tabs .tab.active { color: #fff; border-bottom-color: var(--color-primary); }

/* --- My account / passkeys --- */
.account-link { color: #fff; text-decoration: none; }
.account-link:hover { text-decoration: underline; }
.my-account-page h2 { margin-top: 0; }

/* --- Passkey login button --- */
.passkey-btn { width: 100%; margin-top: 0.5rem; }

/* --- Superadmin support viewer --- */
.support-code { font-size: 1.6rem; letter-spacing: 0.2em; }
.support-video { width: 100%; max-width: 800px; background: #000; border-radius: 8px; margin: 1rem 0; display: block; }

/* --- Superadmin points --- */
.balance-line { font-size: 1.1rem; }
.transaction-form { align-items: flex-end; margin-bottom: 0.8rem; }
.transaction-form input { padding: 0.5rem; border: 1px solid var(--color-border); border-radius: 4px; width: 100%; }
.transaction-form button { padding: 0.5rem 1rem; background: var(--color-primary); color: #fff; border: none; border-radius: 4px; cursor: pointer; height: fit-content; }
.amount-positive { color: var(--color-success); font-weight: 600; }
.amount-negative { color: var(--color-danger); font-weight: 600; }

/* --- Settings links/export --- */
.settings-links { align-items: center; gap: 1rem; }
.settings-links button.secondary { padding: 0.5rem 1rem; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: 4px; cursor: pointer; }

/* --- QR code component --- */
.qr-code-box { display: flex; justify-content: center; margin: 0.8rem 0; }
.qr-code-box img { image-rendering: pixelated; }

/* --- Privacy policy --- */
.privacy-page { max-width: 720px; margin: 0 auto; padding: 2rem 1rem; }
.privacy-card { background: var(--color-surface); padding: 2rem; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.privacy-card h3 { margin-top: 1.5rem; }
.privacy-notice { font-size: 0.85rem; color: var(--color-text-muted); font-style: italic; }
.landing-privacy-link { margin-top: 1rem; font-size: 0.8rem; }
.landing-privacy-link a { color: var(--color-text-muted); }

/* --- Help panel --- */
.top-bar-actions { display: flex; align-items: center; gap: 0.6rem; }
.help-toggle-btn { width: 28px; height: 28px; border-radius: 50%; border: none; background: var(--color-text-muted); color: #fff; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.help-toggle-btn:hover { filter: brightness(1.15); }
.help-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.25); z-index: 999; }
.help-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 90vw); background: var(--color-surface); box-shadow: -4px 0 24px rgba(0,0,0,0.15); z-index: 1000; display: flex; flex-direction: column; overflow-y: auto; }
.help-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem 1rem; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; background: var(--color-surface); }
.help-panel-title { display: flex; align-items: center; gap: 0.6rem; }
.help-panel-title h2 { margin: 0; font-size: 1.1rem; }
.help-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--color-primary); color: #fff; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.help-close-btn { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: #6b7280; line-height: 1; padding: 0.25rem; }
.help-panel-body { padding: 1.25rem 1.5rem; flex: 1; }
.help-empty { color: #6b7280; font-style: italic; }
.help-section { margin-bottom: 1.25rem; }
.help-section h3 { margin: 0 0 0.4rem; font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-primary); }
.help-section p { margin: 0; font-size: 0.9rem; line-height: 1.6; white-space: pre-line; }
.help-panel-footer { padding: 1rem 1.5rem; border-top: 1px solid #e5e7eb; font-size: 0.8rem; color: #6b7280; }
.help-panel-footer kbd { background: var(--color-bg); border: 1px solid #e5e7eb; border-radius: 3px; padding: 0.1rem 0.35rem; font-family: monospace; }

/* --- Card print profiles --- */
.card-print-toolbar { align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.card-print-toolbar select { padding: 0.5rem; border: 1px solid var(--color-border); border-radius: 4px; }
.member-card-logo { max-width: 60%; max-height: 20mm; object-fit: contain; margin: 0 auto; display: block; }
.member-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; text-align: center; }

/* --- Duplicate warning --- */
.duplicate-warning { background: #fef3c7; color: #92400e; padding: 0.5rem 0.8rem; border-radius: 4px; font-size: 0.85rem; margin-bottom: 0.8rem; }

/* --- Person detail actions tab --- */
.action-row { gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.action-row input { padding: 0.5rem; border: 1px solid var(--color-border); border-radius: 4px; flex: 1; min-width: 200px; }
.action-row button { padding: 0.5rem 1rem; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: 4px; cursor: pointer; }

/* --- Checkout promo code --- */
.promo-row { gap: 0.5rem; margin-bottom: 0.5rem; }
.promo-row input { flex: 1; padding: 0.4rem; border: 1px solid var(--color-border); border-radius: 4px; }

/* --- Kiosk idle warning --- */
.kiosk-idle-warning { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: #1f2937; color: #fff; padding: 0.8rem 1.5rem; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); z-index: 1100; }

/* --- Mailbox attachments --- */
.attachment-link { background: none; border: 1px solid var(--color-border); border-radius: 4px; padding: 0.15rem 0.5rem; margin-left: 0.3rem; cursor: pointer; font-size: 0.85rem; }

/* --- Mail template attachments --- */
.attachment-list { list-style: none; padding: 0; margin: 0 0 0.8rem; }
.attachment-list li { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; }

/* --- Language switcher --- */
.language-switcher { padding: 0.3rem 0.5rem; border-radius: 4px; border: 1px solid var(--color-border); font-size: 0.85rem; }
.landing-lang { display: flex; justify-content: flex-end; margin-bottom: 0.5rem; }

/* --- Rich text editor --- */
.richtext-toolbar { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.3rem; }
.richtext-btn { padding: 0.3rem 0.6rem; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: 4px; cursor: pointer; font-size: 0.85rem; }
.richtext-content { min-height: 200px; border: 1px solid var(--color-border); border-radius: 4px; padding: 0.5rem; background: var(--color-surface); overflow-y: auto; font-size: 0.9rem; direction: ltr; }
.richtext-content:focus { outline: 2px solid #4a90d9; outline-offset: -1px; }

/* --- No-tenant landing page --- */
.no-tenant-page {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden auto;
  background: linear-gradient(135deg, #1e3a8a, #2f6fed, #172554);
  background-size: 200% 200%;
  animation: no-tenant-bg-shift 18s ease-in-out infinite;
  padding: 3rem 1.5rem;
}

@keyframes no-tenant-bg-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.no-tenant-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: no-tenant-float 14s ease-in-out infinite;
  pointer-events: none;
}
.no-tenant-blob-1 {
  width: 34vw;
  height: 34vw;
  min-width: 260px;
  min-height: 260px;
  background: #60a5fa;
  top: -10%;
  left: -8%;
  animation-duration: 16s;
}
.no-tenant-blob-2 {
  width: 28vw;
  height: 28vw;
  min-width: 220px;
  min-height: 220px;
  background: #a78bfa;
  bottom: -10%;
  right: -6%;
  animation-duration: 18s;
  animation-delay: -4s;
}
.no-tenant-blob-3 {
  width: 22vw;
  height: 22vw;
  min-width: 180px;
  min-height: 180px;
  background: #34d399;
  bottom: 15%;
  left: 6%;
  animation-duration: 12s;
  animation-delay: -2s;
}
.no-tenant-blob-4 {
  width: 18vw;
  height: 18vw;
  min-width: 150px;
  min-height: 150px;
  background: #f472b6;
  top: 10%;
  right: 14%;
  animation-duration: 15s;
  animation-delay: -7s;
}

@keyframes no-tenant-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.08); }
  66% { transform: translate(-20px, 25px) scale(0.95); }
}

.no-tenant-content {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  text-align: center;
  color: #fff;
}

.no-tenant-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  animation: no-tenant-rise 0.6s ease-out 0.05s forwards;
}

@keyframes no-tenant-rise {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.no-tenant-hero {
  margin: 0.75rem 0 0.5rem;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  opacity: 0;
  background: linear-gradient(90deg, #fff, #bfdbfe, #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    no-tenant-rise 0.6s ease-out 0.15s forwards,
    no-tenant-gradient 5s linear 0.7s infinite;
}

@keyframes no-tenant-gradient {
  to { background-position: 200% center; }
}

.no-tenant-subtitle {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.85);
  opacity: 0;
  animation: no-tenant-rise 0.6s ease-out 0.3s forwards;
}

.no-tenant-subtitle code {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.no-tenant-feature {
  display: flex;
  flex: 0 0 auto;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1.1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.no-tenant-feature:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.35);
}

.no-tenant-feature-icon {
  font-size: 1.6rem;
  line-height: 1;
  animation: no-tenant-bounce 2.4s ease-in-out infinite;
}

@keyframes no-tenant-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.no-tenant-feature p {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

@media (prefers-reduced-motion: reduce) {
  .no-tenant-page,
  .no-tenant-blob,
  .no-tenant-badge,
  .no-tenant-hero,
  .no-tenant-subtitle,
  .no-tenant-feature,
  .no-tenant-feature-icon {
    animation: none !important;
    opacity: 1 !important;
  }
}

.no-tenant-cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.no-tenant-cta:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

/* ---- Visite guidée animée de la page d'accueil ----
   Zone applicative = 64 x 37 em (1em = 1,5625 % de la largeur de la fenêtre) : tout est en em pour
   se mettre à l'échelle. Les positions du curseur (DemoPlayer.razor) sont exprimées dans ce repère.
   Convention : l'état de base d'un élément est son état FINAL ; les animations "both" partent d'un
   état masqué. .demo-eph = élément éphémère (masqué dans la vue sortante et en mouvement réduit). */
.demo { width: min(760px, 100%); margin: 1.75rem auto 0; text-align: left; }
.demo *, .demo *::before, .demo *::after { box-sizing: border-box; }

.demo-progress { display: flex; gap: 4px; margin-bottom: 0.7rem; }
.demo-progress-seg { flex: 1; height: 12px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.demo-progress-seg::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.25); }
.demo-progress-fill { position: absolute; left: 0; top: 4px; height: 4px; border-radius: 2px; background: #fff; width: 0; animation: demo-fill linear forwards; }
.demo-progress-done { width: 100%; animation: none; }
@keyframes demo-fill { from { width: 0; } to { width: 100%; } }

.demo-window {
  container-type: inline-size;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 90px rgba(96, 165, 250, 0.35);
}

.demo-chrome { display: flex; align-items: center; gap: 0.55em; height: 3em; padding: 0 1.2em; background: #e9edf3; font-size: 1.5625cqw; }
.demo-chrome > i { width: 0.9em; height: 0.9em; border-radius: 50%; background: #cbd5e1; }
.demo-chrome > i:nth-child(1) { background: #f87171; }
.demo-chrome > i:nth-child(2) { background: #fbbf24; }
.demo-chrome > i:nth-child(3) { background: #4ade80; }
.demo-url { position: relative; flex: 1; height: 2em; margin-left: 1em; border-radius: 99em; background: #fff; overflow: hidden; color: #475569; }
.demo-url span { position: absolute; inset: 0; padding: 0 1em; line-height: 2em; white-space: nowrap; }
.demo-url span::before { content: "🔒 "; font-size: 0.85em; }
.demo-url-out { animation: demo-fadeout 0.2s ease 0.9s forwards; }
.demo-url-in { animation: demo-fadein 0.35s ease 0.95s both; }

.demo-app { position: relative; height: 37em; font-size: 1.5625cqw; overflow: hidden; background: #f5f6f8; color: #1f2430; }

/* Menu latéral (même palette que la vraie Sidebar) */
.demo-side { position: absolute; left: 0; top: 0; bottom: 0; width: 15em; background: #171a21; color: #d7dae0; z-index: 3; }
.demo-side-head { height: 3.4em; line-height: 3.4em; padding: 0 1.2em; font-weight: 800; border-bottom: 1px solid #2a2e38; }
.demo-side-label { height: 1.6em; line-height: 1.6em; padding: 0 1.2em; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85em; }
.demo-nav { height: 2.3em; line-height: 2.3em; padding: 0 1.4em; margin: 0 0.5em 0 0.5em; border-radius: 0.5em; color: #b0b7c3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-nav-on { background: #2a2e38; color: #fff; box-shadow: inset 0.2em 0 0 #2f6fed; animation: demo-nav-on 0.3s ease 0.9s both; }
.demo-nav-off { animation: demo-nav-off 0.3s ease 0.9s both; }
@keyframes demo-nav-on { from { background: transparent; color: #b0b7c3; box-shadow: inset 0 0 0 #2f6fed; } }
@keyframes demo-nav-off { from { background: #2a2e38; color: #fff; box-shadow: inset 0.2em 0 0 #2f6fed; } to { background: transparent; color: #b0b7c3; box-shadow: inset 0 0 0 #2f6fed; } }
.demo-side-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.9em 1.2em; border-top: 1px solid #2a2e38; display: flex; align-items: center; gap: 0.6em; color: #94a3b8; }

.demo-main { position: absolute; left: 15em; right: 0; top: 0; bottom: 0; }
.demo-view { position: absolute; inset: 0; padding: 1.6em; background: #f5f6f8; }
.demo-view-in { z-index: 2; animation: demo-viewin 0.4s ease-out 0.9s both; }
.demo-view-out { z-index: 1; animation: demo-fadeout 0.3s ease-in 0.9s both; }
.demo-view-out * { animation: none !important; }
.demo-view-out .demo-eph { display: none !important; }
@keyframes demo-viewin { from { opacity: 0; transform: translateY(1.2em); } }
@keyframes demo-fadein { from { opacity: 0; } }
@keyframes demo-fadeout { to { opacity: 0; } }

/* Briques communes */
.demo-a { animation: demo-rise 0.5s ease-out var(--d, 0s) both; }
@keyframes demo-rise { from { opacity: 0; transform: translateY(0.8em); } }
.demo-title { display: flex; align-items: center; justify-content: space-between; height: 2.4em; margin-bottom: 1.2em; }
.demo-title > span:first-child { font-size: 1.7em; font-weight: 800; }
.demo-title-tools { display: flex; align-items: center; gap: 0.8em; }
.demo-search { padding: 0.5em 1em; border-radius: 99em; background: #fff; box-shadow: 0 0 0 1px #dfe3e8; color: #94a3b8; font-size: 0.85em; }
.demo-card { background: #fff; border-radius: 0.9em; box-shadow: 0 0 0 1px #dfe3e8, 0 0.2em 0.6em rgba(15, 23, 42, 0.05); }
.demo-btn { display: inline-grid; place-items: center; height: 2.4em; padding: 0 1.2em; border-radius: 0.6em; background: #2f6fed; color: #fff; font-weight: 700; white-space: nowrap; }
.demo-btn-sm { height: 2.2em; font-size: 0.85em; }
.demo-btn-block { display: grid; }
.demo-badge { display: inline-block; padding: 0.15em 0.7em; border-radius: 99em; font-size: 0.8em; font-weight: 700; white-space: nowrap; }
.demo-badge-blue { background: #dbeafe; color: #1e40af; }
.demo-badge-green { background: #dcfce7; color: #166534; }
.demo-badge-amber { background: #fef3c7; color: #92400e; }
.demo-avatar { display: inline-grid; place-items: center; width: 2.4em; height: 2.4em; border-radius: 50%; background: #2f6fed; color: #fff; font-size: 0.8em; font-weight: 700; }
.demo-avatar-lg { width: 3.6em; height: 3.6em; font-size: 1.1em; }
.demo-check { color: #1f9d55; font-weight: 700; }
.demo-line { display: flex; align-items: center; justify-content: space-between; gap: 1em; height: 2.6em; border-bottom: 1px solid #eef1f6; }
.demo-stack { display: grid; justify-items: center; }
.demo-stack > * { grid-area: 1 / 1; }
.demo-hide-at { animation: demo-fadeout 0.25s ease var(--d, 0s) forwards; }
.demo-pop { animation: demo-popin 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) var(--d, 0s) both; }
@keyframes demo-popin { from { opacity: 0; transform: scale(0.4); } }
.demo-toast { padding: 0.5em 1em; border-radius: 99em; background: #dcfce7; color: #166534; font-weight: 700; font-size: 0.9em; }

/* Curseur + ondulation de clic */
.demo-cursor { position: absolute; left: 0; top: 0; width: 2.2em; height: 2.2em; z-index: 20; pointer-events: none; filter: drop-shadow(0 0.2em 0.3em rgba(0, 0, 0, 0.35)); transform: translate(var(--x0), var(--y0)); animation: demo-cursor both; }
@keyframes demo-cursor {
  0% { transform: translate(var(--x0), var(--y0)); animation-timing-function: ease-in-out; }
  11% { transform: translate(var(--x1), var(--y1)); }
  20% { transform: translate(var(--x1), var(--y1)); animation-timing-function: ease-in-out; }
  33% { transform: translate(var(--x2), var(--y2)); }
  55% { transform: translate(var(--x2), var(--y2)); animation-timing-function: ease-in-out; }
  64% { transform: translate(var(--x3), var(--y3)); }
  100% { transform: translate(var(--x3), var(--y3)); }
}
.demo-ripple { position: absolute; z-index: 19; width: 3em; height: 3em; margin: -1.5em 0 0 -1.5em; border-radius: 50%; border: 0.2em solid #2f6fed; background: rgba(47, 111, 237, 0.2); opacity: 0; pointer-events: none; animation: demo-ripple 0.6s ease-out forwards; }
@keyframes demo-ripple { from { opacity: 0.95; scale: 0.2; } to { opacity: 0; scale: 1.4; } }

/* Tableau de bord */
.demo-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1em; height: 6em; }
.demo-kpi { display: flex; flex-direction: column; justify-content: center; padding: 0 1.1em; }
.demo-kpi small { color: #6b7280; font-size: 0.8em; }
.demo-kpi b { font-size: 1.9em; line-height: 1.15; }
.demo-kpi em { font-style: normal; font-size: 0.8em; font-weight: 700; color: #1f9d55; }
.demo-chartcard { position: relative; display: flex; align-items: flex-end; height: 20em; margin-top: 1.2em; padding: 1em; }
.demo-bars { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; width: 100%; height: 16em; }
.demo-barcell { display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.demo-b { width: 60%; height: var(--h); border-radius: 0.4em 0.4em 0 0; background: linear-gradient(180deg, #2f6fed, #1e54c0); transform-origin: bottom; animation: demo-bar 0.7s ease-out var(--d, 0s) both; }
.demo-barcell:nth-child(9) .demo-b { animation: demo-bar 0.7s ease-out var(--d, 0s) both, demo-barhl 0.3s ease 2.45s both; }
@keyframes demo-bar { from { transform: scaleY(0); } }
@keyframes demo-barhl { to { filter: hue-rotate(150deg) saturate(1.5); } }
.demo-tip { position: absolute; translate: -50% 0; padding: 0.4em 0.9em; border-radius: 0.5em; background: #0f172a; color: #fff; font-weight: 700; white-space: nowrap; }

/* Tableaux (personnes, paiements) */
.demo-table { background: #fff; border-radius: 0.8em; overflow: hidden; box-shadow: 0 0 0 1px #dfe3e8; }
.demo-tr { display: grid; align-items: center; height: 2.7em; border-top: 1px solid #eef1f6; }
.demo-tr > span { padding: 0 0.6em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-th { height: 2.4em; border-top: 0; background: #eef1f6; font-weight: 700; }
.demo-cols-people { grid-template-columns: 4em 1fr 1fr 1.3fr 5em; }
.demo-cols-pay { grid-template-columns: 6em 5.5em 1fr 6.5em 7.5em; }
.demo-dot { display: inline-block; width: 0.7em; height: 0.7em; border-radius: 50%; background: #1f9d55; margin-right: 0.3em; }
.demo-hl { animation: demo-rise 0.5s ease-out var(--d, 0s) both, demo-hl 0.3s ease var(--hd, 0s) both; }
@keyframes demo-hl { from { background: transparent; } to { background: #e0ebff; } }

/* Fiche personne */
.demo-panel { position: absolute; left: 24em; top: 4.2em; z-index: 4; width: 24em; height: 31em; overflow: hidden; border-radius: 0.9em; background: #fff; box-shadow: 0 1em 3em rgba(15, 23, 42, 0.3); }
.demo-slide { animation: demo-slide 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0s) both; }
@keyframes demo-slide { from { opacity: 0; transform: translateX(110%); } }
.demo-panel-head { display: flex; align-items: center; gap: 1em; height: 7em; padding: 0 1.2em; background: linear-gradient(135deg, #eaf1ff, #fff); }
.demo-panel-head strong { display: block; font-size: 1.15em; }
.demo-panel-head small { color: #6b7280; }
.demo-tabs { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; height: 2.4em; text-align: center; font-weight: 600; border-bottom: 1px solid #eef1f6; }
.demo-tabs > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 0.4em; }
.demo-tab-ind { position: absolute; bottom: 0; left: 33.333%; width: 33.333%; height: 0.25em; background: #2f6fed; animation: demo-tabslide 0.35s ease 4.6s both; }
@keyframes demo-tabslide { from { left: 0; } }
.demo-panel-body { position: relative; }
.demo-panel-body > div { position: absolute; left: 1.2em; right: 1.2em; top: 0.6em; }

/* Présences */
.demo-two { display: grid; gap: 2em; }
.demo-two-scan { grid-template-columns: 19em 1fr; }
.demo-two-cash { grid-template-columns: 24em 1fr; }
.demo-scancard { display: flex; flex-direction: column; align-items: center; height: 26em; padding-top: 2em; }
.demo-qr { position: relative; display: grid; grid-template-columns: repeat(11, 1fr); width: 11em; height: 11em; padding: 0.6em; overflow: hidden; border: 0.15em solid #cbd5e1; border-radius: 0.6em; background: #fff; }
.demo-qr i.on { background: #0f172a; }
.demo-qr-ok { animation: demo-qrok 0.5s ease 3.7s both; }
@keyframes demo-qrok { to { border-color: #22c55e; box-shadow: 0 0 1.4em rgba(34, 197, 94, 0.6); } }
.demo-scanline { position: absolute; left: 0; right: 0; top: 0; height: 0.3em; background: #22c55e; box-shadow: 0 0 1em #22c55e; opacity: 0; animation: demo-scan 0.6s ease-in-out 2.45s 2 alternate both; }
@keyframes demo-scan { 0% { top: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: calc(100% - 0.3em); opacity: 0; } }
.demo-scancard .demo-btn-block { width: 11em; height: 3em; margin-top: 2.8em; animation: demo-press 0.3s ease 2.4s both; }
@keyframes demo-press { 50% { scale: 0.93; filter: brightness(0.85); } }
.demo-list { height: 26em; padding: 1em 1.2em; }
.demo-list h4 { margin: 0 0 0.4em; font-size: 1em; }
.demo-newrow { overflow: hidden; animation: demo-expand 0.45s ease var(--d, 0s) both; }
.demo-newrow-ok { background: #ecfdf3; border-radius: 0.4em; padding: 0 0.5em; }
@keyframes demo-expand { from { max-height: 0; opacity: 0; } to { max-height: 2.6em; } }

/* Caisse */
.demo-tiles { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 6.5em 6.5em; gap: 1em; }
.demo-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15em; border-radius: 0.9em; background: #fff; box-shadow: 0 0 0 1px #dfe3e8; }
.demo-tile-icon { font-size: 1.8em; line-height: 1.1; }
.demo-tile small { color: #2f6fed; font-weight: 700; font-size: 0.95em; }
.demo-tile-hit { animation: demo-rise 0.5s ease-out var(--d, 0s) both, demo-tilehit 0.45s ease 2.4s both; }
@keyframes demo-tilehit { 50% { scale: 0.93; background: #e0ebff; } to { box-shadow: 0 0 0 2px #2f6fed; } }
.demo-ticket { position: relative; height: 26em; padding: 1.2em; }
.demo-ticket h4 { margin: 0 0 0.5em; font-size: 1em; }
.demo-total { font-weight: 800; border-bottom: 0; }
.demo-btn-cash { position: absolute; left: 2.4em; right: 2.4em; bottom: 1em; height: 3em; animation: demo-cash 0.5s ease 4.55s both; }
@keyframes demo-cash { 40% { scale: 0.93; } to { background: #1f9d55; } }
.demo-stamp.demo-a { position: absolute; right: 1.4em; top: 9em; padding: 0.3em 0.9em; border: 0.3em solid #16a34a; border-radius: 0.6em; background: rgba(255, 255, 255, 0.9); color: #16a34a; font-size: 1.4em; font-weight: 900; rotate: -8deg; animation: demo-stampin 0.35s ease-out var(--d, 0s) both; }
@keyframes demo-stampin { from { opacity: 0; scale: 2.4; } }

/* Agenda */
.demo-week { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: 2.4em repeat(4, 5.6em); overflow: visible; border-radius: 0.8em; background-color: #fff; background-image: linear-gradient(90deg, transparent calc(100% - 1px), #eef1f6 0); background-size: 20% 100%; box-shadow: 0 0 0 1px #dfe3e8; }
.demo-day { display: grid; place-items: center; background: #eef1f6; font-weight: 700; }
.demo-day:first-child { border-top-left-radius: 0.8em; }
.demo-day:nth-child(5) { border-top-right-radius: 0.8em; }
.demo-slot { position: relative; display: flex; flex-direction: column; justify-content: center; margin: 0.3em; padding: 0 0.8em; border-radius: 0.6em; color: #fff; box-shadow: 0 0.2em 0.5em rgba(15, 23, 42, 0.2); }
.demo-slot small { opacity: 0.9; }
.demo-popover { position: absolute; left: 55%; top: 65%; z-index: 6; display: flex; flex-direction: column; gap: 0.3em; width: 11em; padding: 0.8em 1em; border-radius: 0.7em; background: #fff; color: #1f2430; box-shadow: 0 0.6em 2em rgba(15, 23, 42, 0.35); }
.demo-popover .demo-badge { align-self: flex-start; }

/* Légende + bouton lecture */
.demo-caption { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; color: #fff; }
.demo-caption-text { flex: 1; }
.demo-caption strong { font-size: 1.25rem; }
.demo-caption p { margin: 0.25rem 0 0; font-size: 0.95rem; opacity: 0.88; }
.demo-play { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.15); color: #fff; cursor: pointer; }
.demo-play:hover { background: rgba(255, 255, 255, 0.3); }

.demo-paused .demo-progress-fill, .demo-paused .demo-window, .demo-paused .demo-window * { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .demo *, .demo *::before, .demo *::after { animation: none !important; }
  .demo-cursor, .demo-ripple, .demo-view-out, .demo-url-out, .demo-eph { display: none !important; }
}

/* ---- Page d'accueil : démo à gauche, fonctionnalités en colonne à droite ---- */
.no-tenant-page { align-items: safe center; }
.no-tenant-content > .no-tenant-subtitle { max-width: 760px; margin-left: auto; margin-right: auto; }

.no-tenant-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
  text-align: left;
}

.no-tenant-stage .demo { width: 100%; max-width: 820px; margin: 0 auto; }

.no-tenant-features { display: flex; flex-direction: column; gap: 0.9rem; }

.no-tenant-feature { opacity: 0; animation: no-tenant-rise 0.6s ease-out forwards; }
.no-tenant-feature:nth-child(1) { animation-delay: 0.3s; }
.no-tenant-feature:nth-child(2) { animation-delay: 0.45s; }
.no-tenant-feature:nth-child(3) { animation-delay: 0.6s; }
.no-tenant-feature:nth-child(4) { animation-delay: 0.75s; }

@media (max-width: 1000px) {
  .no-tenant-stage { grid-template-columns: 1fr; }
  .no-tenant-features { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .no-tenant-features { grid-template-columns: 1fr; }
}

/* Compacte l'en-tête pour que démo + fonctionnalités tiennent dans un écran */
@media (min-width: 1001px) {
  .no-tenant-page { padding: 1.25rem 1.5rem; }
  .no-tenant-hero { margin: 0.4rem 0 0.25rem; font-size: clamp(2rem, 4vw, 3rem); }
  .no-tenant-cta { margin-top: 0.9rem; }
  .no-tenant-stage { margin-top: 1.1rem; }
  .no-tenant-stage .demo { max-width: min(740px, max(360px, calc((100vh - 360px) * 1.6))); }
  .no-tenant-content > .no-tenant-subtitle { max-width: 1000px; font-size: 0.9rem; }
  .no-tenant-stage .demo-caption p { font-size: 0.9rem; }
}

/* Les blobs décoratifs sont clippés dans leur propre calque : sinon ils élargissent la zone
   défilante de la page et font apparaître une barre de défilement même quand tout tient. */
.no-tenant-blobs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }

/* Fiche personne : champs et listes déroulantes à hauteur identique (le rendu natif d'un <select>
   diffère de quelques pixels de celui d'un <input> selon le navigateur). */
.person-form .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { height: 2.25rem; box-sizing: border-box; }

/* Toutes les listes déroulantes de l'interface ont la même hauteur (le rendu natif d'un <select>
   varie selon le navigateur). Exceptions volontaires : listes à choix multiple / à taille, le
   sélecteur de langue de la barre (.language-switcher) et les listes intégrées à un tableau
   (.select-compact). */
select:not([multiple]):not([size]):not(.language-switcher):not(.select-compact) { height: 2.25rem; box-sizing: border-box; }

/* Barre de filtres : boutons d'action alignés sur les champs de leur ligne (même hauteur, et même
   marge basse que .field, sinon ils sont décalés vers le bas). */
.field-actions { display: flex; gap: 0.5rem; align-self: flex-end; margin-bottom: 1rem; }
.field-actions .btn { height: 2.25rem; box-sizing: border-box; padding-top: 0; padding-bottom: 0; white-space: nowrap; }
.filter-bar .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { height: 2.25rem; box-sizing: border-box; }
