/* =========================================================================
   Templates premium (portfolio + galerie)
   Chargé par base.html — appliqué uniquement quand le body a la classe
   ad hoc (ex. tpl-editorial). Le CSS du template `classic` reste main.css.
   ========================================================================= */

/* =========================================================================
   PORTFOLIO — EDITORIAL (magazine, serif, 2 colonnes)
   ========================================================================= */
.tpl-editorial { background: #faf7f2; color: #1a1a1a; }
.tpl-editorial .ed-portfolio { padding: 40px 0 80px; }

.tpl-editorial .ed-hero {
    border-bottom: 1px solid #1a1a1a;
    padding: 24px 0 56px;
    margin-bottom: 56px;
}
.tpl-editorial .ed-hero-grid {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px;
    align-items: end;
}
.tpl-editorial .ed-eyebrow {
    text-transform: uppercase; letter-spacing: .25em;
    font-size: .75rem; color: #6b6b6b; margin: 0 0 24px;
}
.tpl-editorial .ed-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: .98; margin: 0 0 16px; font-weight: 700;
}
.tpl-editorial .ed-headline {
    font-family: 'Playfair Display', serif; font-style: italic;
    font-size: 1.4rem; color: #444; margin: 0 0 8px;
}
.tpl-editorial .ed-style {
    font-size: .95rem; color: #777; margin: 0 0 4px;
    text-transform: uppercase; letter-spacing: .12em;
}
.tpl-editorial .ed-loc { color: #777; margin: 0; }

.tpl-editorial .ed-hero-figure {
    margin: 0; aspect-ratio: 4/5; overflow: hidden; border-radius: 2px;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.tpl-editorial .ed-hero-figure img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(.15);
}

.tpl-editorial .ed-quote { margin: 56px auto; max-width: 760px; }
.tpl-editorial .ed-quote blockquote {
    border: 0; margin: 0; padding: 0;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 2.4vw, 2rem); font-style: italic;
    line-height: 1.4; text-align: center; color: #1a1a1a;
}
.tpl-editorial .ed-quote cite {
    display: block; font-style: normal; margin-top: 16px;
    font-size: .85rem; letter-spacing: .15em; text-transform: uppercase;
    color: #888;
}

.tpl-editorial .ed-section { margin: 56px auto; }
.tpl-editorial .ed-section-head {
    display: flex; align-items: baseline; gap: 16px;
    border-bottom: 1px solid #1a1a1a; padding-bottom: 12px;
    margin-bottom: 28px;
}
.tpl-editorial .ed-section-num {
    font-family: 'Playfair Display', serif; font-size: 1.5rem;
    color: #888;
}
.tpl-editorial .ed-section-head h2 {
    font-family: 'Playfair Display', serif; font-size: 2rem;
    margin: 0;
}

.tpl-editorial .ed-bio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.tpl-editorial .ed-bio .ed-section-head { grid-column: 1 / -1; }
.tpl-editorial .ed-bio-col { font-size: 1rem; line-height: 1.75; column-fill: balance; }
.tpl-editorial .ed-bio-col h3 {
    font-family: 'Playfair Display', serif; font-size: 1.05rem;
    margin: 0 0 8px; color: #555;
}

