/* Iris FA Règlement — public visual identity (summer / neon Iris) */

:root {
  --bg: #12010a;
  --bg-elevated: #1c0614;
  --bg-card: rgba(42, 10, 28, 0.72);
  --bg-card-solid: #24101c;
  --bg-card-hover: rgba(58, 14, 38, 0.88);
  --border: rgba(255, 120, 190, 0.14);
  --border-hover: rgba(255, 45, 149, 0.5);
  --text: #fff4fa;
  --text-muted: #d4a8c4;
  --text-dim: #9a6a86;
  --accent: #ff2d95;
  --accent-2: #ff66c4;
  --accent-deep: #c4156e;
  --accent-soft: rgba(255, 45, 149, 0.18);
  --sunset: #ff7a59;
  --plum: #5c1238;
  --gold: #ffb0d8;
  --gold-soft: rgba(255, 176, 216, 0.16);
  --discord: #5865f2;
  --warn: #ffb020;
  --note: #ff8fd0;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(255, 45, 149, 0.14);
  --font: 'Outfit', system-ui, sans-serif;
  --display: 'Syne', 'Outfit', system-ui, sans-serif;
  --mono: 'Outfit', system-ui, sans-serif;
  --topbar-h: 72px;
  --transition: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 17px;
  scroll-behavior: smooth;
  scrollbar-color: var(--accent) var(--bg-elevated);
  scrollbar-width: thin;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -8%, rgba(255, 45, 149, 0.32), transparent 58%),
    radial-gradient(ellipse 45% 40% at 92% 18%, rgba(255, 122, 89, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 45% at 8% 70%, rgba(92, 18, 56, 0.55), transparent 60%),
    radial-gradient(ellipse 60% 40% at 70% 95%, rgba(196, 21, 110, 0.18), transparent 55%),
    linear-gradient(165deg, #12010a 0%, #1a0412 42%, #220818 100%);
  animation: irisAmbient 14s ease-in-out infinite alternate;
}

@keyframes irisAmbient {
  from {
    opacity: 0.92;
    filter: saturate(1) brightness(1);
  }
  to {
    opacity: 1;
    filter: saturate(1.1) brightness(1.05);
  }
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  padding: 0 1.75rem;
  background: rgba(18, 1, 10, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255, 45, 149, 0.22), 0 12px 32px rgba(0, 0, 0, 0.25);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(255, 45, 149, 0.45),
    0 0 22px rgba(255, 45, 149, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  background: linear-gradient(105deg, #ff9ad5 0%, #ff2d95 48%, #ff7a59 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-sub {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  font-family: var(--font);
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), filter var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #ff7ab8 0%, #ff2d95 48%, #d4146a 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 28px rgba(255, 45, 149, 0.35);
}
.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(255, 45, 149, 0.48);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(255, 176, 216, 0.28);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  background: rgba(255, 45, 149, 0.14);
}

.btn-discord {
  background: var(--discord);
  color: #fff;
  border-radius: 999px;
}
.btn-discord:hover { filter: brightness(1.1); }

.btn-admin {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
  border-radius: var(--radius-sm);
}
.btn-admin:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
  width: 100%;
  margin-top: 1rem;
  border-radius: var(--radius-sm);
}
.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--border-hover);
}

/* Main layout */
#app {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}

.view { display: none; }
.view-active { display: block; animation: irisRise 0.45s cubic-bezier(0.22, 1, 0.36, 1); }

#view-guide.view-active,
#view-entreprises.view-active,
#view-groupes.view-active {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--topbar-h) - 6.5rem);
}

#view-entreprises .directory-grid,
#view-groupes .directory-grid {
  flex: 1;
  align-content: start;
}

@keyframes irisRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero — sharp full-bleed summer banner + copy below (slogan stays readable) */
.hero {
  text-align: left;
  padding: 0 0 0.5rem;
}

.hero--banner {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  margin-bottom: 1.5rem;
  overflow: visible;
  height: auto;
  min-height: 0;
}

.hero-stage {
  position: relative;
  width: 100%;
  /* Wide 1024×577 summer banner: taller stage so SUV + slogan stay sharp */
  min-height: 280px;
  height: clamp(280px, 46vw, 560px);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  display: block;
  filter: none;
  -webkit-filter: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

/* Soft edge only — no dark wash over “PASSE TON ÉTÉ CHEZ IRIS !” */
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 1, 10, 0.18) 0%, transparent 22%),
    linear-gradient(0deg, rgba(18, 1, 10, 0.35) 0%, transparent 28%),
    radial-gradient(ellipse 50% 40% at 78% 20%, rgba(255, 45, 149, 0.12), transparent 70%);
  pointer-events: none;
  backdrop-filter: none;
}

