/*
  encre-de-paris.css — "Paris ink"
  ------------------------------------------------------------
  Signature idea: the enamel street-name plaque bolted to the
  corner of every Parisian building (rue de la Tour-Eiffel style)
  is reused as the header device for every page and section.
  Practical-info boxes borrow the oval outline of a passport
  entry stamp; "nearby" tags borrow the coloured roundel of a
  métro line number. All three are things a tourist actually
  holds or looks up at during a trip — the chrome IS the subject.
*/

:root {
  --encre: #0f2038;       /* ink navy, sampled from the mark */
  --encre-soft: #1c3155;
  --rouge: #e0483f;       /* rouge, sampled from the mark */
  --rouge-deep: #b73a33;
  --papier: #faf7f1;      /* warm paper, not stark white */
  --papier-carte: #ffffff;
  --or: #b58a3d;          /* worn brass, for stamps/plaques */
  --gris: #52596b;
  --ligne: #ded3bd;
  --ombre: 0 18px 40px -22px rgba(15, 32, 56, 0.45);

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --script: "Caveat", "Segoe Script", cursive;
  --mono: "Space Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
}

/* language-family overrides swap the display face for something
   that actually renders instead of tofu, while keeping colour
   and rhythm identical across all ten editions of the site */
[data-script="cjk-jp"], [data-script="cjk-zh"], [data-script="cjk-kr"] {
  --serif: "Noto Serif JP", "Noto Serif SC", "Noto Serif KR", "Hiragino Mincho ProN", serif;
  --script: var(--serif);
  --sans: "Noto Sans JP", "Noto Sans SC", "Noto Sans KR", sans-serif;
}
[data-script="arabic"] {
  --serif: "Noto Naskh Arabic", "Traditional Arabic", serif;
  --script: var(--serif);
  --sans: "Noto Kufi Arabic", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------
   COMPASS NAV — a horizontal bar that behaves like a wayfinding
   rose: brand at the pin, topics as bearings, language as a
   stamp you tap.
------------------------------------------------------------------ */
.compas-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: .85rem 1.5rem;
  background: var(--encre);
  color: var(--papier);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--ombre);
}
.compas-nav__mark {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: inherit;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: .01em;
  white-space: nowrap;
}
.compas-nav__mark img { height: 30px; width: auto; display: block; }
.compas-nav__routes {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.1rem;
  margin-inline-start: .5rem;
  flex: 1;
}
.compas-nav__routes a {
  color: var(--papier);
  opacity: .78;
  text-decoration: none;
  font-size: .92rem;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.compas-nav__routes a:hover,
.compas-nav__routes a[aria-current="page"] {
  opacity: 1;
  border-color: var(--rouge);
}
.tampon-lang {
  position: relative;
}
.tampon-lang__bouton {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: transparent;
  color: var(--papier);
  border: 1.5px dashed rgba(250, 247, 241, .55);
  border-radius: 999px;
  padding: .4rem .9rem;
  cursor: pointer;
}
.tampon-lang__liste {
  display: none;
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + .5rem);
  background: var(--papier-carte);
  color: var(--encre);
  border-radius: 10px;
  box-shadow: var(--ombre);
  padding: .4rem;
  min-width: 190px;
  max-height: 60vh;
  overflow-y: auto;
}
.tampon-lang__liste.est-ouvert { display: block; }
.tampon-lang__liste a {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .5rem .6rem;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  font-size: .92rem;
}
.tampon-lang__liste a:hover { background: var(--papier); }
.tampon-lang__liste a[aria-current="true"] { color: var(--rouge); font-weight: 600; }
.tampon-lang__tout {
  border-top: 1px dashed var(--ligne);
  margin-top: .3rem;
  padding-top: .7rem !important;
  color: var(--gris) !important;
  font-size: .84rem !important;
}

/* ---------------------------------------------------------------
   THE PLAQUE — signature element. An enamel street-sign header,
   reused for every topic page and, smaller, for every section.
------------------------------------------------------------------ */
.plaque {
  --plaque-pad: 1.9rem;
  margin: 2.5rem auto 0;
  max-width: 920px;
  background: var(--encre);
  color: var(--papier-carte);
  border: 3px solid var(--papier-carte);
  outline: 7px solid var(--encre);
  outline-offset: -12px;
  padding: var(--plaque-pad) calc(var(--plaque-pad) + .4rem);
  text-align: center;
  position: relative;
  box-shadow: var(--ombre);
}
.plaque::before, .plaque::after {
  content: "";
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--or);
  top: 10px;
}
.plaque::before { inset-inline-start: 10px; }
.plaque::after  { inset-inline-end: 10px; }
.plaque__eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--or);
  margin: 0 0 .6rem;
}
.plaque__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 0;
  line-height: 1.08;
}
.plaque__title-local {
  font-family: var(--sans);
  font-size: .95rem;
  letter-spacing: .02em;
  opacity: .72;
  margin: .5rem 0 0;
}
.plaque__tagline {
  font-family: var(--script);
  color: var(--rouge);
  background: var(--papier-carte);
  display: inline-block;
  padding: .1rem .9rem;
  border-radius: 999px;
  margin-top: .9rem;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
}

/* mini plaque used for in-page section headers */
.plaque--mini {
  --plaque-pad: 1rem;
  outline-width: 4px;
  outline-offset: -8px;
  border-width: 2px;
  margin: 3rem auto 0;
  max-width: 640px;
}
.plaque--mini .plaque__title { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }

/* ---------------------------------------------------------------
   CARNET PAGE — the "notebook" body: a ruled left margin like a
   travel journal, red twine-stitch dividers between sections.
------------------------------------------------------------------ */
.carnet-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 3rem 1.75rem 5rem;
}
.carnet-feuillet {
  background: var(--papier-carte);
  border: 1px solid var(--ligne);
  border-inline-start: 10px solid var(--encre);
  padding: 2.4rem clamp(1.25rem, 4vw, 3rem);
  box-shadow: var(--ombre);
}
.carnet-feuillet > .intro {
  font-size: 1.18rem;
  max-width: 62ch;
}
.couture {
  border: none;
  border-top: 2px dashed var(--rouge);
  opacity: .55;
  margin: 2.6rem 0;
}

.reperes {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: .9rem;
}
.reperes li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: .8rem;
  align-items: start;
}
.reperes li::before {
  content: "✦";
  color: var(--rouge);
  font-size: 1rem;
  line-height: 1.6;
}

/* passport-stamp style practical-info box */
.tampon-pratique {
  margin-top: 2.2rem;
  border: 2px solid var(--rouge);
  border-radius: 130px / 40px;
  padding: 1.4rem 2rem;
  transform: rotate(-1deg);
  position: relative;
  color: var(--rouge-deep);
}
.tampon-pratique::before {
  content: attr(data-label);
  position: absolute;
  top: -.75rem;
  inset-inline-start: 1.6rem;
  background: var(--papier-carte);
  padding: 0 .6rem;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.tampon-pratique dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .35rem 1rem;
  margin: 0;
  font-family: var(--sans);
  color: var(--encre);
}
.tampon-pratique dt {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--rouge-deep);
  align-self: center;
}
.tampon-pratique dd { margin: 0; }

/* métro-roundel "nearby" tags */
.roundels {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}
.roundel {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--papier);
  border: 1px solid var(--ligne);
  border-radius: 999px;
  padding: .35rem .9rem .35rem .35rem;
  font-size: .88rem;
}
.roundel__pastille {
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--mono);
  font-size: .68rem;
  flex-shrink: 0;
}
.roundel__nom { color: var(--encre); }
.roundel__genre { color: var(--gris); font-size: .8rem; }

/* home / language-index grid of destination cards */
.grille-destinations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
  margin-top: 2rem;
}
.carte-destination {
  background: var(--papier-carte);
  border: 1px solid var(--ligne);
  border-top: 5px solid var(--encre);
  padding: 1.4rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .15s ease, box-shadow .15s ease;
}
.carte-destination:hover { transform: translateY(-3px); box-shadow: var(--ombre); }
.carte-destination__eyebrow {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--or);
}
.carte-destination__titre {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: .3rem 0 .4rem;
}
.carte-destination__tagline {
  font-family: var(--script);
  color: var(--rouge);
  font-size: 1.15rem;
}

/* language landing / root picker */
.passeport {
  max-width: 720px;
  margin: 4vh auto;
  text-align: center;
  padding: 0 1.5rem;
}
.passeport__grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .8rem;
  margin-top: 2.2rem;
}
.passeport__lien {
  border: 1.5px solid var(--encre);
  padding: 1rem .6rem;
  text-decoration: none;
  color: var(--encre);
  font-family: var(--sans);
  display: block;
}
.passeport__lien:hover { background: var(--encre); color: var(--papier); }
.passeport__drapeau { font-size: 1.5rem; display: block; margin-bottom: .3rem; }

/* ---------------------------------------------------------------
   IMAGES — hero banner, "postcard" 4:5 tucked into the notebook
   page, and destination-card thumbnails. Every <img> here can
   silently resolve to a 1×1 transparent pixel (see compas/gabarit.js)
   until the real photo lands at /images/<slug>[-hero].webp — the
   .est-vide class is added by that same onerror handler so the
   reserved space collapses to a quiet paper-coloured plate instead
   of a broken-image glyph.
------------------------------------------------------------------ */
.heros {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  aspect-ratio: 16 / 6;
  background: var(--encre-soft);
  overflow: hidden;
  border-bottom: 3px solid var(--rouge);
  position: relative;
}
.heros__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.heros__img.est-vide { opacity: 0; }

.carte-postale {
  float: right;
  width: min(230px, 40%);
  margin: 0 0 1rem 1.5rem;
  background: var(--papier-carte);
  border: 1px solid var(--ligne);
  box-shadow: var(--ombre);
  padding: .5rem .5rem 1rem;
  transform: rotate(2deg);
}
.carte-postale img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: var(--papier);
}
.carte-postale img.est-vide {
  background: repeating-linear-gradient(135deg, var(--papier), var(--papier) 10px, #f0ead9 10px, #f0ead9 20px);
}

.carte-destination__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  background: var(--papier);
  margin-bottom: .9rem;
}
.carte-destination__photo.est-vide { display: none; }

@media (max-width: 640px) {
  .heros { aspect-ratio: 4 / 3; margin-top: 0; }
  .carte-postale { float: none; width: min(280px, 70%); margin: 0 auto 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .carte-postale { transform: none; }
}

footer.semelle {
  border-top: 1px solid var(--ligne);
  margin-top: 4rem;
  padding: 2rem 1.75rem 3rem;
  text-align: center;
  color: var(--gris);
  font-size: .85rem;
}
footer.semelle a { color: var(--encre); }

@media (max-width: 640px) {
  .compas-nav { flex-wrap: wrap; }
  .compas-nav__routes { order: 3; width: 100%; }
  .tampon-pratique dl { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carte-destination { transition: none; }
}

/* right-to-left flip for Arabic edition — logical properties above
   already do most of the work; this covers the few physical ones */
[dir="rtl"] .reperes li { grid-template-columns: 1fr 1.6rem; }
[dir="rtl"] .reperes li::before { grid-column: 2; }
[dir="rtl"] .tampon-pratique { transform: rotate(1deg); }
