﻿/* ===================================================================
   CARTES DE CODES EN ATTENTE - Style Professionnel Compact
   ================================================================ */

.pending-code-card {
    position: relative;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), var(--bg-card));
    border: 2px solid #3b82f6 !important;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.25s ease;
}

    .pending-code-card:hover {
        box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
        transform: translateY(-2px);
    }

/* Badge "En attente" - Style bleu professionnel */
.pending-code-badge {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 5px 11px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

    .pending-code-badge svg {
        width: 13px;
        height: 13px;
        stroke-width: 2.5;
    }

/* Contenu principal de la carte */
.pending-code-card .modal-item-details {
    padding-right: 6.5rem;
}

.pending-code-card .modal-item-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

    .pending-code-card .modal-item-name strong {
        font-weight: 700;
        color: #111827;
        letter-spacing: 0.5px;
        font-family: 'Consolas', 'Monaco', monospace;
    }

.pending-code-card .modal-item-ref {
    font-size: 0.8rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

    .pending-code-card .modal-item-ref svg {
        stroke: #9ca3af;
        flex-shrink: 0;
    }

/* Blocs de permissions - Compact et pro */
.code-permissions {
    margin-top: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

    .code-permissions + .code-permissions {
        margin-top: 0.5rem;
    }

.permission-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

    .permission-label svg {
        stroke: #6b7280;
        flex-shrink: 0;
    }

.permission-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.permission-badge {
    padding: 4px 9px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

    .permission-badge:hover {
        transform: translateY(-1px);
    }

/* Badges marques - Vert professionnel */
.brand-badge {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border: 1px solid #86efac;
}

/* Badges boutiques - Bleu-gris professionnel */
.shop-badge {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Bouton supprimer - Compact */
.pending-code-card .btn-remove {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    padding: 0;
    background: #f3f4f6;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .pending-code-card .btn-remove:hover:not(:disabled) {
        background: #fee2e2;
        border-color: #fecaca;
    }

    .pending-code-card .btn-remove svg {
        stroke: #6b7280;
        transition: stroke 0.2s ease;
    }

    .pending-code-card .btn-remove:hover:not(:disabled) svg {
        stroke: #dc2626;
    }

    .pending-code-card .btn-remove:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* Spinner pour chargement */
.pending-code-card .spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive - Mobile compact */
@media (max-width: 768px) {
    .pending-code-card {
        padding: 0.875rem 1rem;
    }

    .pending-code-badge {
        position: static;
        margin-bottom: 0.75rem;
        align-self: flex-start;
    }

    .pending-code-card .modal-item-details {
        padding-right: 0;
    }

    .pending-code-card .btn-remove {
        position: static;
        transform: none;
        margin-top: 0.75rem;
        width: 100%;
        height: 36px;
    }
}
