/* ============================================
   PROFILE PAGE - RSI HUD Design System
   Layout: 2 colonnes (2fr | 1fr)
   Basé sur le prototype profile.jsx
   ============================================ */

/* ============================================
   Page Container
   ============================================ */
.profile-page {
    padding: 32px 36px 80px;
    position: relative;
    z-index: 1;
    animation: hy-fade-in 0.25s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ============================================
   Page Header
   ============================================ */
.profile-header {
    margin-bottom: 24px;
    flex-shrink: 0;
}

.profile-kicker {
    font-family: var(--hy-font-mono);
    font-size: 10px;
    color: var(--hy-accent);
    letter-spacing: 0.3em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-kicker::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--hy-accent);
}

.profile-kicker-code {
    color: var(--hy-ink-3);
}

.profile-title {
    margin: 0;
    font-family: var(--hy-font-display);
    font-size: 48px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--hy-ink);
    line-height: 1;
}

/* ============================================
   2-Column Layout
   ============================================ */
.profile-layout {
    display: grid !important;
    grid-template-columns: 6fr 1fr;
    gap: 16px;
    align-items: start;
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   Hero Card
   ============================================ */
.profile-hero {
    position: relative;
    background: var(--hy-panel);
    border: 1px solid var(--hy-border);
    clip-path: polygon(0 16px, 16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Portrait Area */
.profile-hero-portrait {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.profile-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, #2d1408 0%, #14080c 50%, #08060a 100%);
}

.profile-hero-portrait.has-bg .profile-hero-bg {
    background-size: cover;
    background-position: center;
    filter: brightness(0.6) saturate(0.8);
}

/* Tech Grid */
.profile-hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--hy-border-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--hy-border-soft) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.4;
    pointer-events: none;
}

/* Avatar */
.profile-hero-avatar {
    position: absolute;
    left: 60px;
    top: 30px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 1px solid rgba(255, 122, 38, 0.35);
    background: radial-gradient(circle at 35% 30%, rgba(255, 122, 38, 0.2), transparent 70%);
    box-shadow: inset 0 0 60px rgba(255, 122, 38, 0.13), 0 0 60px rgba(255, 122, 38, 0.13);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--hy-font-display);
    font-size: 64px;
    color: var(--hy-accent);
    letter-spacing: 0.05em;
    text-shadow: 0 0 24px var(--hy-accent);
    z-index: 2;
    overflow: hidden;
}

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

/* Orbital Ring */
.profile-hero-ring {
    position: absolute;
    left: 30px;
    top: 0;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 122, 38, 0.2);
    animation: hy-rotate 60s linear infinite;
    pointer-events: none;
}

/* HUD Readouts (top right) */
.profile-hero-hud {
    position: absolute;
    top: 24px;
    right: 24px;
    font-family: var(--hy-font-mono);
    font-size: 10px;
    color: var(--hy-ink-2);
    letter-spacing: 0.15em;
    text-align: right;
    line-height: 1.8;
    z-index: 2;
}

.profile-hero-hud .hud-label {
    color: var(--hy-ink-3);
    margin-right: 8px;
}

.profile-hero-hud .hud-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    color: var(--hy-ink-3);
}

.profile-hero-hud .hud-status.active {
    color: var(--hy-success);
}

.profile-hero-hud .hud-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: hy-pulse 2s ease-in-out infinite;
}

/* Scope Crosshair (right side) */
.profile-hero-scope {
    position: absolute;
    top: 50%;
    right: 100px;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    border: 1px solid rgba(255, 122, 38, 0.35);
    border-radius: 50%;
}

.profile-hero-scope .scope-h {
    position: absolute;
    left: -8px;
    right: -8px;
    top: 50%;
    height: 1px;
    background: var(--hy-accent);
    opacity: 0.4;
}

.profile-hero-scope .scope-v {
    position: absolute;
    top: -8px;
    bottom: -8px;
    left: 50%;
    width: 1px;
    background: var(--hy-accent);
    opacity: 0.4;
}

.profile-hero-scope .scope-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hy-accent);
    box-shadow: 0 0 10px var(--hy-accent);
}

