.page-shell {
  background: var(--sand-50);
}

.page-shell .site-header {
  background: var(--lagoon-950);
}

.page-shell .desktop-nav a[aria-current="page"] {
  color: var(--white);
}

.page-shell .desktop-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.page-shell .brand-mark {
  color: var(--white);
}

.page-mobile-menu {
  position: relative;
  display: none;
}

.page-mobile-menu summary {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  list-style: none;
}

.page-mobile-menu summary::-webkit-details-marker {
  display: none;
}

.page-mobile-menu summary:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 4px;
}

.page-mobile-menu summary svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.page-search {
  display: grid;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: 1.25rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--white);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.page-search:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

.page-search:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 4px;
}

.page-search svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.page-mobile-sep {
  height: 1px;
  margin: 0.35rem 0.8rem;
  background: rgba(255, 255, 255, 0.28);
}

.page-mobile-links {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  display: grid;
  width: min(21rem, calc(100vw - 1.25rem));
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.6rem;
  background: var(--lagoon-950);
  box-shadow: var(--shadow-float);
  /* Douze liens : le menu défile s'il dépasse la hauteur de l'écran (téléphone en paysage). */
  max-height: calc(100vh - 6rem);
  max-height: calc(100dvh - 6rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.page-mobile-links a {
  min-height: 2.75rem;
  padding: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
}

.page-mobile-links a:last-child {
  border-bottom: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.62);
  font-size:var(--fs-xs, 0.875rem);
}

.breadcrumb a:hover {
  color: var(--white);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: var(--section-space) 0;
  background: var(--lagoon-900);
  color: var(--white);
}

.page-hero::before {
  position: absolute;
  top: -16rem;
  right: -7rem;
  width: 38rem;
  height: 38rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 46% 54% 61% 39%;
  content: "";
  transform: rotate(18deg);
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.42fr);
  align-items: end;
  gap: 4rem;
}

.page-hero h1 {
  max-width: 61rem;
  margin-bottom: 1.3rem;
  font-family: var(--display);
  font-size: clamp(3.7rem, 7vw, 7.5rem);
  font-weight: 750;
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.page-hero h1 em {
  color: var(--lagoon-400);
  font-family: var(--serif);
  font-weight: 400;
}

.page-hero-lead {
  max-width: 46rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.05rem;
}

.hero-aside {
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-aside strong,
.hero-aside small {
  display: block;
}

.hero-aside strong {
  font-family: var(--display);
  font-size: 1.25rem;
}

.hero-aside small {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.62);
}

.page-section {
  padding: var(--section-space) 0;
}

.page-section--white {
  background: var(--white);
}

.page-section--tint {
  background: var(--sand-100);
}

.page-heading {
  max-width: 54rem;
  margin-bottom: var(--heading-space);
}

.page-heading h2 {
  margin-bottom: 1rem;
  font-family: var(--display);
  font-size: clamp(2.5rem, 4.5vw, 4.8rem);
  font-weight: 730;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.page-heading > p:not(.eyebrow) {
  max-width: 44rem;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--white);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.filter-buttons button {
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-sm, 0.9375rem);
  font-weight: 750;
  cursor: pointer;
}

.filter-buttons button[hidden] {
  display: none;
}

.filter-buttons button:hover,
.filter-buttons button[aria-pressed="true"] {
  background: var(--lagoon-900);
  color: var(--white);
}

.list-search {
  display: flex;
  min-width: min(22rem, 100%);
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.75rem;
  border-left: 1px solid var(--line);
}

.list-search svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: var(--lagoon-600);
  stroke-width: 1.8;
}

.list-search input {
  width: 100%;
  min-height: 2.6rem;
  border: 0;
  background: transparent;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.listing-card {
  display: flex;
  min-width: 0;
  min-height: 19rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.7rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--white);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.listing-card:hover {
  border-color: rgba(21, 28, 137, 0.46);
  box-shadow: var(--shadow-soft);
  transform: translateY(-0.2rem);
}

.listing-card[hidden] {
  display: none;
}

.listing-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 0.5rem;
  background: var(--sand-100);
  color: var(--lagoon-700);
}

