/*
 * ╔════════════════════════════════════════════════════════════╗
 * ║  UnionFlow Elite Topbar Styles (Freya Design System)      ║
 * ║  Modern, Professional, Responsive                          ║
 * ╚════════════════════════════════════════════════════════════╝
 */

/* ═══════════════════════════════════════════════════════════ */
/* BASE TOPBAR                                                  */
/* ═══════════════════════════════════════════════════════════ */

.unionflow-elite {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-600) 100%);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: relative;
    z-index: 1000;
}

.unionflow-elite::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary-300) 50%,
        transparent 100%);
    opacity: 0.5;
}

/* App Version Badge */
.app-version {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-left: 0.75rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* ═══════════════════════════════════════════════════════════ */
/* SEARCH                                                       */
/* ═══════════════════════════════════════════════════════════ */

.search-item .topbar-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-item:hover .topbar-icon {
    transform: scale(1.1);
    color: var(--primary-100);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--surface-border);
}

.search-item:hover .search-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-wrapper-elite {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface-50);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--surface-border);
    transition: all 0.3s ease;
}

.search-wrapper-elite:focus-within {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.search-wrapper-elite .pi-search {
    color: var(--text-color-secondary);
    font-size: 1rem;
}

.search-wrapper-elite .search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.search-wrapper-elite .search-input:focus {
    outline: none;
    box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════ */
/* NOTIFICATIONS                                                */
/* ═══════════════════════════════════════════════════════════ */

.notifications-item {
    position: relative;
}

.badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 360px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--surface-border);
    overflow: hidden;
}

.notifications-item:hover .notifications-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--surface-50);
    border-bottom: 1px solid var(--surface-border);
}

.count-label {
    font-size: 0.75rem;
    color: var(--text-color-secondary);
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-weight: 600;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.notif-item:hover {
    background: var(--surface-50);
}

.notif-item i {
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.notif-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.notif-time {
    font-size: 0.75rem;
    color: var(--text-color-secondary);
}

.notif-footer {
    padding: 0.75rem 1.25rem;
    text-align: center;
    border-top: 1px solid var(--surface-border);
    background: var(--surface-50);
}

.notif-footer a {
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.notif-footer a:hover {
    color: var(--primary-600);
}

/* ═══════════════════════════════════════════════════════════ */
/* USER PROFILE                                                 */
/* ═══════════════════════════════════════════════════════════ */

.elite-user .profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.875rem;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.elite-user .profile-trigger:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.avatar-container {
    position: relative;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid rgba(255,255,255,0.3);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-600) 100%);
}

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-dot.online {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.4); }
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    line-height: 1.2;
}

.role-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
    background: rgba(255,255,255,0.25);
    border-radius: 8px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.session-timer {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.icon-sm {
    font-size: 0.7rem;
}

.timer-text {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.arrow {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    transition: transform 0.3s ease;
}

.elite-user:hover .arrow {
    transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════════════════ */
/* USER DROPDOWN MENU                                           */
/* ═══════════════════════════════════════════════════════════ */

.elite-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 340px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--surface-border);
    overflow: hidden;
}

.elite-user:hover .elite-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Dropdown Header */
.dropdown-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--surface-50) 100%);
    border-bottom: 1px solid var(--surface-border);
}

.header-content {
    display: flex;
    gap: 1rem;
}

.header-avatar {
    position: relative;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-indicator.online {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.status-indicator i {
    font-size: 6px;
    color: white;
}

.header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    justify-content: center;
}

.header-info .name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
}

.header-info .email {
    font-size: 0.75rem;
    color: var(--text-color-secondary);
    line-height: 1.3;
}

.role-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.625rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-600) 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    margin-top: 0.25rem;
}

/* Session Card */
.session-card {
    padding: 1rem 1.25rem;
    background: var(--surface-50);
    border-bottom: 1px solid var(--surface-border);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-row .label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-color-secondary);
    font-weight: 500;
}

