/* ==========================================================================
   VISIONNEUSE DE CRÉATION
   Structure :
   1. Carte principale (image + infos)
   2. Section visuelle (gauche)
   3. Section infos (droite)
   4. Footer / boutons
   5. Timeline technique (texte + schémas)
   6. Viewer 3D
   7. Animations
   8. Responsive
   ========================================================================== */


/* ==========================================================================
   1. CARTE PRINCIPALE
   ========================================================================== */
.creation-viewer-card {
    display: grid;
    grid-template-columns: 1fr 400px;
    background: var(--card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin: 20px 0 40px 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    min-height: 600px;
}


/* ==========================================================================
   2. SECTION VISUELLE (GAUCHE)
   ========================================================================== */
.creation-visual {
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    border-right: 1px solid var(--border);
}

.main-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
}

.main-img:hover {
    transform: scale(1.01);
}


/* ==========================================================================
   3. SECTION INFOS (DROITE)
   ========================================================================== */
.creation-details {
    padding: 40px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.details-header h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #fff;
    line-height: 1.2;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.date-badge {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 20px;
}

.details-body {
    flex-grow: 1;
    margin-bottom: 30px;
}

.details-body h3 {
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.details-body p,
.description-p {
    line-height: 1.7;
    color: #cbd5e1;
    font-size: 1rem;
    word-wrap: break-word;
}


/* ==========================================================================
   4. FOOTER / BOUTONS
   ========================================================================== */
.details-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.back-btn:hover {
    color: var(--accent);
}

.back-btn:hover i {
    transform: translateX(-5px);
}

.edit-btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: 10px;
    color: #00d2ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    margin-left: 15px;
}

.edit-btn-inline i {
    font-size: 0.9rem;
    transition: transform 0.4s ease;
}

.edit-btn-inline:hover {
    background: rgba(0, 210, 255, 0.2);
    border-color: #00d2ff;
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
    transform: translateY(-2px);
}

.edit-btn-inline:hover i {
    transform: rotate(90deg);
}


/* ==========================================================================
   5. TIMELINE TECHNIQUE (TEXTE + SCHÉMAS)
   ========================================================================== */
.technical-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Ligne verticale de la timeline */
.technical-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 60px;
    bottom: 20px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    opacity: 0.3;
}

.section-title-neon {
    font-size: 1.4rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.tech-step {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    animation: slideUp 0.5s ease-out both;
    animation-delay: calc(var(--i) * 0.1s);
}

.step-marker {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: rgba(0, 210, 255, 0.1);
    border: 2px solid rgba(0, 210, 255, 0.4);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.15);
}

.step-content {
    flex: 1;
    padding: 25px;
    border-radius: 16px;
}

/* Texte technique */
.tech-text p {
    color: #e2e8f0;
    font-size: 1.05rem;
    line-height: 1.8;
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0;
}

/* Schémas */
.tech-schema h3 {
    color: var(--accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.img-tech-zoom {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.img-tech-zoom:hover {
    transform: scale(1.01);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}


/* ==========================================================================
   6. VIEWER 3D
   ========================================================================== */
.tech-3d-section {
    margin-top: 40px;
}

.tech-3d-section > h2 {
    font-size: 1.4rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

/* Ajoute ça dans ta section "6. VIEWER 3D" */

#three-viewer-container {
    width: 100%;
    height: 550px;
    background: #0b0f1a;
    border-radius: 15px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

#three-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00d2ff;
    text-align: center;
    pointer-events: none;
    z-index: 10;
}

#three-loader i {
    font-size: 3rem;
}

#three-loader p {
    margin-top: 10px;
    font-family: monospace;
    font-size: 0.9rem;
    opacity: 0.8;
}

.viewer-hint {
    text-align: center;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
}


/* ==========================================================================
   7. ANIMATIONS
   ========================================================================== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
    .creation-viewer-card {
        grid-template-columns: 1fr;
    }

    .creation-visual {
        border-right: none;
        border-bottom: 1px solid var(--border);
        min-height: 400px;
    }

    .creation-details {
        padding: 30px;
    }

    .technical-timeline::before {
        display: none;
    }
}

@media (max-width: 600px) {
    .details-header h1 {
        font-size: 1.6rem;
    }

    .creation-visual {
        padding: 10px;
        min-height: 300px;
    }

    .tech-step {
        gap: 15px;
    }

    .step-marker {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.8rem;
    }

    #three-viewer-container {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .details-footer {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .edit-btn-inline {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}