:root {
  --bg: #f2f5f9;
  --card: #ffffff;
  --primary: #0d3b66;
  --accent: #0e7490;
  --text: #1f2937;
  --muted: #64748b;
  --active: #0f766e;
  --maintenance: #b45309;
  --inactive: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.topbar {
  background: linear-gradient(120deg, var(--primary), #184e77);
  color: #fff;
  padding: 48px 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.hero-visual-wrap {
  margin-top: 28px;
}

.hero-visual {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.25);
}

.brand {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  margin-bottom: 8px;
  opacity: 0.85;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
}

h2 {
  margin-top: 0;
}

.subtitle {
  margin: 0;
  max-width: 65ch;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin: 24px 0;
}

.status-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.status {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
}

.status.active {
  background: rgba(15, 118, 110, 0.15);
  color: var(--active);
}

.status.maintenance {
  background: rgba(180, 83, 9, 0.16);
  color: var(--maintenance);
}

.status.inactive {
  background: rgba(185, 28, 28, 0.16);
  color: var(--inactive);
}

.status.maintenance-prolonger {
  background: rgba(180, 83, 9, 0.25);
  color: #7c2d12;
}

.status.fermé {
  background: rgba(153, 27, 27, 0.16);
  color: #7f1d1d;
}

.status.privée {
  background: rgba(30, 60, 114, 0.16);
  color: #1e3c72;
}

.btn {
  text-decoration: none;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  padding: 11px 18px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.85rem;
  margin-right: 6px;
  border-radius: 6px;
}

.btn-edit {
  background: var(--accent);
  color: #fff;
}

.btn-delete {
  background: var(--inactive);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.topbar .btn-primary,
.topbar .btn {
  background: #fff;
  color: var(--primary);
}

.btn-secondary-dark {
  background: transparent;
  color: var(--primary);
  border: 1px solid #cbd5e1;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 8px;
  border-bottom: 1px solid #e2e8f0;
}

th {
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.compact-form {
  max-width: 420px;
}

.login-card {
  max-width: 560px;
}

.login-card p {
  color: var(--muted);
}

.login-error {
  color: var(--inactive);
  font-weight: 600;
  min-height: 1.2rem;
  margin: 0;
}

.hidden {
  display: none;
}

.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.admin-illustration {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
select {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
}

input:focus,
select:focus {
  outline: 3px solid rgba(14, 116, 144, 0.2);
  border-color: var(--accent);
}

.site-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.site-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}

.site-item strong {
  display: block;
  margin-bottom: 4px;
}

.site-item small {
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.site-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

@media (max-width: 920px) {
  .topbar .container,
  .admin-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .btn {
    justify-self: start;
  }

  .admin-list-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
