/**
 * PLATEFORME DE MUTUALISATION - STYLES
 */

/* ============================================
   PLATFORM HERO
   ============================================ */
.platform-hero {
    padding: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    text-align: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-hero .container {
    width: 100%;
    padding: 2rem;
}

.platform-hero .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding-top: 60px;
}

.platform-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    color: var(--dark);
    line-height: 1.2;
    font-weight: 800;
    margin-top: 0;
}

.platform-hero p {
    font-size: 1.35rem;
    color: var(--gray);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   DASHBOARD SECTION
   ============================================ */
.dashboard-section {
    padding: 60px 0;
    background: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card-large {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--white);
    border: 2px solid var(--lighter-gray);
    border-radius: 16px;
    transition: var(--transition);
}

.stat-card-large:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card-large.success {
    border-color: var(--primary-color);
    background: rgba(16, 185, 129, 0.05);
}

.stat-card-large.eco {
    border-color: var(--primary-color);
    background: rgba(16, 185, 129, 0.05);
}

.stat-card-large .stat-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 16px;
    color: var(--white);
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--gray);
    font-weight: 500;
}

.additional-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 2rem;
    background: var(--lightest-gray);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.add-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.add-stat-label {
    font-size: 0.875rem;
    color: var(--gray);
    font-weight: 500;
}

.add-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
}

.chart-container {
    padding: 2rem;
    background: var(--white);
    border: 2px solid var(--lighter-gray);
    border-radius: 16px;
    margin-top: 2rem;
}

.chart-container canvas {
    max-height: 400px;
}

/* ============================================
   DEPOSIT SECTION
   ============================================ */
.deposit-section {
    padding: 60px 0;
    background: var(--lightest-gray);
}

.transport-form {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.form-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--lighter-gray);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 2rem;
}

.form-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.form-section h3 i {
    color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.form-actions .btn {
    min-width: 250px;
}

/* ============================================
   OPPORTUNITIES SECTION
   ============================================ */
.opportunities-section {
    padding: 60px 0;
    background: var(--white);
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.opportunities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 2rem;
}

.opportunity-card {
    padding: 2rem;
    background: var(--lightest-gray);
    border: 2px solid var(--lighter-gray);
    border-radius: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.opportunity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.opportunity-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

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

.opportunity-route {
    flex: 1;
}

.opportunity-route h3 {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.opportunity-route h3 i {
    color: var(--primary-color);
}

.opportunity-date {
    font-size: 0.875rem;
    color: var(--gray);
}

.compatibility-badge {
    padding: 6px 12px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.opportunity-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.detail-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
}

.savings-highlight {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.saving-item {
    text-align: center;
}

.saving-label {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.saving-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.saving-value.cost {
    color: #10b981;
}

.saving-value.co2 {
    color: #059669;
}

.opportunity-actions {
    display: flex;
    gap: 1rem;
}

.opportunity-actions .btn {
    flex: 1;
}

.no-data {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
}

.no-data i {
    font-size: 4rem;
    color: var(--light-gray);
    margin-bottom: 1rem;
}

.no-data p {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.no-data p.small {
    font-size: 0.9rem;
    color: var(--light-gray);
}

/* ============================================
   REQUESTS SECTION
   ============================================ */
.requests-section {
    padding: 60px 0;
    background: var(--lightest-gray);
}

.filter-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid var(--lighter-gray);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--medium-dark);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
}

.requests-table-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

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

.requests-table thead {
    background: var(--lightest-gray);
}

.requests-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--lighter-gray);
}

.requests-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--lighter-gray);
    color: var(--medium-dark);
}

.requests-table tbody tr:hover {
    background: var(--lightest-gray);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-badge.mutualized {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-color);
}

.status-badge.in-progress {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-badge.delivered {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.status-badge.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: var(--white);
}

.loading-spinner i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.loading-spinner p {
    font-size: 1.25rem;
    font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .opportunities-grid {
        grid-template-columns: 1fr;
    }
    
    .requests-table-container {
        overflow-x: auto;
    }
    
    .requests-table {
        min-width: 800px;
    }
}

@media (max-width: 768px) {
    .platform-hero {
        padding: 100px 0 40px;
    }
    
    .transport-form {
        padding: 2rem 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .additional-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .opportunity-details {
        grid-template-columns: 1fr;
    }
    
    .savings-highlight {
        grid-template-columns: 1fr;
    }
    
    .opportunity-actions {
        flex-direction: column;
    }
    
    .section-header-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .stat-card-large {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}