/* ==========================================================================
   ISPAG QR Product Data Sheet - Full Modern & Responsive
   ========================================================================== */

:root {
    --ispag-blue: #1a252f;
    --ispag-red: #c0392b;
    --warranty-green: #27ae60;
    --warranty-orange: #e67e22;
    --bg-light: #f4f7f9;
    --border-color: #e2e8f0;
}

.ispag-qr-modern-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2c3e50;
    background: var(--bg-light);
}

/* 1. Hero Card - Anti-Overlap Design */
.product-hero-card {
    background: var(--ispag-blue);
    color: white;
    padding: 25px;
    border-radius: 16px;
    display: flex;
    flex-direction: column; /* Empilement vertical strict */
    gap: 12px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.badge-warranty {
    align-self: flex-start; /* Ne prend que la largeur nécessaire */
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.badge-warranty.is-active { background: var(--warranty-green); }
.badge-warranty.is-expired { background: var(--warranty-orange); }

.badge-warranty .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.category-label {
    text-transform: uppercase;
    font-size: 0.75em;
    letter-spacing: 1.5px;
    opacity: 0.7;
    display: block;
}

.product-hero-card h1 {
    margin: 5px 0;
    font-size: 1.6em;
    line-height: 1.2;
    color: white;
    word-wrap: break-word; /* Sécurité pour les noms d'articles très longs */
}

.serial-chip {
    display: inline-flex;
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.15);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.9em;
}

.serial-chip .label { opacity: 0.6; margin-right: 8px; }
.serial-chip .value { font-weight: 700; font-family: monospace; }

/* 2. Quick Stats Grid */
.quick-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-color);
}

.stat-card .dashicons { color: #3498db; font-size: 20px; }
.stat-data label { display: block; font-size: 0.7em; color: #7f8c8d; text-transform: uppercase; font-weight: 600; }
.stat-data strong { font-size: 0.9em; color: #2c3e50; }

/* 3. Details Sections & Specs */
.section-subtitle {
    font-size: 1em;
    margin: 25px 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.specs-card {
    background: white;
    border-radius: 12px;
    padding: 5px 20px;
    border: 1px solid var(--border-color);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f1f1f1;
    font-size: 0.95em;
}

.spec-row:last-child { border-bottom: none; }
.spec-label { color: #7f8c8d; }
.spec-value { font-weight: 700; text-align: right; margin-left: 10px; }

/* 4. Documentation Actions */
.doc-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-card {
    display: flex;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none !important;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, border-color 0.2s;
    color: inherit;
}

.action-card:hover { 
    transform: translateY(-2px); 
    border-color: #3498db; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.icon-box.pdf { background: #fee2e2; color: #ef4444; }
.icon-box.book { background: #e0f2fe; color: #0ea5e9; }

.action-text strong { display: block; color: var(--ispag-blue); font-size: 1em; }
.action-text span { font-size: 0.8em; color: #94a3b8; }

/* 5. Support Card */
.support-footer-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    border: 2px dashed var(--border-color);
    margin-top: 30px;
}

.support-footer-card h4 { margin: 0 0 10px; color: var(--ispag-blue); }
.support-footer-card p { font-size: 0.9em; color: #64748b; margin-bottom: 20px; }

.btn-group {
    display: flex;
    gap: 12px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-primary { background: var(--ispag-red); color: white !important; }
.btn-primary:hover { background: #a93226; }
.btn-secondary { background: #f1f5f9; color: #475569 !important; }
.btn-secondary:hover { background: #e2e8f0; }

/* 6. Error States */
.modern-error-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.error-icon {
    width: 60px;
    height: 60px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.btn-back {
    display: inline-block;
    margin-top: 20px;
    color: #3498db;
    text-decoration: underline;
}

/* 7. Mobile Adjustments */
@media (max-width: 480px) {
    .quick-stats-grid { grid-template-columns: 1fr; }
    .product-hero-card h1 { font-size: 1.4em; }
    .btn-group { flex-direction: column; }
    .spec-row { font-size: 0.85em; }
}