/**
 * KozaPartaz Account Dashboard - Styles Modernes
 * Version: 2.1
 */

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    --kp-green: #00a86b;
    --kp-green-light: #00c97a;
    --kp-green-dark: #008c5a;
    --kp-blue: #0077b6;
    --kp-dark: #2b2d42;
    --kp-gray: #6c757d;
    --kp-gray-light: #f8f9fa;
    --kp-border: #e9ecef;
    --kp-shadow: 0 2px 15px rgba(0,0,0,0.08);
    --kp-shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --kp-radius: 16px;
    --kp-radius-sm: 8px;
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */
.kozapartaz-account-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
}

/* ============================================
   EN-TÊTE DU COMPTE - VERSION MODERNE
   ============================================ */
.account-header {
    background: linear-gradient(135deg, var(--kp-green) 0%, var(--kp-green-light) 100%);
    color: white;
    padding: 40px;
    border-radius: var(--kp-radius);
    margin-bottom: 30px;
    box-shadow: var(--kp-shadow);
    position: relative;
    overflow: hidden;
}

/* Pattern décoratif */
.account-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.account-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    z-index: 0;
}

.account-header-content {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.account-avatar {
    flex-shrink: 0;
    position: relative;
}

.account-avatar img {
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    width: 96px;
    height: 96px;
    object-fit: cover;
}

.account-avatar:hover img {
    transform: scale(1.05);
}

.account-info {
    flex: 1;
}

.account-info h2 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
}

.account-email {
    margin: 0 0 5px 0;
    opacity: 0.95;
    font-size: 15px;
    font-weight: 500;
}

.account-member-since {
    margin: 0;
    opacity: 0.85;
    font-size: 14px;
    font-weight: 400;
}

.account-rating {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: inline-flex;
}

