/* Public site: the colours and font of the association's site, lesfluxs.eu, without Vaadin */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
}

:root {
  --afal-navy: #1b269d;
  --afal-blue: #00a9ff;
  --afal-red: #ff1400;
  /* White text needs a slightly darker red to stay readable (4.5:1) */
  --afal-red-strong: #db1100;
  --afal-red-text: #c81000;
  --afal-sky: #d9f2ff;
  --site-text: #1f2933;
  --site-muted: #52606d;
  --site-border: #e4e7eb;
  --site-background: #f4fafd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--site-text);
  background: var(--site-background);
  line-height: 1.6;
}

a {
  color: var(--afal-navy);
}

.site-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  background: white;
  border-bottom: 4px solid var(--afal-blue);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.site-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-brand img {
  display: block;
  width: min(260px, 70vw);
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
}

.site-nav a {
  color: var(--afal-navy);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-nav .site-nav-cta {
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--afal-red-strong);
  color: white !important;
  font-weight: 700;
}

.site-main {
  padding-top: 32px;
  padding-bottom: 48px;
  background: white;
  min-height: 60vh;
}

.site-main h1 {
  margin-top: 0;
  color: var(--afal-navy);
}

.site-content h2 {
  color: var(--afal-navy);
  margin-top: 1.6em;
}

.site-footer {
  padding: 24px 0;
  font-size: 0.9rem;
  color: var(--site-muted);
  border-top: 1px solid var(--site-border);
}

/* Membership form */
.site-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.site-form fieldset {
  grid-column: 1 / -1;
  border: 1px solid var(--site-border);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 16px;
}

.site-form legend {
  font-weight: 700;
  color: var(--afal-navy);
  padding: 0 6px;
}

/* Fields shown or hidden by script: the hidden attribute must win over their display rule */
[hidden] {
  display: none !important;
}

.site-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-field-wide {
  grid-column: 1 / -1;
}

.site-field label {
  font-weight: 600;
  font-size: 0.9rem;
}

.site-field input,
.site-field select {
  padding: 10px;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font: inherit;
}

.site-field-error {
  color: var(--afal-red-text);
  font-size: 0.85rem;
}

.site-check {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.site-check input {
  margin-top: 5px;
}

.site-honeypot {
  position: absolute;
  left: -10000px;
}

.site-button {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  background: var(--afal-red-strong);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.site-button-secondary {
  align-self: flex-start;
  background: white;
  color: var(--afal-navy);
  border: 2px solid var(--afal-navy);
}

.site-steps-intro {
  margin: 0;
}

.site-step-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.site-alert {
  padding: 12px 16px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--afal-red) 8%, transparent);
  color: var(--afal-red-text);
}

.site-notice {
  padding: 12px 16px;
  border-radius: 6px;
  background: var(--afal-sky);
}

/* Member card verification page */
.site-card-status {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 1.2rem;
  font-weight: 700;
}

.site-card-valid {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.site-card-expired {
  background: color-mix(in srgb, var(--afal-red) 10%, transparent);
  color: var(--afal-red-text);
}
