/* =============================================================================
   DATASHEET PAGES - STYLES SPÉCIFIQUES
   Extends: cards.css, tables.css, badges.css, variables.css
   Version: 3.0 Optimisée
   ============================================================================= */

/* =============================================================================
   OVERRIDE VARIABLES POUR THÈME SOMBRE DATASHEET
   ============================================================================= */
.datasheet-page {
    /* Réutilise les variables existantes du thème sombre */
    background: var(--bg-page-dark);
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* =============================================================================
   HEADER DATASHEET - Extension de .card
   ============================================================================= */
.datasheet-header {
    /* Extends .card avec surcharges thème sombre */
    background: var(--bg-section-dark);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-dark);
    position: relative;
}

.ds-header-thumb {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 110px;
    height: 110px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-dark);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    padding: 6px;
}

@media (max-width: 600px) {
    .ds-header-thumb {
        width: 70px;
        height: 70px;
        top: 1rem;
        right: 1rem;
    }
}

.datasheet-header h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
    color: var(--text-on-dark-primary);
    margin: 0 0 0.75rem 0;
    line-height: var(--line-height-tight);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.025em;
}

.datasheet-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-on-dark-secondary);
    margin: 0 0 1.5rem 0;
    line-height: var(--line-height-relaxed);
}

/* =============================================================================
   BREADCRUMB - Amélioration contrastes
   ============================================================================= */
.datasheet-page .breadcrumb {
    color: var(--text-on-dark-secondary);
    margin-bottom: 1.5rem;
    padding: 0;
}

.datasheet-page .breadcrumb a {
    color: #020eab;
    font-weight: var(--font-weight-semibold);
}

.datasheet-page .breadcrumb a:hover {
    color: #bfdbfe;
}

.datasheet-page .breadcrumb span:last-child {
    color: var(--text-on-dark-primary);
    font-weight: var(--font-weight-bold);
}

/* =============================================================================
   COMPONENT META
   ============================================================================= */
.component-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 1.25rem;
    border-top: 2px solid var(--border-dark);
}

.meta-item {
    font-size: var(--font-size-sm);
    color: var(--text-on-dark-primary);  /* Texte clair pour bon contraste */
}

.meta-item strong {
    color: #9ca3af;  /* Labels en gris */
    font-weight: var(--font-weight-bold);
    margin-right: 0.5rem;
}

/* Badge interface - extends .badge */
.interface-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: var(--font-weight-extrabold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.5);
}

/* =============================================================================
   LAYOUT CONTENU
   ============================================================================= */
.datasheet-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

/* =============================================================================
   SECTIONS - Extension de .card
   ============================================================================= */
.main-content > div {
    /* Réutilise la structure de .card */
    background: var(--bg-section-dark);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-dark);
}

.main-content h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-on-dark-primary);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.875rem;
    border-bottom: 3px solid var(--datasheet-primary);
    letter-spacing: -0.025em;
}

/* =============================================================================
   TABLEAUX SPECS - Extension de .specs-table
   ============================================================================= */
.specs-section .specs-table {
    width: 100%;
    background: transparent;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.specs-section .specs-table tbody {
    background: transparent;
}

.specs-section .specs-table tr {
    background: transparent;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.2s ease;
}

.specs-section .specs-table tr:nth-child(even) {
    background: rgba(30, 41, 59, 0.3);
}

.specs-section .specs-table tr:hover {
    background: rgba(59, 130, 246, 0.15);
    transform: translateX(4px);
}

.specs-section .specs-table td {
    padding: 1rem 1.25rem;
    background: transparent;
}

.specs-section .specs-table td:first-child {
    font-weight: 700;
    color: #ffffff;
    font-size: 1rem;
    width: 60%;
}

.specs-section .specs-table td:first-child::before {
    content: '⚡';
    margin-right: 0.75rem;
    font-size: 1.25em;
    color: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
}

.specs-section .specs-table td:last-child {
    color: #ffffff;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.125rem;
    text-align: right;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    width: 40%;
}

/* =============================================================================
   FEATURES LIST - Extension basée sur .quality-list
   ============================================================================= */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.875rem;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    background: var(--bg-card-dark);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--datasheet-success);
    color: var(--text-on-dark-secondary);
    line-height: var(--line-height-relaxed);
    font-size: var(--font-size-sm);
    transition: var(--transition-base);
}

.features-list li:hover {
    background: var(--bg-hover);
    box-shadow: var(--shadow-md);
    transform: translateX(6px);
    color: var(--text-on-dark-primary);
    border-left-color: #34d399;
}

.features-list li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-right: 0.875rem;
    background: var(--datasheet-success);
    color: white;
    border-radius: 50%;
    font-weight: var(--font-weight-extrabold);
    font-size: var(--font-size-base);
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.4);
}