/* Identity (bottom left) */
.profile-hero-identity {
    position: absolute;
    left: 32px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.profile-hero-name {
    font-family: var(--hy-font-display);
    font-size: 38px;
    color: var(--hy-ink);
    letter-spacing: 0.08em;
    text-shadow: 0 0 24px rgba(255, 122, 38, 0.35);
    line-height: 1;
    text-transform: uppercase;
}

.profile-hero-rank {
    font-family: var(--hy-font-mono);
    font-size: 11px;
    color: var(--hy-accent);
    letter-spacing: 0.2em;
    display: flex;
    gap: 8px;
    align-items: center;
}

.profile-hero-rank .rank-sep {
    color: var(--hy-ink-3);
}

.profile-hero-rank .rank-code {
    color: var(--hy-ink-2);
}

.profile-hero-rank .rank-div {
    color: var(--hy-ink-2);
}

/* HUD Brackets */
.profile-hero-brackets {
    position: absolute;
    inset: 10px;
    pointer-events: none;
}

.profile-hero-brackets .bracket {
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--hy-accent);
    border-style: solid;
    border-width: 0;
}

.profile-hero-brackets .bracket.tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.profile-hero-brackets .bracket.tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.profile-hero-brackets .bracket.bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.profile-hero-brackets .bracket.br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* Stats Row (4 columns) */
.profile-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--hy-border-soft);
}

.stat-tile {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 1px solid var(--hy-border-soft);
}

.stat-tile:first-child {
    border-left: none;
}

.stat-label {
    font-family: var(--hy-font-mono);
    font-size: 9px;
    letter-spacing: 0.22em;
    color: var(--hy-ink-3);
    text-transform: uppercase;
}

.stat-value {
    font-family: var(--hy-font-display);
    font-size: 26px;
    color: var(--hy-ink);
    letter-spacing: 0.05em;
}

.stat-value.warn { color: var(--hy-warn); }
.stat-value.success { color: var(--hy-success); }
.stat-value.accent { color: var(--hy-accent); }

.stat-unit {
    font-family: var(--hy-font-mono);
    font-size: 10px;
    color: var(--hy-ink-3);
    letter-spacing: 0.15em;
    margin-left: 6px;
}

.stat-sub {
    font-family: var(--hy-font-mono);
    font-size: 9px;
    letter-spacing: 0.15em;
    color: var(--hy-ink-3);
}

/* ============================================
   Panel Card
   ============================================ */
.profile-panel {
    background: var(--hy-panel);
    border: 1px solid var(--hy-border-soft);
    clip-path: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.panel-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--hy-border-soft);
    gap: 8px;
}

.panel-header::before {
    content: '';
    width: 12px;
    height: 1px;
    background: var(--hy-accent);
}

.panel-title {
    font-family: var(--hy-font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--hy-accent);
    text-transform: uppercase;
}

.panel-code {
    font-family: var(--hy-font-mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--hy-ink-3);
}

.panel-right {
    margin-left: auto;
    font-family: var(--hy-font-mono);
    font-size: 10px;
    color: var(--hy-ink-3);
    letter-spacing: 0.15em;
}

.panel-body {
    padding: 16px;
}

/* ============================================
   Identity Grid
   ============================================ */
.identity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.identity-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.identity-field.full {
    grid-column: span 2;
}

