/* --- LAYOUT GLOBAL --- */
.agent-detail-container {
    padding: 120px 5% 50px;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden; 
}

.nav-header { 
    margin-bottom: 40px; 
    position: relative;
    z-index: 1000; 
}

.back-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: #aaa; text-decoration: none; text-transform: uppercase;
    font-size: 0.8rem; letter-spacing: 2px; font-weight: 700;
    padding: 12px 25px;
    background: rgba(255,255,255,0.05); 
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    transition: all 0.3s;
    cursor: pointer;
}
.back-link:hover { background: #fff; color: #000; }

.detail-grid {
    display: grid;
    grid-template-columns: 45% 50%;
    gap: 5%;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* --- VISUEL 3D (INTERACTIF) --- */
.detail-visual {
    height: 80vh; 
    position: sticky; 
    top: 100px;
    
    /* 1. Le conteneur laisse passer la souris (transparent aux clics) */
    pointer-events: none; 
    
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50; 
}

.model-wrapper {
    width: 100%; height: 100%;
    
    /* Fond radial subtil */
    background: radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 70%);
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
    
    overflow: visible; 
    position: relative;
    
    /* 2. On RÉACTIVE la souris ici */
    pointer-events: auto !important; 
    z-index: 51;
}

model-viewer { 
    width: 100%; height: 100%; 
    outline: none; 
    cursor: grab; /* Curseur Main */
    
    position: relative;
    z-index: 52; 
    
    /* PLUS DE FOND ROUGE ICI */
    display: block;
}
model-viewer:active { cursor: grabbing; }


/* --- INFORMATIONS (DROITE) --- */
.detail-info {
    padding-top: 20px;
    display: flex; flex-direction: column; gap: 30px;
    position: relative;
    z-index: 1; /* Derrière le robot */
}

.agent-identity { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 30px; }

.detail-role {
    display: inline-block; font-size: 0.8rem; text-transform: uppercase;
    letter-spacing: 2px; margin-bottom: 15px; font-weight: 700;
    padding: 6px 14px; border-radius: 6px;
}

.detail-title {
    font-size: 4rem; font-weight: 800; color: #fff;
    line-height: 1; margin: 0; text-transform: uppercase; letter-spacing: -2px;
}

.detail-desc { font-size: 1.15rem; line-height: 1.8; color: #ccc; font-weight: 300; }

/* --- CARTES SCÉNARIOS --- */
.tech-specs-container { margin-bottom: 20px; }
.tech-specs-container h3 {
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 3px;
    color: #fff; margin-bottom: 25px; display: flex; align-items: center; gap: 10px;
    font-weight: 700; opacity: 0.8;
}
.specs-grid-cards { display: flex; flex-direction: column; gap: 15px; }

.data-card {
    background-color: rgba(30, 30, 35, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px; padding: 25px;
    display: flex; flex-direction: column;
    transition: transform 0.3s ease; position: relative; overflow: hidden;
}
.data-card:hover { background-color: rgba(40, 40, 45, 0.95) !important; transform: translateX(5px); }
.data-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: currentColor; opacity: 0.8; transition: width 0.3s;
}
.data-card:hover::before { width: 6px; opacity: 1; }

.data-label { font-size: 1.1rem; color: #fff !important; font-weight: 700; margin-bottom: 8px; display: block; }
.data-value { font-size: 0.95rem; color: #bbb !important; line-height: 1.5; font-weight: 400; white-space: normal; font-family: 'Helvetica Neue', sans-serif; }

/* --- BOUTON --- */
.detail-actions { margin-top: 20px; }
.cta-deploy {
    display: block; width: 100%; text-align: center;
    padding: 20px; font-size: 1rem; text-transform: uppercase;
    font-weight: 800; letter-spacing: 2px;
    color: #fff; text-decoration: none;
    border-radius: 10px; transition: all 0.3s;
}
.cta-deploy:hover { transform: scale(1.02); filter: brightness(1.2); }

/* --- THEMES --- */

/* --- CHARLY : BLEU (theme-blue) --- */
.theme-blue .detail-title { text-shadow: 0 0 40px rgba(41, 98, 255, 0.4); }
.theme-blue .detail-role { color: #abc4ff; background: rgba(41, 98, 255, 0.2); border: 1px solid rgba(41, 98, 255, 0.4); box-shadow: 0 0 15px rgba(41, 98, 255, 0.2); }
.theme-blue .model-wrapper { border-color: rgba(41, 98, 255, 0.3); }
.theme-blue .data-card { color: #2962ff; }
.theme-blue .data-card:hover { border-color: #2962ff; box-shadow: 0 0 20px rgba(41, 98, 255, 0.1); }
.theme-blue .cta-deploy { background: #2962ff; color: #fff; box-shadow: 0 10px 30px rgba(41, 98, 255, 0.3); }

/* --- ATLAS : JAUNE (theme-gold) --- */
.theme-gold .detail-title { text-shadow: 0 0 40px rgba(255, 215, 0, 0.4); }
.theme-gold .detail-role { color: #fffacd; background: rgba(255, 215, 0, 0.2); border: 1px solid rgba(255, 215, 0, 0.4); box-shadow: 0 0 15px rgba(255, 215, 0, 0.2); }
.theme-gold .model-wrapper { border-color: rgba(255, 215, 0, 0.3); }
.theme-gold .data-card { color: #ffd700; }
.theme-gold .data-card:hover { border-color: #ffd700; box-shadow: 0 0 20px rgba(255, 215, 0, 0.1); }
.theme-gold .cta-deploy { background: #ffd700; color: #000; box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3); }

/* --- NOVA : ROSE (theme-pink) --- */
.theme-pink .detail-title { text-shadow: 0 0 40px rgba(255, 0, 204, 0.4); }
.theme-pink .detail-role { color: #ffccf9; background: rgba(255, 0, 204, 0.2); border: 1px solid rgba(255, 0, 204, 0.4); box-shadow: 0 0 15px rgba(255, 0, 204, 0.2); }
.theme-pink .model-wrapper { border-color: rgba(255, 0, 204, 0.3); }
.theme-pink .data-card { color: #ff00cc; }
.theme-pink .data-card:hover { border-color: #ff00cc; box-shadow: 0 0 20px rgba(255, 0, 204, 0.1); }
.theme-pink .cta-deploy { background: #ff00cc; color: #fff; box-shadow: 0 10px 30px rgba(255, 0, 204, 0.3); }

/* --- VOLTA : ORANGE (theme-orange) --- */
.theme-orange .detail-title { text-shadow: 0 0 40px rgba(255, 107, 0, 0.4); }
.theme-orange .detail-role { color: #ffdbb7; background: rgba(255, 107, 0, 0.2); border: 1px solid rgba(255, 107, 0, 0.4); box-shadow: 0 0 15px rgba(255, 107, 0, 0.2); }
.theme-orange .model-wrapper { border-color: rgba(255, 107, 0, 0.3); }
.theme-orange .data-card { color: #ff6b00; }
.theme-orange .data-card:hover { border-color: #ff6b00; box-shadow: 0 0 20px rgba(255, 107, 0, 0.1); }
.theme-orange .cta-deploy { background: #ff6b00; color: #fff; box-shadow: 0 10px 30px rgba(255, 107, 0, 0.3); }

/* --- ORION : ROUGE (theme-red) --- */
.theme-red .detail-title { text-shadow: 0 0 40px rgba(255, 0, 85, 0.4); }
.theme-red .detail-role { color: #ffccd5; background: rgba(255, 0, 85, 0.2); border: 1px solid rgba(255, 0, 85, 0.4); box-shadow: 0 0 15px rgba(255, 0, 85, 0.2); }
.theme-red .model-wrapper { border-color: rgba(255, 0, 85, 0.3); }
.theme-red .data-card { color: #ff0055; }
.theme-red .data-card:hover { border-color: #ff0055; box-shadow: 0 0 20px rgba(255, 0, 85, 0.1); }
.theme-red .cta-deploy { background: #ff0055; color: #fff; box-shadow: 0 10px 30px rgba(255, 0, 85, 0.3); }

@media (max-width: 900px) {
    .detail-grid { grid-template-columns: 1fr; gap: 40px; }
    .detail-visual { height: 450px; position: relative; top: 0; margin-bottom: 30px; pointer-events: auto; }
    .detail-title { font-size: 3rem; }
}