/* Design moderne type Stripe/Neobank - L'Ardoise */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Variables CSS */
:root {
    --primary-blue: #4F46E5;
    --primary-blue-hover: #4338CA;
    --primary-blue-light: #EEF2FF;
    --success-green: #10B981;
    --success-green-light: #D1FAE5;
    --error-red: #EF4444;
    --error-red-light: #FEE2E2;
    --warning-orange: #F59E0B;
    --warning-orange-light: #FEF3C7;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(180deg, #E0E7FF 0%, #EDE9FE 30%, #F3F4F6 70%, #F9FAFB 100%);
    background-attachment: fixed;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(129, 140, 248, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

* {
    font-family: 'Poppins', sans-serif;
}

/* Page de connexion */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(180deg, #4F46E5 0%, #6366F1 40%, #818CF8 70%, #A5B4FC 100%);
    padding: 20px;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: var(--bg-primary);
    padding: 48px 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 8px;
    color: var(--primary-blue);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 15px;
    font-weight: 400;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    color: var(--primary-blue);
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.5px;
    font-family: 'Poppins', sans-serif;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-nickname-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.user-nickname-link:hover {
    color: var(--primary-blue);
}

.user-details .user-nickname {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.user-nickname-link:hover .user-nickname {
    color: var(--primary-blue);
}

.user-balance {
    font-weight: 600;
    font-size: 15px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
}

.user-balance.balance-green {
    background-color: var(--success-green-light);
    color: var(--success-green);
}

.user-balance.balance-orange {
    background-color: var(--warning-orange-light);
    color: var(--warning-orange);
}

.user-balance.balance-red {
    background-color: var(--error-red-light);
    color: var(--error-red);
}

.admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    min-width: 40px;
}

.admin-link svg {
    display: block;
}

.user-nickname {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 15px;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    padding: 20px 24px;
    z-index: 100;
    border-top: 1px solid var(--border-color);
    min-height: 80px;
}

.footer-actions {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Contenu principal */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    padding-bottom: 180px;
    position: relative;
    z-index: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Sections */
section {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 80px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

/* Solde */
.balance-section {
    text-align: center;
    padding: 40px 32px;
}

.balance {
    font-size: 48px;
    font-weight: 700;
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-top: 16px;
    letter-spacing: -1px;
}

.balance.green {
    background-color: var(--success-green-light);
    color: var(--success-green);
}

.balance.orange {
    background-color: var(--warning-orange-light);
    color: var(--warning-orange);
}

.balance.red {
    background-color: var(--error-red-light);
    color: var(--error-red);
}

/* Demandes en attente */
.pending-requests {
    background-color: var(--warning-orange-light);
    border: 1px solid var(--warning-orange);
    border-radius: var(--radius-lg);
}

.request-card {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.request-info strong {
    color: var(--primary-blue);
    font-weight: 600;
}

.request-comment {
    margin-top: 8px;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 14px;
}

.request-actions {
    display: flex;
    gap: 8px;
}

/* Transactions */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.transaction-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-blue);
}

.transaction-item.transaction-pending {
    background: var(--warning-orange-light);
    border-color: var(--warning-orange);
}

.transaction-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    position: relative;
}

.transaction-icon.icon-outgoing::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 8px solid var(--error-red);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.transaction-icon.icon-incoming::after {
    content: '';
    width: 0;
    height: 0;
    border-right: 8px solid var(--success-green);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.transaction-form {
    margin-bottom: 90px;
}

.transaction-details {
    flex: 1;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 12px;
}

.transaction-user {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.transaction-amount {
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.3px;
}

.transaction-amount.outgoing {
    color: var(--error-red);
}

.transaction-amount.incoming {
    color: var(--success-green);
}

.transaction-amount.refused {
    color: var(--text-light);
    text-decoration: line-through;
    opacity: 0.6;
}

.transaction-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.transaction-date {
    color: var(--text-light);
    font-size: 13px;
}

.transaction-comment-preview {
    font-style: italic;
    color: var(--text-secondary);
    font-family: 'Poppins', sans-serif;
}

.transaction-comment-full {
    color: var(--text-secondary);
    font-style: italic;
    font-family: 'Poppins', sans-serif;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
    padding: 0;
    font-weight: 500;
    transition: color 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-link:hover {
    color: var(--primary-blue-hover);
}

/* Formulaires */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-blue-light);
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.checkbox-label:hover {
    background: var(--primary-blue-light);
    border-color: var(--primary-blue);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

/* Boutons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.2px;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-blue-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-success {
    background: var(--success-green);
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--error-red);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-warning {
    background: var(--warning-orange);
    color: white;
}

.btn-warning:hover {
    background: #D97706;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* Alertes */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid;
}

.alert-success {
    background-color: var(--success-green-light);
    color: #065F46;
    border-color: var(--success-green);
}

.alert-error {
    background-color: var(--error-red-light);
    color: #991B1B;
    border-color: var(--error-red);
}

.no-data {
    text-align: center;
    color: var(--text-light);
    padding: 48px;
    font-style: italic;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    background-color: var(--bg-primary);
    padding: 32px;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    font-weight: 300;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: var(--text-primary);
}

.lightbox-content h3 {
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.lightbox-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    letter-spacing: 0;
}

.badge-success {
    background-color: var(--success-green-light);
    color: #065F46;
}

.badge-danger {
    background-color: var(--error-red-light);
    color: #991B1B;
}

.badge-warning {
    background-color: var(--warning-orange-light);
    color: #92400E;
}

.badge-info {
    background-color: var(--primary-blue-light);
    color: var(--primary-blue);
}

/* Responsive */
@media (min-width: 768px) {
    .footer-actions {
        justify-content: center;
    }
    
    .footer-actions .btn {
        flex: 1;
        max-width: 300px;
    }
    
    .transaction-header {
        flex-wrap: nowrap;
    }
    
    .form-actions {
        flex-direction: row;
    }
    
    .form-actions .btn {
        flex: 1;
    }
    
    .main-content {
        padding: 40px 32px;
    }
}
