:root {
  --teal: #1f7a8c;
  --deep: #003943;
  --cream: #f2eee5;
  --gold: #dba044;
  --red: #d73224;
  --ink: #183035;
}
* { box-sizing: border-box; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; }
button, input, select { font: inherit; }
.kicker { margin: 0 0 .5rem; color: var(--gold); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; color: var(--deep); font-size: clamp(2.2rem, 6vw, 4.6rem); line-height: .9; letter-spacing: -.05em; text-transform: uppercase; }
.login-card {
  width: min(100% - 2rem, 460px);
  margin: 10vh auto;
  padding: clamp(1.4rem, 5vw, 2.5rem);
  background: white;
  box-shadow: 0 25px 70px rgba(0,57,67,.15);
}
.login-card form { display: grid; gap: 1rem; margin-top: 2rem; }
label { display: grid; gap: .4rem; font-size: .78rem; font-weight: 800; }
input, select { min-width: 0; height: 48px; border: 1px solid #b8b5aa; padding: 0 .8rem; background: white; }
button, .button { border: 0; padding: .9rem 1.1rem; color: white; background: var(--red); cursor: pointer; font-weight: 800; text-decoration: none; }
.button.secondary { background: var(--deep); }
.alert { border-left: 4px solid var(--red); padding: .75rem 1rem; color: #8d251d; background: #fff3f0; }
.success-note { border-left: 4px solid var(--gold); padding: .75rem 1rem; color: var(--deep); background: #fff8e8; line-height: 1.5; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2rem clamp(1rem, 5vw, 4rem); color: white; background: var(--teal); }
.admin-header h1 { color: white; }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.link-button { padding: 0; background: transparent; text-decoration: underline; text-underline-offset: .2em; }
.admin-main { width: min(100% - 2rem, 1280px); margin: 2rem auto 4rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stats article { display: grid; padding: 1.25rem; background: white; }
.stats strong { color: var(--deep); font-size: 2.4rem; }
.stats span { color: #657174; font-size: .8rem; font-weight: 700; text-transform: uppercase; }
.attribution-panel { margin-top: 1.5rem; padding: 1.25rem; background: white; }
.map-panel { margin-top: 1.5rem; padding: 1.25rem; background: white; }
.map-figure { margin: 0; }
.france { display: block; width: 100%; max-width: 760px; margin: 0 auto; height: auto; }
.france .shapes path { stroke: white; stroke-width: 1.4; stroke-linejoin: round; }
.france .labels text, .france .inset text {
  font-size: 15px;
  font-weight: 800;
  text-anchor: middle;
  pointer-events: none;
}
.france .inset rect { fill: none; stroke: #cfc9bd; stroke-width: 1.5; }
.france .inset line { stroke: #cfc9bd; stroke-width: 1.5; stroke-dasharray: 5 4; }
.france .inset path { stroke: white; stroke-width: 0.9; }
.france .inset-title {
  fill: #657174;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.map-scale-title {
  margin: 1.25rem 0 .5rem;
  color: #657174;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}
.map-scale {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.map-scale li { display: flex; align-items: center; gap: .4rem; color: #657174; font-size: .74rem; font-weight: 700; }
.map-scale .swatch { width: 18px; height: 12px; border: 1px solid rgba(24,48,53,.12); }
/* Paliers de la carte. En classes plutôt qu'en styles en ligne, que la
   politique de sécurité de la page interdit. */
.palier-0 { color: #5f6669; background: #e8e4dc; }
.palier-1 { color: #0d2b31; background: #89bbc8; }
.palier-2 { color: #0d2b31; background: #51a1b2; }
.palier-3 { color: #ffffff; background: #047f94; }
.palier-4 { color: #ffffff; background: #00677a; }
.palier-5 { color: #ffffff; background: #005261; }
.palier-6 { color: #ffffff; background: #003d48; }
.territories { margin-top: 1.5rem; border-top: 1px solid #e6e2da; }
.territories ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.territories li { display: grid; gap: .1rem; padding: .7rem .8rem; }
.territories strong { font-size: 1.15rem; }
.territories span { font-size: .74rem; font-weight: 700; opacity: .85; }
.territories em { font-size: .68rem; font-style: normal; opacity: .7; }
.delete-link { color: #a3261c; font-size: .78rem; font-weight: 700; }
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  color: #0d2b31;
  background: #d8ecf1;
  font-size: .7rem;
  font-weight: 800;
}
.import-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: .75rem;
  align-items: end;
}
.import-form button { height: 48px; }
.import-form input[type="file"] { padding: .55rem .6rem; }
.inline-form { display: flex; gap: .5rem; align-items: center; }
.inline-form input { width: min(100%, 260px); height: 38px; }
.inline-form .link-button { font-size: .74rem; white-space: nowrap; }
@media (max-width: 760px) {
  .import-form { grid-template-columns: 1fr; }
  .import-form button { width: 100%; }
}
.summary { display: grid; gap: .55rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.summary li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #e6e2da; padding-bottom: .5rem; }
.summary span { color: #657174; font-size: .74rem; font-weight: 800; text-transform: uppercase; }
.summary strong { font-size: .9rem; word-break: break-all; }
.login-card form .button.secondary { text-align: center; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1rem; }
.section-heading h2 { margin: 0; color: var(--deep); font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1; }
.section-heading > p { margin: 0; color: #657174; font-size: .82rem; }
.source-name { display: grid; min-width: 170px; gap: .45rem; }
.source-name progress { width: 100%; height: 5px; border: 0; background: #e8e4dc; }
.source-name progress::-webkit-progress-bar { background: #e8e4dc; }
.source-name progress::-webkit-progress-value { background: var(--gold); }
.source-name progress::-moz-progress-bar { background: var(--gold); }
.filters { display: grid; grid-template-columns: 1fr 140px 110px 150px 160px auto; gap: .75rem; align-items: end; margin-top: 1.5rem; padding: 1rem; background: white; }
.filters button { height: 48px; }
.result-count { color: #657174; font-size: .85rem; font-weight: 700; }
.table-wrap { overflow-x: auto; background: white; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .9rem 1rem; border-bottom: 1px solid #e6e2da; text-align: left; white-space: nowrap; }
th { color: #657174; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
td { font-size: .86rem; }
.status { padding: .3rem .5rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.status-confirmed { color: #165c32; background: #ddf5e5; }
.status-pending { color: #765214; background: #fff0c9; }
.status-unsubscribed { color: #7d2922; background: #fee3df; }
.pagination { display: flex; justify-content: space-between; padding-top: 1rem; font-weight: 800; }
.message-page { display: grid; min-height: 100vh; place-items: center; padding: 1rem; color: white; background: var(--teal); }
.message-card { width: min(100%, 650px); }
.message-card h1 { color: white; }
.message-card p { color: #e8ceac; font-size: 1.05rem; line-height: 1.6; }
.message-mark { display: block; width: 52px; height: 4px; margin-bottom: 1.5rem; background: var(--red); }
.message-mark.is-success { background: var(--gold); }
.message-card .button { display: inline-block; margin-top: 1rem; }
@media (max-width: 760px) {
  .admin-header, .header-actions { align-items: flex-start; flex-direction: column; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: .5rem; }
  .stats { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .filters button { width: 100%; }
}
