/**
 * PaieCheck™ — Vérificateur IA de fiches de paie
 * Style mobile-first cohérent avec PaieIK, PaieLab et PaieONe
 *
 * @copyright 2025-2026 Purple Telecom EURL
 * @author    Fabien HIRIART <contact@polygonlab.ai>
 */

/* =====================================================
   PAIECHECK — VARIABLES SPÉCIFIQUES
   ===================================================== */
:root {
    /* Sidebar */
    --paiecheck-sidebar-bg: #1d458c;
    --paiecheck-sidebar-dark: #152d5c;
    --paiecheck-sidebar-text: rgba(255, 255, 255, 0.9);
    --paiecheck-sidebar-muted: rgba(255, 255, 255, 0.55);
    --paiecheck-sidebar-border: rgba(255, 255, 255, 0.15);
    --paiecheck-sidebar-input-bg: rgba(255, 255, 255, 0.12);

    /* Fond page */
    --paiecheck-fond: #f8fafc;

    /* Sémantique contrôles */
    --paiecheck-anomaly: #dc2626;
    --paiecheck-anomaly-bg: #fee2e2;
    --paiecheck-anomaly-text: #991b1b;
    --paiecheck-alert: #f59e0b;
    --paiecheck-alert-bg: #fef3c7;
    --paiecheck-alert-text: #92400e;
    --paiecheck-ok: #16a34a;
    --paiecheck-ok-bg: #dcfce7;
    --paiecheck-ok-text: #166534;
    --paiecheck-info: #2563eb;
    --paiecheck-info-bg: #dbeafe;
    --paiecheck-info-text: #1e40af;
}

/* =====================================================
   PAIECHECK — PAGE WRAPPER
   ===================================================== */
.paiecheck-page {
    background: var(--paiecheck-fond);
    min-height: 100vh;
}

/* =====================================================
   PAIECHECK — H1 SEO
   ===================================================== */
.paiecheck-h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--paiecheck-sidebar-bg);
    text-align: center;
    margin: 20px auto 8px;
    max-width: 1200px;
    padding: 0 20px;
    line-height: 1.3;
}

/* =====================================================
   PAIECHECK — CONTAINER / WRAPPER
   ===================================================== */
.paiecheck-container {
    max-width: 1200px;
    margin: 20px auto 40px;
    padding: 0 20px;
}

.paiecheck-wrapper {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* =====================================================
   PAIECHECK — LAYOUT 2 COLONNES
   ===================================================== */
.paiecheck-layout {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 500px;
}

/* =====================================================
   PAIECHECK — SIDEBAR BLEUE
   ===================================================== */
.paiecheck-sidebar {
    background: linear-gradient(180deg, var(--paiecheck-sidebar-bg) 0%, var(--paiecheck-sidebar-dark) 100%);
    padding: 28px 24px;
    color: var(--paiecheck-sidebar-text);
    display: flex;
    flex-direction: column;
}

/* Bloc branding PaieCheck */
.paiecheck-brand {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--paiecheck-sidebar-border);
}