.info-row .label i {
    font-size: 0.875rem;
}

.info-row .value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Progress Bar */
.progress-container {
    margin-top: 0.5rem;
}

.progress-bar {
    height: 6px;
    background: var(--surface-200);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green-400) 0%, var(--green-500) 100%);
    border-radius: 10px;
    transition: width 1s ease, background 0.3s ease;
}

.progress-fill[style*="width: 0%"],
.progress-fill[style*="width: 1%"],
.progress-fill[style*="width: 2%"],
.progress-fill[style*="width: 3%"],
.progress-fill[style*="width: 4%"],
.progress-fill[style*="width: 5%"] {
    background: linear-gradient(90deg, var(--red-400) 0%, var(--red-500) 100%);
}

.progress-label {
    font-size: 0.625rem;
    color: var(--text-color-secondary);
    margin-top: 0.375rem;
    text-align: right;
    font-weight: 500;
}

/* Menu Sections */
.divider {
    height: 1px;
    background: var(--surface-border);
    margin: 0;
}

.menu-section {
    padding: 0.75rem 0;
}

.menu-section.compact {
    padding: 0.5rem 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.25rem 0.75rem;
}

.section-items {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.menu-item:hover {
    background: var(--surface-100);
}

.menu-item i:first-child {
    font-size: 1rem;
    color: var(--text-color-secondary);
    transition: all 0.2s ease;
}

.menu-item:hover i:first-child {
    color: var(--primary-color);
    transform: translateX(2px);
}

.menu-item span {
    flex: 1;
    font-weight: 500;
}

.arrow-right {
    font-size: 0.75rem;
    color: var(--text-color-secondary);
    margin-left: auto;
    transition: transform 0.2s ease;
}

.menu-item:hover .arrow-right {
    transform: translateX(3px);
}

.item-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.375rem;
    background: var(--primary-color);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 10px;
    margin-left: auto;
}

.value-badge {
    font-size: 0.75rem;
    color: var(--text-color-secondary);
    background: var(--surface-100);
    padding: 0.25rem 0.625rem;
    border-radius: 8px;
    font-weight: 600;
    margin-left: auto;
}

/* Logout Section */
.logout-divider {
    background: linear-gradient(90deg,
        transparent 0%,
        var(--red-200) 50%,
        transparent 100%);
    height: 2px;
}

.logout-section {
    padding: 0.75rem 0;
    background: linear-gradient(to bottom, white 0%, var(--red-50) 100%);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    color: var(--red-600);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.logout-btn:hover {
    background: var(--red-100);
    color: var(--red-700);
}

.logout-btn i:first-child {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.logout-btn:hover i:first-child {
    transform: scale(1.1) rotate(-10deg);
}

.logout-btn .pi-lock {
    font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════════════════ */
/* LOGOUT DIALOG                                                */
/* ═══════════════════════════════════════════════════════════ */

.elite-dialog .dialog-content {
    text-align: center;
    padding: 1.5rem 1rem;
}

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red-50) 0%, var(--red-100) 100%);
    margin-bottom: 1.5rem;
}

.icon-lg {
    font-size: 2.5rem;
    color: var(--red-500);
}

.dialog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.info-box {
    background: var(--surface-50);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--surface-border);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem;
    color: var(--text-color);
    font-size: 0.875rem;
}

.info-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

.warning-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-color-secondary);
    margin: 0;
}

.warning-text i {
    color: var(--blue-500);
}

.dialog-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
}

/* ═══════════════════════════════════════════════════════════ */
/* UTILITY CLASSES                                              */
/* ═══════════════════════════════════════════════════════════ */