/* =============================================================================
   APPLICATIONS TAGS - Extension de .badge
   ============================================================================= */
.applications-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
}

.app-tag {
    /* Extension de .badge avec style violet */
    padding: 0.625rem 1.125rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    transition: var(--transition-slow);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.5);
}

.app-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.6);
}

.app-tag::before {
    content: '🎯';
    margin-right: 0.625rem;
}

/* =============================================================================
   PROJETS LIÉS
   ============================================================================= */
.related-projects {
    display: grid;
    gap: 0.875rem;
}

.project-link {
    display: block;
    padding: 1.125rem 1.25rem;
    background: var(--bg-card-dark);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--datasheet-info);
    color: var(--text-on-dark-primary);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: var(--transition-base);
    font-size: var(--font-size-sm);
}

.project-link:hover {
    background: var(--bg-hover);
    box-shadow: var(--shadow-md);
    transform: translateX(6px);
    border-left-color: #22d3ee;
}

.project-link::before {
    content: '📁';
    margin-right: 0.75rem;
}

/* =============================================================================
   SIDEBAR - Extension de .card
   ============================================================================= */
.sidebar > div {
    background: var(--bg-section-dark);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-dark);
}

/* =============================================================================
   DOWNLOAD CARD - Style spécial
   ============================================================================= */
.download-card {
    text-align: center;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    border: 2px solid #1e40af !important;
}

.download-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.download-card h3 {
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 0.875rem;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-xl);
}

.download-card p {
    color: white;
    font-size: var(--font-size-sm);
    margin-bottom: 1.5rem;
    font-weight: var(--font-weight-medium);
}

.btn-download {
    /* Extension du système .btn existant */
    display: inline-block;
    padding: 0.875rem 2.25rem;
    background: white;
    color: #1e40af;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-extrabold);
    font-size: var(--font-size-base);
    transition: var(--transition-slow);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.file-info {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: space-around;
    font-size: var(--font-size-xs);
    color: white;
    font-weight: var(--font-weight-semibold);
}

/* =============================================================================
   TECH SUMMARY
   ============================================================================= */
.tech-summary h4 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin: 0 0 1.25rem 0;
    color: var(--text-on-dark-primary);
}

.tech-summary dt {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.075em;
    color: var(--text-on-dark-muted);
    margin-top: 1rem;
    font-weight: var(--font-weight-bold);
}

.tech-summary dt:first-child {
    margin-top: 0;
}

.tech-summary dd {
    margin: 0.375rem 0 0 0;
    font-size: 1.0625rem;
    color: var(--text-on-dark-primary);
    font-weight: var(--font-weight-bold);
}

/* =============================================================================
   PRIORITY BADGES - Extension de .performance-badge
   ============================================================================= */
.priority-critical,
.priority-high,
.priority-medium,
.priority-low {
    /* Extends .performance-badge */
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-extrabold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.priority-critical {
    background: linear-gradient(135deg, var(--datasheet-danger) 0%, #991b1b 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.6);
}

.priority-high {
    background: linear-gradient(135deg, var(--datasheet-warning) 0%, #c2410c 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(234, 88, 12, 0.6);
}

.priority-medium {
    background: linear-gradient(135deg, var(--datasheet-info) 0%, #0e7490 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(8, 145, 178, 0.6);
}

.priority-low {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(71, 85, 105, 0.6);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 968px) {
    .datasheet-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .datasheet-header {
        padding: 1.5rem;
    }
    
    .datasheet-header h1 {
        font-size: var(--font-size-3xl);
    }
    
    .component-meta {
        flex-direction: column;
        gap: 0.875rem;
    }
    
    .main-content > div,
    .sidebar > div {
        padding: 1.25rem;
    }
}

/* Classes manquantes critiques pour datasheets */
.tech-summary {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.pdf-viewer-section {
    margin: 3rem 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pdf-container {
    width: 100%;
    height: 800px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.features-section {
    margin: 3rem 0;
    padding: 2rem;
}

/* ----------------------------------------------------------------------------
   1. APPLICATIONS SECTION - 342 fichiers
   Fichier cible: 05-pages/datasheet-styles.css
   ---------------------------------------------------------------------------- */

.applications-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 3rem 2rem;
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.applications-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71, #f39c12);
}

.applications-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.applications-section h3 {
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.applications-section ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.applications-section li {
    padding: 0.75rem 0 0.75rem 2.5rem;
    position: relative;
    line-height: 1.6;
    transition: transform 0.2s ease;
}

.applications-section li:hover {
    transform: translateX(5px);
}

.applications-section li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
    font-size: 1.2rem;
}

.applications-section p {
    line-height: 1.7;
    color: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .applications-section {
        padding: 2rem 1.5rem;
    }
    
    .applications-section h2 {
        font-size: 1.5rem;
    }
}