.hero-media::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  z-index: 2;
  background: linear-gradient(90deg, #ff2d95 0%, #ff4db8 35%, #ff7a59 70%, #ff66c4 100%);
  box-shadow: 0 0 18px rgba(255, 45, 149, 0.55);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.65rem 0 0.35rem;
  text-align: left;
}

.hero-logo {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
  box-shadow:
    0 0 0 3px rgba(255, 45, 149, 0.35),
    0 0 40px rgba(255, 45, 149, 0.45);
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.1em;
  color: #ffe0f0;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
  padding: 0.35rem 0.9rem;
  border-radius: 4px;
  background: linear-gradient(105deg, rgba(255, 45, 149, 0.85), rgba(255, 77, 184, 0.65));
  border: none;
  box-shadow: 0 6px 20px rgba(255, 45, 149, 0.35);
  transform: skewX(-8deg);
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.8vw, 3.75rem);
  font-weight: 800;
  font-style: italic;
  margin-bottom: 0.55rem;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: #fff;
  text-shadow: 0 0 40px rgba(255, 45, 149, 0.25);
}

.hero-title span {
  background: linear-gradient(100deg, #ffb0d8, #ff2d95 40%, #ff4db8 95%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 14px rgba(255, 45, 149, 0.45));
}

.hero-lead {
  max-width: 560px;
  margin: 0 0 1.35rem;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.5;
  text-shadow: none;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
}

.hero--banner .btn-secondary {
  background: rgba(255, 45, 149, 0.1);
  border-color: rgba(255, 45, 149, 0.4);
  color: #fff;
}

.hero--banner .btn-secondary:hover {
  background: rgba(255, 45, 149, 0.28);
  border-color: var(--accent);
}

/* Stats — connected strip, not wiki cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 1.35rem;
  background:
    linear-gradient(135deg, rgba(255, 45, 149, 0.12), rgba(255, 122, 89, 0.05) 40%, rgba(42, 10, 28, 0.65));
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 176, 216, 0.18);
  border: 1px solid rgba(255, 45, 149, 0.2);
}

.stat {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 1.05rem 1.15rem;
  text-align: left;
  position: relative;
}

.stat + .stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 176, 216, 0.35), transparent);
}

.stat-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.01em;
  margin-bottom: 0.3rem;
}

.stat-value {
  display: block;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, #ffb0d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Pole cards — equal cells, soft fills, iris rail */
.poles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-bottom: 2.4rem;
  align-items: stretch;
}

/* Landing: 6 cards — 2 rows of 3 (pôles + annuaires + guide) */
#poles-grid {
  grid-template-columns: repeat(6, 1fr);
}

#poles-grid .pole-card {
  grid-column: span 2;
}

.pole-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background:
    linear-gradient(160deg, rgba(255, 45, 149, 0.1) 0%, transparent 42%),
    rgba(36, 12, 26, 0.85);
  border: none;
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem 1.3rem 1.55rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-align: left;
  color: inherit;
  font: inherit;
  width: 100%;
  box-shadow: inset 0 0 0 1px rgba(255, 120, 190, 0.12);
  overflow: hidden;
}

.pole-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 4px;
  border-radius: 0 6px 6px 0;
  background: linear-gradient(180deg, #ff66c4, #ff2d95 50%, #ff7a59);
  box-shadow: 0 0 16px rgba(255, 45, 149, 0.45);
}

.pole-card::after {
  content: '';
  position: absolute;
  right: -20%;
  top: -30%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 45, 149, 0.16), transparent 70%);
  pointer-events: none;
  transition: transform var(--transition), opacity var(--transition);
  opacity: 0.7;
}

.pole-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px rgba(255, 45, 149, 0.35),
    0 0 40px rgba(255, 45, 149, 0.12);
  background:
    linear-gradient(160deg, rgba(255, 45, 149, 0.18) 0%, transparent 48%),
    rgba(48, 14, 34, 0.92);
}

.pole-card:hover::after {
  transform: scale(1.35) translate(-8%, 10%);
  opacity: 1;
}

.pole-emoji {
  font-size: 1.85rem;
  margin-bottom: 0.5rem;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(255, 45, 149, 0.25));
}

.pole-card h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.pole-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pole-preview {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  flex: 1 1 auto;
}

.pole-preview li {
  font-size: 0.84rem;
  color: var(--text-dim);
  padding: 0.38rem 0.7rem;
  border-left: none;
  background: rgba(255, 45, 149, 0.07);
  border-radius: 10px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background var(--transition), color var(--transition);
}

.pole-card:hover .pole-preview li {
  background: rgba(255, 45, 149, 0.11);
  color: var(--text-muted);
}

