/* TASHKENT — base.css */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
blockquote {
  font-family: var(--serif);
  font-weight: 400;
}

body,
button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

button {
  font: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Les attributs width/height servent à réserver la place ; le ratio doit
   rester libre, sinon toute image redimensionnée en CSS se retrouve écrasée. */
img[width][height] {
  height: auto;
}

::selection {
  background: var(--turquoise);
  color: white;
}

:focus-visible {
  outline: 2px solid var(--turquoise);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--ivory);
  color: var(--ink);
  font: 600 0.75rem/1 var(--sans);
  letter-spacing: 0.08em;
  transform: translateY(-200%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.section {
  position: relative;
  padding: clamp(88px, 10vw, 160px) 0;
  overflow: hidden;
}

.eyebrow {
  margin: 0;
  font: 600 0.66rem/1.45 var(--sans);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.eyebrow::before {
  display: inline-block;
  width: 28px;
  height: 1px;
  margin-right: 12px;
  vertical-align: middle;
  background: currentColor;
  content: "";
}

.eyebrow--light {
  color: rgba(255, 250, 238, 0.72);
}

.eyebrow--turquoise {
  color: var(--turquoise-light);
}

.section-number {
  margin: 22px 0 0;
  color: rgba(17, 19, 18, 0.16);
  font: 400 clamp(4.8rem, 10vw, 9.5rem)/0.8 var(--serif);
  letter-spacing: -0.07em;
}

.section-number--dark {
  color: rgba(245, 240, 231, 0.11);
}

.arrow {
  width: 31px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
  transition: transform 220ms ease;
}

a:hover .arrow {
  transform: translateX(5px);
}

.arrow--diagonal {
  transform: rotate(-45deg);
}

a:hover .arrow--diagonal {
  transform: translate(4px, -4px) rotate(-45deg);
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 15px 22px;
  border: 1px solid transparent;
  font: 600 0.68rem/1 var(--sans);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}

.button--gold {
  background: var(--gold-light);
  color: var(--ink);
}

.button--gold:hover {
  background: var(--turquoise-light);
}

.button--outline {
  border-color: rgba(245, 240, 231, 0.4);
  color: var(--ivory);
}

.button--outline:hover {
  border-color: var(--turquoise-light);
  color: var(--turquoise-light);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding-bottom: 7px;
  border-bottom: 1px solid currentColor;
  font: 600 0.72rem/1.2 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.text-link--light {
  color: rgba(255, 250, 238, 0.88);
}


/* ==========================================================================
   Socle de lisibilité — remonté de l'ancienne couche « tashkent-readability-2026 »
   qui n'était appliquée qu'en toute fin de document. Ces décisions ne sont pas
   des correctifs : elles définissent le confort de lecture du site.
   ========================================================================== */

body {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

main p,
main li,
main dd,
main address,
main blockquote,
.site-footer p,
.site-footer li,
.site-footer address {
  font-weight: 400;
  line-height: 1.68;
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.16em;
}

.button,
.header-cta,
.text-link {
  font-weight: 700;
}

/* Cibles tactiles : 50 px minimum. */
.button,
.header-cta {
  min-height: var(--touch);
  padding-top: 14px;
  padding-bottom: 14px;
}

/* Les liens-texte gardent leur filet collé au mot — c'est l'élégance du site.
   La zone tactile est élargie à 45 px par une surface invisible, sans déplacer
   un seul pixel visible. */
.text-link {
  position: relative;
}

.text-link::before {
  position: absolute;
  inset: -9px -4px;
  content: "";
}

/* Le focus clavier doit rester très visible partout. */
:focus-visible {
  outline: 3px solid var(--turquoise-light);
  outline-offset: 4px;
}

/* Liens dans le texte : perceptibles autrement que par la couleur seule. */
main p a:not(.button):not(.text-link),
main dd a:not(.button):not(.text-link),
main address a:not(.button):not(.text-link) {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.16em;
}

@media (max-width: 760px) {
  body {
    font-size: 18px;
    line-height: 1.7;
  }

  main p,
  main li,
  main dd,
  main address,
  .site-footer p,
  .site-footer li,
  .site-footer address {
    line-height: 1.72;
  }

  .eyebrow {
    font-size: 0.9rem;
    letter-spacing: 0.13em;
  }

  .button,
  .header-cta {
    min-height: 52px;
  }
}

@media (max-width: 420px) {
  :root {
    --container: min(100% - 36px, 1220px);
  }

  .button,
  .text-link {
    letter-spacing: 0.1em;
  }
}


/* Utilitaires */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lang-notice {
  position: relative;
  z-index: 99;
  margin: 0;
  padding: 12px max(28px, calc((100vw - 1220px) / 2));
  background: var(--uzbek-green);
  color: #fff;
  font: 500 max(0.86rem, 13px)/1.5 var(--sans);
}

body[data-current-page="accueil"] .lang-notice {
  padding-top: 96px;
}

.page-loading.is-error {
  padding: 22px;
  color: var(--gold-light);
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

/* Champ de recherche de l'Atlas : le libellé est visible et associé. */
.encyclopedia-search {
  display: grid;
  gap: 9px;
}

.encyclopedia-search label {
  color: var(--readable-on-light-soft);
  font: 700 max(0.78rem, 12px)/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.encyclopedia-search input {
  width: 100%;
  min-height: var(--touch);
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 400 1.06rem/1.4 var(--sans);
}

.encyclopedia-search input:hover {
  border-color: var(--uzbek-green);
}

.encyclopedia-search input::placeholder {
  color: var(--readable-on-light-soft);
  opacity: 1;
}
