/* Thème Jupiter — contrôles de personnalisation (bloc admin + panneau « Mon thème »). Chargé quel que soit le thème. */

/* ── Contrôles communs ──────────────────────────────────────────────── */
.jt-seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: #eef2f7;
}

.jt-seg-btn {
    padding: 5px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #52607a;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s, color .15s, box-shadow .15s;
}

.jt-seg-btn:hover { color: #14213d; }

.jt-seg-btn.is-on {
    background: #fff;
    color: var(--jp-accent, var(--jt-accent, #1a4fd6));
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 1px 3px rgba(16, 24, 40, .1);
}

.jt-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.jt-switch input { position: absolute; opacity: 0; pointer-events: none; }

.jt-switch-ui {
    position: relative;
    flex: none;
    width: 32px;
    height: 18px;
    border-radius: 999px;
    background: #cfd8e5;
    transition: background-color .2s;
}

.jt-switch-ui::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .25);
    transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}

.jt-switch input:checked + .jt-switch-ui { background: var(--jp-accent, var(--jt-accent, #1a4fd6)); }
.jt-switch input:checked + .jt-switch-ui::after { transform: translateX(14px); }
.jt-switch input:focus-visible + .jt-switch-ui { box-shadow: 0 0 0 3px rgba(26, 79, 214, .25); }

/* ── Panneau « Mon thème » ──────────────────────────────────────────── */
.jp-hc-pop.jt-pk { width: 296px; max-height: calc(100vh - 70px); overflow-y: auto; }

.jt-pk-label {
    margin: 12px 0 6px;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #8a96ab;
}

.jt-pk .jp-hc-sub + .jt-pk-label { margin-top: 4px; padding-top: 0; border-top: 0; }
.jt-pk .jt-seg { display: flex; }
.jt-pk .jt-seg-btn { flex: 1 1 0; }
.jt-pk-anim { display: flex; margin: 12px 0 0; padding: 0; }

.jt-pk-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 12px;
    padding: 7px 10px;
    border: 1px dashed #cfd8e5;
    border-radius: 8px;
    background: transparent;
    color: #52607a;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.jt-pk-reset:hover { border-color: var(--jp-accent, #1a4fd6); color: var(--jp-accent, #1a4fd6); }

/* ── Bloc admin ─────────────────────────────────────────────────────── */
.jt-admin {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #e3e9f2;
    border-radius: 14px;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(26, 79, 214, .06), transparent 60%),
        #fff;
    font-family: 'Lexend Deca', system-ui, sans-serif;
    color: #14213d;
}

.jt-admin-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.jt-admin-badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #0d2b6b, #1a4fd6);
    box-shadow: 0 8px 18px -10px rgba(13, 43, 107, .7);
    transform: rotate(-8deg);
}

.jt-admin-title { font-family: 'DM Serif Display', Georgia, serif; font-size: 19px; line-height: 1.15; }
.jt-admin-sub { margin-top: 2px; font-size: 12px; color: #52607a; }

.jt-admin-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.jt-admin-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: start;
    gap: 6px 12px;
    padding: 10px 0;
    border-top: 1px solid #eef2f7;
}

.jt-admin-row:first-child { border-top: 0; padding-top: 0; }

.jt-admin-label {
    padding-top: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #8a96ab;
}

.jt-admin-swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; max-width: 360px; }
.jt-admin-swatches .jp-hc-sw { height: 30px; }
.jt-admin .jp-hc-custom { margin-top: 8px; }
.jt-admin-styles { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); margin-top: 0; max-width: 420px; }
.jt-admin-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; padding-top: 4px; }

