/* front/recrutement/commun.css — socle visuel partage par index.html, entretien.html, synthese.html.
   Coupe depuis le <style> de index.html (tache 3) : .vh, le dialogue modal, les spinners,
   les boutons occupes et les toasts. */

.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- Panneau « Voir l'annonce » (dialogue modal) --- */
.modal-fond { position: fixed; inset: 0; z-index: 9000; background: rgba(35,38,43,.45); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.modal { position: relative; width: 100%; max-width: 760px; background: #fff; border-radius: var(--radius-md); box-shadow: 0 20px 60px rgba(35,38,43,.3); display: flex; flex-direction: column; max-height: 90vh; }
.modal:focus { outline: none; }
.modal-tete { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--ligne); }
.modal-tete h2 { flex: 1; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--sauge-700); margin: 4px 0 0; }
.modal-x { flex: none; border: none; background: none; font-size: 26px; line-height: 1; color: var(--encre-400); cursor: pointer; padding: 0 6px; font-family: var(--sans); border-radius: var(--radius-sm); }
.modal-x:hover { color: var(--encre-900); }
.modal-corps { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 22px; }
.modal-pied { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 20px 16px; border-top: 1px solid var(--ligne); }
body.modal-ouvert { overflow: hidden; }
.modal-confirmation { max-width: 520px; }
.modal-confirmation .modal-tete h2 { text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--encre-900); }
.modal-confirmation .modal-corps p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--encre-700); }
.conf-liste { margin: 0 0 12px; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--encre-700); }
.conf-note { color: var(--encre-500); font-size: 13px; }
.ann h3 { font-size: 17px; font-weight: 800; color: var(--encre-900); margin: 0 0 4px; }
.ann .ann-meta { font-size: 12.5px; color: var(--encre-500); margin: 0 0 14px; }
.ann h4 { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--sauge-700); margin: 14px 0 4px; }
.ann .txt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; color: var(--encre-700); margin: 0; }
.ann-aide { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ambre-50); border: 1px solid var(--ambre-100); color: var(--ambre-700); font-size: 13px; font-weight: 600; line-height: 1.5; }
@media (max-width: 640px) { .modal-fond { padding: 0; } .modal { max-height: none; min-height: 100%; border-radius: 0; } }

/* --- Retour utilisateur : toasts, boutons occupes, spinners --- */
.spin { display: inline-block; width: 13px; height: 13px; box-sizing: border-box; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tourne .8s linear infinite; flex: none; }
.spin-lg { width: 26px; height: 26px; border-width: 3px; color: var(--sauge-500); margin-top: 2px; }
@keyframes tourne { to { transform: rotate(360deg); } }
.btn-occupe, .btn-occupe:disabled { opacity: .9; cursor: progress; pointer-events: none; }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: calc(100vw - 40px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--ligne); border-left: 5px solid #2D5C8F; box-shadow: 0 10px 30px rgba(35,38,43,.18); font-size: 13.5px; line-height: 1.45; color: var(--encre-900); animation: toastIn .22s ease-out; }
.toast-ok { border-left-color: var(--sauge-600); }
.toast-err { border-left-color: var(--framboise-500); background: #FFF8F9; }
.toast-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #fff; background: #2D5C8F; }
.toast-ok .toast-ico { background: var(--sauge-600); }
.toast-err .toast-ico { background: var(--framboise-500); }
.toast-ico.toast-ico-spin { background: transparent; color: #2D5C8F; }
.toast-txt { flex: 1; min-width: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; padding-top: 1px; }
.toast-x { flex: none; border: none; background: none; font-size: 20px; line-height: 1; color: var(--encre-400); cursor: pointer; padding: 0 4px; font-family: var(--sans); }
.toast-x:hover { color: var(--encre-900); }
@keyframes toastIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) { #toasts { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; } .toast { font-size: 14px; } .toast-x { width: 44px; height: 44px; } .modal .btn { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .spin { animation-duration: 3s; } }

/* --- Feuille d'action (mobile) : panneau ancre en bas, voile cliquable (commun/feuille.js) --- */
.feuille-fond { position: fixed; inset: 0; background: rgba(35,38,43,.35); z-index: 60; display: flex; align-items: flex-end; }
.feuille-fond[hidden] { display: none; }
.feuille { width: 100%; max-height: 85vh; max-height: 85dvh; box-sizing: border-box; background: #fff; border-radius: 22px 22px 0 0; padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 40px rgba(0,0,0,.18); display: flex; flex-direction: column; animation: feuilleIn .22s ease-out; }
.feuille:focus { outline: none; }
.feuille-poignee { width: 40px; height: 4px; flex: none; border-radius: var(--pill); background: var(--encre-300); background-clip: content-box; box-sizing: content-box; padding: 10px 0; margin: 0 auto; }
.feuille-tete { display: flex; align-items: center; gap: 10px; flex: none; }
.feuille-tete h2 { margin: 0; font-size: 16px; color: var(--encre-900); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.feuille-tete h2 .score-badge { margin-left: 6px; vertical-align: middle; }
.feuille-x { flex: none; width: 44px; height: 44px; border: none; background: none; font-size: 26px; color: var(--encre-500); cursor: pointer; font-family: var(--sans); }
.feuille-corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-top: 8px; }
body.feuille-ouverte { overflow: hidden; }
@keyframes feuilleIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .feuille { animation: none; } }
@media (min-width: 641px) { .feuille { max-width: 560px; margin: 0 auto 24px; border-radius: 16px; } }

/* --- Menu « ⋯ » (commun/menu.js) --- */
.menu { position: relative; display: inline-flex; flex: none; }
.menu-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; color: var(--encre-500); font: 800 18px/1 var(--sans); cursor: pointer; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--mint-50); border-color: var(--ligne); color: var(--encre-900); }
.menu-btn:focus-visible { outline: 2px solid var(--sauge-500); outline-offset: 2px; }
.menu-liste { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 230px; max-width: min(320px, calc(100vw - 32px)); padding: 6px; background: #fff; border: 1px solid var(--ligne); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: menuIn .18s ease-out; }
.menu-item { display: block; width: 100%; text-align: left; padding: 9px 12px; border: none; border-radius: var(--radius-sm); background: none; font: 600 13.5px/1.35 var(--sans); color: var(--encre-900); text-decoration: none; cursor: pointer; }
.menu-item:hover, .menu-item:focus { background: var(--mint-50); outline: none; }
.menu-item:focus-visible { outline: 2px solid var(--sauge-500); outline-offset: -2px; }
.menu-item.menu-alerte { color: var(--framboise-600); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* --- Onglets (commun/onglets.js) --- */
.onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--ligne); overflow-x: auto; scrollbar-width: none; }
.onglets::-webkit-scrollbar { display: none; }
.onglet { flex: none; padding: 9px 14px; margin-bottom: -1px; border: none; border-bottom: 2px solid transparent; background: none; font: 700 13px/1.2 var(--sans); color: var(--encre-500); cursor: pointer; white-space: nowrap; }
.onglet:hover { color: var(--encre-900); }
.onglet[aria-selected="true"] { color: var(--sauge-700); border-bottom-color: var(--sauge-600); }
.onglet:focus-visible { outline: 2px solid var(--sauge-500); outline-offset: -2px; border-radius: 6px 6px 0 0; }
.onglet-n { font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--encre-500); margin-left: 2px; }

@media (prefers-reduced-motion: reduce) { .menu-liste { animation: none; } }
@media (max-width: 640px) { .menu-btn { width: 44px; height: 44px; } .menu-item { min-height: 44px; } .onglet { min-height: 44px; } }
