/* Codes France – annuaire postal */
:root {
  color-scheme: light;
  --ink: #102841;
  --blue: #154a78;
  --link: #125581;
  --muted: #485e70;
  --navy: #112d48;
  --navy-deep: #0c2136;
  --accent: #f5b025;
  --paper: #f7f9fb;
  --line: #d6e0e7;
  --wash: #eef4f8;
  --radius: 16px;
  --shadow: 0 2px 5px rgb(20 46 67 / 6%);
  --wrap: 1200px;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 100%;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.58;
  -webkit-text-size-adjust: 100%;
}
body, select, input, button { font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; }
button, input, select, textarea { font-size: 1rem; }
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: .08em; text-underline-offset: .17em; }
a:hover { color: #0b3557; text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid #ad6400; outline-offset: 3px; }
:where(.site-header,.hero,.footer) :focus-visible { outline-color: #db920b; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0 0 1rem; }
h1, h2, h3 { color: var(--ink); line-height: 1.14; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.1vw, 3.75rem); }
h2 { font-size: clamp(1.52rem, 2.4vw, 2.25rem); }
h3 { font-size: 1.18rem; }
p { max-width: 78ch; }
ul, ol { padding-inline-start: 1.45em; }
li + li { margin-block-start: .3rem; }
small { font-size: .88rem; }
.wrap { width: min(var(--wrap), calc(100% - 2 * clamp(1rem, 4vw, 3rem))); margin-inline: auto; }
main { min-width: 0; }
.skip {
  position: absolute; z-index: 12; top: .5rem; left: .65rem; transform: translateY(-180%);
  padding: .7rem 1rem; border-radius: 5px; background: white; color: var(--ink); font-weight: 700;
}
.skip:focus { transform: translateY(0); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0;
  clip-path: inset(50%); white-space: nowrap; overflow: hidden;
}
.site-header { background: #fff; border-block-end: 1px solid var(--line); position: relative; z-index: 2; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; padding-block: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; max-width: 100%; color: var(--ink); text-decoration: none; }
.brand img { display: block; flex-shrink: 1; width: min(235px, 100%); height: auto; }
.brand span { color: var(--muted); font-size: .84rem; font-weight: 650; line-height: 1.3; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.nav a { display: inline-flex; align-items: center; min-height: 40px; font-size: .94rem; font-weight: 650; color: var(--ink); text-decoration: none; }
.nav a:hover, .nav [aria-current="page"] { color: var(--link); text-decoration: underline; }
.hero {
  position: relative; isolation: isolate; overflow: hidden; background: var(--navy); color: white;
  border-block-end: 4px solid var(--accent);
}
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 90% 0%, rgb(51 105 146 / 42%), transparent 58%),
    linear-gradient(119deg, transparent 0 66%, rgb(255 255 255 / 4%) 66% 67%, transparent 67% 70%, rgb(255 255 255 / 4%) 70% 71%, transparent 71%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(2.75rem, 6vw, 5.3rem); }
.hero h1, .hero-copy h2 { color: #fff; }
.hero h1 { margin-block-end: 1rem; max-width: 17ch; font-size: clamp(2.65rem, 4.7vw, 4.45rem); line-height: 1.025; }
.eyebrow { margin-block-end: .85rem; color: var(--blue); font-size: .76rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.hero-copy .eyebrow { color: #ffcf6e; }
.lead { color: var(--muted); font-size: clamp(1.025rem, 1.35vw, 1.18rem); line-height: 1.55; }
.hero-copy .lead, .hero-copy > p:not(.eyebrow) { color: #e0eaf2; }
.hero-copy > :last-child, .search-card > :last-child, .panel > :last-child, .card > :last-child, .callout > :last-child { margin-block-end: 0; }
.search-card, .panel, .card, .callout { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); color: var(--ink); }
.search-card { padding: clamp(1.1rem, 2.75vw, 2rem); border-color: transparent; box-shadow: 0 7px 24px rgb(0 19 38 / 19%); }
.search-card h2 { color: var(--ink); font-size: clamp(1.4rem, 2vw, 1.8rem); }
.search-card p { color: var(--muted); }
.search-form { margin: 0; min-width: 0; }
.search-form label { display: block; margin-block-end: .36rem; color: var(--ink); font-weight: 700; font-size: .92rem; }
.search-row { display: flex; align-items: stretch; flex-wrap: wrap; gap: .52rem; min-width: 0; }
.search-row :where(input:not([type="hidden"]),select) {
  appearance: none; min-width: 0; flex: 1 1 11rem; max-width: 100%;
  padding: .72rem .85rem; border: 1px solid #8396a6; border-radius: 8px; background: white;
  color: var(--ink); min-height: 48px; line-height: 1.35;
}
.search-row input::placeholder { color: #596c7c; opacity: 1; }
.button, .copy, .search-form button, .search-row button, button.secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem 1.05rem; min-height: 44px; max-width: 100%; border: 1px solid var(--blue);
  border-radius: 8px; background: var(--blue); color: white; text-decoration: none; font-weight: 700; line-height: 1.3; cursor: pointer;
}
.button:hover, .search-form button:hover, .search-row button:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: white; }
.button.secondary, .secondary.button, button.secondary, .copy {
  background: white; color: var(--blue); border-color: #a7bbca;
}
.button.secondary:hover, button.secondary:hover, .copy:hover { background: var(--wash); color: var(--navy); border-color: #7892a6; }
.examples { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .7rem; margin-block-start: .85rem; color: var(--muted); font-size: .9rem; }
.examples a { font-weight: 600; }
.section { padding-block: clamp(1.6rem, 3.5vw, 3.05rem); }
.section + .section { padding-block-start: .7rem; }
.section-head { margin-block-end: 1rem; }
.section-head > :last-child { margin-block-end: 0; }
.grid, .regions-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,245px),1fr)); gap: 1rem; }
.regions-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,205px),1fr)); gap: .7rem; }
.card, .panel { padding: clamp(1rem, 2vw, 1.55rem); }
.card h3, .panel h3 { margin-block-end: .45rem; }
.card p, .panel > p:not(.lead) { color: var(--muted); }
a.card { display: block; color: var(--ink); text-decoration: none; }
a.card:hover { border-color: #8ca8ba; background: #fafdff; }
a.card:hover :where(h2,h3,strong) { color: var(--link); text-decoration: underline; }
.regions-grid > a:not(.card), .chips a, .chip {
  display: inline-flex; align-items: center; max-width: 100%; min-height: 38px;
  border: 1px solid var(--line); background: white; border-radius: 7px; padding: .35rem .73rem; color: var(--blue);
  text-decoration: none; font-weight: 600; line-height: 1.36;
}
.regions-grid > a:not(.card) { padding: .7rem .9rem; min-height: 46px; }
.regions-grid > a:hover, .chips a:hover, a.chip:hover { background: var(--wash); border-color: #91abbb; }
.chips, .actions, .inline-list { display: flex; flex-wrap: wrap; gap: .48rem .65rem; align-items: center; }
.inline-list, ul.chips { list-style: none; padding: 0; }
.chips li, .inline-list li { margin-block: 0; }
.actions { margin-block: 1rem; }
.breadcrumbs { color: var(--muted); font-size: .89rem; padding-block: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.breadcrumbs :where(ol,ul) { display: flex; flex-wrap: wrap; gap: .35rem .5rem; padding: 0; margin: 0; list-style: none; }
.breadcrumbs li { margin: 0; }
.breadcrumbs a { color: var(--blue); }
.page-head { padding-block: clamp(1.1rem, 2vw, 2rem); }
.page-head h1 { max-width: 31ch; }
.page-head .lead { margin-block-end: .35rem; }
.answer { background: #eaf2f8; border: 1px solid #bdcfdc; border-inline-start: 4px solid var(--blue); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2.25rem); color: var(--ink); }
.answer > :last-child { margin-block-end: 0; }
.answer-code { font-size: clamp(2.1rem, 5.6vw, 4rem); letter-spacing: -.035em; font-weight: 750; line-height: 1.15; color: var(--navy); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0,1fr); align-items: start; gap: clamp(1rem, 2vw, 1.65rem); }
.stack { display: grid; gap: 1rem; min-width: 0; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: white; }
table { width: 100%; border-collapse: collapse; text-align: start; font-size: .97rem; }
caption { text-align: left; padding: .8rem; font-weight: 700; }
th, td { text-align: start; vertical-align: top; padding: .64rem .85rem; border-block-end: 1px solid var(--line); overflow-wrap: anywhere; }
th { color: var(--navy); background: var(--wash); font-size: .91rem; }
tbody tr:last-child > :where(td,th) { border-block-end: 0; }
tbody tr:nth-child(even) td { background: #fbfcfd; }
.data-list { margin: 0; }
.data-list dt { font-size: .89rem; font-weight: 650; color: var(--muted); }
.data-list dd { margin: 0 0 .75rem; font-weight: 650; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); gap: .8rem; }
.stat { min-width: 0; border-inline-start: 3px solid var(--accent); padding: .7rem 1rem; background: white; border-radius: 0 8px 8px 0; }
.stat strong { display: block; color: var(--blue); font-size: clamp(1.55rem, 2.75vw, 2.4rem); line-height: 1.2; font-variant-numeric: tabular-nums; }
.muted, .source-note { color: var(--muted); }
.source-note { padding-block: .65rem; font-size: .89rem; overflow-wrap: anywhere; }
.notice, .callout { background: #fff7e6; color: #563c15; border: 1px solid #e4c98c; border-inline-start: 4px solid #ce8b16; border-radius: 10px; padding: .85rem 1rem; }
.notice a, .callout a { color: #4b4229; }
.notice > :last-child { margin-block-end: 0; }
.link-list { margin: 0; padding-inline-start: 1.25rem; }
.link-list li { padding-block: .13rem; }
.map { overflow: hidden; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--wash); }
.map iframe, iframe.map { width: 100%; height: clamp(245px, 36vw, 425px); display: block; border: 0; }
.small-search { max-width: 45rem; }
.footer { margin-block-start: clamp(2rem, 4vw, 3.5rem); border-block-start: 3px solid var(--accent); background: var(--navy-deep); color: #dce7ef; padding-block: clamp(1.35rem, 3vw, 2.5rem); }
.footer :where(a,strong,h2,h3) { color: white; }
.footer a:hover { color: #ffcf6e; }
.footer .muted, .footer .source-note { color: #cbd9e4; }
.footer > .wrap > :last-child { margin-block-end: 0; }
:where(h2,h3,[id]) { scroll-margin-block-start: 1rem; }
:where(.grid,.hero-grid,.two-col,.stat-grid,.regions-grid) > * { min-width: 0; }
:where(.page-head,.panel,.card,.hero-copy,.link-list,.answer,.regions-grid) { overflow-wrap: break-word; }
@media (max-width: 820px) {
  .header-inner { flex-wrap: wrap; gap: .2rem 1.1rem; min-height: 60px; }
  .nav { column-gap: .9rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.4rem; padding-block: 2rem 2.3rem; }
  .hero h1 { max-width: 21ch; }
  .search-card { max-width: 42rem; width: 100%; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .header-inner { align-items: flex-start; gap: .15rem; padding-block: .65rem .4rem; }
  .brand { width: 100%; }
  .brand img { width: min(195px, 62vw); }
  .brand span { max-width: 11rem; font-size: .75rem; }
  .nav { gap: 0 .85rem; }
  .nav a { min-height: 36px; font-size: .86rem; }
  .hero-grid { padding-block: 1.6rem 1.7rem; }
  .hero-copy .eyebrow { margin-block-end: .65rem; }
  .hero h1 { font-size: clamp(2.15rem, 9vw, 2.9rem); }
  .search-card { padding: 1.05rem; }
  .search-row { gap: .45rem; }
  .search-row :where(input:not([type="hidden"]),select) { flex-basis: 9rem; }
  .search-row button { flex: 0 1 auto; padding-inline: .75rem; }
  .page-head h1 { font-size: clamp(1.95rem, 8vw, 2.5rem); }
  .regions-grid { grid-template-columns: 1fr; }
  .section { padding-block: 1.45rem; }
  th, td { padding: .55rem .5rem; }
  table { font-size: .91rem; }
  .breadcrumbs { font-size: .84rem; }
}
@media (max-width: 360px) {
  .search-card .search-row { display: grid; }
  .search-card .search-row button { width: 100%; }
}
@media print {
  :root { font-size: 10pt; }
  body, .hero, .answer, .panel, .card, .footer { background: white; color: #151515; box-shadow: none; }
  .nav, .skip, .hero .search-card, .small-search, .copy, .footer, .map iframe { display: none; }
  .wrap { width: 100%; }
  .hero::before { display: none; }
  .hero :where(h1,h2,p), .hero-copy .lead, .hero-copy .eyebrow, .hero-copy > p:not(.eyebrow) { color: #151515; }
  .hero-grid, .section, .page-head { padding-block: .8rem; }
  .table-wrap { overflow: visible; }
  tr, .card, .stat { break-inside: avoid; }
}


[hidden] { display: none !important; }
:target { scroll-margin-top: 1rem; }
tbody tr:target > :is(th,td) { background: #fff2c8; }
.table-wrap { min-width: 0; }
.table-wrap td .chip { white-space: nowrap; font-variant-numeric: tabular-nums; }
.search-row select { appearance: auto; }
.search-row button:disabled { background: #50677b; border-color: #50677b; cursor: wait; }
.jump-links, .search-tools { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; margin-block: .7rem; font-size: .93rem; }
.jump-links a, .search-tools a { padding-block: .25rem; }
.result-summary, .related-place, .postal-sample { overflow-wrap: anywhere; }
.result-summary { color: var(--ink); font-size: 1.06rem; }
.postal-sample { padding: .7rem .9rem; border-inline-start: 3px solid var(--blue); background: var(--wash); color: var(--navy); font-weight: 700; font-variant-numeric: tabular-nums; white-space: pre-line; }
.source-note, .evidence { border-block-start: 1px solid var(--line); padding-block: .85rem; color: var(--muted); font-size: .9rem; }
:is(.source-note,.evidence) p { margin-block: .22rem .36rem; }
.study-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,10rem),1fr)); gap: .75rem; }
.address-result:not(:empty) { margin-block: .8rem; padding: .8rem 1rem; border-inline-start: 3px solid var(--blue); background: var(--wash); color: var(--ink); overflow-wrap: anywhere; }
.address-result :last-child { margin-block-end: 0; }
.address-choice { padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); }
button.address-choice { max-width: 100%; text-align: start; cursor: pointer; }
button.address-choice:hover { border-color: var(--blue); }
.compact-links, .region-directory .link-list, [id^="lettre-"] + .link-list { columns: 15rem 3; column-gap: 1.5rem; margin-block: .6rem 1.4rem; }
.compact-links > a { display: block; break-inside: avoid; padding-block: .15rem; }
:is(.compact-links,.region-directory .link-list) li, [id^="lettre-"] + .link-list li { break-inside: avoid; margin-block: 0; padding-block: .14rem; }
.region-directory details { border-block-end: 1px solid var(--line); }
.region-directory summary { padding: .65rem .25rem; font-weight: 700; cursor: pointer; }
nav[aria-label="Index alphabétique"] { margin-block-end: 1.15rem; gap: .35rem; }
nav[aria-label="Index alphabétique"] .chip { min-width: 2.25rem; justify-content: center; padding-inline: .35rem; }
@media screen and (max-width: 820px) {
  /* Le titre précède le formulaire ; les explications suivent le champ sur téléphone. */
  .hero-grid { row-gap: .7rem; }
  .hero-copy { display: contents; }
  .hero-copy > .eyebrow { order: 0; margin: 0; }
  .hero-copy > h1 { order: 1; margin: 0; }
  .hero-grid > .search-card { order: 2; }
  .hero-copy > :not(.eyebrow,h1) { order: 3; margin: 0; }
}
@media screen and (max-width: 540px) {
  .page-head { padding-block: .6rem; }
  .breadcrumbs { padding-block: .45rem; }
  .page-head + .section { padding-block-start: .75rem; }
  .table-wrap .copy { display: flex; min-height: 34px; padding: .3rem .45rem; font-size: .87rem; margin-block-start: .3rem; }
  .table-wrap td .chip { padding-inline: .3rem; }
  .search-tools, .jump-links { margin-block: .5rem; }
}
@media print {
  .jump-links, .search-tools { display: none; }
}

.quick-search { position: relative; }
.quick-search summary { cursor: pointer; color: var(--ink); font-weight: 650; padding-block: .5rem; }
.quick-search[open] > div { position: absolute; top: 100%; right: 0; width: min(24rem,84vw); padding: 1rem; background: white; border: 1px solid var(--line); border-radius: .65rem; z-index: 8; box-shadow: var(--shadow); }
@media (max-width: 650px) { .quick-search[open] > div { right: auto; left: 0; } }

a.chip { white-space: nowrap; overflow-wrap: normal; }
.place-map { display:block; margin-block-start:.25rem; font-weight:normal; }
.table-wrap caption { text-align:left; padding:.55rem .25rem; font-weight:600; }
@media (max-width:540px) {
  .table-wrap td:has(> a.chip),.table-wrap th:has(> a.chip) { min-width:5.1rem; }
  .table-wrap a.chip { padding-inline:.32rem; }
}

.postal-ending { display:inline-block; vertical-align:middle; }
.postal-variant + .postal-variant { margin-top:.65rem; }
.example-addresses { display:flex; flex-wrap:wrap; gap:1.5rem; padding:0; list-style:none; }
.example-addresses li { max-width:29rem; }
.example-addresses small { display:block; margin-top:.25rem; }
[data-directory] tr[hidden] { display:none; }

.postal-evidence { margin:.25rem 0 .6rem; font-size:.92rem; color:var(--ink); }

[hidden] { display:none !important; }
.copy-feedback { display:block; margin-top:.2rem; }
#donnees { overflow-wrap:anywhere; }

.territory-postcodes th {vertical-align:top}
.territory-postcodes td p {margin:.25rem 0 .65rem}
.territory-postcodes td p:last-child {margin-bottom:.25rem}
:is(tr,tbody,div,li,section):target {scroll-margin-top:1rem}
tr[id^="ligne-"]:target > td, tbody[id^="secteur-"]:target > tr > td,
tr[id^="code-"]:target > *, [id^="secteur-"]:is(div,li):target,
.postal-variant:target {background:#fff2cf}

.postal-map figure {margin:1rem 0}
.postal-map svg {display:block;width:100%;max-height:23rem;background:#f1f5f5;border:1px solid var(--line);border-radius:.55rem}
.postal-map svg path {stroke:#314c55;stroke-width:1;fill:#a7cec8}
.postal-map .multi path {fill:#ecd29e}
.postal-map svg a:hover path,.postal-map svg a:focus path,.postal-map .selected path {fill:#77a4c4;stroke:#162f46;stroke-width:2}
.postal-map-tools {display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}
.postal-map-tools[hidden] {display:none}
.postal-map-tools select {max-width:100%}
.postal-key {display:flex;flex-wrap:wrap;gap:1rem}
.postal-key span:before {content:"";display:inline-block;width:.85em;height:.85em;background:#a7cec8;border:1px solid #314c55;margin-right:.4em}
.postal-key .multi:before {background:#ecd29e}
.postal-groups summary {cursor:pointer}
tr[id^="destination-"]:target>* {background:#fff2cf}

.ban-result {padding:.7rem 1rem;border-left:.25rem solid var(--line);margin-bottom:1rem}
.ban-result li+li {margin-top:.4rem}
.reference-etude {overflow-wrap:anywhere}

.paris-voies th,.paris-voies td{vertical-align:top}
.paris-voies td ul{list-style:none;margin:0;padding:0}
.paris-voies td li+li{margin-top:.25rem}
.paris-voies tr:target{outline:2px solid currentColor;outline-offset:-2px}