.pole-preview li strong {
  color: var(--accent-2);
  font-weight: 700;
  margin-right: 0.3rem;
}

.pole-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.pole-discord {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--discord);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  transition: filter var(--transition), transform var(--transition);
}

.pole-discord:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.pole-discord-cta { margin: 0 0 1rem; }

/* Discord hubs — soft gradient chips */
.discord-hubs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin: 0 0 1.35rem;
}

.discord-hub {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.2rem 1.05rem;
  background:
    linear-gradient(145deg, rgba(88, 101, 242, 0.16), rgba(255, 45, 149, 0.08));
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 216, 0.14);
  position: relative;
  overflow: hidden;
}

.discord-hub::before {
  content: '';
  position: absolute;
  inset: auto -20% -40% auto;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 101, 242, 0.25), transparent 70%);
  pointer-events: none;
}

.discord-hub:hover {
  transform: translateY(-3px);
  box-shadow:
    0 14px 32px rgba(88, 101, 242, 0.18),
    inset 0 0 0 1px rgba(255, 45, 149, 0.3);
}

.discord-hub-emoji { font-size: 1.4rem; }
.discord-hub strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
}
.discord-hub > span:not(.discord-hub-emoji):not(.discord-hub-cta) {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.discord-hub-cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 0.55rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--discord);
  border-radius: 999px;
  transition: filter var(--transition), transform var(--transition);
}

.discord-hub:hover .discord-hub-cta {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.stat-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.stat-link:hover .stat-value {
  filter: brightness(1.1);
}

.footer-discords {
  display: inline-flex;
  gap: 1rem;
}

.footer-discords a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-discords a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .discord-hubs { grid-template-columns: 1fr; }
}

/* Directory — Entreprises / Groupes (annuaire tuiles) */
.directory-view {
  position: relative;
  padding-bottom: 2.5rem;
}

.directory-back {
  margin: 0.35rem 0 0.75rem;
  align-self: flex-start;
}

.directory-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  margin: 0.5rem auto 1.75rem;
  max-width: 720px;
}

.directory-icon {
  display: grid;
  place-items: center;
  color: rgba(255, 214, 236, 0.88);
  filter: drop-shadow(0 0 12px rgba(255, 45, 149, 0.35));
}

.directory-title {
  font-family: var(--display);
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #fff;
  text-shadow: 0 0 24px rgba(255, 45, 149, 0.35);
  line-height: 1.1;
}

.directory-rule {
  width: min(220px, 55%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 176, 216, 0.55), transparent);
  margin: 0.15rem 0 0.35rem;
}