.listing-icon svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.listing-card h3 {
  margin: 1.6rem 0 0.7rem;
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.listing-card p {
  color: var(--muted);
  font-size: var(--fs-sm, 0.9375rem);
}

.card-action {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--lagoon-800);
  font-size: var(--fs-xs, 0.875rem);
  font-weight: 800;
  cursor: pointer;
}

.card-action svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform 180ms ease;
}

.card-action:hover svg {
  transform: translateX(0.2rem);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 3rem;
  border: 1px dashed var(--line);
  border-radius: 0.65rem;
  color: var(--muted);
  text-align: center;
}

.workflow {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  overflow: hidden;
  border-radius: 0.8rem;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

/* Trois enfants pour deux colonnes : sans placement explicite, la note occupe la colonne
   du formulaire et celui-ci retombe dans la colonne étroite des étapes. */
.workflow-steps {
  grid-row: 1 / span 2;
}

.workflow > .prototype-note {
  grid-column: 2;
  grid-row: 1;
}

.workflow-form {
  grid-column: 2;
  grid-row: 2;
}

.workflow-steps {
  padding: 2.3rem;
  background: var(--lagoon-900);
  color: var(--white);
}

.workflow-steps h2 {
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.workflow-steps ol {
  display: grid;
  gap: 1.4rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.workflow-steps li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--fs-xs, 0.875rem);
  counter-increment: steps;
}

.workflow-steps li::before {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  content: counter(steps);
  font-variant-numeric: tabular-nums;
}

.workflow-steps li.active {
  color: var(--white);
}

.workflow-steps li.active::before,
.workflow-steps li.done::before {
  border-color: var(--lagoon-400);
  background: var(--lagoon-400);
  color: var(--lagoon-950);
}

.workflow-form {
  padding: clamp(2rem, 5vw, 4rem);
}

.form-step[hidden] {
  display: none;
}

.form-step h3 {
  margin-bottom: 0.5rem;
  font-family: var(--display);
  font-size: 2.3rem;
  letter-spacing: -0.045em;
}

.form-step > p {
  margin-bottom: 1.8rem;
  color: var(--muted);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.38rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field label,
.field legend {
  font-size:var(--fs-xs, 0.875rem);
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3.15rem;
  padding: 0.75rem;
  border: 1px solid #737589;
  border-radius: 0.4rem;
  background: var(--sand-50);
  color: var(--ink);
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #a1312f;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 2rem;
}

.receipt {
  padding: 2rem;
  border-left: 5px solid var(--lagoon-400);
  background: #eef1ea;
}

.receipt strong {
  display: block;
  font-family: var(--display);
  font-size: 1.7rem;
}

.receipt code {
  color: var(--lagoon-800);
  font-family: ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.article-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 1rem;
}

.article-card {
  display: flex;
  min-height: 26rem;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 1.7rem;
  border-radius: 0.65rem;
  background: var(--sand-100);
}

.article-card:first-child {
  grid-row: span 2;
  min-height: 53rem;
  background:
    linear-gradient(0deg, rgba(11, 15, 70, 0.94), transparent 68%),
    url("assets/hero-kani-keli.webp") 68% center / cover;
  color: var(--white);
}

.article-card:nth-child(2) {
  background: #e4e8dd;
}

.article-card:nth-child(3) {
  background: var(--sun);
}

.article-card:nth-child(4) {
  grid-column: 2 / 4;
  background: var(--lagoon-900);
  color: var(--white);
}

/* Liens et textes lisibles sur chaque fond de carte (RGAA 3.2). */
.article-card:first-child .card-action,
.article-card:nth-child(4) .card-action {
  color: var(--white);
}

.article-card:nth-child(3) p,
.article-card:nth-child(3) time {
  color: var(--ink);
}

.article-card time,
.article-card .category {
  color: var(--lagoon-600);
  font-size:var(--fs-xs, 0.875rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-card:first-child time,
.article-card:nth-child(4) time {
  color: var(--lagoon-400);
}

.article-card h2,
.article-card h3 {
  margin: 0.55rem 0 0.8rem;
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.8vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1;
}

.article-card:first-child h2 {
  font-size: clamp(2.5rem, 4.3vw, 5rem);
}

.article-card p {
  color: var(--muted);
  font-size: var(--fs-sm, 0.9375rem);
}

.content-media {
  overflow: hidden;
  border-radius: 0.45rem;
  background: rgba(11, 15, 71, 0.12);
}

.content-media img,
.content-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-media--news {
  height: 12rem;
  margin: 0 0 1.1rem;
}

.article-card:first-child .content-media--news {
  height: min(30rem, 48vh);
}

.article-card:first-child p,
.article-card:nth-child(4) p {
  color: rgba(255, 255, 255, 0.85);
}

.newsletter {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 3rem;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 0.75rem;
  background: var(--lagoon-950);
  color: var(--white);
}

.newsletter h2 {
  margin-bottom: 0.7rem;
  font-family: var(--display);
  font-size: clamp(2.5rem, 4vw, 4.2rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.newsletter p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
}

.inline-form input {
  min-width: 0;
  min-height: 3.3rem;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.inline-form input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.inline-form button {
  border-color: var(--lagoon-400);
  background: var(--lagoon-400);
  color: var(--lagoon-950);
}

.newsletter > a.primary-button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
}

.form-message {
  grid-column: 1 / -1;
  min-height: 1rem;
  margin: 0.25rem 0 0 !important;
  color: var(--kk-marine) !important;
  font-size: var(--fs-sm, 0.9375rem);
}

/* Sur le bandeau sombre de la lettre d'information, le message reste en or. */
.newsletter .form-message {
  color: var(--kk-or) !important;
}

.event-list {
  border-top: 1px solid var(--line);
}

.event-row {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}

.event-row.has-media {
  grid-template-columns: 6rem 7.5rem minmax(0, 1fr) auto;
}

.content-media--event {
  width: 7.5rem;
  height: 5.5rem;
}

.event-row[hidden] {
  display: none;
}

.event-date {
  display: grid;
  justify-items: center;
  border-right: 1px solid var(--line);
  line-height: 1;
}

.event-date strong {
  color: var(--lagoon-800);
  font-family: var(--display);
  font-size: 3rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.07em;
}

.event-date span {
  color: var(--muted);
  font-size:var(--fs-xs, 0.875rem);
  font-weight: 800;
  text-transform: uppercase;
}

.event-copy small {
  color: var(--lagoon-600);
  font-weight: 800;
}

.event-copy h2,
.event-copy h3 {
  margin: 0.3rem 0;
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.event-copy p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs, 0.875rem);
}

.event-row button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: transparent;
  color: var(--lagoon-800);
  font-size:var(--fs-xs, 0.875rem);
  font-weight: 800;
  cursor: pointer;
}

.event-row button:hover {
  border-color: var(--lagoon-600);
  background: var(--white);
}

.event-row button svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.mayor-layout,
.contact-layout,
.territory-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(3rem, 8vw, 8rem);
}

.mayor-portrait {
  position: relative;
  min-height: 34rem;
  overflow: hidden;
  border-radius: 0.7rem;
  background: linear-gradient(145deg, var(--lagoon-800), var(--lagoon-950));
}

.mayor-portrait::before,
.mayor-portrait::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.mayor-portrait::before {
  width: 16rem;
  height: 16rem;
  background: var(--lagoon-400);
  inset: 7rem auto auto 50%;
  transform: translateX(-50%);
}

.mayor-portrait::after {
  right: -5rem;
  bottom: -9rem;
  left: -5rem;
  height: 30rem;
  background: #e1e4db;
}

.portrait-label {
  position: absolute;
  z-index: 2;
  right: 1.2rem;
  bottom: 1.2rem;
  left: 1.2rem;
  padding: 1rem;
  border-radius: 0.45rem;
  background: rgba(11, 15, 70, 0.9);
  color: var(--white);
}

.mayor-copy blockquote {
  margin: 0 0 2rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.4vw, 3.8rem);
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.mayor-copy p {
  color: var(--muted);
}

.directory-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.directory-list article {
  padding: 1.5rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.directory-list article:nth-child(even) {
  border-right: 0;
}

.directory-list h3 {
  margin-bottom: 0.45rem;
  font-family: var(--display);
  font-size: 1.35rem;
}

.directory-list p,
.directory-list a {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-xs, 0.875rem);
}

.directory-list a {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--lagoon-700);
  font-weight: 800;
}

.contact-card {
  padding: clamp(2rem, 4vw, 3.5rem);
  border-radius: 0.75rem;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.contact-card h2 {
  font-family: var(--display);
  font-size: 2.6rem;
  letter-spacing: -0.05em;
}

.contact-aside {
  padding: 2.5rem;
  border-radius: 0.75rem;
  background: var(--lagoon-900);
  color: var(--white);
}

.contact-aside h2 {
  font-family: var(--display);
  font-size: 2.4rem;
  letter-spacing: -0.045em;
}

.contact-aside address {
  color: rgba(255, 255, 255, 0.68);
  font-style: normal;
}

.contact-aside a {
  display: block;
  margin-top: 0.8rem;
  color: var(--lagoon-400);
  font-weight: 800;
}

.territory-map {
  display: grid;
  min-height: 34rem;
  align-content: center;
  padding: 3rem;
  border-radius: 46% 54% 48% 52% / 54% 43% 57% 46%;
  background: var(--lagoon-900);
  color: var(--white);
}

.territory-map a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.74);
  font-weight: 700;
}

