/* Asso Services — Design system moderne */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --font: 'Inter', system-ui, -apple-system, sans-serif;

    --color-bg: #f1f5f9;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-border-hover: #cbd5e1;

    --color-text: #0f172a;
    --color-text-muted: #64748b;
    --color-text-subtle: #94a3b8;

    --color-primary: #6366f1;
    --color-primary-hover: #4f46e5;
    --color-primary-light: #eef2ff;
    --color-primary-ring: rgba(99, 102, 241, 0.25);

    --color-sidebar: #0f172a;
    --color-sidebar-hover: #1e293b;
    --color-sidebar-text: #94a3b8;
    --color-sidebar-active: #ffffff;

    --color-success: #10b981;
    --color-success-bg: #ecfdf5;
    --color-success-border: #a7f3d0;

    --color-error: #ef4444;
    --color-error-bg: #fef2f2;
    --color-error-border: #fecaca;

    --color-warning: #f59e0b;
    --color-warning-bg: #fffbeb;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);

    --banner-text: #ffffff;
    --banner-text-opacity: 0.85;
    --banner-link: #ffffff;
    --banner-link-hover: #e0e7ff;

    --sidebar-width: 260px;
    --transition: 0.18s ease;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

body.body--app {
    overflow-x: hidden;
}

/* ── Layout authentifié ── */
.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--color-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar__logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), #8b5cf6);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar__logo svg { width: 20px; height: 20px; color: #fff; }

.sidebar__logo img,
.auth-layout__hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.sidebar__logo:has(img) {
    background: transparent;
}

.auth-layout__hero-logo:has(img) {
    width: auto;
    min-width: 48px;
    max-width: 160px;
    height: 48px;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.12);
}

.main .auth-layout__hero-logo:has(img) {
    max-width: 160px;
    height: 48px;
}

.main .auth-layout__hero-logo img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.branding-preview {
    margin-bottom: 1rem;
}

.branding-preview__logo {
    max-width: 180px;
    max-height: 80px;
    object-fit: contain;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    background: #fff;
}

.color-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.color-field input[type="color"] {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: none;
}

.color-field input[type="text"] {
    flex: 1;
}