.directory-search {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: min(560px, 100%);
  padding: 0.72rem 1.05rem;
  border-radius: 999px;
  background: rgba(18, 4, 14, 0.72);
  border: 1px solid rgba(255, 120, 190, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 28px rgba(0, 0, 0, 0.28);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.directory-search:focus-within {
  border-color: rgba(255, 45, 149, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 3px rgba(255, 45, 149, 0.12),
    0 10px 32px rgba(255, 45, 149, 0.12);
}

.directory-search-icon {
  flex: 0 0 auto;
  color: var(--text-dim);
}

.directory-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.directory-search input::placeholder {
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem 1.25rem;
  width: 100%;
  margin: 0 auto 1rem;
}

.directory-tile {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  isolation: isolate;
  font: inherit;
  text-align: left;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  box-shadow:
    0 0 0 1px rgba(255, 176, 216, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.35),
    0 0 26px rgba(255, 45, 149, 0.18);
  transition: transform var(--transition), box-shadow var(--transition);
}

.directory-tile:hover,
.directory-tile:focus-visible {
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    0 0 0 1px rgba(255, 120, 190, 0.35),
    0 16px 36px rgba(0, 0, 0, 0.42),
    0 0 34px rgba(255, 45, 149, 0.32);
  outline: none;
}

.directory-tile-bg,
.directory-tile-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.directory-tile.has-image .directory-tile-bg {
  background-image: var(--tile-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 0.45s ease;
}

.directory-tile.has-image:hover .directory-tile-bg {
  transform: scale(1.06);
}

.directory-tile.no-image .directory-tile-bg {
  background:
    radial-gradient(ellipse 80% 70% at 30% 20%, rgba(255, 102, 196, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 60% at 80% 80%, rgba(255, 122, 89, 0.22), transparent 50%),
    linear-gradient(145deg, #3a0d28 0%, #1a0612 48%, #2a0a1c 100%);
}

.directory-tile-shade {
  background:
    linear-gradient(180deg, transparent 0%, transparent 55%, rgba(8, 0, 6, 0.55) 78%, rgba(8, 0, 6, 0.82) 100%);
  z-index: 1;
  pointer-events: none;
}

.directory-tile-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: block;
  padding: 0.55rem 0.75rem 0.65rem;
  text-align: left;
  font-family: var(--display);
  font-size: clamp(0.72rem, 1.05vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  word-break: break-word;
  pointer-events: none;
}

.directory-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  min-height: min(360px, calc(100vh - var(--topbar-h) - 16rem));
  padding: 2rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 120, 190, 0.14);
  background:
    linear-gradient(160deg, rgba(255, 45, 149, 0.1) 0%, transparent 42%),
    rgba(36, 12, 26, 0.55);
}

.directory-empty-emoji {
  font-size: 2rem;
}

.directory-empty h3 {
  font-family: var(--display);
  font-size: 1.35rem;
}

.directory-empty p {
  max-width: 36rem;
  color: var(--text-muted);
}

.directory-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.directory-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 0.35rem;
  max-width: 720px;
}

.directory-filter-chip {
  appearance: none;
  border: 1px solid rgba(255, 120, 190, 0.22);
  background: rgba(18, 4, 14, 0.55);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.directory-filter-chip:hover {
  border-color: rgba(255, 45, 149, 0.45);
  color: var(--text);
}

.directory-filter-chip.active {
  border-color: rgba(255, 45, 149, 0.65);
  background: rgba(255, 45, 149, 0.18);
  color: #fff;
}

.directory-category {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.directory-category-title {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.directory-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem 1.25rem;
}

.directory-tile-status {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 3;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.directory-tile-status.status-disponible,
.structure-status-badge.status-disponible {
  background: rgba(46, 180, 110, 0.92);
  color: #04140b;
}

.directory-tile-status.status-repris,
.structure-status-badge.status-repris {
  background: rgba(210, 56, 80, 0.92);
  color: #fff5f7;
}

.structure-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.structure-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.structure-detail-category {
  margin: -0.25rem 0 0;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Structure detail modal (Entreprises / Groupes) */
.structure-detail-modal .structure-detail-card {
  width: min(480px, 100%);
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(255, 45, 149, 0.16), transparent 55%),
    var(--bg-elevated);
}

.structure-detail-banner {
  position: relative;
  aspect-ratio: 16 / 7;
  background:
    radial-gradient(ellipse 80% 70% at 30% 20%, rgba(255, 102, 196, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 60% at 80% 80%, rgba(255, 122, 89, 0.22), transparent 50%),
    linear-gradient(145deg, #3a0d28 0%, #1a0612 48%, #2a0a1c 100%);
  background-size: cover;
  background-position: center;
}

.structure-detail-banner.has-image {
  background-color: #1a0612;
}

.structure-detail-banner-fade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(18, 6, 14, 0.92));
  pointer-events: none;
}

.structure-detail-body {
  padding: 1.15rem 1.35rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.structure-detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 214, 236, 0.95);
  background: rgba(255, 45, 149, 0.14);
  border: 1px solid rgba(255, 120, 190, 0.28);
}

.structure-detail-title {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: #fff;
  margin: 0;
  padding-right: 1.75rem;
}

.structure-detail-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.structure-detail-desc.is-empty {
  font-style: italic;
  opacity: 0.75;
}

.structure-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.structure-detail-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 8rem;
}

.structure-detail-actions .btn.is-muted {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}

.directory-empty--filter {
  min-height: 180px;
}

.admin-groupes {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1rem;
  min-height: 360px;
}

.admin-groupes .admin-col {
  min-height: 0;
}

.admin-groupes .admin-pole-meta {
  margin-top: 0.75rem;
}

.pole-meta {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
}

/* Section headers */
.section-header {
  margin-bottom: 1.1rem;
}

.section-header h2 {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 720px;
}

.section-eyebrow {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* Reader */
.reader-header {
  padding: 1rem 0 0.85rem;
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255, 45, 149, 0.18);
  margin-bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reader-header .back-link {
  margin-bottom: 0;
}

.reader-search {
  width: min(420px, 100%);
  align-self: stretch;
}

.rules-search {
  position: relative;
  width: 100%;
}

.landing-search {
  max-width: 640px;
  margin: 0 auto 1.6rem;
}

.rules-search-field {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.78rem 1.1rem;
  border-radius: 999px;
  background: rgba(18, 4, 14, 0.72);
  border: 1px solid rgba(255, 120, 190, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 28px rgba(0, 0, 0, 0.28);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.rules-search-field:focus-within {
  border-color: rgba(255, 45, 149, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 3px rgba(255, 45, 149, 0.12),
    0 10px 32px rgba(255, 45, 149, 0.12);
}

.rules-search-icon {
  flex: 0 0 auto;
  color: var(--text-dim);
}

.rules-search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
}

.rules-search-field input::placeholder {
  color: var(--text-dim);
}

.rules-search-results {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 0.45rem);
  max-height: min(420px, 55vh);
  overflow: auto;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 120, 190, 0.22);
  background: rgba(22, 6, 16, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 0.35rem;
}

.rules-search-empty {
  padding: 0.85rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.rules-search-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition);
}

.rules-search-item:hover,
.rules-search-item:focus-visible {
  background: rgba(255, 45, 149, 0.14);
  outline: none;
}

.rules-search-item-meta {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
}

.rules-search-item-title {
  font-weight: 650;
  color: var(--text);
}

.rules-search-item-snippet {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.rule-section.search-flash {
  box-shadow: 0 0 0 2px rgba(255, 45, 149, 0.55), 0 0 28px rgba(255, 45, 149, 0.25);
  border-radius: var(--radius-sm);
}

.directory-staff-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  margin: 0 auto 1.25rem;
  max-width: 40rem;
}

.guide-view {
  position: relative;
  padding-bottom: 2.5rem;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.guide-hero .directory-icon {
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(255, 45, 149, 0.35));
}

.guide-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.guide-lead {
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto;
}

.guide-steps {
  list-style: none;
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1rem;
}

.guide-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(12, 2, 10, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 120, 190, 0.1);
}

.guide-step-num {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(145deg, #ff66c4, #ff2d95);
  color: #1a0412;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 0 18px rgba(255, 45, 149, 0.35);
}

.guide-step-body h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.28rem;
}

.guide-step-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.55rem;
}

.guide-step-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.back-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: 0.7rem;
  transition: color var(--transition);
}

.back-link:hover { color: var(--accent); }

.pole-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pole-tab {
  padding: 0.48rem 1rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(36, 12, 26, 0.7);
  color: var(--text-muted);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: inset 0 0 0 1px rgba(255, 120, 190, 0.14);
}

.pole-tab:hover {
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 45, 149, 0.4);
}

.pole-tab.active {
  background: linear-gradient(135deg, rgba(255, 45, 149, 0.35), rgba(255, 122, 89, 0.16));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 45, 149, 0.5);
}