.jt-admin-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.jt-admin-hint { font-size: 12px; color: #52607a; }

@media (max-width: 520px) {
    .jt-admin-row { grid-template-columns: minmax(0, 1fr); }
    .jt-admin-label { padding-top: 0; }
    .jt-admin-swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Mini-maquette */
.jt-admin-preview {
    --pv-accent: #1a4fd6;
    --pv-soft: #eef3fe;
    --pv-glow: #60a5fa;
    --pv-hero: linear-gradient(135deg, #0d2b6b, #123a9e 55%, #1a4fd6);
    --pv-side: linear-gradient(180deg, #0d2b6b, #081a40);
    --pv-radius: 7px;
    position: relative;
    display: flex;
    height: 168px;
    overflow: hidden;
    border: 1px solid #e3e9f2;
    border-radius: calc(var(--pv-radius) + 4px);
    background: #f4f7fb;
    box-shadow: 0 12px 32px -18px rgba(15, 42, 74, .45);
}

.jt-admin-preview:not(.no-orbit)::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--pv-accent) 12%, transparent) 0 1px, transparent 1px 18px),
        radial-gradient(color-mix(in srgb, var(--pv-accent) 16%, transparent) 1px, transparent 1.3px) 0 0 / 10px 10px;
    -webkit-mask-image: radial-gradient(110% 90% at 100% 0%, #000, transparent 75%);
    mask-image: radial-gradient(110% 90% at 100% 0%, #000, transparent 75%);
}

.jt-pv-side {
    position: relative;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 64px;
    padding: 10px 8px;
    background: var(--pv-side);
}

.jt-admin-preview[data-sidebar="light"] .jt-pv-side { border-right: 1px solid #e3e9f2; }

.jt-pv-side i {
    display: block;
    height: 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .22);
}

.jt-pv-side i.jt-pv-logo { width: 70%; height: 9px; margin-bottom: 6px; background: rgba(255, 255, 255, .75); }

.jt-pv-side i.is-on {
    height: 12px;
    background: rgba(255, 255, 255, .2);
    box-shadow: -3px 0 0 var(--pv-glow);
}

.jt-admin-preview[data-sidebar="light"] .jt-pv-side i { background: #e3e9f2; }
.jt-admin-preview[data-sidebar="light"] .jt-pv-side i.jt-pv-logo { background: var(--pv-accent); }
.jt-admin-preview[data-sidebar="light"] .jt-pv-side i.is-on { background: var(--pv-soft); box-shadow: -3px 0 0 var(--pv-accent); }
.jt-admin-preview[data-sidebar="accent"] .jt-pv-side i.is-on { box-shadow: -3px 0 0 #fff; }

.jt-pv-main { position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 0 10px 10px; }

.jt-pv-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 20px;
    margin: 0 -10px;
    padding: 0 10px;
    background: rgba(255, 255, 255, .6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #e3e9f2;
}

.jt-admin-preview.no-glass .jt-pv-top { background: #fff; }
.jt-pv-top i { width: 64px; height: 8px; border-radius: 999px; border: 1px solid #e3e9f2; background: #f8fafd; }

.jt-pv-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    padding: 0 12px;
    border-radius: var(--pv-radius);
    background: var(--pv-hero);
    color: #fff;
}

.jt-pv-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-radial-gradient(circle at 96% 50%, rgba(255, 255, 255, .1) 0 1px, transparent 1px 12px);
    -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000);
    mask-image: linear-gradient(90deg, transparent 40%, #000);
}

.jt-pv-hero b { position: relative; font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 16px; }
.jt-admin-preview[data-title="sans"] .jt-pv-hero b { font-family: 'Lexend Deca', system-ui, sans-serif; font-weight: 600; font-size: 13px; }
.jt-pv-hero span { position: relative; width: 46px; height: 14px; border-radius: calc(var(--pv-radius) - 2px); background: #fff; }

.jt-admin-preview.no-hero .jt-pv-hero { height: 26px; padding: 0 2px; background: transparent; color: #14213d; }
.jt-admin-preview.no-hero .jt-pv-hero::before { display: none; }
.jt-admin-preview.no-hero .jt-pv-hero span { background: var(--pv-accent); }

.jt-pv-card {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 12px;
    border: 1px solid #e3e9f2;
    border-radius: var(--pv-radius);
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

.jt-admin-preview[data-density="compact"] .jt-pv-card { gap: 4px; padding: 6px 10px; }
.jt-pv-card i { display: block; height: 6px; width: 85%; border-radius: 3px; background: #eef1f5; }
.jt-pv-card i.short { width: 55%; }
.jt-pv-card em {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 40px;
    height: 12px;
    border-radius: 999px;
    background: var(--pv-soft);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pv-accent) 25%, transparent);
}
.jt-pv-card s {
    position: absolute;
    right: 12px;
    bottom: 10px;
    width: 52px;
    height: 16px;
    border-radius: calc(var(--pv-radius) - 2px);
    background: var(--pv-accent);
}