.paiecheck-product-name {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.paiecheck-product-subtitle {
    font-size: 13px;
    color: var(--paiecheck-sidebar-muted);
    margin-bottom: 2px;
}

.paiecheck-product-year {
    font-size: 12px;
    font-weight: 600;
    color: #d1fae5;
    opacity: 0.85;
}

/* Bouton bascule mobile */
.paiecheck-mobile-toggle {
    display: flex;
    width: 100%;
    background: var(--paiecheck-sidebar-input-bg);
    border: 1px solid var(--paiecheck-sidebar-border);
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 15px;
    transition: background 0.2s;
}

.paiecheck-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.paiecheck-mobile-toggle svg {
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.paiecheck-mobile-toggle.is-collapsed svg {
    transform: rotate(-90deg);
}

/* Contenu repliable sidebar */
.paiecheck-sidebar-collapsible.collapsed {
    display: none;
}

/* Blocs d'info dans la sidebar */
.paiecheck-info-bloc {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--paiecheck-sidebar-border);
}

.paiecheck-info-bloc:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.paiecheck-info-bloc-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--paiecheck-sidebar-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.paiecheck-info-bloc-title svg {
    opacity: 0.7;
    flex-shrink: 0;
}

.paiecheck-info-bloc-text {
    font-size: 0.85rem;
    color: var(--paiecheck-sidebar-text);
    line-height: 1.5;
}

/* Badges formats */
.paiecheck-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.paiecheck-badge {
    background: var(--paiecheck-sidebar-input-bg);
    border: 1px solid var(--paiecheck-sidebar-border);
    border-radius: 4px;
    color: #ffffff;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Résumé score dans la sidebar (page résultat) */
.paiecheck-score-summary {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--paiecheck-sidebar-border);
}

.paiecheck-score-big {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
}

.paiecheck-score-max {
    font-size: 1rem;
    color: var(--paiecheck-sidebar-muted);
}

.paiecheck-score-counters {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.paiecheck-score-counter {
    text-align: center;
    flex: 1;
    min-width: 50px;
}

.paiecheck-score-counter-val {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.paiecheck-score-counter-lbl {
    font-size: 0.68rem;
    color: var(--paiecheck-sidebar-muted);
    margin-top: 2px;
    line-height: 1.2;
}

.paiecheck-score-counter--anomaly .paiecheck-score-counter-val { color: #fca5a5; }
.paiecheck-score-counter--alert .paiecheck-score-counter-val   { color: #fcd34d; }
.paiecheck-score-counter--ok .paiecheck-score-counter-val      { color: #86efac; }
.paiecheck-score-counter--info .paiecheck-score-counter-val    { color: #93c5fd; }

/* Infos fichier analysé dans la sidebar */
.paiecheck-file-info-sidebar {
    font-size: 0.82rem;
    color: var(--paiecheck-sidebar-text);
    line-height: 1.5;
    background: var(--paiecheck-sidebar-input-bg);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    word-break: break-word;
}

/* Bouton nouvelle analyse */
.paiecheck-btn-new-analysis {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--paiecheck-sidebar-input-bg);
    border: 1px solid var(--paiecheck-sidebar-border);
    border-radius: 8px;
    color: #ffffff;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.paiecheck-btn-new-analysis:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    text-decoration: none;
}

/* =====================================================
   PAIECHECK — ZONE PRINCIPALE (colonne droite)
   ===================================================== */
.paiecheck-main {
    padding: 28px 24px;
    background: var(--paiecheck-fond);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =====================================================
   PAIECHECK — GRILLE KPI
   ===================================================== */
.paiecheck-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.paiecheck-kpi-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #dee2e6;
    transition: box-shadow 0.2s;
}

.paiecheck-kpi-card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}

.paiecheck-kpi-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.paiecheck-kpi-label svg {
    flex-shrink: 0;
}

.paiecheck-kpi-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--paiecheck-sidebar-bg);
    line-height: 1;
}

.paiecheck-kpi-value--anomaly { color: var(--paiecheck-anomaly); }
.paiecheck-kpi-value--alert   { color: var(--paiecheck-alert); }
.paiecheck-kpi-value--ok      { color: var(--paiecheck-ok); }

.paiecheck-kpi-period {
    font-size: 0.78rem;
    color: #6c757d;
    margin-top: 4px;
}

/* =====================================================
   PAIECHECK — CARD GÉNÉRIQUE (résultats)
   ===================================================== */
.paiecheck-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #dee2e6;
}

.paiecheck-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.paiecheck-card-title svg {
    color: var(--paiecheck-sidebar-bg);
    flex-shrink: 0;
}

/* =====================================================
   PAIECHECK — JAUGE SCORE SVG
   ===================================================== */
.paiecheck-score-gauge {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    margin: 0 auto;
}

.paiecheck-score-gauge svg {
    transform: rotate(-90deg);
}

.paiecheck-score-gauge-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.paiecheck-score-gauge-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.paiecheck-score-gauge-unit {
    font-size: 0.85rem;
    color: #718096;
}

/* =====================================================
   PAIECHECK — CONTRÔLES : ITEMS
   ===================================================== */
.paiecheck-controls-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.paiecheck-anomaly-card {
    padding: 14px 16px;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
    background: #f7fafc;
}

.paiecheck-anomaly-error {
    border-left-color: var(--paiecheck-anomaly);
    background: #fff5f5;
}

.paiecheck-anomaly-warning {
    border-left-color: var(--paiecheck-alert);
    background: #fffbeb;
}

.paiecheck-anomaly-ok {
    border-left-color: var(--paiecheck-ok);
    background: #f0fdf4;
}

.paiecheck-anomaly-info {
    border-left-color: var(--paiecheck-info);
    background: #eff6ff;
}

.paiecheck-anomaly-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.paiecheck-anomaly-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.92rem;
    flex: 1;
    min-width: 200px;
}

.paiecheck-anomaly-detail {
    font-size: 0.88rem;
    color: #4a5568;
    margin-top: 4px;
    margin-left: 28px;
    line-height: 1.5;
}

.paiecheck-anomaly-penalty {
    font-size: 0.78rem;
    color: var(--paiecheck-anomaly);
    margin-top: 3px;
    margin-left: 28px;
}

.paiecheck-anomaly-category {
    font-size: 0.68rem;
    background: #edf2f7;
    color: #718096;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 400;
}

/* Badge statut */
.paiecheck-status-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.paiecheck-status-badge--anomaly {
    background: var(--paiecheck-anomaly-bg);
    color: var(--paiecheck-anomaly-text);
}

.paiecheck-status-badge--alert {
    background: var(--paiecheck-alert-bg);
    color: var(--paiecheck-alert-text);
}

.paiecheck-status-badge--ok {
    background: var(--paiecheck-ok-bg);
    color: var(--paiecheck-ok-text);
}

.paiecheck-status-badge--info {
    background: var(--paiecheck-info-bg);
    color: var(--paiecheck-info-text);
}

/* =====================================================
   PAIECHECK — PAYWALL
   ===================================================== */
.paiecheck-paywall {
    position: relative;
}

.paiecheck-paywall-blurred {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #dee2e6;
}

.paiecheck-paywall-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
}

