* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    /* Optimisation du rendu des images */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Loader de page */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1a1a;  /* Fond noir neutre */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #667eea;  /* Couleur de votre thème */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loader pour les images */
img {
    /* Accélération matérielle */
    transform: translateZ(0);
    will-change: transform;
}

.container {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    /* Optimisation des performances */
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Container Glassmorphism */
.container-glass {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Container Image */
.container-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.profile-section {
    text-align: center;
    margin-bottom: 40px;
}

.avatar-container {
    margin-bottom: 20px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
    /* Optimisation du chargement */
    background: rgba(102, 126, 234, 0.1);
    image-rendering: -webkit-optimize-contrast;
}

.avatar:hover {
    transform: scale(1.05);
}

.name {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.bio {
    font-size: 16px;
    color: #718096;
    font-weight: 400;
}

.links-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #2d3748;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    min-height: 60px;
}

.link-card-tall {
    min-height: 150px;
    align-items: center;
    justify-content: space-between;
}

.link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

/* Styles de boutons */
/* Solid */
.button-solid:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white;
    border-color: #667eea;
}

/* Glassmorphism */
.button-glass {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.button-glass:hover {
    /* La couleur de fond au hover est définie via l'attribut data-glass-hover-bg dans le JS */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Utiliser JavaScript pour appliquer la couleur hover personnalisée */

/* Outline */
.button-outline {
    background: transparent !important;
    border-width: 2px !important;
}

.button-outline:hover {
    background: rgba(102, 126, 234, 0.1) !important;
    border-color: #667eea !important;
    color: #667eea;
}

/* Minimal */
.button-minimal {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.button-minimal:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Gradient */
.button-gradient {
    color: white !important;
}

.button-gradient:hover {
    opacity: 0.9;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Image de fond - hover spécial */
.link-card[style*="background-image"]:hover .link-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
}

.link-card:hover .link-arrow {
    transform: translateX(5px);
}

.link-icon {
    font-size: 24px;
    margin-right: 15px;
    width: 30px;
    height: 24px;
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.link-text {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.link-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
    opacity: 0.6;
    position: relative;
    z-index: 2;
}

.footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.footer p {
    color: #718096;
    font-size: 14px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-card {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.link-card:nth-child(1) { animation-delay: 0.1s; }
.link-card:nth-child(2) { animation-delay: 0.2s; }
.link-card:nth-child(3) { animation-delay: 0.3s; }
.link-card:nth-child(4) { animation-delay: 0.4s; }
.link-card:nth-child(5) { animation-delay: 0.5s; }
.link-card:nth-child(6) { animation-delay: 0.6s; }
.link-card:nth-child(7) { animation-delay: 0.7s; }
.link-card:nth-child(8) { animation-delay: 0.8s; }
.link-card:nth-child(9) { animation-delay: 0.9s; }
.link-card:nth-child(10) { animation-delay: 1.0s; }

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 30px 20px;
    }

    .name {
        font-size: 24px;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }
}
