/**
 * NEXA Elements — Shortcodes Design System
 * Reuses EXACT tokens from frontend.css questionnaire theme
 * Dark purple · Glassmorphic · Purple↔Green accents
 */


/* ═══════════════════════════════════════════════════════════
   WRAPPER — auto dark background when elements are standalone
   Only applies if NOT already inside #ncp-test-app
   ═══════════════════════════════════════════════════════════ */
.ncp-el-wrap {
    background: linear-gradient(170deg, #120830 0%, #1e0e4a 30%, #2d1462 60%, #1a0a3e 100%);
    border-radius: 24px;
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(18, 8, 48, .6);
}
/* Ambient glow — same as questionnaire */
.ncp-el-wrap::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, .2) 0%, transparent 70%);
    pointer-events: none;
}
.ncp-el-wrap::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -60px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(16, 185, 129, .12) 0%, transparent 70%);
    pointer-events: none;
}
.ncp-el-wrap > * {
    position: relative;
    z-index: 1;
}

/* ─── Shared reset ─────────────────────────────────────── */
[class*="ncp-el-"] {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}


/* ═══════════════════════════════════════════════════════════
   1. BUTTON  [nexa_button]
   Mirrors .ncp-hero__cta / .ncp-btn--primary / .ncp-btn--ghost
   ═══════════════════════════════════════════════════════════ */
.ncp-el-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 800;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    line-height: 1.4;
    letter-spacing: -.01em;
    position: relative;
}

/* ── Sizes (same padding scale as .ncp-btn) */
.ncp-el-btn--sm {
    padding: 10px 20px;
    font-size: 13px;
    border-radius: 9999px;
}
.ncp-el-btn--md {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: 9999px;
}
.ncp-el-btn--lg {
    padding: 18px 48px;
    font-size: 18px;
    border-radius: 9999px;
}

/* ── Gradient  (same as .ncp-hero__cta) */
.ncp-el-btn--gradient {
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
    color: #fff;
    box-shadow: 0 8px 32px rgba(124, 58, 237, .5);
}
.ncp-el-btn--gradient.ncp-el-animated {
    animation: ncpElGlow 3s ease infinite;
}

/* ── Solid  (same as .ncp-btn--primary) */
.ncp-el-btn--solid {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 58, 237, .4);
}

/* ── Outline  (same as .ncp-btn--ghost) */
.ncp-el-btn--outline {
    background: rgba(255, 255, 255, .06);
    color: #C4B5FD;
    border: 1.5px solid rgba(255, 255, 255, .12);
}

/* ── Ghost */
.ncp-el-btn--ghost {
    background: transparent;
    color: #C4B5FD;
    border: 1.5px solid rgba(255, 255, 255, .08);
}

/* Hovers — same transforms as questionnaire */
.ncp-el-btn.ncp-el-animated:hover {
    transform: translateY(-3px) scale(1.02);
}
.ncp-el-btn--gradient.ncp-el-animated:hover {
    box-shadow: 0 12px 40px rgba(124, 58, 237, .65);
}
.ncp-el-btn--solid.ncp-el-animated:hover {
    box-shadow: 0 8px 28px rgba(124, 58, 237, .55);
}
.ncp-el-btn--outline.ncp-el-animated:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .2);
    color: #fff;
}
.ncp-el-btn--ghost.ncp-el-animated:hover {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .15);
    color: #fff;
}
.ncp-el-btn:active { transform: scale(.98) !important; }

.ncp-el-btn-icon { font-size: 1.15em; flex-shrink: 0; }

/* Glow keyframe — same as ncpGlow */
@keyframes ncpElGlow {
    0%, 100% { box-shadow: 0 8px 32px rgba(124, 58, 237, .5); }
    50%      { box-shadow: 0 8px 40px rgba(124, 58, 237, .7); }
}

/* ── Filière color overrides for buttons */
.ncp-el-btn.ncp-el-fil-ia.ncp-el-btn--gradient {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    box-shadow: 0 8px 32px rgba(37, 99, 235, .5);
}
.ncp-el-btn.ncp-el-fil-marketing.ncp-el-btn--gradient {
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 8px 32px rgba(16, 185, 129, .5);
}
.ncp-el-btn.ncp-el-fil-cyber.ncp-el-btn--gradient {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    box-shadow: 0 8px 32px rgba(220, 38, 38, .5);
}


