:root {
  --navy: #0f2a4a;
  --navy-2: #1b3d66;
  --gold: #f2b84b;
  --gold-soft: #fff4e0;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #5d6b7a;
  --line: #e2e8f0;
  --red: #b42318;
  --red-soft: #fdecea;
  --orange: #b54708;
  --orange-soft: #fff1e0;
  --green: #067647;
  --green-soft: #e7f6ee;
  --grey-soft: #eef1f5;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--navy-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- en-tête ---------- */
.topbar { background: var(--navy); color: #fff; }
.topbar .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.35rem; letter-spacing: .2px; display: flex; align-items: center; }
.brand span { color: var(--gold); }
.brand img { width: 28px; height: 28px; margin-right: 10px; }
.topbar nav { margin-left: auto; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.topbar nav a { color: #dfe7f1; text-decoration: none; font-size: .95rem; }
.topbar nav a:hover { color: #fff; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 8px; padding: 10px 18px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--navy); color: #fff;
}
.btn:hover { background: var(--navy-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.gold:hover { background: #f5c56c; }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn.ghost:hover { background: var(--grey-soft); }
.topbar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.topbar .btn.ghost:hover { background: rgba(255,255,255,.08); }
.btn.danger { background: var(--red); }
.btn.small { padding: 6px 12px; font-size: .875rem; }
.btn.link { background: none; color: var(--navy-2); padding: 0; border: 0; text-decoration: underline; font-weight: 500; }

/* ---------- vitrine ---------- */
.hero { background: linear-gradient(160deg, var(--navy) 0%, #183a63 100%); color: #fff; padding: 72px 0 84px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: #d4deea; max-width: 34em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.hero-card { background: #fff; color: var(--text); border-radius: 14px; padding: 20px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.hero-card .row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hero-card .row:last-child { border-bottom: 0; }
.hero-card .row strong { display: block; }
.section { padding: 72px 0; }
.section.alt { background: #fff; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .num { width: 34px; height: 34px; border-radius: 50%; background: var(--gold-soft); color: var(--navy); font-weight: 800; display: grid; place-items: center; margin-bottom: 12px; }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 30px; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; }
.plan.best { border: 2px solid var(--gold); box-shadow: var(--shadow); }
.plan .price { font-size: 2.4rem; font-weight: 800; color: var(--navy); margin: 8px 0 0; }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan ul { padding-left: 1.2em; margin: 16px 0 22px; flex: 1; }
.plan li { margin: 6px 0; }
.badge-best { align-self: flex-start; background: var(--gold); color: var(--navy); font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: .05em; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.ref-banner { background: var(--gold-soft); border: 1px solid #f3d9a4; color: var(--navy); padding: 12px 16px; border-radius: 8px; margin-top: 20px; }
footer.site { background: var(--navy); color: #c2cfdd; padding: 36px 0; font-size: .9rem; }
footer.site a { color: #c2cfdd; }
footer.site .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
footer.site nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- formulaires ---------- */
label { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 6px; }
input[type=text], input[type=email], input[type=search], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1px solid #cfd8e3; border-radius: 8px; padding: 10px 12px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--navy-2); }
.field { margin-bottom: 16px; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.msg { padding: 10px 14px; border-radius: 8px; margin: 12px 0; font-size: .95rem; }
.msg.ok { background: var(--green-soft); color: var(--green); }
.msg.err { background: var(--red-soft); color: var(--red); }
.msg.info { background: var(--gold-soft); color: #6b4b0f; }

/* ---------- connexion ---------- */
.auth-box { max-width: 440px; margin: 64px auto; background: #fff; border-radius: 14px; padding: 32px; box-shadow: var(--shadow); }

/* ---------- application ---------- */
.app-shell { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 64px); }
.side { background: #fff; border-right: 1px solid var(--line); padding: 20px 12px; }
.side a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; margin-bottom: 2px; }
.side a:hover { background: var(--grey-soft); }
.side a.active { background: var(--navy); color: #fff; }
.side .count { background: var(--red); color: #fff; border-radius: 99px; font-size: .75rem; padding: 1px 8px; font-weight: 700; }
.main { padding: 28px clamp(16px, 3vw, 36px); min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.card h2 { font-size: 1.25rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input[type=search] { max-width: 320px; }
.toolbar .grow { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font-size: 1.7rem; color: var(--navy); }
.stat span { color: var(--muted); font-size: .9rem; }
table.list { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.list th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:hover td { background: #fafbfc; }
.table-wrap { overflow-x: auto; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pill.critique { background: var(--red-soft); color: var(--red); }
.pill.important { background: var(--orange-soft); color: var(--orange); }
.pill.info, .pill.grey { background: var(--grey-soft); color: #475467; }
.pill.ok { background: var(--green-soft); color: var(--green); }
.alert-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; background: #fff; }
.alert-item.unread { border-left: 4px solid var(--gold); }
.alert-item .head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.alert-item h3 { margin: 8px 0 4px; }
.alert-item .deadline { background: var(--gold-soft); border-left: 4px solid var(--gold); padding: 10px 12px; margin-top: 10px; border-radius: 4px; font-size: .94rem; }
.alert-item .deadline.past { background: var(--grey-soft); border-left-color: #98a2b3; }
.alert-item .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.prefs fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 16px; }
.prefs legend { font-weight: 700; padding: 0 6px; }
.prefs .check { margin: 10px 0; }
.preview-lock { text-align: center; padding: 36px 20px; }
.preview-lock .big { font-size: 3rem; font-weight: 800; color: var(--red); }
.plan-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0; }
.plan-pick .plan { padding: 20px; }
.plan-pick .plan.current { border: 2px solid var(--green); }
.plan-pick .plan .price { font-size: 1.7rem; }
.dropzone { border: 2px dashed #c7d2df; border-radius: var(--radius); padding: 26px; text-align: center; background: #fafbfc; }
.dropzone.drag { border-color: var(--gold); background: var(--gold-soft); }
.reps { font-size: .85rem; color: var(--muted); }
.code-box { font-family: ui-monospace, Consolas, monospace; font-size: 1.4rem; font-weight: 800; letter-spacing: .12em; background: var(--grey-soft); padding: 8px 14px; border-radius: 8px; display: inline-block; }
.legal { max-width: 860px; margin: 40px auto; background: #fff; padding: 36px clamp(18px, 4vw, 48px); border-radius: 14px; box-shadow: var(--shadow); }
.legal h2 { font-size: 1.25rem; margin-top: 1.6em; }
.todo { background: #fff3cd; padding: 0 4px; border-radius: 3px; }

@media (max-width: 900px) {
  .hero .wrap, .grid3, .grid2, .pricing, .plan-pick { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .app-shell { grid-template-columns: 1fr; }
  .side { display: flex; overflow-x: auto; gap: 4px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side a { white-space: nowrap; margin: 0; }
  .topbar nav { gap: 12px; }
  .hide-mobile { display: none; }
}
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.08); }
.hero .muted { color: #b8c6d6; }
.toolbar select, .toolbar input[type=text], .toolbar input[type=search] { width: auto; min-width: 200px; }
.toolbar .check { margin: 0; }
