/** Skeletons, overlay aide clavier (?), utilitaires */
/* ═══════════════════════════════════════════════════════════════════════
   14. SKELETONS — Placeholders pulsants pendant les chargements async
   ───────────────────────────────────────────────────────────────────────
   À utiliser pour les zones qui chargent en JS (fetch). Donne la sensation
   "la donnée arrive" plutôt qu'un texte statique "Chargement…" qui paraît
   figé. Inspiration : Pennylane, Stripe, Linear.

   USAGE :
     <div class="app-skeleton-list">
       <div class="app-skeleton-row">
         <span class="app-skeleton-bar app-skeleton-bar--lg"></span>
         <span class="app-skeleton-bar app-skeleton-bar--sm"></span>
       </div>
       ... (autant de rows que voulu)
     </div>

   Variantes de largeur disponibles : --sm (30%), --md (60%), --lg (85%).
   Au remplacement par les vraies données, supprimer le markup skeleton.
   ─────────────────────────────────────────────────────────────────────── */

.app-skeleton-list { display: flex; flex-direction: column; gap: 0; }
.app-skeleton-row {
    display: flex; flex-direction: column; gap: 6px;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
}
.app-skeleton-row:last-child { border-bottom: none; }
.app-skeleton-bar {
    display: block;
    height: 10px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: appSkeletonShimmer 1.2s ease-in-out infinite;
}
.app-skeleton-bar--sm { width: 30%; }
.app-skeleton-bar--md { width: 60%; }
.app-skeleton-bar--lg { width: 85%; }

@keyframes appSkeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* ═══════════════════════════════════════════════════════════════════════
   15. RACCOURCIS CLAVIER — Overlay d'aide accessible via "?"
   ───────────────────────────────────────────────────────────────────────
   Géré par js/shortcuts.js. Les raccourcis (1-9 rubriques, / recherche,
   ? aide) restent fonctionnels pour les utilisateurs qui les découvrent,
   mais sans décoration visuelle (les badges "[N]" à côté des compteurs
   "(4)" rendaient l'UI confuse).
   ─────────────────────────────────────────────────────────────────────── */

/* Overlay d'aide ─────────────────────────────────────────────────────── */
.app-help-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9500;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.app-help-overlay.is-open {
    display: flex;
    animation: appHelpFadeIn 0.18s ease;
}
.app-help-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: appHelpSlideIn 0.22s cubic-bezier(0.21, 1.02, 0.73, 1);
}
.app-help-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
}
.app-help-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0;
}
.app-help-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.12s ease, color 0.12s ease;
}
.app-help-close:hover { background: #f1f5f9; color: #475569; }

.app-help-body {
    padding: 16px 22px 22px;
    overflow-y: auto;
}
.app-help-body dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 12px 18px;
    margin: 0;
    align-items: center;
}
.app-help-body dt {
    display: flex; align-items: center; gap: 4px;
    margin: 0;
    white-space: nowrap;
}
.app-help-body dd {
    margin: 0;
    color: #334155;
    font-size: 0.85rem;
    line-height: 1.4;
}
.app-help-body kbd {
    display: inline-block;
    min-width: 24px;
    padding: 3px 7px;
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-bottom-width: 2px;
    border-radius: 5px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}
.app-help-sep {
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 0 2px;
}

@keyframes appHelpFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes appHelpSlideIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }


/* ═══════════════════════════════════════════════════════════════════════
   Utilitaires (à utiliser avec parcimonie)
   ─────────────────────────────────────────────────────────────────────── */
.app-text-muted   { color: var(--gray-500); }
.app-text-success { color: var(--color-success-text); }
.app-text-danger  { color: var(--color-danger-text); }
.app-mt-0 { margin-top: 0; }
.app-mb-0 { margin-bottom: 0; }
.app-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