.paiecheck-paywall-teaser {
    text-align: center;
    padding: 20px;
}

.paiecheck-paywall-teaser-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.paiecheck-paywall-teaser-sub {
    font-size: 0.88rem;
    color: #4a5568;
    margin-top: 4px;
}

/* Modal paywall (section CTA) */
.paiecheck-paywall-modal {
    background: var(--gp-fond-pale);
    border-radius: 12px;
    padding: 28px;
    border: 2px solid #1d458c;
    position: relative;
    overflow: hidden;
}

.paiecheck-paywall-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.paiecheck-paywall-modal-icon {
    background: linear-gradient(135deg, #1d458c, #2563eb);
    padding: 12px;
    border-radius: 10px;
    flex-shrink: 0;
}

.paiecheck-paywall-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.paiecheck-paywall-modal-sub {
    margin: 4px 0 0 0;
    color: #4a5568;
    font-size: 0.95rem;
}

/* Liste avantages */
.paiecheck-paywall-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.paiecheck-paywall-benefit {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.92rem;
    color: #2d3748;
}

.paiecheck-paywall-benefit svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Prix unitaire */
.paiecheck-price-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 2px solid #dee2e6;
    margin-bottom: 16px;
}

.paiecheck-price-label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 6px;
}

.paiecheck-price-amount {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1;
}

.paiecheck-price-amount span {
    font-size: 0.85rem;
    font-weight: 400;
    color: #718096;
}

.paiecheck-price-ttc {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 4px;
    margin-bottom: 14px;
}

.paiecheck-price-note {
    font-size: 0.78rem;
    color: #718096;
    margin-top: 6px;
}