/* ═══════════════════════════════════════════════════════════
   2. FLASHCARD  [nexa_flashcard]
   Card face = .ncp-question-card style, back = glass
   ═══════════════════════════════════════════════════════════ */
.ncp-el-flashcard {
    perspective: 1200px;
    width: 100%;
    max-width: 420px;
    height: var(--ncp-el-fc-height, 280px);
    cursor: pointer;
    margin: 20px 0;
    outline: none;
}

.ncp-el-flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform .6s cubic-bezier(.4, 0, .2, 1);
    transform-style: preserve-3d;
}

.ncp-el-flashcard.ncp-el-flipped .ncp-el-flashcard-inner {
    transform: rotateY(180deg);
}

.ncp-el-flashcard-front,
.ncp-el-flashcard-back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    backface-visibility: hidden;
    border-radius: 16px;
    text-align: center;
}

/* Front — gradient surface (same as question card bg + gradient overlay) */
.ncp-el-flashcard-front {
    background: var(--ncp-el-gradient, linear-gradient(135deg, #7C3AED, #6D28D9));
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
    border: 1px solid rgba(255, 255, 255, .1);
    overflow: hidden;
}
/* Glass shimmer — same as .ncp-hero::before */
.ncp-el-flashcard-front::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(124, 58, 237, .25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(16, 185, 129, .12) 0%, transparent 50%);
    pointer-events: none;
}

/* Back — dark glass (same as .ncp-question-card) */
.ncp-el-flashcard-back {
    background: rgba(255, 255, 255, .05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    transform: rotateY(180deg);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
}

.ncp-el-flashcard-icon {
    font-size: 2.8em;
    margin-bottom: 14px;
    display: block;
    position: relative;
    z-index: 1;
}

.ncp-el-flashcard-text {
    font-size: 16px;
    line-height: 1.7;
    font-weight: 500;
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, .75);
}
.ncp-el-flashcard-front .ncp-el-flashcard-text {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
}

.ncp-el-flashcard-hint {
    margin-top: auto;
    font-size: 12px;
    color: rgba(255, 255, 255, .35);
    padding-top: 14px;
    position: relative;
    z-index: 1;
}

/* Variants */
.ncp-el-flashcard--glass .ncp-el-flashcard-front {
    background: rgba(255, 255, 255, .05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .08);
}
.ncp-el-flashcard--glass .ncp-el-flashcard-front .ncp-el-flashcard-text {
    background: var(--ncp-el-gradient, linear-gradient(135deg, #A78BFA, #34D399));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.ncp-el-flashcard--minimal .ncp-el-flashcard-front {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, .15);
    box-shadow: none;
}
.ncp-el-flashcard--shadow .ncp-el-flashcard-front {
    box-shadow:
        0 16px 48px rgba(124, 58, 237, .3),
        0 0 0 1px rgba(255, 255, 255, .08) inset;
}

.ncp-el-flashcard.ncp-el-animated:hover {
    transform: scale(1.02);
}


/* ═══════════════════════════════════════════════════════════
   3. TITLE  [nexa_title]
   Mirrors .ncp-hero__title / .ncp-hero__title-accent
   ═══════════════════════════════════════════════════════════ */
.ncp-el-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    margin: 28px 0 18px;
    line-height: 1.15;
    letter-spacing: -.5px;
    color: #fff;
}

.ncp-el-title-icon {
    font-size: 1.1em;
    flex-shrink: 0;
}

/* ── Gradient  (same as .ncp-hero__title-accent) */
.ncp-el-title--gradient .ncp-el-title-text {
    background: linear-gradient(135deg, #A78BFA, #34D399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Underline  (same as .ncp-hero__divider pattern) */
.ncp-el-title--underline {
    padding-bottom: 16px;
    position: relative;
}
.ncp-el-title--underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #7C3AED, #34D399);
    opacity: .5;
}
.ncp-el-title--underline[style*="text-align:center"]::after,
.ncp-el-title--underline[style*="text-align: center"]::after {
    left: 50%;
    transform: translateX(-50%);
}
.ncp-el-title--underline[style*="text-align:right"]::after,
.ncp-el-title--underline[style*="text-align: right"]::after {
    left: auto;
    right: 0;
}

/* ── Badge  (same as .ncp-hero__badge) */
.ncp-el-title--badge .ncp-el-title-text {
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .85);
    -webkit-text-fill-color: unset;
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: .65em;
    font-weight: 600;
    letter-spacing: .3px;
    display: inline-block;
}

/* ── Glow */
.ncp-el-title--glow .ncp-el-title-text {
    color: #C4B5FD;
    -webkit-text-fill-color: unset;
    text-shadow:
        0 0 20px rgba(124, 58, 237, .4),
        0 0 60px rgba(124, 58, 237, .15);
}

/* Alignment */
.ncp-el-title[style*="text-align:center"],
.ncp-el-title[style*="text-align: center"] { justify-content: center; }
.ncp-el-title[style*="text-align:right"],
.ncp-el-title[style*="text-align: right"] { justify-content: flex-end; }


/* ═══════════════════════════════════════════════════════════
   4. FILIERE CARD  [nexa_filiere_card]
   Mirrors .ncp-hero__fact cards exactly
   ═══════════════════════════════════════════════════════════ */
.ncp-el-fcard {
    border-radius: 16px;
    padding: 28px;
    margin: 16px 0;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    overflow: hidden;
    position: relative;
}

/* ── Glass  (same as .ncp-question-card / .ncp-hero__fact) */
.ncp-el-fcard--glass {
    background: rgba(255, 255, 255, .05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
}
.ncp-el-fcard--solid {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
}
.ncp-el-fcard--minimal {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, .12);
}
.ncp-el-fcard--shadow {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
}

/* Top gradient accent (same as hero divider colors) */
.ncp-el-fcard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7C3AED, #34D399);
    opacity: .6;
}

.ncp-el-fcard-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.ncp-el-fcard-icon {
    font-size: 2em;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    flex-shrink: 0;
}

.ncp-el-fcard-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
}

