:root {
  --blue: #1b3f94;
  --blue-dark: #122c6b;
  --blue-light: #3b8fe0;
  --red: #e31e24;
  --gold: #f2b705;
  --green: #3cb54a;
  --gray-50: #f7f8fa;
  --gray-100: #eef0f4;
  --gray-200: #dde1e8;
  --gray-400: #9aa3b2;
  --gray-600: #5b6472;
  --gray-800: #2b303b;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(20, 30, 60, 0.08);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.55;
}
body > main { flex: 1 0 auto; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Top bar ---------- */
.topbar {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar::after {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg,
    var(--blue) 0 25%, var(--green) 25% 50%, var(--gold) 50% 75%, var(--red) 75% 100%);
}
.topbar .inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 20px 0;
  gap: 12px 28px;
}
.account-nav { display: flex; align-items: stretch; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--blue); font-size: 1.15rem; }
.brand img { height: 46px; width: auto; }
.brand:hover { text-decoration: none; }

/* Tab-style navigation: flat items with an underline indicator, easy to extend.
   On wide screens the tabs are pinned to align with the page container's left
   edge (1160px, centered); below that there isn't room, so they fall back to
   sitting between the logo and the account link. */
nav.main-nav { display: flex; align-items: stretch; gap: 2px; flex-wrap: wrap; }
@media (min-width: 1550px) {
  nav.main-nav {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    transform: translateX(-580px);
    padding-left: 20px;
    align-items: center;
  }
}
nav.main-nav a, .account-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-600);
  padding: 12px 16px 10px;
  font-weight: 600;
  font-size: .95rem;
  border-bottom: 3px solid transparent;
}
nav.main-nav a:hover, .account-nav a:hover { color: var(--blue); text-decoration: none; }
nav.main-nav a.active, .account-nav a.active { color: var(--blue); border-bottom-color: var(--gold); }
.account-nav a.tab-account { color: var(--red); }
.account-nav a.tab-account:hover, .account-nav a.tab-account.active { color: var(--red); border-bottom-color: var(--red); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  padding: 68px 0 84px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -35deg, rgba(255,255,255,.05) 0 2px, transparent 2px 34px
  );
  pointer-events: none;
}
.hero .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 14px;
}
.hero h1 { font-size: 2.5rem; max-width: 660px; position: relative; }
.hero p { font-size: 1.15rem; opacity: .92; max-width: 580px; position: relative; }
.hero .actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; position: relative; }
.hero-stripe {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background: linear-gradient(90deg,
    var(--blue-light) 0 25%, var(--green) 25% 50%, var(--gold) 50% 75%, var(--red) 75% 100%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--gold); color: var(--blue-dark); }
.btn-primary:hover { background: #dba504; }
.btn-outline { background: transparent; border-color: #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #c8181d; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #319b3e; }
.btn-ghost { background: var(--gray-100); color: var(--gray-800); }
.btn-ghost:hover { background: var(--gray-200); }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Sections / cards ---------- */
section.block { padding: 48px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 10px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  border: 1px solid var(--gray-100);
  border-top: 4px solid var(--gray-200);
}
.card h3 { color: var(--blue); }
.card-accent-blue { border-top-color: var(--blue); }
.card-accent-green { border-top-color: var(--green); }
.card-accent-gold { border-top-color: var(--gold); }
.card-accent-red { border-top-color: var(--red); }

/* ---------- Eyebrow / section intro ---------- */
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 8px;
}
.section-intro { max-width: 700px; margin: 0 auto 36px; text-align: center; }
.section-intro h2 { font-size: 1.9rem; }

/* ---------- Feature grid (icon blocks) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-item {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  border: 1px solid var(--gray-100);
}
.feature-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  color: #fff;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature-item p { font-size: .92rem; color: var(--gray-600); margin: 0; }

/* ---------- Inline stat pill ---------- */
.stat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 999px;
  padding: 10px 22px;
  box-shadow: var(--shadow);
}
.stat-pill strong { font-size: 1.6rem; color: var(--blue); font-weight: 800; }
.stat-pill span { color: var(--gray-600); font-size: .9rem; }

/* ---------- Association list ---------- */
.assoc-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.assoc-item h3 { margin: 0 0 4px; font-size: 1.1rem; }
.assoc-meta { color: var(--gray-600); font-size: .92rem; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.filters input, .filters select {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  font-family: var(--font);
}

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge-gold { background: #fdf1cc; color: #8a6600; }
.badge-green { background: #dff4e2; color: #206b2b; }
.badge-red { background: #fbdcdd; color: #9c1216; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ---------- Forms ---------- */
form.stack { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field input[type=text], .field input[type=email], .field input[type=password],
.field input[type=tel], .field input[type=number], .field input[type=date],
.field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-family: var(--font);
  font-size: .97rem;
  background: #fff;
}
.field textarea { resize: vertical; min-height: 90px; }
.field .hint { color: var(--gray-600); font-size: .84rem; margin-top: 4px; }
.field .error { color: var(--red); font-size: .84rem; margin-top: 4px; font-weight: 600; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-row input { margin-top: 4px; }
fieldset { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 18px; }
legend { font-weight: 700; color: var(--blue); padding: 0 8px; }

/* ---------- Espace association landing (login + demande de compte) ---------- */
.login-split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 880px) { .login-split { grid-template-columns: 1fr; } }
.benefits-list { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.benefits-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; }
.benefits-list svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--green); margin-top: 2px; }
.panel-account {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px;
}
.panel-account h3 { color: #fff; }
.panel-account .benefits-list svg { color: var(--gold); }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; font-weight: 600; }
.alert-error { background: #fbdcdd; color: #7a1015; }
.alert-success { background: #dff4e2; color: #1f5f29; }

/* ---------- Tables ---------- */
table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--gray-100); font-size: .92rem; }
table.data th { background: var(--gray-100); color: var(--gray-800); font-weight: 700; }
table.data tr:last-child td { border-bottom: none; }
.table-actions { display: flex; gap: 8px; }

/* ---------- Admin/assoc shell ---------- */
.app-shell { display: flex; min-height: calc(100vh - 70px); }
.sidebar {
  width: 230px;
  background: var(--blue-dark);
  color: #fff;
  padding: 22px 14px;
  flex-shrink: 0;
}
.sidebar .space-label { text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; opacity: .6; padding: 0 12px 10px; }
.sidebar a { display: block; color: #dfe6f7; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: .93rem; margin-bottom: 2px; }
.sidebar a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.sidebar a.active { background: var(--gold); color: var(--blue-dark); }
.main-content { flex: 1; padding: 30px; max-width: 100%; overflow-x: auto; }
.main-content h1 { color: var(--blue); }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }

/* ---------- Map ---------- */
#carte-equipements { height: 480px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Closing CTA band ---------- */
.cta-band {
  background: var(--gray-800);
  background: linear-gradient(120deg, var(--blue-dark) 0%, var(--blue) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.cta-band h3 { color: #fff; margin-bottom: 4px; }
.cta-band p { color: rgba(255,255,255,.85); margin: 0; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--blue-dark); color: #cfd9f2; padding: 22px 0; font-size: .9rem; flex-shrink: 0; }
footer.site-footer a { color: #fff; }
.site-footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-admin-link {
  opacity: 0;
  transition: opacity .15s ease;
}
.footer-admin-link:hover, .footer-admin-link:focus-visible { opacity: 1; }

.text-muted { color: var(--gray-600); }
.mt-0 { margin-top: 0; }
.stat { font-size: 2rem; font-weight: 800; color: var(--blue); }
.stat-label { color: var(--gray-600); font-size: .85rem; }
