/**
 * Styles pour le shortcode [wp_coins_gold]
 * Design élégant pour l'affichage des pièces d'or
 */

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */
.wp-coins-gold-container {
    padding: 30px;
    background: linear-gradient(135deg, #1a1511 0%, #2c1f14 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #f4e4c1;
    margin: 20px 0;
}

/* ============================================
   HEADER
   ============================================ */
.wp-coins-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
    flex-wrap: wrap;
    gap: 15px;
}

.wp-coins-title h3 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    letter-spacing: -0.5px;
}

.wp-coins-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.gold-rate,
.eur-rate {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #ffd700;
}

.wp-coins-update {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 13px;
    opacity: 0.8;
}

.clock-icon {
    width: 16px;
    height: 16px;
    color: #ffd700;
}

/* ============================================
   GRILLE DE PIÈCES
   ============================================ */
.wp-coins-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 30px;
}

.wp-coins-columns-1 {
    grid-template-columns: 1fr;
}

.wp-coins-columns-2 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.wp-coins-columns-3 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.wp-coins-columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* ============================================
   CARTE PIÈCE
   ============================================ */
.wp-coin-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
}

.wp-coin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wp-coin-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
}

.wp-coin-card:hover::before {
    opacity: 1;
}

/* ============================================
   IMAGE DE LA PIÈCE
   ============================================ */
.wp-coin-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.wp-coin-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-gold 3s ease-in-out infinite;
}

@keyframes pulse-gold {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

.wp-coin-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.3));
    transition: transform 0.4s ease;
}

.wp-coin-card:hover .wp-coin-image img {
    transform: scale(1.1) rotate(5deg);
}

/* ============================================
   DÉTAILS DE LA PIÈCE
   ============================================ */
.wp-coin-details {
    padding: 20px;
}

.wp-coin-name {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
    line-height: 1.3;
    min-height: 48px;
    display: flex;
    align-items: center;
}

/* ============================================
   SPÉCIFICATIONS
   ============================================ */
.wp-coin-specs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.wp-coin-spec {
    flex: 1;
    min-width: 100px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.spec-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-bottom: 4px;
    color: #ffd700;
}

.spec-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #f4e4c1;
}

/* ============================================
   PRIX
   ============================================ */
.wp-coin-price {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.wp-coin-price::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;
}

.wp-coin-card:hover .wp-coin-price::before {
    left: 100%;
}

.price-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-bottom: 8px;
    color: #ffd700;
}

.price-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    font-weight: 700;
}

.price-value .currency {
    font-size: 18px;
    color: #ffd700;
}

.price-value .amount {
    font-size: 28px;
    color: #ffd700;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-price 3s ease-in-out infinite;
}

@keyframes shimmer-price {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.price-unavailable {
    display: block;
    font-size: 14px;
    color: #ff9999;
    font-style: italic;
}

/* ============================================
   FOOTER
   ============================================ */
.wp-coins-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.wp-coins-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 15px;
    background: rgba(255, 215, 0, 0.05);
    border-left: 3px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(244, 228, 193, 0.8);
}

.info-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #ffd700;
}

/* ============================================
   MESSAGES D'ERREUR
   ============================================ */
.wp-coins-error {
    padding: 20px;
    background: rgba(255, 100, 100, 0.1);
    border: 2px solid rgba(255, 100, 100, 0.3);
    border-radius: 12px;
    color: #ff9999;
    text-align: center;
    font-weight: 500;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wp-coin-card {
    animation: fadeInUp 0.6s ease backwards;
}

.wp-coin-card:nth-child(1) { animation-delay: 0.05s; }
.wp-coin-card:nth-child(2) { animation-delay: 0.1s; }
.wp-coin-card:nth-child(3) { animation-delay: 0.15s; }
.wp-coin-card:nth-child(4) { animation-delay: 0.2s; }
.wp-coin-card:nth-child(5) { animation-delay: 0.25s; }
.wp-coin-card:nth-child(6) { animation-delay: 0.3s; }
.wp-coin-card:nth-child(7) { animation-delay: 0.35s; }
.wp-coin-card:nth-child(8) { animation-delay: 0.4s; }
.wp-coin-card:nth-child(9) { animation-delay: 0.45s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .wp-coins-gold-container {
        padding: 20px;
    }

    .wp-coins-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wp-coins-title h3 {
        font-size: 24px;
    }

    .wp-coins-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .wp-coin-image {
        height: 180px;
    }

    .price-value .amount {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .wp-coins-gold-container {
        padding: 15px;
        border-radius: 12px;
    }

    .wp-coins-title h3 {
        font-size: 20px;
    }

    .wp-coins-info {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .gold-rate,
    .eur-rate {
        width: 100%;
        justify-content: center;
    }

    .wp-coin-image {
        height: 160px;
    }

    .wp-coin-name {
        font-size: 16px;
        min-height: auto;
    }

    .price-value .amount {
        font-size: 20px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .wp-coins-gold-container {
        box-shadow: none;
        border: 1px solid #ddd;
        background: white;
        color: black;
    }

    .wp-coin-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .wp-coin-card:hover {
        transform: none;
    }

    .wp-coin-card::before,
    .wp-coin-price::before {
        display: none;
    }
}

/* ============================================
   EFFET BRILLANT SUR LES CARTES
   ============================================ */
.wp-coin-card {
    position: relative;
    overflow: hidden;
}

.wp-coin-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.wp-coin-card:hover::after {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}
