/**
 * ME Bio Link - Styles pour les pages publiques
 * Version: 1.0
 */

/* Variables CSS par défaut */
:root {
    --primary-color: #8B5CF6;
    --secondary-color: #A855F7;
    --accent-color: #EC4899;
    --background-color: #0A0A0A;
    --surface-color: #1A1A1A;
    --card-color: rgba(255, 255, 255, 0.05);
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container principal */
.bio-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.bio-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.bio-avatar {
    margin-bottom: 20px;
}

.bio-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.bio-avatar img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin: 0 auto;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.avatar-placeholder:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.bio-info {
    max-width: 400px;
    margin: 0 auto;
}

.bio-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bio-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.bio-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.bio-location,
.bio-website {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.bio-website:hover {
    color: var(--primary-color);
}

/* Liens */
.bio-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.bio-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(20px);
}

.bio-link.animate-in {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.5s ease-out forwards;
}

.bio-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.bio-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--link-color, var(--primary-color));
}

.bio-link:hover::before {
    left: 100%;
}

.link-icon {
    width: 48px;
    height: 48px;
    background: var(--link-color, var(--primary-color));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    transition: var(--transition);
}

.bio-link:hover .link-icon {
    transform: scale(1.1);
}

.link-content {
    flex: 1;
    min-width: 0;
}

.link-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-word;
}

.link-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}

.link-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.click-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-color);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-text {
    font-size: 18px;
    font-weight: 500;
}

/* Footer */
.bio-footer {
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.footer-content p {
    font-size: 14px;
    color: var(--text-muted);
}

.heart {
    color: var(--accent-color);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.footer-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .bio-container {
        padding: 16px;
    }
    
    .bio-header {
        margin-bottom: 32px;
    }
    
    .bio-avatar img,
    .avatar-placeholder {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
    
    .bio-name {
        font-size: 24px;
    }
    
    .bio-description {
        font-size: 15px;
    }
    
    .bio-link {
        padding: 16px;
        gap: 12px;
    }
    
    .link-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .link-title {
        font-size: 16px;
    }
    
    .link-description {
        font-size: 13px;
    }
}

@media (max-width: 320px) {
    .bio-container {
        padding: 12px;
    }
    
    .bio-avatar img,
    .avatar-placeholder {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .bio-name {
        font-size: 20px;
    }
    
    .bio-link {
        padding: 12px;
        gap: 10px;
    }
    
    .link-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* Thèmes spécifiques */
.theme-dark {
    --background-color: #000000;
    --surface-color: #111111;
    --card-color: rgba(255, 255, 255, 0.03);
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-muted: #666666;
    --border-color: rgba(255, 255, 255, 0.08);
}

.theme-light {
    --background-color: #FFFFFF;
    --surface-color: #F8FAFC;
    --card-color: rgba(0, 0, 0, 0.05);
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border-color: rgba(0, 0, 0, 0.1);
}

.theme-neon {
    --primary-color: #00FF88;
    --secondary-color: #00D4FF;
    --accent-color: #FF0080;
    --background-color: #0A0A0A;
    --surface-color: #1A1A1A;
    --card-color: rgba(0, 255, 136, 0.1);
    --text-primary: #FFFFFF;
    --text-secondary: #00FF88;
    --text-muted: #00D4FF;
    --border-color: rgba(0, 255, 136, 0.3);
}

.theme-gradient {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #45B7D1;
    --background-color: #0A0A0A;
    --surface-color: #1A1A1A;
    --card-color: rgba(255, 107, 107, 0.1);
    --text-primary: #FFFFFF;
    --text-secondary: #FF6B6B;
    --text-muted: #4ECDC4;
    --border-color: rgba(255, 107, 107, 0.3);
}

/* Effets spéciaux */
.bio-link:hover {
    background: var(--card-color);
    box-shadow: 
        0 0 20px rgba(139, 92, 246, 0.3),
        var(--shadow-lg);
}

.theme-neon .bio-link:hover {
    box-shadow: 
        0 0 20px rgba(0, 255, 136, 0.5),
        var(--shadow-lg);
}

.theme-gradient .bio-link:hover {
    box-shadow: 
        0 0 20px rgba(255, 107, 107, 0.5),
        var(--shadow-lg);
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible */
.bio-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .bio-container {
        max-width: none;
        padding: 0;
    }
    
    .bio-link {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .bio-footer {
        display: none;
    }
}

/* Mode sombre automatique */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #0A0A0A;
        --surface-color: #1A1A1A;
        --card-color: rgba(255, 255, 255, 0.05);
        --text-primary: #FFFFFF;
        --text-secondary: #9CA3AF;
        --text-muted: #6B7280;
        --border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Mode clair automatique */
@media (prefers-color-scheme: light) {
    :root {
        --background-color: #FFFFFF;
        --surface-color: #F8FAFC;
        --card-color: rgba(0, 0, 0, 0.05);
        --text-primary: #1F2937;
        --text-secondary: #6B7280;
        --text-muted: #9CA3AF;
        --border-color: rgba(0, 0, 0, 0.1);
    }
}