/* Pied de sidebar — compte, menu (doc / nouveautés / paramètres), modales */

/* ── Select inputs (settings modal) ── */
.aionos-select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    appearance: none;
    cursor: pointer;
}
.aionos-select:focus {
    outline: none;
    border-color: rgba(76, 165, 204, 0.4);
}
.aionos-select option {
    background: #0f1d32;
    color: #fff;
}

.sidebar-footer {
    position: relative;
    flex-wrap: wrap;
}

.sidebar-footer[data-aionos-footer] {
    justify-content: space-between;
    align-items: center;
}

.sidebar-footer-pp {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    margin: 0;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    text-decoration: none;
    transition: background 0.2s ease;
}
.sidebar-footer-pp,
.sidebar-footer-pp:hover,
.sidebar-footer-pp:focus,
.sidebar-footer-pp:active,
.sidebar-footer-pp:visited,
.sidebar-footer-pp * { text-decoration: none !important; }

.sidebar-footer-pp:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-footer-pp-inner {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.sidebar-footer-pp-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-footer-pp-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-footer-pp-name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 132px;
}

.sidebar-footer-pp-sub {
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.sidebar.collapsed .sidebar-footer-pp-text,
.sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .sidebar-footer-pp-text {
    display: none;
}

.sidebar.collapsed .sidebar-footer-pp,
.sidebar.sidebar--hover-expand:not(:hover):not(.sidebar--pinned) .sidebar-footer-pp {
    flex: 0;
    padding: 0.35rem;
}

.sidebar-footer-dropdown {
    position: fixed;
    left: 0.75rem;
    bottom: 72px;
    width: 220px;
    z-index: 1100;
    padding: 6px;
    border-radius: 12px;
    background: rgba(14, 26, 46, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    animation: aionos-dd-in 0.18s ease;
}

@keyframes aionos-dd-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-footer-dd-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    font-family: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

a.sidebar-footer-dd-item:hover,
.sidebar-footer-dd-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-footer-dd-item--accent {
    color: rgba(124, 196, 230, 0.95);
}

.sidebar-footer-dd-sep {
    height: 1px;
    margin: 6px 4px;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-footer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1099;
    background: transparent;
}

/* Modales AIONOS */
.aionos-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(4, 10, 22, 0.72);
    backdrop-filter: blur(8px);
}

.aionos-modal-overlay.is-open {
    display: flex;
    animation: aionos-modal-bg 0.2s ease;
}

@keyframes aionos-modal-bg {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.aionos-modal {
    width: 100%;
    max-width: 420px;
    max-height: min(90vh, 560px);
    overflow-y: auto;
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(18, 32, 58, 0.98), rgba(10, 20, 38, 0.99));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.aionos-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.aionos-modal-head h2 {
    margin: 0;
    font-family: 'Alike', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

.aionos-modal-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.aionos-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.aionos-modal-body {
    padding: 1.25rem;
}

.aionos-field {
    margin-bottom: 1rem;
}

.aionos-field label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.4rem;
}

.aionos-field input[type='text'],
.aionos-field input[type='email'] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
}

.aionos-field input:disabled {
    opacity: 0.55;
}

.aionos-avatar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.aionos-avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 54, 140, 0.5), rgba(76, 165, 204, 0.45));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.aionos-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aionos-btn-secondary {
    padding: 8px 14px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
}

.aionos-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.aionos-btn-primary {
    width: 100%;
    margin-top: 0.5rem;
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #5b21b6);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.aionos-btn-primary:hover {
    opacity: 0.92;
}

.aionos-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1.45;
    margin-top: 0.75rem;
}

.aionos-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.aionos-toggle-row span {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.85);
}

.aionos-toggle-row input[type='checkbox'] {
    width: 18px;
    height: 18px;
    accent-color: #7c3aed;
}

/* Chat — avatar utilisateur (messages) */
.message-avatar.user.aionos-user-avatar-wrap {
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.message-avatar.user .aionos-user-avatar-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.message-avatar.user .aionos-user-avatar-initial {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 100%);
    color: #fff;
    border-radius: 12px;
}

/* Communauté — petite pastille auteur */
.card-author-avatar {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(0, 54, 140, 0.7), rgba(76, 165, 204, 0.6));
    color: #fff;
    vertical-align: middle;
    margin-right: 6px;
}

.card-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px;
}

.card-meta .card-author-line {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.post-create-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* ── Danger item in dropdown ── */
.sidebar-footer-dd-item--danger {
    color: rgba(239, 68, 68, 0.85);
}
.sidebar-footer-dd-item--danger:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

/* ── Modal section title ── */
.aionos-modal-section-title {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 0.65rem;
    margin-top: 0.25rem;
}

/* ── Profile hero (account modal) ── */
.aionos-profile-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 1.25rem;
}

.aionos-profile-hero-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.aionos-profile-hero-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aionos-profile-hero-email {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Avatar large (account modal hero) ── */
.aionos-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 54, 140, 0.85), rgba(76, 165, 204, 0.75));
}

/* ── Avatar preview small (avatar picker row) ── */
.aionos-avatar-preview-sm {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 54, 140, 0.7), rgba(76, 165, 204, 0.6));
}

/* ── Badges (role) ── */
.aionos-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    width: fit-content;
    margin-top: 2px;
}

.aionos-badge--admin {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* ── Field hint & warning ── */
.aionos-field-hint {
    font-size: 0.7rem;
    color: rgba(76, 165, 204, 0.75);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.aionos-field-warning {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 6px;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 0.75rem;
    color: rgba(245, 158, 11, 0.9);
    line-height: 1.4;
}

.aionos-field-warning svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #f59e0b;
}

/* ── Ghost button variant ── */
.aionos-btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
}
.aionos-btn-ghost:hover {
    background: rgba(239, 68, 68, 0.07);
    border-color: rgba(239, 68, 68, 0.2);
    color: rgba(239, 68, 68, 0.8);
}

/* ── Limits modal hero ── */
.aionos-limits-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.aionos-limits-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.aionos-limits-loading {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ── Limit row + bar ── */
.aionos-limit-row {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.aionos-limit-label {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.aionos-limit-sep {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
    margin: 0 1px;
}

.aionos-limit-bar-wrap {
    height: 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.aionos-limit-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease, background 0.3s ease;
    background: linear-gradient(90deg, #8b5cf6, #5b21b6);
}

.aionos-limit-reset {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.4rem;
}

/* ── Plan card ── */
.aionos-plan-card {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: rgba(76, 165, 204, 0.06);
    border: 1px solid rgba(76, 165, 204, 0.15);
}

.aionos-plan-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #8b5cf6;
    margin-bottom: 4px;
}

.aionos-plan-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.45;
}

/* ── Toggle switch ── */
.aionos-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.aionos-switch input[type='checkbox'] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.aionos-switch-track {
    width: 36px;
    height: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.aionos-switch-track::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease, background 0.2s ease;
}

.aionos-switch input:checked + .aionos-switch-track {
    background: linear-gradient(135deg, #8b5cf6, #5b21b6);
    border-color: transparent;
}

.aionos-switch input:checked + .aionos-switch-track::after {
    transform: translateY(-50%) translateX(16px);
    background: #fff;
}

.aionos-switch input:focus-visible + .aionos-switch-track {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* ── Account modal compact variant ── */
.aionos-modal--account {
    max-width: 380px;
}

.aionos-profile-hero {
    position: relative;
}

.aionos-avatar-hero-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aionos-btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.aionos-btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.aionos-btn-icon--danger:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}
