/* ==========================================================================
   Machine Specifications - CSS
   Palette: #00B0F0, #002060, #FFFFFF, #D4C4A8, #1A1A1A, #F5F5F7
   ========================================================================== */

:root {
    --color-primary: #00B0F0;     /* Bleu clair */
    --color-secondary: #002060;   /* Bleu foncé */
    --color-white: #FFFFFF;
    --color-beige: #D4C4A8;
    --color-dark: #1A1A1A;
    --color-light: #F5F5F7;
}

/* Container principal
   ========================================================================== */

.machine-specs {
    width: 100%;
    margin: 40px 0;
}

.machine-specs-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-secondary);
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
}

.machine-specs-empty {
    padding: 20px;
    background: var(--color-light);
    color: var(--color-dark);
    text-align: center;
    font-style: italic;
}

/* Tableau de base
   ========================================================================== */

.machine-specs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
}

.machine-specs-table tbody tr {
    border-bottom: 1px solid var(--color-light);
}

.machine-specs-table tbody tr:last-child {
    border-bottom: none;
}

.machine-specs-table th {
    width: 40%;
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-secondary);
    background: var(--color-light);
    vertical-align: top;
}

.machine-specs-table td {
    width: 60%;
    padding: 16px 20px;
    font-size: 14px;
    color: var(--color-dark);
    background: var(--color-white);
    vertical-align: top;
}

/* Style: Default (bleu)
   ========================================================================== */

.machine-specs-style-default .machine-specs-table th {
    background: var(--color-primary);
    color: var(--color-white);
}

.machine-specs-style-default .machine-specs-table tbody tr:hover {
    background: rgba(0, 176, 240, 0.05);
}

/* Style: Compact (plus serré)
   ========================================================================== */

.machine-specs-style-compact .machine-specs-table th,
.machine-specs-style-compact .machine-specs-table td {
    padding: 12px 16px;
    font-size: 13px;
}

/* Style: Striped (rayé)
   ========================================================================== */

.machine-specs-style-striped .machine-specs-table tbody tr:nth-child(even) {
    background: var(--color-light);
}

.machine-specs-style-striped .machine-specs-table tbody tr:nth-child(even) td {
    background: var(--color-light);
}

/* Layout: 2 colonnes
   ========================================================================== */

.machine-specs-columns-2 .machine-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .machine-specs-columns-2 .machine-specs-grid {
        gap: 20px;
    }
    
    .machine-specs-table th {
        width: 45%;
    }
    
    .machine-specs-table td {
        width: 55%;
    }
}

@media (max-width: 768px) {
    .machine-specs {
        margin: 30px 0;
    }
    
    .machine-specs-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .machine-specs-columns-2 .machine-specs-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .machine-specs-table th,
    .machine-specs-table td {
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .machine-specs-table th {
        width: 100%;
        display: block;
        border-bottom: none;
        padding-bottom: 8px;
    }
    
    .machine-specs-table td {
        width: 100%;
        display: block;
        padding-top: 8px;
        background: var(--color-white);
    }
    
    .machine-specs-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border-bottom: 2px solid var(--color-light);
        padding-bottom: 12px;
    }
    
    .machine-specs-table tbody tr:last-child {
        margin-bottom: 0;
        border-bottom: none;
    }
}

/* Variantes de couleurs
   ========================================================================== */

/* Variante: Bleu foncé */
.machine-specs-style-dark .machine-specs-table th {
    background: var(--color-secondary);
    color: var(--color-white);
}

/* Variante: Beige */
.machine-specs-style-beige .machine-specs-table th {
    background: var(--color-beige);
    color: var(--color-dark);
}

/* Variante: Bordure colorée */
.machine-specs-style-bordered {
    border: 2px solid var(--color-primary);
}

.machine-specs-style-bordered .machine-specs-table {
    border: none;
}

/* Animation au survol
   ========================================================================== */

.machine-specs-table tbody tr {
    transition: background-color 0.2s ease;
}

.machine-specs-table tbody tr:hover th,
.machine-specs-table tbody tr:hover td {
    background-color: rgba(0, 176, 240, 0.05);
}

/* Print styles
   ========================================================================== */

@media print {
    .machine-specs {
        break-inside: avoid;
    }
    
    .machine-specs-table th,
    .machine-specs-table td {
        padding: 10px;
        font-size: 11px;
    }
    
    .machine-specs-table tbody tr {
        break-inside: avoid;
    }
}

/* Accessibilité
   ========================================================================== */

.machine-specs-table:focus-within tbody tr:focus-within {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Valeurs vides
   ========================================================================== */

.machine-specs-table td:empty::before {
    content: 'N/A';
    color: #999;
    font-style: italic;
}