.field-label {
    font-family: var(--hy-font-mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    color: var(--hy-ink-3);
    text-transform: uppercase;
}

.field-value {
    font-family: var(--hy-font-body);
    font-size: 14px;
    color: var(--hy-ink);
    letter-spacing: 0.04em;
}

.field-value.accent { color: var(--hy-accent); }
.field-value.success { color: var(--hy-success); }
.field-value.danger { color: var(--hy-danger); }

.field-value.link {
    color: var(--hy-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.field-value.link:hover {
    color: var(--hy-ink);
}

/* ============================================
   Biography
   ============================================ */
.bio-text {
    margin: 0;
    font-family: var(--hy-font-body);
    font-size: 13px;
    color: var(--hy-ink-2);
    line-height: 1.7;
}

/* ============================================
   Certifications Grid (2 columns)
   ============================================ */
.certs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cert-badge {
    padding: 0;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    opacity: 0.4;
    clip-path: none;
    transition: opacity 0.15s ease;
}

.cert-badge.obtained {
    background: transparent;
    border: none;
    opacity: 1;
}

.cert-icon {
    width: 38px;
    height: 42px;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--hy-ink-3);
    flex-shrink: 0;
    overflow: hidden;
}

.cert-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cert-info {
    flex: 1;
    min-width: 0;
}

.cert-name {
    font-family: var(--hy-font-body);
    font-size: 12px;
    color: var(--hy-ink);
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cert-meta {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    font-family: var(--hy-font-mono);
    font-size: 9px;
    letter-spacing: 0.15em;
}

.cert-tier { color: var(--hy-accent); }
.cert-status { color: var(--hy-ink-3); }
.cert-status.obtained { color: var(--hy-success); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 24px;
    color: var(--hy-ink-3);
    font-family: var(--hy-font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
}

/* ============================================
   Rights & Roles List
   ============================================ */
.rights-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.right-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid var(--hy-border-soft);
    font-family: var(--hy-font-mono);
    font-size: 10px;
    letter-spacing: 0.05em;
    color: var(--hy-ink-3);
}

.right-item.granted {
    background: rgba(255, 122, 38, 0.06);
    border-color: rgba(255, 122, 38, 0.2);
    color: var(--hy-ink);
}

.right-name {
    flex: 1;
}

.right-status {
    letter-spacing: 0.15em;
    color: var(--hy-ink-3);
}

.right-item.granted .right-status {
    color: var(--hy-success);
}

/* ============================================
   Actions
   ============================================ */
.actions-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    width: 100%;
    padding: 12px;
    font-family: var(--hy-font-display);
    font-size: 11px;
    letter-spacing: 0.18em;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    border: none;
}

.action-btn.primary {
    background: var(--hy-accent);
    color: #0a0a0a;
    clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
    box-shadow: 0 0 16px var(--hy-accent-glow);
}

.action-btn.primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 24px var(--hy-accent-glow);
}

.action-btn.secondary {
    background: transparent;
    color: var(--hy-ink-2);
    border: 1px solid var(--hy-border-soft);
}

.action-btn.secondary:hover {
    border-color: var(--hy-accent);
    color: var(--hy-accent);
    background: rgba(255, 122, 38, 0.08);
}

/* ============================================
   Activity Log
   ============================================ */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-line {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid var(--hy-border-soft);
    font-family: var(--hy-font-mono);
    font-size: 10px;
}

.activity-line:last-child {
    border-bottom: none;
}

.activity-date {
    color: var(--hy-ink-3);
    letter-spacing: 0.18em;
    min-width: 50px;
}

.activity-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-dot.accent { background: var(--hy-accent); box-shadow: 0 0 6px var(--hy-accent); }
.activity-dot.success { background: var(--hy-success); box-shadow: 0 0 6px var(--hy-success); }
.activity-dot.warn { background: var(--hy-warn); box-shadow: 0 0 6px var(--hy-warn); }
.activity-dot.info { background: var(--hy-accent-2); box-shadow: 0 0 6px var(--hy-accent-2); }

.activity-text {
    color: var(--hy-ink);
    flex: 1;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1100px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .profile-page {
        padding: 20px 16px 60px;
    }
    
    .profile-title {
        font-size: 32px;
    }
    
    .profile-hero-portrait {
        height: 200px;
    }
    
    .profile-hero-avatar {
        width: 120px;
        height: 120px;
        left: 40px;
        top: 40px;
        font-size: 42px;
    }
    
    .profile-hero-ring {
        width: 160px;
        height: 160px;
    }
    
    .profile-hero-scope {
        display: none;
    }
    
    .profile-hero-name {
        font-size: 28px;
    }
    
    .profile-hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .profile-sidebar {
        grid-template-columns: 1fr;
    }
    
    .identity-grid {
        grid-template-columns: 1fr;
    }
    
    .certs-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Animations
   ============================================ */
.profile-animate-in {
    animation: hy-fade-up 0.3s ease backwards;
}

.profile-animate-in.delay-1 { animation-delay: 50ms; }
.profile-animate-in.delay-2 { animation-delay: 100ms; }
.profile-animate-in.delay-3 { animation-delay: 150ms; }
.profile-animate-in.delay-4 { animation-delay: 200ms; }
.profile-animate-in.delay-5 { animation-delay: 250ms; }

@keyframes hy-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hy-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hy-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes hy-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
