/* PLANIPRO ? Design system (brief UI/UX) */

:root {
  --primary: #3B82F6;
  --primary-hover: #60A5FA;
  --primary-soft: rgba(59, 130, 246, 0.22);
  --primary-mid: #60A5FA;
  --night: #040b16;
  --night-2: #06101f;
  --night-3: #0a1628;
  --night-ink: #9fb0cc;
  --white: #0f1f38;
  --surface: #0a1628;
  --surface-2: #12253f;
  --bg: #06101f;
  --ink: #c7d2e5;
  --ink-strong: #e8eef8;
  --mute: #8fa3c0;
  --line: rgba(148, 163, 184, 0.2);
  --success: #22C55E;
  --success-soft: rgba(34, 197, 94, 0.18);
  --warning: #F59E0B;
  --warning-soft: rgba(245, 158, 11, 0.18);
  --danger: #EF4444;
  --danger-soft: rgba(239, 68, 68, 0.18);
  --info: #3B82F6;
  --info-soft: rgba(59, 130, 246, 0.22);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.42);
  --sidebar: 268px;
  --font: "Poppins", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 10% -8%, rgba(30, 64, 120, 0.38), transparent 55%),
    linear-gradient(180deg, #040b16 0%, #06101f 48%, #0a1628 100%);
  background-attachment: fixed;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
body.sidebar-open { overflow: hidden; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-hover); }
button, input, select, textarea { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font);
  color: var(--ink-strong);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ========== LANDING ========== */
.lp { background: var(--bg); color: var(--ink); }
.lp-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem;
  padding: .85rem clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(90deg, #0a1628 0%, #12253f 55%, #1a3358 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 28px rgba(10, 22, 40, 0.28);
}
.lp-top .lp-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #fff;
  border-radius: 50%;
  padding: 3px;
  width: 52px;
  height: 52px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.lp-top .lp-logo::before { display: none; content: none; }
.lp-top .lp-nav > a:not(.btn) {
  color: #fff;
  padding: .45rem .7rem;
  border-radius: 10px;
  transition: background .2s, color .2s;
  font-weight: 500;
}
.lp-top .lp-nav > a:not(.btn):hover {
  color: #fff;
  background: rgba(59, 130, 246, 0.22);
}
.lp-top .btn-primary {
  background: #fff;
  color: #0a1628 !important;
  border: 1px solid #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  font-weight: 700;
}
.lp-top .btn-primary:hover {
  background: #dbeafe;
  color: #0a1628 !important;
  border-color: #dbeafe;
  filter: none;
  transform: translateY(-2px);
}
.lp-top .lp-nav__login {
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  font-weight: 600;
}
.lp-top .lp-nav__login:hover {
  background: #fff;
  color: #0a1628 !important;
  border-color: #fff;
  transform: translateY(-2px);
}
.lp-top.is-scrolled {
  background: linear-gradient(90deg, #07101c 0%, #0f1f38 55%, #163056 100%);
  box-shadow: 0 12px 32px rgba(10, 22, 40, 0.4);
}
.lp-logo {
  font-weight: 700; font-size: 1.2rem; color: var(--primary);
  text-decoration: none; letter-spacing: -0.03em;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.lp-logo:hover { transform: translateY(-1px); }

.brand-logo {
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  background: #fff;
}
.brand-logo--nav {
  width: 46px;
  height: 46px;
}
.brand-logo--sidebar {
  width: 56px;
  height: 56px;
}
.brand-logo--auth {
  width: 128px;
  height: 128px;
  margin: 0 auto .85rem;
  box-shadow: 0 10px 28px rgba(10, 22, 40, 0.12);
}
.brand-logo--foot {
  width: 72px;
  height: 72px;
  padding: 0;
  margin-bottom: .75rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  padding: 3px;
  width: 62px;
  height: 62px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition: transform .25s var(--ease);
  overflow: hidden;
  flex-shrink: 0;
}
.brand-link:hover { transform: translateY(-1px); }
.lp-nav { display: flex; align-items: center; gap: .35rem; }
.lp-nav a { color: var(--ink); font-weight: 500; font-size: .92rem; text-decoration: none; }
.lp-nav a:hover { color: var(--primary); }
.lp-burger {
  display: none;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 10px;
  padding: .5rem .8rem;
  font-weight: 600;
  cursor: pointer;
}

.lp-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: 0;
  max-width: none;
  margin: 0;
  overflow: hidden;
  color: #fff;
}
.lp-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.lp-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s var(--ease), transform 3.2s ease-out;
  z-index: 0;
}
.lp-hero__img.is-active {
  opacity: 1;
  transform: scale(1.12);
  z-index: 1;
  animation: none;
}
.lp-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(10, 22, 40, 0.55) 0%, rgba(10, 22, 40, 0.35) 40%, rgba(10, 22, 40, 0.78) 100%),
    linear-gradient(90deg, rgba(10, 22, 40, 0.55) 0%, transparent 55%);
}
.lp-hero__dots {
  position: absolute;
  right: clamp(1rem, 3vw, 2rem);
  bottom: 5.5rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.lp-hero__dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: background .25s, transform .25s, height .25s;
}
.lp-hero__dots button.is-active {
  background: #fff;
  height: 28px;
}
.lp-hero__content {
  position: relative;
  z-index: 1;
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 7rem clamp(1.25rem, 4vw, 3rem) 5.5rem;
}
.lp-hero__logo {
  display: block;
  width: min(160px, 42vw);
  height: min(160px, 42vw);
  margin: 0 0 1.1rem;
  background: #fff;
  border-radius: 50%;
  padding: 6px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}
.lp-hero h1 {
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  line-height: 1.25;
  margin: 0 0 .85rem;
  max-width: 18ch;
  color: #fff;
  font-weight: 600;
}
.lp-hero__lead {
  color: rgba(255,255,255,.86);
  font-size: 1.08rem;
  max-width: 38ch;
  margin: 0 0 1.75rem;
  line-height: 1.55;
}
.lp-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-lg { padding: .85rem 1.4rem; font-size: .95rem; }
.btn-ghost-light {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(8px);
}
.btn-ghost-light:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
}
.lp-hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 2;
  width: 28px;
  height: 44px;
  border: 2px solid rgba(255,255,255,.45);
  border-radius: 16px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
}
.lp-hero__scroll span {
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: #fff;
  animation: lpScrollDot 1.6s var(--ease) infinite;
}

.lp-showcase {
  padding: 5rem 0 2rem;
  background:
    radial-gradient(700px 320px at 10% 0%, rgba(37, 99, 235, 0.08), transparent 60%),
    var(--bg);
}
.lp-showcase__inner {
  width: min(100%, 1120px);
  margin: 0 auto 4.5rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.lp-showcase__inner--reverse { direction: rtl; }
.lp-showcase__inner--reverse > * { direction: ltr; }
.lp-showcase__copy h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  margin-bottom: .85rem;
}
.lp-showcase__copy p {
  color: var(--mute);
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
  max-width: 38ch;
  line-height: 1.6;
}
.lp-shot {
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #fff;
  aspect-ratio: 1 / 1;
}
.lp-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.1s var(--ease);
}
.lp-shot:hover img { transform: scale(1.04); }
.lp-shot--sign {
  background: #fff;
  animation: lpFloat 5.5s ease-in-out infinite;
}
.lp-shot--sign img {
  object-fit: contain;
  padding: 8%;
  background: linear-gradient(160deg, #fff 0%, #f1f5f9 100%);
}
.lp-shot--note { aspect-ratio: 5 / 4; }

.lp-section {
  padding: 4.5rem clamp(1.25rem, 4vw, 3rem);
  max-width: 1200px; margin: 0 auto;
}
.lp-section__head { text-align: center; margin-bottom: 2.5rem; }
.lp-section__head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .5rem; }
.lp-section__head p { color: var(--mute); margin: 0 auto; max-width: 48ch; }

.lp-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem 1.5rem;
}
.lp-feature {
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--line);
  transition: transform .35s var(--ease);
}
.lp-feature:hover { transform: translateY(-4px); }
.lp-feature__mark {
  width: 42px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #1e3a8a, #2563eb);
  margin-bottom: 1rem;
}
.lp-feature__mark--2 { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.lp-feature__mark--3 { background: linear-gradient(90deg, #9a3412, #f59e0b); }
.lp-feature__mark--4 { background: linear-gradient(90deg, #1e3a8a, #60a5fa); }
.lp-feature__mark--5 { background: linear-gradient(90deg, #4c1d95, #818cf8); }
.lp-feature__mark--6 { background: linear-gradient(90deg, #334155, #94a3b8); }
.lp-feature h3 { font-size: 1.08rem; margin-bottom: .4rem; }
.lp-feature p { margin: 0; color: var(--mute); font-size: .92rem; }

.lp-entreprises { background: #f7f9fc; border-block: 1px solid var(--line); }
.lp-ent-search {
  display: flex; gap: .75rem; flex-wrap: wrap;
  max-width: 560px; margin: 0 auto 2rem;
}
.lp-ent-search input[type="search"] {
  flex: 1 1 220px; min-height: 44px; padding: .65rem 1rem;
  border: 1px solid var(--line); border-radius: 10px; font: inherit;
  background: var(--white);
}
.lp-ent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 1100px; margin: 0 auto;
}
.lp-ent-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: .85rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.lp-ent-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .08);
}
.lp-ent-card__top { display: flex; gap: .85rem; align-items: flex-start; }
.lp-ent-avatar {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #0a1628, #2563eb);
  color: #fff; font-weight: 700; font-size: 1.15rem;
}
.lp-ent-avatar--img {
  object-fit: cover;
  background: #e2e8f0;
  padding: 0;
  display: block;
}
.lp-ent-card h3 { margin: 0 0 .25rem; font-size: 1.05rem; line-height: 1.25; }
.lp-ent-tag {
  display: inline-block; font-size: .75rem; color: var(--mute);
  background: #eef2f7; padding: .15rem .5rem; border-radius: 999px;
}
.lp-ent-card > p {
  margin: 0; color: var(--mute); font-size: .9rem; line-height: 1.45;
  flex: 1;
}
.lp-ent-card__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.contact-box .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) {
  .contact-box .form-row { grid-template-columns: 1fr; }
}

.lp-why { background: var(--white); border-block: 1px solid var(--line); }
.lp-why .lp-section { max-width: 1200px; }
.lp-why-list {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
  list-style: none; margin: 0; padding: 0;
}
.lp-why-list li {
  text-align: left;
  padding: .25rem 0;
}
.lp-why-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary);
  margin-bottom: .85rem;
  box-shadow: 0 0 0 6px var(--primary-soft);
}
.lp-why-list h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.lp-why-list p { margin: 0; color: var(--mute); font-size: .9rem; }

.lp-cta {
  padding: 4.5rem clamp(1.25rem, 4vw, 3rem) 5rem;
  background:
    radial-gradient(600px 260px at 80% 20%, rgba(37, 99, 235, 0.18), transparent 55%),
    linear-gradient(180deg, #0a1628 0%, #12253f 100%);
  color: #fff;
}
.lp-cta__inner {
  width: min(100%, 720px);
  margin: 0 auto;
  text-align: center;
}
.lp-cta h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: .65rem;
}
.lp-cta p {
  color: rgba(255,255,255,.78);
  margin: 0 0 1.6rem;
  font-size: 1.05rem;
}
.lp-cta .btn-secondary {
  background: transparent;
  border-color: rgba(255,255,255,.35);
  color: #fff;
}
.lp-cta .btn-secondary:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.lp-features .reveal:nth-child(2),
.lp-why-list .reveal:nth-child(2) { transition-delay: .08s; }
.lp-features .reveal:nth-child(3),
.lp-why-list .reveal:nth-child(3) { transition-delay: .14s; }
.lp-features .reveal:nth-child(4),
.lp-why-list .reveal:nth-child(4) { transition-delay: .2s; }
.lp-features .reveal:nth-child(5) { transition-delay: .24s; }
.lp-features .reveal:nth-child(6) { transition-delay: .28s; }
.lp-hero .reveal:nth-child(1) { transition-delay: .05s; }
.lp-hero .reveal:nth-child(2) { transition-delay: .15s; }
.lp-hero .reveal:nth-child(3) { transition-delay: .25s; }
.lp-hero .reveal:nth-child(4) { transition-delay: .35s; }

@keyframes lpKenBurns {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to { transform: scale(1.16) translate3d(-1.5%, -1%, 0); }
}
@keyframes lpFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes lpScrollDot {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; transform: translateY(14px); }
}

.lp-foot {
  background: #070f1c; color: #94a3b8;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 1.5rem;
}
.lp-foot__grid {
  max-width: 1200px; margin: 0 auto 1.5rem;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
}
.lp-foot strong { color: #fff; display: block; margin-bottom: .75rem; }
.lp-foot__tag {
  margin: 0;
  color: #94a3b8;
  font-size: .92rem;
  max-width: 28ch;
  line-height: 1.5;
}
.lp-foot a { color: #94a3b8; text-decoration: none; display: block; margin-bottom: .4rem; }
.lp-foot a:hover { color: #fff; }
.lp-foot__copy {
  max-width: 1200px; margin: 0 auto; padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem;
}

/* ========== AUTH ========== */
.auth-body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(700px 360px at 10% 0%, rgba(37, 99, 235, 0.28), transparent 55%),
    radial-gradient(600px 320px at 100% 100%, rgba(59, 130, 246, 0.18), transparent 50%),
    linear-gradient(165deg, #0a1628 0%, #0f1f38 42%, #12253f 100%);
}
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: .55;
  animation: authFloat 12s ease-in-out infinite;
}
.auth-orb--1 {
  width: 280px; height: 280px;
  left: -60px; top: 12%;
  background: radial-gradient(circle, rgba(59,130,246,.55), transparent 70%);
}
.auth-orb--2 {
  width: 340px; height: 340px;
  right: -80px; bottom: 8%;
  background: radial-gradient(circle, rgba(99,102,241,.4), transparent 70%);
  animation-delay: -4s;
  animation-duration: 15s;
}
.auth-orb--3 {
  width: 180px; height: 180px;
  left: 42%; top: 8%;
  background: radial-gradient(circle, rgba(14,165,233,.35), transparent 70%);
  animation-delay: -7s;
  animation-duration: 10s;
}
.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  animation: authGrid 22s linear infinite;
}
@keyframes authFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -24px, 0) scale(1.08); }
}
@keyframes authGrid {
  from { transform: translateY(0); }
  to { transform: translateY(48px); }
}

.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem 1.25rem;
}
.auth-panel {
  width: min(100%, 1180px);
  min-height: min(720px, calc(100vh - 3rem));
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 28px 70px rgba(0,0,0,.4);
  backdrop-filter: blur(10px);
  animation: authPanelIn .7s var(--ease) both;
}
.auth-panel--register {
  width: min(100%, 1240px);
  min-height: min(820px, calc(100vh - 2.5rem));
}