.account-rating .star-full {
    color: #ffc107;
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.account-rating .star-empty {
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
}

.account-rating .rating-text {
    margin-left: 5px;
    font-size: 15px;
    font-weight: 600;
    opacity: 1;
}

.account-actions {
    position: relative;
    z-index: 1;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-logout:hover {
    background: white;
    color: var(--kp-green);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ============================================
   STATISTIQUES - DESIGN MODERNE
   ============================================ */
.account-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: var(--kp-radius);
    box-shadow: var(--kp-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--kp-green), var(--kp-green-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

.stat-icon {
    font-size: 48px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 40px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--kp-green), var(--kp-green-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 15px;
    color: var(--kp-gray);
    font-weight: 500;
}

/* ============================================
   ACTIONS RAPIDES - GRID MODERNE
   ============================================ */
.account-quick-actions {
    background: white;
    padding: 35px;
    border-radius: var(--kp-radius);
    box-shadow: var(--kp-shadow);
    margin-bottom: 30px;
}

.account-quick-actions h3 {
    margin: 0 0 25px 0;
    color: var(--kp-dark);
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-quick-actions h3::before {
    content: '⚡';
    font-size: 28px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
    border: 2px solid var(--kp-border);
    border-radius: var(--kp-radius-sm);
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--kp-green), var(--kp-green-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.quick-action-card:hover {
    border-color: var(--kp-green);
    background: white;
    transform: translateY(-5px);
    box-shadow: var(--kp-shadow-hover);
}

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

.action-icon {
    font-size: 40px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.quick-action-card:hover .action-icon {
    transform: scale(1.15) rotate(5deg);
}

.action-title {
    font-weight: 700;
    color: var(--kp-dark);
    font-size: 16px;
}

.action-desc {
    font-size: 13px;
    color: var(--kp-gray);
    line-height: 1.4;
}

/* ============================================
   SECTIONS (MES OFFRES / MES DEMANDES)
   ============================================ */
.account-section {
    background: white;
    padding: 35px;
    border-radius: var(--kp-radius);
    box-shadow: var(--kp-shadow);
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--kp-border);
}

.section-header h3 {
    margin: 0;
    color: var(--kp-dark);
    font-size: 24px;
    font-weight: 700;
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--kp-radius-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-green {
    background: linear-gradient(135deg, var(--kp-green) 0%, var(--kp-green-light) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 168, 107, 0.2);
}

.btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 107, 0.3);
}

/* ============================================
   LISTE DES ITEMS - DESIGN AMÉLIORÉ
   ============================================ */
.account-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.account-item {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: var(--kp-radius-sm);
    border: 2px solid var(--kp-border);
    transition: all 0.3s ease;
    position: relative;
}

.account-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--kp-green), var(--kp-green-light));
    border-radius: var(--kp-radius-sm) 0 0 var(--kp-radius-sm);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.account-item:hover {
    background: white;
    border-color: var(--kp-green);
    box-shadow: var(--kp-shadow-hover);
    transform: translateX(5px);
}

.account-item:hover::before {
    opacity: 1;
}

.account-item.item-draft {
    opacity: 0.85;
}

.account-item.item-draft::before {
    background: linear-gradient(180deg, #ffc107, #ff9800);
}

.item-thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: var(--kp-radius-sm);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.account-item:hover .item-thumbnail img {
    transform: scale(1.1);
}

.no-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kp-gray-light), var(--kp-border));
    font-size: 40px;
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--kp-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    line-height: 1.3;
}

.item-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft, .status-pending {
    background: linear-gradient(135deg, #fff3cd, #ffe69c);
    color: #856404;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.status-open {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.status-closed {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
    color: var(--kp-gray);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.urgency-high {
    color: #dc3545;
    font-weight: 700;
    background: rgba(220, 53, 69, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.urgency-medium {
    color: #ffc107;
    font-weight: 700;
    background: rgba(255, 193, 7, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.urgency-low {
    color: #28a745;
    font-weight: 600;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    justify-content: center;
}

.btn-action {
    padding: 10px 18px;
    border-radius: var(--kp-radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-view {
    background: linear-gradient(135deg, #0077b6, #00b4d8);
    color: white;
}

.btn-view:hover {
    background: linear-gradient(135deg, #005a8c, #0096c7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

.btn-edit {
    background: linear-gradient(135deg, #6c757d, #868e96);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #545b62, #6c757d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-close {
    background: linear-gradient(135deg, #ffc107, #ffca2c);
    color: #000;
}

.btn-close:hover {
    background: linear-gradient(135deg, #e0a800, #ffc107);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-delete {
    background: linear-gradient(135deg, #dc3545, #e4606d);
    color: white;
    border: none;
    cursor: pointer;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #c82333, #dc3545);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-delete:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.btn-delete:disabled:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}


/* ============================================
   ÉTAT VIDE - DESIGN AMÉLIORÉ
   ============================================ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: var(--kp-radius-sm);
}

.empty-icon {
    font-size: 100px;
    margin-bottom: 25px;
    opacity: 0.6;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.1));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state h4 {
    margin: 0 0 12px 0;
    color: var(--kp-dark);
    font-size: 24px;
    font-weight: 700;
}

.empty-state p {
    margin: 0 0 25px 0;
    color: var(--kp-gray);
    font-size: 16px;
}

/* ============================================
   LOGIN REDIRECT
   ============================================ */
.login-redirect {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border-radius: var(--kp-radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: white;
    color: var(--kp-green);
    border: 2px solid var(--kp-green);
}

.btn-outline:hover {
    background: var(--kp-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 107, 0.2);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .account-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .kozapartaz-account-dashboard {
        padding: 20px 15px;
    }
    
    .account-header {
        padding: 25px 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .account-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .account-info h2 {
        font-size: 26px;
    }
    
    .account-actions {
        width: 100%;
    }
    
    .btn-logout {
        width: 100%;
        justify-content: center;
    }
    
    .account-stats {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .btn-small {
        width: 100%;
        justify-content: center;
    }
    
    .account-item {
        flex-direction: column;
    }
    
    .item-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .item-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .btn-action {
        flex: 1 1 calc(50% - 5px);
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .account-info h2 {
        font-size: 22px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .section-header h3 {
        font-size: 20px;
    }
    
    .item-title {
        font-size: 18px;
    }
    
    .item-actions {
        flex-direction: column;
    }
    
    .btn-action {
        width: 100%;
    }
}

/* Section Matching - Affichage synthétique */
.matching-section {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #00a86b;
    border-radius: 8px;
}

.matching-header {
    margin-bottom: 10px;
    color: #2b2d42;
    font-size: 14px;
}

.matching-items-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.matching-item-compact {
    background: white;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.matching-item-compact:hover {
    border-color: #00a86b;
    box-shadow: 0 2px 8px rgba(0, 168, 107, 0.1);
}

.matching-item-compact a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.matching-item-compact strong {
    color: #2b2d42;
    font-size: 14px;
    display: block;
}

.matching-meta {
    font-size: 12px;
    color: #6c757d;
    display: block;
}

.matching-item-compact:hover strong {
    color: #00a86b;
}

/* Notifications personnalisées */
.koza-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.koza-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.koza-notification-success {
    background: linear-gradient(135deg, #00a86b, #00d084);
    color: white;
}

.koza-notification-error {
    background: linear-gradient(135deg, #dc3545, #e4606d);
    color: white;
}

.koza-notification::before {
    content: '✓';
    display: inline-block;
    margin-right: 10px;
    font-size: 18px;
    font-weight: bold;
}

.koza-notification-error::before {
    content: '✕';
}