.form-hint {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.radio-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.radio-card:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.radio-card input {
    margin-top: 0.2rem;
}

.radio-card strong {
    display: block;
    margin-bottom: 0.15rem;
}

.input-inline {
    width: 100%;
    min-width: 120px;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font: inherit;
}

.input-inline--amount {
    max-width: 90px;
}

.checkbox--inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.cotisation-type-row__fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.cotisation-type-row__name {
    flex: 1 1 160px;
    margin: 0;
}

.cotisation-type-row__amount {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.cotisation-type-list__item {
    align-items: flex-start;
}

.cotisation-type-list__body {
    flex: 1 1 auto;
    min-width: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.profile-badges,
.governance-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.form-row--checkboxes {
    align-items: flex-start;
}

.form-row--checkboxes .checkbox {
    flex: 1 1 220px;
}

.sidebar__title {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.sidebar__subtitle {
    font-size: 0.7rem;
    color: var(--color-sidebar-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar__nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.sidebar__context {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.association-switcher__label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-subtle);
    margin-bottom: 0.4rem;
}

.association-switcher select {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--color-sidebar-hover);
    color: #e2e8f0;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.association-switcher__current {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__section-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-subtle);
    padding: 0.5rem 0.75rem 0.35rem;
    margin-top: 0.5rem;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.875rem;
    border-radius: var(--radius-sm);
    color: var(--color-sidebar-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    margin-bottom: 2px;
}

.sidebar__link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar__link:hover {
    background: var(--color-sidebar-hover);
    color: #e2e8f0;
}

.sidebar__link--active {
    background: rgba(99, 102, 241, 0.2);
    color: var(--color-sidebar-active);
}

.sidebar__link--active svg { opacity: 1; color: #a5b4fc; }

.sidebar__footer {
    flex-shrink: 0;
    padding: 0.65rem 0.85rem 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
}

.app-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.68rem;
    line-height: 1.35;
}

.app-meta--sidebar {
    margin: 0 0 0.6rem;
    padding: 0.45rem 0.5rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-meta--sidebar .app-meta__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.4rem;
    color: var(--color-sidebar-text);
    font-size: 0.64rem;
    line-height: 1.45;
}

.app-meta__version {
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.app-meta--sidebar .app-meta__version {
    color: #f1f5f9;
}

.app-meta__sep {
    color: rgba(148, 163, 184, 0.55);
    user-select: none;
}

.app-meta--sidebar .app-meta__author {
    color: #94a3b8;
    white-space: nowrap;
}

.app-meta--auth {
    margin-top: 1.25rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    border: 1px solid var(--color-border, #e2e8f0);
}

.app-meta--auth .app-meta__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.3rem 0.45rem;
    width: 100%;
    text-align: center;
    color: #64748b;
    font-size: 0.7rem;
    line-height: 1.5;
}

.app-meta--auth .app-meta__version {
    color: #334155;
    font-weight: 600;
}

.app-meta--auth .app-meta__author {
    color: #64748b;
}

.app-meta--auth .app-meta__sep {
    color: #cbd5e1;
}

.app-meta--auth .app-meta__license a {
    color: #4f46e5;
}

.app-meta--auth .app-meta__license a:hover {
    color: #4338ca;
}

.app-meta__license a {
    color: #a5b4fc;
    text-decoration: none;
    white-space: nowrap;
}

.app-meta__license a:hover {
    color: #c7d2fe;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sidebar__user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.25rem 0;
    border-radius: var(--radius-sm);
}

.sidebar__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar__user-info { flex: 1; min-width: 0; }

.sidebar__user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__user-role {
    font-size: 0.72rem;
    color: var(--color-sidebar-text);
}

.sidebar__logout,
button.sidebar__logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--color-sidebar-text);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    flex-shrink: 0;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.sidebar__logout:hover,
button.sidebar__logout:hover {
    background: var(--color-sidebar-hover);
    color: #fca5a5;
}

.sidebar__logout svg,
button.sidebar__logout svg { width: 16px; height: 16px; }

.logout-form--inline {
    display: inline;
}

.link-button {
    border: none;
    background: none;
    padding: 0;
    color: var(--color-primary);
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    font-size: inherit;
}

.link-button:hover {
    color: var(--color-primary-dark, #1d4ed8);
}

.app-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.mobile-topbar {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 0.65rem 2rem;
    background: rgba(241, 245, 249, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
}

.app-topbar__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.app-topbar__sep {
    color: var(--color-text-subtle);
    font-size: 0.875rem;
    user-select: none;
}

.app-topbar__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition), background var(--transition);
}

.app-topbar__link svg {
    width: 1.125rem;
    height: 1.125rem;
}

.app-topbar__link:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.app-topbar__link--module {
    color: var(--color-text);
    font-weight: 600;
}

.app-topbar__link--module:hover {
    color: var(--color-primary);
}

.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
}

/* ── Layout auth (login / install) ── */
body.body--auth {
    background: var(--color-sidebar);
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-layout__hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    position: relative;
    overflow: hidden;
}

.auth-layout__hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.auth-layout__hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    pointer-events: none;
}

.auth-layout__hero-content {
    position: relative;
    z-index: 1;
}

.auth-layout__hero-logo {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--color-primary), #8b5cf6);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

.auth-layout__hero-logo svg { width: 28px; height: 28px; color: #fff; }

.auth-layout__hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 1rem;
}

.auth-layout__hero p {
    font-size: 1rem;
    color: #a5b4fc;
    margin: 0;
    max-width: 360px;
    line-height: 1.7;
}

.auth-layout__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--color-bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

.auth-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
}

.auth-card__subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0 0 1.75rem;
}

/* ── Page header ── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
    gap: 1rem;
}

.page-header__text {
    flex: 1 1 220px;
    min-width: 0;
}

.page-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 0.25rem;
    line-height: 1.2;
}

.page-header__text p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.page-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1 1 auto;
    justify-content: flex-end;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

/* ── Dashboard ── */
.welcome-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    color: var(--banner-text);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    top: -60px;
    right: -40px;
    pointer-events: none;
}

