/* Thème proche des captures : fond #0d1117, vert #2ea043 */

:root {
  --dash-bg: #0d1117;
  --dash-card: #161b22;
  --dash-border: #30363d;
  --dash-green: #2ea043;
  --dash-green-dim: rgba(46, 160, 67, 0.15);
  --dash-red: #da3633;
  --dash-text: #f0f6fc;
  --dash-muted: #8b949e;
  --dash-blue-accent: #58a6ff;
  --dash-sidebar-w: 260px;
}

* {
  box-sizing: border-box;
}

.dash-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--dash-bg);
  color: var(--dash-text);
  -webkit-font-smoothing: antialiased;
}

.dash-layout {
  display: flex;
  min-height: 100vh;
}

.dash-sidebar {
  width: var(--dash-sidebar-w);
  flex-shrink: 0;
  background: #010409;
  border-right: 1px solid var(--dash-border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
}

.dash-logo {
  padding: 0 1.25rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-logo-eyefind {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  color: #d4a017;
  text-shadow: 0 0 12px rgba(212, 160, 23, 0.35);
}

.dash-logo-dot {
  color: var(--dash-muted);
  font-weight: 400;
}

.dash-logo-biz {
  color: #3fb950;
  font-weight: 700;
  font-style: normal;
  font-family: inherit;
}

.dash-nav-label {
  margin: 0 1.25rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3fb950;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.75rem;
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  color: var(--dash-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.15s, background 0.15s;
}

.dash-nav-link:hover {
  color: var(--dash-text);
  background: rgba(255, 255, 255, 0.04);
}

.dash-nav-link.is-active {
  color: #3fb950;
  background: var(--dash-green-dim);
  border-left-color: #3fb950;
}

.dash-nav-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-nav-icon svg {
  width: 100%;
  height: 100%;
}

.dash-sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.25rem 0;
}

.dash-logout {
  font-size: 0.8rem;
  color: var(--dash-muted);
}

.dash-logout:hover {
  color: var(--dash-text);
}

.dash-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dash-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--dash-border);
  background: rgba(1, 4, 9, 0.6);
}

.dash-burger {
  display: none;
  background: none;
  border: none;
  color: var(--dash-text);
  padding: 0.35rem;
  cursor: pointer;
}

.dash-burger svg {
  width: 1.35rem;
  height: 1.35rem;
}

.dash-topbar-title {
  flex: 1;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.dash-topbar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dash-badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3fb950;
  box-shadow: 0 0 8px #3fb950;
}

.dash-avatar-sm {
  border-radius: 50%;
  border: 2px solid var(--dash-border);
}

.dash-content {
  padding: 1.5rem;
  flex: 1;
}

