/* ==========================================================================
   PAGE PCB - KiCad 9.0 & JLCPCB
   ========================================================================== */

/* HERO */
.pcb-hero {
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #1565c0 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pcb-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(26,115,232,0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(52,168,83,0.2) 0%, transparent 40%);
    pointer-events: none;
}

.pcb-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}

.pcb-hero p {
    font-size: 1.25rem;
    max-width: 750px;
    margin: 0 auto 2rem;
    opacity: 0.9;
    line-height: 1.6;
    position: relative;
}

.pcb-hero-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.pcb-hero-badge {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 2rem;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

/* NAVIGATION ONGLETS */
.pcb-tabs {
    background: white;
    border-bottom: 2px solid var(--medium);
    position: sticky;
    top: 64px;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pcb-tabs-inner {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.pcb-tabs-inner::-webkit-scrollbar { display: none; }

.pcb-tab-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--dark-light);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pcb-tab-btn:hover {
    color: var(--primary);
    background: #f0f7ff;
}

.pcb-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.pcb-tab-icon {
    font-size: 1.1rem;
}

/* PANNEAU D'ONGLET */
.pcb-panel {
    display: none;
}

.pcb-panel.active {
    display: block;
}

/* SECTION GÉNÉRIQUE */
.pcb-section {
    padding: 3rem 0;
}

.pcb-section + .pcb-section {
    border-top: 1px solid var(--medium);
}

.pcb-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pcb-section-title .icon {
    font-size: 1.5rem;
}

.pcb-section-subtitle {
    color: var(--dark-light);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 700px;
}

/* GRILLE FEATURES KICAD */
.kicad-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.kicad-feature-card {
    background: white;
    border: 1px solid var(--medium);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.kicad-feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(26,115,232,0.12);
}

.kicad-feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.kicad-feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.4rem;
}

.kicad-feature-card p {
    font-size: 0.9rem;
    color: var(--dark-light);
    line-height: 1.5;
}

/* BADGE NOUVEAU */
.badge-new {
    display: inline-block;
    background: var(--secondary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 0.75rem;
    vertical-align: middle;
    margin-left: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* WORKFLOW */
.kicad-workflow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0;
    background: var(--light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--medium);
    margin-bottom: 2.5rem;
}

.workflow-step {
    padding: 1.5rem 1rem;
    text-align: center;
    border-right: 1px solid var(--medium);
    position: relative;
}

.workflow-step:last-child { border-right: none; }

.workflow-step-num {
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.workflow-step-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }

.workflow-step h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.workflow-step p {
    font-size: 0.78rem;
    color: var(--dark-light);
    line-height: 1.4;
}

/* TABLEAUX JLCPCB */
.specs-category {
    margin-bottom: 2.5rem;
}

.specs-category h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3f2fd;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.specs-table th {
    background: #1a237e;
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
}

.specs-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    color: var(--dark);
    vertical-align: middle;
}

.specs-table tr:last-child td { border-bottom: none; }

.specs-table tr:nth-child(even) td { background: #fafbfc; }

.specs-table tr:hover td { background: #f0f7ff; }

.spec-value-good {
    color: var(--secondary-accessible);
    font-weight: 600;
}

.spec-value-note {
    color: #e65100;
    font-weight: 500;
}

/* GRILLE COULEURS SOUDURE */
.solder-mask-grid {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.solder-color {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.15);
    display: inline-block;
    title: attr(data-label);
    cursor: default;
    position: relative;
}

.solder-color-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--dark-light);
}

/* INFO BOX */
.pcb-info-box {
    background: #e3f2fd;
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.pcb-info-box .info-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 0.05rem; }

.pcb-info-box p {
    font-size: 0.92rem;
    color: var(--dark);
    line-height: 1.5;
    margin: 0;
}

.pcb-warning-box {
    background: #fff8e1;
    border-left-color: #f59e0b;
}

/* SECTION CONFIG / TÉLÉCHARGEMENT */
.config-download-card {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.config-download-icon {
    font-size: 4rem;
    flex-shrink: 0;
}

.config-download-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.config-download-info p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.config-download-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.config-meta-badge {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 1rem;
    padding: 0.2rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #1a237e;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid white;
}

.btn-download:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
}

/* BLOC CODE / INSTRUCTIONS */
.pcb-steps-list {
    counter-reset: pcb-step;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pcb-steps-list li {
    counter-increment: pcb-step;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: white;
    border: 1px solid var(--medium);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.pcb-steps-list li::before {
    content: counter(pcb-step);
    min-width: 1.75rem;
    height: 1.75rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pcb-steps-list li p {
    font-size: 0.92rem;
    color: var(--dark);
    line-height: 1.5;
    margin: 0;
}

.pcb-steps-list li strong { color: var(--primary); }

/* BLOC RÈGLES DRC EXPLIQUÉES */
.dru-rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.dru-rule-card {
    background: white;
    border: 1px solid var(--medium);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--primary);
}

.dru-rule-card.warning { border-left-color: #f59e0b; }
.dru-rule-card.success { border-left-color: var(--secondary); }

.dru-rule-name {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--primary);
    background: #f0f7ff;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.dru-rule-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.dru-rule-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.dru-rule-desc {
    font-size: 0.82rem;
    color: var(--dark-light);
    line-height: 1.4;
}

/* NET CLASSES */
.netclass-table-wrap { overflow-x: auto; }

/* GERBER CHECKLIST */
.gerber-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.gerber-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    background: white;
    border: 1px solid var(--medium);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--dark);
}

.gerber-item .check { color: var(--secondary-accessible); font-weight: 700; font-size: 1rem; }

.gerber-item code {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--primary);
    background: #f0f7ff;
    padding: 0.1rem 0.35rem;
    border-radius: 0.2rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .pcb-hero h1 { font-size: 2rem; }
    .pcb-hero p { font-size: 1.05rem; }

    .pcb-tab-btn { padding: 0.85rem 1rem; font-size: 0.88rem; }

    .kicad-workflow { grid-template-columns: repeat(2, 1fr); }
    .workflow-step { border-right: none; border-bottom: 1px solid var(--medium); }
    .workflow-step:nth-child(2n) { border-right: none; }

    .config-download-card {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem;
        gap: 1.25rem;
    }

    .config-download-meta { justify-content: center; }

    .specs-table { font-size: 0.82rem; }
    .specs-table th, .specs-table td { padding: 0.55rem 0.65rem; }
}

@media (max-width: 480px) {
    .kicad-workflow { grid-template-columns: 1fr; }
    .dru-rules-grid { grid-template-columns: 1fr; }
}
