/* ════════════════════════════════════════════════════════════════════════
   S-Logbook 1.04 — Couche de finition « moderne » (chargée en dernier).
   Ne change aucune règle métier : alignements, états de focus, tableaux,
   pagination, champs de recherche façon Google (pilule + loupe).
   ════════════════════════════════════════════════════════════════════════ */
:root {
    --lb-accent: #1a73e8;
    --lb-accent-soft: #e8f0fe;
    --lb-focus: 0 0 0 3px rgba(26, 115, 232, .35);
    --lb-row-hover: rgba(26, 115, 232, .05);
}
[data-bs-theme="dark"] {
    --lb-accent: #8ab4f8;
    --lb-accent-soft: rgba(138, 180, 248, .16);
    --lb-focus: 0 0 0 3px rgba(138, 180, 248, .45);
    --lb-row-hover: rgba(138, 180, 248, .07);
}

/* ── Focus clavier visible partout (accessibilité) ─────────────────────── */
a:focus-visible, button:focus-visible, .btn:focus-visible,
.form-control:focus-visible, .form-select:focus-visible, .form-check-input:focus-visible,
[role="button"]:focus-visible, [tabindex]:focus-visible {
    outline: none;
    box-shadow: var(--lb-focus) !important;
}

/* ── Commandes DataTables : une ligne propre « Afficher [10] lignes · 🔍 » ─ */
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: inline-flex !important;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
    margin: 0;
    font-size: .85rem;
    color: var(--bs-secondary-color);
}
.dataTables_wrapper .dataTables_length select {
    display: inline-block !important;
    width: auto !important;
    min-width: 4.5rem;
    border-radius: 10px;
}
.dataTables_wrapper .dataTables_filter input {
    width: min(280px, 60vw) !important;
    margin: 0 !important;
    border-radius: 20px;
    padding-left: 2.1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235f6672' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: .8rem center;
    background-size: 14px 14px;
}
.dataTables_wrapper > .row:first-child { align-items: center; row-gap: .5rem; margin-bottom: .5rem; }
.dataTables_wrapper .dataTables_info { font-size: .8rem; color: var(--bs-secondary-color); padding-top: .9rem !important; }

/* Pagination en pastilles */
.dataTables_wrapper .pagination { gap: 4px; }
.dataTables_wrapper .pagination .page-link {
    border: 0; border-radius: 10px !important; min-width: 34px; text-align: center;
    background: transparent; color: var(--bs-body-color);
}
.dataTables_wrapper .pagination .page-item.active .page-link { background: var(--lb-accent); color: #fff; }
[data-bs-theme="dark"] .dataTables_wrapper .pagination .page-item.active .page-link { color: #202124; }
.dataTables_wrapper .pagination .page-item.disabled .page-link { opacity: .45; }

/* ── Tableaux : survol doux, en-têtes discrets ────────────────────────── */
.table > tbody > tr { transition: background-color .12s; }
.table-hover > tbody > tr:hover > *,
.dataTable > tbody > tr:hover > * { --bs-table-bg-state: var(--lb-row-hover); }
.table > thead th {
    font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
    color: var(--bs-secondary-color); font-weight: 700; white-space: nowrap;
}

/* ── Champs : coins arrondis cohérents (via les jetons Bootstrap, groupes inclus) ── */
:root { --bs-border-radius: .625rem; --bs-border-radius-sm: .5rem; }

/* ── Badges en pilule ─────────────────────────────────────────────────── */
.badge { border-radius: 999px; font-weight: 600; letter-spacing: .01em; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ── Contraste (1.03.60, MQ-55) : texte blanc sur orange ≥ 4,5:1 (WCAG AA) ──
   L'orange de charte #FF6B35 reste pour les éléments décoratifs ; quand il porte
   du texte, il est assombri en #C24E1B (4,77:1) — même teinte corail. */
:root { --lb-coral-text: #C24E1B; --lb-amber-text: #B45309; }
.badge-alert,
.lb-btn-coral,
.lb-mnav-badge { background: var(--lb-coral-text) !important; border-color: var(--lb-coral-text) !important; color: #fff !important; }
.lb-sync-banner { background: linear-gradient(135deg, var(--lb-coral-text), #A8401A) !important; color: #fff !important; }
.btn-ks-deactivate { color: var(--lb-amber-text) !important; border-color: var(--lb-amber-text) !important; }
.btn-ks-deactivate:hover:not(:disabled) { background-color: var(--lb-amber-text) !important; border-color: var(--lb-amber-text) !important; color: #fff !important; }