.dash-alert {
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(88, 166, 255, 0.35);
  background: rgba(56, 139, 253, 0.1);
  color: var(--dash-text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.dash-alert--warn {
  border-color: rgba(240, 136, 62, 0.45);
  background: rgba(240, 136, 62, 0.1);
}

.dash-alert--ok {
  border-color: rgba(63, 185, 80, 0.45);
  background: rgba(63, 185, 80, 0.1);
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

.dash-card {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 1.5rem;
}

.dash-profile {
  grid-column: 1;
  grid-row: 1 / span 2;
}

@media (max-width: 960px) {
  .dash-profile {
    grid-row: auto;
  }
}

.dash-profile-row {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.dash-avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid var(--dash-border);
  object-fit: cover;
}

.dash-profile-name {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.dash-profile-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--dash-muted);
}

.dash-link-muted {
  color: var(--dash-red);
}

.dash-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dash-stat {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(63, 185, 80, 0.45);
  border-radius: 8px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.dash-stat-icon svg {
  width: 1rem;
  height: 1rem;
  color: #3fb950;
}

.dash-stat-muted {
  color: var(--dash-muted);
}

.dash-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.dash-meta li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--dash-border);
  color: var(--dash-muted);
}

.dash-meta li:first-child {
  border-top: none;
  padding-top: 0;
}

.dash-meta strong {
  color: var(--dash-text);
  font-weight: 600;
}

.dash-meta-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-meta-icon svg {
  width: 100%;
  height: 100%;
}

.dash-meta-icon.discord svg {
  color: #5865f2;
}

.dash-welcome {
  grid-column: 2;
}

.dash-announces {
  grid-column: 1 / -1;
}

.dash-welcome-title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.dash-welcome-text {
  margin: 0;
  color: var(--dash-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.dash-job .dash-card-title,
.dash-links .dash-card-title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.dash-card-text {
  margin: 0 0 1rem;
  color: var(--dash-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dash-btn-outline {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1px solid #3fb950;
  border-radius: 8px;
  color: #3fb950;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.dash-btn-outline:hover {
  background: var(--dash-green-dim);
}

.dash-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.dash-btn-green {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(46, 160, 67, 0.2);
  border: 1px solid #3fb950;
  color: #3fb950;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.dash-btn-green:hover {
  background: rgba(46, 160, 67, 0.35);
}

.dash-btn-red {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--dash-red);
  border: 1px solid #f85149;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.dash-btn-red:hover {
  filter: brightness(1.08);
}

.dash-job-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.dash-role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--dash-border);
  color: var(--dash-muted);
}

.dash-role-badge--patron {
  color: #f0883e;
  border-color: rgba(240, 136, 62, 0.5);
  background: rgba(240, 136, 62, 0.12);
}

.dash-role-badge--copatron {
  color: #58a6ff;
  border-color: rgba(88, 166, 255, 0.45);
  background: rgba(88, 166, 255, 0.1);
}

.dash-role-badge--employe {
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.45);
  background: rgba(63, 185, 80, 0.1);
}

.dash-perms-title {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dash-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-perms-list {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  font-size: 0.85rem;
  color: var(--dash-text);
  line-height: 1.45;
}

.dash-muted {
  color: var(--dash-muted) !important;
}

.dash-mt {
  margin-top: 0.5rem;
}

.ef-two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .ef-two-col {
    grid-template-columns: 1fr;
  }
}

.ef-card--wide {
  min-width: 0;
}

.ef-h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.ef-hint {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--dash-muted);
  line-height: 1.45;
}

.ef-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ef-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dash-muted);
}

.ef-input,
.ef-textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--dash-border);
  background: #0d1117;
  color: var(--dash-text);
  font-family: inherit;
  font-size: 0.9rem;
}

.ef-textarea {
  resize: vertical;
  min-height: 120px;
}

.ef-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.ef-submit {
  align-self: flex-start;
  margin-top: 0.35rem;
}

.ef-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.ef-mt {
  margin-top: 1.25rem;
}

.ef-table-wrap {
  overflow-x: auto;
}

.ef-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ef-table th,
.ef-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--dash-border);
  text-align: left;
  vertical-align: top;
}

.ef-table th {
  color: var(--dash-muted);
  font-weight: 600;
}

.ef-mail-body {
  margin-top: 0.35rem;
  color: var(--dash-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.ef-nowrap {
  white-space: nowrap;
}

.ef-mono {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
}

.ef-inline {
  display: inline;
  margin: 0;
}

.ef-btn-danger {
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(248, 81, 73, 0.5);
  background: rgba(218, 54, 51, 0.15);
  color: #f85149;
  cursor: pointer;
  font-family: inherit;
}

.ef-btn-danger:hover {
  background: rgba(218, 54, 51, 0.3);
}

.ef-annonce-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ef-annonce-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--dash-border);
}

.ef-annonce-item:last-child {
  border-bottom: none;
}

.ef-annonce-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.ef-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.ef-badge--on {
  color: #3fb950;
  background: rgba(63, 185, 80, 0.15);
}

.ef-badge--off {
  color: var(--dash-muted);
  background: rgba(255, 255, 255, 0.05);
}

.ef-date {
  font-size: 0.8rem;
  color: var(--dash-muted);
}