.reader-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 1.4rem;
  align-items: start;
}

.sommaire {
  position: sticky;
  top: calc(var(--topbar-h) + 0.85rem);
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(255, 45, 149, 0.16), transparent 55%),
    rgba(28, 8, 20, 0.9);
  border: none;
  border-radius: var(--radius);
  padding: 1.15rem 1rem 1.1rem;
  max-height: calc(100vh - var(--topbar-h) - 1.5rem);
  overflow-y: auto;
  box-shadow: inset 0 0 0 1px rgba(255, 120, 190, 0.16);
}

.sommaire h3 {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sommaire h3::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50% 50% 50% 10%;
  background: linear-gradient(135deg, #ff66c4, #ff2d95);
  box-shadow: 0 0 12px rgba(255, 45, 149, 0.55);
  transform: rotate(-20deg);
  flex-shrink: 0;
}

#sommaire-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sommaire-link {
  display: block;
  padding: 0.45rem 0.65rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 10px;
  transition: all var(--transition);
  border-left: none;
  position: relative;
}

.sommaire-link:hover {
  color: var(--text);
  background: rgba(255, 45, 149, 0.08);
}

.sommaire-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 45, 149, 0.28), rgba(255, 45, 149, 0.08));
  box-shadow: inset 3px 0 0 var(--accent);
}

/* Rule sections — iris rail document feel */
.reader-content h2.pole-title {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.reader-content .pole-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.rule-section {
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 0.55rem;
  overflow: hidden;
  background: rgba(36, 12, 26, 0.55);
  box-shadow: inset 3px 0 0 rgba(255, 45, 149, 0.35);
  transition: background var(--transition), box-shadow var(--transition);
}

.rule-section.open {
  background: rgba(48, 14, 34, 0.72);
  box-shadow:
    inset 3px 0 0 var(--accent),
    0 8px 28px rgba(255, 45, 149, 0.08);
}

.rule-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: none;
  border: none;
  color: inherit;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}

.rule-section-header:hover {
  background: rgba(255, 45, 149, 0.06);
}

.rule-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.rule-count {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffe0f0;
  background: rgba(255, 45, 149, 0.28);
  border: none;
  border-radius: 999px;
  padding: 0.14rem 0.5rem;
  margin-left: 0.15rem;
}