.ncp-el-fcard-desc {
    color: rgba(255, 255, 255, .55);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.ncp-el-fcard-bootcamps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Bootcamp row — same as .ncp-hero__fact */
.ncp-el-fcard-bc {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .07);
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
}

.ncp-el-fcard-bc-level {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #fff;
    background: var(--ncp-el-primary, #7C3AED);
    padding: 4px 10px;
    border-radius: 6px;
    flex-shrink: 0;
    line-height: 1.4;
}

.ncp-el-fcard-bc-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, .7);
}

/* Hovers */
.ncp-el-fcard.ncp-el-animated:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
}
.ncp-el-fcard-bc:hover {
    background: rgba(255, 255, 255, .09);
}
.ncp-el-fcard.ncp-el-animated .ncp-el-fcard-bc:hover .ncp-el-fcard-bc-name {
    color: #fff;
}


/* ═══════════════════════════════════════════════════════════
   5. CTA TEST  [nexa_test_cta]
   Mirrors .ncp-hero layout (badge + title + CTA + proof)
   ═══════════════════════════════════════════════════════════ */
.ncp-el-cta {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 32px 36px;
    border-radius: 24px;
    margin: 24px 0;
    position: relative;
    overflow: hidden;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.ncp-el-cta--glass {
    background: rgba(255, 255, 255, .03);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, .06);
}
.ncp-el-cta--solid {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
}
.ncp-el-cta--minimal {
    background: transparent;
    border: 1.5px dashed rgba(255, 255, 255, .15);
}

/* Ambient glow orbs — same as hero */
.ncp-el-cta::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, .2) 0%, transparent 70%);
    pointer-events: none;
}
.ncp-el-cta::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, .12) 0%, transparent 70%);
    pointer-events: none;
}

.ncp-el-cta-content { flex: 1; position: relative; z-index: 1; }

.ncp-el-cta-title {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.ncp-el-cta-text {
    font-size: 15px;
    color: rgba(255, 255, 255, .7);
    margin: 0;
    line-height: 1.7;
}

.ncp-el-cta-btn {
    flex-shrink: 0;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.ncp-el-cta.ncp-el-animated:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
}

@media (max-width: 640px) {
    .ncp-el-cta {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
    }
    .ncp-el-cta-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}


/* ═══════════════════════════════════════════════════════════
   6. BADGE  [nexa_badge]
   EXACT same pattern as .ncp-hero__filiere pills
   ═══════════════════════════════════════════════════════════ */
.ncp-el-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    border: 1.5px solid;
    vertical-align: middle;
    line-height: 1;
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
    /* Default (purple) — same as .ncp-hero__filiere--dev */
    color: #C4B5FD;
    background: rgba(124, 58, 237, .15);
    border-color: rgba(124, 58, 237, .3);
}