.text-green-600 { color: #059669 !important; }
.text-yellow-600 { color: #d97706 !important; }
.text-orange-600 { color: #ea580c !important; }
.text-red-600 { color: #dc2626 !important; }

/* ═══════════════════════════════════════════════════════════ */
/* RESPONSIVE                                                   */
/* ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .app-version { display: none; }
    .user-info { display: none; }
    .elite-dropdown { min-width: 300px; }
    .search-dropdown { min-width: 280px; }
    .org-switcher-label { display: none; }
}

/* ═══════════════════════════════════════════════════════════ */
/* ORG SWITCHER                                                 */
/* ═══════════════════════════════════════════════════════════ */

.org-switcher-item {
    position: relative;
}

.org-switcher-trigger {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: rgba(var(--primary-color-rgb, 99,102,241), 0.08);
    border: 1px solid rgba(var(--primary-color-rgb, 99,102,241), 0.2);
    color: var(--text-color, #374151);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    max-width: 220px;
}

.org-switcher-trigger:hover {
    background: rgba(var(--primary-color-rgb, 99,102,241), 0.15);
    border-color: var(--primary-color, #6366f1);
    text-decoration: none;
}

.org-switcher-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.org-switcher-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 280px;
    background: var(--surface-card, #fff);
    border: 1px solid var(--surface-border, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    z-index: 1000;
    padding: 0.5rem 0;
    list-style: none;
    margin: 0;
}

.org-switcher-item:hover .org-switcher-dropdown,
.org-switcher-item:focus-within .org-switcher-dropdown {
    display: block;
}

.org-item {
    padding: 0;
}

.org-item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color, #374151);
    transition: background 0.15s;
}

.org-item-link:hover {
    background: var(--surface-hover, #f9fafb);
}

.org-item-active .org-item-link {
    background: rgba(var(--primary-color-rgb, 99,102,241), 0.06);
}

.org-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.org-item-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-color, #111827);
}

.org-item-meta {
    display: flex;
    gap: 0.4rem;
}

.org-type-badge {
    font-size: 0.7rem;
    background: var(--surface-ground, #f3f4f6);
    color: var(--text-color-secondary, #6b7280);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.org-role-badge {
    font-size: 0.7rem;
    background: #ecfdf5;
    color: #065f46;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.org-check-icon {
    color: var(--primary-color, #6366f1);
    font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* UNIONFLOW BRAND IDENTITY — EXHAUSTIVE DARK/LIGHT MODE SUPPORT     */
/* Charte: #0B304A (Bleu Nuit), #126A54 (Vert Forêt),               */
/*         #E6C57A (Or Premium), #F4F6F8 (Fond), #E8EAEC            */
/*                                                                    */
/* Freya theme axes:                                                  */
/*   1. topbarTheme → .layout-topbar-light | .layout-topbar-dark     */
/*   2. menuTheme   → .layout-menu-light  | .layout-menu-dark       */
/*   3. darkMode    → layout-light.css    | layout-dark.css          */
/*   4. menuMode    → .layout-sidebar | .layout-static               */
/*                     .layout-horizontal | .layout-slim              */
/* ═══════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────
   1. BASE — Brand Composition (Logo + Text)
   Now uses .unionflow-topbar-brand (outside of
   .layout-topbar-logo to avoid Freya display:none)
   ────────────────────────────────────────────────── */

.unionflow-topbar-brand,
.unionflow-brand {
    display: flex !important;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none !important;
    height: auto !important;
}

.unionflow-brand-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.unionflow-topbar-brand:hover .unionflow-brand-icon,
.unionflow-brand:hover .unionflow-brand-icon {
    transform: scale(1.05) rotate(-2deg);
}

.unionflow-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    gap: 0.1875rem;
}

.unionflow-brand-name {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    transition: color 0.2s ease;
}

.unionflow-brand-slogan {
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    transition: color 0.2s ease;
}

/* ──────────────────────────────────────────────────
   2. TOPBAR — Dark mode (default: gradient/dark bg)
   Classes: .layout-topbar-dark, .unionflow-elite
   ────────────────────────────────────────────────── */

.layout-topbar-dark .unionflow-brand-name,
.unionflow-elite .unionflow-brand-name {
    color: #FFFFFF;
}

.layout-topbar-dark .unionflow-brand-slogan,
.unionflow-elite .unionflow-brand-slogan {
    color: rgba(230, 197, 122, 0.9);  /* Or Premium #E6C57A */
}

/* ──────────────────────────────────────────────────
   3. TOPBAR — Light mode (white bg)
   Class: .layout-topbar-light
   ────────────────────────────────────────────────── */

.layout-topbar-light .unionflow-brand-name {
    color: #0B304A;  /* Bleu Nuit */
}

.layout-topbar-light .unionflow-brand-slogan {
    color: #126A54;  /* Vert Forêt */
}

/* ──────────────────────────────────────────────────
   4. SIDEBAR BRAND — Single source of branding
   Collapsed (62px): icon only
   Expanded (230px): icon + UNIONFLOW + slogan + v1.0
   ────────────────────────────────────────────────── */

/* --- Logo link container --- */
.sidebar-logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.sidebar-logo-link:hover .unionflow-sidebar-icon {
    transform: scale(1.08);
}

/* --- Icon (always visible — 24px for visual parity with menu icons) --- */
.unionflow-sidebar-icon {
    width: 24px !important;
    height: 24px !important;
    object-fit: contain;
    border-radius: 3px;
    border: 0 none !important;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* Override Freya's .menu-wrapper .sidebar-logo img { width:17px; height:20px } */
.menu-wrapper .sidebar-logo .unionflow-sidebar-icon {
    width: 24px !important;
    height: 24px !important;
}

/* --- Text block (hidden when collapsed) --- */
.unionflow-sidebar-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    gap: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    width: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.unionflow-sidebar-name {
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

.unionflow-sidebar-slogan {
    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    opacity: 0.7;
}

/* --- Version badge (hidden when collapsed) --- */
.unionflow-sidebar-version {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border-radius: 8px;
    font-size: 0.625rem;
    font-weight: 600;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* ──────────────────────────────────────────────────
   4b. SIDEBAR EXPANDED — Show full brand
   Triggered by: layout-static, layout-sidebar-active (hover)
   ────────────────────────────────────────────────── */

@media (min-width: 992px) {
    /* Expanded: icon grows slightly */
    .layout-wrapper.layout-static .menu-wrapper .sidebar-logo .unionflow-sidebar-icon,
    .menu-wrapper.layout-sidebar-active .sidebar-logo .unionflow-sidebar-icon {
        width: 30px !important;
        height: 30px !important;
    }

    /* Expanded: show text */
    .layout-wrapper.layout-static .menu-wrapper .sidebar-logo .unionflow-sidebar-text,
    .menu-wrapper.layout-sidebar-active .sidebar-logo .unionflow-sidebar-text {
        visibility: visible;
        opacity: 1;
        width: auto;
    }

    /* Expanded: show version badge */
    .layout-wrapper.layout-static .menu-wrapper .sidebar-logo .unionflow-sidebar-version,
    .menu-wrapper.layout-sidebar-active .sidebar-logo .unionflow-sidebar-version {
        visibility: visible;
        opacity: 1;
        width: auto;
        padding: 0.125rem 0.4rem;
    }
}

/* ──────────────────────────────────────────────────
   5. SIDEBAR — Menu Dark theme
   Class: .layout-menu-dark (menu bg = #293241)
   ────────────────────────────────────────────────── */

.layout-menu-dark .unionflow-sidebar-name {
    color: #FFFFFF;
}

.layout-menu-dark .unionflow-sidebar-slogan {
    color: rgba(230, 197, 122, 0.85);  /* Or Premium */
}

.layout-menu-dark .unionflow-sidebar-version {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.layout-menu-dark .sidebar-logo-link {
    color: #E9E9E9;
}

/* ──────────────────────────────────────────────────
   6. SIDEBAR — Menu Light theme
   Class: .layout-menu-light (menu bg = white)
   ────────────────────────────────────────────────── */

.layout-menu-light .unionflow-sidebar-name {
    color: #0B304A;  /* Bleu Nuit */
}

.layout-menu-light .unionflow-sidebar-slogan {
    color: #126A54;  /* Vert Forêt */
}

.layout-menu-light .unionflow-sidebar-version {
    background: rgba(11, 48, 74, 0.1);
    color: #0B304A;
}

.layout-menu-light .sidebar-logo-link {
    color: #0B304A;
}

/* ──────────────────────────────────────────────────
   9. LANDING PAGE — Variant Premium Unionflow
   ────────────────────────────────────────────────── */

/* App background */
.landing-body {
    background-color: #F4F6F8 !important; /* Très léger gris/bleu pour le fond de page */
}

/* Banner (Hero section) - Deep Blue modern gradient instead of the generic mountain */
.landing-body .landing-banner {
    background: linear-gradient(135deg, #0B304A 0%, #154B73 50%, #126A54 100%) !important;
    position: relative;
    overflow: hidden;
}

/* Add a subtle geometric overlay effect to the banner for depth */
.landing-body .landing-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    opacity: 0.8;
    pointer-events: none;
    animation: rotate-slow 60s linear infinite;
}

@keyframes rotate-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Typography on Banner */
.landing-body .landing-banner .landing-banner-content .title {
    color: #FFFFFF !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

.landing-body .landing-banner .landing-banner-content h3 {
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    font-weight: 400 !important;
    letter-spacing: 0;
}

/* Topbar on Landing */
.landing-body .landing-topbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(11, 48, 74, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

/* Override Freya's tiny 16px landing logo */
.landing-body .landing-topbar .landing-topbar-left .logo.unionflow-brand--landing {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    text-decoration: none !important;
}

.landing-body .landing-topbar .landing-topbar-left .logo.unionflow-brand--landing img.unionflow-brand-icon {
    width: 36px !important;
    height: 36px !important;
}

.landing-body .landing-topbar .landing-topbar-left .logo.unionflow-brand--landing .unionflow-brand-name {
    font-size: 1.35rem !important;
    letter-spacing: 0.15em !important;
    color: #0B304A !important;
    font-weight: 800 !important;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif !important;
}

.landing-body .landing-topbar .landing-menu > li > a {
    color: #0B304A !important;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem !important;
    transition: color 0.3s ease;
}

.landing-body .landing-topbar .landing-menu > li > a:hover {
    color: #E6C57A !important; /* Premium Gold */
}

/* Topbar Secondary Button - Premium Hover */
.landing-body .landing-topbar-right a[href*="dashboard"] {
    border: 2px solid #0B304A !important;
    color: #0B304A !important;
    transition: all 0.3s ease !important;
}

.landing-body .landing-topbar-right a[href*="dashboard"]:hover {
    background: transparent !important;
    border-color: #E6C57A !important; /* Premium Gold */
    color: #E6C57A !important;
    box-shadow: 0 4px 15px rgba(230, 197, 122, 0.2);
}

/* Banner CTA Button - Premium Gold */
.landing-body .landing-banner-content a[href*="dashboard"] {
    background: linear-gradient(135deg, #E6C57A 0%, #D4AF37 100%) !important;
    color: #0B304A !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(230, 197, 122, 0.4) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.landing-body .landing-banner-content a[href*="dashboard"]:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 30px rgba(230, 197, 122, 0.6) !important;
}

/* Feature Cards - Glassmorphism & Shadows */
.landing-body .landing-features {
    background: transparent !important;
}

.landing-body .feature-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(11, 48, 74, 0.05) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04) !important;
    border-radius: 20px !important;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease !important;
}

.landing-body .feature-card:hover {
    transform: translateY(-12px) !important; /* Increased lift */
    box-shadow: 0 25px 60px rgba(11, 48, 74, 0.12) !important;
}

.landing-body .feature-card h3 {
    color: #0B304A !important;
    font-weight: 700 !important;
}

.landing-body .feature-card h5 {
    color: rgba(11, 48, 74, 0.7) !important;
}

/* Feature Icon numbers styling */
.landing-body .feature > span {
    color: #E6C57A !important; /* Premium Gold */
    font-weight: 800 !important;
    font-size: 28px !important;
}

/* Sub-section headings */
.landing-body .section-header .title {
    color: #0B304A !important;
    font-weight: 800 !important;
}

.landing-body .section-header h3 {
    color: rgba(11, 48, 74, 0.7) !important;
}

/* Benefit Icons Scale-up */
.landing-body .landing-pricing h3 + p + ul {
    margin-top: 1rem !important;
}

.landing-body .landing-pricing .pi {
    font-size: 1.5rem !important; /* Bumped from 1.25 to 1.5 for presence */
}

/* Bottom banner trust section */
.landing-body .landing-pricing > div:last-of-type > div {
    background: linear-gradient(135deg, #0B304A 0%, #126A54 100%) !important;
    border-radius: 24px !important;
    box-shadow: 0 15px 40px rgba(11, 48, 74, 0.2) !important;
}

/* Final CTA */
.landing-body .mt-5 > a {
    background: #0B304A !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 18px rgba(11, 48, 74, 0.3) !important;
}

.landing-body .mt-5 > a:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 30px rgba(11, 48, 74, 0.4) !important;
    background: #154B73 !important;
}

/* Footer styling */
.landing-body .layout-footer {
    border-top: 1px solid rgba(11, 48, 74, 0.05);
}

.landing-body .layout-footer .footer-menutitle {
    color: #0B304A !important;
    font-weight: 700;
}

.landing-body .layout-footer ul > li,
.landing-body .layout-footer ul > li > a {
    color: rgba(11, 48, 74, 0.6) !important;
}

.landing-body .layout-footer ul > li > a:hover {
    color: #126A54 !important;
}

@media (max-width: 991px) {
    .unionflow-brand--landing .unionflow-brand-icon {
        width: 32px;
        height: 32px;
    }

    .unionflow-brand--landing .unionflow-brand-name {
        font-size: 1.1rem;
    }
}

/* ──────────────────────────────────────────────────
   10. EXCEPTION PAGES — 404, Access Denied, Error
   ────────────────────────────────────────────────── */

.exception-body .exception-topbar .unionflow-brand-icon {
    width: 38px;
    height: 38px;
}

.exception-body .exception-topbar .unionflow-brand-name {
    color: #0B304A;
}

.exception-body .exception-topbar .unionflow-brand-slogan {
    color: #126A54;
}

/* ──────────────────────────────────────────────────
   11. RESPONSIVE BREAKPOINTS
   ────────────────────────────────────────────────── */

@media (max-width: 991px) {
    /* On tablets: smaller icon, keep text */
    .unionflow-brand-icon {
        width: 30px;
        height: 30px;
    }

    .unionflow-brand-name {
        font-size: 1rem;
    }

    .unionflow-brand-slogan {
        font-size: 0.5rem;
    }
}

@media (max-width: 768px) {
    /* On small tablets: hide text, only icon */
    .unionflow-brand-text {
        display: none;
    }

    .unionflow-brand-icon {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 576px) {
    /* On phones: even smaller icon */
    .unionflow-brand-icon {
        width: 26px;
        height: 26px;
    }

    .unionflow-brand--landing .unionflow-brand-icon {
        width: 32px;
        height: 32px;
    }

    /* Still show name on landing for brand recognition */
    .unionflow-brand--landing .unionflow-brand-text {
        display: flex;
    }

    .unionflow-brand--landing .unionflow-brand-name {
        font-size: 1.1rem;
    }
}
