/* themes.css - Système de thèmes personnalisables */

:root {
    /* Thème par défaut: Purple Dream */
    --bg-from: #0f172a;
    --bg-via: #581c87;
    --bg-to: #0f172a;
    --primary: #a855f7;
    --primary-dark: #9333ea;
    --accent: #c084fc;
}

/* Thème 1: Purple Dream (défaut) */
[data-theme="purple"] {
    --bg-from: #0f172a;
    --bg-via: #581c87;
    --bg-to: #0f172a;
    --primary: #a855f7;
    --primary-dark: #9333ea;
    --accent: #c084fc;
}

/* Thème 2: Ocean Blue */
[data-theme="ocean"] {
    --bg-from: #0c4a6e;
    --bg-via: #0369a1;
    --bg-to: #0c4a6e;
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --accent: #38bdf8;
}

/* Thème 3: Forest Green */
[data-theme="forest"] {
    --bg-from: #14532d;
    --bg-via: #166534;
    --bg-to: #14532d;
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --accent: #4ade80;
}

/* Thème 4: Sunset Orange */
[data-theme="sunset"] {
    --bg-from: #7c2d12;
    --bg-via: #ea580c;
    --bg-to: #7c2d12;
    --primary: #f97316;
    --primary-dark: #ea580c;
    --accent: #fb923c;
}

/* Thème 5: Rose Pink */
[data-theme="rose"] {
    --bg-from: #4c0519;
    --bg-via: #9f1239;
    --bg-to: #4c0519;
    --primary: #f43f5e;
    --primary-dark: #e11d48;
    --accent: #fb7185;
}

/* Thème 6: Cyber Cyan */
[data-theme="cyber"] {
    --bg-from: #083344;
    --bg-via: #0e7490;
    --bg-to: #083344;
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --accent: #22d3ee;
}

/* Thème 7: Gold Luxury */
[data-theme="gold"] {
    --bg-from: #78350f;
    --bg-via: #92400e;
    --bg-to: #78350f;
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --accent: #fbbf24;
}

/* Thème 8: Dark Mode */
[data-theme="dark"] {
    --bg-from: #000000;
    --bg-via: #1e293b;
    --bg-to: #000000;
    --primary: #64748b;
    --primary-dark: #475569;
    --accent: #94a3b8;
}

/* Thème 9: Light Mode */
[data-theme="light"] {
    --bg-from: #f8fafc;
    --bg-via: #e2e8f0;
    --bg-to: #f8fafc;
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #818cf8;
}

/* Application du thème */
body {
    background: linear-gradient(135deg, var(--bg-from) 0%, var(--bg-via) 50%, var(--bg-to) 100%);
    min-height: 100vh;
    transition: background 0.3s ease;
}

/* Light mode adjustments */
[data-theme="light"] .glass {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .text-white {
    color: #1e293b;
}

[data-theme="light"] .text-white\/50,
[data-theme="light"] .text-white\/60,
[data-theme="light"] .text-white\/70 {
    color: #64748b;
}

[data-theme="light"] .bg-white\/5,
[data-theme="light"] .bg-white\/10 {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
    color: #64748b;
}

/* Boutons avec couleurs du thème */
.btn-primary {
    background: var(--primary);
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Animation de changement de thème */
.theme-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sélecteur de thème */
.theme-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
}

.theme-option {
    width: 100%;
    height: 60px;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.theme-option:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.theme-option.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.3);
}

.theme-option::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
}

/* Styles pour chaque option de thème */
.theme-option[data-theme="purple"] {
    background: linear-gradient(135deg, #581c87 0%, #a855f7 100%);
}

.theme-option[data-theme="ocean"] {
    background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
}

.theme-option[data-theme="forest"] {
    background: linear-gradient(135deg, #166534 0%, #22c55e 100%);
}

.theme-option[data-theme="sunset"] {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
}

.theme-option[data-theme="rose"] {
    background: linear-gradient(135deg, #9f1239 0%, #f43f5e 100%);
}

.theme-option[data-theme="cyber"] {
    background: linear-gradient(135deg, #0e7490 0%, #06b6d4 100%);
}

.theme-option[data-theme="gold"] {
    background: linear-gradient(135deg, #92400e 0%, #f59e0b 100%);
}

.theme-option[data-theme="dark"] {
    background: linear-gradient(135deg, #1e293b 0%, #64748b 100%);
}

.theme-option[data-theme="light"] {
    background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
}

/* Installation PWA prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Offline indicator */
.offline-indicator {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}
/* Theme utility classes */
.btn-theme {
    background: var(--primary);
}

.btn-theme:hover {
    background: var(--primary-dark);
}

/* Theme icons */
.icon-theme {
    background: var(--primary);
}

/* Accented text */
.text-theme {
    color: var(--accent);
}

/* Apply theme to Tailwind classes */
[data-theme] .bg-purple-500,
[data-theme] .hover\:bg-purple-600:hover {
    background: var(--primary);
}

[data-theme] .text-purple-200,
[data-theme] .text-purple-300 {
    color: var(--accent);
}

[data-theme] .border-purple-500 {
    border-color: var(--primary);
}

/* Active theme for modals */
[data-theme] .modal .bg-purple-500 {
    background: var(--primary);
}

[data-theme] .modal .hover\:bg-purple-600:hover {
    background: var(--primary-dark);
}

/* View button styles */
.view-btn {
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
}

.view-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

.view-btn.active {
    color: white;
    background: var(--primary);
}

/* Grid view for positions */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

@media (max-width: 640px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

.portfolio-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portfolio-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.portfolio-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.portfolio-card-info {
    flex: 1;
    min-width: 0;
}

.portfolio-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.portfolio-card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.portfolio-card-stat {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

/* List view */
.portfolio-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}