/**
 * NcStatusCheck - Styles de la page de détail serveur
 * Complète style.css (variables CSS partagées)
 */

/* === CHARGEMENT / ERREUR === */

.detail-loading,
.detail-error {
    text-align: center;
    padding: 40px;
    font-size: 1rem;
    color: var(--gray-500);
}

.detail-error {
    color: var(--danger-color);
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    margin: 24px 0;
}

/* === RÉSUMÉ DES WARNINGS === */

.detail-warnings-summary {
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid transparent;
}

.ws-ok {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #15803d;
    padding: 14px 18px;
    font-weight: 500;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}

.ws-warn {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    color: #92400e;
    padding: 14px 18px;
    font-weight: 500;
}

.detail-basic-upgrade-hint {
    margin-top: 14px;
    font-size: 0.875rem;
    color: var(--gray-500);
    font-style: italic;
}

.ws-header {
    background: #fef3c7;
    border-bottom: 1px solid #fde68a;
    padding: 12px 18px;
    font-weight: 600;
    color: #92400e;
}

.ws-list {
    margin: 0;
    padding: 12px 18px 12px 36px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-top: none;
    border-radius: 0 0 8px 8px;
    color: #78350f;
    font-size: 0.875rem;
    line-height: 1.7;
}

/* === SECTIONS === */

