.template-card {
    background: var(--color-surface-alt);
    border-radius: var(--radius-2xl);
    padding: 18px;
    border: 2px solid var(--primary-a20);
    box-shadow: 0 0 15px var(--overlay-black-40);
    transition: 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 20px var(--primary-a50);
}

.avatar-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--color-primary);
}

.template-card-header {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.template-card-body {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-card-body h3 {
    margin: 0;
}

.template-avatar-container {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
}

.template-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--color-primary);
    font-size: 18px;
    border: 2px solid var(--color-primary);
}

/* ✅ Masquer placeholder quand il y a une image */
.template-avatar-container.has-image .avatar-placeholder {
    display: none;
}

.template-card-actions {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.template-card-actions > a,
.template-card-actions > form {
    flex: 1 1 0;
    min-width: 0;
}

.template-card-actions > form {
    display: flex;
}

.template-card-actions .btn {
    width: 100%;
}

.template-card-tag {
    display: inline-flex;
    align-self: center;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    background: var(--primary-a20);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.template-card-meta {
    color: var(--color-text-secondary);
    font-size: 13px;
}


/* FORM GRID */

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.file-row {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.hidden {
    display: none;
}

.template-create-form {
    display: none;
}

.templates-title {
    max-width: none;
}

.char-stats-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stats-grid--funnel {
    margin-top: 10px;
}

.funnel-preview {
    display: block;
    margin-top: 6px;
    color: #6b7280;
}

.funnel-summary {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.funnel-summary p {
    margin: 0 0 6px;
}

.funnel-summary p:last-child {
    margin-bottom: 0;
}