.auth-side {
  padding: 3rem 2.5rem;
  background:
    linear-gradient(160deg, rgba(30, 58, 138, .55), rgba(10, 22, 40, .35)),
    rgba(255,255,255,.03);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  animation: authSlideIn .75s .08s var(--ease) both;
}
.auth-side__logo {
  display: inline-flex;
  width: fit-content;
  text-decoration: none;
  margin-bottom: .5rem;
}
.auth-side__logo .brand-logo--auth {
  width: 120px;
  height: 120px;
  margin: 0;
  animation: authLogoPop .8s .15s var(--ease) both, softPulse 3.2s 1s ease-in-out infinite;
}
.auth-side__title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  line-height: 1.25;
}
.auth-side__text {
  margin: 0;
  color: rgba(226, 232, 240, .82);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 36ch;
}
.auth-side__points {
  list-style: none;
  margin: .65rem 0 0;
  padding: 0;
  display: grid;
  gap: .7rem;
}
.auth-side__points li {
  position: relative;
  padding-left: 1.45rem;
  font-size: 1rem;
  color: #cbd5e1;
}
.auth-side__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45rem;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #818cf8);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, .18);
}

.auth-box {
  width: 100%;
  max-width: none;
  background: rgba(255,255,255,.97);
  border: 0;
  border-radius: 0;
  padding: 2.75rem 2.5rem 2.2rem;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: authRise .75s .12s var(--ease) both;
  color: var(--ink);
}
.auth-box--wide { width: 100%; }
.auth-box__intro h1 {
  font-size: clamp(1.7rem, 2.5vw, 2rem);
  margin-bottom: .45rem;
}
.auth-box__intro .sub {
  color: var(--mute);
  margin: 0 0 1.5rem;
  font-size: 1rem;
}
.auth-box .logo {
  display: flex;
  justify-content: center;
  text-decoration: none;
  margin-bottom: 1rem;
}
.auth-box .logo:hover { transform: none; }
.auth-box h1 { font-size: 1.5rem; margin-bottom: .35rem; }
.auth-box .sub { color: var(--mute); margin: 0 0 1.35rem; font-size: .92rem; }
.auth-foot {
  margin-top: 1.2rem;
  text-align: center;
  color: var(--mute);
  font-size: .9rem;
}
.auth-foot a {
  font-weight: 600;
  transition: color .2s;
}
.auth-foot a:hover { color: var(--primary-hover); }

.auth-form .auth-field {
  opacity: 0;
  transform: translateY(14px);
  animation: authFieldIn .55s var(--ease) forwards;
  animation-delay: calc(0.18s + (var(--step, 0) * 0.07s));
}

.auth-box input,
.auth-box textarea,
.auth-box select {
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.auth-box input:focus,
.auth-box textarea:focus,
.auth-box select:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .16);
}
.auth-submit {
  transition: transform .25s var(--ease), box-shadow .25s, filter .25s;
}
.auth-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, .35);
}

@keyframes authPanelIn {
  from { opacity: 0; transform: translateY(28px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes authSlideIn {
  from { opacity: 0; transform: translateX(-22px); }
  to { opacity: 1; transform: none; }
}
@keyframes authRise {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes authFieldIn {
  to { opacity: 1; transform: none; }
}
@keyframes authLogoPop {
  from { opacity: 0; transform: scale(.7); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 980px) {
  .auth-panel,
  .auth-panel--register {
    grid-template-columns: 1fr;
    width: min(100%, 640px);
    min-height: 0;
  }
  .auth-side {
    padding: 1.75rem 1.5rem 1.35rem;
    text-align: center;
    align-items: center;
  }
  .auth-side__text { max-width: none; }
  .auth-side__points {
    width: 100%;
    text-align: left;
  }
  .auth-side__logo .brand-logo--auth {
    width: 100px;
    height: 100px;
  }
  .auth-box { padding: 1.85rem 1.4rem 1.5rem; }
}

/* ========== APP SHELL ========== */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}
.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
}
.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.4rem;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  animation: fadeDown .45s var(--ease) both;
  color: var(--ink-strong);
}
.page-heading { margin: 0; font-size: 1.2rem; flex: 1; color: var(--ink-strong); }
.menu-toggle {
  display: none; border: 1px solid var(--line); background: #fff;
  color: var(--ink-strong); border-radius: 10px; width: 42px; height: 42px; cursor: pointer;
}
.topbar-notif {
  position: relative; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  color: var(--ink-strong); text-decoration: none;
  transition: transform .25s var(--ease), background .2s, box-shadow .25s;
}
.topbar-notif:hover {
  background: var(--primary-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.sidebar {
  width: var(--sidebar);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; height: 100dvh; z-index: 40;
  color: var(--ink);
  flex-shrink: 0;
  box-shadow: 0 0 24px rgba(10, 22, 40, 0.04);
}
@media (min-width: 901px) {
  .sidebar { animation: slideInLeft .55s var(--ease) both; }
}
.sidebar-brand {
  padding: 1.3rem 1.15rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-shrink: 0;
}
.sidebar-brand a {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--ink-strong); font-weight: 700;
  transition: transform .25s var(--ease);
  min-width: 0;
}
.sidebar-brand a.brand-link:hover { transform: translateY(-1px); }
.sidebar-brand a:not(.brand-link):hover { transform: translateX(2px); }
.sidebar-close {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink-strong);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(145deg, #1D4ED8, #3B82F6);
  color: #fff;
  display: grid; place-items: center; font-weight: 700;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
  animation: softPulse 3s ease-in-out infinite;
}
.brand-text { font-size: 1.08rem; color: var(--ink-strong); letter-spacing: -0.02em; }

.sidebar-nav {
  padding: 1rem .8rem; display: flex; flex-direction: column;
  gap: .25rem; flex: 1; overflow-y: auto;
}
.nav-link {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .75rem .9rem; border-radius: 12px;
  color: var(--ink); font-weight: 500; font-size: .9rem; text-decoration: none;
  transition: background .25s var(--ease), color .25s, transform .25s var(--ease), box-shadow .25s;
}
.nav-link:hover {
  background: var(--primary-soft);
  color: var(--ink-strong);
  transform: translateX(3px);
}
.nav-link.is-active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0.06));
  color: var(--ink-strong); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-badge, .dot {
  background: var(--primary); color: #fff;
  font-size: .68rem; font-weight: 700; border-radius: 999px;
  min-width: 1.2rem; height: 1.2rem; display: inline-grid; place-items: center;
  padding: 0 .25rem;
  animation: softPulse 2s ease-in-out infinite;
}

.sidebar-footer {
  padding: 1rem; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: .55rem;
}
.user-chip strong { display: block; color: var(--ink-strong); font-size: .9rem; }
.user-chip span { font-size: .75rem; color: var(--mute); text-transform: capitalize; }

.sidebar .btn-ghost {
  background: transparent; color: var(--mute); border-color: var(--line);
  transition: all .25s var(--ease);
}
.sidebar .btn-ghost:hover { background: var(--bg); color: var(--ink-strong); }

.menu-toggle:hover { transform: scale(1.05); }
.topbar-notif .dot { position: absolute; top: -4px; right: -4px; }
.topbar-notif svg { width: 18px; height: 18px; }
.content {
  padding: 1.4rem;
  animation: fadeUp .5s .05s var(--ease) both;
}

/* Cards & stats */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  animation: fadeUp .55s var(--ease) both;
  color: var(--ink);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card + .card { margin-top: 1rem; }
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.card-header h2, .card-header h3 { margin: 0; font-size: 1.05rem; }
.toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
  margin-left: auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem; margin-bottom: 1.25rem;
}
.stat-card {
  border: 1px solid transparent;
  border-radius: var(--radius); padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s;
  animation: fadeUp .55s var(--ease) both;
  position: relative; overflow: hidden;
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
}
.stat-card::after {
  content: ""; position: absolute; right: -18px; top: -18px;
  width: 88px; height: 88px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: transform .4s var(--ease);
}
.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.stat-card:hover::after { transform: scale(1.25); }
.stat-card:nth-child(1) { animation-delay: .05s; }
.stat-card:nth-child(2) { animation-delay: .1s; }
.stat-card:nth-child(3) { animation-delay: .15s; }
.stat-card:nth-child(4) { animation-delay: .2s; }
.stat-card:nth-child(5) { animation-delay: .25s; }
.stat-card:nth-child(6) { animation-delay: .3s; }
.stat-card:nth-child(7) { animation-delay: .35s; }
.stat-card .label {
  font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em;
  position: relative; z-index: 1;
  opacity: .78;
}
.stat-card .value {
  font-size: 1.85rem; font-weight: 700; margin-top: .35rem;
  position: relative; z-index: 1;
  line-height: 1.1;
}
.stat-card .value.accent { color: inherit; }

