/* ==========================================================================
   LCB-FT Compliance Flow — Animated compliance pipeline showcase
   ========================================================================== */

/* === Canvas === */
.lcb-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, #0d1117 0%, #151D33 50%, #1a2340 100%);
    min-height: 560px;
    box-shadow: 0 12px 50px rgba(21, 29, 51, 0.25);
}

.lcb-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 40px 40px;
    z-index: 0;
}

/* === Scenes (show/hide) === */
.lcb-act {
    position: absolute;
    inset: 0;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.lcb-act.visible {
    opacity: 1;
}

/* === Narration overlay === */
.lcb-narration {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lcb-narration.visible {
    opacity: 1;
}

.lcb-narration-text {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    padding: 12px 28px;
    border-radius: 30px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.lcb-narration-text strong {
    color: #DFE160;
    font-weight: 700;
}

/* ========================
   SCENE 1 : Client card
   ======================== */
.lcb-client-card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.lcb-client-card.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.lcb-client-card-header {
    padding: 12px 16px;
    background: #151D33;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lcb-client-card-header i {
    font-size: 1.2rem;
    color: #DFE160;
}

.lcb-client-card-header .name {
    font-size: 0.8rem;
    font-weight: 700;
}

.lcb-client-card-header .siren {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
}

.lcb-client-card-body {
    padding: 10px 16px;
}

/* ========================
   SCENE 2 : Identity docs
   ======================== */
.lcb-doc-fly {
    position: absolute;
    z-index: 25;
    opacity: 0;
    padding: 5px 12px;
    background: rgba(223, 225, 96, 0.15);
    border: 1px solid rgba(223, 225, 96, 0.3);
    border-radius: 8px;
    font-size: 0.62rem;
    font-weight: 600;
    color: #DFE160;
    white-space: nowrap;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.lcb-doc-fly i {
    margin-right: 3px;
}

.lcb-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lcb-checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 0.7rem;
    color: #6c757d;
    border-bottom: 1px solid #f0f0f0;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lcb-checklist li.visible {
    opacity: 1;
    transform: translateY(0);
}

.lcb-checklist li .check {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.lcb-checklist li.checked .check {
    background: #2fb344;
    border-color: #2fb344;
    color: white;
}

/* ========================
   SCENE 3 : Beneficial owners tree
   ======================== */
.lcb-tree {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    z-index: 20;
}

.lcb-tree-root {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lcb-tree-root i {
    color: #DFE160;
}

.lcb-tree-branches {
    display: flex;
    gap: 20px;
    position: relative;
}

.lcb-tree-branches::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 25%;
    right: 25%;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.lcb-tree-owner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.lcb-tree-owner.visible {
    opacity: 1;
    transform: translateY(0);
}

.lcb-tree-owner.ppe {
    border-color: rgba(255, 107, 107, 0.4);
    background: rgba(255, 107, 107, 0.08);
}

.lcb-tree-owner-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.lcb-tree-owner.ppe .lcb-tree-owner-icon {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.lcb-tree-owner-name {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.lcb-tree-owner-pct {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.45);
}

.lcb-ppe-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 4px;
    font-size: 0.55rem;
    font-weight: 700;
    color: #ff6b6b;
    animation: ppePulse 2s ease-in-out infinite;
}

@keyframes ppePulse {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 15px rgba(255, 107, 107, 0.3); }
}

/* ========================
   SCENE 4 : NPLAB Gauges
   ======================== */
.lcb-gauges {
    position: absolute;
    left: 50%;
    top: 45%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 28px;
    z-index: 20;
}

.lcb-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.lcb-gauge.visible {
    opacity: 1;
    transform: translateY(0);
}

.lcb-gauge-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lcb-gauge-track {
    width: 8px;
    height: 120px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.lcb-gauge-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 4px;
    transition: height 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 0;
}

.lcb-gauge-fill.low { background: linear-gradient(to top, #51cf66, #69db7c); }
.lcb-gauge-fill.moderate { background: linear-gradient(to top, #ffd43b, #ffe066); }
.lcb-gauge-fill.high { background: linear-gradient(to top, #ff922b, #ffa94d); }
.lcb-gauge-fill.very-high { background: linear-gradient(to top, #ff6b6b, #ff8787); }

.lcb-gauge-score {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

.lcb-risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease;
    margin-top: 16px;
}

.lcb-risk-badge.visible {
    opacity: 1;
    transform: scale(1);
}

.lcb-risk-badge.high {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
}

.lcb-risk-badge.moderate {
    background: rgba(255, 212, 59, 0.15);
    border: 1px solid rgba(255, 212, 59, 0.4);
    color: #ffd43b;
}

.lcb-risk-badge i {
    font-size: 0.9rem;
}

/* ========================
   SCENE 5 : Diligence tasks
   ======================== */
.lcb-task-list {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 20;
}

.lcb-task-list-header {
    padding: 10px 16px;
    background: #151D33;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lcb-task-list-header i {
    color: #DFE160;
}

.lcb-task-list-body {
    padding: 4px 0;
}

.lcb-task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 0.68rem;
    color: #495057;
    border-bottom: 1px solid #f0f0f0;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lcb-task-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.lcb-task-item .task-check {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.lcb-task-item.done .task-check {
    background: #2fb344;
    border-color: #2fb344;
    color: white;
}

.lcb-task-item.done {
    color: #adb5bd;
    text-decoration: line-through;
}

.lcb-task-item .task-axis {
    font-size: 0.55rem;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
    margin-left: auto;
    flex-shrink: 0;
}

.lcb-task-item .task-axis.geo { background: rgba(12, 151, 177, 0.1); color: #0C97B1; }
.lcb-task-item .task-axis.profil { background: rgba(255, 107, 107, 0.1); color: #ff6b6b; }
.lcb-task-item .task-axis.mission { background: rgba(116, 143, 252, 0.1); color: #748ffc; }
.lcb-task-item .task-axis.activite { background: rgba(255, 152, 0, 0.1); color: #ff9800; }

/* ========================
   SCENE 6 : Dashboard grid
   ======================== */
.lcb-dashboard {
    position: absolute;
    inset: 0;
    z-index: 20;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lcb-dashboard-kpis {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.lcb-dashboard-kpi {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.lcb-dashboard-kpi.visible {
    opacity: 1;
    transform: translateY(0);
}

.lcb-dashboard-kpi-value {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.lcb-dashboard-kpi-value.green { color: #51cf66; }
.lcb-dashboard-kpi-value.orange { color: #ffd43b; }
.lcb-dashboard-kpi-value.red { color: #ff6b6b; }
.lcb-dashboard-kpi-value.blue { color: #748ffc; }

.lcb-dashboard-kpi-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
}

.lcb-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    flex: 1;
}

.lcb-dashboard-mini {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.lcb-dashboard-mini.visible {
    opacity: 1;
    transform: scale(1);
}

.lcb-dashboard-mini-name {
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.lcb-dashboard-mini-bar {
    height: 3px;
    border-radius: 2px;
    margin-bottom: 4px;
}

.lcb-dashboard-mini-status {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.52rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    width: fit-content;
    margin-top: auto;
}

.lcb-dashboard-mini-status.conforme {
    background: rgba(47, 179, 68, 0.15);
    color: #51cf66;
}

.lcb-dashboard-mini-status.en-cours {
    background: rgba(255, 212, 59, 0.15);
    color: #ffd43b;
}

.lcb-dashboard-mini-status.non-conforme {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

/* ========================
   SCENE 7 : Auditor access
   ======================== */
.lcb-auditor-hub {
    position: absolute;
    left: 12%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 20;
}

.lcb-auditor-hub-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #DFE160, #c9c850);
    color: #151D33;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 6px 25px rgba(223, 225, 96, 0.3);
}

.lcb-auditor-hub-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.lcb-auditor-panel {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lcb-auditor-panel.visible {
    opacity: 1;
}

.lcb-auditor-panel-header {
    padding: 10px 14px;
    background: #151D33;
    color: white;
    font-size: 0.72rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lcb-auditor-panel-header i { color: #DFE160; }

.lcb-auditor-panel-body {
    padding: 10px 14px;
}

.lcb-auditor-panel-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.65rem;
    color: #495057;
    border-bottom: 1px solid #f0f0f0;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lcb-auditor-panel-row.visible {
    opacity: 1;
    transform: translateY(0);
}

.lcb-auditor-panel-row .val { font-weight: 700; }
.lcb-auditor-panel-row .val.green { color: #2fb344; }
.lcb-auditor-panel-row .val.red { color: #ff6b6b; }

/* Token animation */
.lcb-token-fly {
    position: absolute;
    z-index: 25;
    opacity: 0;
    padding: 5px 14px;
    background: rgba(223, 225, 96, 0.15);
    border: 1px solid rgba(223, 225, 96, 0.4);
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    color: #DFE160;
    white-space: nowrap;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

/* Auditor icon on the right */
.lcb-auditor-target {
    position: absolute;
    right: 12%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 20;
}

.lcb-auditor-target-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.5s ease;
}

.lcb-auditor-target.received .lcb-auditor-target-icon {
    background: rgba(223, 225, 96, 0.15);
    border-color: rgba(223, 225, 96, 0.5);
    color: #DFE160;
    box-shadow: 0 0 30px rgba(223, 225, 96, 0.2);
}

.lcb-auditor-target-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.4s ease;
}

.lcb-auditor-target.received .lcb-auditor-target-label {
    color: rgba(255, 255, 255, 0.9);
}

/* === Stat band === */
.flow-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    padding: 24px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #1e2845 100%);
    border-radius: 16px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.flow-stat {
    text-align: center;
}

.flow-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 4px;
}

.flow-stat-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
}

.flow-stats-note {
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 8px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .lcb-stage {
        min-height: 400px;
    }

    .lcb-client-card {
        width: 220px;
    }

    .lcb-gauges {
        gap: 16px;
    }

    .lcb-gauge-track {
        height: 80px;
    }

    .lcb-task-list {
        width: 260px;
    }

    .lcb-dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .lcb-dashboard-mini:nth-child(n+7) {
        display: none;
    }

    .lcb-dashboard-kpis {
        flex-wrap: wrap;
        gap: 8px;
    }

    .lcb-dashboard-kpi {
        padding: 8px 14px;
    }

    .flow-stats {
        gap: 20px;
        flex-wrap: wrap;
        padding: 20px;
    }

    .flow-stat-value {
        font-size: 1.3rem;
    }

    .lcb-tree-branches {
        gap: 10px;
    }

    .lcb-tree-owner {
        padding: 8px 10px;
    }

    .lcb-auditor-panel {
        width: 220px;
        right: 4%;
    }

    .lcb-narration-text {
        font-size: 0.85rem;
        padding: 10px 20px;
        white-space: normal;
        max-width: 90vw;
    }
}

@media (max-width: 480px) {
    .lcb-stage {
        min-height: 340px;
        border-radius: 14px;
    }

    .lcb-gauges {
        gap: 12px;
    }

    .lcb-gauge-track {
        height: 60px;
    }

    .lcb-gauge-label {
        font-size: 0.52rem;
    }

    .lcb-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lcb-dashboard-mini:nth-child(n+5) {
        display: none;
    }

    .flow-stats {
        gap: 16px;
    }

    .lcb-tree-branches {
        flex-direction: column;
        gap: 8px;
    }
}
