/* IBCSC Jobs — code e-mail, identite, messagerie. Depend des jetons --jx-* de jobs-theme.css. */

.jx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Code de confirmation ───────────────────────────────────── */
.jx-code-panel { max-width: 560px; text-align: center; }
.jx-code-panel .jb-back { display: inline-block; margin-bottom: 18px; }
.jx-code-mail { display: grid; place-items: center; margin: 8px auto 14px; }
.jx-code-mail svg { overflow: visible; }
.jx-code-env { fill: var(--jx-mint-50); stroke: var(--jx-green-600); stroke-width: 2.5; }
.jx-code-flap { fill: none; stroke: var(--jx-green-600); stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 120; stroke-dashoffset: 120; animation: jx-draw 1s .2s var(--jx-ease) forwards; }
.jx-code-badge { fill: var(--jx-green-600); transform-origin: 80px 14px; transform: scale(0); animation: jx-pop .45s .9s var(--jx-ease) forwards; }
.jx-code-tick { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; animation: jx-draw .35s 1.25s ease-out forwards; }
@keyframes jx-draw { to { stroke-dashoffset: 0; } }
@keyframes jx-pop { to { transform: scale(1); } }
.jx-code-title { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0 0 8px; }
.jx-code-lead { margin: 0 auto 22px; max-width: 44ch; color: var(--jx-ink-2); }
.jx-code-form { display: grid; gap: 18px; justify-items: center; }
.jx-code-form .jb-field { width: 100%; max-width: 360px; text-align: left; }
.jx-code-boxes { display: flex; gap: 10px; align-items: center; justify-content: center; border: 0; padding: 0; margin: 4px 0 0; }
.jx-code-box {
    width: 54px; height: 64px; padding: 0; text-align: center; font-family: inherit; font-weight: 700; font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums;
    color: var(--jx-ink); background: #fff; border: 1.5px solid var(--jx-line-2); border-radius: 12px; caret-color: var(--jx-green-600);
    box-shadow: var(--jx-sh-1); transition: border-color .15s, box-shadow .15s, transform .15s var(--jx-ease);
}
.jx-code-box:focus { outline: none; border-color: var(--jx-green-600); box-shadow: 0 0 0 4px rgba(22, 168, 100, .16); transform: translateY(-2px); }
.jx-code-box.is-filled { border-color: var(--jx-green-600); background: var(--jx-mint-25); }
.jx-code-boxes.is-error .jx-code-box { border-color: var(--jx-coral); animation: jx-shake .35s; }
@keyframes jx-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.jx-code-sep { color: var(--jx-ink-3); font-size: 1.4rem; }
.jx-code-submit { min-width: 260px; justify-content: center; }
.jx-code-help { margin-top: 26px; color: var(--jx-ink-3); font-size: .92rem; }
.jx-code-help p { margin: 4px 0; }
@media (max-width: 420px) {
    .jx-code-boxes { gap: 6px; }
    .jx-code-box { width: 42px; height: 54px; font-size: 1.5rem; border-radius: 10px; }
    .jx-code-sep { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .jx-code-flap, .jx-code-tick { animation: none; stroke-dashoffset: 0; }
    .jx-code-badge { animation: none; transform: none; }
}

/* ── Identite ───────────────────────────────────────────────── */
.jx-id-fieldset .jx-id-intro, .jx-id-intro { margin: 0 0 14px; color: var(--jx-ink-2); font-size: .94rem; }
.jx-id-row { display: grid; gap: 12px; }
.jx-id-row-3 { grid-template-columns: 130px 1fr 1fr; }
.jx-id-row-street { grid-template-columns: 1fr 110px 90px; }
@media (max-width: 640px) {
    .jx-id-row-3 { grid-template-columns: 110px 1fr; }
    .jx-id-row-3 > :last-child { grid-column: 1 / -1; }
    .jx-id-row-street { grid-template-columns: 1fr 90px; }
    .jx-id-row-street > :last-child { grid-column: 1 / -1; }
}
.jx-id-address input[readonly] { background: var(--jx-mint-25); color: var(--jx-ink-2); }
.jx-id-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: .92rem; color: var(--jx-ink-2); }
.jx-id-check input { margin-top: 3px; accent-color: var(--jx-green-600); }
.jx-id-drop {
    position: relative; display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1.5px dashed var(--jx-line-2);
    border-radius: var(--jx-r-lg); background: var(--jx-mint-25); transition: border-color .15s, background .15s;
}
.jx-id-drop:hover, .jx-id-drop:focus-within, .jx-id-drop.is-over { border-color: var(--jx-green-600); background: var(--jx-mint-50); }
.jx-id-drop.is-picked { border-style: solid; border-color: var(--jx-green-600); }
.jx-id-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.jx-id-drop-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #fff; color: var(--jx-green-700); box-shadow: var(--jx-sh-1); flex: none; }
.jx-id-drop-text { display: grid; gap: 2px; min-width: 0; }
.jx-id-drop-text strong { color: var(--jx-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jx-id-drop-text small { color: var(--jx-ink-3); }
.jx-id-privacy { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; font-size: .84rem; color: var(--jx-green-700); }
.jx-id-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; padding-block: 28px 56px; }
@media (max-width: 900px) { .jx-id-layout { grid-template-columns: 1fr; } .jx-id-aside { order: -1; } }
.jx-id-main h1 { margin: 6px 0 16px; }
.jx-id-form { background: #fff; border: 1px solid var(--jx-line); border-radius: var(--jx-r-lg); padding: clamp(18px, 3vw, 28px); box-shadow: var(--jx-sh-1); }
.jx-id-welcome, .jx-id-required { display: grid; gap: 4px; padding: 14px 16px; margin-bottom: 16px; border-radius: 12px; }
.jx-id-welcome { background: var(--jx-mint-50); border: 1px solid var(--jx-mint-200); color: var(--jx-green-800); }
.jx-id-required { background: #fff7eb; border: 1px solid #f5d7a4; color: #7a4c06; }
.jx-id-aside { position: sticky; top: 90px; display: grid; gap: 16px; }
.jx-id-status { padding: 18px; border-radius: var(--jx-r-lg); border: 1px solid var(--jx-line); background: #fff; }
.jx-id-status-label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--jx-ink-3); }
.jx-id-status strong { font-size: 1.05rem; }
.jx-id-status-approved { background: var(--jx-mint-50); border-color: var(--jx-mint-200); }
.jx-id-status-approved strong { color: var(--jx-green-700); }
.jx-id-status-pending strong { color: #9a6200; }
.jx-id-status-rejected { background: #fff2ee; border-color: #f3c3b3; }
.jx-id-status-rejected strong { color: #b23c16; }
.jx-id-checklist { list-style: none; margin: 0; padding: 14px 18px; border: 1px solid var(--jx-line); border-radius: var(--jx-r-lg); background: #fff; display: grid; gap: 10px; }
.jx-id-checklist li { position: relative; padding-left: 28px; font-size: .94rem; }
.jx-id-checklist li::before { content: ''; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--jx-line-2); box-sizing: border-box; }
.jx-id-checklist li.is-done::before { border-color: var(--jx-green-600); background: var(--jx-green-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.jx-id-checklist li.is-missing { color: var(--jx-ink-2); }
.jx-vies { display: block; font-size: .8rem; margin-top: 2px; }
.jx-vies-ok { color: var(--jx-green-700); }
.jx-vies-ko { color: #b23c16; }
.jx-id-why { font-size: .86rem; color: var(--jx-ink-3); margin: 0; }

/* ── Messagerie ─────────────────────────────────────────────── */
.jx-chat-page { padding-block: 20px 40px; }
.jx-chat {
    display: grid; grid-template-columns: 340px minmax(0, 1fr); height: min(78vh, 820px); min-height: 520px;
    background: #fff; border: 1px solid var(--jx-line); border-radius: 18px; overflow: hidden; box-shadow: var(--jx-sh-2);
}
.jx-chat-list { display: flex; flex-direction: column; border-right: 1px solid var(--jx-line); background: var(--jx-mint-25); min-height: 0; }
.jx-chat-list-head { padding: 18px 16px 12px; border-bottom: 1px solid var(--jx-line); }
.jx-chat-list-head h1 { font-size: 1.35rem; margin: 0 0 10px; }
.jx-chat-search input { width: 100%; padding: 9px 12px; border: 1px solid var(--jx-line-2); border-radius: 10px; background: #fff; font: inherit; }
.jx-chat-threads { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.jx-chat-thread { display: flex; gap: 11px; align-items: center; padding: 10px; border-radius: 12px; text-decoration: none; color: inherit; position: relative; transition: background .15s; }
.jx-chat-thread:hover { background: #fff; }
.jx-chat-thread.is-active { background: #fff; box-shadow: inset 3px 0 0 var(--jx-green-600), var(--jx-sh-1); }
.jx-chat-thread-body { display: grid; gap: 1px; min-width: 0; flex: 1; }
.jx-chat-thread-top { display: flex; justify-content: space-between; gap: 8px; }
.jx-chat-thread-top strong { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jx-chat-thread-top time { font-size: .76rem; color: var(--jx-ink-3); flex: none; }
.jx-chat-thread-ctx { font-size: .78rem; color: var(--jx-green-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jx-chat-thread-preview { font-size: .86rem; color: var(--jx-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jx-chat-thread.has-unread .jx-chat-thread-preview { color: var(--jx-ink); font-weight: 600; }
.jx-chat-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--jx-green-600); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.jx-chat-empty-list { padding: 22px 18px; color: var(--jx-ink-3); font-size: .92rem; flex: 1; }
.jx-chat-archived { padding: 12px 16px; font-size: .82rem; color: var(--jx-ink-3); border-top: 1px solid var(--jx-line); }

.jx-avatar { --h: 150; display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; font-weight: 700; color: #fff; background: hsl(var(--h) 55% 42%); }
.jx-avatar[data-hue="0"] { --h: 150; } .jx-avatar[data-hue="1"] { --h: 205; } .jx-avatar[data-hue="2"] { --h: 25; } .jx-avatar[data-hue="3"] { --h: 265; }
.jx-avatar[data-hue="4"] { --h: 340; } .jx-avatar[data-hue="5"] { --h: 180; } .jx-avatar[data-hue="6"] { --h: 45; } .jx-avatar[data-hue="7"] { --h: 225; }
.jx-avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; }

.jx-chat-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.jx-chat-pane > .jb-alert { margin: 12px 16px 0; }
.jx-chat-head { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--jx-line); }
.jx-chat-back { display: none; text-decoration: none; font-size: 1.3rem; color: var(--jx-ink); padding: 4px 8px; }
.jx-chat-head-text { display: grid; min-width: 0; flex: 1; }
.jx-chat-head-text span { font-size: .84rem; color: var(--jx-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jx-btn-ghost { border: 1px solid var(--jx-line-2); background: #fff; border-radius: 9px; padding: 7px 12px; font: inherit; font-size: .84rem; cursor: pointer; color: var(--jx-ink-2); }
.jx-btn-ghost:hover { border-color: var(--jx-green-600); color: var(--jx-green-700); }
.jx-chat-log {
    list-style: none; margin: 0; padding: 18px clamp(12px, 3vw, 28px); overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px;
    background: linear-gradient(180deg, var(--jx-mint-25), #fff 40%);
}
.jx-chat-day { align-self: center; margin: 10px 0 6px; }
.jx-chat-day span { font-size: .75rem; color: var(--jx-ink-3); background: #fff; border: 1px solid var(--jx-line); border-radius: 20px; padding: 3px 10px; }
.jx-chat-hello { align-self: center; margin: auto; color: var(--jx-ink-3); text-align: center; max-width: 36ch; }
.jx-cm { display: grid; justify-items: start; max-width: min(74%, 560px); animation: jx-cm-in .25s var(--jx-ease); }
.jx-cm.is-mine { align-self: flex-end; justify-items: end; }
@keyframes jx-cm-in { from { opacity: 0; transform: translateY(6px); } }
.jx-cm-bubble { padding: 9px 13px; border-radius: 16px 16px 16px 5px; background: #fff; border: 1px solid var(--jx-line); box-shadow: var(--jx-sh-1); overflow-wrap: anywhere; }
.jx-cm.is-mine .jx-cm-bubble { border-radius: 16px 16px 5px 16px; background: var(--jx-green-700); border-color: var(--jx-green-700); color: #fff; }
.jx-cm-bubble p { margin: 0; line-height: 1.45; }
.jx-cm-file { display: flex; gap: 8px; align-items: center; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--jx-mint-50); color: var(--jx-ink); text-decoration: none; }
.jx-cm-bubble > .jx-cm-file:first-child { margin-top: 0; }
.jx-cm-file small { display: block; font-size: .74rem; color: var(--jx-ink-3); }
.jx-cm.is-mine .jx-cm-file { background: rgba(255, 255, 255, .16); color: #fff; }
.jx-cm.is-mine .jx-cm-file small { color: rgba(255, 255, 255, .8); }
.jx-cm-meta { display: flex; gap: 6px; font-size: .72rem; color: var(--jx-ink-3); padding: 2px 4px; }
.jx-cm-seen { color: var(--jx-line-2); letter-spacing: -3px; }
.jx-cm-seen.is-seen { color: var(--jx-green-600); }
.jx-chat-compose { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--jx-line); }
.jx-chat-attach { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--jx-ink-2); cursor: pointer; flex: none; }
.jx-chat-attach:hover, .jx-chat-attach:focus-within { background: var(--jx-mint-50); color: var(--jx-green-700); }
.jx-chat-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.jx-chat-input { flex: 1; display: grid; gap: 6px; border: 1.5px solid var(--jx-line-2); border-radius: 14px; padding: 8px 12px; background: #fff; }
.jx-chat-input:focus-within { border-color: var(--jx-green-600); box-shadow: 0 0 0 3px rgba(22, 168, 100, .12); }
.jx-chat-input textarea { border: 0; outline: none; resize: none; font: inherit; line-height: 1.4; max-height: 160px; background: transparent; padding: 0; }
.jx-chat-filechip { justify-self: start; font-size: .8rem; background: var(--jx-mint-50); color: var(--jx-green-800); padding: 3px 9px; border-radius: 8px; }
.jx-chat-send { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--jx-green-600); color: #fff; cursor: pointer; flex: none; transition: transform .15s var(--jx-ease), background .15s; }
.jx-chat-send:hover { background: var(--jx-green-700); transform: scale(1.06); }
.jx-chat-send:disabled { opacity: .5; transform: none; }
.jx-chat-notice { margin: 0; padding: 0 16px 12px; font-size: .74rem; color: var(--jx-ink-3); }
.jx-chat-locked { margin: 0; padding: 14px 18px; background: #fff7eb; color: #7a4c06; border-top: 1px solid #f5d7a4; }
.jx-chat-placeholder, .jx-chat-new { margin: auto; text-align: center; padding: 30px; max-width: 460px; }
.jx-chat-placeholder p { color: var(--jx-ink-3); }
.jx-ph-a { fill: var(--jx-mint-100); }
.jx-ph-b { fill: var(--jx-green-600); }
.jx-ph-dot { fill: #fff; animation: jx-blink 1.2s infinite; }
.jx-ph-dot:nth-of-type(2) { animation-delay: .2s; } .jx-ph-dot:nth-of-type(3) { animation-delay: .4s; }
@keyframes jx-blink { 50% { opacity: .35; } }
.jx-chat-new { width: 100%; text-align: left; }
.jx-chat-new .jx-avatar { margin-bottom: 10px; }
.jx-chat-new-ctx { color: var(--jx-green-700); font-size: .9rem; margin-top: -6px; }
@media (max-width: 820px) {
    .jx-chat { grid-template-columns: 1fr; height: calc(100vh - 140px); border-radius: 14px; }
    .jx-chat-list.is-secondary { display: none; }
    .jx-chat-list:not(.is-secondary) + .jx-chat-pane { display: none; }
    .jx-chat-back { display: block; }
    .jx-cm { max-width: 88%; }
}

/* Lien « Messages » dans l'en-tete et boutons de contact */
.jx-nav-msg { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.jx-nav-msg-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--jx-coral); color: #fff; font-size: .7rem; font-weight: 700; display: inline-grid; place-items: center; }
.jx-nav-msg-count[hidden] { display: none; }
.jx-contact-btn { display: inline-flex; align-items: center; gap: 8px; }
.jx-id-kicker { display: block; margin-top: 14px; }
.jx-id-submit { margin-top: 18px; gap: 10px; }
.jx-code-panel .jx-code-title { text-align: center; margin-inline: auto; max-width: none; }
.jx-code-panel { margin-inline: auto; }