/* Bouton CTA paiement — modificateur (base fournie par .paiecheck-btn) */
.paiecheck-btn-checkout {
    background: linear-gradient(135deg, #1d458c, #2563eb);
    color: #ffffff;
    padding: 14px 28px;
    font-size: 1rem;
    width: 100%;
    transition: opacity 0.2s;
}

.paiecheck-btn-checkout:hover {
    opacity: 0.9;
    color: #ffffff;
    text-decoration: none;
}

.paiecheck-btn-checkout:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Badges de confiance */
.paiecheck-trust-badges {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.paiecheck-trust-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #718096;
}

/* =====================================================
   PAIECHECK — SECTION ERREUR (guard)
   ===================================================== */
.paiecheck-error-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 28px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #dee2e6;
}

.paiecheck-error-tips {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px auto;
    text-align: left;
    max-width: 600px;
}

.paiecheck-error-tips h3 {
    font-size: 1.05rem;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.paiecheck-error-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.paiecheck-error-tips li {
    padding: 6px 0 6px 24px;
    position: relative;
    color: #4a5568;
    font-size: 0.92rem;
}

.paiecheck-error-tips li svg {
    position: absolute;
    left: 0;
    top: 8px;
}

/* =====================================================
   PAIECHECK — ZONE UPLOAD (carte principale droite)
   ===================================================== */
.paiecheck-upload-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #dee2e6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.paiecheck-upload-wrapper h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--paiecheck-sidebar-bg);
    margin-bottom: 6px;
}

.paiecheck-upload-wrapper .paiecheck-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* =====================================================
   PAIECHECK — SECTION IDENTITÉ (bannière)
   ===================================================== */
.paiecheck-identity-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #4299e1;
    border-top: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

.paiecheck-identity-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.paiecheck-identity-title svg {
    color: #4299e1;
    flex-shrink: 0;
}

.paiecheck-identity-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88rem; /* Valeur définie par l'attribut inline d'origine externalisé */
    color: #4a5568;
}

/* =====================================================
   PAIECHECK — DISCLAIMER
   ===================================================== */
.paiecheck-disclaimer {
    background: #f7fafc;
    border-radius: 8px;
    padding: 16px 20px;
    border: 1px solid #e2e8f0;
    font-size: 0.82rem;
    color: #718096;
    line-height: 1.6;
}

/* =====================================================
   PAIECHECK — BOUTONS D'ACTION (bas de page)
   ===================================================== */
.paiecheck-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* =====================================================
   PAIECHECK — BOUTONS (base + variantes)
   ===================================================== */
.paiecheck-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.paiecheck-btn-primary {
    background: #1d458c;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(29, 69, 140, 0.3);
}

.paiecheck-btn-primary:hover {
    background: #152d5c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 69, 140, 0.4);
    text-decoration: none;
    color: #ffffff;
}

.paiecheck-btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.paiecheck-btn-secondary {
    background: transparent;
    color: #1d458c;
    border: 2px solid #1d458c;
}

.paiecheck-btn-secondary:hover {
    background: #1d458c;
    color: #ffffff;
    text-decoration: none;
}

.paiecheck-btn-large {
    padding: 16px 40px;
    font-size: 1.125rem;
}

.paiecheck-btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #6c757d;
    transition: color 0.2s ease;
}

.paiecheck-btn-icon:hover {
    color: #e74c3c;
}

/* =====================================================
   PAIECHECK — ZONE DRAG & DROP (upload)
   ===================================================== */
.paiecheck-drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 3rem;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--gp-fond-pale);
    text-align: center;
}

.paiecheck-drop-zone:hover,
.paiecheck-drop-zone.drag-over {
    border-color: #1d458c;
    background: rgba(29, 69, 140, 0.04);
}

.paiecheck-drop-zone.drag-over {
    transform: scale(1.01);
}

.paiecheck-upload-icon {
    color: #1d458c;
    margin-bottom: 1.5rem;
}

.paiecheck-upload-icon svg {
    stroke: #1d458c;
    stroke-width: 1.5;
}

