/* Accueil national : filtres intégrés et carte France/Outre-mer sans encadrés. */
.media-home .lms-national-geography {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: clamp(18px, 2.5vw, 38px);
  align-items: center;
  width: min(1200px, calc(100% - 32px));
  max-width: 1200px;
  margin-inline: auto;
  padding-block: clamp(24px, 4vw, 56px);
}
.media-home .lms-national-geography .media-communes-copy {
  display: grid;
  gap: clamp(10px, 1.4vw, 16px);
  min-width: 0;
  align-content: center;
}
.media-home .lms-national-geography .media-communes-copy > h2 {
  margin: 0;
  max-width: 16ch;
  font: 800 clamp(30px, 3.85vw, 55px)/1.08 "TikTok Sans", system-ui, sans-serif;
  letter-spacing: -.04em;
  text-wrap: balance;
  color: var(--text, #fff);
}
.media-home .lms-national-geography .lms-france-geography-caption {
  max-width: 53ch;
  margin: 0;
  color: var(--muted, #dedede);
  line-height: 1.55;
  font-size: clamp(13px, 1.12vw, 15px);
}
.lms-national-geography .lms-france-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  width: 100%;
  margin-top: 10px;
}
.lms-national-geography .lms-france-form label.lms-france-field {
  position: relative;
  display: grid;
  grid-template-columns: 20px auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(7px, .9vw, 12px);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 4px 12px;
  border: 1px solid var(--line, #555);
  border-radius: 12px;
  background: var(--surface, #292929);
  color: var(--text, #fff);
  transition: border-color 150ms ease, background 150ms ease;
}
.lms-national-geography .lms-france-form label.lms-france-field:focus-within {
  border-color: var(--accent, #ca2314);
  outline: 2px solid color-mix(in srgb, var(--accent, #ca2314) 25%, transparent);
  outline-offset: 1px;
}
.lms-national-geography .lms-france-field-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #bbb);
}
.lms-national-geography .lms-france-field-icon svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.lms-national-geography .lms-france-field-label {
  font: 700 12px/1.3 "TikTok Sans", system-ui, sans-serif;
  white-space: nowrap;
}
.lms-national-geography .lms-france-form label.lms-france-field > select,
.lms-national-geography .lms-france-form label.lms-france-field > input {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding: 4px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--text, #fff);
  font: 500 13px/1.4 "TikTok Sans", system-ui, sans-serif;
}
.lms-national-geography .lms-france-form select option {
  color: var(--text, #fff);
  background: var(--surface, #292929);
}
.lms-national-geography .lms-france-form :is(select, input):focus {
  outline: none;
}
.lms-national-geography .lms-france-form :is(button, a):focus-visible {
  outline: 3px solid #f58b81;
  outline-offset: 2px;
}
.lms-national-geography .lms-france-city-field,
.lms-national-geography .lms-france-form-actions {
  grid-column: 1 / -1;
}
.lms-national-geography [data-france-suggestions] {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 15;
  max-height: 250px;
  overflow: auto;
  padding: 6px;
  background: var(--surface, #292929);
  border: 1px solid var(--line, #555);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgb(0 0 0 / .15);
}
.lms-national-geography [data-france-suggestions][hidden] { display: none; }
.lms-national-geography [data-france-suggestions] button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text, #fff);
  cursor: pointer;
}
.lms-national-geography [data-france-suggestions] button:is(:hover, :focus-visible) {
  background: var(--panel, #333);
}
.lms-national-geography .lms-france-form-actions {
  display: block;
  width: 100%;
  padding-top: 5px;
}
.lms-national-geography .lms-france-form-actions > button {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 11px 16px;
  border: 1px solid #ca2314;
  border-radius: 12px;
  background: #ca2314;
  color: #fff;
  font: 700 14px/1.3 "TikTok Sans", system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
}
.media-home .lms-national-geography .lms-france-map-stage {
  display: grid;
  gap: 0;
  min-width: 0;
  background: radial-gradient(circle at 55% 47%, rgb(202 35 20 / .08), transparent 60%);
}
.lms-national-geography .lms-france-map-stage svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 975;
  max-height: 770px;
  overflow: visible;
}
.lms-national-geography .lms-france-department {
  fill: color-mix(in srgb, var(--text, #fff) 13%, var(--bg, #1f1f1f));
  stroke: color-mix(in srgb, var(--text, #fff) 68%, var(--bg, #1f1f1f));
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill 180ms ease, opacity 180ms ease;
}
.lms-national-geography .lms-france-department:is(:hover, :focus-visible) {
  fill: #ec5d4f;
  outline: none;
  stroke: #fff;
  stroke-width: 2.5;
}
.lms-national-geography .lms-france-department.is-region { fill: #9e3030; }
.lms-national-geography .lms-france-department.is-muted { opacity: .25; }
.lms-national-geography .lms-france-department.is-selected {
  fill: #f54900;
  stroke: #fff;
  stroke-width: 3;
}
.lms-national-geography .lms-france-map-error { color: #a52720; }
@media (max-width: 850px) {
  .media-home .lms-national-geography {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .media-home .lms-national-geography .media-communes-copy > h2 {
    max-width: 19ch;
  }
  .lms-national-geography .lms-france-map-stage svg { max-height: none; }
}
@media (max-width: 600px) {
  .lms-national-geography .lms-france-form-actions > button {
    width: 100%;
    min-height: 50px;
    padding: 12px;
    font-size: 13px;
  }
}
@media (max-width: 420px) {
  .lms-national-geography .lms-france-form label.lms-france-field {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 4px 9px;
  }
  .lms-national-geography .lms-france-field-icon {
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .lms-national-geography .lms-france-field-label {
    grid-column: 2;
    grid-row: 1;
    font-size: 11px;
  }
  .lms-national-geography .lms-france-form label.lms-france-field > :is(select, input) {
    grid-column: 2;
    grid-row: 2;
    height: 30px;
    min-height: 30px;
    padding: 2px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lms-national-geography .lms-france-department { transition: none; }
}

/* Accueil national : le titre et l'action partagent le même rail.
   Le titre ne doit jamais repousser ou rogner le libellé du bouton. */
html body.page-shell.route-home .media-home .media-latest > .media-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 24px);
  min-width: 0;
}
html body.page-shell.route-home .media-home .media-latest .media-section-heading-copy {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}
html body.page-shell.route-home .media-home .media-latest .media-section-heading-copy > h2 {
  margin: 0;
  text-align: left;
}
html body.page-shell.route-home .media-home .media-latest .media-publish-link {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  width: auto;
  max-width: 100%;
  padding: 10px 16px;
  margin: 0;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
}
@media (max-width: 640px) {
  html body.page-shell.route-home .media-home .media-latest > .media-section-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    margin-bottom: 22px;
  }
  html body.page-shell.route-home .media-home .media-latest .media-section-heading-copy,
  html body.page-shell.route-home .media-home .media-latest .media-section-heading-copy > h2 {
    width: 100%;
    max-width: 100%;
  }
  html body.page-shell.route-home .media-home .media-latest .media-publish-link {
    align-self: flex-start;
    flex: none;
    width: auto;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
  }
}


/* Accueil national : le texte et les filtres remplacent le bandeau de marque
   original, tandis que la carte forme une section autonome juste en dessous.
   Ces règles servent aussi à l'Android WebView (menu inférieur inchangé). */
html body.page-shell.route-home .media-home > .lms-national-hero {
  box-sizing: border-box;
  display: block!important;
  grid-template-columns: none!important;
  width: min(1180px, calc(100% - 32px));
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 40px) clamp(18px, 4vw, 56px);
  text-align: center;
}
html body.page-shell.route-home .media-home .lms-national-hero > .media-communes-copy {
  box-sizing: border-box!important;
  display: flex!important;
  flex-direction: column!important;
  align-items: stretch!important;
  gap: clamp(12px, 1.6vw, 20px)!important;
  width: min(100%, 760px)!important;
  max-width: 760px!important;
  margin: 0 auto!important;
  padding: 0!important;
  text-align: center;
}
html body.page-shell.route-home .media-home .lms-national-hero .media-kicker {
  display: block;
  align-self: center!important;
  justify-content: center;
  margin: 0!important;
  color: var(--muted, #aaa);
  font-size: 11px;
  letter-spacing: .13em;
  text-align: center;
}
html body.page-shell.route-home .media-home .lms-national-hero h1 {
  max-width: 20ch;
  margin: 0 auto!important;
  font-size: clamp(30px, 4.3vw, 52px);
  line-height: 1.1;
  text-wrap: balance;
}
html body.page-shell.route-home .media-home .lms-national-hero .lms-france-geography-caption {
  max-width: 640px!important;
  margin: 0 auto!important;
  font-size: clamp(13px, 1.25vw, 16px)!important;
  line-height: 1.6!important;
  text-align: center;
}
html body.page-shell.route-home .media-home .lms-national-hero .lms-france-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: clamp(4px, .9vw, 12px) auto 0;
}
html body.page-shell.route-home .media-home .lms-national-hero .lms-france-form label.lms-france-field {
  min-width: 0;
  text-align: left;
}
html body.page-shell.route-home .media-home .lms-national-hero .lms-france-form-actions {
  width: 100%;
}
html body.page-shell.route-home .media-home .lms-national-map-only {
  box-sizing: border-box;
  display: block!important;
  grid-template-columns: none!important;
  gap: 0!important;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 36px) 0;
}
html body.page-shell.route-home .media-home .lms-national-map-only > .lms-france-map-stage {
  box-sizing: border-box;
  display: block;
  width: min(100%, 990px);
  max-width: 990px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
}
html body.page-shell.route-home .media-home .lms-national-map-only .lms-france-map-stage svg {
  width: 100%;
  max-height: none;
  height: auto;
  aspect-ratio: 1000 / 975;
}
@media (max-width: 699px) {
  html body.page-shell.route-home .media-home > .lms-national-hero {
    padding: 26px 16px 28px;
  }
  html body.page-shell.route-home .media-home .lms-national-hero > .media-communes-copy {
    gap: 14px!important;
  }
  html body.page-shell.route-home .media-home .lms-national-hero .lms-france-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  html body.page-shell.route-home .media-home .lms-national-hero h1 {
    font-size: clamp(28px, 7vw, 40px);
  }
  html body.page-shell.route-home .media-home .lms-national-map-only {
    padding-block: 12px 24px;
  }
}
