/* ============================================================
   DRILL HOLE DATABASE — Item 10
   drilling.css
   ============================================================ */

/* ── Section wrapper ──────────────────────────────────────── */
#mine-drilling-section {
    font-size: 0.88rem;
    color: #F1F5F9;
}


/* ── KPIs récapitulatifs (trous) ──────────────────────────── */
.drilling-kpis {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.drilling-kpi-card {
    flex: 1 1 100px;
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
}

.drilling-kpi-card--highlight {
    background: #14532D;
    border-color: #166534;
}

.drilling-kpi-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #F8FAFC;
    line-height: 1.2;
}

.drilling-kpi-label {
    font-size: 0.72rem;
    color: #94A3B8;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}


/* ── Filtres rapides ──────────────────────────────────────── */
.drilling-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.drilling-filter-btn {
    padding: 5px 12px;
    border: 1px solid #475569;
    border-radius: 20px;
    background: #1E293B;
    color: #CBD5E1;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.drilling-filter-btn:hover {
    background: #334155;
    border-color: #475569;
}

.drilling-filter-btn--active {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
    font-weight: 600;
}


/* ── Tableau Maître ───────────────────────────────────────── */
.drilling-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #334155;
}

.drilling-table {
    width: 100%;
    border-collapse: collapse;
    background: #1E293B;
}

.drilling-table thead th {
    background: #1E293B;
    padding: 9px 12px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #CBD5E1;
    border-bottom: 2px solid #334155;
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.25;
}

.drilling-master-row td {
    padding: 9px 12px;
    border-bottom: 1px solid #334155;
    vertical-align: middle;
}

.drilling-master-row:last-child td {
    border-bottom: none;
}

.drilling-master-row:hover {
    background: #334155;
}

.drilling-master-row:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

.drilling-hole-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.82rem;
    color: #93C5FD;
}

.drilling-cell-action {
    text-align: right;
    width: 32px;
}

.drilling-open-icon {
    font-size: 1.1rem;
    color: #94a3b8;
    font-weight: 700;
}

.drilling-master-row:hover .drilling-open-icon {
    color: #3b82f6;
}


/* ── Badges type & opérateur ──────────────────────────────── */
.drilling-type-badge,
.drilling-issuer-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
}

.drilling-issuer-badge--historique {
    font-style: italic;
}


/* ── Alertes récupération ─────────────────────────────────── */
.drilling-recovery--high  { color: #4ADE80; font-weight: 600; }
.drilling-recovery--medium { color: #38BDF8; }
.drilling-recovery--low   {
    color: #FCD34D;
    font-weight: 600;
    background: #713F12;
    border-radius: 4px;
    padding: 1px 4px;
}

.drilling-recovery-alert {
    margin-right: 3px;
    font-size: 0.9em;
}


/* ── Zone Détail ──────────────────────────────────────────── */
.drilling-detail {
    border: 1px solid #334155;
    border-radius: 10px;
    background: #1E293B;
    padding: 16px 20px;
    margin-top: 4px;
}

.drilling-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #334155;
}

.drilling-back-btn {
    padding: 6px 14px;
    border: 1px solid #475569;
    border-radius: 6px;
    background: #1E293B;
    color: #CBD5E1;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.drilling-back-btn:hover {
    background: #334155;
    color: #F1F5F9;
}

.drilling-detail-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #F8FAFC;
}


/* ── KPIs Analyses ────────────────────────────────────────── */
.assay-kpis {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.assay-kpi {
    flex: 1 1 90px;
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
}

.assay-kpi strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #F8FAFC;
}

.assay-kpi strong small {
    font-size: 0.72rem;
    font-weight: 500;
    color: #94A3B8;
}

.assay-kpi span {
    font-size: 0.7rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.assay-kpi--high {
    background: #14532D;
    border-color: #15803D;
}

.assay-kpi--high strong {
    color: #4ADE80;
}

.assay-kpi--max {
    background: #713F12;
    border-color: #CA8A04;
}

.assay-kpi--max strong {
    color: #FACC15;
}


/* ── Légende HGZ ──────────────────────────────────────────── */
.assay-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #E2E8F0;
    margin-bottom: 10px;
}

.assay-legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.assay-legend-swatch--hgz {
    background: #14532D;
    border: 1px solid #4ade80;
}


/* ── Tableau Analyses ─────────────────────────────────────── */
.assays-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #334155;
}

.assays-table {
    width: 100%;
    border-collapse: collapse;
    background: #1E293B;
}

.assays-table thead th {
    background: #1E293B;
    padding: 8px 12px;
    text-align: left;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #CBD5E1;
    border-bottom: 2px solid #334155;
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.25;
}

/* ── Ligne HGZ : visuel distinctif fort ───────────────────── */
.assay-row--high-grade {
    background: #14532D;          /* fond vert clair */
    font-weight: 700;             /* texte en gras */
}