.rule-section-chevron {
  color: var(--text-dim);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.rule-section.open .rule-section-chevron {
  transform: rotate(180deg);
  color: var(--accent-2);
}

.rule-section-body {
  display: none;
  padding: 0 1.1rem 0.95rem;
}

.rule-section.open .rule-section-body {
  display: block;
  animation: slideDown 0.28s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.rule-list {
  list-style: none;
}

.rule-list li {
  position: relative;
  padding: 0.42rem 0 0.42rem 1.15rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 120, 190, 0.06);
}

.rule-list li:last-child { border-bottom: none; }

.rule-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.78rem;
  width: 7px;
  height: 7px;
  border-radius: 50% 50% 50% 12%;
  background: linear-gradient(135deg, #ff66c4, #ff2d95);
  transform: rotate(-18deg);
  box-shadow: 0 0 8px rgba(255, 45, 149, 0.35);
}

.rule-list li.rule-note {
  color: var(--note);
  font-style: italic;
}
.rule-list li.rule-note::before {
  content: '';
  background: var(--note);
  border-radius: 50%;
  transform: none;
  box-shadow: none;
}

.rule-list li.rule-warn {
  color: var(--warn);
}
.rule-list li.rule-warn::before {
  content: '';
  background: var(--warn);
  border-radius: 2px;
  transform: rotate(45deg);
  box-shadow: none;
}

.rule-list li.rule-subtitle {
  font-weight: 700;
  color: var(--text);
  padding-top: 0.8rem;
  list-style: none;
}
.rule-list li.rule-subtitle::before { content: none; display: none; }

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid transparent;
  box-shadow: 0 -1px 0 rgba(255, 45, 149, 0.18);
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff66c4, #ff2d95);
  color: #fff;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition);
  box-shadow: 0 8px 24px rgba(255, 45, 149, 0.45);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 500;
  box-shadow: var(--shadow);
  max-width: min(420px, calc(100vw - 2rem));
  text-align: center;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast.toast-ok {
  border-color: rgba(80, 220, 140, 0.55);
  box-shadow: 0 8px 28px rgba(40, 160, 90, 0.2);
}

.toast.toast-err {
  border-color: rgba(255, 100, 120, 0.55);
  box-shadow: 0 8px 28px rgba(200, 40, 60, 0.22);
}

.toast.toast-info {
  border-color: rgba(255, 45, 149, 0.45);
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .bg-glow { animation: none; }
  .view-active { animation: none; }
  .pole-card,
  .discord-hub,
  .btn { transition: none; }
}

/* ── Admin mode ── */
body.admin-editing {
  --topbar-h: 70px;
  padding-top: 48px;
}

.admin-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
  padding: 0.45rem 1.35rem;
  background: linear-gradient(90deg, #2a0a1a 0%, #3d0f28 50%, #1a0614 100%);
  border-bottom: 1px solid rgba(255, 45, 149, 0.55);
  box-shadow: 0 4px 24px rgba(255, 45, 149, 0.2);
  font-size: 0.85rem;
}

.admin-bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-bar-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-bar-brand {
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: 0.02em;
}

.admin-bar-user {
  color: var(--text-muted);
}
.admin-bar-user em {
  font-style: normal;
  color: var(--gold);
}

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

.btn-admin-bar {
  background: rgba(255, 45, 149, 0.12);
  color: var(--text);
  border: 1px solid rgba(255, 45, 149, 0.35);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
}
.btn-admin-bar:hover {
  background: rgba(255, 45, 149, 0.28);
  border-color: var(--accent);
}
.btn-admin-bar-primary {
  background: rgba(255, 45, 149, 0.3);
  border-color: rgba(255, 45, 149, 0.65);
  font-weight: 600;
}
.btn-admin-logout {
  background: transparent;
  color: var(--text-muted);
}
.btn-admin-logout:hover {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.45);
}

/* Modal shell */
.modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 2, 10, 0.78);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 45, 149, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 45, 149, 0.12);
  padding: 1.5rem 1.5rem 1.25rem;
}

.modal-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.modal-lead {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  border-radius: 6px;
}
.modal-close:hover {
  color: var(--text);
  background: rgba(255, 45, 149, 0.12);
}

.admin-login-card {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 45, 149, 0.14), transparent 55%),
    var(--bg-elevated);
}

.admin-login-brand {
  margin-bottom: 0.35rem;
}

.admin-login-mark {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.35rem;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.admin-table input,
.admin-table select,
.admin-rule-card textarea,
.admin-rule-card select,
.admin-pole-meta input,
.admin-pole-meta textarea,
.admin-section-meta input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.admin-table input:focus,
.admin-table select:focus,
.admin-rule-card textarea:focus,
.admin-rule-card select:focus,
.admin-pole-meta input:focus,
.admin-pole-meta textarea:focus,
.admin-section-meta input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 45, 149, 0.2);
}

.admin-form-error {
  color: #ff7a8a;
  font-size: 0.85rem;
  margin: 0;
}

.btn-block { width: 100%; justify-content: center; }