.tpl-editorial .ed-works-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px;
}
.tpl-editorial .ed-work { margin: 0; }
.tpl-editorial .ed-work img {
    width: 100%; aspect-ratio: 4/5; object-fit: cover;
    border-radius: 2px; box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.tpl-editorial .ed-work figcaption {
    margin-top: 14px; display: flex; flex-direction: column; gap: 2px;
    font-size: .9rem;
}
.tpl-editorial .ed-work figcaption strong {
    font-family: 'Playfair Display', serif; font-style: italic;
    font-size: 1.1rem; font-weight: 600;
}
.tpl-editorial .ed-work figcaption span { color: #777; }

.tpl-editorial .ed-cv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }
.tpl-editorial .ed-cv-block h3 {
    font-family: 'Playfair Display', serif; font-size: 1.2rem;
    margin: 0 0 12px; padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}
.tpl-editorial .ed-cv-block ul, .tpl-editorial .ed-training-list { list-style: none; padding: 0; margin: 0; }
.tpl-editorial .ed-cv-block li, .tpl-editorial .ed-training-list li {
    padding: 6px 0; font-size: .95rem; line-height: 1.55;
    border-bottom: 1px dashed #e5e5e5;
}
.tpl-editorial .ed-cv-block li:last-child, .tpl-editorial .ed-training-list li:last-child { border-bottom: 0; }

.tpl-editorial .ed-section-footer {
    text-align: center; margin: 80px auto 0;
    padding-top: 56px; border-top: 1px solid #1a1a1a;
}
.tpl-editorial .ed-end {
    font-family: 'Playfair Display', serif; font-style: italic;
    color: #888; margin: 0 0 24px;
}

@media (max-width: 760px) {
    .tpl-editorial .ed-hero-grid { grid-template-columns: 1fr; gap: 24px; }
    .tpl-editorial .ed-bio { grid-template-columns: 1fr; gap: 20px; }
    .tpl-editorial .ed-works-grid, .tpl-editorial .ed-cv-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   PORTFOLIO — SHOWCASE (immersif, plein-écran, dark)
   ========================================================================= */
.tpl-showcase { background: #0b0b0b; color: #f5f5f5; }
.tpl-showcase .site-header { background: rgba(0,0,0,.7); backdrop-filter: blur(10px); }
.tpl-showcase .site-header a, .tpl-showcase .nav-list a { color: #f5f5f5; }
.tpl-showcase .site-footer { background: #050505; color: #aaa; }

.tpl-showcase .sc-hero {
    min-height: 92vh;
    display: flex; align-items: flex-end;
    background-color: #1a1a1a;
    background-size: cover; background-position: center;
    color: #fff;
    padding: 0 0 80px;
}
.tpl-showcase .sc-hero-inner { width: 100%; }
.tpl-showcase .sc-eyebrow {
    text-transform: uppercase; letter-spacing: .3em;
    font-size: .8rem; color: rgba(255,255,255,.7); margin: 0 0 16px;
}
.tpl-showcase .sc-title {
    font-size: clamp(2.5rem, 7vw, 6rem); line-height: 1;
    margin: 0 0 16px; font-weight: 200; letter-spacing: -.02em;
}
.tpl-showcase .sc-headline { font-size: 1.3rem; color: rgba(255,255,255,.85); margin: 0 0 8px; font-weight: 300; }
.tpl-showcase .sc-meta { color: rgba(255,255,255,.6); margin: 0 0 32px; }
.tpl-showcase .sc-scroll {
    color: rgba(255,255,255,.5); font-size: .85rem;
    letter-spacing: .15em; text-transform: uppercase;
    animation: sc-bob 2s ease-in-out infinite;
}
@keyframes sc-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

.tpl-showcase .sc-works { padding: 0; }
.tpl-showcase .sc-work {
    margin: 0; padding: 80px 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    align-items: center;
}
.tpl-showcase .sc-work:nth-child(even) { direction: rtl; }
.tpl-showcase .sc-work:nth-child(even) > * { direction: ltr; }
.tpl-showcase .sc-work-img {
    aspect-ratio: 4/5;
    background-size: cover; background-position: center;
    background-color: #1a1a1a;
}
.tpl-showcase .sc-work-cap { padding: 0 60px; }
.tpl-showcase .sc-work-num {
    font-size: 4rem; font-weight: 100;
    color: rgba(255,255,255,.15); display: block; margin-bottom: 12px;
}
.tpl-showcase .sc-work-cap h2 {
    font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 300;
    margin: 0 0 12px; color: #fff;
}
.tpl-showcase .sc-work-meta { color: rgba(255,255,255,.6); margin: 0 0 16px; font-size: .9rem; }
.tpl-showcase .sc-work-meta span { display: inline; }
.tpl-showcase .sc-work-desc { color: rgba(255,255,255,.8); line-height: 1.8; max-width: 480px; }

.tpl-showcase .sc-bio {
    max-width: 760px; margin: 80px auto;
    padding: 60px 0; border-top: 1px solid rgba(255,255,255,.1);
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.tpl-showcase .sc-bio h2 {
    font-size: 2rem; font-weight: 200;
    margin: 0 0 32px; letter-spacing: .05em;
}
.tpl-showcase .sc-bio p { line-height: 1.85; color: rgba(255,255,255,.85); margin: 0 0 16px; }
.tpl-showcase .sc-approach { color: rgba(255,255,255,.7); font-style: italic; }
.tpl-showcase .sc-note {
    font-size: 1.2rem; line-height: 1.6;
    border-left: 2px solid rgba(255,255,255,.3);
    padding: 8px 0 8px 24px; margin: 32px 0;
    color: rgba(255,255,255,.85); font-style: italic;
}

.tpl-showcase .sc-cv { padding: 60px 0; }
.tpl-showcase .sc-cv-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px;
}
.tpl-showcase .sc-cv-block h3 {
    font-size: 1rem; text-transform: uppercase; letter-spacing: .2em;
    margin: 0 0 16px; color: rgba(255,255,255,.6); font-weight: 400;
}
.tpl-showcase .sc-cv-block ul { list-style: none; padding: 0; margin: 0; }
.tpl-showcase .sc-cv-block li {
    padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: .92rem; color: rgba(255,255,255,.85);
}
.tpl-showcase .sc-year { color: rgba(255,255,255,.5); font-variant-numeric: tabular-nums; margin-right: 6px; }

.tpl-showcase .sc-end { padding: 80px 0; text-align: center; border-top: 1px solid rgba(255,255,255,.1); }
.tpl-showcase .sc-end .btn-primary {
    background: #fff; color: #0b0b0b; border-radius: 0;
}

@media (max-width: 760px) {
    .tpl-showcase .sc-work { grid-template-columns: 1fr; padding: 40px 0; }
    .tpl-showcase .sc-work:nth-child(even) { direction: ltr; }
    .tpl-showcase .sc-work-cap { padding: 24px; }
    .tpl-showcase .sc-work-num { font-size: 2.5rem; }
}

/* =========================================================================
   GALERIE — BOUTIQUE (grille produit, prix mis en avant)
   ========================================================================= */
.tpl-boutique { background: #fffaf5; }
.tpl-boutique .bq-header {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    padding: 48px 0 36px; border-bottom: 3px solid #f97316;
}
.tpl-boutique .bq-eyebrow {
    text-transform: uppercase; letter-spacing: .2em;
    color: #c2410c; font-weight: 600; font-size: .8rem; margin: 0 0 12px;
}
.tpl-boutique h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 8px; color: #7c2d12; }
.tpl-boutique .bq-tag { color: #9a3412; font-size: 1.1rem; margin: 0 0 16px; }
.tpl-boutique .bq-meta {
    list-style: none; display: flex; gap: 18px; flex-wrap: wrap; padding: 0; margin: 0;
    color: #9a3412; font-size: .9rem;
}
.tpl-boutique .bq-meta a { color: inherit; text-decoration: underline; }

.tpl-boutique .bq-intro { max-width: 760px; padding: 32px 18px; color: #57534e; }

.tpl-boutique .bq-shop { padding: 24px 0 80px; }
.tpl-boutique .bq-shop-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 24px;
}
.tpl-boutique .bq-shop-head h2 { font-size: 1.3rem; color: #7c2d12; margin: 0; }

.tpl-boutique .bq-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}
.tpl-boutique .bq-card {
    background: #fff; border-radius: 10px; overflow: hidden;
    border: 1px solid #fed7aa;
    transition: transform .2s, box-shadow .2s;
    display: flex; flex-direction: column;
}
.tpl-boutique .bq-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(234,88,12,.18);
}
.tpl-boutique .bq-card-img {
    position: relative; aspect-ratio: 4/5;
    background: #ffedd5; overflow: hidden;
}
.tpl-boutique .bq-card-img.is-placeholder { display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.tpl-boutique .bq-card-img img { width: 100%; height: 100%; object-fit: cover; }
.tpl-boutique .bq-badge {
    position: absolute; top: 8px; right: 8px;
    padding: 3px 10px; border-radius: 999px;
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em;
}
.tpl-boutique .bq-badge-avail { background: #16a34a; color: #fff; }
.tpl-boutique .bq-badge-sold { background: #1f2937; color: #fff; }
.tpl-boutique .bq-badge-reserved { background: #ca8a04; color: #fff; }

.tpl-boutique .bq-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.tpl-boutique .bq-card-body h3 { font-size: 1rem; margin: 0 0 4px; color: #1f2937; line-height: 1.3; }
.tpl-boutique .bq-artist { color: #c2410c; font-size: .85rem; margin: 0 0 4px; font-weight: 600; }
.tpl-boutique .bq-spec { color: #78716c; font-size: .8rem; margin: 0 0 8px; }
.tpl-boutique .bq-price {
    font-size: 1.4rem; font-weight: 700; color: #c2410c;
    margin: auto 0 0; padding-top: 8px;
}
.tpl-boutique .bq-price-request {
    font-size: .9rem; font-weight: 500; color: #78716c; font-style: italic;
}

.tpl-boutique .bq-quote { max-width: 720px; margin: 0 auto 64px; }
.tpl-boutique .bq-quote blockquote {
    border-left: 4px solid #f97316;
    padding: 16px 24px; margin: 0; color: #7c2d12;
    font-style: italic; font-size: 1.05rem;
}

/* =========================================================================
   GALERIE — PRESTIGE (luxe, noir/or, serif)
   ========================================================================= */
.tpl-prestige { background: #0c0a09; color: #f5f3ee; }
.tpl-prestige .site-header { background: rgba(12,10,9,.7); backdrop-filter: blur(10px); border-bottom: 1px solid #1f1d1b; }
.tpl-prestige .site-header a, .tpl-prestige .nav-list a { color: #f5f3ee; }
.tpl-prestige .site-footer { background: #050403; color: #888; border-top: 1px solid #1f1d1b; }
.tpl-prestige .accent { color: #d4a574; }

.tpl-prestige .pr-hero {
    padding: 96px 0 72px; text-align: center;
    border-bottom: 1px solid #1f1d1b;
}
.tpl-prestige .pr-eyebrow {
    color: #d4a574; letter-spacing: .4em; font-size: .8rem;
    margin: 0 0 24px; font-weight: 500;
}
.tpl-prestige .pr-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 700; margin: 0 0 16px; line-height: 1.05;
    color: #fff;
}
.tpl-prestige .pr-tagline {
    font-family: 'Playfair Display', serif; font-style: italic;
    color: #c4b8a3; font-size: 1.3rem; margin: 0 0 32px;
}
.tpl-prestige .pr-divider {
    width: 64px; height: 1px; background: #d4a574; margin: 32px auto;
}
.tpl-prestige .pr-meta {
    list-style: none; display: flex; justify-content: center; gap: 32px;
    flex-wrap: wrap; padding: 0; margin: 0;
    color: rgba(245,243,238,.65); font-size: .9rem; letter-spacing: .08em;
}
.tpl-prestige .pr-meta a { color: #d4a574; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s; }
.tpl-prestige .pr-meta a:hover { border-bottom-color: #d4a574; }

.tpl-prestige .pr-section { padding: 64px 0; }
.tpl-prestige .pr-h2 {
    font-family: 'Playfair Display', serif; font-size: 2rem;
    margin: 0 0 28px; color: #fff;
    border-bottom: 1px solid #2a2723; padding-bottom: 12px;
}
.tpl-prestige .pr-h2-center { text-align: center; border-bottom: 0; }
.tpl-prestige .pr-h2-center::after {
    content: ""; display: block; width: 64px; height: 1px;
    background: #d4a574; margin: 16px auto 0;
}
.tpl-prestige .pr-text {
    font-size: 1.05rem; line-height: 1.85; color: rgba(245,243,238,.85);
    max-width: 720px;
}
.tpl-prestige .pr-quote {
    border: 0; padding: 0; margin: 0; text-align: center;
    font-family: 'Playfair Display', serif; font-style: italic;
    font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: 1.5;
    color: #d4a574;
}
.tpl-prestige .pr-quote::before, .tpl-prestige .pr-quote::after { content: '"'; opacity: .4; }

.tpl-prestige .pr-works { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }
.tpl-prestige .pr-work { margin: 0; }
.tpl-prestige .pr-work-img {
    aspect-ratio: 1/1; overflow: hidden;
    background: #1a1816; position: relative;
    border: 1px solid #2a2723;
}
.tpl-prestige .pr-work-img.is-placeholder { display: flex; align-items: center; justify-content: center; font-size: 3rem; color: #d4a574; opacity: .4; }
.tpl-prestige .pr-work-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.tpl-prestige .pr-work:hover .pr-work-img img { transform: scale(1.04); }
.tpl-prestige .pr-work-cap { padding: 16px 0 0; text-align: center; }
.tpl-prestige .pr-work-cap h3 {
    font-family: 'Playfair Display', serif; font-size: 1.2rem;
    margin: 0 0 4px; color: #fff;
}
.tpl-prestige .pr-work-artist { color: #d4a574; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 4px; }
.tpl-prestige .pr-work-meta { color: rgba(245,243,238,.5); font-size: .82rem; margin: 0; font-style: italic; }

.tpl-prestige .pr-footer {
    padding: 56px 0; text-align: center;
    border-top: 1px solid #2a2723;
}
.tpl-prestige .pr-end {
    font-family: 'Playfair Display', serif; font-style: italic;
    color: #d4a574; letter-spacing: .15em;
}

@media (max-width: 760px) {
    .tpl-prestige .pr-hero { padding: 64px 0 48px; }
    .tpl-prestige .pr-meta { gap: 16px; }
    .tpl-prestige .pr-section { padding: 40px 0; }
    .tpl-prestige .pr-works { grid-template-columns: 1fr; }
}

/* =========================================================================
   PAGE PREVIEW DES TEMPLATES (vitrine + admin)
   ========================================================================= */
.tpl-vitrine-hero {
    padding: 80px 0 48px;
    background: linear-gradient(135deg, #faf5ff 0%, #eff6ff 100%);
    border-bottom: 1px solid #e9d5ff;
    text-align: center;
}
.tpl-vitrine-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 14px; }
.tpl-vitrine-hero .lead { font-size: 1.1rem; color: #475569; max-width: 720px; margin: 0 auto; }

.tpl-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px; padding: 56px 0;
}
.tpl-grid-iframe { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

/* Iframe preview — l'iframe est rendu à FRAME_W × FRAME_H, puis scaled
   dynamiquement (JS) pour remplir EXACTEMENT le wrap. */
:root { --tpl-frame-w: 1280px; --tpl-frame-h: 800px; }
.tpl-iframe-wrap {
    position: relative; display: block;
    aspect-ratio: 1280 / 800;
    overflow: hidden;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    text-decoration: none;
}
.tpl-card-iframe iframe {
    position: absolute; top: 0; left: 0;
    border: 0;
    width: var(--tpl-frame-w);
    height: var(--tpl-frame-h);
    transform: scale(var(--tpl-scale, 0.5));
    transform-origin: 0 0;
    pointer-events: none;
    background: #fff;
}
.tpl-iframe-overlay {
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(15, 23, 42, .85);
    color: #fff;
    padding: 5px 12px; border-radius: 999px;
    font-size: .72rem; font-weight: 600;
    opacity: 0; transition: opacity .2s;
    backdrop-filter: blur(8px);
    z-index: 2;
}
.tpl-iframe-wrap:hover .tpl-iframe-overlay,
.tpl-iframe-wrap:focus .tpl-iframe-overlay { opacity: 1; }
.tpl-tag.is-active { background: #fef3c7; color: #92400e; }

.tpl-howto {
    text-align: center; margin: 56px 0 80px; padding: 36px 24px;
    background: linear-gradient(135deg, #faf5ff, #eff6ff);
    border-radius: 16px; border: 1px solid #e9d5ff;
}
.tpl-howto h2 { margin: 0 0 12px; color: #4c1d95; }
.tpl-howto p { color: #475569; max-width: 640px; margin: 0 auto 12px; }

@media (max-width: 760px) {
    .tpl-grid-iframe { grid-template-columns: 1fr; }
}
.tpl-card {
    background: #fff; border-radius: 16px; overflow: hidden;
    border: 1.5px solid #e9d5ff;
    box-shadow: 0 8px 24px rgba(124,58,237,.08);
    display: flex; flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.tpl-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(124,58,237,.16); }
.tpl-card-preview {
    aspect-ratio: 16/10; background: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: .9rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, var(--tpl-bg-1, #faf5ff), var(--tpl-bg-2, #eff6ff));
    color: var(--tpl-fg, #4c1d95);
    font-weight: 600;
    text-align: center; padding: 24px;
}
.tpl-card[data-tpl="classic"] { --tpl-bg-1: #faf5ff; --tpl-bg-2: #eff6ff; --tpl-fg: #4c1d95; }
.tpl-card[data-tpl="editorial"] { --tpl-bg-1: #faf7f2; --tpl-bg-2: #ede4d3; --tpl-fg: #1a1a1a; }
.tpl-card[data-tpl="showcase"] { --tpl-bg-1: #1a1a1a; --tpl-bg-2: #0b0b0b; --tpl-fg: #f5f5f5; }
.tpl-card[data-tpl="boutique"] { --tpl-bg-1: #fff7ed; --tpl-bg-2: #fed7aa; --tpl-fg: #7c2d12; }
.tpl-card[data-tpl="prestige"] { --tpl-bg-1: #1a1816; --tpl-bg-2: #0c0a09; --tpl-fg: #d4a574; }

.tpl-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.tpl-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-tag {
    background: #f3e8ff; color: #6d28d9;
    padding: 3px 10px; border-radius: 999px;
    font-size: .7rem; font-weight: 600;
}
.tpl-tag.is-free { background: #dcfce7; color: #166534; }
.tpl-tag.is-premium { background: #fef3c7; color: #92400e; }
.tpl-card h3 { font-size: 1.4rem; margin: 0; color: #1e1b4b; }
.tpl-card-tagline { color: #475569; font-size: .92rem; margin: 0; }
.tpl-card-desc { color: #64748b; font-size: .88rem; line-height: 1.55; margin: 0; }
.tpl-card-price {
    font-size: 1.5rem; font-weight: 700; color: #6d28d9;
    margin-top: auto;
}
.tpl-card-price.is-free { color: #16a34a; }
.tpl-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tpl-card-actions .btn { flex: 1; min-width: 100px; }

@media (max-width: 540px) {
    .tpl-grid { grid-template-columns: 1fr; gap: 18px; padding: 32px 0; }
}
