/**
 * Oddicy VIP Card Styles
 * Styles pour les cartes VIP dans Mon Compte WooCommerce
 * @version 2.0.0
 */

/* Container principal */
.oddicy-vip-card-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Titre de la page */
.oddicy-vip-card-wrapper h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8em;
    color: #1a1a1a;
}

/* Grille des cartes */
.oddicy-vip-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

/* Item de carte individuel */
.oddicy-vip-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Numéro de carte */
.oddicy-vip-card-number {
    font-size: 0.85em;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding: 4px 12px;
    background: #f8f9fa;
    border-radius: 20px;
}

/* Container de la carte */
.oddicy-vip-card-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1.586 / 1; /* Ratio carte bancaire standard */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.oddicy-vip-card-container:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 35px 60px -15px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Image de fond */
.oddicy-vip-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Overlay pour améliorer la lisibilité du code */
.oddicy-vip-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.3) 60%,
        transparent 100%
    );
    z-index: 2;
}

/* Zone du code promo */
.oddicy-vip-code-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 25px 25px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Label du code */
.oddicy-vip-code-label {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    font-weight: 500;
}

/* Code promo affiché */
.oddicy-vip-code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: text;
    user-select: all;
    -webkit-user-select: all;
    -moz-user-select: all;
    -ms-user-select: all;
    transition: all 0.2s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.oddicy-vip-code:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.oddicy-vip-code::selection {
    background: rgba(255, 215, 0, 0.5);
    color: #fff;
}

/* Instructions */
.oddicy-vip-instructions {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #c9a227;
}

.oddicy-vip-instructions p {
    margin: 0;
    color: #495057;
    font-size: 0.95em;
    line-height: 1.6;
}

.oddicy-vip-instructions p.oddicy-vip-tip {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
    font-style: italic;
    color: #6c757d;
}

.oddicy-vip-instructions strong {
    color: #1a1a1a;
}

/* Message codes en attente */
.oddicy-vip-pending-codes {
    text-align: center;
    margin-top: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    border-left: 4px solid #2196f3;
}

.oddicy-vip-pending-codes p {
    margin: 0;
    color: #1565c0;
    font-size: 0.9em;
}

/* Message si pas de VIP */
.oddicy-vip-no-access {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-radius: 12px;
    border: 1px solid #ffc107;
}

.oddicy-vip-no-access h3 {
    color: #856404;
    margin-bottom: 15px;
}

.oddicy-vip-no-access p {
    color: #664d03;
    margin-bottom: 20px;
}

.oddicy-vip-no-access .button,
.oddicy-vip-no-access a.button {
    display: inline-block;
    background: linear-gradient(135deg, #c9a227 0%, #d4af37 100%);
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.oddicy-vip-no-access .button:hover,
.oddicy-vip-no-access a.button:hover {
    background: linear-gradient(135deg, #b8922a 0%, #c9a227 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(201, 162, 39, 0.4);
}

/* Message si code non trouvé */
.oddicy-vip-no-code {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.oddicy-vip-no-code p {
    color: #6c757d;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .oddicy-vip-card-wrapper {
        padding: 15px;
    }

    .oddicy-vip-cards-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .oddicy-vip-card-container {
        border-radius: 12px;
        max-width: 100%;
    }

    .oddicy-vip-code-area {
        padding: 15px 20px 20px;
    }

    .oddicy-vip-code {
        font-size: 1em;
        padding: 8px 16px;
        letter-spacing: 1.5px;
    }

    .oddicy-vip-code-label {
        font-size: 0.6em;
    }
}

@media (max-width: 480px) {
    .oddicy-vip-card-wrapper h2 {
        font-size: 1.4em;
    }

    .oddicy-vip-code {
        font-size: 0.9em;
        padding: 8px 12px;
        letter-spacing: 1px;
    }

    .oddicy-vip-instructions {
        padding: 15px;
    }

    .oddicy-vip-instructions p {
        font-size: 0.85em;
    }
}

/* Animation d'entrée */
@keyframes oddicy-card-appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.oddicy-vip-card-container {
    animation: oddicy-card-appear 0.6s ease-out;
}

/* Animation décalée pour plusieurs cartes */
.oddicy-vip-card-item:nth-child(1) .oddicy-vip-card-container {
    animation-delay: 0s;
}

.oddicy-vip-card-item:nth-child(2) .oddicy-vip-card-container {
    animation-delay: 0.1s;
}

.oddicy-vip-card-item:nth-child(3) .oddicy-vip-card-container {
    animation-delay: 0.2s;
}

.oddicy-vip-card-item:nth-child(4) .oddicy-vip-card-container {
    animation-delay: 0.3s;
}

.oddicy-vip-card-item:nth-child(5) .oddicy-vip-card-container {
    animation-delay: 0.4s;
}

.oddicy-vip-card-item:nth-child(6) .oddicy-vip-card-container {
    animation-delay: 0.5s;
}

.oddicy-vip-card-item:nth-child(n+7) .oddicy-vip-card-container {
    animation-delay: 0.6s;
}

/* Style du menu WooCommerce pour l'onglet VIP */
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--vip-card a {
    position: relative;
}

.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--vip-card a::before {
    content: '⭐';
    margin-right: 8px;
}

.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--vip-card.is-active a {
    background: linear-gradient(135deg, #c9a227 0%, #d4af37 100%);
    color: #fff;
}