.territory-map a:hover {
  color: var(--lagoon-400);
}

.territory-map-shell {
  overflow: hidden;
  border-radius: 0.85rem;
  background: var(--lagoon-900);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.territory-map-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem 0;
}

.territory-map-heading span {
  color: rgba(255, 255, 255, 0.58);
  font-size:var(--fs-xs, 0.875rem);
  font-weight: 700;
}

.territory-map-visual {
  padding: 0.8rem 1rem 0;
}

.territory-map-visual svg {
  display: block;
  width: 100%;
  height: auto;
}

.territory-land {
  fill: rgba(211, 182, 0, 0.18);
  stroke: var(--lagoon-400);
  stroke-width: 3;
}

.territory-ridge,
.territory-coast {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 2;
  stroke-dasharray: 4 7;
}

.territory-coast {
  stroke: rgba(241, 222, 97, 0.5);
  stroke-dasharray: none;
}

.map-marker {
  color: var(--white);
  outline: none;
}

.map-marker circle {
  fill: var(--sun);
  stroke: var(--lagoon-950);
  stroke-width: 5;
  transition: transform 180ms ease, fill 180ms ease;
  transform-box: fill-box;
  transform-origin: center;
}

.map-marker text {
  fill: rgba(255, 255, 255, 0.86);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 750;
  text-anchor: middle;
}

