/**
 * Tuiles cartes — composant partagé
 * Utilisé sur : dashboard, profil (édition), profil public.
 */

.card-tile {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 0;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card-tile:hover {
    border-color: rgba(79, 141, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Bandeau titre */
.tile-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.75rem 1rem;
    background: var(--bg-mid);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.tile-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(180deg, var(--accent, #4f8dff) 0%, var(--color-secondary, #ffd54f) 100%);
}

.tile-heading h2 {
    margin: 0;
    font-weight: 700;
    font-size: var(--h2-size);
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text);
}

/* Contenu sous le bandeau */
.card-tile > :not(.tile-heading) {
    padding-left: 1rem;
    padding-right: 1rem;
}

.card-tile > .tile-heading + * {
    padding-top: 0.9rem;
}

.card-tile > :last-child {
    padding-bottom: 1rem;
}

.tile-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 2.4rem;
    padding: 0.2rem 0.55rem;
    border: 1px solid rgba(79, 141, 255, 0.1);
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(79, 141, 255, 0.1);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-title);
    white-space: nowrap;
    flex-shrink: 0;
}

.tile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tile-actions .btn {
    flex: 1 1 auto;
    text-align: center;
}

@media (max-width: 479px) {
    .tile-actions {
        flex-direction: column;
    }

    .tile-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