.detail-section {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.detail-section-title {
    margin: 0;
    padding: 14px 18px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    background: white;
    border-bottom: 1px solid var(--gray-100);
}

/* === TABLE DE DÉTAIL === */

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.detail-table thead th {
    padding: 8px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-align: left;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-table thead th:nth-child(1) { width: 220px; }
.detail-table thead th:nth-child(2) { width: auto; }
.detail-table thead th:nth-child(3) { width: 52px;  text-align: center; }
.detail-table thead th:nth-child(4) { width: 40%; }

.detail-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    background: white;
}

.detail-table tbody tr:last-child {
    border-bottom: none;
}

.detail-table tbody tr:hover {
    background: var(--gray-50);
}

.detail-label {
    padding: 10px 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.detail-value {
    padding: 10px 14px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.8125rem;
    color: var(--gray-900);
}

.detail-indicator {
    padding: 10px 8px;
    text-align: center;
    font-size: 1rem;
}

.detail-note {
    padding: 10px 14px;
    font-size: 0.8rem;
    color: #92400e;
    font-style: italic;
}

/* === INDICATEURS ✅ / ⚠️ === */

.di {
    display: inline-block;
    font-size: 1rem;
    cursor: default;
}

.di.ok   { opacity: 0.85; }
.di.warn { }

/* === TAGS INLINE === */

.tag-warn {
    display: inline-block;
    padding: 2px 8px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

.detail-na {
    color: var(--gray-500);
    font-style: italic;
}

/* === BARRE D'ÂGE DES DONNÉES === */

.detail-data-age {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.82rem;
    color: #374151;
}

.data-age-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.data-age-live {
    color: #059669;
}

.data-age-none {
    color: #9ca3af;
}

/* === INFO CACHE (conservé pour compatibilité) === */

.detail-cache-note {
    margin: 0 0 12px;
    font-size: 0.8rem;
    color: var(--gray-500);
    text-align: right;
}

/* === COLONNE SANTÉ (tableau de bord principal) === */

.sante-cell {
    text-align: center;
    white-space: nowrap;
}

/* Mini badges de santé */
.sante-indicators {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.sante-grid {
    display: inline-flex;
    align-items: center;
}

.sante-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
}

.sante-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
}

.sante-badge-warn {
    background: #fff3e0;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.sante-badge-ack {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.sante-badge-docker {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.sante-indicators:hover .sante-badge {
    opacity: 0.8;
}

.sante-no-data {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Lien sur le nom du serveur (mode Extended) */
a.server-link {
    color: var(--primary-dark);
    text-decoration: none;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.8125rem;
}

a.server-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* === MODE PUSH — STYLES PAGE DE DÉTAIL === */

.detail-push-meta {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin: 0 0 10px;
}

.detail-push-empty {
    color: var(--gray-400);
    font-style: italic;
    padding: 8px 0;
}

.push-all-ok {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 10px;
    color: #166534;
    font-size: 0.9rem;
}

/* Tableau setupchecks */
.push-checks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.push-cat-header td {
    padding: 8px 12px 4px;
    background: var(--gray-50);
    color: var(--gray-600);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 1px solid var(--gray-200);
}

.push-cat-header:first-child td {
    border-top: none;
}

.push-check-row {
    border-bottom: 1px solid var(--gray-100);
}

.push-check-row:hover {
    background: var(--gray-50);
}

.push-check-icon {
    width: 28px;
    text-align: center;
    padding: 6px 4px;
}

.push-check-name {
    padding: 6px 8px;
    font-weight: 500;
    color: var(--gray-700);
    min-width: 180px;
}

.push-check-info {
    padding: 6px 8px;
    color: var(--gray-600);
    font-size: 0.85rem;
}

.push-check-desc {
    display: block;
}

.push-check-warning .push-check-name,
.push-check-error .push-check-name {
    color: var(--gray-800);
}

.push-check-warning .push-check-info {
    color: #92400e;
}

.push-check-error .push-check-info {
    color: #991b1b;
}

.push-doc-link {
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-left: 6px;
}

/* Tableau Docker */
.push-docker-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.push-docker-table th {
    background: var(--gray-50);
    padding: 8px 12px;
    text-align: left;
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--gray-200);
}

.push-docker-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.push-docker-table tr:hover td {
    background: var(--gray-50);
}

.push-docker-image {
    font-family: monospace;
    font-size: 0.82rem;
    color: var(--gray-600);
}

.push-version-warn {
    margin-left: 4px;
}

/* Icône push dans tableau principal */
.push-icon {
    display: inline-block;
    margin-right: 2px;
    font-size: 0.9em;
}

.push-icon.push-old {
    opacity: 0.7;
}

/* === SECTIONS REPLIABLES === */
.detail-section-body {
    overflow: hidden;
}

.detail-section-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail-section-toggle:hover {
    background: var(--gray-50);
}
.sec-arrow {
    font-size: 0.75rem;
    color: var(--gray-400);
    width: 12px;
    flex-shrink: 0;
}
.sec-badge {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}
.sec-badge-warn {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* === BARRE DE FILTRE === */
.detail-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 6px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    background: white;
    color: var(--gray-600);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}
.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.filter-btn.filter-btn-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
}
.detail-filter-count {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 12px;
    padding: 6px 12px;
    background: var(--gray-50);
    border-radius: 6px;
    border: 1px solid var(--gray-200);
}

/* === ACKNOWLEDGE === */
.ack-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
}
.ack-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    background: white;
    border-radius: 10px;
    padding: 24px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.ack-modal-title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
}
.ack-modal-check {
    margin: 0 0 16px;
    font-size: 0.875rem;
    color: var(--gray-600);
    font-style: italic;
}
.ack-modal-field {
    margin-bottom: 14px;
}
.ack-modal-field label {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}
.ack-modal-field input,
.ack-modal-field select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.875rem;
    box-sizing: border-box;
}
.ack-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}
.btn-ack {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 2px;
    opacity: 0.5;
    transition: opacity 0.15s;
}
.btn-ack:hover {
    opacity: 1;
}
.ack-indicator {
    font-size: 0.9rem;
    cursor: help;
}
.btn-ack-remove {
    font-size: 0.75rem;
    padding: 1px 6px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    cursor: pointer;
    color: var(--gray-600);
}
.btn-ack-remove:hover {
    background: var(--gray-200);
}
.ack-note {
    font-style: italic;
    color: var(--gray-500, #6b7280);
    font-size: 0.82rem;
}
.ack-note::before {
    content: '✏️ ';
    font-style: normal;
}
tr[data-row-ack="1"] {
    opacity: 0.65;
}
tr[data-row-ack="1"]:hover {
    opacity: 0.85;
}
/* Badge ack dans le tableau de bord */
.ack-count-badge {
    font-size: 0.8em;
    opacity: 0.8;
    margin-left: 4px;
}
/* Wrapper meta push */
.detail-push-meta-wrap {
    padding: 8px 18px 0;
}