.paiecheck-drop-text {
    font-size: 1.125rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.paiecheck-drop-text-or {
    color: #6c757d;
    font-size: 0.875rem;
    margin: 1.5rem 0;
}

/* =====================================================
   PAIECHECK — PRÉVISUALISATION FICHIER
   ===================================================== */
.paiecheck-file-preview {
    background: var(--gp-fond-pale);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.paiecheck-file-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.paiecheck-file-icon {
    flex-shrink: 0;
    color: #1d458c;
}

.paiecheck-file-icon svg {
    fill: none;
    stroke: #1d458c;
    stroke-width: 1.5;
}

.paiecheck-file-info > div {
    flex: 1;
    text-align: left;
}

.paiecheck-file-name {
    font-weight: 600;
    color: #2c3e50;
    word-break: break-word;
}

.paiecheck-file-size {
    font-size: 0.875rem;
    color: #6c757d;
}

/* =====================================================
   PAIECHECK — MESSAGE D'ERREUR (upload)
   ===================================================== */
.paiecheck-error-message {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid #e74c3c;
    border-left: 4px solid #e74c3c;
    color: #e74c3c;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.paiecheck-error-message svg {
    flex-shrink: 0;
}

/* =====================================================
   PAIECHECK — RESPONSIVE TABLETTE (>= 768px)
   ===================================================== */
@media (min-width: 768px) {
    .paiecheck-kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .paiecheck-kpi-value {
        font-size: 1.9rem;
    }
}

/* =====================================================
   PAIECHECK — RESPONSIVE DESKTOP (>= 992px)
   ===================================================== */
@media (min-width: 992px) {
    .paiecheck-layout {
        grid-template-columns: 300px 1fr;
    }

    .paiecheck-sidebar {
        border-radius: 16px 0 0 16px;
    }

    .paiecheck-mobile-toggle {
        display: none;
    }

    .paiecheck-sidebar-collapsible.collapsed {
        display: flex !important;
        flex-direction: column;
    }

    .paiecheck-main {
        border-radius: 0 16px 16px 0;
    }
}

/* =====================================================
   PAIECHECK — RESPONSIVE GRAND ÉCRAN (>= 1200px)
   ===================================================== */
@media (min-width: 1200px) {
    .paiecheck-sidebar {
        padding: 32px 28px;
    }

    .paiecheck-main {
        padding: 32px 30px;
    }
}

/* =====================================================
   PAIECHECK — MOBILE COMPACT (< 576px)
   ===================================================== */
@media (max-width: 575px) {
    .paiecheck-container {
        padding: 0 12px;
    }

    .paiecheck-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .paiecheck-kpi-value {
        font-size: 1.4rem;
    }

    .paiecheck-main {
        padding: 20px 16px;
    }

    .paiecheck-upload-wrapper {
        padding: 20px 16px;
    }

    .paiecheck-paywall-modal {
        padding: 20px 16px;
    }
}

/* =====================================================
   PAIECHECK — PRINT
   ===================================================== */
@media print {
    .paiecheck-sidebar,
    .paiecheck-mobile-toggle,
    .paiecheck-actions,
    .paiecheck-paywall-modal {
        display: none !important;
    }

    .paiecheck-layout {
        grid-template-columns: 1fr;
    }

    .paiecheck-wrapper {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* =====================================================
   PAIECHECK — STYLES EXTERNALISÉS (migration 24/02/2026)
   ===================================================== */

/* Carte d'erreur (document invalide) */
.paiecheck-error-card__svg {
    display: block;
    margin: 0 auto 20px;
}

.paiecheck-error-card__h2 {
    font-size: 1.6rem;
    color: #2d3748;
    margin-bottom: 12px;
}

.paiecheck-error-card__body {
    color: #4a5568;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Actions centrées (page erreur) */
.paiecheck-actions--centered {
    justify-content: center;
}

/* Label de risque sous le score dans la sidebar */
.paiecheck-score-risk-label {
    margin-top: 8px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
}

/* Labels dans le bloc infos fichier analysé (sidebar) */
.paiecheck-file-info-label {
    color: rgba(255, 255, 255, 0.6);
}

.paiecheck-file-info-row {
    margin-top: 6px;
}

/* Suffixe "/100" dans les KPI */
.paiecheck-kpi-value-suffix {
    font-size: 0.85rem;
    font-weight: 400;
    color: #6c757d;
}

/* Bloc score — layout flex (carte jauge + résumé) */
.paiecheck-score-card-body {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
}

/* Résumé textuel à côté de la jauge */
.paiecheck-score-info {
    flex: 1;
    min-width: 180px;
}

/* Libellé du niveau de risque (bon/moyen/etc.) */
.paiecheck-score-level-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

/* Nombre de contrôles effectués */
.paiecheck-score-checks-label {
    color: #718096;
    font-size: 0.92rem;
    margin-bottom: 12px;
}

/* Animation de la jauge SVG */
.paiecheck-gauge-fg {
    transition: stroke-dashoffset 1s ease-in-out;
}

/* Variante carte info (fond bleu clair) */
.paiecheck-card--info {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
}

.paiecheck-card--info .paiecheck-card-title,
.paiecheck-card-title--info {
    color: #1e40af;
}

/* Titre de carte verrouillée (paywall flou) */
.paiecheck-paywall-blurred .paiecheck-card-title,
.paiecheck-card-title--locked {
    color: #a0aec0;
}

/* Nom d'anomalie verrouillée */
.paiecheck-paywall-blurred .paiecheck-anomaly-name,
.paiecheck-anomaly-name--locked {
    color: #a0aec0;
}

/* Badge statut verrouillé */
.paiecheck-status-badge--locked {
    background: #edf2f7;
    color: #a0aec0;
}

/* Détail d'anomalie verrouillée */
.paiecheck-paywall-blurred .paiecheck-anomaly-detail,
.paiecheck-anomaly-detail--locked {
    color: #cbd5e0;
}

/* Icône SVG dans le teaser paywall */
.paiecheck-paywall-teaser__icon {
    display: block;
    margin: 0 auto 10px;
}



/* =====================================================
   CORRECTIF STYLE PAIECHECK — Alignement PaieONe/IK/Lab
   Injecte le 25/02/2026 par Claude IA
   ===================================================== */
html body .paiecheck-page .paiecheck-layout .paiecheck-sidebar {
    background: linear-gradient(180deg, #1d458c 0%, #152d5c 100%);
    padding: 28px 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255,255,255,0.9);
}
@media (min-width: 992px) {
    html body .paiecheck-page .paiecheck-layout .paiecheck-sidebar {
        border-radius: 16px 0 0 16px;
        padding: 32px 28px;
    }
}
html body .paiecheck-page .paiecheck-sidebar .paiecheck-brand {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
html body .paiecheck-page .paiecheck-sidebar .paiecheck-product-name {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: 0;
}
html body .paiecheck-page .paiecheck-sidebar .paiecheck-product-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255,255,255,0.55);
    margin-bottom: 2px;
}
html body .paiecheck-page .paiecheck-sidebar .paiecheck-product-year {
    font-size: 12px;
    font-weight: 600;
    color: #D1FAE5;
    opacity: 0.85;
}
html body .paiecheck-page .paiecheck-sidebar .paiecheck-info-bloc {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
html body .paiecheck-page .paiecheck-sidebar .paiecheck-info-bloc-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
html body .paiecheck-page .paiecheck-sidebar .paiecheck-info-bloc-text {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.5;
}
html body .paiecheck-page .paiecheck-sidebar .paiecheck-badge {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    color: #ffffff;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 600;
}
html body .paiecheck-page .paiecheck-layout .paiecheck-main {
    padding: 28px 24px;
    background: var(--gp-fond-pale);
    display: flex;
    flex-direction: column;
    gap: 20px;
}
@media (min-width: 992px) {
    html body .paiecheck-page .paiecheck-layout .paiecheck-main {
        padding: 32px 30px;
        border-radius: 0 16px 16px 0;
    }
}
html body .paiecheck-page .paiecheck-main .paiecheck-upload-wrapper {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}
html body .paiecheck-page .paiecheck-main .paiecheck-upload-wrapper h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1d458c;
    margin-bottom: 6px;
}
html body .paiecheck-page .paiecheck-main .paiecheck-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 20px;
}
html body .paiecheck-page .paiecheck-drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: var(--gp-fond-pale);
    transition: all 0.2s;
    cursor: pointer;
}
html body .paiecheck-page .paiecheck-drop-zone:hover {
    border-color: #1d458c;
    background: rgba(29,69,140,0.02);
}
html body .paiecheck-page .paiecheck-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1d458c;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
html body .paiecheck-page .paiecheck-btn-primary:hover {
    background: #152d5c;
    transform: translateY(-1px);
}
html body .paiecheck-page .paiecheck-sidebar .sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.55);
    text-align: center;
    line-height: 1.4;
}
html body .paiecheck-page .paiecheck-sidebar .sidebar-footer .sidebar-footer-product {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

/* =====================================================
   PAIECHECK — ANIMATION RÉSULTATS
   (cohérent avec PaieIK ik-fade-in et PaieLab fadeIn)
   ===================================================== */
@keyframes paiecheck-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.paiecheck-kpi-card,
.paiecheck-card {
    animation: paiecheck-fade-in 0.3s ease;
}

/* =====================================================
   PAIECHECK — PAGE CHARGEMENT / ANALYSE EN COURS
   (verificateur_status.php — scoped sous .verificateur-page)
   ===================================================== */
.verificateur-page {
    background: var(--paiecheck-fond);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.verificateur-page .progress-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 40px 20px;
}

.verificateur-page .container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.verificateur-page .progress-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    padding: 40px 36px;
    text-align: center;
}

