
/* ==========================================================================================
   Candidatures automatiques (JobHunter) — vue views/candidatures.js
   Couleurs : uniquement les jetons du thème (--main-color-*, --bg-black-*, --secondary-color).
   ========================================================================================== */
.jh { width: 100%; min-height: 100%; }
.jh [hidden], .jh-nav-right [hidden] { display: none !important; }

/* contrôles dans la navbar de l'application, poussés à l'opposé des boutons de sections */
.jh-nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; position: relative; }
.jh-row { display: flex; align-items: center; gap: 10px; }
.jh-row.jh-wrap, .jh-wrap { flex-wrap: wrap; }
.jh-between { justify-content: space-between; }
.jh-muted { opacity: .6; font-size: 12px; line-height: 1.5; }
.jh-tab { display: flex; flex-direction: column; gap: 14px; }

/* pastille « en direct » : verte qui pulse = traitement, rouge = envoi, grise = veille */
.jh-dot { display: inline-block; flex: none; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.jh-dot.is-busy { background: #3ddc84; animation: jh-pulse 1.4s ease-out infinite; --jh-glow: 61, 220, 132; }
.jh-dot.is-sending { background: var(--main-color); animation: jh-pulse 1s ease-out infinite; --jh-glow: 232, 50, 60; }
.jh-dot.is-warn { background: #ffb800; }
@keyframes jh-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--jh-glow), .6); }
  70% { box-shadow: 0 0 0 9px rgba(var(--jh-glow), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--jh-glow), 0); }
}
.jh-live { display: flex; align-items: center; max-width: 380px; padding: 6px 12px; border-radius: 999px; background: var(--bg-black-45); font-size: 12px; }
.jh-live-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jh-livepanel { display: flex; align-items: center; }
.jh-livepanel small { display: block; opacity: .6; font-size: 11px; }

