/* Compléments Django sur la maquette Actu-Geomatique */

/* Layout page : footer collé bas de viewport (pages courtes) */
html {
  height: 100%;
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1 0 auto;
  padding-top: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.shell-center {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(1.5rem, 4vh, 3rem);
}
.shell-center > .container {
  width: 100%;
}

/* Header sticky (pas de barre coord maquette) */
.site-header {
  position: sticky;
  top: 0;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: 60;
  backdrop-filter: blur(10px);
  background: rgba(244, 248, 246, 0.92);
  border-bottom: 1px solid var(--border);
  height: auto;
  flex-shrink: 0;
}
.header-inner {
  display: flex; align-items: center; gap: 1rem; min-height: var(--header);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; }
.brand img { border-radius: 10px; object-fit: cover; }
.brand small { display: block; color: var(--muted); font-size: .72rem; }
.nav-main, .nav-auth { display: flex; gap: .85rem; align-items: center; flex-wrap: wrap; }
.nav-main { margin-left: auto; }
.nav-main a, .nav-auth a { text-decoration: none; color: var(--text); }

/* Boutons : préserver les variantes maquette */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: .55rem 1rem; border-radius: 999px;
  background: var(--forest); color: #fff; border: 1px solid transparent;
  cursor: pointer; font-weight: 600; text-decoration: none; gap: .35rem;
}
.btn.ghost { background: transparent; color: var(--forest); border-color: var(--border); }
.btn-emerald { background: var(--emerald) !important; color: #06281d !important; border-color: transparent !important; }
.btn-outline {
  background: var(--card) !important; color: var(--text) !important;
  border: 1px solid var(--border) !important;
}
.btn-sm { min-height: 34px; padding: 0.35rem 0.75rem; font-size: 0.82rem; }
.hero-cta-secondary,
.home-hero .btn-outline {
  background: transparent !important;
  color: #e8f7ef !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
}
.home-hero .eyebrow,
.hero-eyebrow { color: #9ee6c7; }

.flash-stack { margin-top: 1rem; }
.flash { padding: .75rem 1rem; border-radius: 12px; background: #e8f5ef; border: 1px solid var(--border); color: var(--ink, #0f241c); }
.flash.success { background: #e8f5ef; border-color: #b7e0cb; }
.flash.error { background: #fde8e8; border-color: #f0b4b4; }
.flash.warning { background: #fff6e5; border-color: #f0d9a8; }
.flash.info { background: #eef4fb; border-color: #c5d7ec; }

.grid-cards {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card-link {
  display: block; padding: 1.1rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease; text-decoration: none; color: inherit;
}
.card-link:hover { transform: translateY(-2px); border-color: var(--emerald); }
.section { padding: var(--section-y) 0; }
.meta { color: var(--muted); font-size: .86rem; display: flex; gap: .75rem; flex-wrap: wrap; }

/* Lecture article : ne pas casser .article-body des cartes */
.article-reading { max-width: 74ch; }
.article-reading .prose h2,
.article-reading > h2 { margin-top: 1.6rem; }

.site-footer {
  background: var(--navy);
  color: #cfe3da;
  border-top: 0;
  padding: clamp(2.4rem, 5vw, 3.4rem) 0 1.35rem;
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.footer-shell { position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  gap: 1.75rem 2rem;
  grid-template-columns: 1.45fr repeat(3, minmax(0, 1fr));
  align-items: start;
}
.footer-brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
  margin-bottom: 0.85rem;
}
.footer-brand-link strong {
  display: block;
  color: #fff;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.footer-brand-link small {
  display: block;
  color: #8fbfae;
  font-size: 0.74rem;
  margin-top: 0.15rem;
}
.footer-logo {
  height: 56px;
  width: 56px;
  object-fit: cover;
  object-position: 50% 32%;
  border-radius: 14px;
  background: #fff;
  flex: none;
}
.footer-lead {
  margin: 0;
  color: #9ec4b5;
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 36ch;
}
.footer-tagline {
  margin: 0.75rem 0 0;
  color: #7eae9c;
  font-size: 0.82rem;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.footer-links a {
  color: #9ee6c7;
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.2em; }
.footer-links-tight {
  margin-top: 1rem;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
}
.footer-nl-copy {
  margin: 0 0 0.75rem;
  color: #9ec4b5;
  font-size: 0.86rem;
  line-height: 1.45;
}
.footer-nl .row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.footer-nl input {
  flex: 1 1 10rem;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #e8f7ef;
  padding: 0 0.9rem;
}
.footer-nl input::placeholder { color: #7eae9c; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.8rem;
  color: #7eae9c;
  display: flex;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  flex-wrap: wrap;
}
.footer-bottom a { color: #9ee6c7; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-grid > .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links-tight { grid-template-columns: 1fr 1fr; }
}

.newsletter-form .row { display: flex; gap: .5rem; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0 .9rem;
}
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
form.stack { display: grid; gap: .75rem; max-width: 720px; }
form.stack input, form.stack textarea, form.stack select {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: .7rem .8rem; background: #fff;
}
@media (max-width: 800px) {
  .nav-main { margin-left: 0; width: 100%; }
}

/* ---------- Back-office shell (plein viewport, pas de conteneur centré) ---------- */
.dash-body {
  --dash-aside: 268px;
  --dash-pad: clamp(1.1rem, 2vw, 2rem);
}
.dash-body .nav-main { display: none; }
.dash-body .nav-auth { margin-left: auto; }
.dash-body .site-footer .newsletter-form,
.dash-body .footer-nl,
.dash-body .footer-links-tight,
.dash-body .footer-nl-copy { display: none; }
.dash-body .footer-grid {
  grid-template-columns: 1.4fr 1fr 1fr;
  width: 100%;
  max-width: none;
  padding-inline: 0;
}
.dash-body .footer-shell {
  width: min(1240px, calc(100% - 2rem));
  margin-inline: auto;
}
.dash-body .site-header .container,
.dash-body .flash-stack {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: var(--dash-pad);
}
.dash-body .flash-stack {
  padding-left: calc(var(--dash-aside) + var(--dash-pad));
}
.dash-body .site-footer {
  margin-top: 0;
}

.dash-shell {
  display: grid;
  grid-template-columns: var(--dash-aside) minmax(0, 1fr);
  gap: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  flex: 1 1 auto;
  min-height: calc(100dvh - var(--header, 72px));
  background: #eef3f0;
}
.dash-menu-toggle,
.dash-scrim {
  display: none;
}
.dash-aside {
  background: #0b1f18;
  color: #d7ebe2;
  padding: 1.25rem 0.9rem 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  position: sticky;
  top: var(--header, 72px);
  align-self: stretch;
  height: calc(100dvh - var(--header, 72px));
  max-height: calc(100dvh - var(--header, 72px));
  overflow-y: auto;
  box-sizing: border-box;
}
.dash-aside-brand {
  display: grid;
  gap: 0.2rem;
  padding: 0.2rem 0.7rem 1.05rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.85rem;
}
.dash-aside-brand strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.dash-nav {
  background: transparent;
  border-radius: 0;
  padding: 0;
  position: static;
  display: grid;
  gap: 0.18rem;
}
.dash-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: #b9d4c8;
  padding: 0.62rem 0.8rem;
  border-radius: 10px;
  font-size: 0.9rem;
  min-height: 42px;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}
.dash-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  opacity: 0.85;
}
.dash-nav-icon svg {
  width: 100%;
  height: 100%;
}
.dash-nav-label {
  min-width: 0;
}
.dash-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  transform: none;
}
.dash-nav a:hover .dash-nav-icon { opacity: 1; }
.dash-nav a.active {
  background: var(--emerald);
  color: #06281d;
  font-weight: 700;
  box-shadow: none;
}
.dash-nav a.active .dash-nav-icon { opacity: 1; }
.dash-nav a.dash-nav-switch {
  margin-top: 0.45rem;
  border: 1px solid rgba(158, 230, 199, 0.28);
  color: #d8f3e6;
}
.dash-nav a.dash-nav-switch:hover {
  border-color: rgba(158, 230, 199, 0.55);
  color: #fff;
}
.dash-nav a.dash-nav-switch.active {
  border-color: transparent;
}
.dash-nav-footer {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.15rem;
}
.dash-user {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.55rem 0.7rem 0.85rem;
  margin-bottom: 0.35rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}
.dash-user-av {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #1b4332;
  color: #d8f3e6;
  font-family: var(--font-display, var(--dsp));
  font-size: 0.78rem;
  font-weight: 700;
  flex: 0 0 auto;
  overflow: hidden;
}
.dash-user-av.sm {
  width: 32px;
  height: 32px;
  font-size: 0.7rem;
}
.dash-user-av.has-photo,
.avatar.dash-user-av.has-photo {
  padding: 0;
  background: #0b3d2e;
}
.dash-user-av.has-photo img,
.avatar.dash-user-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dash-user-meta {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}
.dash-user-meta strong {
  color: #fff;
  font-size: 0.88rem;
  line-height: 1.2;
  word-break: break-word;
}
.dash-user-meta span {
  font-size: 0.72rem;
  color: #8fb9a8;
  word-break: break-word;
}
.dash-user-role {
  color: #9ee6c7 !important;
  font-weight: 600;
}
.dash-user-inline {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.dash-table tr.is-self {
  background: #eef8f2;
}
.dir-profile {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.dir-profile-card {
  background: #fff;
  border: 1px solid var(--border, #d7e4dc);
  border-radius: 16px;
  padding: 1.25rem;
  display: grid;
  gap: 0.65rem;
  justify-items: start;
}
.dir-profile-av {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #1b4332;
  color: #d8f3e6;
  font-family: var(--font-display, var(--dsp));
  font-size: 1.35rem;
  font-weight: 700;
}
.dir-profile-card h2 {
  margin: 0;
  font-size: 1.2rem;
}
.dir-profile-email {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  word-break: break-all;
}
.dir-profile-facts {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  width: 100%;
}
.dir-profile-facts li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.86rem;
  border-top: 1px solid var(--border, #e5eee8);
  padding-top: 0.45rem;
}
.dir-profile-facts span { color: var(--muted); }
.dir-profile-state {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
}
.dir-profile-state.is-ok {
  background: #e7f6ee;
  color: #1b4332;
}
.dir-profile-state.is-warn {
  background: #fff4e5;
  color: #8a4b08;
}
.dir-profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}
.dir-sci-profile {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.dir-sci-preview {
  text-align: center;
  justify-items: center;
  display: grid;
  gap: 0.35rem;
}
@media (max-width: 860px) {
  .dir-profile,
  .dir-sci-profile {
    grid-template-columns: 1fr;
  }
}
.dash-nav a.dash-nav-site {
  margin-top: 0;
  font-size: 0.82rem;
  color: #8fb9a8;
  min-height: 36px;
  padding: 0.45rem 0.8rem;
}
.dash-nav a.dash-nav-site:hover { color: #dff6ea; }

.dash-main {
  min-width: 0;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  padding: 1.35rem var(--dash-pad) 2.75rem;
  box-sizing: border-box;
}
.dash-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.25rem;
  max-width: none;
}
.dash-page-head h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}
.dash-panel {
  width: 100%;
  max-width: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.dash-lead { margin: 0 0 1.15rem; max-width: 68ch; }
.dash-h2 { margin: 0 0 0.9rem; font-size: 1.08rem; }
.dash-split {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: start;
}

.dash-surface {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 28px -22px rgba(15, 47, 36, 0.45);
  overflow: hidden;
}
.dash-body .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 28px -22px rgba(15, 47, 36, 0.45);
}
.dash-body .grid.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}
.dash-body .stat-card {
  background: var(--card);
  box-shadow: 0 8px 22px -20px rgba(15, 47, 36, 0.4);
}
.dash-body .moderation-card,
.dash-body .card.card-pad {
  box-shadow: 0 10px 28px -22px rgba(15, 47, 36, 0.4);
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.dash-table th,
.dash-table td {
  text-align: left;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.dash-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  background: #f4f8f6;
}
.dash-table tbody tr:last-child td { border-bottom: 0; }
.dash-table tbody tr:hover td { background: #f8fcfa; }
.dash-table .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.dash-table col.col-actions { width: 42%; }
.dash-table td.actions-cell { min-width: 22rem; }
.dash-table-users td.actions-cell { min-width: 18rem; vertical-align: top; }
.dash-table tr.is-blocked td { opacity: 0.72; }
.user-admin-actions {
  display: grid;
  gap: 0.55rem;
}
.user-admin-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7fbf8;
  padding: 0.35rem 0.55rem;
}
.user-admin-panel summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--forest);
  padding: 0.25rem 0;
}
.user-admin-panel-body {
  display: grid;
  gap: 0.85rem;
  padding: 0.55rem 0 0.35rem;
  border-top: 1px solid var(--border);
  margin-top: 0.35rem;
}
.user-edit-form,
.user-password-form {
  display: grid;
  gap: 0.4rem;
}
.user-edit-form label,
.user-password-form label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.user-edit-form label.check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--ink);
}
.user-edit-form input,
.user-password-form input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.inline-actions .btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}
.role-change-form {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) minmax(11rem, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  width: 100%;
  min-width: 22rem;
}
.role-change-form .fancy-select-wrap {
  min-width: 0;
}
.role-change-form select,
.role-change-form input {
  width: 100%;
  max-width: none;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
  background: #fff;
}
.inline-actions select,
.inline-actions input[type="text"],
.inline-actions input:not([type]),
.inline-actions input[name="reason"] {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
  background: #fff;
  max-width: none;
}
.mod-form { display: grid; gap: 0.55rem; margin-top: 0.75rem; }
.mod-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fff;
}
.mod-actions { margin-top: 0.15rem; }

.visibility-form { margin: 0; }
.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
  min-height: 36px;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.switch-track {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #c5d4cd;
  border: 1px solid #a8bfb4;
  position: relative;
  flex: none;
  transition: background 160ms ease, border-color 160ms ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 47, 36, 0.25);
  transition: transform 160ms ease;
}
.switch input:checked + .switch-track {
  background: var(--emerald);
  border-color: #0f8f5f;
}
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}
.switch-text {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  min-width: 3.2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  background: #e8f5ef;
  color: var(--forest);
  border: 1px solid #c9e7da;
  white-space: nowrap;
}
.badge-ok { background: #e3f8ee; color: #0c6b48; border-color: #bde9d5; }
.badge-muted { background: #eef1f5; color: #475569; border-color: #dbe2ea; }
.badge-cat { background: #e6f4ee; color: var(--forest); border-color: #c9e7da; }
.badge-status { text-transform: none; }
.badge-pending,
.badge-en_attente,
.badge-soumis,
.badge-corrections { background: #fff3e2; color: #9a5b06; border-color: #fadfb8; }
.badge-visible,
.badge-approved,
.badge-publie,
.badge-valide { background: #e3f8ee; color: #0c6b48; border-color: #bde9d5; }
.badge-hidden,
.badge-deleted,
.badge-refuse { background: #fdeaea; color: #b02020; border-color: #f7cccc; }
.badge-brouillon { background: #eef1f5; color: #475569; border-color: #dbe2ea; }
.badge-en_revision { background: #e6f0ff; color: #1d4ed8; border-color: #c8dcff; }

.cat-edit-card { margin-bottom: 0.85rem; display: grid; gap: 0.55rem; }
.cat-edit-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr 1fr;
}
.cat-edit-card input,
.cat-edit-card textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: #fff;
}
.cat-create {
  margin-bottom: 0.35rem;
}
.cat-status-btn {
  cursor: pointer;
  font: inherit;
  appearance: none;
}
.cat-row-edit {
  position: relative;
}
.cat-row-edit > summary {
  list-style: none;
  cursor: pointer;
}
.cat-row-edit > summary::-webkit-details-marker {
  display: none;
}
.cat-edit-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 25;
  width: min(24rem, 86vw);
  padding: 0.9rem;
  border: 1px solid var(--border, #d5e0d9);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px -16px rgba(15, 47, 36, 0.35);
}
.cat-edit-panel .dir-input,
.cat-edit-panel textarea.dir-input {
  min-height: 40px;
  width: 100%;
}
.cat-edit-panel textarea.dir-input {
  min-height: 5rem;
  resize: vertical;
}

.card-pad { padding: 1.15rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.moderation-card { margin-bottom: 1rem; }

/* File de validation — cartes compactes */
.mod-kpi-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0.85rem;
}
.mod-kpi-more {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0 0 1.35rem;
}
.mod-queue-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.75rem;
}
.mod-queue-heading .dash-h2 { margin: 0; }
.mod-queue-list {
  display: grid;
  gap: 0.75rem;
}
.mod-queue-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.95rem 1.05rem;
  background: var(--card, #fff);
  border: 1px solid var(--border, #d5e0d9);
  border-radius: 14px;
  box-shadow: 0 8px 22px -20px rgba(15, 47, 36, 0.4);
}
.mod-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.mod-queue-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.mod-queue-date {
  flex: none;
  font-size: 0.78rem;
  color: var(--muted, #5b6b63);
  white-space: nowrap;
}
.mod-queue-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.mod-queue-meta {
  margin: 0.25rem 0 0;
  font-size: 0.86rem;
  color: var(--ink, #14201a);
}
.mod-queue-meta .muted { color: var(--muted, #5b6b63); }
.mod-queue-excerpt {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  color: var(--muted, #5b6b63);
  line-height: 1.4;
}
.mod-queue-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.55rem 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border, #e5eee9);
}
.mod-queue-foot .mod-form {
  flex: 1 1 auto;
  min-width: min(100%, 16rem);
}
.mod-queue-hint {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted, #5b6b63);
}
.mod-queue-msg {
  margin: 0 0 0.5rem;
}
.mod-queue-msg > summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--forest, #0f3d2e);
  font-weight: 600;
  list-style: none;
}
.mod-queue-msg > summary::-webkit-details-marker { display: none; }
.mod-queue-msg textarea {
  width: 100%;
  margin-top: 0.45rem;
  min-height: 3.2rem;
  border: 1px solid var(--border, #d5e0d9);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  resize: vertical;
}
.mod-actions {
  gap: 0.4rem;
}
.mod-queue-foot--teaser {
  border-top: 0;
  padding-top: 0.15rem;
}
.mod-queue-card--teaser .mod-queue-title {
  font-size: 1rem;
}
.mod-queue-card--teaser .mod-queue-excerpt {
  margin-top: 0.35rem;
}
@media (max-width: 900px) {
  .mod-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .mod-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .mod-queue-card {
    padding: 0.85rem 0.9rem;
  }
  .mod-queue-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .mod-queue-foot .btn,
  .mod-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .mod-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
.btn-sm { min-height: 34px; padding: 0.35rem 0.75rem; font-size: 0.82rem; }
.grid { display: grid; gap: 1rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 1200px) {
  .dash-body .grid.grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .role-change-form {
    grid-template-columns: 1fr;
    min-width: 0;
  }
}
@media (max-width: 1024px) {
  .dash-body { --dash-aside: 0px; }
  .dash-body .flash-stack { padding-left: var(--dash-pad); }
  .dash-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .dash-menu-toggle {
    display: none !important;
  }
  .dash-scrim {
    display: none !important;
  }
  /* Le menu hamburger du header porte déjà toute la nav back-office. */
  .dash-aside {
    display: none !important;
  }
  .dash-main {
    width: 100%;
    padding-top: 0.85rem;
    min-width: 0;
  }
  .dash-page-head {
    gap: 0.65rem;
  }
  .dash-page-head h1 {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
  .dash-page-head .eyebrow {
    overflow-wrap: anywhere;
  }
  .dash-lead {
    max-width: none;
  }
  .dash-panel {
    padding: 0.95rem;
    border-radius: 14px;
  }
  .dash-split { grid-template-columns: 1fr; }
  .cat-edit-grid { grid-template-columns: 1fr; }
  .filters-bar,
  .filters-bar.filters-articles {
    grid-template-columns: 1fr;
  }
  .filters-bar input[type="search"],
  .filters-bar input:first-child,
  .filters-bar .btn {
    grid-column: auto;
  }
  .filters-bar .fancy-select-panel {
    width: 100%;
    max-width: none;
  }
  .dash-body .table-wrap {
    margin-inline: -0.15rem;
    border-radius: 12px;
  }
  .dash-table {
    min-width: 42rem;
  }
  .dash-table th,
  .dash-table td {
    padding: 0.75rem 0.7rem;
  }
  .dash-table .col-num {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 4px 0 8px -6px rgba(15, 47, 36, 0.35);
  }
  .dash-table thead .col-num {
    background: #f4f8f6;
  }
  .dash-table td.actions-cell,
  .dash-table-users td.actions-cell {
    min-width: 14rem;
  }
  .inline-actions {
    flex-wrap: wrap;
  }
  .user-admin-actions,
  .role-change-form {
    min-width: 0;
  }
  .cat-edit-panel {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: auto;
    bottom: 0.75rem;
    width: auto;
    max-height: min(70vh, 28rem);
    overflow-y: auto;
  }
  .dash-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .dash-page-buttons {
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .dash-per-page {
    justify-content: space-between;
  }
  .composer-start {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dash-body .grid.grid-4 { grid-template-columns: 1fr; }
  .dash-body {
    --dash-pad: 0.85rem;
  }
  .dash-table {
    min-width: 36rem;
    font-size: 0.86rem;
  }
}

/* Navigation active */
.nav-main a.is-active {
  color: var(--forest);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.35rem;
}

/* Fil d'Ariane / bandeau de page */
.page-trail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  color: var(--muted);
}
.page-trail a { color: var(--forest); text-decoration: none; }
.page-trail a:hover { text-decoration: underline; }
.page-trail-back { font-weight: 600; }
.page-trail-sep { opacity: 0.55; }
.page-trail-on-dark,
.page-trail-on-dark a { color: #bfe8d6; }
.page-trail-on-dark a:hover { color: #fff; }
.page-trail-on-dark [aria-current="page"] {
  color: #fff;
  font-weight: 650;
}

.page-banner {
  position: relative;
  overflow: hidden;
  color: #e8f6ef;
  /* Fallback sombre si l'image ne charge pas (évite titre blanc sur fond clair) */
  background-color: #0b1f18;
  padding: clamp(2.4rem, 5.5vw, 4.2rem) 0;
  min-height: clamp(200px, 30vw, 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  isolation: isolate;
}
.page-banner-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0b1f18;
}
.page-banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.02);
}
.page-banner-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 22, 16, 0.55) 0%, rgba(6, 32, 24, 0.62) 45%, rgba(5, 24, 18, 0.78) 100%),
    linear-gradient(90deg, rgba(4, 28, 20, 0.28), rgba(4, 28, 20, 0.08) 50%, rgba(4, 28, 20, 0.28));
  pointer-events: none;
}
.page-banner--earth .page-banner-shade {
  background:
    linear-gradient(180deg, rgba(4, 18, 32, 0.52) 0%, rgba(6, 36, 34, 0.6) 50%, rgba(5, 24, 22, 0.78) 100%);
}
.page-banner--terrain .page-banner-shade {
  background:
    linear-gradient(180deg, rgba(8, 24, 16, 0.5) 0%, rgba(10, 36, 22, 0.58) 55%, rgba(6, 20, 14, 0.76) 100%);
}
.page-banner-inner {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.page-banner .page-trail {
  justify-content: center;
  margin: 0.95rem 0 0;
  font-size: 0.92rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
.page-banner-eyebrow {
  color: #9ee6c7 !important;
  margin: 0 0 0.55rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.page-banner h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.95rem, 4.4vw, 3.1rem);
  max-width: 18ch;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}
.page-banner-lead {
  margin: 0.7rem 0 0;
  color: #d2ecdf;
  max-width: 42ch;
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  line-height: 1.5;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}
.page-banner--compact {
  min-height: clamp(160px, 24vw, 230px);
  padding: clamp(1.8rem, 4vw, 3rem) 0;
}
.page-banner--compact h1 {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  max-width: 28ch;
}
.section-after-banner {
  padding-top: clamp(1.5rem, 3.2vw, 2.2rem);
}

.contact-layout {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
  align-items: start;
}
/* À propos — remplacé par le bloc « About page » en bas de fichier */
.page-intro-lead {
  margin: 0 0 1.15rem;
  max-width: 62ch;
}
.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 1.15rem;
}
.contact-meta {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
  display: grid;
  gap: 0.75rem;
}
.contact-meta li {
  display: grid;
  gap: 0.15rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}
.contact-meta strong {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 800px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* Profil chercheur : même logique photo + overlay */
.researcher-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  color: #e8f6ef;
  padding: clamp(2.2rem, 5vw, 3.4rem) 0;
  min-height: clamp(220px, 30vw, 300px);
  display: flex;
  align-items: center;
}
.researcher-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(6, 28, 20, 0.55), rgba(8, 36, 26, 0.72)),
    url("/static/img/banners/banner-terrain.jpg") center / cover no-repeat;
}
.researcher-hero > * { position: relative; z-index: 1; width: 100%; }
.researcher-hero .profile-hero {
  justify-content: center;
  text-align: center;
  flex-direction: column;
}
.researcher-hero .page-trail {
  justify-content: center;
  margin-top: 1rem;
}

.article-reading { max-width: 74ch; }
.article-hero-visual {
  position: relative;
  margin: 1.2rem 0 0;
  border-radius: 14px;
  min-height: 180px;
}
.article-hero-hint {
  position: absolute;
  bottom: 0.5rem;
  left: 0.7rem;
  color: #bfe8d6;
}
.abstract-card { background: #f0f7f4; }
.related-section {
  background: #eff6f3;
  padding: var(--section-y) 0;
  margin-top: 2rem;
}
.filters-bar {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1.8fr) minmax(12rem, 1.1fr) minmax(9rem, 0.9fr) auto;
  margin: 0 0 1.35rem;
  align-items: stretch;
}
.filters-bar.filters-articles {
  grid-template-columns:
    minmax(10rem, 1.6fr)
    minmax(9rem, 1.1fr)
    minmax(8rem, 0.95fr)
    minmax(8rem, 0.95fr)
    auto
    auto;
}
.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: inherit;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.th-sort::after {
  content: "↕";
  opacity: 0.35;
  font-size: 0.85em;
}
.th-sort.is-asc::after {
  content: "↑";
  opacity: 0.9;
}
.th-sort.is-desc::after {
  content: "↓";
  opacity: 0.9;
}
.th-sort:hover {
  color: var(--forest, #0f3d2e);
}
.filters-bar input,
.filters-bar select {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 2.4rem 0.55rem 1rem;
  background: #fff;
  width: 100%;
}
.filters-bar select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--forest) 50%),
    linear-gradient(135deg, var(--forest) 50%, transparent 50%);
  background-position:
    calc(100% - 1.15rem) calc(50% - 0.15rem),
    calc(100% - 0.85rem) calc(50% - 0.15rem);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.filters-bar select:focus,
.filters-bar input:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.filters-bar .btn {
  white-space: nowrap;
  min-width: 7rem;
}
.filters-bar .fancy-select-wrap {
  width: 100%;
  min-width: 0;
}
.filters-bar .fancy-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.filters-bar .fancy-select-panel {
  left: 0;
  right: auto;
  width: max(100%, 17rem);
  max-width: min(28rem, 92vw);
  max-height: min(320px, 55vh);
  border-radius: 16px;
  border-color: #cfe0d7;
  box-shadow:
    0 4px 6px rgba(15, 47, 36, 0.04),
    0 18px 40px -14px rgba(15, 47, 36, 0.35);
}
.filters-bar .fancy-select-option {
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem;
  word-break: break-word;
}
.filters-bar .fancy-select-search {
  border-radius: 999px !important;
}

/* Custom dropdown (évite la liste native trop haute / mal placée) */
.fancy-select-wrap {
  position: relative;
  min-width: 0;
}
.fancy-select-wrap > select.fancy-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.fancy-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.95rem 0.55rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 550;
  cursor: pointer;
  text-align: left;
}
.fancy-select-trigger:hover { border-color: #b7d2c5; }
.fancy-select-wrap.is-open .fancy-select-trigger,
.fancy-select-trigger:focus-visible {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.fancy-select-caret {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--forest);
  border-bottom: 2px solid var(--forest);
  transform: rotate(45deg);
  flex: none;
  margin-top: -0.2rem;
  transition: transform 140ms ease;
}
.fancy-select-wrap.is-open .fancy-select-caret {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}
.fancy-select-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  max-height: min(280px, 50vh);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(15, 47, 36, 0.45);
}
.fancy-select-wrap.is-open .fancy-select-panel { display: flex; }
.fancy-select-panel[hidden] { display: none !important; }
.fancy-select-search {
  margin: 0.55rem 0.55rem 0.35rem;
  min-height: 38px !important;
  border-radius: 10px !important;
  padding: 0.45rem 0.75rem !important;
  border: 1px solid var(--border);
  width: calc(100% - 1.1rem);
}
.fancy-select-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  overflow-y: auto;
  max-height: inherit;
  overscroll-behavior: contain;
}
.fancy-select-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
.fancy-select-option:hover,
.fancy-select-option.is-active {
  background: #eef7f2;
  color: var(--forest);
}
.fancy-select-option.is-selected {
  background: #e3f8ee;
  color: #0c6b48;
  font-weight: 650;
}
.fancy-select-empty {
  padding: 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Pages listes : un peu plus large que le container marketing */
.section-after-banner > .container {
  width: min(1240px, calc(100% - (var(--gutter, 1.1rem) * 2)));
}
.page-banner {
  min-height: clamp(220px, 32vw, 320px);
}
.pagination-bar {
  margin-top: 1.25rem;
  justify-content: space-between;
}
.dash-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-top: 1rem;
  padding: 0.85rem 0.15rem 0.2rem;
  border-top: 1px solid var(--border, #d5e0d9);
}
.dash-pagination-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted, #5b6b63);
}
.dash-per-page {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted, #5b6b63);
}
.dash-per-page .fancy-select-wrap {
  min-width: 4.5rem;
}
.dash-per-page .fancy-select-trigger {
  min-height: 36px;
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  font-weight: 600;
}
.dash-per-page .fancy-select-panel {
  min-width: 5rem;
  width: 100%;
}
.dash-page-buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-left: auto;
}
.dash-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid var(--border, #d5e0d9);
  border-radius: 8px;
  background: #fff;
  color: var(--ink, #14201a);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
}
.dash-page-btn:hover {
  border-color: var(--emerald, #10b981);
  color: var(--forest, #0f3d2e);
}
.dash-page-btn.is-active {
  background: var(--forest, #0f3d2e);
  border-color: var(--forest, #0f3d2e);
  color: #f2fbf6;
}
.dash-page-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}
.dash-page-ellipsis {
  padding: 0 0.2rem;
  color: var(--muted, #5b6b63);
}
.dash-table .col-num {
  width: 3rem;
  color: var(--muted, #5b6b63);
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
  white-space: nowrap;
}
.researcher-card-head {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.65rem;
}
.researcher-avatar {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.5);
}
.researcher-eyebrow { color: #9ee6c7; }
.researcher-meta { color: #a9d3c3; margin: 0; }
.comment-list { display: grid; gap: 0.85rem; margin-top: 1rem; }
.center { text-align: center; }
.btn-primary { background: var(--forest); color: #f2fbf6; }

/* Accueil premium */
.band-soft { background: #eaf3ee; }
.cat-count {
  margin-top: auto;
  padding-top: 0.7rem;
  color: var(--emerald-dim);
  font-weight: 700;
}
.home-newsletter {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.home-newsletter .newsletter-form { position: relative; z-index: 1; max-width: none; }
.home-newsletter .newsletter-copy { position: relative; z-index: 1; }
.article-card .article-visual {
  overflow: hidden;
}
.article-card {
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cat-card {
  text-decoration: none;
  color: inherit;
}
.home-hero {
  /* full-bleed under sticky header */
  margin-top: 0;
}
.auth-card {
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.auth-steps {
  margin: 1rem 0 1.1rem;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.auth-steps li { margin: 0.25rem 0; }
.field-label { margin: 0.85rem 0 0.35rem; }
.secret-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.secret-code {
  display: inline-block;
  padding: 0.55rem 0.75rem;
  background: #eef6f2;
  border: 1px solid var(--border);
  border-radius: 10px;
  letter-spacing: 0.06em;
  font-size: 0.92rem;
}
.otpauth-details {
  margin-top: 0.65rem;
  font-size: 0.86rem;
  color: var(--muted);
}
.otpauth-details summary {
  cursor: pointer;
  color: var(--forest);
  font-weight: 600;
}
.dir-2fa-qr {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  margin: 1.25rem 0 0.35rem;
  text-align: center;
}
.dir-2fa-qr-img {
  width: 220px;
  height: 220px;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(27, 67, 50, 0.08);
}
.dir-2fa-qr .muted { margin: 0; max-width: 22rem; }
.auth-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.auth-form p { margin: 0; }
.auth-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: #fff;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.35rem;
}
.form-actions .btn {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  justify-self: start;
}
form.stack > .btn,
form.stack > button.btn {
  width: auto;
  justify-self: start;
}
.backup-codes {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.backup-codes code {
  display: block;
  padding: 0.45rem 0.6rem;
  background: #eef6f2;
  border-radius: 8px;
  text-align: center;
}

.geomag-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #0f2f24;
  color: #e8f6ef;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  z-index: 80;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
  max-width: min(92vw, 420px);
  text-align: center;
}
.geomag-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
  .filters-bar { grid-template-columns: 1fr 1fr; }
  .filters-bar.filters-articles { grid-template-columns: 1fr 1fr; }
  .filters-bar input[type="search"],
  .filters-bar input:first-child { grid-column: 1 / -1; }
  .filters-bar .btn { grid-column: 1 / -1; }
  .researcher-stats { grid-template-columns: 1fr 1fr; }
  .home-newsletter { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .researcher-stats { grid-template-columns: 1fr; }
}

/* —— About page —— */
.about-intro { padding-bottom: clamp(2rem, 4vw, 3rem); }
.about-intro-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  align-items: center;
}
.about-display {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0.35rem 0 0.85rem;
  color: var(--ink, #0f241c);
}
.about-lead {
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 58ch;
  margin: 0 0 0.75rem;
}
.about-visual {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: #0b1f18;
}
.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.about-visual:hover img { transform: scale(1.06); }
.about-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(8, 36, 26, 0.15), rgba(8, 36, 26, 0.55));
  pointer-events: none;
}
.about-visual-hud {
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.9rem;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.about-visual-hud span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e8f6ef;
  background: rgba(8, 36, 26, 0.72);
  border: 1px solid rgba(158, 230, 199, 0.35);
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  backdrop-filter: blur(6px);
}

.about-pillars {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.about-pillar {
  background: var(--card, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem 1.35rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.about-pillar:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 12px 28px rgba(11, 31, 24, 0.08);
}
.about-pillar h3 { margin: 0.7rem 0 0.45rem; font-size: 1.1rem; }
.about-pillar p { margin: 0; color: var(--muted); font-size: 0.94rem; line-height: 1.55; }

.about-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  color: var(--forest);
  background: linear-gradient(145deg, #e3f8ee, #d4f0e4);
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.about-icon svg { width: 1.25rem; height: 1.25rem; }
.about-icon-lg {
  width: 2.85rem;
  height: 2.85rem;
  flex-shrink: 0;
}
.about-icon-lg svg { width: 1.4rem; height: 1.4rem; }

.about-features {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.about-feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card, #fff);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.about-feature:hover {
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}
.about-feature h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.about-feature p { margin: 0; }

.about-stats-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(135deg, #0b1f18 0%, #12382c 55%, #0f2f24 100%);
  color: #e8f6ef;
  padding: clamp(2.2rem, 4vw, 3rem) 0;
}
.about-stats-band .topo-lines {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  z-index: 0;
  pointer-events: none;
}
.about-stats {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.25rem 1.5rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.about-stat b {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  display: block;
  color: #9ee6c7;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.about-stat span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: #a9d3c3;
  letter-spacing: 0.02em;
}

.about-process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  counter-reset: none;
}
.about-step {
  position: relative;
  padding: 1.2rem 1.15rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card, #fff);
  box-shadow: var(--shadow);
}
.about-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--emerald), var(--forest));
}
.about-step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--emerald-dim, #0c6b48);
  margin-bottom: 0.55rem;
}
.about-step h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.about-step p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.about-split {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
}
.about-split-media {
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: #0b1f18;
}
.about-split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about-checklist {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.about-checklist li {
  position: relative;
  padding: 0.7rem 0.85rem 0.7rem 2.4rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  line-height: 1.45;
}
.about-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--forest);
  color: #e8f6ef;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
}
.about-table {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}
.about-table table { margin: 0; }
.about-board { margin-top: 0.25rem; }

.about-cta {
  padding-top: 0;
}
.about-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 1.75rem;
  padding: clamp(1.6rem, 3.2vw, 2.2rem) clamp(1.25rem, 3vw, 2rem);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(ellipse 70% 80% at 90% 20%, rgba(16, 185, 129, 0.22), transparent 55%),
    linear-gradient(125deg, #0b1f18, #143d30 60%, #0f2f24);
  color: #e8f6ef;
  box-shadow: var(--shadow);
}
.about-cta-inner h2 {
  margin: 0.2rem 0 0.45rem;
  color: #f2fbf6;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
}
.about-cta-inner p { margin: 0; max-width: 48ch; color: #a9d3c3; }
.about-cta-ghost {
  border-color: rgba(232, 246, 239, 0.45) !important;
  color: #e8f6ef !important;
  background: transparent !important;
}
.about-cta-ghost:hover {
  border-color: #9ee6c7 !important;
  background: rgba(158, 230, 199, 0.12) !important;
}

@media (max-width: 960px) {
  .about-intro-grid,
  .about-split { grid-template-columns: 1fr; }
  .about-pillars,
  .about-process { grid-template-columns: 1fr 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .about-pillars,
  .about-features,
  .about-process,
  .about-stats { grid-template-columns: 1fr; }
  .about-visual { max-height: 280px; }
}

.composer-start {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  max-width: none;
}
.composer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.composer-meta input,
.composer-meta textarea,
.composer-meta select,
.composer-block input,
.composer-block textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  background: #fff;
}
.composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.65rem;
}
.composer-toolbar-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-right: 0.25rem;
}
.composer-sep {
  width: 1px;
  height: 1.2rem;
  background: var(--border);
  margin: 0 0.25rem;
}
.composer-upload-btn {
  cursor: pointer;
  margin: 0;
}
.composer-upload-btn input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.composer-blocks {
  display: grid;
  gap: 0.75rem;
}
.composer-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  background: #f7fbf8;
  display: grid;
  gap: 0.45rem;
}
.composer-block header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}
.composer-block-actions {
  display: flex;
  gap: 0.3rem;
}
.composer-figure-preview,
.composer-cover-preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}
.composer-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.composer-files li {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.composer-files img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}
.dir-prose img,
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}
@media (max-width: 960px) {
  .composer-grid { grid-template-columns: 1fr; }
}

/* Avatar photo */
.avatar.has-photo,
.nav-pro-av:has(img),
.dir-profile-av:has(img),
.dash-user-av:has(img) {
  padding: 0;
  overflow: hidden;
  background: var(--forest, #0b3d2e);
}
.avatar.has-photo img,
.nav-pro-av img,
.dir-profile-av img,
.dash-user-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav-pro-av {
  position: relative;
}
.dir-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.55rem 0 0.75rem;
  justify-content: center;
}
.dir-avatar-form input[type="file"] { display: none; }

/* Figures article */
.article-figure {
  margin: 1.25rem 0;
  display: block;
}
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.article-figure.align-left { margin-right: auto; margin-left: 0; }
.article-figure.align-right { margin-left: auto; margin-right: 0; }
.article-figure.align-center { margin-left: auto; margin-right: auto; }
.article-figure.size-small { max-width: 280px; }
.article-figure.size-medium { max-width: 420px; }
.article-figure.size-large { max-width: 720px; }
.article-figure.size-full { max-width: 100%; }
.article-figure.align-left.size-small,
.article-figure.align-left.size-medium {
  float: left;
  margin: 0.35rem 1.25rem 0.85rem 0;
}
.article-figure.align-right.size-small,
.article-figure.align-right.size-medium {
  float: right;
  margin: 0.35rem 0 0.85rem 1.25rem;
}
.dir-prose::after { content: ""; display: table; clear: both; }
.article-figure figcaption {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  color: var(--muted, #5a6b63);
}

/* Composer enhancements */
.composer-block.is-active {
  border-color: var(--forest, #0b3d2e);
  box-shadow: 0 0 0 1px rgba(11, 61, 46, 0.25);
}
.composer-figure-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.45rem 0;
}
.composer-inline-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted, #5a6b63);
}
.composer-inline-field select {
  min-width: 8rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border, #d5ddd8);
}
.composer-preview {
  margin-top: 0.75rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--border, #d5ddd8);
  border-radius: 12px;
  background: #fbfcfb;
  min-height: 12rem;
}

/* SweetAlert GéoMag */
.geomag-swal {
  font-family: inherit !important;
  border-radius: 14px !important;
}
.geomag-swal .swal2-title {
  font-size: 1.25rem !important;
  color: #0f241c !important;
}
.geomag-swal .swal2-html-container {
  color: #5a6b63 !important;
  font-size: 0.95rem !important;
}
.geomag-swal-toast {
  font-size: 0.92rem !important;
  border-radius: 12px !important;
}

/* Honeypot anti-bots (inscription) */
.dir-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Demande chercheur : formulaire derrière un clic */
.dir-apply-chercheur {
  margin-top: 0.75rem;
}
.dir-apply-chercheur > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.55rem 1.1rem;
  border-radius: var(--r-sm, 10px);
  border: 1px solid var(--line, #d5e0da);
  background: #fff;
  color: var(--forest, #0f241c);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
}
.dir-apply-chercheur > summary::-webkit-details-marker { display: none; }
.dir-apply-chercheur > summary::after {
  content: "→";
  opacity: 0.55;
  transition: transform 0.15s ease;
}
.dir-apply-chercheur[open] > summary {
  border-color: var(--emerald, #10b981);
  background: rgba(16, 185, 129, 0.08);
}
.dir-apply-chercheur[open] > summary::after {
  transform: rotate(90deg);
}
.dir-apply-chercheur > summary:hover {
  border-color: var(--emerald, #10b981);
}

/* Commentaires — menu ⋮ */
.comment {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.comment-main {
  min-width: 0;
  flex: 1;
}
.comment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.comment-meta {
  min-width: 0;
}
.comment-body {
  margin: 0.4rem 0 0;
}
.comment-menu {
  position: relative;
  flex-shrink: 0;
}
.comment-menu > summary {
  list-style: none;
}
.comment-menu > summary::-webkit-details-marker {
  display: none;
}
.comment-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: -0.35rem -0.35rem 0 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #5b6b63);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}
.comment-menu-btn:hover,
.comment-menu[open] > .comment-menu-btn {
  background: rgba(15, 40, 30, 0.06);
  color: var(--ink, #14201a);
}
.comment-menu-panel {
  position: absolute;
  top: calc(100% + 0.2rem);
  right: 0;
  z-index: 20;
  min-width: 9.5rem;
  padding: 0.35rem;
  border: 1px solid var(--border, #d5e0d9);
  border-radius: 0.65rem;
  background: var(--card, #fff);
  box-shadow: 0 10px 28px rgba(15, 40, 30, 0.12);
}
.comment-menu-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
}
.comment-menu-item:hover {
  background: rgba(15, 40, 30, 0.06);
}
.comment-menu-danger {
  color: #b42318;
}
.comment-menu-danger:hover {
  background: rgba(180, 35, 24, 0.08);
}
.comment-edit-form {
  margin-top: 0.65rem;
  max-width: 36rem;
}
.comment-edit-form[hidden] {
  display: none !important;
}
.comment-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.comment.is-editing .comment-body {
  display: none;
}
