/* ============================================================================
   STYLES POUR CONTENU ENRICHI DATASHEETS
   À ajouter dans votre fichier CSS principal ou créer enriched-datasheet.css
   ============================================================================ */

/* Image du composant */
.component-image-block {
    margin-bottom: 1.5rem;
    text-align: center;
}

.component-image-block figure {
    display: inline-block;
    margin: 0;
}

.component-photo {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e0e0e0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.component-image-block figcaption {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Sections enrichies - Style général */
.enriched-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 24px;
    margin: 24px 0;
    border-radius: 12px;
    border-left: 4px solid #007bff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.enriched-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.enriched-section h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.enriched-section p {
    color: #34495e;
    line-height: 1.8;
    font-size: 1.05em;
    margin: 0;
    text-align: justify;
}

/* Contexte technique */
.technical-context {
    border-left-color: #3498db;
}

.technical-context h3 {
    color: #2980b9;
}

/* Guide de sélection */
.selection-guide {
    border-left-color: #f39c12;
}

.selection-guide h3 {
    color: #e67e22;
}

/* Conseils pratiques */
.practical-tips {
    border-left-color: #27ae60;
}

.practical-tips h3 {
    color: #229954;
}

/* Notes personnelles */
.personal-notes {
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
    border-left-color: #f1c40f;
}

.personal-notes h3 {
    color: #d68910;
}

.personal-notes::before {
    content: "💡";
    font-size: 24px;
    float: left;
    margin-right: 12px;
}

/* Composants similaires */
.related-components {
    border-left-color: #9b59b6;
}

.related-components h3 {
    color: #8e44ad;
}

.component-links {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
}

.component-links li {
    padding: 12px 16px;
    margin: 8px 0;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.component-links li:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.component-links a {
    font-weight: 600;
    color: #007bff;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.2s ease;
}

.component-links a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.component-links .desc {
    color: #6c757d;
    font-size: 0.95em;
    flex: 1;
}

/* Types de relations */
.relation-alternative {
    border-left: 3px solid #17a2b8;
}

.relation-upgrade {
    border-left: 3px solid #28a745;
}

.relation-downgrade {
    border-left: 3px solid #ffc107;
}

.relation-complementary {
    border-left: 3px solid #6f42c1;
}

/* Responsive */
@media (max-width: 768px) {
    .enriched-section {
        padding: 16px;
        margin: 16px 0;
    }
    
    .enriched-section h3 {
        font-size: 1.1em;
    }
    
    .enriched-section p {
        font-size: 1em;
        text-align: left;
    }
    
    .component-links li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Animation d'apparition progressive */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.enriched-section {
    animation: fadeInUp 0.6s ease-out;
}

/* Amélioration de la lisibilité */
.enriched-section strong {
    color: #2c3e50;
    font-weight: 600;
}

.enriched-section em {
    color: #7f8c8d;
    font-style: italic;
}

/* Citations techniques */
.enriched-section code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #c7254e;
    font-size: 0.9em;
}

/* Séparateur visuel entre sections */
.enriched-section + .enriched-section {
    margin-top: 32px;
}

/* Style pour impression */
@media print {
    .enriched-section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .enriched-section:hover {
        transform: none;
    }
}

/* ============================================================================
   INTÉGRATION AVEC LE LAYOUT EXISTANT
   ============================================================================ */

/* S'assure que le contenu enrichi s'intègre bien avec les specs existantes */
.datasheet-content .main-content > .enriched-section:first-child {
    margin-top: 0;
}

/* Espacement avec les autres sections */
.enriched-section + .specs-section,
.enriched-section + .features-section {
    margin-top: 32px;
}

/* ============================================================================
   MODE SOMBRE (optionnel)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    .enriched-section {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        border-left-color: #3498db;
    }
    
    .enriched-section h3 {
        color: #ecf0f1;
    }
    
    .enriched-section p {
        color: #bdc3c7;
    }
    
    .component-links li {
        background: #34495e;
        border-color: #4a5f7f;
    }
    
    .component-links li:hover {
        background: #3d5266;
        border-color: #3498db;
    }
    
    .component-links a {
        color: #5dade2;
    }
    
    .component-links .desc {
        color: #95a5a6;
    }
}