.map-marker:hover circle,
.map-marker:focus circle,
.map-marker.is-active circle {
  fill: var(--lagoon-400);
  transform: scale(1.22);
}

.territory-map-detail {
  min-height: 7rem;
  padding: 1rem 1.4rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.territory-map-detail strong {
  font-family: var(--display);
  font-size: 1.4rem;
}

.territory-map-detail p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--fs-xs, 0.875rem);
}

.territory-map-detail .card-action {
  margin-top: 0.55rem;
  color: var(--lagoon-400);
}

.territory-map-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.territory-map-list a {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.75rem 0.9rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fs-xs, 0.875rem);
  font-weight: 750;
}

.territory-map-list a:hover,
.territory-map-list a.is-active {
  background: rgba(211, 182, 0, 0.18);
  color: var(--white);
}

.territory-copy h2 {
  font-family: var(--display);
  font-size: clamp(2.8rem, 5vw, 5rem);
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.territory-copy p {
  color: var(--muted);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.fact-grid article {
  min-height: 14rem;
  padding: 1.8rem;
  background: var(--white);
}

.fact-grid strong {
  display: block;
  color: var(--lagoon-800);
  font-family: var(--display);
  font-size: 3.4rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
}

.fact-grid h3 {
  margin: 0.3rem 0;
  font-family: var(--display);
}

.fact-grid p {
  color: var(--muted);
  font-size: var(--fs-xs, 0.875rem);
}

.village-hero {
  position: relative;
  display: grid;
  min-height: 38rem;
  align-items: end;
  overflow: hidden;
  padding: 4rem 0 5rem;
  background:
    linear-gradient(90deg, rgba(11, 15, 70, 0.94), rgba(11, 15, 70, 0.2)),
    url("assets/hero-kani-keli.webp") var(--village-position, center) / cover;
  color: var(--white);
}

.village-kani-keli { --village-accent: #6a72dd; --village-position: 66% center; }
.village-choungui { --village-accent: #d4ba12; --village-position: 82% 38%; }
.village-kani-be { --village-accent: #adb997; --village-position: 58% 52%; }
.village-mronabeja { --village-accent: #959add; --village-position: 72% 66%; }
.village-passi-keli { --village-accent: #ef9e72; --village-position: 42% 58%; }
.village-mbouini { --village-accent: #9398e3; --village-position: 76% 72%; }

.village-hero::after {
  position: absolute;
  right: -10rem;
  bottom: -16rem;
  width: 42rem;
  height: 30rem;
  border-radius: 50%;
  background: var(--village-accent, var(--lagoon-400));
  content: "";
  opacity: 0.32;
  transform: rotate(-16deg);
}

.village-hero .container {
  position: relative;
  z-index: 1;
}

.village-number {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.25rem;
  color: var(--village-accent, var(--lagoon-400));
  font-size:var(--fs-xs, 0.875rem);
  font-weight: 800;
  letter-spacing: 0.1em;
}

.village-hero h1 {
  margin-bottom: 1rem;
  font-family: var(--display);
  font-size: clamp(4.5rem, 11vw, 10rem);
  font-weight: 750;
  letter-spacing: -0.075em;
  line-height: 0.78;
}

.village-hero p {
  max-width: 38rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
}

.village-nav {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  scrollbar-width: thin;
}

.village-nav .container {
  display: flex;
}

.village-nav a {
  flex: 0 0 auto;
  padding: 1rem 1.2rem;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size:var(--fs-xs, 0.875rem);
  font-weight: 800;
}

.village-nav a:hover,
.village-nav a[aria-current="page"] {
  background: var(--lagoon-900);
  color: var(--white);
}

.village-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.55fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.village-story h2 {
  font-family: var(--display);
  font-size: clamp(2.8rem, 5vw, 5.3rem);
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.village-story p {
  max-width: 48rem;
  color: var(--muted);
}

.village-aside {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.info-block {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--white);
}

.info-block h3 {
  margin-bottom: 0.8rem;
  font-family: var(--display);
  font-size: 1.3rem;
}

.info-block p,
.info-block li {
  color: var(--muted);
  font-size: var(--fs-xs, 0.875rem);
}

.info-block ul {
  margin: 0;
  padding-left: 1.1rem;
}

.info-block a {
  display: inline-flex;
  margin-top: 0.8rem;
  color: var(--lagoon-700);
  font-size: var(--fs-xs, 0.875rem);
  font-weight: 800;
}

.village-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.village-actions a {
  display: flex;
  min-height: 12rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  border-radius: 0.55rem;
  background: var(--white);
}

.village-actions a:nth-child(2) {
  background: var(--sun);
}

.village-actions a:nth-child(3) {
  background: var(--lagoon-900);
  color: var(--white);
}

.village-actions svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.village-actions strong {
  font-family: var(--display);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.mini-footer {
  padding: 3.5rem 0 2rem;
  background: var(--lagoon-950);
  color: var(--white);
}

.mini-footer-main {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  padding-bottom: 2rem;
}

.mini-footer-links {
  display: flex;
  flex-wrap: wrap;
  /* Liens de 44 px de haut (cible tactile) : l'écart vertical est déjà là. */
  column-gap: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.mini-footer-links a:hover {
  color: var(--white);
}

.mini-footer-legal {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--fs-sm, 0.9375rem);
}

.mini-footer-legal a {
  white-space: nowrap;
}

.mini-footer-legal a:hover {
  color: var(--white);
}

.mini-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--fs-sm, 0.9375rem);
}

.page-toast {
  position: fixed;
  z-index: 50;
  right: 1rem;
  bottom: 1rem;
  max-width: min(24rem, calc(100% - 2rem));
  padding: 0.9rem 1rem;
  border-radius: 0.45rem;
  background: var(--lagoon-950);
  box-shadow: var(--shadow-float);
  color: var(--white);
  font-size: var(--fs-xs, 0.875rem);
}

@media (max-width: 1050px) {
  .page-shell .desktop-nav {
    display: none;
  }

  .page-mobile-menu {
    display: block;
    margin-left: 0.6rem;
  }

  .page-search {
    margin-left: auto;
  }

  .listing-grid,
  .article-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-card:first-child {
    grid-row: auto;
    min-height: 34rem;
  }

  .article-card:nth-child(4) {
    grid-column: auto;
  }

  .workflow {
    grid-template-columns: 0.7fr 1.3fr;
  }

  .fact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .page-hero {
    padding: var(--section-space) 0;
  }

  .page-hero-inner,
  .workflow,
  .newsletter,
  .mayor-layout,
  .contact-layout,
  .territory-layout,
  .village-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .page-hero h1 {
    font-size: clamp(3.5rem, 18vw, 5.5rem);
  }

  .page-section {
    padding: var(--section-space) 0;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-buttons {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .territory-map-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-buttons button {
    flex: 0 0 auto;
  }

  .list-search {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .listing-grid,
  .article-grid,
  .directory-list,
  .fact-grid,
  .village-actions {
    grid-template-columns: 1fr;
  }

  .article-card,
  .article-card:first-child {
    min-height: 26rem;
  }

  .workflow-steps,
  .workflow > .prototype-note,
  .workflow-form {
    grid-column: auto;
    grid-row: auto;
  }

  .workflow-steps {
    padding: 1.5rem;
  }

  .workflow-steps ol {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .workflow-steps li {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .workflow-form {
    padding: 1.5rem;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .field--full {
    grid-column: auto;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .event-row {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 1rem;
  }

  .event-row.has-media {
    grid-template-columns: 4.5rem minmax(0, 1fr);
  }

  .event-row.has-media .content-media--event {
    grid-column: 2;
    width: 100%;
    height: 10rem;
  }

  .event-row.has-media .event-date {
    grid-row: 1 / 4;
  }

  .event-row.has-media .event-copy {
    grid-column: 2;
  }

  .event-row > button {
    grid-column: 2;
    width: fit-content;
  }

  .event-date strong {
    font-size: 2.3rem;
  }

  .directory-list article {
    border-right: 0;
  }

  .village-hero {
    min-height: 33rem;
  }

  .village-hero h1 {
    font-size: clamp(4rem, 21vw, 6.5rem);
  }

  .mini-footer-main,
  .mini-footer-bottom {
    grid-template-columns: 1fr;
    align-items: start;
    flex-direction: column;
  }

  .mini-footer-legal {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .listing-card,
  .card-action svg {
    transition-duration: 0.01ms;
  }
}

/* Long contact addresses and form controls must fit small screens. */
.contact-layout > *, .field, .field input, .field select, .field textarea { min-width: 0; }
.contact-aside a { overflow-wrap: anywhere; }

/* Cibles tactiles de 44 px au minimum sur les pages intérieures. La zone cliquable grandit,
   la taille du texte reste la même. */
.breadcrumb a,
.contact-aside a,
.mini-footer-links a,
.mini-footer-legal a,
.mini-footer .container > a {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.directory-list article a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.filter-buttons button,
.card-action,
.atlas-text-link {
  min-height: 44px;
}
.info-block a,
.info-block button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.breadcrumb a {
  min-width: 44px;
}

/* Coordonnées de l'hôtel de ville dans le pied de page de chaque page. */
.mini-footer-contact {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fs-sm, 0.9375rem);
  font-style: normal;
  line-height: 1.55;
}

.mini-footer-contact strong {
  display: block;
  color: var(--white);
}


/* ---------- La mairie : sommaire, équipe municipale, organigramme ---------- */
/* Haut de page de la mairie : titre remonté, texte resserré, blason agrandi et rapproché du centre.
   Le bas du texte reste aligné sur le bas de la carte « Hôtel de ville ». */
.page-hero--mairie { padding: 2.5rem 0 3rem; }
.page-hero--mairie .page-hero-inner { align-items: end; }
.page-hero--mairie .mairie-hero-aside { gap: 1rem; }
.page-hero--mairie .mairie-hero-blason { max-width: 340px; }
@media (min-width: 761px) {
  /* Deux lignes alignées :
     - surtitre et titre en bas de la ligne du blason, le bas de « à votre service. » au niveau du pied du blason ;
     - la phrase d'introduction centrée sur la hauteur de la carte « Hôtel de ville ». */
  .page-hero--mairie .page-hero-inner {
    grid-template-columns: fit-content(44rem) minmax(17rem, 26rem);
    grid-template-rows: auto auto;
    justify-content: center;
    align-items: end;
    column-gap: clamp(2.5rem, 7vw, 7rem);
    row-gap: 1.75rem;
  }
  .page-hero--mairie .page-hero-inner > div:first-child,
  .page-hero--mairie .mairie-hero-aside { display: contents; }
  .page-hero--mairie .mairie-hero-titre { grid-column: 1; grid-row: 1; }
  .page-hero--mairie .mairie-hero-titre h1 { margin: 0; }
  .page-hero--mairie .mairie-hero-blason { grid-column: 2; grid-row: 1; justify-self: center; width: 100%; }
  .page-hero--mairie .mairie-hero-aside .hero-aside { grid-column: 2; grid-row: 2; }
  .page-hero--mairie .page-hero-lead { grid-column: 1; grid-row: 2; align-self: center; margin: 0; }
}
.page-hero--mairie .page-hero-lead {
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.15rem, 1.45vw, 1.4rem);
  line-height: 1.5;
}
.mairie-hero-aside {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  min-width: 0;
}
.mairie-hero-blason {
  position: relative;
  max-width: 340px;
}
.mairie-hero-blason img { width: 100%; height: 100%; object-fit: contain; }
.mairie-hero-aside .hero-aside { width: 100%; }

@media (max-width: 760px) {
  .mairie-hero-blason { max-width: 260px; }
}

.mairie-sommaire {
  border-bottom: 1px solid #e3e5f3;
  background: rgba(255, 255, 255, 0.96);
}

.mairie-sommaire .container {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  scrollbar-width: thin;
}

.mairie-sommaire a {
  flex: 0 0 auto;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--kk-marine);
  font-size: var(--fs-sm, 0.9375rem);
  font-weight: 600;
  text-decoration: none;
}

.mairie-sommaire a:hover,
.mairie-sommaire a:focus-visible {
  background: #edeef6;
}

.mairie-sous-titre {
  margin: 2.2rem 0 1rem;
  color: var(--kk-marine);
  font-family: var(--display);
  font-size: 1.4rem;
}

.equipe {
  display: grid;
  gap: 2rem;
}

.equipe-titre {
  margin: 0 0 0.9rem;
  color: var(--kk-marine);
  font-family: var(--display);
  font-size: 1.3rem;
}

.equipe-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
}

.equipe-grille--maire {
  grid-template-columns: minmax(0, 32rem);
}

.elu {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1.1rem;
  border: 1px solid #d9dbee;
  border-radius: 0.8rem;
  background: var(--white);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.elu--maire {
  border-top: 4px solid var(--kk-or);
}

.elu.is-cible {
  border-color: var(--kk-marine);
  box-shadow: 0 0 0 3px rgba(21, 26, 121, 0.18);
}

.elu-photo,
.elu-initiales {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.elu-initiales {
  display: grid;
  place-items: center;
  background: var(--kk-marine);
  color: var(--white);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
}

.elu-texte {
  display: grid;
  gap: 0.25rem;
}

.elu-fonction {
  margin: 0;
  color: var(--kk-baobab);
  font-size: var(--fs-xs, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.elu h3,
.elu .elu-nom {
  margin: 0;
  color: var(--ink);
  font-size: 1.1rem;
}

.elu-delegations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.3rem 0 0;
  padding: 0;
  list-style: none;
}

.elu-delegations li {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #edeef6;
  color: var(--kk-marine);
  font-size: var(--fs-sm, 0.9375rem);
}

.elu small {
  color: var(--muted);
}

.equipe-attente {
  margin: 0;
  padding: 1rem 1.2rem;
  border: 1px dashed #9ea2cf;
  border-radius: 0.7rem;
  background: var(--white);
  color: var(--muted);
}

.equipe-themes {
  margin-bottom: 1.5rem;
}

.equipe-themes p {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.equipe-puces {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.equipe-puces button {
  min-height: 2.5rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid #c9cce9;
  border-radius: 999px;
  background: var(--white);
  color: var(--kk-marine);
  font: inherit;
  font-size: var(--fs-sm, 0.9375rem);
  cursor: pointer;
}

.equipe-puces button[aria-pressed="true"] {
  border-color: var(--kk-marine);
  background: var(--kk-marine);
  color: var(--white);
}

.commission-membres {
  color: var(--muted);
  font-size: var(--fs-sm, 0.9375rem);
}

.organigramme {
  display: grid;
  gap: 1.4rem;
  justify-items: center;
}

.orga-niveau {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.orga-niveau + .orga-niveau::before {
  content: "";
  position: absolute;
  top: -1.4rem;
  left: 50%;
  width: 2px;
  height: 1.4rem;
  background: #b8bbdc;
}

.orga-niveau--services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.8rem;
  padding-top: 1rem;
  border-top: 2px solid #b8bbdc;
}

.orga-boite {
  display: grid;
  gap: 0.2rem;
  max-width: 24rem;
  padding: 0.8rem 1rem;
  border: 1px solid #c9cce9;
  border-radius: 0.6rem;
  background: var(--white);
  text-align: center;
}

.orga-boite small {
  color: var(--muted);
  font-size: var(--fs-sm, 0.9375rem);
}

.orga-boite--elu {
  border-top: 4px solid var(--kk-or);
}

.orga-boite--dgs {
  border-top: 4px solid var(--kk-marine);
}

@media (prefers-reduced-motion: reduce) {
  .elu { transition: none; }
}

.mayor-portrait.has-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.maire-biographie h3 {
  margin: 1rem 0 0.4rem;
  color: var(--kk-marine);
}

.maires-frise {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.maires-frise > li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border-left: 4px solid var(--kk-or);
  border-radius: 0.6rem;
  background: var(--paper, #f5f5f8);
}

.maires-frise h3 {
  margin: 0;
}

.maires-frise ul {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
}

.orga-detail {
  display: block;
}

.orga-boite a {
  color: var(--kk-marine);
  font-size: var(--fs-sm, 0.9375rem);
  font-weight: 600;
}
.orga-missions{margin:.3rem 0;padding-left:1rem;text-align:left;font-size:var(--fs-sm, 0.9375rem);color:var(--muted)}

.mairie-sommaire a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Mention visible des champs obligatoires (RGAA 11.10). */
.champ-obligatoire {
  color: var(--muted);
  font-weight: 500;
}

/* Très petits écrans (320 à 400 px) : logo, recherche et menu tiennent sur une ligne (RGAA 10.11). */
@media (max-width: 400px) {
  .page-shell .brand {
    min-width: 0;
    gap: 0.55rem;
  }

  .page-shell .brand-logo {
    width: 2.75rem;
    height: 2.75rem;
  }

  .page-shell .brand-copy small {
    display: none;
  }

  .page-shell .brand-copy strong {
    font-size: 0.95rem;
  }

  .page-search {
    width: 2.75rem;
    flex: none;
  }

  .page-mobile-menu {
    margin-left: 0.4rem;
  }
}

/* À 320 px (zoom 400 %), les barres d'onglets passent à la ligne au lieu de défiler. */
@media (max-width: 400px) {
  .page-shell .profile-tabs,
  .page-shell .filter-buttons,
  .village-nav,
  .village-nav .container,
  .mairie-sommaire .container {
    flex-wrap: wrap;
    margin-right: 0;
    overflow-x: visible;
  }

  .village-nav a {
    flex: 1 1 auto;
    border-bottom: 1px solid var(--line);
  }
}

/* Fil d'Ariane dans l'en-tête, à droite du nom de la ville (déplacé par scripts/fil-entete.mjs). */
.site-header .breadcrumb {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  padding-left: 1.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fs-sm, 0.9375rem);
  white-space: nowrap;
}
.site-header .breadcrumb > :last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 1051px) and (max-width: 1279px), (max-width: 640px) {
  .site-header .breadcrumb { display: none; }
}

@media (max-width: 760px) {
  .page-hero--mairie .mairie-hero-blason { max-width: 240px; }
}