.assay-row--high-grade:hover {
    background: #14532D;
}

.assay-row td {
    padding: 7px 12px;
    border-bottom: 1px solid #334155;
    vertical-align: middle;
}

.assay-row:last-child td {
    border-bottom: none;
}


/* ── Badge ★ HGZ intégré dans la cellule Teneur ───────────── */
.assay-hg-badge {
    display: inline-block;
    color: #4ADE80;
    font-size: 0.85em;
    margin-right: 4px;
    line-height: 1;
    vertical-align: middle;
}


/* ── Coloration des teneurs ───────────────────────────────── */
.assay-cell-grade {
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
}

.assay-grade--high {
    color: #86EFAC;
    font-weight: 700;
}

.assay-cell-element strong {
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}


/* ── États vides & loading ────────────────────────────────── */
.drilling-loading {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    font-style: italic;
}

.drilling-empty-state {
    padding: 28px 20px;
    text-align: center;
    color: #94a3b8;
}

.drilling-empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.drilling-empty-state h4 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: #94A3B8;
}

.drilling-empty-msg {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   PANNEAU DE FILTRE EXPLORATION FORAGE
   ═══════════════════════════════════════════════════════════════ */

.drilling-filter {
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.drilling-filter .filter-accordion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.drilling-filter .filter-accordion-header:hover {
    background: #334155;
}

.drilling-filter .filter-accordion-header:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

.drilling-filter .filter-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.drilling-filter .filter-title {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: #F1F5F9;
}

.drilling-filter .filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    transition: background 0.2s;
}

.drilling-filter .filter-badge.active {
    background: #3b82f6;
}

.drilling-filter .filter-chevron {
    font-size: 0.75rem;
    color: #94a3b8;
    transition: transform 0.2s;
}

.drilling-filter .filter-accordion-body {
    padding: 0 14px 14px;
    border-top: 1px solid #334155;
}

.drilling-filter .filter-block {
    padding: 12px 0;
    border-bottom: 1px solid #334155;
}

.drilling-filter .filter-block:last-of-type {
    border-bottom: none;
}

.drilling-filter .filter-block-title {
    margin: 0 0 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94A3B8;
}

.drilling-filter .filter-field {
    margin-bottom: 10px;
}

.drilling-filter .filter-field:last-child {
    margin-bottom: 0;
}

.drilling-filter .filter-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #CBD5E1;
}

/* ── Toggle row ─────────────────────────────────────────────── */
.drilling-filter .ui-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.drilling-filter .ui-toggle-info {
    flex: 1;
    min-width: 0;
}

.drilling-filter .ui-toggle-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #CBD5E1;
}

.drilling-filter .ui-toggle-hint {
    margin: 3px 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.35;
}

.drilling-filter .ui-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.drilling-filter .ui-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.drilling-filter .toggle-track {
    position: absolute;
    inset: 0;
    background: #334155;
    border-radius: 24px;
    transition: background 0.2s;
}

.drilling-filter .toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #1E293B;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.drilling-filter .ui-toggle input:checked + .toggle-track {
    background: #3b82f6;
}

.drilling-filter .ui-toggle input:checked + .toggle-track .toggle-thumb {
    transform: translateX(20px);
}

/* ── Checkboxes ─────────────────────────────────────────────── */
.drilling-filter .ui-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.drilling-filter .ui-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #CBD5E1;
}

.drilling-filter .ui-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.drilling-filter .ui-checkbox-box {
    width: 18px;
    height: 18px;
    border: 2px solid #475569;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.drilling-filter .ui-checkbox-box::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 2px;
    transform: scale(0);
    transition: transform 0.15s;
}

.drilling-filter .ui-checkbox input:checked + .ui-checkbox-box {
    border-color: #3b82f6;
    background: #1E3A8A;
}

.drilling-filter .ui-checkbox input:checked + .ui-checkbox-box::after {
    transform: scale(1);
}

/* ── Number input ─────────────────────────────────────────── */
.drilling-filter .filter-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.drilling-filter .filter-input {
    width: 100%;
    padding: 8px 32px 8px 10px;
    border: 1px solid #475569;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #CBD5E1;
    background: #1E293B;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.drilling-filter .filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.drilling-filter .filter-input-suffix {
    position: absolute;
    right: 10px;
    font-size: 0.8rem;
    color: #94a3b8;
    pointer-events: none;
}

/* ── Reset button ─────────────────────────────────────────── */
.drilling-filter .filter-actions {
    padding-top: 12px;
}

.drilling-filter .filter-btn-reset {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #1E293B;
    color: #94A3B8;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.drilling-filter .filter-btn-reset:hover {
    background: #334155;
    border-color: #475569;
    color: #CBD5E1;
}
