/* C:\xampp\htdocs\killiman\public\css\skeleton.css */
/* ============================================ */
/* SKELETON LOADING - STYLES */
/* ============================================ */

/* ============================================ */
/* ANIMATION DE BASE */
/* ============================================ */

.skeleton {
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3e 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
    min-height: 20px;
}

@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================ */
/* WRAPPER SKELETON */
/* ============================================ */

.skeleton-wrapper {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}

/* ============================================ */
/* ÉLÉMENTS SKELETON */
/* ============================================ */

/* Image */
.skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3e 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    margin-bottom: 12px;
}

/* Titre */
.skeleton-title {
    width: 70%;
    height: 24px;
    border-radius: 6px;
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3e 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    margin-bottom: 8px;
}

/* Sous-titre */
.skeleton-subtitle {
    width: 50%;
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3e 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    margin-bottom: 12px;
}

/* Texte (multi-lignes) */
.skeleton-text {
    width: 100%;
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3e 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    margin-bottom: 6px;
}

.skeleton-text:last-child {
    width: 60%;
    margin-bottom: 0;
}

/* ============================================ */
/* VARIANTES DE TAILLE */
/* ============================================ */

.skeleton-sm {
    height: 16px;
    min-height: 16px;
}

.skeleton-lg {
    height: 32px;
    min-height: 32px;
}

.skeleton-xl {
    height: 48px;
    min-height: 48px;
}

/* ============================================ */
/* VARIANTES DE LARGEUR */
/* ============================================ */

.skeleton-w-25 { width: 25%; }
.skeleton-w-50 { width: 50%; }
.skeleton-w-75 { width: 75%; }
.skeleton-w-100 { width: 100%; }

/* ============================================ */
/* VARIANTES DE FORME */
/* ============================================ */

.skeleton-circle {
    border-radius: 50%;
    aspect-ratio: 1 / 1;
}

.skeleton-rounded {
    border-radius: 12px;
}

/* ============================================ */
/* CONTENEUR DE GRILLE (pour les cartes) */
/* ============================================ */

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ============================================ */
/* SKELETON QUI EST REMPLACÉ PAR LE CONTENU */
/* ============================================ */

.skeleton-container .real-content {
    display: none;
}

.skeleton-container.loaded .skeleton-content {
    display: none;
}

.skeleton-container.loaded .real-content {
    display: block;
}

/* ============================================ */
/* SKELETON DE CARTE DE QUÊTE */
/* ============================================ */

.skeleton-quest-card {
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}

.skeleton-quest-card .skeleton-image {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
}

.skeleton-quest-card .skeleton-title {
    width: 80%;
    height: 20px;
    margin-top: 12px;
}

.skeleton-quest-card .skeleton-text {
    height: 12px;
    margin-top: 8px;
}

.skeleton-quest-card .skeleton-text:last-child {
    width: 40%;
}

/* ============================================ */
/* SKELETON DE CARTE DE SHORT */
/* ============================================ */

.skeleton-short-card {
    flex: 0 0 140px;
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}

.skeleton-short-card .skeleton-image {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* ============================================ */
/* SKELETON DE CARTE DE PRODUIT (Shop) */
/* ============================================ */

.skeleton-product-card {
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}

.skeleton-product-card .skeleton-image {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    margin-bottom: 12px;
}

.skeleton-product-card .skeleton-title {
    width: 70%;
    height: 18px;
    margin-bottom: 8px;
}

.skeleton-product-card .skeleton-text {
    height: 12px;
    margin-bottom: 6px;
}

.skeleton-product-card .skeleton-price {
    width: 40%;
    height: 20px;
    margin-top: 12px;
}

/* ============================================ */
/* SKELETON DE PROFIL UTILISATEUR */
/* ============================================ */

.skeleton-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
}

.skeleton-profile .skeleton-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-profile .skeleton-info {
    flex: 1;
}

.skeleton-profile .skeleton-info .skeleton-title {
    width: 60%;
    height: 20px;
}

.skeleton-profile .skeleton-info .skeleton-text {
    width: 40%;
    height: 14px;
    margin-top: 6px;
}

/* ============================================ */
/* SKELETON DE BARRE DE PROGRESSION */
/* ============================================ */

.skeleton-progress {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3e 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    margin: 8px 0;
}

/* ============================================ */
/* SKELETON DE BOUTON */
/* ============================================ */

.skeleton-button {
    width: 120px;
    height: 40px;
    border-radius: 40px;
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3e 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */

@media (max-width: 768px) {
    .skeleton-grid {
        grid-template-columns: 1fr;
    }
    
    .skeleton-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .skeleton-profile .skeleton-info .skeleton-title {
        width: 80%;
        margin: 0 auto;
    }
    
    .skeleton-profile .skeleton-info .skeleton-text {
        width: 60%;
        margin: 6px auto 0;
    }
}