:root {
  --bg: #f4f6fb; --card: #ffffff; --ink: #0f172a; --ink2: #334155; --muted: #64748b; --line: #e6e9f2;
  --brand: #4f6ef7; --brand2: #7c4dff; --navy: #0b1530; --navy2: #121f45;
  --ok: #0f9d6b; --okbg: #e8f7f0; --warn: #b7791f; --warnbg: #fdf5e6; --bad: #d64545; --badbg: #fdecec;
  --radius: 14px; --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
}
* { box-sizing: border-box; }
html { font-size: 14px; }
html, body { margin: 0; }
body { font: .95rem/1.5 "Heebo", system-ui, "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 110, 247, .15); }
button { cursor: pointer; border: 0; border-radius: 10px; padding: .6rem 1.3rem; font-weight: 600; background: var(--brand); color: #fff; transition: transform .1s, box-shadow .15s, background .15s; }
button:hover { background: #3f5ee8; }
button:active { transform: translateY(1px); }
button.ghost { background: #fff; color: var(--ink2); border: 1px solid var(--line); }

/* ---------- Coquille : barre laterale + contenu ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 224px; flex: none; background: linear-gradient(180deg, var(--navy), var(--navy2)); color: #c9d3ee; display: flex; flex-direction: column; padding: 1.2rem .9rem; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 700; font-size: 1.05rem; padding: .3rem .5rem 1.4rem; }
.logo:hover { text-decoration: none; }
.logo .mark svg { width: 32px; height: 32px; stroke: none; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side nav a, .side nav .soon { display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem; border-radius: 10px; color: #c9d3ee; font-weight: 500; }
.side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.side nav a.on { background: linear-gradient(90deg, rgba(91, 140, 255, .28), rgba(124, 77, 255, .18)); color: #fff; box-shadow: inset -3px 0 0 #7c9cff; }
.side nav .soon { opacity: .45; cursor: default; }
.side nav .soon em { margin-inline-start: auto; font-style: normal; font-size: .7rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: 99px; padding: 0 .45rem; }
.me { display: flex; align-items: center; gap: .65rem; padding: .9rem .5rem 0; border-top: 1px solid rgba(255, 255, 255, .08); margin-top: .8rem; }
.me b { display: block; color: #fff; font-weight: 600; }
.me a { color: #9fb0db; font-size: .85rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #5b8cff, #7c4dff); color: #fff; font-weight: 700; }
.content { flex: 1; min-width: 0; }
.content main { max-width: 1680px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }

/* ---------- Elements de page ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head h1 { margin: 0; font-size: 1.65rem; font-weight: 700; letter-spacing: -.01em; }
.page-head p { margin: .2rem 0 0; color: var(--muted); }
h1 { font-size: 1.5rem; margin: .4rem 0 1rem; }
h2 { font-size: 1.05rem; margin: 0 0 .9rem; font-weight: 600; }
.muted { color: var(--muted); font-weight: 400; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.35rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.card label { display: block; margin-bottom: .9rem; font-weight: 500; color: var(--ink2); }
.card label input:not([type=checkbox]), .card label select, .card label textarea { display: block; width: 100%; margin-top: .3rem; }
.card label.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.ok { background: var(--okbg); color: #0b6b49; padding: .75rem 1rem; border-radius: 10px; }
.err { background: var(--badbg); color: #a12f2f; padding: .75rem 1rem; border-radius: 10px; }

.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #eef2ff; color: var(--brand); margin-bottom: .7rem; }
.kpi .ico.g { background: var(--okbg); color: var(--ok); } .kpi .ico.y { background: var(--warnbg); color: var(--warn); } .kpi .ico.r { background: var(--badbg); color: var(--bad); } .kpi .ico.v { background: #f3edff; color: var(--brand2); }
.kpi .num { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.kpi .lbl { color: var(--muted); font-size: .9rem; }
.kpi a.stretch::after { content: ""; position: absolute; inset: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.bars { display: flex; flex-direction: column; gap: .55rem; }
.bar { color: inherit; display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: .7rem; font-size: .92rem; }
.bar .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink2); }
.bar .track { display: block; height: 9px; background: #eef1f7; border-radius: 99px; overflow: hidden; }
.bar .fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7c4dff, #5b8cff); }
.bar .n { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 3.5rem; text-align: left; }
.bar:hover { text-decoration: none; }
.bar:hover .t { color: var(--brand); }
.bar:hover .fill { filter: brightness(1.1); }

.funnel { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; }
.funnel a { display: block; border-radius: 12px; padding: .9rem 1rem; background: #f7f8fc; border: 1px solid var(--line); color: var(--ink); }
.funnel a:hover { text-decoration: none; border-color: var(--brand); }
.funnel b { display: block; font-size: 1.5rem; font-weight: 700; }
.funnel span { color: var(--muted); font-size: .9rem; }
.funnel a.st0 { border-top: 3px solid #94a3b8; } .funnel a.st1 { border-top: 3px solid #5b8cff; } .funnel a.st2 { border-top: 3px solid #f0a020; } .funnel a.st3 { border-top: 3px solid #16a36f; } .funnel a.st4 { border-top: 3px solid #e05555; }

.filters { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-bottom: 1rem; background: var(--card); padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.filters { display: block; }
.searchrow { display: flex; gap: .55rem; }
.searchrow input { flex: 1; min-width: 0; font-size: 1rem; padding: .7rem .9rem; }
.filters details { margin-top: .7rem; }
.filters summary { cursor: pointer; color: var(--brand); font-weight: 500; font-size: .92rem; }
.selects { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5rem; margin-top: .7rem; }
.selects select { width: 100%; }
.selacts { display: flex; gap: .8rem; align-items: center; margin-top: .7rem; }
.list small.sm { display: none; }
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.list { width: 100%; border-collapse: collapse; }
.list th, .list td { text-align: right; padding: .55rem .65rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.list th { background: #f8f9fc; font-weight: 600; font-size: .82rem; color: var(--muted); text-transform: none; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr:hover td { background: #f9faff; }
.list td a { font-weight: 500; }
.pill { display: inline-block; border-radius: 99px; padding: .12rem .65rem; font-size: .8rem; font-weight: 500; background: #eef1f7; color: var(--ink2); }
.pill.st1 { background: #eaf0ff; color: #3552c8; } .pill.st2 { background: var(--warnbg); color: var(--warn); } .pill.st3 { background: var(--okbg); color: var(--ok); } .pill.st4 { background: var(--badbg); color: var(--bad); }
.pill.active { background: var(--okbg); color: var(--ok); } .pill.wait { background: var(--warnbg); color: var(--warn); } .pill.cancel { background: var(--badbg); color: var(--bad); }
.pager { display: flex; gap: 1rem; justify-content: center; align-items: center; margin: 1.2rem 0; color: var(--muted); }
.map { border-collapse: collapse; margin: .5rem 0 1rem; width: 100%; }
.map td, .map th { padding: .45rem .6rem; text-align: right; border-bottom: 1px solid var(--line); }
.detail { display: grid; grid-template-columns: 2fr 1fr; gap: 1.2rem; align-items: start; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.4rem; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 500; }

.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 1rem; overflow-x: auto; padding-bottom: .5rem; }
.col { background: #eef1f7; border-radius: var(--radius); padding: .8rem; min-height: 200px; }
.col h3 { display: flex; justify-content: space-between; margin: .1rem .2rem .8rem; font-size: .95rem; }
.col h3 span { color: var(--muted); font-weight: 500; }
.tile { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; margin-bottom: .5rem; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.tile:hover { border-color: var(--brand); text-decoration: none; }
.tile small { display: block; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.steps a { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: var(--radius); color: var(--ink2);
  background: linear-gradient(135deg, #eef2ff, #f6f0ff); border: 1px solid #e0e5fb; }
.steps a:hover { text-decoration: none; border-color: #b9c6fb; }
.steps i { font-style: normal; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #5b8cff, #7c4dff); }
.steps b { display: block; color: var(--ink); }
.steps span { font-size: .9rem; }
button.small { padding: .35rem .8rem; font-size: .85rem; border-radius: 8px; }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.callbar { display: flex; gap: .7rem; flex-wrap: wrap; margin: -.4rem 0 1.2rem; }
a.tel { display: inline-flex; align-items: center; gap: .45rem; background: var(--okbg); color: #0b6b49; border: 1px solid #c9ecd9; padding: .5rem .95rem; border-radius: 10px; font-weight: 600; }
a.tel:hover { text-decoration: none; background: #d9f2e6; }
a.tel svg { width: 16px; height: 16px; }
.task { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem .2rem; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task small { display: block; color: var(--muted); margin-top: .15rem; }
.task.late b, .task.late .when { color: var(--bad); }
.task.done { opacity: .55; }
.task .acts { display: flex; gap: .5rem; align-items: center; flex: none; }
.task .acts a.tel { padding: .35rem .7rem; font-size: .85rem; }
.quick { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.3rem 0 .9rem; }
.seg { display: inline-flex; background: #e9ecf4; border-radius: 10px; padding: 3px; }
.seg a { padding: .4rem 1rem; border-radius: 8px; color: var(--ink2); font-weight: 500; }
.seg a.on { background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); color: var(--ink); }
.seg a:hover { text-decoration: none; }
h2.g-late { color: var(--bad); } h2.g-today { color: var(--brand); }
.empty { text-align: center; padding: 2.4rem 1rem; }
.empty svg { width: 42px; height: 42px; color: var(--ok); }
.opts { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; }
.opts form, .addopt { display: flex; gap: .4rem; }
.opts input, .addopt input { flex: 1; min-width: 0; }

.notice { display: flex; gap: .8rem; align-items: flex-start; background: var(--warnbg); border: 1px solid #f3dfb5; color: #6b4a12; padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.2rem; }
.notice svg { color: var(--warn); margin-top: .15rem; }
.notice .pill { background: #fff; margin: .15rem 0; }
.emps { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem; margin-bottom: 1.2rem; }
.emps .card { margin: 0; }
a.card.co { color: var(--ink); } a.card.co:hover { text-decoration: none; border-color: var(--brand); } a.card.co.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 110, 247, .15); }
.emp.off { opacity: .6; }
.emp-head { display: flex; gap: .8rem; align-items: center; }
.emp-head h2 { margin: 0; }
.emp-head .edit { margin-inline-start: auto; font-size: .88rem; }
.avatar.sq { border-radius: 12px; }
.emp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0 .4rem; }
.emp-stats div { background: #f7f8fc; border-radius: 10px; padding: .55rem .6rem; }
.emp-stats b { display: block; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-stats span { color: var(--muted); font-size: .8rem; }
.goal { display: grid; gap: .3rem; margin: .7rem 0 .2rem; font-size: .88rem; color: var(--ink2); }
.goal .track { display: block; height: 8px; background: #eef1f7; border-radius: 99px; overflow: hidden; }
.goal .fill { display: block; height: 100%; background: linear-gradient(90deg, #16a36f, #3ccf91); border-radius: 99px; }
.emp-links { display: flex; gap: 1rem; margin-top: .8rem; font-size: .9rem; }
.camp { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.camp:last-child { border-bottom: 0; }
.camp small { display: block; color: var(--muted); }
.script { white-space: normal; line-height: 1.8; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 1rem; }
form.inline select { min-width: 140px; }
.pay-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.pay-head h2 { margin: 0; }
.pay-total { font-size: 1.6rem; font-weight: 700; color: var(--ok); }
input.hrs { width: 90px; padding: .3rem .5rem; }
.flags { margin: .8rem 0 0; padding: .6rem 1.6rem .6rem .8rem; background: var(--warnbg); border-radius: 10px; color: #6b4a12; font-size: .88rem; }
.pay-foot { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1.1rem; box-shadow: 0 -8px 24px -16px rgba(15, 23, 42, .3); margin-bottom: 1.2rem; }
.pay-foot b { font-size: 1.3rem; }
.card.narrow { max-width: 440px; }
.paid-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: .9rem; color: var(--ink2); font-size: .92rem; }
.paid-row label { display: inline-flex; gap: .4rem; align-items: center; margin: 0 auto 0 0; }
.howto { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: .4rem; color: var(--ink2); }
.months { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 1.2rem; }
.mcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .3rem; min-width: 0; }
.mbar { display: block; width: 100%; max-width: 46px; background: linear-gradient(180deg, #7c9cff, #6a4dff); border-radius: 6px 6px 2px 2px; }
.mval { font-size: .72rem; color: var(--muted); }
.mlab { font-size: .72rem; color: var(--muted); }
.grid-report td, .grid-report th { text-align: center; } .grid-report td:first-child, .grid-report th:first-child { text-align: right; }

/* ---------- Connexion ---------- */
.login-page main.bare { padding: 0; }
.login-wrap { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-brand { position: relative; overflow: hidden; color: #fff; padding: 3rem 3.5rem; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 110% -10%, #3b4fd8 0%, transparent 60%), linear-gradient(160deg, #0b1530 0%, #14205a 55%, #2a1f6e 100%); }
.login-brand::before { content: ""; position: absolute; inset: 0; opacity: .25;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 30%, transparent 75%); }
.glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.glow.g1 { width: 380px; height: 380px; background: #5b8cff; top: -120px; left: -80px; }
.glow.g2 { width: 320px; height: 320px; background: #8f5bff; bottom: -100px; right: 10%; }
.login-brand > :not(.glow) { position: relative; }
.logo.big { font-size: 1.2rem; padding: 0; }
.logo.big .mark svg { width: 40px; height: 40px; }
.pitch { margin: auto 0; max-width: 520px; }
.pitch h2 { font-size: 2.6rem; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin: 0 0 1rem; }
.pitch p { font-size: 1.1rem; color: #c9d3ee; margin: 0 0 1.8rem; font-weight: 300; }
.pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.pitch li { display: flex; gap: .7rem; align-items: center; font-weight: 500; }
.pitch li svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(124, 156, 255, .25); color: #b9c8ff; stroke-width: 2.4; }
.glass { margin-top: 2.4rem; max-width: 460px; border-radius: 18px; padding: 1rem 1.1rem 1.2rem; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); backdrop-filter: blur(10px); transform: perspective(900px) rotateY(-8deg) rotateX(4deg); }
.g-head { display: flex; gap: 6px; margin-bottom: 1rem; }
.g-head span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.g-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; align-items: end; }
.g-chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; }
.g-chart i { flex: 1; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #8fb0ff, #6a4dff); opacity: .9; }
.g-lines { display: grid; gap: 12px; }
.g-lines b { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .18); }
.g-lines b:nth-child(1) { width: 90%; background: rgba(143, 176, 255, .55); } .g-lines b:nth-child(2) { width: 70%; } .g-lines b:nth-child(3) { width: 82%; } .g-lines b:nth-child(4) { width: 55%; }
.brand-foot { color: #8ea0d6; font-size: .85rem; }
.login-form { display: grid; place-items: center; padding: 2rem; background: #fff; }
.login-card { width: 100%; max-width: 420px; }
.login-card h1 { font-size: 1.9rem; font-weight: 700; margin: 0 0 .3rem; letter-spacing: -.01em; }
.login-card .sub { color: var(--muted); margin: 0 0 2rem; }
.field { display: block; margin-bottom: 1.15rem; }
.field > span:first-child { display: block; font-weight: 500; font-size: .92rem; margin-bottom: .4rem; color: var(--ink2); }
.input { position: relative; display: flex; align-items: center; }
.input > svg { position: absolute; right: .9rem; color: #94a3b8; pointer-events: none; }
.input input { width: 100%; padding: .85rem 2.7rem .85rem 2.9rem; border-radius: 12px; background: #f8f9fc; border-color: #e3e7f1; font-size: 1rem; }
.input input:focus { background: #fff; }
.eye { position: absolute; left: .45rem; background: none; color: #94a3b8; padding: .4rem; }
.eye:hover { background: #eef1f7; color: var(--ink2); }
.primary { width: 100%; padding: .9rem; font-size: 1.02rem; border-radius: 12px; margin-top: .4rem;
  background: linear-gradient(90deg, #4f6ef7, #7c4dff); box-shadow: 0 10px 24px -10px rgba(91, 100, 255, .7); }
.primary:hover { background: linear-gradient(90deg, #4361ee, #6f3ff5); }
.alert { display: flex; gap: .55rem; align-items: center; background: var(--badbg); color: #a12f2f; padding: .7rem .9rem; border-radius: 10px; margin-bottom: 1.2rem; font-size: .93rem; }
.secure { display: flex; justify-content: center; gap: .4rem; align-items: center; color: var(--muted); font-size: .85rem; margin-top: 1.4rem; }
.secure svg { width: 15px; height: 15px; }

@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1000px) {
  .grid2, .grid3, .detail { grid-template-columns: 1fr; }
  .funnel { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: static; padding: .8rem; }
  .logo { padding-bottom: .7rem; }
  .side nav { flex-direction: row; overflow-x: auto; }
  .side nav a, .side nav .soon { white-space: nowrap; }
  .side nav .soon { display: none; }
  .me { display: none; }
  .content main { padding: 1.2rem 1rem 3rem; }
  .task { flex-direction: column; align-items: stretch; }
  .task .acts a.tel, .callbar a.tel { flex: 1; justify-content: center; padding: .75rem; font-size: 1rem; }
  .selects { grid-template-columns: 1fr 1fr; }
  .list .hm { display: none; }
  .emp-stats b { font-size: 1rem; }
  .pay-foot { flex-direction: column; align-items: stretch; }
  .mval { display: none; }
  .list small.sm { display: block; color: var(--muted); font-size: .8rem; }
  .list td, .list th { white-space: normal; }
  .list td[dir=ltr] { white-space: nowrap; }
  .side nav { scrollbar-width: none; }
  .side nav::-webkit-scrollbar { display: none; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { padding: 1.6rem 1.4rem 2rem; }
  .pitch { margin: 1.6rem 0 0; }
  .pitch h2 { font-size: 1.8rem; }
  .pitch ul, .brand-foot, .glass { display: none; }
}
.card.assign { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.card.assign small { flex-basis: 100%; }
.seg { flex-wrap: wrap; }
.mailbody { white-space: normal; line-height: 1.7; overflow-wrap: anywhere; max-height: 60vh; overflow: auto; }
details.mail { border-top: 1px solid var(--line); padding: .6rem 0; }
details.mail summary { cursor: pointer; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
details.mail .mailbody { margin-top: .6rem; background: var(--bg); border-radius: 10px; padding: .8rem; }
.task.unread b a { font-weight: 800; }
.task.unread { background: #f3f6ff; }
.or { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .85rem; margin: 1rem 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-btn { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 600; }
.google-btn:hover { text-decoration: none; background: #f8f9fc; }
.google-btn svg { width: 20px; height: 20px; stroke: none; }
/* Kesafim : chaine societe -> centre -> employes, et edition des regles / points */
.kpis.fin .num { font-size: 1.45rem; margin: .3rem 0 .15rem; }
.kpis.fin .num.ok, .emp-stats b.ok, .cum b.ok { color: var(--ok); }
.kpis.fin .num.bad, .emp-stats b.bad, .cum b.bad { color: var(--bad); }
.kpis.fin small { font-size: .8rem; }
.flagtxt { display: block; color: var(--warn); font-size: .8rem; }
.list small.sm { display: block; }
.notice-sm { background: var(--warnbg); color: var(--ink2); border-radius: 10px; padding: .6rem .8rem; font-size: .9rem; margin: .8rem 0; }
.list.chain tr.sum td { border-top: 2px solid var(--line); font-size: 1.05rem; }
.bal .emp-head .edit { margin-inline-start: auto; }
.small-line { font-size: .85rem; margin: .4rem 0 0; }
.cum { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: center; border-top: 1px dashed var(--line); margin-top: .8rem; padding-top: .6rem; font-size: .88rem; color: var(--ink2); }
.points .stepline { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin: .9rem 0 .4rem; font-weight: 500; }
.points .stepline label { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.list.rules input { width: 100%; min-width: 7rem; }
.list.rules input.hrs { min-width: 5rem; }
.list.rules input.mid { min-width: 5.5rem; }
.addcode .check { margin: .6rem 0; }
@media (max-width: 1100px) { .kpis.fin { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .kpis.fin { grid-template-columns: repeat(2, 1fr); } .list.rules input { min-width: 4.5rem; } }
/* Objectifs et simulation */
h2.sec { margin: 1.4rem 0 .7rem; font-size: 1.15rem; }
.goals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.1rem; margin-bottom: 1.2rem; }
.goals-grid .card { margin: 0; }
.goalp { border-top: 1px solid var(--line); margin-top: .9rem; padding-top: .9rem; }
.goalp:first-of-type { border-top: 0; margin-top: .6rem; padding-top: 0; }
.gp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.gp-head small { display: block; }
.gp-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .8rem 0 .3rem; }
.gp-nums div { background: #f7f8fc; border-radius: 10px; padding: .55rem .6rem; }
.gp-nums span { display: block; color: var(--muted); font-size: .8rem; }
.gp-nums b { font-size: 1.15rem; white-space: nowrap; }
.gp-nums b.ok, .sim-ok { color: var(--ok); } .gp-nums b.bad { color: var(--bad); }
details.parts { margin: .5rem 0; font-size: .9rem; }
details.parts summary { cursor: pointer; color: var(--brand); }
details.parts ul { margin: .4rem 0 0; padding-inline-start: 1.1rem; line-height: 1.8; }
.simbox { background: #f3f6ff; border-radius: 12px; padding: .8rem .9rem; margin-top: .7rem; }
.sim-title { font-weight: 600; margin-bottom: .5rem; }
.sim-in { display: flex; flex-wrap: wrap; gap: .6rem; }
.sim-in label { display: grid; gap: .2rem; font-size: .85rem; margin: 0; }
.sim-in input { width: 6rem; }
.sim-out { margin-top: .6rem; min-height: 1.4rem; }
.sim-res b { font-size: 1.25rem; color: var(--brand); }
.sim-gap { color: var(--warn); font-size: .92rem; margin-top: .2rem; }
@media (max-width: 640px) { .goals-grid { grid-template-columns: 1fr; } .gp-nums b { font-size: 1rem; } }
.card .simbox .sim-in label input { display: block; width: 5.5rem; margin-top: .2rem; padding: .35rem .5rem; }
.card .points .stepline label input, .card.points .stepline label input { display: inline-block; width: 90px; margin: 0; }
.ratio td.pct { min-width: 9rem; }
.ratio .bar-in { display: flex; align-items: center; gap: .5rem; }
.ratio .bar-in .track { flex: 1; height: 8px; background: #eef1f7; border-radius: 99px; overflow: hidden; display: block; }
.ratio .bar-in .fill { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand2)); border-radius: 99px; }
.ratio tr.sum td { border-top: 2px solid var(--line); font-weight: 700; background: #f7f8fc; }
.paybook { width: 100%; font-size: .86rem; margin-top: .6rem; border-collapse: collapse; }
.paybook td { padding: .25rem 0; border-bottom: 1px dashed var(--line); }
.paybook td:last-child { text-align: left; white-space: nowrap; font-weight: 600; }
.grid2 > *, .grid3 > * { min-width: 0; }
/* Vente en etapes */
.wizard { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-bottom: 1.1rem; }
.wizard a { display: flex; align-items: center; gap: .55rem; padding: .7rem .8rem; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink2); font-weight: 500; }
.wizard a:hover { text-decoration: none; border-color: #b9c6fb; }
.wizard a i { font-style: normal; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #eef1f7; color: var(--muted); font-weight: 700; font-size: .85rem; }
.wizard a.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 110, 247, .12); color: var(--ink); }
.wizard a.on i { background: linear-gradient(135deg, #5b8cff, #7c4dff); color: #fff; }
.wizard a.ok i { background: var(--okbg); color: var(--ok); }
.wiz-nav { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }
.prog-pick { display: flex; flex-wrap: wrap; gap: .6rem; margin: .4rem 0 1rem; }
.check.big { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .9rem; background: #f7f8fc; font-weight: 600; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.hq { display: grid; grid-template-columns: 1fr auto 1fr; gap: .7rem; align-items: center; padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.hq .seg label { display: inline-flex; gap: .3rem; align-items: center; padding: .3rem .8rem; margin: 0; }
.card.person dl, .card dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; }
button.primary { background: linear-gradient(135deg, #16a36f, #0f9d6b); }
button:disabled { opacity: .5; cursor: not-allowed; }
/* Messagerie, tableaux, messages */
.task small.gist { display: block; color: var(--muted); font-size: .84rem; margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; }
p.gist.big { background: #f3f6ff; border-radius: 10px; padding: .7rem .9rem; }
pre.sumtext { white-space: pre-wrap; font: inherit; font-size: .88rem; background: #f7f8fc; border-radius: 10px; padding: .8rem; max-height: 260px; overflow: auto; }
.notice.announce { background: #eef2ff; border-color: #c9d5ff; color: var(--ink); }
.notice form.inline { display: inline-flex; gap: .4rem; margin-top: .5rem; }
.issue-done input { width: 14rem; padding: .3rem .5rem; }
.board-period { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.board-period input[type=date] { padding: .35rem .5rem; }
td.bad, b.bad { color: var(--bad); }
@media (max-width: 860px) {
  .wizard { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; }
  .wizard a { flex-direction: column; padding: .5rem .2rem; font-size: .75rem; text-align: center; gap: .25rem; }
  .form-grid.three { grid-template-columns: 1fr; }
  .hq { grid-template-columns: 1fr; }
  .issue-done input { width: 100%; }
}
/* Chiffre positif (vert) : pas le cadre du message de confirmation .ok */
.kpi .num.ok, b.ok, div.sim-ok { background: none; padding: 0; border-radius: 0; color: var(--ok); }

/* Presence : pointage, depassements, journal des acces */
.t-red { color: var(--bad); font-weight: 600; }
.t-green { color: var(--ok); font-weight: 600; }
.card.punch { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.card.punch h2 { margin: 0 0 .3rem; }
.card.punch .state { margin: .1rem 0; font-size: 1.05rem; }
.card.punch .state.in { color: var(--ok); font-weight: 600; }
.card.punch .state.out { color: var(--muted); }
button.big { font-size: 1.25rem; padding: 1rem 2.4rem; border-radius: 14px; min-width: 220px; }
button.big.exit { background: var(--bad); }
form.decide { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.settings-row { border-top: 1px solid var(--line); padding: 1rem 0; }
.settings-row .days { margin: .2rem 0 .6rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; }
.settings-row .days label.check { display: inline-flex; margin: 0; }
details summary { cursor: pointer; margin: .8rem 0; font-weight: 600; }
.pager { margin: 1rem 0; }
@media (max-width: 640px) { button.big { width: 100%; } .card.punch form { width: 100%; } }

/* Liste deroulante de recherche d'une personne dans le formulaire de vente */
.finder { position: absolute; min-width: 260px; inset-inline: 0; top: 100%; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 280px; overflow: auto; }
.finder:empty { display: none; }
.finder button { display: block; width: 100%; text-align: start; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .55rem .8rem; color: var(--ink); font: inherit; cursor: pointer; }
.finder button:hover { background: var(--bg); }
.finder .none { padding: .55rem .8rem; color: var(--muted); }
.form-grid.pcrow { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 760px) { .form-grid.pcrow { grid-template-columns: 1fr; } }

/* Tableaux de bord : choix des donnees, capture jointe aux messages (30/10) */
.board-pick summary { cursor: pointer; }
.board-pick .pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .4rem .9rem; margin: .8rem 0; }
.announce-img { display: block; max-width: min(100%, 34rem); max-height: 22rem; margin-top: .5rem; border: 1px solid var(--line, #dde3ee); border-radius: 10px; }
.announce-img.small { max-height: 7rem; }
#announce-form textarea { width: 100%; }
.check.big.best { background: #eef7ec; border-color: #7bb86f; }
.check.big.best small { color: #3d7a32; font-weight: 700; margin-inline-start: .4rem; }
.notice-sm ul { margin: .3rem 0 0; padding-inline-start: 1.2rem; }

/* Page d'une societe : sections repliables et passage vers les employes (30/10) */
details.fold { padding: 0; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0; padding: 1.1rem 1.35rem; font-weight: 400; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2 { margin: 0; }
details.fold > summary::after { content: '\25BE'; color: var(--muted); margin-inline-start: auto; }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold[open] > summary { border-bottom: 1px solid var(--line); }
details.fold > .fold-body { padding: 1rem 1.35rem 1.2rem; }
a.co-link { display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-decoration: none; color: inherit; }
a.co-link h2 { margin: 0; }
.notice-lite { margin: 0 0 1rem; color: var(--ink2); }
.viewas-bar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; background: #1f2a4d; color: #fff; padding: .6rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; position: sticky; top: 0; z-index: 5; }
.viewas-bar svg { width: 1.1rem; height: 1.1rem; vertical-align: -.2rem; stroke: #fff; fill: none; stroke-width: 2; }
.viewas-bar a { color: #cfe0ff; }
.viewas-bar form { margin: 0; margin-inline-start: auto; }
.emp-links form.inline { display: inline-flex; margin: 0; }

.dup-pair h3 { margin: 0 0 .4rem; font-size: 1rem; } .dup-pair dl { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .8rem; margin: 0; }
.dup-pair dt { color: var(--muted); } .dup-pair dd { margin: 0; } .dup-pair .acts { display: flex; gap: .6rem; margin-top: 1rem; } .dup-pair .acts form { margin: 0; }
@media (max-width: 700px) { .dup-pair .grid2 { grid-template-columns: 1fr; } }

/* Courrier : zone d'ecriture (dictee, enregistrement, fichiers), vue conversation, barre d'affichage */
.mc-tools { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin: -.3rem 0 .5rem; }
.mc-tools label.filebtn { margin: 0; cursor: pointer; display: inline-block; padding: .35rem .8rem; font-size: .85rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink2); font-weight: 500; }
.mc-tools button.live { background: var(--badbg); color: var(--bad); border-color: var(--bad); }
.mc-tools button:disabled { opacity: .5; }
.mc-files { display: flex; gap: .35rem; flex-wrap: wrap; }
.mc-files .pill button.x { border: 0; background: transparent; padding: 0 .2rem; cursor: pointer; color: var(--bad); font-size: 1rem; line-height: 1; }
.mc-status { min-height: 1.2rem; margin: .3rem 0 .6rem; font-size: .85rem; }
.viewbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.chatbox { display: flex; flex-direction: column; gap: .45rem; background: #efeae2; border-radius: var(--radius); padding: .9rem; margin-bottom: 1rem; max-height: 65vh; overflow: auto; }
.chat-day, .chat-subj { align-self: center; font-size: .78rem; color: var(--ink2); background: rgba(255, 255, 255, .75); border-radius: 8px; padding: .15rem .7rem; max-width: 90%; text-align: center; overflow-wrap: anywhere; }
.chat-day { font-weight: 600; }
.bub { max-width: 85%; padding: .5rem .8rem .35rem; border-radius: 12px; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); overflow-wrap: anywhere; }
.bub.in { align-self: flex-end; border-top-left-radius: 4px; }
.bub.out { align-self: flex-start; background: #d9fdd3; border-top-right-radius: 4px; }
.bub .bt { line-height: 1.55; }
.bub small { display: block; color: var(--muted); font-size: .75rem; margin-top: .2rem; }
.bub details summary { cursor: pointer; font-size: .8rem; color: var(--ink2); margin-top: .25rem; }
.newtag { color: var(--brand); }
.mc-tools input[type=file] { display: none !important; }

/* Forum */
.side nav .navbadge { margin-inline-start: auto; font-style: normal; font-size: .72rem; font-weight: 700; background: #ff6b6b; color: #fff; border-radius: 99px; min-width: 1.35rem; text-align: center; padding: 0 .4rem; }
.task.unread-thread b a { font-weight: 800; }
.post { padding: .85rem .2rem; border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: 0; }
.post .who { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.post .body { margin-top: .35rem; line-height: 1.7; white-space: normal; }
.post.hidden-post { opacity: .55; }
.post.mine { background: #f7f9ff; }
.chips .pill + .pill { margin-inline-start: .35rem; }

/* ---------- Adhesion publique (join.php) ---------- */
.join-body { background: linear-gradient(160deg, #0b1530 0%, #14205a 60%, #2a1f6e 100%); min-height: 100vh; }
.join-wrap { max-width: 460px; margin: 0 auto; padding: 24px 14px 40px; }
.join-card { background: #fff; border-radius: 18px; padding: 26px 22px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .5); }
.join-card h1 { font-size: 1.5rem; margin: 0 0 .5rem; }
.join-card p { color: var(--ink2); margin: 0 0 .8rem; line-height: 1.6; }
.join-card label { display: block; font-weight: 600; margin: .7rem 0 0; }
.join-card input { display: block; width: 100%; margin-top: .25rem; padding: .75rem .8rem; font: inherit; border: 1px solid var(--line); border-radius: 10px; }
.join-card input:focus { outline: 2px solid var(--brand); border-color: transparent; }
.join-step { display: inline-block; background: #eef2ff; color: var(--brand); font-weight: 700; font-size: .85rem; padding: .15rem .7rem; border-radius: 99px; margin-bottom: .6rem; }
.join-btn { display: block; width: 100%; margin-top: 1.1rem; padding: .85rem 1rem; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff !important; font: inherit; font-weight: 700; text-align: center; cursor: pointer; text-decoration: none !important; }
.join-small { font-size: .85rem; color: var(--muted) !important; }
.join-err { background: var(--badbg); color: var(--bad) !important; border-radius: 10px; padding: .6rem .8rem; font-weight: 600; }
.join-trap { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.join-link { direction: ltr; text-align: left; word-break: break-all; background: var(--bg); border-radius: 8px; padding: .5rem .7rem; font-size: .9rem; }

/* Modeles de mail : choix dans la zone d'ecriture, page de gestion avec apercu */
.mc-tpl { display: flex; gap: .8rem; flex-wrap: wrap; } .mc-tpl label { flex: 1 1 200px; }
.tplcols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; } .tplprev { width: 100%; height: 340px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.tplplain { border: 1px solid var(--line); border-radius: 10px; padding: .9rem; background: #fff; line-height: 1.7; } .tpldel { margin-top: .8rem; }
@media (max-width: 800px) { .tplcols { grid-template-columns: 1fr; } }