/* Sizes */
.ncp-el-badge--sm { padding: 5px 12px; font-size: 11px; }
.ncp-el-badge--md { padding: 7px 16px; font-size: 12px; }
.ncp-el-badge--lg { padding: 9px 20px; font-size: 14px; }

.ncp-el-badge-icon { font-size: 1.1em; }

/* ── Filière colors — EXACT same as .ncp-hero__filiere--* */
.ncp-el-badge.ncp-el-fil-dev_web {
    color: #C4B5FD;
    background: rgba(124, 58, 237, .15);
    border-color: rgba(124, 58, 237, .3);
}
.ncp-el-badge.ncp-el-fil-ia {
    color: #93C5FD;
    background: rgba(37, 99, 235, .15);
    border-color: rgba(37, 99, 235, .3);
}
.ncp-el-badge.ncp-el-fil-marketing {
    color: #6EE7B7;
    background: rgba(5, 150, 105, .15);
    border-color: rgba(5, 150, 105, .3);
}
.ncp-el-badge.ncp-el-fil-cyber {
    color: #FCA5A5;
    background: rgba(220, 38, 38, .15);
    border-color: rgba(220, 38, 38, .3);
}


/* ═══════════════════════════════════════════════════════════
   7. INFO BOX  [nexa_info_box]
   Mirrors .ncp-hero__fact + .ncp-scenario-box
   ═══════════════════════════════════════════════════════════ */
.ncp-el-infobox {
    padding: 20px 22px;
    border-radius: 12px;
    margin: 16px 0;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .07);
    border-left: 3px solid #7C3AED;
    transition: background .2s;
}
.ncp-el-infobox:hover {
    background: rgba(255, 255, 255, .09);
}

.ncp-el-infobox-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ncp-el-infobox-icon { font-size: 1.4em; flex-shrink: 0; }

.ncp-el-infobox-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.ncp-el-infobox-content {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .55);
}
.ncp-el-infobox-content p { margin: 0 0 8px; }
.ncp-el-infobox-content p:last-child { margin-bottom: 0; }

/* ── Type overrides — same pattern as .ncp-type-badge--* colors */
.ncp-el-infobox--info {
    border-left-color: #3B82F6;
    background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(255, 255, 255, .04));
}
.ncp-el-infobox--info .ncp-el-infobox-title { color: #93C5FD; }

.ncp-el-infobox--success {
    border-left-color: #10B981;
    background: linear-gradient(135deg, rgba(16, 185, 129, .08), rgba(255, 255, 255, .04));
}
.ncp-el-infobox--success .ncp-el-infobox-title { color: #6EE7B7; }

.ncp-el-infobox--warning {
    border-left-color: #F59E0B;
    background: linear-gradient(135deg, rgba(245, 158, 11, .08), rgba(255, 255, 255, .04));
}
.ncp-el-infobox--warning .ncp-el-infobox-title { color: #FCD34D; }

.ncp-el-infobox--tip {
    border-left-color: #8B5CF6;
    background: linear-gradient(135deg, rgba(124, 58, 237, .12), rgba(52, 211, 153, .06));
}
.ncp-el-infobox--tip .ncp-el-infobox-title { color: #C4B5FD; }


/* ═══════════════════════════════════════════════════════════
   ADMIN — Shortcode Gallery (Éléments tab)
   Light theme for WP admin context
   ═══════════════════════════════════════════════════════════ */
.ncp-shortcode-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.ncp-shortcode-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all .2s ease;
}
.ncp-shortcode-card:hover {
    border-color: #7C3AED;
    box-shadow: 0 4px 15px rgba(124, 58, 237, .1);
}
.ncp-shortcode-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 15px;
}
.ncp-shortcode-card-icon { font-size: 1.5em; }
.ncp-shortcode-copyable {
    display: block;
    background: #f3f0ff;
    color: #5B21B6;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    word-break: break-all;
    cursor: pointer;
    border: 1px dashed #c4b5fd;
    transition: all .2s ease;
    margin-bottom: 10px;
}
.ncp-shortcode-copyable:hover {
    background: #ede9fe;
    border-color: #7C3AED;
}
.ncp-shortcode-card .description {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}
@media (max-width: 782px) {
    .ncp-shortcode-gallery { grid-template-columns: 1fr; }
}