.ef-annonce-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.ef-annonce-body {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--dash-muted);
  margin-bottom: 0.75rem;
}

.ef-annonce-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Messagerie citoyen */
.mail-app {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .mail-app {
    grid-template-columns: 1fr;
  }
}

.mail-folders {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mail-btn-new {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid #00a2ed;
  color: #00a2ed;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  font-size: 0.9rem;
}

.mail-btn-new:hover {
  background: rgba(0, 162, 237, 0.12);
}

.mail-folder-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mail-folder-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--dash-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.mail-folder-link:hover {
  color: var(--dash-text);
  background: rgba(255, 255, 255, 0.04);
}

.mail-folder-link.is-active {
  background: #00a2ed;
  color: #fff;
}

.mail-folder-link.is-active .dash-nav-icon svg {
  color: #fff;
}

.mail-panel {
  min-width: 0;
}

.mail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mail-list-item a {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--dash-border);
  text-decoration: none;
  color: inherit;
}

.mail-list-item a:hover {
  background: rgba(255, 255, 255, 0.03);
}

.mail-list-subject {
  display: block;
  font-weight: 600;
}

.mail-list-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--dash-muted);
  margin-top: 0.25rem;
}

.mail-identity-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.25);
}

.mail-identity-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #00a2ed;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.mail-identity-name {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.mail-identity-line {
  margin: 0.2rem 0;
  font-size: 0.85rem;
  color: var(--dash-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mail-thread-card {
  border-radius: 12px;
}

.mail-thread-back {
  margin: 0 0 1rem;
}

.mail-thread-back a {
  color: #58a6ff;
  text-decoration: none;
}

.mail-thread-head {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mail-thread-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #30363d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.mail-thread-body {
  line-height: 1.55;
  color: var(--dash-text);
}

.mail-thread-del {
  margin-top: 1rem;
}

.mail-actions-cell {
  white-space: nowrap;
}

.mail-reply-link {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 0.8rem;
  color: #58a6ff;
  text-decoration: none;
}

.mail-reply-link:hover {
  text-decoration: underline;
}

.mail-aside-h {
  margin-top: 1rem;
}

/* Annonces publiques (grille) */
.ann-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.ann-card {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ann-card-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.ann-card-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(145deg, #21262d, #161b22);
  border: 1px solid var(--dash-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dash-muted);
  flex-shrink: 0;
}

.ann-card-company {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dash-muted);
  font-weight: 600;
}

.ann-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.ann-card-excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: var(--dash-muted);
  line-height: 1.45;
  flex: 1;
}

.ann-card-date {
  margin: 0;
  font-size: 0.8rem;
  color: var(--dash-muted);
}

.ann-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  align-items: center;
}

.ann-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.ann-btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.ann-btn--primary {
  background: #00a2ed;
  color: #fff;
  border-color: rgba(0, 162, 237, 0.5);
}

.ann-btn--primary:hover {
  filter: brightness(1.08);
}

.ann-btn--ghost {
  border-color: var(--dash-border);
  color: var(--dash-text);
  background: transparent;
}

.ann-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ann-detail-meta {
  margin-bottom: 1rem;
}

.ann-back {
  color: #58a6ff;
  text-decoration: none;
}

.ann-card--solo {
  max-width: 720px;
}

.ann-card-body {
  line-height: 1.55;
  color: var(--dash-text);
}

.ann-card--has-media {
  padding: 0;
  overflow: hidden;
}

.ann-card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 200px;
  background: #0d1117;
}

.ann-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ann-card-inner {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.ef-annonce-thumb {
  border-radius: 8px;
  overflow: hidden;
  max-height: 140px;
  background: #0d1117;
}

.ef-annonce-thumb img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .dash-burger {
    display: block;
  }

  .dash-sidebar {
    position: fixed;
    z-index: 100;
    height: 100%;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .dash-layout.is-menu-open .dash-sidebar {
    transform: translateX(0);
  }

  .dash-layout.is-menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99;
  }
}