/* Loader circulaire */
.verificateur-page .loader-wrapper {
    margin: 0 auto 28px;
    width: 64px;
    height: 64px;
    transition: opacity 0.3s ease;
}

.verificateur-page .loader {
    width: 64px;
    height: 64px;
    animation: paiecheck-rotate 1.4s linear infinite;
    display: block;
}

.verificateur-page .loader-path {
    stroke: #1d458c;
    stroke-linecap: round;
    animation: paiecheck-dash 1.4s ease-in-out infinite;
}

@keyframes paiecheck-rotate {
    100% { transform: rotate(360deg); }
}

@keyframes paiecheck-dash {
    0%   { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50%  { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* Titre et description */
.verificateur-page .progress-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1d458c;
    margin: 0 0 8px;
}

.verificateur-page .status-description {
    font-size: 0.92rem;
    color: #6c757d;
    margin: 0 0 28px;
    line-height: 1.5;
}

/* Barre de progression */
.verificateur-page .progress-bar-wrapper {
    margin-bottom: 32px;
}

.verificateur-page .progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.verificateur-page .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1d458c 0%, #41bcc9 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.verificateur-page .progress-text {
    font-size: 0.82rem;
    color: #6c757d;
    margin: 8px 0 0;
    text-align: right;
}

/* Étapes de l'analyse */
.verificateur-page .steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    text-align: left;
    margin-bottom: 8px;
}

