/* ============================================
   MonEntrepriseFacile - Portal Dashboard Styles
   ============================================ */

/* ============================================
   Layout Structure
   ============================================ */

.portal-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    margin-top: 60px;
    padding: 2rem;
    transition: margin-left var(--transition-elegant);
}

.main-content.expanded {
    margin-left: 80px;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
    }
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(201, 169, 98, 0.2);
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 0.5rem;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.page-breadcrumb a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-breadcrumb a:hover {
    color: var(--gold-light);
}

.page-breadcrumb span {
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   User settings
   ============================================ */

/* User Settings Modal */
#userSettingsModal .modal-content,
#passwordResetModal .modal-content {
    background-color: var(--navy-dark);
    border: 1px solid rgba(201, 169, 98, 0.5);
}

/* Form controls */
#userSettingsModal .form-check-input:checked {
    background-color: var(--gold-primary);
    border-color: var(--gold-primary);
}

#userSettingsModal .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(201, 169, 98, 0.25);
}

/* Alert styling */
#userSettingsModal .alert-info {
    background-color: rgba(107, 144, 201, 0.1);
    border-color: rgba(107, 144, 201, 0.3);
    color: rgba(173, 216, 230, 0.9);
}

/* Password reset modal */
#passwordResetModal .modal-title {
    color: #ffc107;
}


/* ============================================
   Project Selection Page
   ============================================ */

.project-selection-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-family: var(--font-elegant);
    color: rgba(255, 255, 255, 0.7);
}

/* Project Cards Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: linear-gradient(145deg, var(--navy-dark), var(--navy-darker));
    border: 1px solid rgba(201, 169, 98, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.project-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-type-badge.project {
    background: rgba(30, 77, 107, 0.3);
    border: 1px solid rgba(30, 77, 107, 0.5);
    color: #7ec8e3;
}

.project-type-badge.activity {
    background: rgba(45, 106, 79, 0.3);
    border: 1px solid rgba(45, 106, 79, 0.5);
    color: #7dd3a8;
}

.project-status {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.project-card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.project-card-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(201, 169, 98, 0.1);
}

.project-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.project-date i {
    margin-right: 0.5rem;
    color: var(--gold-primary);
}

.project-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-progress-bar {
    width: 80px;
    height: 6px;
    background: rgba(201, 169, 98, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.project-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.project-progress-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-primary);
}

/* New Project Card */
.new-project-card {
    background: transparent;
    border: 2px dashed rgba(201, 169, 98, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.new-project-card:hover {
    background: rgba(201, 169, 98, 0.05);
    border-color: var(--gold-primary);
}

.new-project-card i {
    font-size: 3rem;
    color: var(--gold-primary);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.new-project-card:hover i {
    transform: scale(1.1);
}

.new-project-card span {
    font-family: var(--font-elegant);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Dashboard Widgets
   ============================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.widget {
    background: linear-gradient(145deg, var(--navy-dark), var(--navy-darker));
    border: 1px solid rgba(201, 169, 98, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.widget-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.widget-title i {
    color: var(--gold-primary);
}

.widget-actions {
    display: flex;
    gap: 0.5rem;
}

.widget-action-btn {
    background: rgba(201, 169, 98, 0.1);
    border: 1px solid rgba(201, 169, 98, 0.2);
    color: var(--gold-primary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.widget-action-btn:hover {
    background: var(--gold-primary);
    color: var(--navy-darkest);
}

/* Stats Row */
.stats-row {
    grid-column: span 12;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-widget {
    padding: 1.25rem;
}

.stat-widget-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.2), rgba(201, 169, 98, 0.1));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-widget-icon i {
    font-size: 1.5rem;
    color: var(--gold-primary);
}

.stat-widget-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-widget-label {
    font-family: var(--font-elegant);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

.stat-widget-trend {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.stat-widget-trend.positive {
    color: #7dd3a8;
}

.stat-widget-trend.negative {
    color: #f0a8a8;
}

/* Large Widgets */
.widget-lg {
    grid-column: span 8;
}

.widget-sm {
    grid-column: span 4;
}

@media (max-width: 1199.98px) {
    .widget-lg, .widget-sm {
        grid-column: span 12;
    }
}

/* ============================================
   Data Lists & Tables
   ============================================ */

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

.data-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(201, 169, 98, 0.1);
    transition: background 0.3s ease;
}

.data-list-item:last-child {
    border-bottom: none;
}

.data-list-item:hover {
    background: rgba(201, 169, 98, 0.05);
}

.data-list-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.data-list-item-icon {
    width: 40px;
    height: 40px;
    background: rgba(201, 169, 98, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.data-list-item-icon i {
    color: var(--gold-primary);
}

.data-list-item-title {
    font-weight: 500;
    color: var(--white);
    margin-bottom: 0.15rem;
}

.data-list-item-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.data-list-item-value {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--gold-primary);
}

/* ============================================
   Forms & Modals
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(201, 169, 98, 0.2);
}

/* Rich Text Editor Container */
.editor-container {
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.editor-toolbar {
    background: rgba(26, 39, 68, 0.8);
    padding: 0.75rem;
    border-bottom: 1px solid rgba(201, 169, 98, 0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.editor-btn {
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.editor-btn:hover {
    background: rgba(201, 169, 98, 0.1);
    color: var(--gold-primary);
}

.editor-btn.active {
    background: rgba(201, 169, 98, 0.2);
    color: var(--gold-primary);
    border-color: rgba(201, 169, 98, 0.3);
}

.editor-content {
    min-height: 300px;
    padding: 1rem;
    background: rgba(26, 39, 68, 0.6);
    color: var(--white);
    outline: none;
}

.editor-content:focus {
    background: rgba(26, 39, 68, 0.9);
}

/* ============================================
   Activity Feed
   ============================================ */

.activity-feed {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(201, 169, 98, 0.1);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.edit {
    background: rgba(30, 77, 107, 0.3);
    color: #7ec8e3;
}

.activity-icon.create {
    background: rgba(45, 106, 79, 0.3);
    color: #7dd3a8;
}

.activity-icon.delete {
    background: rgba(139, 0, 0, 0.3);
    color: #f0a8a8;
}

.activity-icon.comment {
    background: rgba(201, 169, 98, 0.2);
    color: var(--gold-primary);
}

.activity-content {
    flex: 1;
}

.activity-text {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.25rem;
}

.activity-text strong {
    color: var(--white);
}

.activity-time {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Empty States
   ============================================ */

.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: rgba(201, 169, 98, 0.3);
    margin-bottom: 1.5rem;
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

/* ============================================
   Tabs Navigation
   ============================================ */

.tabs-luxury {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid rgba(201, 169, 98, 0.2);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-item {
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tab-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-item:hover {
    color: var(--gold-light);
}

.tab-item.active {
    color: var(--gold-primary);
}

.tab-item.active::after {
    transform: scaleX(1);
}

/* ============================================
   Mobile Sidebar Toggle
   ============================================ */

.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    border: none;
    border-radius: 50%;
    color: var(--navy-darkest);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(201, 169, 98, 0.4);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 991.98px) {
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.show {
    display: block;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .sidebar-luxury,
    .navbar-luxury,
    .sidebar-toggle {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .widget,
    .card-luxury {
        border: 1px solid #ddd;
        background: white;
    }
}

/* ============================================
   Dropdown-menu Styles
   ============================================ */

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background-color: rgba(201, 169, 98, 0.2);
    color: white !important;
}
