:root {
  --navy: #152430;
  --navy-2: #1e3244;
  --gold: #e2a73e;
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1c2b36;
  --muted: #6b7c88;
  --ok: #2e8b57;
  --warn: #c77b12;
  --err: #b23a3a;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--text); }
main { max-width: 1100px; margin: 24px auto; padding: 0 16px; }

.topbar { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 18px; padding: 12px 22px; flex-wrap: wrap; }
.topbar a { color: #cfd9e0; text-decoration: none; font-size: 15px; }
.topbar a:hover { color: var(--gold); }
.topbar .brand { font-size: 17px; letter-spacing: 1px; margin-right: 12px; }
.topbar .brand b { color: var(--gold); }
.topbar .right { margin-left: auto; }

.card { background: var(--card); border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(21,36,48,.08); }
.card h2 { margin: 0 0 12px; font-size: 17px; color: var(--navy); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--navy); color: #fff; border-radius: 10px; padding: 14px; text-align: center; }
.kpi .n { font-size: 26px; font-weight: 700; color: var(--gold); }
.kpi .l { font-size: 12px; color: #cfd9e0; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e6ebef; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; color: #fff; }
.badge.facebook { background: #1877f2; } .badge.instagram { background: #c13584; }
.badge.linkedin { background: #0a66c2; } .badge.google { background: #34a853; }
.st { font-size: 12px; font-weight: 600; }
.st.idee { color: var(--muted); } .st.a_valider { color: var(--warn); }
.st.approuve { color: #2563eb; } .st.publie { color: var(--ok); }
.st.echec, .st.refuse { color: var(--err); }

button, .btn { background: var(--navy); color: #fff; border: 0; border-radius: 7px; padding: 8px 14px; cursor: pointer; font-size: 14px; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { background: var(--navy-2); }
button.ok { background: var(--ok); } button.warn { background: var(--warn); } button.err { background: var(--err); }
button.ghost { background: transparent; color: var(--navy); border: 1px solid #c8d2da; }

input, textarea, select { width: 100%; padding: 9px 11px; border: 1px solid #c8d2da; border-radius: 7px; font: inherit; background: #fff; }
textarea { min-height: 110px; resize: vertical; }
label { font-size: 13px; color: var(--muted); display: block; margin: 10px 0 4px; }
form.inline { display: inline; }

.post-preview { white-space: pre-wrap; background: #f8fafb; border: 1px solid #e6ebef; border-radius: 8px; padding: 12px; font-size: 14px; }
.post-img { max-width: 320px; border-radius: 8px; border: 1px solid #e6ebef; }
.muted { color: var(--muted); font-size: 13px; }
.error-box { background: #fdf1f1; border: 1px solid #ecc8c8; color: var(--err); border-radius: 8px; padding: 10px 12px; font-size: 13px; }

.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 12px; white-space: pre-wrap; font-size: 14.5px; line-height: 1.45; }
.msg.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 3px; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid #e6ebef; border-bottom-left-radius: 3px; }
.chat-form { display: flex; gap: 10px; }
.chat-form textarea { min-height: 54px; flex: 1; }

.login-wrap { max-width: 360px; margin: 10vh auto; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- Salle de réunion (bureau de direction) --- */
.reunion-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.boardroom {
  position: relative; width: 100%; aspect-ratio: 4/3; min-height: 400px;
  border-radius: 14px; overflow: hidden;
  /* murs lambrissés + parquet chevrons suggéré */
  background:
    linear-gradient(180deg, #23303b 0%, #2b3a46 34%, transparent 34%),
    repeating-linear-gradient(105deg, #7a5638 0 26px, #6d4c30 26px 52px),
    #6d4c30;
  box-shadow: inset 0 0 80px rgba(0,0,0,.45);
}
.boardroom::before { /* lumière du plafonnier */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 45% at 50% 42%, rgba(255,240,210,.28), transparent 70%);
  pointer-events: none;
}
.board-table {
  position: absolute; left: 15%; top: 24%; width: 70%; height: 48%;
  border-radius: 50%;
  /* plateau noyer verni */
  background:
    radial-gradient(ellipse at 38% 30%, rgba(255,255,255,.22), transparent 45%),
    repeating-linear-gradient(93deg, rgba(0,0,0,.10) 0 7px, transparent 7px 14px),
    radial-gradient(ellipse at center, #8a5a33 0%, #6e4526 55%, #53331b 100%);
  border: 6px solid #3a2413;
  box-shadow: 0 22px 30px rgba(0,0,0,.45), inset 0 3px 10px rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
}
.table-inlay { /* liseré doré incrusté */
  position: absolute; inset: 7%; border-radius: 50%;
  border: 2px solid rgba(226,167,62,.55);
  box-shadow: inset 0 0 18px rgba(0,0,0,.25);
}
.table-logo {
  color: rgba(255,235,200,.55); text-align: center; font-size: 12px;
  letter-spacing: 4px; font-family: Georgia, serif; text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.table-logo b { color: rgba(226,167,62,.85); font-size: 10px; letter-spacing: 3px; }

.seat { position: absolute; width: 112px; text-align: center; transform: translate(-50%, -50%); transition: all .3s; z-index: 2; }
.seat .chair { /* fauteuil cuir à haut dossier */
  position: absolute; left: 50%; top: 24px; transform: translateX(-50%);
  width: 66px; height: 58px; border-radius: 30px 30px 14px 14px;
  background: linear-gradient(180deg, #2c3a46 0%, #1b2731 80%);
  border: 2px solid #0f1820;
  box-shadow: inset 0 4px 8px rgba(255,255,255,.10), 0 6px 12px rgba(0,0,0,.45);
  z-index: -1;
}
.seat .chair.boss-chair {
  width: 78px; height: 64px;
  background: linear-gradient(180deg, #5a3b1e 0%, #3a2413 80%);
  border-color: #241608;
  box-shadow: inset 0 4px 8px rgba(255,255,255,.14), 0 0 0 2px rgba(226,167,62,.45), 0 6px 14px rgba(0,0,0,.5);
}
.seat .avatar {
  width: 54px; height: 54px; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #e7edf2);
  border: 3px solid #9fb0bd; display: flex; align-items: center;
  justify-content: center; font-size: 26px; box-shadow: 0 3px 10px rgba(0,0,0,.4);
  transition: all .3s;
}
.seat .avatar.boss { border-color: var(--gold); background: radial-gradient(circle at 35% 30%, #fff9ec, #f3e2bd); }
.seat-name {
  font-size: 11.5px; font-weight: 600; color: #f0e6d4; margin-top: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,.8); letter-spacing: .3px;
}
.seat.speaking .avatar { border-color: var(--gold); box-shadow: 0 0 0 5px rgba(226,167,62,.35), 0 0 22px rgba(226,167,62,.7); transform: scale(1.12); }
.seat .bubble {
  display: none; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(100% + 6px); width: 190px; background: #fffdf8; border: 1px solid var(--gold);
  border-radius: 10px; padding: 7px 9px; font-size: 12px; line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0,0,0,.45); z-index: 6; text-align: left; color: var(--text);
}
.seat .bubble.show { display: block; animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) scale(.85); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
.seat-boss { left: 50%; top: 90%; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #d33; margin-left: 6px; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }

.meeting-chat { height: 430px; overflow-y: auto; background: #f8fafb; border: 1px solid #e6ebef; border-radius: 10px; padding: 12px; }
.mmsg { margin-bottom: 10px; font-size: 14px; }
.mmsg .who { font-weight: 700; color: var(--navy); }
.mmsg .when { color: var(--muted); font-size: 11px; margin-left: 6px; }
.mmsg .what { white-space: pre-wrap; margin-top: 2px; line-height: 1.4; }
.mmsg.boss .what { background: #fdf6e8; border-left: 3px solid var(--gold); padding: 6px 10px; border-radius: 6px; }
.who-chef { color: #b0782a; } .who-planificateur { color: #2563eb; }
.who-redacteur { color: #7c3aed; } .who-publieur { color: #0d9488; } .who-analyste { color: #b23a3a; }

@media (max-width: 1000px) { .reunion-layout { grid-template-columns: 1fr; } }

@media (max-width: 700px) {
  main { margin: 12px auto; }
  .msg { max-width: 92%; }
  table { font-size: 13px; }
}
