/* ============================================
   CARTES OUTILS COMPACTES - Version 2.0
   Design visuel avec tags et logos
   ============================================ */

/* ========================================
   STRUCTURE GÉNÉRALE DE LA CARTE
   ======================================== */

.tool-card {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.25rem; /* Réduit de var(--spacing-xl) */
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.tool-card.hidden {
    display: none;
}

.tool-card.featured {
    border: 2px solid #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), rgba(251, 191, 36, 0.02));
}

/* ========================================
   HEADER DE LA CARTE (Logo + Nom + Badge RGPD)
   ======================================== */

.tool-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

/* Logo de l'outil */
.tool-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: white;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

/* Fallback avec icône FontAwesome si logo non disponible */
.tool-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-icon-wrapper i {
    font-size: 1.5rem;
    color: var(--white);
}

/* Groupe titre + provider */
.tool-title-group {
    flex: 1;
    min-width: 0;
}

.tool-title-group h3 {
    margin: 0;
    font-size: 1.25rem; /* Réduit de 1.5rem */
    color: var(--dark);
    font-weight: 700;
}

.tool-provider {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
    margin-top: 0.15rem;
    display: block;
}

/* Badge RGPD discret */
.badge-rgpd-small {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    position: absolute;
    top: 0;
    right: 0;
}

.badge-rgpd-small.souverain {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

/* ========================================
   TAGS CAS D'USAGE (Badges)
   ======================================== */

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
}

.tag {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #374151;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.tag:hover {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.15);
}

/* Indicateur "+X" pour tags supplémentaires */
.tag-more {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    padding: 0.35rem 0.65rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: help;
    min-width: 28px;
    text-align: center;
    transition: all 0.2s ease;
}

.tag-more:hover {
    background: linear-gradient(135deg, #6d28d9, #5b21b6);
    transform: scale(1.1);
}

/* ========================================
   TARIF COMPACT
   ======================================== */

.tool-pricing-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-radius: 10px;
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9rem;
    border: 1px solid #e5e7eb;
}

.tool-pricing-compact i {
    color: #10b981;
    font-size: 1rem;
}

/* ========================================
   BOUTONS COMPACTS
   ======================================== */

.tool-actions-compact {
    display: flex;
    gap: 0.5rem;
    margin-top: auto; /* Pousse les boutons en bas */
}

.btn-compact {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    flex: 1;
    justify-content: center;
}

.btn-compact i {
    font-size: 0.9rem;
}

.btn-compact.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-compact.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-compact.btn-secondary {
    background: #f0d5b8; /* Abricot/orangé doux */
    color: #7d5a3d; /* Marron chaud */
    border: 1px solid #e5c4a0;
}

.btn-compact.btn-secondary:hover {
    background: #e5c4a0; /* Orangé plus soutenu au hover */
    color: #6b4d32; /* Marron plus foncé */
    border-color: #d9b38a;
}

/* Bouton d'affiliation (style spécial) */
.btn-affiliate {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-affiliate:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

/* ========================================
   ANCIEN STYLE (à supprimer progressivement)
   ======================================== */

/* Ces classes seront supprimées une fois toutes les cartes migrées */
.tool-description,
.tool-features,
.tool-meta {
    display: none; /* Caché temporairement pendant migration */
}

/* ========================================
   RESPONSIVE MOBILE
   ======================================== */

@media (max-width: 768px) {
    .tool-card {
        padding: 1rem;
    }

    .tool-logo,
    .tool-icon-wrapper {
        width: 45px;
        height: 45px;
    }

    .tool-title-group h3 {
        font-size: 1.1rem;
    }

    .tool-provider {
        font-size: 0.75rem;
    }

    .badge-rgpd-small {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }

    .tool-tags {
        gap: 0.4rem;
    }

    .tag {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }

    .tool-pricing-compact {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }

    .btn-compact {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }

    .tool-actions-compact {
        flex-direction: column;
    }

    .btn-compact {
        width: 100%;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeInCard 0.3s ease;
}

/* ========================================
   TOOLTIP POUR TAG-MORE
   ======================================== */

.tag-more[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tag-more[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
}
