/* Police hébergée sur le site (aucun service tiers) : Plus Jakarta Sans, licence SIL OFL 1.1 */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #060b18; --surface: #0b1226; --surface-2: #0f1832; --border: #1c2846; --border-strong: #04123a;
  --bg-gradient: linear-gradient(180deg, #000000 0%, #01030a 14%, #04123a 48%, #04123a 80%, #04123a 100%);
  --text: #f5f5f5; --muted: #a4aec6; --accent: #f5f5f5; --on-accent: #0a0a0a;
}
* { box-sizing: border-box; }
html { min-height: 100%; background-color: #000; }
/* Le dégradé est sur un calque fixe qui couvre l'écran : noir en haut, bleu marine profond en bas,
   quelle que soit la longueur de la page (le fond "fixed" classique est ignoré par les iPhone). */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: var(--bg-gradient); pointer-events: none; }
body { margin: 0; min-height: 100vh; background: transparent; color: var(--text); font-family: 'Plus Jakarta Sans', system-ui, sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 32px 24px 64px; }
.muted { color: var(--muted); font-size: 13px; font-weight: 500; }
.error { color: #fca5a5; font-weight: 600; }

/* barre du haut */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; }
.muted-brand { color: var(--muted); font-weight: 600; }
.seal { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #5a5a5a; display: flex; align-items: center; justify-content: center; }
.seal-in { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.nav { display: flex; gap: 8px; margin-left: 16px; }
.nav a { padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--muted); border-radius: 8px; }
.nav a:hover { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.userchip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 14px; font-weight: 600; }
.userchip img { border-radius: 50%; }

/* boutons et champs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--border-strong); background: transparent; color: var(--text); font: 600 14px 'Plus Jakarta Sans', system-ui, sans-serif; cursor: pointer; }
.btn:hover { border-color: #6b7fa8; }
.btn.primary { background: var(--text); color: #0a0a0a; border-color: var(--text); }
.btn.small { min-height: 44px; padding: 0 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); }
input[type=text], select, textarea { width: 100%; min-height: 44px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 10px; color: var(--text); font: 500 14px 'Plus Jakarta Sans', system-ui, sans-serif; }
textarea { min-height: 96px; resize: vertical; }
input[type=color] { width: 44px; height: 44px; padding: 2px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.row > .field { flex: 1 1 200px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 600; }
.check input { width: 20px; height: 20px; }

/* pastilles */
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-strong); white-space: nowrap; }
.badge.ok { color: #86efac; background: #0f2417; border-color: #14532d; }
.badge.bad { color: #fca5a5; background: #2a1212; border-color: #7f1d1d; }
.badge.warn { color: #fcd34d; background: #2a2108; border-color: #78561a; }
.badge.hiring { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.mono { width: 52px; height: 52px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.mono.big { width: 72px; height: 72px; border-radius: 20px; font-size: 26px; }
.mono.small { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }

/* annuaire */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1.6px; color: var(--muted); text-transform: uppercase; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.04; font-weight: 800; letter-spacing: -1.5px; margin: 14px 0 16px; }
.hero h1 span { color: var(--muted); }
.hero p { max-width: 560px; color: #c9c9c9; font-size: 17px; margin-bottom: 28px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.toolbar input { flex: 1 1 260px; max-width: 420px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: #d4d4d4; font: 600 14px 'Plus Jakarta Sans', system-ui, sans-serif; cursor: pointer; }
.chip.active { background: var(--text); color: #0a0a0a; border-color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.company-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: border-color .15s; }
.company-card:hover { border-color: var(--accent); }
.cc-top { height: 88px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, transparent), var(--surface)); }
.cc-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.cc-name { font-size: 17px; font-weight: 700; }
.cc-tag { color: #d4d4d4; font-size: 14px; min-height: 42px; }
.cc-meta { font-size: 13px; color: var(--muted); font-weight: 500; }
.cc-link { font-size: 14px; font-weight: 700; color: var(--accent); }
.empty { color: var(--muted); padding: 32px 0; }

/* page entreprise */
.company-head { border-top: 6px solid var(--accent); }
.company-head .title { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.company-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; align-items: flex-start; }
.cols > .main { flex: 999 1 480px; min-width: 0; }
.cols > .side { flex: 1 1 300px; min-width: 0; }
.desc { white-space: pre-wrap; color: #d4d4d4; margin-top: 16px; }
h2.sec { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; }
.team li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); list-style: none; }
.team { padding: 0; margin: 0; }
.team .who { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }

/* compte */
.who-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.who-row img { border-radius: 50%; }
.who-row .btn { margin-left: auto; }
.name { font-weight: 700; }
.chars { list-style: none; padding: 0; margin: 0; }
.chars li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.chars .info { flex: 1; min-width: 0; }

/* admin */
.admin-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.admin-grid > .form { flex: 1 1 380px; min-width: 0; }
.admin-grid > .list { flex: 999 1 460px; min-width: 0; }
.admin-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.admin-row .info { flex: 1 1 160px; min-width: 0; }
.admin-row .actions { display: flex; gap: 8px; }
.notice { padding: 12px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.notice.ok { background: #0f2417; color: #86efac; border: 1px solid #14532d; }
.notice.bad { background: #2a1212; color: #fca5a5; border: 1px solid #7f1d1d; }

/* logos et petits ajustements */
.mono.has-logo { padding: 0; overflow: hidden; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.mono.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.back { margin-top: 24px; }
.logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.logo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
input[type=file] { font: 500 13px 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--muted); max-width: 100%; }

/* annonces et espace patron */
.stack { display: flex; flex-direction: column; gap: 20px; }
.announcement { padding: 14px 0; border-top: 1px solid var(--border); }
.announcement h3 { font-size: 16px; margin: 8px 0 4px; }
.announcement .desc { margin-top: 6px; }
.ann-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.boss-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.boss-head .grow { flex: 1 1 200px; min-width: 0; }
.boss-head h1 { font-size: 24px; font-weight: 800; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.member-row .info { flex: 1 1 180px; min-width: 0; }
.member-row .controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.member-row select { width: auto; min-width: 150px; }
.btn.danger { color: #fca5a5; border-color: #7f1d1d; }
.btn.danger:hover { border-color: #f87171; }
.fail-note { color: #fca5a5; font-size: 12px; font-weight: 600; }
.ann-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.ann-item .info { flex: 1; min-width: 0; }
.result-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.result-row .info { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.toast { position: sticky; top: 8px; z-index: 5; }

/* correctifs d'affichage */
[hidden] { display: none !important; } /* sans ça, .field { display:flex } écrase l'attribut hidden */
.field > label { display: flex; flex-direction: column; gap: 6px; }
input[type=datetime-local] { width: 100%; min-height: 44px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 10px; color: var(--text); font: 500 14px 'Plus Jakarta Sans', system-ui, sans-serif; color-scheme: dark; }
.mt { margin-top: 16px; }
h2.sec:not(:first-child) { margin-top: 28px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 12px; }

/* CV RP et candidatures */
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cv-view .desc { margin-top: 0; }
.cv-skills { margin: 12px 0; }
.cv-exps { margin-top: 8px; }
.cv-exp { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--border); }
.cv-period { flex: 0 0 110px; }
.exp-block { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--surface-2); }
.app-item { border-top: 1px solid var(--border); padding: 12px 0; }
.app-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-head .info { flex: 1 1 200px; min-width: 0; }
.app-body { margin-top: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.app-body h3 { font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.app-body h3:first-child { margin-top: 0; }
.counter { font-size: 12px; color: var(--muted); }

/* panel staff et fondateur */
.subtabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.subtabs .tab { min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 10px; border: 1px solid var(--border-strong); font-size: 14px; font-weight: 600; color: #d4d4d4; }
.subtabs .tab.active { background: var(--text); color: #0a0a0a; border-color: var(--text); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
.kpi .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi .value { font-size: 32px; font-weight: 800; margin: 4px 0 2px; }
.kpi .sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; width: 100%; margin-top: 10px; }
.inline-form input { flex: 1 1 220px; }
.company-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.company-line .info { flex: 1 1 220px; min-width: 0; }
.company-line .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.picked { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-2); margin-bottom: 14px; flex-wrap: wrap; }
.picked .info { flex: 1; min-width: 0; }
.warn-note { padding: 12px; border: 1px solid #78561a; border-radius: 12px; background: #2a2108; color: #fcd34d; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.perm-line { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.staff-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.staff-row .info { flex: 1 1 200px; min-width: 0; }
.journal-row { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; flex-wrap: wrap; }
.journal-row .when { flex: 0 0 120px; color: var(--muted); font-weight: 500; }
.journal-row .what { flex: 1 1 240px; min-width: 0; }
.city-news { margin-bottom: 24px; }
.city-news article { padding: 10px 0; border-top: 1px solid var(--border); }
.city-news article:first-of-type { border-top: 0; }

/* chat et vocal */
.chat-layout { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; align-items: flex-start; }
.chat-panel { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.voice-panel { flex: 1 1 300px; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.presence { display: flex; flex-wrap: wrap; gap: 6px; min-height: 8px; }
.messages { height: 55vh; min-height: 280px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; background: #070d1c; padding: 8px 14px; }
.msg { padding: 8px 0; }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-name { font-weight: 700; font-size: 14px; }
.msg.mine .msg-name { color: var(--accent); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; color: #e5e5e5; margin-top: 2px; }
.msg-del { margin-left: auto; background: none; border: 0; color: #fca5a5; font: 600 12px 'Plus Jakarta Sans', system-ui, sans-serif; cursor: pointer; opacity: 0; padding: 4px 8px; }
.msg:hover .msg-del, .msg-del:focus { opacity: 1; }
@media (hover: none) { .msg-del { opacity: 1; } }
.day-sep { text-align: center; color: var(--muted); font-size: 12px; font-weight: 600; margin: 12px 0 4px; }
.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; }
.chat-notice:empty { display: none; }
.voice-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.participant { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.participant.speaking { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.participant .name { font-weight: 600; font-size: 14px; flex: 1; }
.audio-sink { display: none; }

/* annonces internes */
.voice-col { flex: 1 1 300px; min-width: 0; }
.voice-col .voice-panel { flex: none; }
.notice-item { padding: 12px 0; border-top: 1px solid var(--border); }
.notice-item:first-of-type { border-top: 0; }
.notice-item.pinned { border-left: 3px solid var(--accent); padding-left: 12px; }
.notice-item .desc { margin-top: 6px; }
.notice-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }

/* page de règles et pied de page */
.legal { max-width: 860px; }
.legal h1 { font-size: 32px; font-weight: 800; letter-spacing: -.6px; margin: 8px 0 4px; }
.legal > p { margin: 14px 0; color: #d4d4d4; }
.legal a:not(.tab) { text-decoration: underline; text-underline-offset: 3px; }
.legal .card { margin-top: 24px; }
.legal h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.legal h3 { font-size: 16px; font-weight: 700; margin: 24px 0 6px; }
.legal p { color: #d4d4d4; margin: 8px 0; }
.legal ul { margin: 8px 0; padding-left: 20px; color: #d4d4d4; }
.legal li { margin: 6px 0; }
.legal strong { color: var(--text); }
.legal-scroll { overflow-x: auto; margin: 10px 0; border: 1px solid var(--border); border-radius: 12px; }
.legal-table { border-collapse: collapse; min-width: 760px; width: 100%; font-size: 13.5px; }
.legal-table th { text-align: left; padding: 10px 14px; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; }
.legal-table td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: top; color: #d4d4d4; line-height: 1.5; }
.site-footer { text-align: center; padding: 24px 16px 36px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); margin-top: 32px; }
.site-footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--text); }

/* logo du serveur (en-tête) */
.logo { height: 46px; width: auto; display: block; flex: none; }

/* statut automatique ouvert / fermé (espace patron) */
.status-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }

/* documentation interne */
.docs-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 24px; }
.docs-side { padding: 18px; }
.docs-section { margin-top: 14px; }
.docs-section h3 { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 0 0 6px 4px; }
.docs-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text); font: 600 14px 'Plus Jakarta Sans', system-ui, sans-serif; cursor: pointer; }
.docs-item:hover { background: var(--surface-2); }
.docs-item.active { background: var(--surface-2); border-color: var(--border-strong); }
.doc-panel { min-height: 320px; }
.doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.doc-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.3px; margin: 2px 0; }
.doc-restricted { margin-top: 8px; }
.doc-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 15px; color: #e4e8f2; }
.btn.block { width: 100%; }
@media (max-width: 820px) { .docs-layout { grid-template-columns: 1fr; } }