.stat-card.stat-blue {
  background: linear-gradient(145deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}
.stat-card.stat-sky {
  background: linear-gradient(145deg, #0284c7 0%, #0ea5e9 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.28);
}
.stat-card.stat-teal {
  background: linear-gradient(145deg, #0f766e 0%, #14b8a6 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.28);
}
.stat-card.stat-amber {
  background: linear-gradient(145deg, #b45309 0%, #f59e0b 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}
.stat-card.stat-green {
  background: linear-gradient(145deg, #15803d 0%, #22c55e 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.28);
}
.stat-card.stat-indigo {
  background: linear-gradient(145deg, #3730a3 0%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.28);
}
.stat-card.stat-rose {
  background: linear-gradient(145deg, #be123c 0%, #f43f5e 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(244, 63, 94, 0.25);
}
.stat-card.stat-slate {
  background: linear-gradient(145deg, #0f172a 0%, #334155 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
}
.stat-card.stat-blue .label,
.stat-card.stat-sky .label,
.stat-card.stat-teal .label,
.stat-card.stat-amber .label,
.stat-card.stat-green .label,
.stat-card.stat-indigo .label,
.stat-card.stat-rose .label,
.stat-card.stat-slate .label {
  color: rgba(255,255,255,.88);
  opacity: 1;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.dash-grid {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem;
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; font-weight: 600; margin-bottom: .3rem;
  font-size: .88rem; color: var(--ink-strong);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.form-row--3 { grid-template-columns: repeat(3, 1fr); }
.form-row:has(input[type="datetime-local"]) { grid-template-columns: 1fr; }
@media (min-width: 901px) {
  .form-row:has(input[type="datetime-local"]) { grid-template-columns: 1fr 1fr; }
}

input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="date"], input[type="datetime-local"], input[type="url"], input[type="number"],
input[type="search"], select, textarea {
  width: 100%; padding: .7rem .85rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink-strong);
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 95px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.lp-public-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.lp-public-bell svg { width: 20px; height: 20px; }
.lp-public-bell:hover { background: rgba(255,255,255,.22); transform: translateY(-1px); }
.lp-public-bell__dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}
.lp-public-bell--fixed {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 40;
  background: #0a1628;
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.password-field {
  position: relative;
  display: block;
}
.password-field input {
  padding-right: 2.85rem;
}
.password-toggle {
  position: absolute;
  right: .35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--mute);
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.password-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
}
.password-toggle:hover {
  background: #eef2f7;
  color: var(--ink-strong);
}

.reply-inline-form {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin-top: .35rem;
}
.reply-inline-form textarea {
  min-height: 72px;
  font-size: .85rem;
}

.form-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.15rem; }
.help-text { color: var(--mute); font-size: .82rem; margin-top: .25rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .7rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer;
  text-decoration: none;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, filter .25s;
}
.btn:hover { transform: translateY(-3px); text-decoration: none; }
.btn:active { transform: translateY(-1px) scale(.98); }
.btn-primary {
  background: linear-gradient(135deg, #1D4ED8, #2563EB 45%, #3B82F6);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}
.btn-primary:hover { filter: brightness(1.08); color: #fff; }
.btn-secondary {
  background: #fff;
  border-color: #bfdbfe;
  color: var(--primary);
}
.btn-secondary:hover {
  background: var(--primary-soft);
  color: var(--primary-hover);
  border-color: #93c5fd;
  box-shadow: none;
}
.btn-ghost {
  background: transparent; color: var(--mute); border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg); color: var(--ink-strong); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: .4rem .8rem; font-size: .82rem; }
.btn-block { width: 100%; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.data {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: .9rem;
}
table.data th, table.data td {
  text-align: left; padding: .8rem .65rem;
  border-bottom: 1px solid var(--line); vertical-align: middle;
}
table.data th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--mute); font-weight: 600; background: var(--bg);
}
table.data tr:hover td { background: #f8fafc; }
.actions-cell { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.actions-cell form { margin: 0; }

/* Listes propres (visiteurs, messages publics) */
.page-stack {
  display: grid;
  gap: 1rem;
}
.people-list,
.msg-public-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.people-card,
.msg-public-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.people-card:hover,
.msg-public-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .08);
}
.people-card__main,
.person-summary {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  flex: 1;
}
.person-summary {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.person-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1D4ED8, #3B82F6);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
}
.people-card__info { min-width: 0; }
.people-card__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin-bottom: .2rem;
}
.people-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  color: var(--mute);
  font-size: .85rem;
}
.people-card__actions,
.msg-public-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.people-card__actions form,
.msg-public-card__actions form { margin: 0; }
.tag-soft {
  display: inline-flex;
  margin-top: .4rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--primary-hover);
  background: var(--primary-soft);
}
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 .45rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: .78rem;
  font-weight: 700;
}
.msg-public-card {
  align-items: flex-start;
}
.msg-public-card.is-unread {
  background: linear-gradient(180deg, #eff6ff 0%, #fff 55%);
  border-color: #bfdbfe;
}
.msg-public-card__body { flex: 1; min-width: 0; }
.msg-public-card__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .25rem;
}
.msg-public-card__from {
  color: var(--mute);
  font-size: .88rem;
}
.msg-public-card__text {
  margin: .55rem 0 0;
  color: var(--ink);
  line-height: 1.45;
  font-size: .92rem;
}
.msg-public-card__rdv { margin-top: .55rem; }
.help-text--flush { margin: 0 0 1rem; }
.mt-xs { margin-top: .4rem; }
.dot-sep { color: #cbd5e1; }

/* Menu contexte calendrier */
.cal-context {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, .28);
}
.cal-context__card {
  position: fixed;
  width: min(360px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, .22);
  padding: 1rem 1.1rem 1.05rem;
  color: var(--ink);
}
.cal-context__close {
  position: absolute;
  top: .45rem;
  right: .55rem;
  border: 0;
  background: #f1f5f9;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
}
.cal-context__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4rem;
  padding-right: 2rem;
  margin-bottom: .85rem;
}
.cal-context__head strong {
  font-size: 1.05rem;
  color: var(--ink-strong);
  line-height: 1.3;
}
.cal-context__body {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin-bottom: .95rem;
}
.cal-context__row {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  font-size: .88rem;
}
.cal-context__row > span {
  color: var(--mute);
  flex-shrink: 0;
}
.cal-context__row strong {
  text-align: right;
  color: var(--ink-strong);
  font-weight: 600;
  word-break: break-word;
}
.cal-context__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.people-card--stack {
  align-items: stretch;
  flex-direction: column;
}
.people-card--stack .people-card__actions {
  justify-content: flex-start;
  width: 100%;
}

.contact-inline {
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border: 1px dashed #93c5fd;
  border-radius: 12px;
  background: #eff6ff;
}
.add-panel[hidden] { display: none !important; }

/* Badges ? brief */
.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600;
}
.badge-success { background: var(--success-soft); color: #15803d; }
.badge-danger { background: var(--danger-soft); color: #b91c1c; }
.badge-warning { background: var(--warning-soft); color: #b45309; }
.badge-info { background: var(--info-soft); color: var(--primary); }
.badge-muted { background: #f1f5f9; color: var(--mute); }

.alert {
  padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1rem;
  font-weight: 500; font-size: .92rem;
}
.alert-success { background: var(--success-soft); color: #15803d; border: 1px solid #bbf7d0; }
.alert-error { background: var(--danger-soft); color: #b91c1c; border: 1px solid #fecaca; }
.alert-info { background: var(--info-soft); color: var(--primary); border: 1px solid #bfdbfe; }

.empty { text-align: center; padding: 2.2rem 1rem; color: var(--mute); }

/* Barre filtres / recherche ? alignement propre */
.filters,
.search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto;
  gap: .65rem;
  align-items: end;
  margin: 0 0 1.15rem;
  padding: .85rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
}
.filters.filters--simple {
  grid-template-columns: minmax(160px, 240px) auto;
}
.filters .form-group,
.search-bar .form-group {
  margin: 0;
  min-width: 0;
}
.filters label,
.search-bar label {
  display: block;
  margin-bottom: .28rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--mute);
}
.filters input,
.filters select,
.search-bar input,
.search-bar select {
  width: 100%;
  min-height: 44px;
  margin: 0;
}
.filters .btn,
.search-bar .btn {
  min-height: 44px;
  white-space: nowrap;
  align-self: end;
}
.search-bar > input[type="search"] {
  max-width: none;
  width: 100%;
  min-height: 44px;
}

@media (max-width: 760px) {
  .filters,
  .search-bar,
  .filters.filters--simple {
    grid-template-columns: 1fr;
  }
  .filters .btn,
  .search-bar .btn {
    width: 100%;
  }
}

.notif-item {
  display: flex; gap: 1rem; padding: .95rem 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.notif-item__body { flex: 1; min-width: 0; }
.notif-item.unread {
  background: var(--primary-soft);
  margin: 0 -1.25rem; padding-left: 1.25rem; padding-right: 1.25rem;
}
.notif-item .meta { color: var(--mute); font-size: .8rem; }

#calendar {
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  color: var(--ink);
}
.planning-card {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
}
.planning-card--bare {
  padding-top: 1rem;
}
.planning-card--bare .card-header,
.planning-card--bare > .help-text {
  display: none !important;
}
.planning-card .card-header h2 {
  color: var(--ink-strong);
}
.planning-card .help-text {
  color: var(--mute);
  opacity: 1;
}

.fc .fc-toolbar.fc-header-toolbar { gap: .75rem; flex-wrap: wrap; }
.fc .fc-toolbar-title {
  color: var(--ink-strong) !important;
  font-family: var(--font) !important;
  font-weight: 600 !important;
}
.fc .fc-button {
  font-family: var(--font) !important;
  text-transform: capitalize !important;
  background: #0a1628 !important;
  border: 1px solid rgba(148,163,184,.25) !important;
  color: #e8eef8 !important;
  box-shadow: none !important;
  border-radius: 10px !important;
}
.fc .fc-button:hover {
  background: #12253f !important;
  color: #fff !important;
}
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: #0f1f38 !important;
  border-color: #1a3358 !important;
  color: #fff !important;
}
.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number,
.fc .fc-list-day-text,
.fc .fc-list-day-side-text {
  color: var(--ink) !important;
}
.fc .fc-event {
  cursor: pointer;
  border: 0 !important;
  border-radius: 6px !important;
  font-weight: 500;
}
.fc .fc-daygrid-event.fc-event-start,
.fc .fc-timegrid-event {
  box-shadow: none !important;
}

/* Kanban */
.kanban {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  align-items: start;
}
.kanban-col {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; min-height: 280px;
  min-width: 0;
}
.kanban-col h3 {
  font-size: .9rem; margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: space-between;
}
.kanban-col .count {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: .1rem .5rem; font-size: .75rem; color: var(--mute);
}
.kanban-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 1rem; margin-bottom: .75rem;
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s;
  animation: fadeUp .5s var(--ease) both;
}
.kanban-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
}
.kanban-card h4 { font-size: .95rem; margin-bottom: .5rem; }
.kanban-card .meta {
  display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem;
  font-size: .78rem; color: var(--mute);
}
.kanban-card .progress-bar { margin-top: .65rem; }

.progress-bar {
  position: relative;
  height: 1.35rem;
  border-radius: 999px;
  background: #e8eef5;
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress-bar--sm { height: 1.1rem; font-size: .72rem; }
.progress-bar__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  transition: width .35s ease;
}
.progress-bar.is-low .progress-bar__fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress-bar.is-mid .progress-bar__fill { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.progress-bar.is-high .progress-bar__fill { background: linear-gradient(90deg, #0ea5e9, #22c55e); }
.progress-bar.is-done .progress-bar__fill { background: linear-gradient(90deg, #16a34a, #4ade80); }
.progress-bar__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 600;
  color: var(--ink-strong);
  text-shadow: 0 0 4px #fff;
}
.progression-field {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.progression-field input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: #2563eb;
}
.progression-field output,
.progression-field .act-out {
  min-width: 3.2rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink-strong);
}
.progression-field--inline {
  flex-wrap: wrap;
  margin: .4rem 0;
  min-width: 160px;
}
.act-update-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .4rem;
  min-width: 180px;
}
.act-avg {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 180px;
}
.act-avg > span {
  font-size: .8rem;
  color: var(--mute);
  white-space: nowrap;
}
.act-avg .progress-bar { min-width: 120px; flex: 1; }

.chart-wrap { position: relative; height: 240px; }

.alert { animation: fadeDown .4s var(--ease) both; }
.notif-item { transition: background .25s, transform .25s var(--ease); }
.notif-item:hover { transform: translateX(4px); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes softPulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25); }
  50% { box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .lp-hero__img { transform: none; transition: opacity .4s ease; }
  .auth-form .auth-field,
  .auth-panel,
  .auth-side,
  .auth-box,
  .auth-side__logo .brand-logo--auth {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media print {
  .sidebar, .topbar, .filters, .form-actions, .btn, .menu-toggle, .lp-top { display: none !important; }
}

/* ?? Messagerie plein ?cran ?? */
.app-body.is-messaging {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.app-body.is-messaging .app-shell {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.app-body.is-messaging .main-wrap {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.app-body.is-messaging .topbar {
  display: none !important;
}
@media (max-width: 900px) {
  .app-body.is-messaging .topbar {
    display: flex !important;
    position: absolute;
    top: 0;
    left: 0;
    right: auto;
    width: auto;
    padding: .55rem;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    z-index: 28;
    backdrop-filter: none;
  }
  .app-body.is-messaging .page-heading,
  .app-body.is-messaging .topbar-notif {
    display: none !important;
  }
  .app-body.is-messaging .menu-toggle {
    display: inline-grid !important;
    place-items: center;
  }
}
.app-body.is-messaging .content {
  padding: 0 !important;
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: none;
}
.app-body.is-messaging .content > .alert {
  margin: .75rem 1rem 0;
  flex-shrink: 0;
}

.msg-app {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  background: #fff;
  border-top: 0;
}

.msg-sidebar {
  width: min(360px, 38%);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}
.msg-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}
.msg-side-head h2 {
  margin: 0;
  font-size: 1.05rem;
}
.msg-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.msg-empty-side { padding: 2rem 1rem; }
.msg-thread {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .95rem 1.1rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  background: transparent;
  transition: background .2s var(--ease);
}
.msg-thread:hover { background: #eef2f7; }
.msg-thread.has-unread { background: var(--primary-soft); }
.msg-thread.is-active {
  background: #fff;
  box-shadow: inset 3px 0 0 var(--primary);
}
.msg-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--night-2), var(--night-3));
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
}
.msg-thread-body { flex: 1; min-width: 0; }
.msg-thread-top {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .25rem;
}
.msg-thread-top .meta {
  color: var(--mute);
  font-size: .72rem;
  white-space: nowrap;
}
.msg-preview {
  color: var(--mute);
  font-size: .85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-panel {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.msg-panel-head {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: #fff;
}
.msg-chat-header { margin: 0; }
.msg-chat-peer {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}
.msg-chat-peer strong {
  font-size: 1rem;
  line-height: 1.2;
}
.msg-chat-peer span {
  font-size: .78rem;
  color: var(--mute);
}
.msg-back {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.msg-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.5rem;
}
.msg-compose-form {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}
.msg-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .65rem;
  padding: 2rem;
  color: var(--mute);
  background:
    radial-gradient(600px 280px at 70% 20%, rgba(37, 99, 235, 0.08), transparent 60%),
    #fff;
}
.msg-welcome h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 1.35rem;
}
.msg-welcome p { margin: 0 0 .5rem; max-width: 360px; }
.msg-welcome-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  margin-bottom: .35rem;
  position: relative;
}
.msg-welcome-icon::before,
.msg-welcome-icon::after {
  content: "";
  position: absolute;
  border-radius: 10px;
  background: var(--primary);
  opacity: .85;
}
.msg-welcome-icon::before {
  width: 28px;
  height: 20px;
  top: 18px;
  left: 14px;
}
.msg-welcome-icon::after {
  width: 18px;
  height: 14px;
  bottom: 16px;
  right: 14px;
  opacity: .45;
}

.msg-chat { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.msg-chat:hover { box-shadow: none; transform: none; }

.msg-stream {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  background:
    linear-gradient(180deg, #f1f5f9 0%, #f8fafc 35%, #fff 100%);
  max-height: none;
}
.msg-bubble {
  max-width: min(72%, 640px);
  padding: .8rem 1.05rem;
  border-radius: 16px;
  animation: fadeUp .3s var(--ease) both;
}
.msg-bubble.is-mine {
  align-self: flex-end;
  background: linear-gradient(145deg, #1d4ed8, #2563eb);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-bubble.is-theirs {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow);
}
.msg-bubble-meta {
  font-size: .72rem;
  opacity: .75;
  margin-bottom: .3rem;
}
.msg-bubble-text {
  font-size: .95rem;
  line-height: 1.5;
  word-break: break-word;
}
.msg-send-form {
  display: flex;
  gap: .75rem;
  align-items: flex-end;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}
.msg-send-form textarea {
  flex: 1;
  resize: none;
  min-height: 48px;
  max-height: 140px;
  border-radius: 14px;
  padding: .85rem 1rem;
}

/* ?? Param?tres ?? */
.settings-app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.settings-nav {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
  padding: 1.15rem;
  position: sticky;
  top: 84px;
}
.settings-profile {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .25rem .15rem 1.1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .9rem;
}
.settings-profile__text { min-width: 0; }
.settings-profile strong {
  display: block;
  font-size: .98rem;
  color: var(--ink-strong);
  line-height: 1.25;
}
.settings-profile span {
  display: block;
  font-size: .78rem;
  color: var(--mute);
}
.settings-profile__email {
  margin-top: .15rem !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}
.settings-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0a1628, #2563eb);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .25);
}
.settings-avatar--img {
  object-fit: cover;
  background: #e2e8f0;
  padding: 0;
  display: block;
}
.logo-upload__preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .85rem;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
}
.logo-upload__fields { flex: 1; min-width: 180px; }
.settings-logo-preview {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0a1628, #2563eb);
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
}
.settings-logo-preview--img {
  object-fit: cover;
  background: #e2e8f0;
  padding: 0;
  display: block;
}
.contact-ent-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}
.contact-ent-head h1 { margin: 0 0 .25rem; }
.contact-ent-head .sub { margin: 0; }
.contact-ent-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0a1628, #2563eb);
  color: #fff;
  font-weight: 700;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.contact-ent-logo--img {
  object-fit: cover;
  background: #e2e8f0;
  padding: 0;
  display: block;
}
.settings-links {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.settings-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .78rem .9rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: .9rem;
  border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.settings-link__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}
.settings-link:hover {
  background: #f8fafc;
  color: var(--ink-strong);
  border-color: #e2e8f0;
}
.settings-link.is-active {
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
  color: var(--primary);
  font-weight: 600;
  border-color: #bfdbfe;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .08);
}
.settings-link.is-active .settings-link__dot {
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.settings-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
  padding: 1.5rem 1.5rem 1.35rem;
  min-height: 420px;
}
.settings-panel-head {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.settings-panel-head h2 {
  margin: 0 0 .35rem;
  font-size: 1.25rem;
  color: var(--ink-strong);
}
.settings-panel-head p {
  margin: 0;
  color: var(--mute);
  font-size: .92rem;
  max-width: 46ch;
}
.settings-form {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.settings-block {
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfe;
}
.settings-block__title {
  margin: 0 0 .95rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mute);
}
.settings-form-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  padding-top: .35rem;
}
.settings-readonly,
.settings-readonly.card-soft,
.card-soft {
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfe;
}
.settings-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem 1.1rem;
}
.settings-info-item {
  padding: .75rem .85rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eef2f7;
}
.settings-span-2 { grid-column: 1 / -1; }
.settings-label {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--mute);
  font-weight: 600;
  margin-bottom: .3rem;
}
.settings-info-grid strong {
  display: block;
  font-size: .95rem;
  color: var(--ink-strong);
  font-weight: 600;
  word-break: break-word;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(7, 12, 24, 0.55);
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
}
.sidebar-backdrop.is-visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1100px) {
  .lp-features { grid-template-columns: repeat(2, 1fr); }
  .lp-why-list { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-row,
  .form-row--3,
  .grid-3 { grid-template-columns: 1fr; }
  .lp-showcase__inner,
  .lp-showcase__inner--reverse {
    grid-template-columns: 1fr;
  }
  .lp-showcase__inner--reverse { direction: ltr; }
  .lp-foot__grid { grid-template-columns: 1fr 1fr; }
  .lp-shot, .lp-shot--note { aspect-ratio: 16 / 10; max-height: 420px; }
  .msg-sidebar { width: min(300px, 42%); }

  .kanban {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    scroll-snap-type: x mandatory;
    padding-bottom: .65rem;
    -webkit-overflow-scrolling: touch;
  }
  .kanban-col {
    flex: 0 0 min(300px, 82vw);
    scroll-snap-align: start;
    min-height: 240px;
  }
}

@media (max-width: 900px) {
  .lp-burger { display: inline-block; }
  .lp-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 1rem;
    left: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: .35rem;
    background: linear-gradient(180deg, #0f1f38, #12253f);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: .85rem;
    box-shadow: 0 18px 40px rgba(10, 22, 40, 0.45);
  }
  .lp-nav.is-open { display: flex; }
  .lp-top .lp-nav > a:not(.btn) {
    color: #e2e8f0;
    padding: .7rem .85rem;
  }
  .lp-top .lp-nav .btn {
    width: 100%;
    margin-top: .35rem;
  }
  .lp-top .lp-nav .lp-public-bell {
    width: 100%;
    height: 42px;
    justify-content: center;
    margin-top: .15rem;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 84vw);
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    transform: translate3d(-105%, 0, 0);
    transition: transform .28s var(--ease), visibility 0s linear .28s;
    box-shadow: none;
    z-index: 50;
    animation: none !important;
    visibility: hidden;
    pointer-events: none;
  }
  .sidebar.open {
    transform: translate3d(0, 0, 0);
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.35);
    visibility: visible;
    pointer-events: auto;
    transition: transform .28s var(--ease), visibility 0s;
  }
  .sidebar-close { display: inline-grid; place-items: center; }
  .sidebar-nav {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .sidebar-footer { flex-shrink: 0; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .app-shell { display: block; }
  .main-wrap { width: 100%; min-height: 100vh; }

  .topbar { padding: .85rem 1rem; gap: .65rem; }
  .page-heading {
    font-size: 1.02rem;
    line-height: 1.3;
    white-space: normal;
  }
  .content { padding: .85rem; }

  .settings-info-grid { grid-template-columns: 1fr; }
  .settings-app { grid-template-columns: 1fr; gap: 1rem; }
  .settings-nav {
    position: static;
    padding: 1rem;
  }
  .settings-profile {
    padding-bottom: .85rem;
    margin-bottom: .75rem;
  }
  .settings-profile__email { max-width: none; }
  .settings-links {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: .4rem;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .15rem;
  }
  .settings-link {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: .6rem .85rem;
  }
  .settings-panel {
    padding: 1.15rem;
    min-height: 0;
    border-radius: 16px;
  }
  .settings-block {
    padding: .95rem 1rem;
  }
  .settings-form-footer .btn { width: 100%; }
  .logo-upload__preview { align-items: flex-start; }

  .filters .form-group,
  .search-bar .form-group {
    min-width: 0 !important;
    width: 100%;
    margin: 0;
  }
  .search-bar input[type="search"] {
    max-width: none;
    width: 100%;
  }
  .filters .btn,
  .search-bar .btn { width: 100%; }

  .card { padding: 1rem; }
  .card-header {
    flex-direction: column;
    align-items: stretch;
  }
  .card-header .toolbar-actions {
    margin-left: 0;
    width: 100%;
  }
  .card-header .btn,
  .card-header .btn-sm,
  .toolbar-actions .btn { width: auto; flex: 1 1 auto; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
  }
  .stat-card { padding: 1rem; }

  .msg-sidebar { width: 100%; }
  .msg-app.has-chat-open .msg-sidebar,
  .app-body.is-messaging .msg-app:has(.msg-chat) .msg-sidebar { display: none; }
  .msg-app:has(.msg-chat) .msg-panel { width: 100%; }
  .msg-back { display: inline-flex; }
  .msg-bubble { max-width: 88%; }
  .msg-send-form {
    flex-direction: column;
    align-items: stretch;
  }
  .msg-send-form .btn { width: 100%; }

  .actions-cell {
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
  }
  table.data .actions-cell .btn {
    width: auto;
  }
  .actions-cell select {
    width: auto;
    min-width: 0;
    max-width: 100%;
  }

  .people-card,
  .msg-public-card {
    flex-direction: column;
    align-items: stretch;
  }
  .people-card__actions,
  .msg-public-card__actions {
    justify-content: stretch;
  }
  .people-card__actions .btn,
  .msg-public-card__actions .btn,
  .people-card__actions form,
  .msg-public-card__actions form {
    flex: 1 1 auto;
  }
  .people-card__actions form .btn,
  .msg-public-card__actions form .btn {
    width: 100%;
  }

  .notif-item {
    flex-direction: column;
    align-items: stretch;
    gap: .65rem;
  }
  .notif-item .actions-cell .btn { width: 100%; }

  #calendar { padding: .65rem .4rem; }
  .fc .fc-toolbar.fc-header-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }
  .fc .fc-toolbar-chunk {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem;
  }
  .fc .fc-button {
    padding: .35rem .55rem !important;
    font-size: .78rem !important;
  }
  .fc .fc-toolbar-title { font-size: 1.05rem !important; }
  .fc .fc-col-header-cell-cushion,
  .fc .fc-daygrid-day-number { font-size: .78rem; }

  .lp-hero__content {
    padding: 6.5rem 1.15rem 4.5rem;
  }
  .lp-hero__logo {
    width: min(120px, 36vw);
    height: min(120px, 36vw);
  }
  .lp-hero h1 { max-width: none; font-size: clamp(1.35rem, 5.5vw, 1.85rem); }
  .lp-hero__lead { max-width: none; font-size: 1rem; }
  .lp-hero__actions { flex-direction: column; align-items: stretch; }
  .lp-hero__actions .btn { width: 100%; }
  .lp-hero__dots {
    right: auto;
    left: 50%;
    bottom: 1.1rem;
    transform: translateX(-50%);
    flex-direction: row;
    align-items: center;
  }
  .lp-hero__dots button.is-active {
    height: 10px;
    width: 28px;
  }
  .lp-hero__scroll { display: none; }

  .lp-features { grid-template-columns: 1fr; }
  .lp-why-list { grid-template-columns: 1fr; }
  .lp-foot__grid { grid-template-columns: 1fr; }
  .lp-showcase { padding: 3rem 0 1rem; }
  .lp-showcase__inner { margin-bottom: 2.75rem; }
  .lp-cta { padding: 3.25rem 1.15rem; }
  .lp-cta .lp-hero__actions { flex-direction: column; }
  .lp-cta .btn { width: 100%; }

  .auth-wrap { padding: 1.25rem .85rem; }
  .auth-box { padding: 1.5rem 1.15rem; border-radius: 16px; }
  .chart-wrap { height: 200px; }
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  table.data { font-size: .82rem; min-width: 480px; }
  table.data th, table.data td { padding: .55rem .45rem; }
  .col-hide-sm { display: none; }
  .content { padding: .7rem; }
  .kanban-col { flex-basis: min(280px, 88vw); }
  .lp-nav { gap: .55rem; }
  .lp-public-bell { width: 36px; height: 36px; }
  .person-summary { flex-direction: column; align-items: flex-start; }
  .card { border-radius: 14px; }
  .card-header h2 { font-size: 1rem; }
  .act-update-form { min-width: 0; width: 100%; }
}

/* ========== FORCE BLEU DE NUIT (pas de blanc) ========== */
html, body,
.guest-body, .app-body, .app-shell, .main-wrap, .content,
.lp, .auth-wrap, .auth-body {
  background-color: #06101f !important;
  color: #c7d2e5 !important;
}

body {
  background-image:
    radial-gradient(900px 420px at 10% -8%, rgba(30, 64, 120, 0.38), transparent 55%),
    linear-gradient(180deg, #040b16 0%, #06101f 48%, #0a1628 100%) !important;
  background-attachment: fixed !important;
}

.sidebar,
.topbar,
.card,
.planning-card,
.auth-box,
.people-card,
.msg-public-card,
.filters,
.search-bar,
.kanban-col,
.kanban-card,
.msg-app,
.msg-sidebar,
.msg-side-head,
.msg-panel,
.msg-chat-head,
.msg-composer,
.settings-app,
.settings-nav,
.settings-panel,
.settings-block,
.settings-readonly,
.settings-info-item,
.settings-link,
.person-summary,
.contact-inline,
.cal-context__card,
#calendar,
.lp-feature,
.lp-ent-card,
.lp-shot,
.lp-entreprises,
.lp-why,
.guest-footer,
table.data th {
  background: #0a1628 !important;
  background-color: #0a1628 !important;
  background-image: none !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
  color: #c7d2e5 !important;
}

.sidebar {
  background:
    radial-gradient(420px 220px at 10% -10%, rgba(30, 64, 120, 0.4), transparent 60%),
    linear-gradient(185deg, #040b16 0%, #06101f 40%, #0a1628 100%) !important;
}

.card,
.planning-card,
.auth-box,
.settings-panel {
  background: linear-gradient(180deg, #0f1f38, #0a1628) !important;
}

.topbar {
  background: rgba(10, 22, 40, 0.92) !important;
  backdrop-filter: blur(12px);
}

h1, h2, h3, h4,
.page-heading,
.card-header h2,
.nav-link,
.user-chip strong,
.people-card__title strong,
.cal-context__head strong,
.cal-context__row strong,
.fc .fc-toolbar-title,
.msg-thread-top strong,
.settings-panel-head h2,
.settings-profile strong,
.lp-section__head h2,
.lp-feature h3,
.auth-box h1 {
  color: #e8eef8 !important;
}

.nav-link { color: #9fb0cc !important; }
.nav-link:hover,
.nav-link.is-active {
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
}
.nav-link.is-active { box-shadow: inset 3px 0 0 #94a3b8 !important; }

.mute, .help-text, .empty, .people-card__meta,
.cal-context__row > span, .user-chip span,
.filters label, .search-bar label {
  color: #8fa3c0 !important;
}

input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="date"], input[type="datetime-local"], input[type="url"], input[type="number"],
input[type="search"], select, textarea,
.menu-toggle, .topbar-notif, .sidebar-close,
.btn-secondary, .password-field, .password-toggle {
  background: #06101f !important;
  background-color: #06101f !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  color: #e8eef8 !important;
}
option { background: #0a1628; color: #e8eef8; }

.btn-secondary:hover,
.password-toggle:hover,
.menu-toggle:hover,
.topbar-notif:hover {
  background: #12253f !important;
  color: #fff !important;
}

.btn-primary {
  background: linear-gradient(135deg, #1D4ED8, #2563EB 45%, #3B82F6) !important;
  color: #fff !important;
}

.filters, .search-bar, .contact-inline {
  background: #06101f !important;
  border-color: rgba(59, 130, 246, 0.35) !important;
}

.people-card:hover,
.msg-public-card:hover {
  border-color: rgba(96, 165, 250, 0.45) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.28) !important;
}

.badge-success { background: rgba(34,197,94,.18) !important; color: #86efac !important; }
.badge-danger { background: rgba(239,68,68,.18) !important; color: #fca5a5 !important; }
.badge-warning { background: rgba(245,158,11,.18) !important; color: #fcd34d !important; }
.badge-info { background: rgba(59,130,246,.22) !important; color: #93c5fd !important; }
.badge-muted, .count-pill, .tag-soft {
  background: rgba(148,163,184,.16) !important;
  color: #c7d2e5 !important;
}

.alert-success { background: rgba(34,197,94,.18) !important; color: #86efac !important; border-color: rgba(34,197,94,.35) !important; }
.alert-error { background: rgba(239,68,68,.18) !important; color: #fca5a5 !important; border-color: rgba(239,68,68,.35) !important; }
.alert-info { background: rgba(59,130,246,.22) !important; color: #93c5fd !important; border-color: rgba(59,130,246,.35) !important; }

.msg-thread:hover,
.msg-thread.has-unread,
.settings-link:hover,
.settings-link.is-active,
.notif-item.unread,
.msg-public-card.is-unread {
  background: rgba(59, 130, 246, 0.14) !important;
  color: #e8eef8 !important;
}
.msg-thread.is-active {
  background: #12253f !important;
  box-shadow: inset 3px 0 0 #60a5fa !important;
}
.msg-bubble {
  background: #12253f !important;
  color: #e8eef8 !important;
}
.msg-bubble.is-mine {
  background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
  color: #fff !important;
}

.fc .fc-toolbar-title,
.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number,
.fc .fc-list-day-text,
.fc .fc-list-event-title a,
.fc .fc-list-event-time { color: #e8eef8 !important; }
.fc .fc-button {
  background: #06101f !important;
  border-color: rgba(148,163,184,.25) !important;
  color: #e8eef8 !important;
}
.fc .fc-button-primary:not(:disabled).fc-button-active {
  background: #0f1f38 !important;
  border-color: #1a3358 !important;
  color: #fff !important;
}
.fc .fc-day-today { background: rgba(15, 31, 56, 0.45) !important; }
.fc .fc-scrollgrid, .fc .fc-theme-standard td, .fc .fc-theme-standard th {
  border-color: rgba(148,163,184,.18) !important;
}

.cal-context { background: rgba(4, 11, 22, .55) !important; }
.progress-bar { background: rgba(255,255,255,.08) !important; }

table.data tr:hover td { background: rgba(59,130,246,.1) !important; }
.lp-top .lp-logo { background: #fff !important; }
.sidebar-brand a, .brand-text { color: #e8eef8 !important; }
.sidebar .btn-ghost {
  color: #9fb0cc !important;
  border-color: rgba(255,255,255,.18) !important;
  background: transparent !important;
}
.sidebar .btn-ghost:hover {
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
}

/* ========== Dashboard pro ========== */
.dash-page {
  display: grid;
  gap: 1.15rem;
}
.dash-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.4rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(59, 130, 246, 0.22), transparent 55%),
    linear-gradient(145deg, #0f1f38 0%, #0a1628 55%, #06101f 100%);
}
.dash-welcome__eyebrow {
  margin: 0 0 .35rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #93c5fd;
}
.dash-welcome__text h2 {
  margin: 0 0 .35rem;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  color: #fff !important;
}
.dash-welcome__text p:last-child {
  margin: 0;
  color: #9fb0cc;
  max-width: 46ch;
}
.dash-welcome__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
}
.kpi-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.kpi-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.15rem 1.2rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, #0f1f38, #0a1628);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  min-height: 118px;
}
.kpi-card--accent {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
}
.kpi-card--compact {
  min-height: 0;
  padding: 1rem 1.15rem;
}
.kpi-card__label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8fa3c0;
}
.kpi-card__value {
  font-size: clamp(1.7rem, 2.5vw, 2.1rem);
  line-height: 1;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
}
.kpi-card__hint {
  margin-top: auto;
  font-size: .78rem;
  color: #64748b;
}

.dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, .75fr);
  gap: 1rem;
  align-items: start;
}
.dash-side {
  display: grid;
  gap: 1rem;
}
.dash-panel .people-list {
  margin-top: .15rem;
}
.dash-panel--cta .btn {
  margin-top: .35rem;
}
.chart-wrap--dash {
  height: 240px;
  display: grid;
  place-items: center;
}
.chart-wrap--dash canvas {
  max-height: 220px;
}

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .dash-welcome { align-items: stretch; }
  .dash-welcome__actions { width: 100%; }
  .dash-welcome__actions .btn { flex: 1 1 auto; }
  .kpi-grid,
  .kpi-grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .kpi-grid,
  .kpi-grid--3 { grid-template-columns: 1fr; }
}

/* ========== Messagerie : supprimer le blanc ========== */
.msg-app,
.msg-sidebar,
.msg-side-head,
.msg-panel,
.msg-panel-head,
.msg-panel-body,
.msg-welcome,
.msg-compose-body,
.msg-chat,
.msg-stream,
.msg-send-form,
.msg-composer {
  background: #0a1628 !important;
  background-image: none !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
  color: #c7d2e5 !important;
}
.msg-sidebar { background: #06101f !important; }
.msg-stream {
  background: linear-gradient(180deg, #06101f 0%, #0a1628 50%, #0f1f38 100%) !important;
}
.msg-thread:hover { background: rgba(255,255,255,.06) !important; }
.msg-thread.has-unread { background: rgba(59,130,246,.14) !important; }
.msg-thread.is-active {
  background: #12253f !important;
  box-shadow: inset 3px 0 0 #60a5fa !important;
}
.msg-bubble.is-theirs {
  background: #12253f !important;
  border-color: rgba(148,163,184,.22) !important;
  color: #e8eef8 !important;
  box-shadow: none !important;
}
.msg-bubble.is-mine {
  background: linear-gradient(145deg, #1d4ed8, #2563eb) !important;
  color: #fff !important;
}
.msg-welcome h2,
.msg-chat-peer strong,
.msg-side-head h2,
.msg-panel-head strong { color: #e8eef8 !important; }
.msg-preview,
.msg-chat-peer span,
.msg-thread-top .meta,
.msg-welcome p { color: #8fa3c0 !important; }
.msg-welcome-icon {
  background: rgba(59,130,246,.18) !important;
  border-color: rgba(96,165,250,.35) !important;
}
.msg-public-card,
.msg-public-card.is-unread {
  background: #0a1628 !important;
  border-color: rgba(148,163,184,.2) !important;
}

/* ========== Responsive calendrier + app ========== */
.calendar-host {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#calendar,
.calendar-host .fc {
  width: 100% !important;
  max-width: 100%;
}
.fc .fc-view-harness {
  min-height: 320px;
}
.fc .fc-scrollgrid {
  width: 100% !important;
}
.fc .fc-daygrid-event,
.fc .fc-list-event {
  font-size: .78rem;
  line-height: 1.25;
}
.fc .fc-daygrid-day-events {
  margin-top: 2px;
}
.fc .fc-event-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc .fc-list {
  border-radius: 12px;
  overflow: hidden;
}
.cal-context__card--sheet {
  left: 12px !important;
  right: 12px !important;
  bottom: max(16px, env(safe-area-inset-bottom)) !important;
  top: auto !important;
  width: auto !important;
  max-height: min(78vh, 560px);
  overflow: auto;
  border-radius: 18px !important;
}

@media (max-width: 900px) {
  .planning-card {
    padding: .85rem !important;
    border-radius: 14px !important;
  }
  .planning-card .card-header {
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
  }
  .planning-card .toolbar-actions {
    margin-left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: .4rem;
  }
  .planning-card .toolbar-actions .btn {
    width: 100%;
    justify-content: center;
  }
  #calendar {
    padding: .35rem 0 !important;
  }
  .fc .fc-toolbar.fc-header-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: .55rem !important;
    margin-bottom: .85rem !important;
  }
  .fc .fc-toolbar-title {
    font-size: 1.05rem !important;
    text-align: center;
    width: 100%;
  }
  .fc .fc-toolbar-chunk {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem;
  }
  .fc .fc-button {
    padding: .4rem .55rem !important;
    font-size: .75rem !important;
    border-radius: 8px !important;
  }
  .fc .fc-daygrid-day-number {
    font-size: .72rem !important;
    padding: 4px !important;
  }
  .fc .fc-col-header-cell-cushion {
    font-size: .72rem !important;
    padding: 6px 2px !important;
  }
  .fc .fc-daygrid-event {
    font-size: .68rem !important;
    padding: 1px 3px !important;
  }
  .fc .fc-list-event-title,
  .fc .fc-list-event-time {
    font-size: .85rem !important;
  }
  .content {
    padding: .75rem !important;
  }
  .form-row,
  .form-row--3 {
    grid-template-columns: 1fr !important;
  }
  .toolbar-actions {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: .7rem .8rem !important;
  }
  .page-heading {
    font-size: .95rem !important;
  }
  .card {
    padding: .85rem !important;
    border-radius: 14px !important;
  }
  .btn-sm {
    padding: .42rem .7rem;
    font-size: .78rem;
  }
  .people-card {
    padding: .85rem !important;
  }
  .fc .fc-daygrid-body {
    width: 100% !important;
  }
  .fc-theme-standard td,
  .fc-theme-standard th {
    padding: 0 !important;
  }
  .cal-context__row {
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
  }
  .cal-context__row strong {
    text-align: left;
  }
  .cal-context__actions {
    flex-direction: column;
  }
  .cal-context__actions .btn {
    width: 100%;
  }
  .filters,
  .search-bar,
  .filters.filters--simple {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 420px) {
  .fc .fc-toolbar-chunk .fc-button {
    flex: 1 1 auto;
    min-width: 0;
  }
  .kpi-grid,
  .kpi-grid--3 {
    grid-template-columns: 1fr !important;
  }
}

/* ========== Messagerie responsive ========== */
.app-body.is-messaging .main-wrap {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}
.app-body.is-messaging .content {
  min-height: 0;
  height: 100%;
}
.msg-app {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  height: 100%;
}
.msg-sidebar,
.msg-panel,
.msg-chat {
  min-height: 0;
  height: 100%;
}
.msg-panel,
.msg-chat {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.msg-stream {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.msg-send-form,
.wa-composer {
  flex-shrink: 0;
  margin-top: auto;
}
.msg-side-head .btn {
  flex-shrink: 0;
}
.msg-compose-body {
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.msg-compose-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.msg-compose-form .form-actions .btn {
  min-width: 140px;
}

@media (max-width: 900px) {
  .app-body.is-messaging .menu-toggle {
    display: inline-grid !important;
    place-items: center;
    background: #202c33 !important;
    border-color: #3b4a54 !important;
    color: #e9edef !important;
  }
  .app-body.is-messaging .content {
    padding: 0 !important;
  }
  .msg-app {
    flex-direction: column;
    height: 100%;
    min-height: 0;
    border-top: 0;
  }
  .msg-sidebar {
    width: 100% !important;
    max-width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    border-right: 0 !important;
    border-bottom: 0;
  }
  .msg-panel {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }

  /* Liste seule (accueil) */
  .msg-app:not(.has-chat-open):not(.has-compose-open) .msg-panel {
    display: none !important;
  }

  /* Conversation ou composition : panneau plein écran */
  .msg-app.has-chat-open .msg-sidebar,
  .msg-app.has-compose-open .msg-sidebar {
    display: none !important;
  }
  .msg-app.has-chat-open,
  .msg-app.has-compose-open {
    flex-direction: column;
  }
  .msg-app.has-chat-open .msg-panel,
  .msg-app.has-compose-open .msg-panel {
    display: flex !important;
    width: 100%;
    flex: 1;
    min-height: 0;
    height: 100%;
  }

  .msg-back {
    display: inline-flex !important;
  }
  .msg-side-head,
  .wa-side-head {
    padding: .85rem 1rem;
    padding-left: 3.4rem;
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .msg-side-head h2 {
    font-size: 1rem;
  }
  .msg-panel-head {
    padding: .75rem .9rem;
    gap: .65rem;
  }
  .msg-chat-peer strong {
    font-size: .95rem;
  }
  .msg-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: .7rem;
  }
  .msg-thread {
    padding: .85rem 1rem;
    gap: .7rem;
  }
  .msg-stream {
    padding: .9rem 1rem;
    gap: .7rem;
  }
  .msg-bubble {
    max-width: 92% !important;
    padding: .7rem .9rem;
  }
  .msg-bubble-text {
    font-size: .9rem;
  }
  .msg-send-form {
    flex-direction: row;
    align-items: flex-end;
    gap: .55rem;
    padding: .75rem .85rem;
    padding-bottom: max(.75rem, env(safe-area-inset-bottom));
  }
  .msg-send-form textarea {
    min-height: 44px;
    max-height: 120px;
    padding: .7rem .85rem;
    font-size: 1rem;
  }
  .msg-send-form .btn {
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .msg-panel-body,
  .msg-compose-body {
    padding: 1rem !important;
  }
  .msg-compose-form {
    max-width: none;
  }
  .msg-compose-form textarea {
    min-height: 140px;
  }
  .msg-compose-form .form-actions .btn {
    width: 100%;
  }
  .msg-welcome {
    padding: 1.5rem 1rem;
  }
  .msg-welcome h2 {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .msg-thread-top {
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
  }
  .msg-thread-top .meta {
    white-space: normal;
  }
  .msg-send-form {
    flex-wrap: wrap;
  }
  .msg-send-form textarea {
    flex: 1 1 100%;
  }
  .msg-send-form .btn {
    width: 100%;
  }
  .msg-side-head {
    flex-wrap: wrap;
  }
  .msg-side-head .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Formulaire report RDV */
.rdv-report-form {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.rdv-report-form input[type="datetime-local"] {
  max-width: 11.5rem;
  padding: .35rem .45rem;
  font-size: .75rem;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,.28);
  background: #0a1628;
  color: #e8eef8;
}
@media (max-width: 640px) {
  .rdv-report-form {
    width: 100%;
  }
  .rdv-report-form input[type="datetime-local"] {
    max-width: none;
    width: 100%;
  }
  .rdv-report-form .btn {
    width: 100%;
  }
}

/* Formulaire activité + paramètres (écriture) */
.form-card--activity .card-header {
  align-items: flex-start;
}
.activity-form .form-section,
.settings-form .settings-block {
  margin: 0 0 1.25rem;
}
.activity-form fieldset.form-section {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 1rem 1.1rem .35rem;
  margin-bottom: 1.1rem;
  background: rgba(6, 16, 31, 0.35);
}
.activity-form fieldset.form-section legend {
  padding: 0 .45rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8fa3c0;
}
.req {
  color: #f87171;
  font-weight: 600;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.activity-form textarea,
.settings-form textarea {
  min-height: 120px;
  line-height: 1.55;
}
.activity-form input[type="text"],
.activity-form textarea,
.settings-form input[type="text"],
.settings-form input[type="url"],
.settings-form input[type="tel"],
.settings-form input[type="password"],
.settings-form textarea {
  width: 100%;
}
.settings-panel-head p {
  margin: .35rem 0 0;
  color: #8fa3c0;
  max-width: 42rem;
  line-height: 1.45;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: .5rem;
  padding-top: .25rem;
}
@media (max-width: 640px) {
  .activity-form fieldset.form-section {
    padding: .85rem .85rem .2rem;
  }
  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========== Sidebar icônes (rail) — titres au survol / focus ========== */
@media (min-width: 901px) {
  .sidebar.sidebar--icons {
    width: 72px;
    flex: 0 0 72px;
    align-items: center;
    overflow: hidden;
    transition: width .22s var(--ease), box-shadow .22s;
    z-index: 46;
  }
  .sidebar.sidebar--icons:hover,
  .sidebar.sidebar--icons:focus-within,
  .sidebar.sidebar--icons.is-expanded {
    width: 268px;
    align-items: stretch;
    box-shadow: 12px 0 32px rgba(0, 0, 0, 0.28);
  }
  .sidebar.sidebar--icons .sidebar-brand {
    padding: .9rem .4rem;
    justify-content: center;
    border-bottom-color: rgba(148, 163, 184, 0.14);
    transition: padding .22s, justify-content .22s;
  }
  .sidebar.sidebar--icons:hover .sidebar-brand,
  .sidebar.sidebar--icons:focus-within .sidebar-brand,
  .sidebar.sidebar--icons.is-expanded .sidebar-brand {
    padding: 1.1rem 1.15rem;
    justify-content: space-between;
  }
  .sidebar.sidebar--icons .brand-logo--sidebar {
    width: 40px;
    height: 40px;
    transition: width .22s, height .22s;
  }
  .sidebar.sidebar--icons:hover .brand-logo--sidebar,
  .sidebar.sidebar--icons:focus-within .brand-logo--sidebar,
  .sidebar.sidebar--icons.is-expanded .brand-logo--sidebar {
    width: 52px;
    height: 52px;
  }
  .sidebar.sidebar--icons .sidebar-close { display: none !important; }
  .sidebar.sidebar--icons .sidebar-nav {
    width: 100%;
    padding: .55rem .4rem;
    align-items: center;
    gap: .2rem;
    transition: padding .22s, align-items .22s;
  }
  .sidebar.sidebar--icons:hover .sidebar-nav,
  .sidebar.sidebar--icons:focus-within .sidebar-nav,
  .sidebar.sidebar--icons.is-expanded .sidebar-nav {
    padding: 1rem .8rem;
    align-items: stretch;
  }
  .sidebar.sidebar--icons .nav-link {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
    border-radius: 14px;
    position: relative;
    gap: 0;
    transition: width .22s, height .22s, padding .22s, justify-content .22s, background .2s;
  }
  .sidebar.sidebar--icons:hover .nav-link,
  .sidebar.sidebar--icons:focus-within .nav-link,
  .sidebar.sidebar--icons.is-expanded .nav-link {
    width: auto;
    height: auto;
    padding: .75rem .9rem;
    justify-content: flex-start;
    gap: .65rem;
  }
  .sidebar.sidebar--icons .nav-link:hover { transform: none; }
  .sidebar.sidebar--icons .nav-link.is-active {
    box-shadow: none !important;
    background: rgba(96, 165, 250, 0.18) !important;
  }
  .sidebar.sidebar--icons:hover .nav-link.is-active,
  .sidebar.sidebar--icons:focus-within .nav-link.is-active,
  .sidebar.sidebar--icons.is-expanded .nav-link.is-active {
    box-shadow: inset 3px 0 0 #94a3b8 !important;
  }
  .sidebar.sidebar--icons .nav-label,
  .sidebar.sidebar--icons .user-chip__text {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity .15s, max-width .22s;
  }
  .sidebar.sidebar--icons:hover .nav-label,
  .sidebar.sidebar--icons:focus-within .nav-label,
  .sidebar.sidebar--icons.is-expanded .nav-label,
  .sidebar.sidebar--icons:hover .user-chip__text,
  .sidebar.sidebar--icons:focus-within .user-chip__text,
  .sidebar.sidebar--icons.is-expanded .user-chip__text {
    opacity: 1;
    max-width: 180px;
    pointer-events: auto;
  }
  .sidebar.sidebar--icons .nav-ico {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: inherit;
  }
  .sidebar.sidebar--icons .nav-ico svg {
    width: 22px;
    height: 22px;
    display: block;
  }
  .sidebar.sidebar--icons .nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 1rem;
    height: 1rem;
    font-size: .62rem;
  }
  .sidebar.sidebar--icons:hover .nav-badge,
  .sidebar.sidebar--icons:focus-within .nav-badge,
  .sidebar.sidebar--icons.is-expanded .nav-badge {
    position: static;
    margin-left: auto;
  }
  .sidebar.sidebar--icons .sidebar-footer {
    width: 100%;
    padding: .55rem .4rem .85rem;
    align-items: center;
    border-top-color: rgba(148, 163, 184, 0.14);
  }
  .sidebar.sidebar--icons:hover .sidebar-footer,
  .sidebar.sidebar--icons:focus-within .sidebar-footer,
  .sidebar.sidebar--icons.is-expanded .sidebar-footer {
    padding: 1rem;
    align-items: stretch;
  }
  .sidebar.sidebar--icons .user-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 48px;
    height: 48px;
    margin: 0 auto .15rem;
    overflow: hidden;
  }
  .sidebar.sidebar--icons:hover .user-chip,
  .sidebar.sidebar--icons:focus-within .user-chip,
  .sidebar.sidebar--icons.is-expanded .user-chip {
    width: 100%;
    height: auto;
    justify-content: flex-start;
    gap: .75rem;
    margin: 0 0 .35rem;
  }
  .sidebar.sidebar--icons .user-chip__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #1d4ed8, #3b82f6);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    flex-shrink: 0;
  }
  .sidebar.sidebar--icons .nav-link--logout {
    margin: 0 auto;
  }
  .sidebar.sidebar--icons:hover .nav-link--logout,
  .sidebar.sidebar--icons:focus-within .nav-link--logout,
  .sidebar.sidebar--icons.is-expanded .nav-link--logout {
    margin: 0;
  }
}

/* Mobile drawer: garder labels visibles quand ouvert */
@media (max-width: 900px) {
  .sidebar.sidebar--icons {
    width: min(300px, 84vw);
  }
  .sidebar.sidebar--icons .nav-link {
    justify-content: flex-start;
    padding: .75rem .9rem;
    width: auto;
    height: auto;
  }
  .sidebar.sidebar--icons .nav-ico {
    display: inline-grid;
    place-items: center;
    margin-right: .7rem;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }
  .sidebar.sidebar--icons .nav-ico svg {
    width: 20px;
    height: 20px;
  }
  .sidebar.sidebar--icons .nav-label,
  .sidebar.sidebar--icons .user-chip__text {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    overflow: visible;
    white-space: normal;
  }
  .sidebar.sidebar--icons .user-chip {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    height: auto;
  }
  .sidebar.sidebar--icons .user-chip__avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #1d4ed8, #3b82f6);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
  }
}

.nav-ico { display: inline-grid; place-items: center; }
.nav-link { position: relative; }

/* ========== Messagerie style WhatsApp Web (bleu de nuit) ========== */
.app-body.is-messaging .wa-skin.msg-app,
.wa-skin.msg-app {
  background: #06101f !important;
  border-top: 0 !important;
  height: 100% !important;
  min-height: 0;
  flex: 1 1 auto;
  display: flex !important;
  align-items: stretch;
}
.wa-skin .msg-sidebar {
  width: min(420px, 38%);
  max-width: 420px;
  flex: 0 0 min(420px, 38%);
  height: 100% !important;
  min-height: 0;
  display: flex !important;
  flex-direction: column;
  background: #0a1628 !important;
  border-right: 1px solid rgba(148, 163, 184, 0.18) !important;
}
.wa-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem 1rem;
  background: #0f1f38 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  flex-shrink: 0;
  min-height: 60px;
}
.wa-side-head__user {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}
.wa-side-head__user strong {
  font-size: 1rem;
  color: #e8eef8 !important;
}
.msg-avatar--self {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1d4ed8, #3b82f6) !important;
}
.wa-new-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #9fb0cc;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.wa-new-btn:hover {
  background: rgba(59, 130, 246, 0.16);
  color: #e8eef8;
}
.wa-search {
  padding: .55rem .75rem;
  background: #0a1628 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  flex-shrink: 0;
}
.wa-search__box {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: #12253f !important;
  border-radius: 8px;
  padding: .45rem .85rem;
  color: #8fa3c0;
}
.wa-search__box input {
  flex: 1;
  border: 0 !important;
  background: transparent !important;
  color: #e8eef8 !important;
  padding: .2rem 0 !important;
  font-size: .9rem;
  outline: none;
  box-shadow: none !important;
}
.wa-skin .msg-list {
  background: #0a1628 !important;
}
.wa-skin .msg-thread {
  padding: .7rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  gap: .8rem;
}
.wa-skin .msg-thread:hover {
  background: #12253f !important;
}
.wa-skin .msg-thread.is-active {
  background: #0f1f38 !important;
  box-shadow: inset 3px 0 0 #60a5fa !important;
}
.wa-skin .msg-thread.has-unread .msg-preview {
  color: #e8eef8;
  font-weight: 500;
}
.wa-skin .msg-avatar {
  width: 49px;
  height: 49px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1a3358, #2563eb) !important;
  font-size: .8rem;
}
.wa-skin .msg-thread-top strong {
  color: #e8eef8 !important;
  font-size: 1rem;
  font-weight: 500;
}
.wa-skin .msg-thread-top .meta {
  color: #8fa3c0 !important;
  font-size: .72rem;
}
.msg-preview-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  justify-content: space-between;
}
.wa-skin .msg-preview {
  color: #8fa3c0;
  font-size: .85rem;
  flex: 1;
  min-width: 0;
}
.wa-unread {
  flex-shrink: 0;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}
.wa-skin .msg-panel {
  background: #06101f !important;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100% !important;
  display: flex !important;
  flex-direction: column;
}
.wa-skin .msg-panel-head,
.wa-skin .msg-chat-header {
  background: #0f1f38 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  min-height: 60px;
  padding: .55rem 1rem;
  flex-shrink: 0;
}
.wa-skin .msg-chat-peer strong { color: #e8eef8 !important; }
.wa-skin .msg-chat-peer span { color: #8fa3c0 !important; }
.wa-skin .msg-back {
  color: #9fb0cc;
  border-color: transparent;
  background: transparent;
}
.wa-skin .msg-stream {
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(30, 64, 120, 0.28), transparent 55%),
    radial-gradient(560px 280px at 88% 100%, rgba(37, 99, 235, 0.12), transparent 50%),
    #06101f !important;
  padding: 1rem 4% 1.5rem;
  gap: .2rem;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  height: auto;
}
.wa-day-chip {
  align-self: center;
  margin: .65rem 0;
  padding: .35rem .75rem;
  border-radius: 8px;
  background: #12253f;
  color: #8fa3c0;
  font-size: .75rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.wa-skin .msg-bubble {
  max-width: min(65%, 560px);
  padding: .4rem .55rem .25rem .7rem;
  border-radius: 8px;
  position: relative;
  margin: .15rem 0;
  box-shadow: 0 1px 0.5px rgba(0,0,0,.2);
  border: 0 !important;
}
.wa-skin .msg-bubble.is-mine {
  align-self: flex-end;
  background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
  color: #fff !important;
  border-top-right-radius: 0;
}
.wa-skin .msg-bubble.is-theirs {
  align-self: flex-start;
  background: #12253f !important;
  color: #e8eef8 !important;
  border-top-left-radius: 0;
}
.wa-skin .msg-bubble-text {
  font-size: .94rem;
  line-height: 1.45;
  padding-right: 3.2rem;
}
.wa-skin .msg-bubble-time {
  float: right;
  margin: -.15rem 0 0 .5rem;
  font-size: .68rem;
  color: rgba(232, 238, 248, 0.55);
  white-space: nowrap;
}
.wa-composer.msg-send-form {
  background: #0f1f38 !important;
  border-top: 1px solid rgba(148, 163, 184, 0.14) !important;
  padding: .55rem .9rem;
  gap: .55rem;
  align-items: flex-end;
  flex-shrink: 0 !important;
  margin-top: auto;
  width: 100%;
  position: relative;
  z-index: 2;
}
.wa-composer textarea {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  border-radius: 8px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  background: #06101f !important;
  color: #e8eef8 !important;
  padding: .7rem 1rem !important;
  resize: none;
  line-height: 1.4;
}
.wa-send {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s, transform .15s, filter .2s;
}
.wa-send:hover {
  filter: brightness(1.1);
  transform: scale(1.04);
}
.wa-welcome {
  background:
    radial-gradient(520px 280px at 50% 40%, rgba(59, 130, 246, 0.12), transparent 60%),
    #0a1628 !important;
  color: #8fa3c0 !important;
  border-bottom: 6px solid #2563eb;
  flex: 1;
  min-height: 0;
  height: 100%;
}
.wa-welcome h2 {
  color: #e8eef8 !important;
  font-weight: 300;
  font-size: 1.75rem;
}
.wa-welcome__icon {
  color: #1a3358;
  margin-bottom: .25rem;
}
.wa-skin .msg-compose-body {
  background: #06101f !important;
}
.wa-skin .msg-empty-side {
  color: #8fa3c0 !important;
}

@media (max-width: 900px) {
  .wa-skin .msg-sidebar { width: 100% !important; flex: 1 1 auto !important; max-width: none; }
  .wa-skin .msg-stream { padding: .85rem 4% 1.1rem; }
  .wa-skin .msg-bubble { max-width: 88% !important; }
  .wa-skin .msg-bubble-text { padding-right: 2.8rem; }
  .wa-side-head { min-height: 56px; }
}

/* ========== Messagerie plein viewport (fix) ========== */
html:has(body.is-messaging),
body.is-messaging {
  height: 100% !important;
  overflow: hidden !important;
}
body.is-messaging .app-shell {
  height: 100dvh !important;
  max-height: 100dvh !important;
}
body.is-messaging .sidebar.sidebar--icons {
  height: 100dvh;
}
body.is-messaging .main-wrap,
body.is-messaging .content,
body.is-messaging .msg-app {
  height: 100% !important;
  max-height: 100%;
}
body.is-messaging .msg-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
body.is-messaging .msg-chat {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
}
body.is-messaging .wa-composer,
body.is-messaging .msg-send-form {
  flex: 0 0 auto !important;
  margin-top: auto !important;
}
@media (min-width: 901px) {
  body.is-messaging .menu-toggle { display: none !important; }
}

/* ========== Menu titres (sans icônes) + scrollbars masquées ========== */
.sidebar .nav-ico { display: none !important; }
.sidebar .nav-link {
  justify-content: space-between;
  gap: .5rem;
}
.sidebar .nav-label {
  display: inline !important;
  opacity: 1 !important;
  max-width: none !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  clip: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  pointer-events: auto !important;
}
.sidebar .user-chip__text {
  display: block !important;
  opacity: 1 !important;
  max-width: none !important;
}
.sidebar .user-chip {
  display: flex !important;
  align-items: center;
  gap: .75rem;
  width: 100% !important;
  height: auto !important;
}

/* Masquer les barres de défilement (scroll possible) */
.sidebar-nav,
.msg-list,
.msg-stream,
.msg-compose-body,
.msg-panel-body,
.content,
.wa-skin .msg-list,
.wa-skin .msg-stream {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar-nav::-webkit-scrollbar,
.msg-list::-webkit-scrollbar,
.msg-stream::-webkit-scrollbar,
.msg-compose-body::-webkit-scrollbar,
.msg-panel-body::-webkit-scrollbar,
.content::-webkit-scrollbar,
.wa-skin .msg-list::-webkit-scrollbar,
.wa-skin .msg-stream::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* ========== Paramètres (vrai panneau) ========== */
.settings-page {
  max-width: 1100px;
  margin: 0 auto;
}
.settings-page__hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.35rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(520px 180px at 0% 0%, rgba(37, 99, 235, 0.22), transparent 55%),
    linear-gradient(180deg, #0f1f38, #0a1628);
}
.settings-page__eyebrow {
  margin: 0 0 .35rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8fa3c0;
}
.settings-page__title {
  margin: 0 0 .35rem !important;
  font-size: 1.55rem !important;
  color: #e8eef8 !important;
}
.settings-page__lead {
  margin: 0;
  color: #9fb0cc;
  max-width: 46ch;
  font-size: .92rem;
}
.settings-page__summary {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .7rem .9rem;
  border-radius: 14px;
  background: rgba(6, 16, 31, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  min-width: min(280px, 100%);
}
.settings-page__summary strong {
  display: block;
  color: #e8eef8;
  font-size: .95rem;
}
.settings-page__summary span {
  display: block;
  color: #8fa3c0;
  font-size: .78rem;
  margin-top: .15rem;
}

.settings-app {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  gap: 1.15rem !important;
  align-items: start !important;
}
.settings-nav {
  background: linear-gradient(180deg, #0f1f38, #0a1628) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.22) !important;
  padding: 1rem !important;
  position: sticky !important;
  top: 84px;
}
.settings-nav__label {
  margin: 0 0 .55rem .35rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8fa3c0;
}
.settings-links {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.settings-link {
  display: flex !important;
  align-items: center !important;
  gap: .75rem !important;
  padding: .8rem .85rem !important;
  border-radius: 14px !important;
  text-decoration: none !important;
  color: #9fb0cc !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}
.settings-link__ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(15, 31, 56, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #93c5fd;
  flex-shrink: 0;
}
.settings-link__text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}
.settings-link__text strong {
  font-size: .92rem;
  font-weight: 600;
  color: inherit;
}
.settings-link__text small {
  font-size: .72rem;
  color: #8fa3c0;
}
.settings-link:hover {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #e8eef8 !important;
  border-color: rgba(96, 165, 250, 0.25) !important;
}
.settings-link.is-active {
  background: rgba(59, 130, 246, 0.16) !important;
  color: #fff !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
}
.settings-link.is-active .settings-link__ico {
  background: linear-gradient(145deg, #1d4ed8, #3b82f6);
  color: #fff;
  border-color: transparent;
}
.settings-nav__meta {
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.settings-meta-row {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: 0 .2rem;
}
.settings-meta-row span {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #8fa3c0;
  font-weight: 600;
}
.settings-meta-row strong {
  font-size: .82rem;
  color: #c7d2e5;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-nav__logout {
  margin-top: .25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem .8rem;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fca5a5;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.08);
}
.settings-nav__logout:hover {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
}

.settings-panel {
  background: linear-gradient(180deg, #0f1f38, #0a1628) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.22) !important;
  padding: 1.35rem 1.4rem 1.25rem !important;
  min-height: 480px !important;
}
.settings-panel-head {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  margin-bottom: 1.2rem !important;
  padding-bottom: 1rem !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
}
.settings-panel-head__ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.25);
  flex-shrink: 0;
}
.settings-panel-head h2 {
  margin: 0 0 .3rem !important;
  font-size: 1.2rem !important;
  color: #e8eef8 !important;
}
.settings-panel-head p {
  margin: 0 !important;
  color: #8fa3c0 !important;
  font-size: .9rem !important;
  max-width: 52ch;
}

.settings-form {
  max-width: 760px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
}
.settings-block {
  padding: 1.15rem 1.2rem !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 16px !important;
  background: rgba(6, 16, 31, 0.45) !important;
}
.settings-block--secure {
  border-color: rgba(96, 165, 250, 0.28) !important;
  background:
    radial-gradient(420px 140px at 100% 0%, rgba(37, 99, 235, 0.14), transparent 60%),
    rgba(6, 16, 31, 0.55) !important;
}
.settings-block__head {
  margin-bottom: 1rem;
}
.settings-block__title {
  margin: 0 0 .25rem !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: #93c5fd !important;
}
.settings-block__head p {
  margin: 0;
  font-size: .82rem;
  color: #8fa3c0;
}
.settings-form-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  padding-top: .2rem;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent, #0a1628 35%);
  padding-bottom: .15rem;
}
.settings-readonly {
  padding: 1.1rem 1.15rem !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 16px !important;
  background: rgba(6, 16, 31, 0.45) !important;
}
.settings-info-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: .85rem 1.1rem !important;
}
.settings-info-item {
  padding: .85rem .95rem !important;
  border-radius: 12px !important;
  background: #0a1628 !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
}
.settings-label {
  color: #8fa3c0 !important;
}
.settings-info-grid strong {
  color: #e8eef8 !important;
}
.logo-upload__preview {
  border: 1px dashed rgba(148, 163, 184, 0.35) !important;
  background: rgba(6, 16, 31, 0.55) !important;
}
.settings-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1d4ed8, #3b82f6);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .28);
}
.settings-avatar--img {
  object-fit: cover;
  background: #12253f;
  padding: 0;
  display: block;
}

@media (max-width: 900px) {
  .settings-page__hero {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-app {
    grid-template-columns: 1fr !important;
  }
  .settings-nav {
    position: static !important;
  }
  .settings-links {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: .4rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .settings-links::-webkit-scrollbar { display: none; }
  .settings-link {
    flex: 0 0 auto;
    min-width: 170px;
  }
  .settings-nav__meta { display: none; }
  .settings-info-grid { grid-template-columns: 1fr !important; }
}
