/* Frontend Styles for Virtual Business Card - Enhanced Version */

/* Container */
.vbc-card-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

/* Card principale avec effet glassmorphism */
.vbc-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: fadeInUp 0.6s ease-out;
}

.vbc-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Bannière personnalisée */
.vbc-card-banner {
    position: relative;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.vbc-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

/* En-tête avec dégradé moderne (fallback si pas de bannière) */
.vbc-card-header {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.vbc-header-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.vbc-header-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Avatar wrapper pour positionnement */
.vbc-card-avatar-wrapper {
    position: relative;
    margin-top: -60px;
    display: flex;
    justify-content: center;
    z-index: 2;
}

/* Avatar avec initiales ou photo */
.vbc-card-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.2),
        0 0 0 6px rgba(255, 255, 255, 1);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.vbc-card:hover .vbc-card-avatar {
    transform: scale(1.05);
}

.vbc-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vbc-avatar-initials {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
}

/* Corps de la carte */
.vbc-card-body {
    padding: 20px 32px 32px;
}

/* Nom */
.vbc-card-name {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 20px 0;
    color: #1a202c;
    letter-spacing: -0.5px;
}

/* Bouton vCard */
.vbc-download-vcard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.vbc-download-vcard:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.vbc-download-vcard:active {
    transform: translateY(0);
}

.vbc-download-vcard .vbc-icon {
    width: 20px;
    height: 20px;
}

.vbc-icon-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Informations de contact */
.vbc-contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.vbc-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out backwards;
}

.vbc-contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.vbc-contact-item:hover::before {
    left: 100%;
}

.vbc-contact-item:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.vbc-contact-item:nth-child(1) {
    animation-delay: 0.1s;
}

.vbc-contact-item:nth-child(2) {
    animation-delay: 0.2s;
}

.vbc-contact-item:nth-child(3) {
    animation-delay: 0.3s;
}

.vbc-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.vbc-contact-item:hover .vbc-icon {
    transform: scale(1.1);
}

.vbc-contact-item span:not(.vbc-label) {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

.vbc-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.vbc-contact-item:hover .vbc-label {
    background: rgba(255, 255, 255, 0.2);
}

/* Divider */
.vbc-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 20px 0;
}

/* Réseaux sociaux */
.vbc-social-links {
    margin-top: 30px;
}

.vbc-social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.vbc-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out backwards;
}

.vbc-social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vbc-social-link svg {
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.vbc-social-link:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.vbc-social-link:hover::before {
    opacity: 1;
}

.vbc-social-link:hover svg {
    color: #ffffff !important;
    transform: scale(1.1);
}

/* Animation delays pour les réseaux sociaux */
.vbc-social-link:nth-child(1) {
    animation-delay: 0.4s;
}

.vbc-social-link:nth-child(2) {
    animation-delay: 0.45s;
}

.vbc-social-link:nth-child(3) {
    animation-delay: 0.5s;
}

.vbc-social-link:nth-child(4) {
    animation-delay: 0.55s;
}

.vbc-social-link:nth-child(5) {
    animation-delay: 0.6s;
}

.vbc-social-link:nth-child(6) {
    animation-delay: 0.65s;
}

.vbc-social-link:nth-child(7) {
    animation-delay: 0.7s;
}

.vbc-social-link:nth-child(8) {
    animation-delay: 0.75s;
}

/* Styles des champs personnalisés */
.vbc-custom-fields-section {
    margin-bottom: 30px;
}

.vbc-custom-field {
    animation-delay: 0.35s;
}

.vbc-field-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vbc-field-content a {
    text-decoration: none;
    color: inherit;
}

.vbc-text-multiline {
    white-space: pre-line;
    line-height: 1.5;
}

/* Couleurs d'icônes spécifiques pour les champs personnalisés */
.vbc-field-email .vbc-icon {
    color: #ea4335;
}

.vbc-field-phone .vbc-icon {
    color: #34a853;
}

.vbc-field-url .vbc-icon {
    color: #4285f4;
}

.vbc-field-textarea .vbc-icon {
    color: #fbbc05;
}

.vbc-field-text .vbc-icon {
    color: #667eea;
}

/* Couleurs spécifiques pour chaque réseau social */
.vbc-social-linkedin svg {
    color: #0077b5;
}

.vbc-social-twitter svg {
    color: #1da1f2;
}

.vbc-social-facebook svg {
    color: #1877f2;
}

.vbc-social-instagram svg {
    color: #e4405f;
}

.vbc-social-github svg {
    color: #333333;
}

.vbc-social-youtube svg {
    color: #ff0000;
}

.vbc-social-tiktok svg {
    color: #000000;
}

.vbc-social-website svg {
    color: #667eea;
}

/* Liens personnalisés */
.vbc-custom-links {
    margin-top: 30px;
}

.vbc-custom-links-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.vbc-custom-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out backwards;
}

.vbc-custom-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.vbc-custom-link:hover::before {
    left: 100%;
}

.vbc-custom-link:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.vbc-custom-link span {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

.vbc-external-icon {
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

.vbc-custom-link:hover .vbc-external-icon {
    opacity: 1;
}

/* Animation delays pour les liens personnalisés */
.vbc-custom-link:nth-child(1) {
    animation-delay: 0.8s;
}

.vbc-custom-link:nth-child(2) {
    animation-delay: 0.85s;
}

.vbc-custom-link:nth-child(3) {
    animation-delay: 0.9s;
}

.vbc-custom-link:nth-child(4) {
    animation-delay: 0.95s;
}

.vbc-custom-link:nth-child(5) {
    animation-delay: 1s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vbc-card-container {
        padding: 15px;
        margin: 20px auto;
    }

    .vbc-card-banner {
        height: 180px;
    }

    .vbc-card-header {
        height: 150px;
    }

    .vbc-card-avatar {
        width: 100px;
        height: 100px;
    }

    .vbc-avatar-initials {
        font-size: 40px;
    }

    .vbc-card-body {
        padding: 20px 24px 24px;
    }

    .vbc-card-name {
        font-size: 26px;
    }

    .vbc-download-vcard {
        padding: 12px 20px;
        font-size: 15px;
    }

    .vbc-contact-item {
        padding: 14px 16px;
    }

    .vbc-contact-item span:not(.vbc-label) {
        font-size: 14px;
    }

    .vbc-social-grid {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        gap: 10px;
    }

    .vbc-social-link svg {
        width: 24px;
        height: 24px;
    }

    .vbc-custom-link {
        padding: 12px 16px;
    }

    .vbc-custom-link span {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .vbc-card-name {
        font-size: 22px;
    }

    .vbc-contact-item {
        flex-wrap: wrap;
    }

    .vbc-label {
        margin-left: 36px;
    }
}

/* Mode sombre (si le thème WordPress le supporte) */
@media (prefers-color-scheme: dark) {
    .vbc-card {
        background: linear-gradient(135deg, rgba(26, 32, 44, 0.95) 0%, rgba(45, 55, 72, 0.9) 100%);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .vbc-card-name {
        color: #f7fafc;
    }

    .vbc-contact-item,
    .vbc-custom-link {
        background: linear-gradient(135deg, rgba(45, 55, 72, 0.8) 0%, rgba(26, 32, 44, 0.8) 100%);
        color: #e2e8f0;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .vbc-social-link {
        background: linear-gradient(135deg, rgba(45, 55, 72, 0.8) 0%, rgba(26, 32, 44, 0.8) 100%);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .vbc-divider {
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    }
}

/* Animations d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}