/* =============================================================================
   AMPLIFICATEUR CLASSE A 15W — Mise en page spécialisée
   Scope: body.ampli-page
   Objectifs: tuiles horizontales, fond uniforme, styles cohérents
   ============================================================================= */

/* =============================================================================
   1. FOND DE PAGE UNIFORME
   Supprime le dégradé gris foncé de .devices-section,
   normalise tous les fonds de section sur blanc / gris très clair.
   ============================================================================= */

.ampli-page .section,
.ampli-page .devices-section,
.ampli-page .applications {
    background: white;
    margin: 0;
    padding: 48px 0;
}

/* Alternance légère entre sections pour rythme visuel */
.ampli-page #design-critique,
.ampli-page #alimentation,
.ampli-page #protection-secteur,
.ampli-page #etage-differentiel,
.ampli-page #etage-driver,
.ampli-page #layout-pcb {
    background: #f7f8fc;
}

/* =============================================================================
   2. EN-TÊTE DE SECTION UNIFORME
   ============================================================================= */

.ampli-page .section-header {
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 2px solid #eaecf4;
}

.ampli-page .section-header h2,
.ampli-page h2.section-title {
    font-size: 1.5rem;
    color: #1a2340;
    margin-bottom: 5px;
    font-weight: 700;
}

.ampli-page .section-header p,
.ampli-page .section-intro p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

/* =============================================================================
   3. INTRO-CARD (esphome-intro-card) — MAINTENANT STYLÉE
   Était complètement sans CSS.
   ============================================================================= */

.ampli-page .esphome-intro-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #f0f4ff;
    border-left: 4px solid #1a73e8;
    border-radius: 10px;
    padding: 22px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ampli-page .intro-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
    padding-top: 2px;
}

.ampli-page .intro-content h3 {
    font-size: 1.15rem;
    color: #1a73e8;
    margin-bottom: 3px;
    font-weight: 700;
}

.ampli-page .intro-subtitle {
    color: #555;
    font-style: italic;
    font-size: 0.88rem;
    margin-bottom: 8px !important;
}

.ampli-page .intro-content p:not(.intro-subtitle) {
    font-size: 0.91rem;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

/* =============================================================================
   4. TECH-NOTE UNIFORME
   ============================================================================= */

.ampli-page .tech-note {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    padding: 14px 18px;
}

.ampli-page .tech-note h4 {
    color: #92400e;
    font-size: 0.95rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.ampli-page .tech-note p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #5a4500;
    margin-bottom: 6px;
}

.ampli-page .tech-note p:last-child { margin-bottom: 0; }

/* =============================================================================
   5. TECH-EQUATION — MAINTENANT STYLÉE
   Était complètement sans CSS → HTML brut.
   ============================================================================= */

.ampli-page .tech-equation {
    background: #1a2340;
    color: #c8d0e8;
    border-radius: 8px;
    padding: 18px 22px;
    margin: 24px 0 0;
    font-size: 0.85rem;
    line-height: 1.7;
}

.ampli-page .tech-equation h4 {
    color: #7eb8ff;
    font-size: 0.92rem;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ampli-page .tech-equation p {
    margin-bottom: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.82rem;
    color: #c8d0e8;
}

.ampli-page .tech-equation strong {
    color: #a8d8a8;
}

/* =============================================================================
   6. FEATURE-CARD → HORIZONTALE
   Supprime le centrage vertical + l'icône gigantesque au-dessus du texte.
   Layout : icône-badge à gauche, titre+texte à droite.
   ============================================================================= */

.ampli-page .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.ampli-page .feature-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 16px;
    padding: 18px 20px;
    background: white;
    border-left: 4px solid #1a73e8;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    height: auto;
}

.ampli-page .feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(0,0,0,0.11);
}

.ampli-page .feature-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    background: #eef2ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    color: #1a73e8;
    font-weight: normal;
}

.ampli-page .feature-card h3 {
    font-size: 1rem;
    margin-bottom: 7px;
    color: #1a2340;
    font-weight: 700;
}

.ampli-page .feature-card p {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #555;
    margin: 0;
}

/* =============================================================================
   7. DEVICE-CARD → STRUCTURÉE (header + liste)
   ============================================================================= */