.welcome-banner h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
    position: relative;
    color: var(--banner-text);
}

.welcome-banner p {
    margin: 0;
    font-size: 0.95rem;
    position: relative;
    color: var(--banner-text);
    opacity: var(--banner-text-opacity);
}

.welcome-banner p a {
    opacity: 1;
    color: var(--banner-link);
}

.welcome-banner a {
    color: var(--banner-link);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.welcome-banner a:hover {
    color: var(--banner-link-hover);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), #8b5cf6);
    opacity: 0;
    transition: opacity var(--transition);
}

.dashboard-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dashboard-card:hover::before { opacity: 1; }

.dashboard-card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.dashboard-card__icon--users { background: #ede9fe; color: #7c3aed; }
.dashboard-card__icon--adherents { background: #dbeafe; color: #2563eb; }
.dashboard-card__icon--treasury { background: #d1fae5; color: #059669; }

.dashboard-card__icon svg { width: 22px; height: 22px; }

.dashboard-card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
}

.dashboard-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    flex: 1;
}

.dashboard-card__arrow {
    margin-top: 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dashboard-card__arrow svg { width: 14px; height: 14px; }

/* ── Forms ── */
.form label {
    display: block;
    margin-bottom: 1.1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="tel"],
.form textarea,
.form select {
    display: block;
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.65rem 0.875rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form input:focus,
.form textarea:focus,
.form select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-ring);
}

.form textarea { resize: vertical; min-height: 100px; }

.form--wide { max-width: 720px; }

.city-autocomplete__option:hover,
.city-autocomplete__option:focus {
    background: var(--color-primary-light, #eef2ff);
}

.participant-picker {
    margin-bottom: 1.25rem;
}

.participant-picker__selected {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    min-height: 2rem;
}

.participant-picker__empty {
    margin: 0;
    width: 100%;
}

.participant-picker__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    line-height: 1.3;
}

.participant-picker__chip-label {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.participant-picker__chip-sub {
    font-size: 0.75rem;
    color: var(--color-text-muted, #64748b);
}

.participant-picker__remove {
    border: none;
    background: transparent;
    color: var(--color-text-muted, #64748b);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.15rem;
}

.participant-picker__remove:hover {
    color: var(--color-danger, #b91c1c);
}

.participant-picker__add {
    position: relative;
}

.participant-picker__search-label {
    display: block;
    margin-bottom: 0;
}

.participant-picker__search {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
}

.participant-picker__suggestions {
    position: absolute;
    z-index: 40;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    max-height: 14rem;
    overflow-y: auto;
}

.participant-picker__option {
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.participant-picker__option:hover,
.participant-picker__option:focus {
    background: var(--color-primary-light, #eef2ff);
}

.participant-picker__option--create {
    padding: 0;
    cursor: default;
}

.participant-picker__option--create:hover,
.participant-picker__option--create:focus {
    background: transparent;
}

.participant-picker__create-link {
    display: block;
    padding: 0.55rem 0.85rem;
    color: var(--color-primary, #2563eb);
    font-weight: 500;
    text-decoration: none;
}

.participant-picker__create-link:hover {
    background: var(--color-primary-light, #eef2ff);
    text-decoration: underline;
}

.action-portal-permissions {
    margin-top: 1.5rem;
}

.action-portal-permissions__group + .action-portal-permissions__group {
    margin-top: 1.25rem;
}

.action-portal-permissions__title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.action-portal-permissions__table-wrap {
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
}

.action-portal-permissions__table {
    margin: 0;
}

.action-portal-permissions__check-col {
    width: 11rem;
    text-align: center;
}

.action-portal-permissions__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}

.action-portal-permissions__check input {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

.action-portal-permissions__empty {
    margin: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    overflow: visible;
}

.city-autocomplete {
    position: relative;
    display: block;
    width: 100%;
    z-index: 1;
}

.city-autocomplete:focus-within {
    z-index: 50;
}

.city-autocomplete__list {
    position: absolute;
    z-index: 60;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    max-height: 14rem;
    overflow-y: auto;
}

.city-autocomplete__option {
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.city-autocomplete__option:hover,
.city-autocomplete__option:focus {
    background: var(--color-bg);
}

fieldset {
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    background: var(--color-surface);
}

legend {
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0 0.5rem;
    color: var(--color-text);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-weight: 400;
}

.checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.checkbox--indent { margin-left: 1.75rem; font-size: 0.875rem; color: var(--color-text-muted); }

.permission-block {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.permission-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}

.btn:hover {
    background: var(--color-bg);
    border-color: var(--color-border-hover);
}

.btn--primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
}

.btn--primary:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--color-text-muted);
}

.btn--ghost:hover { background: var(--color-bg); color: var(--color-text); }

.btn--sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.btn--danger {
    color: var(--color-error);
    border-color: var(--color-error-border);
    background: var(--color-error-bg);
}

.btn--danger:hover {
    background: #fee2e2;
    border-color: #fecaca;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0;
}

.btn-link:hover { text-decoration: underline; }
.btn-link--danger { color: var(--color-error); }

/* ── Alerts ── */
.alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert--error {
    background: var(--color-error-bg);
    color: #991b1b;
    border: 1px solid var(--color-error-border);
}

.alert--success {
    background: var(--color-success-bg);
    color: #065f46;
    border: 1px solid var(--color-success-border);
}

.alert--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.maintenance-banner {
    background: #b91c1c;
    color: #fff;
    text-align: center;
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.4;
}

.auth-layout > .maintenance-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.maintenance-banner--block {
    border-radius: var(--radius-md, 8px);
}

.auth-layout--centered {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card--wide {
    max-width: 36rem;
    width: 100%;
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge--admin { background: #ede9fe; color: #5b21b6; }
.badge--user { background: #f1f5f9; color: #475569; }
.badge--active { background: var(--color-success-bg); color: #065f46; }
.badge--inactive { background: #f1f5f9; color: #94a3b8; }
.badge--pending { background: var(--color-warning-bg); color: #92400e; }
.badge--expired { background: var(--color-error-bg); color: #991b1b; }
.badge--neutral { background: #f1f5f9; color: #64748b; }

.table__row--cancelled td {
    color: #94a3b8;
}
.table__row--cancelled .table__name,
.table__row--cancelled .treasury-amount {
    text-decoration: line-through;
}
.table__row--cancelled .table__mono {
    text-decoration: none;
    color: #64748b;
}

.treasury-banked {
    color: #059669;
    font-weight: 700;
}
.treasury-banked-form {
    display: flex;
    justify-content: center;
    margin: 0;
}
.checkbox--solo {
    margin: 0;
    padding: 0;
}
.checkbox--solo input[type="checkbox"] {
    margin: 0;
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}
.table__center {
    text-align: center;
}

/* ── Tables ── */
.table-wrapper {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    padding: 0.875rem 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--color-border);
}

.table__sort {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.table__sort:hover {
    color: var(--color-primary);
}

.table__sort--active {
    color: var(--color-primary);
}

.table__sort-icon {
    font-size: 0.7rem;
    opacity: 0.7;
}

.table__sort--active .table__sort-icon {
    opacity: 1;
}

.table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr:hover td { background: #fafbfc; }

.table__name {
    font-weight: 600;
    color: var(--color-text);
}

.table__sub { font-size: 0.8rem; color: var(--color-text-muted); }

.table__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.table__empty {
    text-align: center;
    padding: 3rem 1.25rem !important;
    color: var(--color-text-muted);
}

.table__empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}

.inline-form { display: inline; }

/* ── Cards / détail ── */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.card {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}

.card h2 {
    margin: 0 0 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}

.card dl { margin: 0; }

.card dt {
    font-weight: 500;
    color: var(--color-text-subtle);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 1rem;
}

.card dt:first-child { margin-top: 0; }

.card dd {
    margin: 0.2rem 0 0;
    font-size: 0.95rem;
    color: var(--color-text);
}

.association-summary {
    margin-bottom: 1.5rem;
}

.association-summary__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.association-summary__header h2 {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
    text-transform: none;
    letter-spacing: normal;
    color: var(--color-text);
}

.association-summary__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
}

.association-summary__grid dt:first-child {
    margin-top: 0;
}

.association-summary__full {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .association-summary__grid {
        grid-template-columns: 1fr;
    }
}

.hint { color: var(--color-text-muted); font-size: 0.875rem; }

/* ── Profile header (fiche adhérent) ── */
.profile-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.profile-header__info {
    flex: 1 1 200px;
    min-width: 0;
}

.profile-header .page-header__actions {
    margin-left: auto;
}

.profile-header__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-header__info h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    letter-spacing: -0.02em;
}

.profile-header__info p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* ── Commentaires portail ── */
.comment-section {
    margin-top: 1.5rem;
}

.comment-list {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.comment-item {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.comment-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.comment-item__date {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.comment-item__body {
    color: var(--color-text);
    line-height: 1.55;
    white-space: pre-wrap;
}

.comment-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.portal-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.portal-empty h2 {
    margin: 0 0 0.5rem;
}

.portal-access-card {
    margin-top: 1.5rem;
}

.auth-card--wide {
    max-width: 520px;
}

.auth-card__mobile-brand {
    display: none;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    color: var(--color-text);
    font-weight: 600;
    font-size: 1rem;
}

.auth-card__mobile-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), #8b5cf6);
    flex-shrink: 0;
    overflow: hidden;
}

.auth-card__mobile-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-card__mobile-logo svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

.auth-card__footer-actions {
    margin-top: 1.25rem;
    text-align: center;
}

.btn--block {
    width: 100%;
    justify-content: center;
}

.logout-form--block {
    display: block;
    width: 100%;
}

.login-context-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.login-context-item {
    margin: 0;
}

.login-context-item__button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    text-align: left;
    min-height: 64px;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.login-context-item__button:hover,
.login-context-item__button:focus-visible {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    box-shadow: var(--shadow-sm);
    outline: none;
}

.login-context-item__text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.login-context-item__label {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-text);
    line-height: 1.3;
}

.login-context-item__description {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.login-context-item__chevron {
    flex-shrink: 0;
    color: var(--color-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-layout__hero { display: none; }
    .auth-layout__panel {
        min-height: 100vh;
        min-height: 100dvh;
        align-items: flex-start;
        padding: 1.25rem 1rem 2rem;
        padding-top: max(1.25rem, env(safe-area-inset-top));
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
    .auth-card,
    .auth-card--wide {
        max-width: none;
        padding: 1.5rem 1.15rem;
        border-radius: var(--radius-lg);
        box-shadow: none;
        border: none;
        background: transparent;
    }
    .auth-card__mobile-brand {
        display: flex;
    }
    .auth-card h2 {
        font-size: 1.6rem;
    }
    .auth-card__subtitle {
        font-size: 1rem;
        margin-bottom: 1.35rem;
    }
    .login-context-item__button {
        min-height: 72px;
        padding: 1.1rem 1rem;
        border-width: 1.5px;
        background: var(--color-surface);
    }
    .login-context-item__label {
        font-size: 1.15rem;
    }
    .login-context-item__description {
        font-size: 0.95rem;
    }
    .form input[type="text"],
    .form input[type="email"],
    .form input[type="password"],
    .form input[type="tel"],
    .form input[type="number"],
    .form input[type="search"],
    .form select,
    .form textarea {
        font-size: 16px; /* évite le zoom iOS */
        min-height: 48px;
    }
    .auth-card .btn {
        min-height: 48px;
        font-size: 1rem;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition);
        box-shadow: var(--shadow-lg);
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-backdrop.is-visible {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 95;
        background: rgba(15, 23, 42, 0.45);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .mobile-topbar {
        display: flex;
        align-items: center;
        padding: 0.5rem 0.75rem;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        position: sticky;
        top: 0;
        z-index: 80;
    }

    .mobile-topbar__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        padding: 0;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        background: var(--color-bg);
        color: var(--color-text);
        cursor: pointer;
        flex-shrink: 0;
    }

    .mobile-topbar__toggle svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .app-content { margin-left: 0; }
    .app-topbar { padding: 0.65rem 1rem; }
    .main {
        padding: 1rem 1rem 2rem;
        max-width: 100%;
    }

    .page-header { flex-direction: column; align-items: stretch; }
    .page-header__text h1 { font-size: 1.4rem; }
    .page-header__actions {
        justify-content: flex-start;
        width: 100%;
    }
    .profile-header .page-header__actions {
        margin-left: 0;
        width: 100%;
    }

    .welcome-banner { padding: 1.25rem 1.5rem; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-row, .detail-grid { grid-template-columns: 1fr; }

    .treasury-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .treasury-filters label {
        min-width: 0;
        width: 100%;
    }

    .treasury-filters__search {
        min-width: 0;
        max-width: none;
        flex: 1 1 100%;
        width: 100%;
    }

    .treasury-summary { grid-template-columns: 1fr; }

    .card { padding: 1.15rem; }

    .main img,
    .main video,
    .main iframe {
        max-width: 100%;
        height: auto;
    }

    .main .auth-layout__hero-logo img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        object-fit: contain;
    }

    .table { min-width: 640px; }
}

@media (max-width: 768px) {
    .category-inline-form__row {
        grid-template-columns: 1fr;
    }
}

.input-code {
    font-size: 1.5rem !important;
    letter-spacing: 0.35em;
    text-align: center;
    font-weight: 600;
}

code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.list-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.list-pagination__summary {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted, #64748b);
}

.list-pagination__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.list-pagination__per-page {
    display: flex;
    align-items: flex-end;
    margin: 0;
}

.list-pagination__per-page label {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.list-pagination__per-page select {
    margin-left: 0.35rem;
}

.list-pagination__nav {
    display: flex;
    gap: 0.5rem;
}

.list-pagination__nav [aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
}

.treasury-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.treasury-filters label {
    margin-bottom: 0;
    min-width: 140px;
}

.treasury-filters__search {
    flex: 1 1 260px;
    min-width: 220px;
    max-width: 420px;
}

.treasury-filters__search input[type="search"] {
    width: 100%;
}

.annuaire-type-select {
    display: block;
    margin-top: 0.35rem;
    min-width: 14rem;
    padding: 0.5rem 0.65rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-surface);
    cursor: pointer;
}

.annuaire-selection-count {
    font-weight: 500;
    color: var(--color-primary);
}

.table tr.annuaire-row--selected {
    background: var(--color-primary-light);
}

.table tr.annuaire-row--selected td {
    border-color: color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
}

.annuaire-copy-panel {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.annuaire-copy-panel__title {
    margin: 0 0 0.35rem;
    font-weight: 600;
}

.annuaire-copy-panel__hint {
    margin: 0 0 0.75rem;
}

.annuaire-copy-panel__field {
    display: block;
    width: 100%;
    min-height: 5rem;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.875rem;
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #0f172a;
    background: #fff;
    resize: vertical;
    box-sizing: border-box;
}

.annuaire-copy-panel__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.annuaire-copy-panel kbd {
    padding: 0.1rem 0.35rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-bg);
    font-size: 0.85em;
}

.treasury-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.treasury-summary__card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.treasury-summary__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.35rem;
}

.treasury-summary__value {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.treasury-summary__card--income .treasury-summary__value { color: #059669; }
.treasury-summary__card--expense .treasury-summary__value { color: #dc2626; }
.treasury-summary__card--balance .treasury-summary__value { color: var(--color-primary); }

.treasury-summary__dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.treasury-summary__metric {
    min-width: 0;
}
.treasury-summary__sublabel {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    margin-bottom: 0.2rem;
}
.treasury-summary__value--dual {
    font-size: 1.15rem;
    line-height: 1.2;
}

.treasury-summary__hint {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.35;
}

.treasury-amount { font-weight: 600; white-space: nowrap; }
.treasury-amount--income { color: #059669; }
.treasury-amount--expense { color: #dc2626; }

.payment-form {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.category-inline-form__row {
    display: grid;
    grid-template-columns: 1fr 80px auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 1.25rem;
}

.category-inline-form__order {
    width: 100%;
}

.category-inline-form__active {
    margin: 0;
    white-space: nowrap;
}

.bilan-result {
    text-align: center;
}

.bilan-result__amount {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5rem 0 0;
}

.bilan-result__amount--positive { color: #059669; }
.bilan-result__amount--negative { color: #dc2626; }

.btn--help {
    min-width: 2.25rem;
    padding: 0.35rem 0.65rem;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    text-align: center;
}

.help-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.help-nav {
    position: sticky;
    top: 1rem;
    padding: 1rem 0;
}

.help-nav__title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    margin: 0 1.25rem 0.75rem;
}

.help-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.help-nav__link {
    display: block;
    padding: 0.5rem 1.25rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.help-nav__link:hover {
    background: var(--color-surface-muted);
    text-decoration: none;
}

.help-nav__link--active {
    background: var(--color-surface-muted);
    border-left-color: var(--color-primary);
    font-weight: 600;
    color: var(--color-primary);
}

.help-content {
    padding: 1.5rem 2rem;
    max-width: none;
}

.help-content h2 {
    font-size: 1.35rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.help-content h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--color-text);
}

.help-content h4 {
    font-size: 1rem;
    margin: 1.25rem 0 0.5rem;
}

.help-content p {
    margin: 0 0 1rem;
    line-height: 1.65;
    color: var(--color-text);
}

.help-content .help-list {
    margin: 0 0 1rem 1.25rem;
    line-height: 1.65;
}

.help-content .help-list li {
    margin-bottom: 0.35rem;
}

.help-content blockquote {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--color-primary);
    background: var(--color-surface-muted);
    border-radius: 0 6px 6px 0;
}

.help-content blockquote p {
    margin: 0;
}

.help-content hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 1.5rem 0;
}

.help-content a {
    color: var(--color-primary);
}

.help-table-wrap {
    overflow-x: auto;
    margin: 0 0 1rem;
}

.help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.help-table th,
.help-table td {
    border: 1px solid var(--color-border);
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.help-table th {
    background: var(--color-surface-muted);
    font-weight: 600;
}

@media (max-width: 900px) {
    .help-layout {
        grid-template-columns: 1fr;
    }

    .help-nav {
        position: static;
    }
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-list__item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    cursor: pointer;
}

.checkbox-list__item input {
    margin-top: 0.25rem;
}

.checkbox-list__item span {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9375rem;
}

.rich-text-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.rich-text-editor {
    min-height: 180px;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fff;
    line-height: 1.5;
}

.rich-text-editor:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

.rich-text-plain {
    display: block;
    width: 100%;
    min-height: 12rem;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font: inherit;
    line-height: 1.6;
    resize: vertical;
    background: #fff;
}

.rich-text-plain--lg {
    min-height: 22rem;
}

.meeting-form .form-group {
    width: 100%;
}

.meeting-form .rich-text-plain {
    width: 100%;
    max-width: none;
}

.rich-text-sync-field {
    display: block;
    width: 100%;
    height: 1px;
    padding: 0;
    margin: 0;
    border: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

textarea.rich-text-editor {
    display: block;
    width: 100%;
    min-height: 180px;
    resize: vertical;
    font: inherit;
    line-height: 1.5;
}

.rich-text-display {
    line-height: 1.6;
}

.rich-text-display ul,
.rich-text-display ol {
    margin: 0.5rem 0 0.5rem 1.25rem;
}

.rich-text-display h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.05rem;
}

.module-order-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.module-order-list__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.module-order-list__handle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 1;
    user-select: none;
}

.module-order-list__label {
    flex: 1;
    font-weight: 500;
}

.module-order-list__actions {
    display: flex;
    gap: 0.25rem;
}

.vat-subject-fields {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.75rem;
}

.vat-tracking-panel {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--color-border, #d8dee4);
    background: var(--color-surface-muted, #f6f8fa);
}

.vat-tracking-panel h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.vat-tracking-panel--warning {
    border-color: #d4a017;
    background: #fff8e6;
}

.vat-tracking-panel--critical,
.vat-tracking-panel--exceeded {
    border-color: #c62828;
    background: #ffebee;
}

.action-picker__search-label {
    display: block;
    margin-top: 1rem;
}

.action-picker__search {
    width: 100%;
    margin-top: 0.35rem;
}

.action-picker__suggestions {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    border: 1px solid var(--color-border, #d8dee4);
    border-radius: 8px;
    background: #fff;
    max-height: 18rem;
    overflow-y: auto;
}

.action-picker__list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.action-picker__item {
    display: block;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border, #d8dee4);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.action-picker__item:hover,
.action-picker__item:focus {
    border-color: var(--color-primary, #2563eb);
    background: var(--color-surface-muted, #f6f8fa);
}

.action-picker__item-title {
    display: block;
    font-weight: 600;
}

.action-picker__item-meta {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.9rem;
    color: var(--color-text-muted, #57606a);
}

.action-picker__option--empty {
    padding: 0.75rem 1rem;
    color: var(--color-text-muted, #57606a);
}

.action-picker__results-title {
    margin-top: 1rem;
}

/* ── Documentation publique (sans connexion) ── */
body.body--help-public {
    background: var(--color-bg);
}

.help-public-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.help-public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.875rem 1.5rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.help-public-header__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.help-public-header__brand:hover {
    color: inherit;
    text-decoration: none;
}

.help-public-header__brand strong {
    display: block;
    font-size: 0.95rem;
}

.help-public-header__brand small {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.help-public-header__logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-primary), #8b5cf6);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.help-public-header__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.adhesion-apply-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.adhesion-apply-header__logo {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: grid;
    place-items: center;
}

.adhesion-apply-header__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.adhesion-apply-header__title {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
}

.manifestation-public-image {
    margin: 0 0 1rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.manifestation-public-image img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
}

.help-public-header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.help-public-main {
    flex: 1;
    width: min(100% - 2rem, 1200px);
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
}

.help-public-notice {
    margin-bottom: 1rem;
}

.auth-card__footer-link {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.9rem;
}

.auth-card__footer-link a {
    color: var(--color-primary);
    font-weight: 500;
}

.auth-card__forgot {
    margin: -0.25rem 0 0;
    text-align: right;
    font-size: 0.875rem;
}

.auth-card__forgot a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.auth-card__forgot a:hover {
    text-decoration: underline;
}
