@charset "UTF-8";

:root {
  --bleu-nuit: #102543;
  --bleu-arcavium: #2457a4;
  --bleu-clair: #98b5dc;
  --papier: #f7f4ee;
  --encre: #14233c;
  --vert: #248850;
  --noir: #1a1a1a;
  --bordure: rgba(16, 37, 67, 0.15);
  --sans: Arial, Helvetica, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bleu-nuit); }

body {
  margin: 0;
  min-width: 320px;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--serif);
}

button, input { font: inherit; }

.site-header {
  min-height: 5.3rem;
  padding: .9rem clamp(1.25rem, 4vw, 4rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--bleu-nuit);
  color: #fff;
}

.brand {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
}

.brand-symbol {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.38);
  font-size: 2.35rem;
  line-height: 1;
}

.brand-eyebrow,
.brand-name { display: block; font-family: var(--sans); }

.brand-eyebrow {
  margin-bottom: .15rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .58rem;
  font-weight: 700;
  color: var(--bleu-clair);
}

.brand-name { letter-spacing: .08em; font-size: 1.15rem; font-weight: 300; }

.header-section {
  margin: 0;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-family: var(--sans);
  font-size: .66rem;
  line-height: 1.5;
}
.header-section span { color: var(--bleu-clair); }

.intro {
  padding: clamp(3rem, 8vw, 7.5rem) clamp(1.25rem, 8vw, 10rem);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(16rem, .7fr);
  align-items: end;
  gap: 2rem;
  background:
    radial-gradient(circle at 93% 4%, rgba(152,181,220,.23), transparent 23rem),
    linear-gradient(135deg, #16396f, var(--bleu-arcavium));
  color: white;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 700;
}

.intro .eyebrow { color: var(--bleu-clair); }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 400; }

h1 {
  max-width: 12ch;
  margin-bottom: 0;
  font-size: clamp(2.9rem, 6vw, 6.5rem);
  line-height: .93;
  letter-spacing: -.045em;
}

.intro-text {
  max-width: 30rem;
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.32rem);
  line-height: 1.55;
  color: rgba(255,255,255,.91);
}

.map-section { padding: clamp(1.25rem, 4vw, 4rem); background: var(--papier); }

.map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.map-toolbar .eyebrow,
.architecture-note .eyebrow { color: var(--bleu-arcavium); }

h2 {
  margin: .45rem 0 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: -.03em;
}

.search-wrap { position: relative; width: min(100%, 24rem); font-family: var(--sans); }

.search-wrap input {
  width: 100%;
  border: 1px solid var(--bordure);
  border-radius: 0;
  padding: .9rem 1rem;
  background: white;
  color: var(--encre);
  outline: none;
}

.search-wrap input:focus { border-color: var(--bleu-arcavium); }

.search-results {
  position: absolute;
  z-index: 1001;
  top: calc(100% + .25rem);
  width: 100%;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--bordure);
  background: white;
  box-shadow: 0 12px 30px rgba(16,37,67,.18);
}

.search-result {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #ece7de;
  padding: .78rem 1rem;
  text-align: left;
  background: white;
  color: var(--encre);
  font-family: var(--sans);
  font-size: .92rem;
  cursor: pointer;
}

.search-result:hover,
.search-result:focus-visible { background: #edf3fb; }

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  min-height: min(70vh, 48rem);
  border: 1px solid var(--bordure);
  background: #dbe7ef;
}

.map-frame { position: relative; min-height: 32rem; }

#carte {
  width: 100%;
  height: 100%;
  min-height: 32rem;
  font-family: var(--sans);
  background: #dbe7ef;
}

.map-status {
  position: absolute;
  z-index: 600;
  left: 1rem;
  bottom: 1rem;
  max-width: calc(100% - 2rem);
  padding: .7rem .85rem;
  background: rgba(16,37,67,.90);
  color: white;
  font-family: var(--sans);
  font-size: .82rem;
  line-height: 1.4;
}

.commune-panel {
  padding: 1.55rem;
  display: flex;
  min-height: 32rem;
  flex-direction: column;
  background: white;
  border-left: 1px solid var(--bordure);
}

.panel-top { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.panel-top .eyebrow { color: var(--bleu-arcavium); }

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .35rem .55rem;
  border: 1px solid var(--bordure);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-family: var(--sans);
  font-size: .6rem;
  font-weight: 700;
}

.status-pill.green { border-color: rgba(36,136,80,.45); color: var(--vert); }
.status-pill.black { border-color: rgba(0,0,0,.35); color: var(--noir); }

.commune-panel h3 {
  margin: 1.5rem 0 .8rem;
  font-size: clamp(2rem, 3.2vw, 3.4rem);
  line-height: .98;
  letter-spacing: -.04em;
}

.panel-description {
  margin: 0;
  font-family: var(--sans);
  font-size: .97rem;
  line-height: 1.58;
  color: #46546a;
}

.stats { margin: 1.7rem 0 0; display: grid; gap: .75rem; font-family: var(--sans); }
.stats div { padding: .85rem 0; border-top: 1px solid var(--bordure); }
.stats .rate { border-bottom: 1px solid var(--bordure); }
.stats dt { color: #69758a; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; }
.stats dd { margin: .28rem 0 0; color: var(--encre); font-family: var(--serif); font-size: 1.65rem; }

.panel-actions { display: grid; gap: .7rem; margin-top: 1.4rem; }

.panel-actions button {
  border: 1px solid var(--bleu-arcavium);
  padding: .78rem .8rem;
  background: var(--bleu-arcavium);
  color: white;
  font-family: var(--sans);
  font-size: .86rem;
  font-weight: 700;
  cursor: not-allowed;
  opacity: .58;
}

.panel-actions .secondary { background: white; color: var(--bleu-arcavium); }

.panel-note {
  margin: auto 0 0;
  padding-top: 1.25rem;
  color: #657286;
  font-family: var(--sans);
  font-size: .77rem;
  line-height: 1.5;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem;
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: .79rem;
  color: #516077;
}

.map-legend span { display: inline-flex; align-items: center; gap: .45rem; }

.point {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(16,37,67,.3);
}
.point.green { background: var(--vert); }
.point.black { background: var(--noir); }

.leaflet-container { background: #dbe7ef; }
.leaflet-control-attribution { font-size: 9px !important; }

.architecture-note {
  padding: clamp(3rem, 8vw, 7.5rem) clamp(1.25rem, 8vw, 10rem);
  background: var(--bleu-nuit);
  color: white;
}

.architecture-note .eyebrow { color: var(--bleu-clair); }
.architecture-note h2 { max-width: 18ch; margin-top: .7rem; font-size: clamp(2.2rem, 5vw, 5rem); }
.architecture-note p:last-child {
  max-width: 50rem;
  margin: 1.5rem 0 0;
  color: rgba(255,255,255,.85);
  font-family: var(--sans);
  font-size: 1.04rem;
  line-height: 1.65;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 4rem);
  background: #09172d;
  color: rgba(255,255,255,.74);
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .03em;
}
footer p { margin: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; }
  .map-layout { grid-template-columns: 1fr; }
  .commune-panel { min-height: 0; border-left: 0; border-top: 1px solid var(--bordure); }
  .map-frame, #carte { min-height: 28rem; }
  .map-toolbar { align-items: stretch; flex-direction: column; }
  .search-wrap { width: 100%; }
}

@media (max-width: 560px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .header-section { text-align: left; }
  .intro { padding-top: 3.4rem; padding-bottom: 3.4rem; }
  .map-section { padding: 1rem; }
  .map-frame, #carte { min-height: 24rem; }
  footer { flex-direction: column; }
}