.verificateur-page .step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f5;
    opacity: 0.45;
    transition: opacity 0.3s ease;
}

.verificateur-page .step:last-child {
    border-bottom: none;
}

.verificateur-page .step.active {
    opacity: 1;
}

.verificateur-page .step.completed {
    opacity: 0.75;
}

.verificateur-page .step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #6c757d;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.verificateur-page .step.active .step-icon {
    background: #1d458c;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(29, 69, 140, 0.35);
}

.verificateur-page .step.completed .step-icon {
    background: #41bcc9;
    color: #ffffff;
}

.verificateur-page .step-content h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 2px;
}

.verificateur-page .step-content p {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

/* Message d'erreur (page progression) */
.verificateur-page .error-message {
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid #fca5a5;
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    color: #991b1b;
    padding: 14px 18px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
}

.verificateur-page .error-message svg {
    flex-shrink: 0;
    color: #dc2626;
}

/* Boutons dans la page progression */
.verificateur-page .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.verificateur-page .btn-primary {
    background: #1d458c;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(29, 69, 140, 0.3);
}

.verificateur-page .btn-primary:hover {
    background: #152d5c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 69, 140, 0.4);
    color: #ffffff;
    text-decoration: none;
}

@media (max-width: 575px) {
    .verificateur-page .progress-card {
        padding: 28px 20px;
    }
    .verificateur-page .progress-card h2 {
        font-size: 1.1rem;
    }
}