/* bouton rond « IA » + infobulle au survol */
.jh-ai { position: relative; }
.jh-ai-btn { width: 34px; height: 34px; border: 1px solid var(--main-color-40); border-radius: 50%; background: var(--main-color-15); color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.jh-ai-btn:hover, .jh-ai-btn:focus-visible { background: var(--main-color-40); }
.jh-ai-pop { position: absolute; z-index: 30; top: 42px; right: 0; width: 330px; padding: 14px; border: 1px solid var(--main-color-30); border-radius: 12px; background: var(--bg-black-90); font-size: 12px; box-shadow: 0 10px 30px var(--bg-black-50); }
.jh-ai-model { margin-bottom: 12px; }
.jh-ai-model strong { display: block; font-weight: normal; }
.jh-ai-model small { display: block; opacity: .65; margin: 2px 0; }
.jh-kill.is-on { background: var(--main-color); color: #fff; }

/* cartes, barres */
.jh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.jh-card { padding: 16px; border: 1px solid var(--main-color-15); border-radius: 12px; background: var(--bg-black-65); }
.jh-card b { display: block; font-size: 24px; font-weight: normal; }
.jh-card small { opacity: .65; }
.jh-card.is-warn { border-color: rgba(255, 184, 0, .35); background: rgba(255, 184, 0, .08); }
.jh-card.is-warn b { color: #ffd166; }
.jh-card.is-bad { border-color: var(--main-color-25); background: rgba(232, 50, 60, .08); }
.jh-card.is-bad b { color: var(--secondary-color); }

/* sections pliables (Configuration, Profil) : badge de statut toujours visible, même repliées */
.jh-section { border: 1px solid var(--main-color-15); border-radius: 12px; background: var(--bg-black-65); overflow: hidden; }
.jh-section + .jh-section { margin-top: 12px; }
.jh-section-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 18px; border: none; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.jh-section-head:hover, .jh-section-head:focus-visible { background: rgba(255, 255, 255, .03); }
.jh-section-title { font-weight: 600; flex: none; }
.jh-section-status { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.jh-section-chevron { flex: none; width: 16px; height: 16px; opacity: .5; transition: transform .18s ease; }
.jh-section.is-open .jh-section-chevron { transform: rotate(180deg); }
.jh-section-body { display: flex; flex-direction: column; gap: 12px; padding: 0 18px 18px; }
.jh-section-body[hidden] { display: none; }
.jh-config-note { padding: 0 2px; }
.jh-bar { height: 8px; margin: 8px 0 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.jh-bar span { display: block; height: 100%; border-radius: 4px; background: var(--main-color); transition: width .3s ease; }
.jh-goal { padding: 16px 22px; }

/* listes et tableaux */
/* Titre au-dessus (date), valeur en dessous (message) — même codage visuel que les infos (jh-kv). */
.jh-activity { list-style: none; display: grid; gap: 10px; font-size: 13px; }
.jh-activity li { display: grid; gap: 3px; }
.jh-activity time { display: block; opacity: .55; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.jh-toolbar { flex-wrap: wrap; }
.jh-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.jh-pill { padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 999px; background: none; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.jh-pill:hover { border-color: var(--main-color-60); }
.jh-pill.is-on { background: var(--main-color-30); border-color: var(--main-color-60); }
.jh-search, .jh-chip-input, .jh-link { padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-size: 13px; outline: none; }
.jh-search:focus, .jh-chip-input:focus, .jh-link:focus, .jh-textarea:focus, .jh-select:focus { border-color: var(--main-color-60); }
.jh-link { width: 100%; margin: 10px 0; }
.jh-link-open { display: block; word-break: break-all; color: var(--main-color-60); text-decoration: underline; font-size: 13px; }
.jh-tablewrap { overflow-x: auto; border: 1px solid var(--main-color-15); border-radius: 12px; background: var(--bg-black-65); }
.jh-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.jh-table th { padding: 10px 12px; text-align: left; font-weight: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; opacity: .55; }
.jh-table td { padding: 10px 12px; vertical-align: top; border-top: 1px solid rgba(255, 255, 255, .07); }
.jh-table small { display: block; opacity: .6; font-size: 11px; line-height: 1.4; }
.jh-table .jh-reason { color: var(--secondary-color); opacity: .9; }
.jh-table tr.jh-clickable { cursor: pointer; }
.jh-table tr.jh-clickable:hover td { background: rgba(255, 255, 255, .04); }
.jh-score { white-space: nowrap; font-variant-numeric: tabular-nums; }
.jh-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.jh-actions .btn-ghost, .jh-actions .btn-primary { white-space: nowrap; }
.jh-remove { background: var(--main-color-20) !important; color: var(--secondary-color); }
.jh-remove:hover { background: var(--main-color-60) !important; color: #fff; }
.btn-ghost:disabled, .btn-primary:disabled { opacity: .45; cursor: default; }

.jh-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; white-space: nowrap; background: rgba(255, 255, 255, .1); }
.jh-badge.is-ok { background: rgba(61, 220, 132, .18); color: #7ff0b1; }
.jh-badge.is-bad { background: var(--main-color-25); color: var(--secondary-color); }
.jh-badge.is-warn { background: rgba(255, 184, 0, .18); color: #ffd166; }
.jh-badge.is-info { background: rgba(90, 160, 255, .18); color: #9cc4ff; }

/* formulaires */
.jh-form { display: flex; flex-direction: column; gap: 12px; }
.jh-form h3.sub { margin: 0; color: var(--main-color); opacity: 1; }
.jh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.jh-form arms-input { margin: 0; }
.jh-label { display: block; margin-bottom: 4px; font-size: 12px; opacity: .65; }
.jh-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; background: rgba(255, 255, 255, .08); }
.jh-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--main-color-30); font-size: 12px; }
.jh-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.jh-chip-x { flex-shrink: 0; width: 18px; height: 18px; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; line-height: 1; }
.jh-chip-x:hover { background: var(--main-color-60); }
.jh-chip-input { flex: 1; min-width: 160px; padding: 4px 6px; border: 0; background: none; }
.jh-note { padding: 10px 12px; border-left: 3px solid var(--main-color-40); border-radius: 4px; background: rgba(255, 255, 255, .05); font-size: 12px; line-height: 1.5; opacity: .85; }
.jh-note.is-warn, .jh-warn { border-left-color: #ffb800; color: #ffd166; }
.jh-warn { font-size: 12px; margin-bottom: 8px; }
.jh-services { list-style: none; display: grid; gap: 6px; font-size: 13px; }
.jh-confirm { line-height: 1.6; }

/* contrôles natifs : thème sombre + accent du projet (color-scheme: dark est déjà posé sur :root) */
.jh-select, .jh-textarea { border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-size: 13px; outline: none; accent-color: var(--main-color); }
.jh-select { padding: 6px 8px; }
.jh-select option { background: #1b1b1b; color: #fff; }
.jh-select option:checked { background: var(--main-color); color: #fff; }
.jh-textarea { width: 100%; padding: 10px; line-height: 1.55; resize: vertical; }
.jh-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; opacity: .85; }

/* détail d'une candidature */
.jh-detail { display: flex; flex-direction: column; gap: 12px; }
.jh-detail h3.sub { margin: 10px 0 0; }
/* Titre au-dessus, valeur en dessous (jamais « Titre : Valeur » sur une ligne). */
.jh-kv { display: grid; gap: 12px; font-size: 13px; }
.jh-kv > div { display: grid; grid-template-columns: 1fr; gap: 3px; }
.jh-kv span { display: block; opacity: .55; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.jh-kv small { display: block; opacity: .6; word-break: break-all; }
.jh-kv a { color: var(--secondary-color); word-break: break-all; }
.jh-emails { display: grid; gap: 8px; }
.jh-mail { padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; background: rgba(255, 255, 255, .04); font-size: 13px; }
.jh-mail small { display: block; opacity: .6; }
.jh-mail pre { margin-top: 8px; max-height: 200px; overflow: auto; white-space: pre-wrap; font: inherit; font-size: 12px; opacity: .85; }

/* Libellé flottant (comme <arms-input>) : dans le champ tant qu'il est vide, petite légende au-dessus dès qu'on écrit */
.jh-field { position: relative; padding-top: 18px; }
.jh-field .jh-label { position: absolute; z-index: 1; top: 39px; left: 11px; max-width: calc(100% - 22px); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform: translateY(-50%); font-size: 13px; opacity: .5; pointer-events: none; transition: all .15s ease; }
.jh-field:focus-within .jh-label,
.jh-field:has(.jh-chip) .jh-label,
.jh-field:has(.jh-chip-input:not(:placeholder-shown)) .jh-label { top: 9px; left: 2px; font-size: 11px; opacity: .8; }
.jh-chips { min-height: 42px; padding: 5px 6px; }
.jh-chips:focus-within { border-color: var(--main-color-60); }
.jh-chip-input { padding: 2px 6px; }
.jh-chip-input::placeholder { color: transparent; }

.jh-fl { position: relative; width: 260px; margin-top: 18px; }
.jh-fl .jh-search { width: 100%; height: 40px; padding: 0 10px; }
.jh-fl label { position: absolute; top: 20px; left: 11px; max-width: calc(100% - 22px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform: translateY(-50%); font-size: 13px; opacity: .5; pointer-events: none; transition: all .15s ease; }
.jh-fl:focus-within label,
.jh-fl:has(.jh-search:not(:placeholder-shown)) label { top: -9px; left: 2px; font-size: 11px; opacity: .8; }
.jh-search::placeholder { color: transparent; }
.jh-field.jh-static { padding-top: 0; }
.jh-field.jh-static .jh-label { position: static; display: block; margin-bottom: 6px; transform: none; font-size: 12px; opacity: .65; }

/* formations / expériences : une carte par entrée */
.jh-entry-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.jh-entry { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; background: rgba(255, 255, 255, .04); }
.jh-entry .jh-row { justify-content: flex-end; }

/* ---------------------------------------------------------- panneau d'usage IA (Partie 2 du brief) */
.jh-ai-btn { position: relative; }
.jh-ai-btn span { display: block; font-size: 10px; }
.jh-ai-btn.is-ok { border-color: rgba(61, 220, 132, .5); background: rgba(61, 220, 132, .15); }
.jh-ai-btn.is-warn { border-color: rgba(255, 184, 0, .55); background: rgba(255, 184, 0, .16); }
.jh-ai-btn.is-bad { border-color: var(--main-color-60); background: var(--main-color-25); }
.jh-ai-btn.is-muted { opacity: .55; }
.jh-usage-panel { display: flex; flex-direction: column; gap: 14px; }
.jh-usage-model { padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.jh-usage-model:last-of-type { border-bottom: none; padding-bottom: 0; }
.jh-bar.is-ok span { background: #3ddc84; }
.jh-bar.is-warn span { background: #ffb800; }
.jh-bar.is-bad span { background: var(--main-color); }
.jh-usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.jh-usage-grid > div { padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .05); }
.jh-usage-grid b { display: block; font-size: 15px; font-weight: normal; }
.jh-usage-grid small { opacity: .6; font-size: 11px; }
.jh-usage-history { display: flex; flex-direction: column; gap: 6px; }
.jh-chart { display: flex; flex-direction: column; gap: 6px; cursor: default; }
.jh-spark, .jh-bars7 { display: block; flex: none; width: 100%; color: var(--main-color); opacity: .85; cursor: default; }
.jh-spark { height: 32px; }
.jh-bars7 { height: 40px; }
.jh-chart-tip { position: fixed; z-index: 10000; padding: 5px 9px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; background: rgba(20, 16, 18, .95); color: #fff; font-size: 12px; line-height: 1.3; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.jh-usage-history a[data-act='open-link'] { color: var(--secondary-color); }

/* ================================================================================================
   Détail d'une candidature — modal 3 zones (même approche que le modal AniList) :
   gauche = informations (éditables, pour pouvoir notamment lier un e-mail via son ID de fil Gmail
   quand le rapprochement automatique échoue), milieu = actions (lettre + ses boutons),
   pied = statut + boutons contextuels (réessayer, retirer de l'historique…), toujours visible.
   ================================================================================================ */
.arms-modal.jh-dlg .frame { width: 1200px; max-width: 94vw; height: 780px; max-height: 90vh; }
.arms-modal.jh-dlg .body { padding: 0; max-height: none; height: 100%; overflow: hidden; display: block; }

.jh-modal {
  display: grid;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  gap: 3px;
  grid-template-columns: 320px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "left mid" "foot foot";
}
.jh-mleft { grid-area: left; display: flex; flex-direction: column; gap: 12px; }
.jh-mmid { grid-area: mid; display: flex; flex-direction: column; gap: 12px; }
.jh-mleft, .jh-mmid { box-sizing: border-box; min-width: 0; min-height: 0; padding: 16px; background: var(--bg-black-50); }
.jh-mscroll { overflow-y: auto; }
/* le scroll des informations reste actif, seule la barre visible disparaît (Chromium/Electron + Firefox) */
.jh-mleft.jh-mscroll { scrollbar-width: none; -ms-overflow-style: none; }
.jh-mleft.jh-mscroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.jh-mfoot { grid-area: foot; box-sizing: border-box; padding: 12px 16px; background: var(--bg-black-50); }
.jh-mfoot:empty, .jh-mmid > arms-input[type="textarea"] { min-height: 0; }
.jh-mmid > arms-input[type="textarea"] { flex: 1; }

/* formulaire d'informations éditables (panneau de gauche) */
.jh-info-edit { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.jh-info-edit arms-input { margin: 0; }

/* statut déplacé dans le pied, à côté des boutons contextuels */
.jh-mfoot arms-input[data-status] { width: 200px; flex: none; margin: 0; }
