/* ==========================================================
   GS André Breton - Design system (couleurs issues du logo)
   ========================================================== */
:root {
  --primary: #1a6498;
  --primary-600: #165581;
  --primary-700: #124c78;
  --navy: #0e3556;
  --navy-2: #0a2740;
  --tint: #eaf2f9;
  --tint-2: #f3f8fc;
  --gold: #c8963e;
  --gold-tint: #fbf3e4;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #14283d;
  --muted: #5d7189;
  --line: #e2eaf2;
  --ok: #1d8a5a;
  --ok-tint: #e5f6ee;
  --warn: #b7791f;
  --warn-tint: #fff4dc;
  --danger: #c23a3a;
  --danger-tint: #fdeaea;
  --info-tint: #e6f1fb;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(14, 53, 86, .06), 0 8px 24px rgba(14, 53, 86, .06);
  --shadow-lg: 0 20px 50px rgba(14, 53, 86, .18);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14px/1.5 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3, h4 {
  margin: 0;
  color: var(--navy);
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  letter-spacing: -.01em;
}
h1 { font-size: 26px; line-height: 1.2; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
h4 { font-size: 14.5px; font-family: inherit; font-weight: 650; }
p { margin: 0; }
a { color: var(--primary); }
button { font: inherit; }
.ic { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.xs { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.col { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Layout application web ---------- */
.app { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow: auto;
  background: linear-gradient(180deg, var(--navy), var(--navy-2));
  color: #cfe0ef; padding: 18px 14px; display: flex; flex-direction: column; gap: 14px;
}
.brand {
  display: flex; gap: 12px; align-items: center; color: #fff; text-decoration: none;
  padding: 2px 6px 16px; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.brand b { display: block; font-family: "Source Serif 4", Georgia, serif; font-size: 15.5px; line-height: 1.2; }
.brand small { color: #9fbcd6; font-size: 12px; }
.logo-mark { width: 46px; height: 46px; border-radius: 12px; background: #f8f8f8; overflow: hidden; position: relative; flex: none; }
.logo-mark img { position: absolute; width: 135%; left: -17.5%; top: -3%; max-width: none; }
.logo-mark.lg { width: 84px; height: 84px; border-radius: 20px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7fa0bf; margin: 8px 10px 2px; }
.nav a {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px;
  color: #bcd2e6; text-decoration: none; font-weight: 500; transition: .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.active { background: #fff; color: var(--navy); font-weight: 650; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.nav a .pill { margin-left: auto; background: var(--gold); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.side-card { margin-top: auto; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 12px; font-size: 12.5px; color: #cfe0ef; }
.side-card b { color: #fff; }
.user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.user b { display: block; color: #fff; font-size: 13px; line-height: 1.2; }
.user small { color: #9fbcd6; font-size: 11.5px; }
.user button { margin-left: auto; background: none; border: 0; color: #9fbcd6; cursor: pointer; padding: 4px; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); padding: 12px 28px;
}
.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 7px; cursor: pointer; color: var(--navy); }
.search { flex: 1; max-width: 460px; position: relative; }
.search input { width: 100%; padding: 10px 12px 10px 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--tint-2); font: inherit; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--navy); cursor: pointer; }
.icon-btn:hover { background: var(--tint); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
.content { padding: 26px 28px 20px; flex: 1; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.proto-nav { display: flex; justify-content: space-between; gap: 10px; padding: 14px 28px 24px; }
.proto-nav a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 13px; color: var(--muted); padding: 8px 12px; border-radius: 10px; border: 1px dashed #c7d6e4; background: #fff; }
.proto-nav a:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- Composants ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card.flat { box-shadow: none; }
.card.tint { background: var(--tint-2); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 16px; }
.card-head .link { font-size: 13px; text-decoration: none; font-weight: 600; }
.g2, .g3, .g4, .g-main { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-main.even { grid-template-columns: 1fr 1fr; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.kpi { display: flex; gap: 14px; align-items: center; }
.kpi .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--tint); color: var(--primary); flex: none; }
.kpi .ico.gold { background: var(--gold-tint); color: var(--gold); }
.kpi .ico.green { background: var(--ok-tint); color: var(--ok); }
.kpi .ico.red { background: var(--danger-tint); color: var(--danger); }
.kpi .lbl { color: var(--muted); font-size: 12.5px; }
.kpi .val { font-family: "Source Serif 4", Georgia, serif; font-size: 27px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.kpi .val small { font-size: 14px; color: var(--muted); font-weight: 500; font-family: "Inter", sans-serif; }
.delta { font-size: 12px; font-weight: 600; }
.delta.up { color: var(--ok); } .delta.down { color: var(--danger); }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 9px 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: .15s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 14px rgba(26, 100, 152, .25); }
.btn-primary:hover { background: var(--primary-700); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--navy); }
.btn-ghost:hover { background: var(--tint); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-danger { background: var(--danger-tint); color: var(--danger); }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }

.tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.ok { background: var(--ok-tint); color: var(--ok); }
.tag.warn { background: var(--warn-tint); color: var(--warn); }
.tag.danger { background: var(--danger-tint); color: var(--danger); }
.tag.info { background: var(--info-tint); color: var(--primary); }
.tag.gray { background: #eef2f6; color: #52657a; }
.tag.gold { background: var(--gold-tint); color: #92661a; }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }

.seg { display: inline-flex; background: #eaf0f6; border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.seg button.active { background: #fff; color: var(--navy); box-shadow: 0 2px 6px rgba(14, 53, 86, .12); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow: auto; }
.tabs button { background: none; border: 0; padding: 10px 2px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-color: var(--primary); }
[data-panel] { display: none; }
[data-panel].active { display: block; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink); }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.progress { height: 8px; border-radius: 999px; background: #e6eef6; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #3f95cf); }
.progress.ok > span { background: linear-gradient(90deg, #1d8a5a, #43b684); }
.progress.warn > span { background: linear-gradient(90deg, #d69a2d, #efc35f); }
.progress.danger > span { background: linear-gradient(90deg, #c23a3a, #e56c6c); }

.alert { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; border: 1px solid; }
.alert.warn { background: var(--warn-tint); border-color: #f0d9a3; color: #7a5412; }
.alert.danger { background: var(--danger-tint); border-color: #f0bcbc; color: #8e2a2a; }
.alert.info { background: var(--info-tint); border-color: #bcd8f0; color: #134d78; }
.alert.ok { background: var(--ok-tint); border-color: #b6e3cd; color: #146841; }
.alert b { display: block; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; background: var(--tint-2); color: #4a6078; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid #edf2f7; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfe; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.note-pill { display: inline-block; min-width: 46px; text-align: center; padding: 3px 8px; border-radius: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.note-pill.hi { background: var(--ok-tint); color: var(--ok); }
.note-pill.mid { background: var(--info-tint); color: var(--primary); }
.note-pill.lo { background: var(--danger-tint); color: var(--danger); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 13px; color: var(--navy); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border: 1px solid #cddbe8; border-radius: 10px; background: #fff; font: inherit; color: var(--ink);
}
.input:focus { outline: 2px solid rgba(26, 100, 152, .25); border-color: var(--primary); }
textarea.input { min-height: 96px; resize: vertical; }
.input-icon { position: relative; }
.input-icon .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .input { padding-left: 38px; }

.tl { position: relative; padding-left: 4px; }
.tl-item { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.tl-item:not(:last-child)::after { content: ""; position: absolute; left: 49px; top: 36px; bottom: -6px; border-left: 2px dashed #d3e0ec; }
.tl-time { width: 44px; font-weight: 700; color: var(--navy); font-size: 13px; text-align: right; flex: none; padding-top: 2px; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--primary)); margin-top: 6px; flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--primary)) 18%, white); z-index: 1; }
.tl-body b { display: block; }
.tl-item.now .tl-body { background: var(--tint); border-radius: 10px; padding: 6px 10px; margin: -4px 0; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #edf2f7; }
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.list-item:first-child { padding-top: 0; }
.ico-sq { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--primary); flex: none; }
.ico-sq.gold { background: var(--gold-tint); color: var(--gold); }
.ico-sq.green { background: var(--ok-tint); color: var(--ok); }
.ico-sq.red { background: var(--danger-tint); color: var(--danger); }

.subj { --c: var(--primary); display: block; background: color-mix(in srgb, var(--c) 11%, white); background: #eef4fa; background: color-mix(in srgb, var(--c) 11%, white); border-left: 3px solid var(--c); border-radius: 8px; padding: 6px 8px; height: 100%; }
.subj b { display: block; color: color-mix(in srgb, var(--c) 85%, black); font-size: 12.5px; line-height: 1.25; }
.subj small { color: var(--muted); font-size: 11px; }
.subj.exam { border: 1.5px solid var(--danger); border-left-width: 4px; background: var(--danger-tint); }
.dot-c { width: 10px; height: 10px; border-radius: 3px; background: var(--c); display: inline-block; }

.timetable { display: grid; grid-template-columns: 76px repeat(6, minmax(112px, 1fr)); gap: 6px; min-width: 860px; }
.tt-h { text-align: center; font-weight: 650; color: var(--navy); padding: 8px 0; border-radius: 10px; background: var(--tint-2); }
.tt-h small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.tt-h.today { background: var(--navy); color: #fff; }
.tt-h.today small { color: #b9d2e8; }
.tt-time { font-size: 11.5px; color: var(--muted); text-align: right; padding-right: 8px; padding-top: 6px; line-height: 1.3; }
.tt-cell { min-height: 62px; }
.tt-empty { height: 100%; border: 1px dashed #dbe6f0; border-radius: 8px; display: grid; place-items: center; color: #a6b7c8; font-size: 11.5px; }
.tt-break { grid-column: 1 / -1; text-align: center; font-size: 11.5px; color: var(--muted); background: repeating-linear-gradient(90deg, #f1f5f9, #f1f5f9 8px, #f8fafc 8px, #f8fafc 16px); border-radius: 6px; padding: 3px; }

.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr) 260px; height: 640px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.chat-list { border-right: 1px solid var(--line); overflow: auto; }
.chat-list .search { max-width: none; padding: 12px; }
.chat-list .search .ic { left: 24px; }
.conv { display: flex; gap: 10px; padding: 12px 14px; cursor: pointer; border-left: 3px solid transparent; }
.conv:hover { background: var(--tint-2); }
.conv.active { background: var(--tint); border-left-color: var(--primary); }
.conv .meta { display: flex; justify-content: space-between; gap: 8px; }
.conv .prev { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.conv .unread { background: var(--primary); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-top { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.chat-body { flex: 1; overflow: auto; padding: 18px; background: var(--tint-2); display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 70%; padding: 10px 13px; border-radius: 14px 14px 14px 4px; background: #fff; border: 1px solid var(--line); }
.bubble.me { align-self: flex-end; background: var(--primary); color: #fff; border-color: var(--primary); border-radius: 14px 14px 4px 14px; }
.bubble small { display: block; margin-top: 4px; opacity: .65; font-size: 11px; }
.bubble.file { display: flex; gap: 10px; align-items: center; }
.day-sep { align-self: center; font-size: 11.5px; color: var(--muted); background: #e6eef6; padding: 2px 10px; border-radius: 999px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; }
.chat-side { border-left: 1px solid var(--line); padding: 18px; overflow: auto; }

.modal-back { position: fixed; inset: 0; background: rgba(10, 39, 64, .55); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-back.open { display: flex; }
.modal { background: #fff; border-radius: 18px; width: min(560px, 100%); max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--tint-2); }
.radio-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; margin-bottom: 8px; }
.radio-card.active { border-color: var(--primary); background: var(--tint); }
.radio-card .dotr { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #b6c7d8; margin-left: auto; }
.radio-card.active .dotr { border: 5px solid var(--primary); }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 200; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: .25s; pointer-events: none; display: flex; align-items: center; gap: 10px; max-width: 360px; }
.toast.show { opacity: 1; transform: none; }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; margin-bottom: 8px; }
.check .box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #b6c7d8; display: grid; place-items: center; color: transparent; flex: none; margin-top: 1px; }
.check.done { background: var(--ok-tint); border-color: #b6e3cd; }
.check.done .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.check.done .t { text-decoration: line-through; color: var(--muted); }

.att { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.att button { border: 0; background: #fff; padding: 6px 12px; font-weight: 700; cursor: pointer; color: var(--muted); border-right: 1px solid var(--line); }
.att button:last-child { border-right: 0; }
.att button.on[data-v="P"] { background: var(--ok); color: #fff; }
.att button.on[data-v="R"] { background: var(--gold); color: #fff; }
.att button.on[data-v="A"] { background: var(--danger); color: #fff; }
input.grade { width: 72px; text-align: center; padding: 6px; border: 1px solid #cddbe8; border-radius: 8px; font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; }
input.grade:focus { outline: 2px solid rgba(26, 100, 152, .3); }
input.grade.lo { color: var(--danger); border-color: #efb3b3; background: var(--danger-tint); }

.chart text { font-family: "Inter", sans-serif; fill: #6b7e94; font-size: 11px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 52px; gap: 10px; align-items: center; margin: 10px 0; font-size: 13px; }
.hbar .track { position: relative; height: 10px; background: #e8eff6; border-radius: 999px; }
.hbar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--primary); }
.hbar .mark { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--gold); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid span { padding: 8px 0; border-radius: 8px; font-size: 13px; }
.cal-grid .h { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.cal-grid .ev { background: var(--tint); font-weight: 700; color: var(--primary); }
.cal-grid .ex { background: var(--danger-tint); font-weight: 700; color: var(--danger); }
.cal-grid .td { background: var(--navy); color: #fff; font-weight: 700; }
.cal-grid .off { color: #b4c3d2; }

.doc { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.doc + .doc { margin-top: 8px; }
.doc .grow b { display: block; }
.news { padding: 16px 0; border-bottom: 1px solid #edf2f7; }
.news:first-child { padding-top: 0; }
.news:last-child { border-bottom: 0; padding-bottom: 0; }
.stat-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #e0e9f2; }
.stat-row:last-child { border-bottom: 0; }
.hero { background: linear-gradient(120deg, var(--navy), var(--primary)); color: #fff; border-radius: var(--radius); padding: 22px 26px; position: relative; overflow: hidden; }
.hero h2 { color: #fff; font-size: 23px; }
.hero p { color: #cfe3f3; margin-top: 4px; }
.hero::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .07); }

/* ---------- Page de connexion ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-hero { background: linear-gradient(160deg, var(--navy-2), var(--primary-700) 60%, var(--primary)); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-hero::before { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .05); }
.login-hero h1 { color: #fff; font-size: 38px; max-width: 520px; line-height: 1.15; }
.login-hero p.lead { color: #cfe3f3; font-size: 16px; max-width: 480px; margin-top: 14px; }
.feat { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; max-width: 480px; }
.feat .ico-sq { background: rgba(255, 255, 255, .12); color: #fff; }
.feat b { display: block; color: #fff; }
.feat span { color: #b9d2e8; font-size: 13px; }
.login-form-wrap { display: grid; place-items: center; padding: 32px; background: #fff; }
.login-box { width: min(420px, 100%); }
.role-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 20px; }
.role-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 4px; cursor: pointer; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.role-btn.active { border-color: var(--primary); background: var(--tint); color: var(--primary); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Page d'accueil des maquettes ---------- */
.home-hero { background: linear-gradient(150deg, var(--navy-2), var(--primary-700) 70%, var(--primary)); color: #fff; padding: 56px 24px 90px; text-align: center; }
.home-hero h1 { color: #fff; font-size: 40px; margin-top: 18px; }
.home-hero p { color: #cfe3f3; max-width: 640px; margin: 12px auto 0; font-size: 16px; }
.home-wrap { max-width: 1180px; margin: -56px auto 40px; padding: 0 24px; }
.role-block { margin-bottom: 26px; }
.role-block h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.screen-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); transition: .15s; }
.screen-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.screen-card b { color: var(--navy); }
.screen-card span { color: var(--muted); font-size: 13px; }

/* ---------- Mobile (cadre téléphone) ---------- */
.mobile-body { background: radial-gradient(900px 500px at 15% 0, #dcebf7, transparent 60%), radial-gradient(700px 500px at 100% 100%, #f7ead2, transparent 55%), var(--bg); min-height: 100vh; }
.proto-top { display: flex; align-items: center; gap: 14px; padding: 14px 28px; }
.proto-top .grow b { font-family: "Source Serif 4", Georgia, serif; font-size: 18px; color: var(--navy); }
.stage { display: flex; justify-content: center; align-items: flex-start; gap: 36px; padding: 8px 20px 30px; flex-wrap: wrap; }
.phone { width: 392px; height: 820px; border-radius: 48px; background: #0b1b2b; padding: 11px; box-shadow: var(--shadow-lg), inset 0 0 0 2px #27425d; flex: none; }
.phone-inner { position: relative; width: 100%; height: 100%; border-radius: 38px; background: #f5f8fc; overflow: hidden; display: flex; flex-direction: column; }
.statusbar { height: 44px; padding: 14px 24px 0; display: flex; justify-content: space-between; font-weight: 700; font-size: 13px; color: var(--navy); flex: none; }
.statusbar.light { color: #fff; }
.notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 104px; height: 26px; background: #0b1b2b; border-radius: 20px; z-index: 5; }
.screen { flex: 1; overflow: auto; padding: 0 16px 18px; scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }
.tabbar { display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); padding: 8px 4px 18px; flex: none; }
.tabbar a, .tabbar button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: #8195aa; text-decoration: none; cursor: pointer; }
.tabbar .active { color: var(--primary); }
.tabbar .active .ic { stroke-width: 2.3; }
.m-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 12px; }
.m-head h2 { font-size: 21px; }
.m-head .back { width: 36px; height: 36px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--navy); text-decoration: none; margin-right: 10px; }
.m-hero { background: linear-gradient(135deg, var(--navy), var(--primary)); color: #fff; border-radius: 20px; padding: 16px; box-shadow: 0 12px 24px rgba(14, 53, 86, .25); }
.m-hero small { color: #b9d2e8; }
.m-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: 0 1px 2px rgba(14, 53, 86, .05); }
.m-card + .m-card, .m-card + .m-sec, .m-sec + .m-card { margin-top: 12px; }
.m-sec { display: flex; justify-content: space-between; align-items: center; margin: 18px 2px 10px; }
.m-sec h4 { font-size: 15px; color: var(--navy); }
.m-sec a { font-size: 12.5px; text-decoration: none; font-weight: 600; }
.m-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.m-stat .lbl { color: var(--muted); font-size: 11.5px; }
.m-stat .val { font-family: "Source Serif 4", Georgia, serif; font-size: 22px; font-weight: 700; color: var(--navy); }
.days { display: flex; gap: 8px; overflow: auto; padding-bottom: 4px; scrollbar-width: none; }
.day { flex: 1; min-width: 46px; text-align: center; padding: 8px 0; border-radius: 14px; background: #fff; border: 1px solid var(--line); cursor: pointer; }
.day small { display: block; color: var(--muted); font-size: 11px; }
.day b { font-size: 16px; color: var(--navy); }
.day.active { background: var(--navy); border-color: var(--navy); }
.day.active small { color: #b9d2e8; } .day.active b { color: #fff; }
.sheet-back { position: absolute; inset: 0; background: rgba(10, 39, 64, .5); display: none; z-index: 30; align-items: flex-end; }
.sheet-back.open { display: flex; }
.sheet { width: 100%; background: #fff; border-radius: 24px 24px 0 0; padding: 12px 16px 24px; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: #d0dbe6; margin: 0 auto 14px; }
.sheet a { display: flex; gap: 12px; align-items: center; padding: 12px 6px; text-decoration: none; color: var(--ink); font-weight: 600; border-bottom: 1px solid #edf2f7; }
.sheet a:last-child { border: 0; }
.notes-panel { width: 340px; flex: none; }
.notes-panel ul { padding-left: 18px; margin: 10px 0 0; color: var(--muted); }
.notes-panel li { margin: 6px 0; }
.splash { background: linear-gradient(170deg, var(--navy-2), var(--primary)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; height: 100%; padding: 30px; gap: 14px; }
.splash h2 { color: #fff; font-size: 26px; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g-main, .g3 { grid-template-columns: 1fr; }
  .chat { grid-template-columns: 260px 1fr; }
  .chat-side { display: none; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: .25s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .burger { display: inline-grid; }
  .topbar, .content, .proto-nav { padding-left: 16px; padding-right: 16px; }
  .login { grid-template-columns: 1fr; }
  .login-hero { display: none; }
}
@media (max-width: 640px) {
  .g2, .g4 { grid-template-columns: 1fr; }
  .chat { grid-template-columns: 1fr; height: auto; }
  .chat-list { display: none; }
  .search { display: none; }
  .hbar { grid-template-columns: 90px 1fr 48px; }
}