.ampli-page .device-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.ampli-page .device-card {
    background: white;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    border-top: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ampli-page .device-card:hover {
    transform: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

/* Header de la device-card */
.ampli-page .device-card h4 {
    background: #fff5f5;
    color: #c0392b;
    padding: 10px 14px;
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    border-bottom: 1px solid #fce4e4;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ampli-page .device-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Listes dans device-card */
.ampli-page .device-card .device-list {
    padding: 10px 14px;
    margin: 0;
    font-size: 0.84rem;
    flex: 1;
}

.ampli-page .device-card .device-list li {
    padding: 3px 0;
    border-bottom: 1px solid #fafafa;
    line-height: 1.45;
}

.ampli-page .device-card .device-list li:last-child {
    border-bottom: none;
}

/* Paragraphe libre dans device-card */
.ampli-page .device-card > p {
    padding: 8px 14px 0;
    font-size: 0.84rem;
    color: #555;
    font-weight: 600;
    margin: 0;
}

/* tech-highlight en bas de device-card */
.ampli-page .device-card .tech-highlight {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-top: 1px solid #f0f0f0;
    padding: 9px 14px;
    background: #f8f9fa;
    font-size: 0.82rem;
    box-shadow: none;
}

/* =============================================================================
   8. COMPARISON-CARD — MAINTENANT STYLÉE
   Était complètement sans CSS → HTML brut.
   .riaa = concept abandonné (rouge)
   .digital = architecture finale (vert)
   ============================================================================= */

.ampli-page .comparison-grid {
    gap: 18px;
}

.ampli-page .comparison-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.ampli-page .comparison-card.riaa {
    border-left: 4px solid #e74c3c;
}

.ampli-page .comparison-card.digital {
    border-left: 4px solid #27ae60;
}

/* Header comparison */
.ampli-page .comparison-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.ampli-page .comparison-card.riaa .comparison-header {
    background: #fff5f5;
    border-bottom-color: #fce4e4;
}

.ampli-page .comparison-card.digital .comparison-header {
    background: #f0faf3;
    border-bottom-color: #d4edda;
}

.ampli-page .comparison-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.ampli-page .comparison-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.ampli-page .comparison-card.riaa .comparison-header h3 { color: #c0392b; }
.ampli-page .comparison-card.digital .comparison-header h3 { color: #1e7e34; }

/* Liste comparison */
.ampli-page .comparison-list {
    list-style: none;
    padding: 10px 16px;
    margin: 0;
    font-size: 0.845rem;
    line-height: 1.5;
    flex: 1;
}

.ampli-page .comparison-list li {
    padding: 4px 0;
    border-bottom: 1px solid #f7f7f7;
}

.ampli-page .comparison-list li:last-child { border-bottom: none; }

/* tech-highlight en bas de comparison-card */
.ampli-page .comparison-card .tech-highlight {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-top: 1px solid #eee;
    padding: 10px 16px;
    background: #f8f9fa;
    font-size: 0.82rem;
    box-shadow: none;
}

/* =============================================================================
   9. SOLUTION-STEPS UNIFORME
   ============================================================================= */

.ampli-page .solution-steps {
    gap: 14px;
}

.ampli-page .solution-step {
    background: white;
    border-left: 3px solid #1a73e8;
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.ampli-page .solution-step h4 {
    font-size: 0.93rem;
    color: #1a2340;
    margin-bottom: 8px;
    font-weight: 700;
}

.ampli-page .solution-step p {
    font-size: 0.855rem;
    line-height: 1.55;
    color: #444;
    margin-bottom: 5px;
}

.ampli-page .solution-step p:last-child { margin-bottom: 0; }

.ampli-page .step-number {
    background: #1a73e8;
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* =============================================================================
   10. APP-CARD HORIZONTALE (section Applications)
   ============================================================================= */

.ampli-page .app-grid {
    grid-template-columns: 1fr;
    gap: 16px;
}

.ampli-page .app-card {
    flex-direction: row;
    align-items: stretch;
    border-left: 4px solid #1a73e8;
}

.ampli-page .app-icon {
    height: auto;
    min-width: 70px;
    width: 70px;
    font-size: 2rem;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    padding: 0;
    flex-shrink: 0;
}

.ampli-page .app-content {
    padding: 16px 20px;
}

.ampli-page .app-content h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.ampli-page .app-content p {
    font-size: 0.875rem;
    line-height: 1.55;
}

/* =============================================================================
   11. RESPONSIVE
   ============================================================================= */

@media (max-width: 1100px) {
    .ampli-page .feature-grid,
    .ampli-page .device-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ampli-page .feature-card {
        flex-direction: column;
        gap: 12px;
    }

    .ampli-page .feature-icon {
        width: 38px;
        height: 38px;
    }

    .ampli-page .esphome-intro-card {
        flex-direction: column;
        gap: 12px;
    }

    .ampli-page .app-card {
        flex-direction: column;
    }

    .ampli-page .app-icon {
        width: 100%;
        min-width: unset;
        height: 60px;
        border-radius: 0;
        font-size: 1.8rem;
    }

    .ampli-page .tech-equation {
        font-size: 0.78rem;
    }

    .ampli-page .tech-equation p {
        font-size: 0.75rem;
    }

    .ampli-page .section,
    .ampli-page .devices-section,
    .ampli-page .applications {
        padding: 32px 0;
    }
}