.btn.is-loading,
.btn:disabled.is-loading {
  opacity: 0.85;
  cursor: wait;
}

.admin-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 0.45rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: admin-spin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes admin-spin {
  to { transform: rotate(360deg); }
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 45, 149, 0.35);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.btn-sm:hover { border-color: var(--accent); }
.btn-sm:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-danger {
  background: rgba(255, 70, 90, 0.12);
  border: 1px solid rgba(255, 70, 90, 0.4);
  color: #ff8a98;
  cursor: pointer;
  font-family: inherit;
}
.btn-danger:hover {
  background: rgba(255, 70, 90, 0.25);
  color: #fff;
}

.btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-icon:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--border-hover);
}
.btn-icon:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.btn-icon.danger:hover:not(:disabled) {
  color: #ff8a98;
  border-color: rgba(255, 70, 90, 0.5);
}

/* Admin panel */
.admin-panel-card {
  width: min(1180px, 100%);
  max-height: min(92vh, 940px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 40% at 10% 0%, rgba(255, 45, 149, 0.1), transparent 50%),
    var(--bg-elevated);
}

.admin-panel-head {
  padding: 1.15rem 1.4rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.admin-panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  padding-right: 1.75rem;
}

.admin-panel-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.25rem;
}

.admin-panel-head h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.admin-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.2rem;
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  width: fit-content;
  max-width: 100%;
}

.admin-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.45rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
}
.admin-tab:hover:not(:disabled) {
  color: var(--text);
  background: var(--accent-soft);
}
.admin-tab.active {
  color: #fff;
  background: rgba(255, 45, 149, 0.32);
  border-color: rgba(255, 45, 149, 0.55);
  box-shadow: 0 0 16px rgba(255, 45, 149, 0.15);
}
.admin-tab:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.admin-panel-banner {
  margin: 0.75rem 1.25rem 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}
.admin-panel-banner--ok {
  border-color: rgba(80, 220, 140, 0.45);
  color: #9be7b8;
  background: rgba(40, 140, 80, 0.12);
}
.admin-panel-banner--err {
  border-color: rgba(255, 100, 120, 0.5);
  color: #ff9aa6;
  background: rgba(180, 40, 60, 0.14);
}
.admin-panel-banner--info {
  border-color: rgba(255, 45, 149, 0.4);
  color: var(--accent-2);
}

.admin-panel-body {
  flex: 1;
  overflow: auto;
  padding: 1.1rem 1.35rem;
  min-height: 300px;
}

.admin-panel-foot,
.admin-save-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.35rem;
  border-top: 1px solid rgba(255, 45, 149, 0.28);
  background: linear-gradient(180deg, rgba(20, 6, 18, 0.92), rgba(12, 4, 16, 0.98));
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.admin-save-bar-left,
.admin-save-bar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-save-status {
  font-size: 0.82rem;
  color: var(--text-dim);
}
.admin-save-status.is-dirty {
  color: var(--warn);
  font-weight: 600;
}
.admin-save-status.is-saving {
  color: var(--accent-2);
}

#admin-save.is-dirty {
  box-shadow: 0 0 0 1px rgba(255, 45, 149, 0.45), 0 0 18px rgba(255, 45, 149, 0.25);
}

.admin-contenu {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(210px, 250px) 1fr;
  gap: 1rem;
  min-height: 460px;
  align-items: stretch;
}

.admin-col {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 0;
}

.admin-col-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}
.admin-col-head h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.admin-col-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}
.admin-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}
.admin-bulk {
  margin: 0 0 0.85rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(12, 2, 10, 0.35);
  border: 1px solid rgba(255, 120, 190, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.admin-bulk textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
}
.admin-bulk code {
  font-size: 0.78em;
  color: var(--gold);
}

.admin-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 45, 149, 0.2);
  border: 1px solid rgba(255, 45, 149, 0.35);
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: auto;
  max-height: 240px;
  min-height: 80px;
  padding-right: 0.15rem;
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  padding: 0.5rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
}
.admin-list-item-main {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.admin-list-emoji { flex-shrink: 0; }
.admin-list-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-list-meta {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
}
.admin-list-item:hover {
  background: var(--accent-soft);
}
.admin-list-item.active,
.admin-section-row.active .admin-list-item {
  background: rgba(255, 45, 149, 0.22);
  border-color: rgba(255, 45, 149, 0.4);
}

.admin-section-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.admin-section-row .admin-list-item { flex: 1; min-width: 0; }
.admin-row-actions {
  display: flex;
  gap: 0.15rem;
  flex-shrink: 0;
}

.admin-meta-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.15rem;
}

