:root { --bg:#06101f; --panel:#0b1c33; --panel2:#102742; --cyan:#30dcff; --text:#eef8ff; --muted:#9db1c5; --line:rgba(92,202,255,.2); --danger:#ff7892; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: Inter, system-ui, sans-serif; line-height: 1.55; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.auth-page { min-height: 100svh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at 50% 10%, #16355c, var(--bg) 50%); }
.auth-card { width: min(480px, 100%); padding: 2rem; background: rgba(9,27,49,.92); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.admin-brand { display: flex; align-items: center; gap: .8rem; }
.admin-brand > span { width: 44px; height: 44px; display: grid; place-items: center; color: var(--cyan); font-weight: 900; border: 1px solid var(--cyan); border-radius: 50%; }
.admin-brand strong, .admin-brand small { display: block; }
.admin-brand small { color: var(--muted); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1; letter-spacing: -.04em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
label { display: grid; gap: .35rem; margin-bottom: .9rem; color: #d6e6f4; font-size: .8rem; font-weight: 700; }
.check-label { grid-template-columns: auto 1fr; align-items: center; justify-content: start; }
.check-label input { width: auto; }
input, textarea { width: 100%; padding: .75rem; color: var(--text); background: #061225; border: 1px solid rgba(130,190,226,.28); border-radius: 9px; }
textarea { resize: vertical; }
button { padding: .7rem 1rem; color: #00121c; background: var(--cyan); border: 1px solid transparent; border-radius: 9px; font-weight: 800; }
.secondary { color: #d9eaf6; background: transparent; border-color: var(--line); }
.danger { margin-top: 1rem; color: #ffd9df; background: rgba(255,72,105,.12); border-color: rgba(255,120,146,.3); }
.notice { padding: .8rem 1rem; border-radius: 10px; }
.notice.success { color: #a6ffd2; background: rgba(58,226,145,.11); border: 1px solid rgba(58,226,145,.22); }
.notice.error { color: #ffc0cb; background: rgba(255,72,105,.11); border: 1px solid rgba(255,72,105,.22); }
.admin-header { position: sticky; top: 0; z-index: 20; min-height: 70px; padding: .75rem max(1rem, calc((100vw - 1400px)/2)); display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: rgba(4,13,27,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.admin-actions { display: flex; align-items: center; gap: 1rem; }
.admin-actions form { margin: 0; }
.admin-actions button { color: #d8e8f5; background: transparent; border-color: var(--line); }
.admin-layout { width: min(1400px, 100%); margin: 0 auto; display: grid; grid-template-columns: 230px 1fr; }
.admin-nav { position: sticky; top: 70px; height: calc(100svh - 70px); padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: .25rem; border-right: 1px solid var(--line); overflow: auto; }
.admin-nav a { padding: .6rem .75rem; color: var(--muted); text-decoration: none; border-radius: 8px; font-size: .84rem; }
.admin-nav a:hover { color: var(--cyan); background: rgba(48,220,255,.06); }
.admin-content { min-width: 0; padding: 2rem clamp(1rem,4vw,3.5rem) 7rem; }
.admin-content section { scroll-margin-top: 90px; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--cyan); font-size: .68rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: .8rem; }
.stat-grid article { padding: 1.2rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.stat-grid strong, .stat-grid span { display: block; }
.stat-grid strong { color: var(--cyan); font-size: 2rem; }
.stat-grid span, .admin-note { color: var(--muted); font-size: .8rem; }
.field-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0 1rem; }
.repeat-list { display: grid; gap: .8rem; margin-bottom: .8rem; }
.repeat-item { padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.repeat-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.repeat-head button { padding: .35rem .55rem; color: #ffc2cc; background: transparent; border-color: rgba(255,120,146,.25); font-size: .7rem; }
.sticky-save { position: sticky; bottom: 1rem; z-index: 10; display: flex; justify-content: flex-end; padding-top: 1rem; }
.sticky-save button { box-shadow: 0 14px 40px rgba(48,220,255,.22); }
.message-list, .backup-list { display: grid; gap: .8rem; }
.message-list article, .backup-list article { padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.message-list article > div, .backup-list article { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.message-list span, .message-list small { color: var(--muted); }
.message-list form, .backup-list form { margin: 0; }
.account-form { max-width: 650px; }
code { color: #b9d9ed; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { position: static; height: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-nav a { white-space: nowrap; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 560px) {
  .admin-header { align-items: flex-start; }
  .admin-actions { flex-direction: column; align-items: flex-end; gap: .3rem; }
  .admin-content { padding-inline: 1rem; }
  .field-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .message-list article > div, .backup-list article { align-items: flex-start; flex-direction: column; }
}

/* V1.4 - Message categories */
.message-kind {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: .25rem .55rem;
  border: 1px solid rgba(48, 220, 255, .28);
  border-radius: 999px;
  color: #7ee9ff !important;
  background: rgba(48, 220, 255, .07);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.message-kind-partenariat {
  color: #d1c2ff !important;
  border-color: rgba(161, 128, 255, .32);
  background: rgba(161, 128, 255, .08);
}
.message-kind-renseignement {
  color: #b9d7eb !important;
  border-color: rgba(185, 215, 235, .25);
  background: rgba(185, 215, 235, .06);
}
.message-subject {
  display: block;
  margin-top: .8rem;
  font-size: 1rem;
}
