:root {
  --font-title: "Barlow Condensed", "Oswald", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg: #0a0f16; --bg-2: #0d131c; --panel: #111823; --panel-2: #172030; --line: #222d3d; --line-2: #2d3a4e;
  --text: #e9edf3; --muted: #93a0b3; --dim: #64718a;
  --accent: #2d8ee6; --accent-2: #5aaaf2; --accent-soft: rgba(45,142,230,.12);
  --ok: #3fb97a; --warn: #e6a23c; --info: #4c8fe6; --off: #7a8190; --danger: #e5534b;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-title); text-transform: uppercase; letter-spacing: .5px; line-height: 1.1; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: 2.6rem; } h2 { font-size: 1.9rem; } h3 { font-size: 1.25rem; } h4 { font-size: 1.05rem; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.kicker { font-family: var(--font-title); text-transform: uppercase; font-size: .85rem; letter-spacing: 6px; color: var(--accent-2); font-weight: 600; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(10,15,22,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 28px; min-height: 76px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: flex-end; gap: 2px; font-family: var(--font-title); text-transform: uppercase; font-size: 2.1rem; font-weight: 800; line-height: 1; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-v { width: 2.4rem; height: 2.3rem; color: var(--accent); margin-bottom: -2px; filter: drop-shadow(0 0 6px rgba(45,142,230,.35)); }
.top nav { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; justify-content: center; }
.top nav a { font-family: var(--font-title); text-transform: uppercase; letter-spacing: 1px; font-size: 1.02rem; font-weight: 600; color: #c3ccd9; padding: 8px 12px; border-bottom: 2px solid transparent; }
.top nav a:hover, .top nav a.on { color: #fff; border-bottom-color: var(--accent); text-decoration: none; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.who img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--accent); }
.is-home .top { position: absolute; left: 0; right: 0; background: linear-gradient(180deg, rgba(6,10,15,.85), rgba(6,10,15,0)); border-bottom: 1px solid rgba(255,255,255,.06); backdrop-filter: none; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-title); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; font-size: .98rem;
  background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 8px; padding: 10px 18px; cursor: pointer; transition: .15s; }
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); text-decoration: none; }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.outline { background: rgba(10,15,22,.4); border-color: #c9d2de; color: #fff; }
.btn.outline:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn.danger { background: transparent; border-color: #7a2a26; color: #ff8a80; }
.btn.lg { padding: 16px 30px; font-size: 1.08rem; }
.btn .ti { font-size: 1.2em; }

main { padding: 36px 24px 80px; }
.is-home main, .has-banner main { padding-top: 0; }
.flash { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 0; margin: 20px 0; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Bannière de page ---------- */
.banner { margin: 0 calc(50% - 50vw) 40px; padding: 70px max(24px, calc(50vw - 636px)) 50px; position: relative;
  background: linear-gradient(90deg, rgba(10,15,22,.97) 30%, rgba(10,15,22,.75)), linear-gradient(0deg, var(--bg), rgba(10,15,22,0) 60%), url("/assets/hero.jpg") center 30%/cover, var(--panel);
  border-bottom: 1px solid var(--line); }
.banner h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; margin: 8px 0 10px; }
.banner p { color: #c3ccd9; max-width: 680px; margin: 0; font-size: 1.05rem; }
.banner .actions { margin-top: 22px; }
.crumb { font-size: 13px; color: var(--muted); }
.crumb a { color: var(--muted); }

/* ---------- Cartes ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
.grid .card { margin: 0; }
.card.link { color: var(--text); display: block; transition: border-color .15s, transform .15s; }
.card.link:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.card p { margin: 0; color: var(--muted); }
.ico { color: var(--accent); font-size: 1.8rem; flex: none; line-height: 1; }

/* ---------- Accueil ---------- */
.home-hero { position: relative; margin: 0 calc(50% - 50vw); padding: 170px max(24px, calc(50vw - 636px)) 0; min-height: min(100vh, 900px);
  background: linear-gradient(90deg, rgba(6,10,15,.94) 0%, rgba(6,10,15,.55) 40%, rgba(6,10,15,0) 70%),
              linear-gradient(0deg, var(--bg) 0%, rgba(6,10,15,0) 30%),
              url("/assets/hero.jpg") center/cover no-repeat, var(--panel);
  border-bottom: 1px solid var(--line); }
.home-hero h1 { font-size: clamp(3rem, 6.5vw, 5.8rem); font-weight: 800; line-height: .98; max-width: 720px; margin: 14px 0 18px; text-shadow: 0 4px 30px rgba(0,0,0,.5); }
.home-hero > p { font-size: 1.3rem; color: #d3dae5; margin: 0 0 30px; }
.side-tag { position: absolute; left: 28px; bottom: 60px; font-size: 11px; letter-spacing: 5px; color: var(--muted); text-transform: uppercase; line-height: 1.8; }
.side-tag::before { content: ""; display: block; width: 36px; height: 2px; background: var(--muted); margin-bottom: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(12,18,27,.96); border: 1px solid var(--line-2); border-radius: var(--radius); max-width: 960px; margin: 80px auto 0; transform: translateY(50%); }
.stat { padding: 18px 26px; display: flex; gap: 14px; align-items: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-title); text-transform: uppercase; font-size: 1.15rem; letter-spacing: .5px; }
.stat small { color: var(--muted); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--off); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 12px var(--ok); }

.section { padding: 90px 0 0; }
.home-hero + .section { padding-top: 130px; }
.section-title { text-align: center; margin-bottom: 38px; }
.section-title h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); display: inline-flex; align-items: center; gap: 20px; margin-bottom: 8px; }
.section-title h2::before, .section-title h2::after { content: ""; width: 54px; height: 2px; background: var(--accent); }
.section-title p { letter-spacing: 4px; font-size: .8rem; color: var(--muted); margin: 0; text-transform: uppercase; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.feature { display: flex; gap: 20px; align-items: flex-start; padding: 26px; }
.feature .ico { font-size: 3.2rem; }
.feature h3 { margin-bottom: 6px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 30px 26px 26px; overflow: hidden; }
.step::before { counter-increment: step; content: "0" counter(step); position: absolute; right: 16px; top: 4px; font-family: var(--font-title); font-weight: 800; font-size: 5rem; color: rgba(45,142,230,.09); line-height: 1; }
.step .ico { font-size: 2.2rem; margin-bottom: 14px; display: block; }
.step .btn { margin-top: 16px; }

.city { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; align-items: stretch; }
.city-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.big-num { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.big-num b { display: block; font-family: var(--font-title); font-size: 3rem; line-height: 1; color: #fff; }
.big-num span { color: var(--muted); text-transform: uppercase; letter-spacing: 2px; font-size: 12px; }
.big-num.accent { background: linear-gradient(135deg, rgba(45,142,230,.22), rgba(45,142,230,.05)); border-color: rgba(45,142,230,.4); }
.list-card { margin: 0; }
.list-card h3 { display: flex; align-items: center; gap: 10px; }
.mini { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--text); }
.mini:hover { text-decoration: none; color: var(--accent-2); }
.mini .who-l { flex: 1; min-width: 0; }
.mini small { display: block; color: var(--muted); }

.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.links .card { display: flex; gap: 16px; align-items: flex-start; padding: 24px; position: relative; }
.links .card::after { content: "\2192"; position: absolute; top: 18px; right: 20px; color: var(--muted); font-size: 18px; transition: .15s; }
.links .card:hover::after { color: var(--accent); right: 16px; }
.links .card .ico { font-size: 2.4rem; }
.links .card h3 { font-size: 1.15rem; margin: 0 0 4px; }
.links .card p { font-size: 13.5px; }

.cta { margin-top: 90px; border-radius: 16px; padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(100deg, rgba(88,101,242,.28), rgba(45,142,230,.12) 60%, rgba(45,142,230,.02)), var(--panel); border: 1px solid rgba(88,101,242,.4); }
.cta h2 { margin: 0 0 6px; font-size: 2.1rem; }
.cta p { margin: 0; color: #c3ccd9; }
.btn.discord { background: #5865f2; border-color: #5865f2; }
.btn.discord:hover { background: #6d78f5; border-color: #6d78f5; }

/* ---------- Groupes ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.tabs a { padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); font-size: 14px; }
.tabs a:hover { color: #fff; border-color: var(--accent); text-decoration: none; }
.tabs a b { color: var(--accent-2); margin-left: 4px; }
.cat { margin: 0 0 46px; scroll-margin-top: 100px; }
.cat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cat-head h2 { margin: 0; display: flex; align-items: center; gap: 12px; }
.count { font-family: var(--font-body); font-size: 13px; letter-spacing: 0; color: var(--muted); background: var(--panel-2); border-radius: 999px; padding: 2px 10px; text-transform: none; font-weight: 500; }
.org { position: relative; overflow: hidden; padding-top: 24px; }
.org::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--off); }
.org.s-ok::before { background: var(--ok); } .org.s-warn::before { background: var(--warn); } .org.s-info::before { background: var(--info); }
.org-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.org-top .t { flex: 1; min-width: 0; }
.org-top h3, .org-top h1 { margin: 0; }
.logo { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: var(--panel-2); border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--font-title); font-weight: 800; font-size: 1.3rem; color: var(--accent-2); }
.org-top.big .logo { width: 84px; height: 84px; font-size: 2rem; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
dt { color: var(--muted); display: flex; align-items: center; gap: 6px; } dd { margin: 0; font-weight: 500; }
.bar { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin-top: 14px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.empty { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); }

.badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge.ok { background: rgba(63,185,122,.15); color: var(--ok); }
.badge.warn { background: rgba(230,162,60,.15); color: var(--warn); }
.badge.info { background: rgba(76,143,230,.15); color: var(--info); }
.badge.off { background: rgba(122,129,144,.18); color: var(--off); }

/* ---------- Règlement ---------- */
.search { position: relative; max-width: 560px; margin-top: 24px; }
.search .ti { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.2rem; }
.search input { padding: 14px 16px 14px 46px; font-size: 16px; background: rgba(10,15,22,.8); border-color: var(--line-2); border-radius: 10px; }
.chap-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.chap-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; color: var(--text); }
.chap-card .n { font-family: var(--font-title); font-weight: 800; color: var(--accent); font-size: 1rem; letter-spacing: 2px; }
.chap-card h3 { margin: 0; font-size: 1.2rem; }
.chap-card small { color: var(--muted); }
.chap-nav { position: sticky; top: 76px; z-index: 10; margin: 0 calc(50% - 50vw) 34px; padding: 12px max(24px, calc(50vw - 636px)); background: rgba(10,15,22,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; gap: 8px; overflow-x: auto; }
.chap-nav a { white-space: nowrap; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 13.5px; }
.chap-nav a:hover, .chap-nav a.on { color: #fff; border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.chapter { margin-bottom: 64px; scroll-margin-top: 150px; }
.chap-head { display: flex; gap: 22px; align-items: flex-start; padding: 28px; border-radius: 16px; margin-bottom: 20px;
  background: linear-gradient(120deg, rgba(45,142,230,.14), rgba(45,142,230,0) 60%), var(--panel); border: 1px solid var(--line); }
.chap-head .ico { font-size: 2.8rem; background: var(--accent-soft); border-radius: 14px; width: 72px; height: 72px; display: grid; place-items: center; }
.chap-head .t { flex: 1; min-width: 0; }
.chap-head h2 { font-size: 2.1rem; margin: 2px 0 8px; }
.chap-head .prose p { color: #c3ccd9; }
.articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; scroll-margin-top: 150px; transition: border-color .15s; }
.article:hover { border-color: var(--line-2); }
.article:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.article-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.article-h .n { font-family: var(--font-title); font-weight: 800; color: var(--accent); background: var(--accent-soft); border-radius: 8px; min-width: 38px; height: 32px; display: grid; place-items: center; }
.article-h h3 { margin: 0; flex: 1; font-size: 1.25rem; }
.article-h a.edit { font-size: 13px; }
.article .prose { color: #cdd5e1; font-size: 14.5px; }
.no-result { display: none; }
.prose p { margin: 0 0 .8rem; }
.prose p:last-child, .prose ul:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 .8rem; padding: 0; list-style: none; }
.prose li { position: relative; padding-left: 22px; margin-bottom: 6px; }
.prose li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.alert { display: flex; gap: 10px; align-items: flex-start; border: 1px solid rgba(229,83,75,.35); background: rgba(229,83,75,.08); color: #ffb4ae; padding: 10px 14px; margin: 0 0 .8rem; border-radius: 10px; font-weight: 600; font-size: 14px; }
.alert::before { content: "!"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; margin-top: 1px; }
.alert:last-child { margin-bottom: 0; }

/* ---------- Formulaires ---------- */
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.form .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
input, select, textarea { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { resize: vertical; }
.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; padding: 50px 24px 30px; }
.foot-grid h4 { color: #fff; margin-bottom: 14px; }
.foot-grid a { display: block; color: var(--muted); padding: 3px 0; font-size: 14px; }
.foot-grid a:hover { color: #fff; }
.foot-grid p { color: var(--muted); font-size: 14px; max-width: 320px; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; text-transform: uppercase; letter-spacing: 4px; font-size: 11px; color: var(--dim); border-top: 1px solid var(--line); padding: 18px 24px 26px; }

@media (max-width: 1000px) {
  .city { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .side-tag { display: none; }
}
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr; transform: none; margin-top: 50px; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
  .home-hero { padding-top: 140px; padding-bottom: 40px; }
  .home-hero + .section { padding-top: 70px; }
  .articles { grid-template-columns: 1fr; }
  .chap-head { flex-direction: column; }
  .who span { display: none; }
  .top-in { gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .top nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .cta { padding: 28px; }
}

/* ---------- Carte ---------- */
.foot-grid a.brand { display: inline-flex; font-size: 2.1rem; color: #fff; padding: 0; }
.gmap { height: 460px; border-radius: var(--radius); border: 1px solid var(--line); background: #0fa7d6; overflow: hidden; z-index: 0; }
.gmap.tall { height: 620px; }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); }
.leaflet-popup-content a { color: #fff; }
.leaflet-bar a { background: var(--panel); color: var(--text); border-color: var(--line-2); }
.leaflet-bar a:hover { background: var(--panel-2); }
.rv-pin span { display: block; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.5); }
.map-block { margin-bottom: 46px; }
.map-block .cat-head { border: 0; padding: 0; }
.detail-grid { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.detail-grid .gmap { height: 520px; }
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } .gmap, .gmap.tall, .detail-grid .gmap { height: 380px; } }
.gmap.leaflet-container { background: #10a8d7; }