.admin-pole-meta,
.admin-section-meta {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}
.admin-pole-meta label,
.admin-section-meta label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.admin-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.4rem 0.55rem;
  background: rgba(255, 45, 149, 0.08);
  border: 1px solid rgba(255, 45, 149, 0.18);
  border-radius: 6px;
}
.admin-crumb-sep { color: var(--text-dim); }
.admin-crumb-count {
  margin-left: auto;
  color: var(--accent-2);
  font-weight: 600;
}

.admin-rules-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow: auto;
  flex: 1;
  max-height: 560px;
  padding-right: 0.15rem;
}

.admin-rule-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid rgba(255, 45, 149, 0.55);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-rule-card--note { border-left-color: var(--note); }
.admin-rule-card--warn { border-left-color: var(--warn); }
.admin-rule-card--subtitle { border-left-color: var(--gold); }
.admin-rule-card--rule { border-left-color: var(--accent); }

.admin-rule-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.admin-rule-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  font-family: var(--mono);
  min-width: 1.6rem;
}
.admin-rule-toolbar select {
  flex: 1;
  max-width: 200px;
}

.admin-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem;
  padding: 1.5rem 1rem;
  border: 1px dashed rgba(255, 120, 200, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.15);
  min-height: 120px;
}
.admin-empty-icon {
  color: var(--accent-2);
  font-size: 1.1rem;
  opacity: 0.7;
  margin-bottom: 0.15rem;
}
.admin-empty-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin: 0;
}
.admin-empty-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
  max-width: 260px;
  line-height: 1.4;
}

.admin-muted {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.admin-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.admin-loading .admin-btn-spinner {
  margin-left: 0;
  border-color: rgba(255, 45, 149, 0.25);
  border-top-color: var(--accent);
}

.admin-users {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-table-wrap {
  overflow: auto;
  max-height: min(520px, 58vh);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.15);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th,
.admin-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.admin-table tbody tr:hover {
  background: rgba(255, 45, 149, 0.05);
}
.admin-table th {
  position: sticky;
  top: 0;
  background: #1a0c22;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 1;
  border-bottom-color: rgba(255, 45, 149, 0.28);
}
.admin-table .td-center { text-align: center; }
.admin-table input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
  transform: scale(1.1);
}

.admin-role-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 600;
}
.admin-role-badge--admin {
  background: rgba(255, 176, 32, 0.14);
  color: var(--warn);
  border: 1px solid rgba(255, 176, 32, 0.3);
}
.admin-role-badge--editor {
  border: 1px solid rgba(255, 45, 149, 0.3);
}

.admin-create-user {
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
}
.admin-create-user h3 {
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  color: var(--gold);
}
.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 160px auto;
  gap: 0.75rem;
  align-items: end;
}

@media (max-width: 900px) {
  .admin-contenu {
    grid-template-columns: 1fr;
  }
  .admin-form-row {
    grid-template-columns: 1fr;
  }
  .admin-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.55rem 1rem;
  }
  body.admin-editing { padding-top: 84px; }
  .admin-tabs { width: 100%; }
  .admin-tab { flex: 1; text-align: center; }
  .admin-panel-foot,
  .admin-save-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-save-bar-right {
    justify-content: flex-end;
  }
}

/* Responsive — public */
@media (max-width: 900px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(2)::before { display: none; }
  .stat:nth-child(3) { border-top: 1px solid rgba(255, 176, 216, 0.12); }
  .stat:nth-child(4) { border-top: 1px solid rgba(255, 176, 216, 0.12); }

  .poles-grid,
  #poles-grid {
    grid-template-columns: 1fr;
  }

  #poles-grid .pole-card {
    grid-column: auto;
  }

  .directory-grid,
  .directory-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-groupes {
    grid-template-columns: 1fr;
  }

  .reader-layout {
    grid-template-columns: 1fr;
  }

  .sommaire {
    position: static;
    max-height: none;
  }

  .hero--banner {
    align-items: stretch;
  }

  .hero-stage {
    min-height: 220px;
    height: clamp(220px, 52vw, 380px);
  }

  .hero-copy {
    width: min(1180px, calc(100% - 2rem));
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding-top: 1.35rem;
  }

  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-ctas {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 16.5px;
  }

  .topbar {
    padding: 0 1.1rem;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .directory-grid {
    grid-template-columns: 1fr;
  }

  .directory-category-grid {
    grid-template-columns: 1fr;
  }

  .directory-title {
    letter-spacing: 0.12em;
  }

  .hero-stage {
    min-height: 200px;
    height: clamp(200px, 58vw, 320px);
  }

  .hero-media img {
    object-position: center 52%;
  }

  .hero-copy { padding: 1.25rem 0 0.25rem; }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  #app {
    padding: 0 1.1rem 3.5rem;
  }
}
