/*
  Pages de texte : confidentialite/, conditions/ et leurs versions anglaises en/privacy/, en/terms/.
  Feuille écrite à la main et servie telle quelle : elle ne passe pas par « npm run build », qui ne refait
  que style.css. Ces pages n'ont ni 3D ni script du site, d'où une feuille courte et indépendante.
  Couleurs et polices reprennent celles de src/css/base.css.
*/

@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
/* Étiquettes : la Sans, réglée comme dans src/css/base.css (capitales un peu plus hautes, chiffres à chasse fixe). */
@font-face {
  font-family: 'Instrument Sans Label';
  src: url('../fonts/instrument-sans-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  font-feature-settings: 'tnum' 1;
  size-adjust: 104%;
}

:root {
  --c-night: #04060b;
  --c-star: #efece4;
  --c-star-2: rgba(239, 236, 228, 0.84);
  --c-star-3: rgba(239, 236, 228, 0.72);
  --c-line: rgba(239, 236, 228, 0.16);
  --c-sun: #ffbb70;
  --f-display: 'Instrument Serif', 'Iowan Old Style', 'Times New Roman', serif;
  --f-text: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --f-label: 'Instrument Sans Label', 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3.75rem);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 50% at 78% 12%, rgba(86, 110, 170, 0.22), transparent 70%),
    radial-gradient(ellipse 60% 40% at 12% 78%, rgba(255, 187, 112, 0.07), transparent 70%),
    var(--c-night);
  background-attachment: fixed;
  color: var(--c-star);
  font-family: var(--f-text);
  font-size: clamp(1rem, 1.02vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--c-sun);
  color: var(--c-night);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--c-sun);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--c-star);
  color: var(--c-night);
  font: 500 0.8125rem var(--f-label);
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus {
  transform: none;
}

.meta {
  font: 500 0.6875rem/1.5 var(--f-label);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--c-star-2);
}

/* ---------- En-tête ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 0.5rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  font: 400 1.3rem/1 var(--f-display);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand__mark {
  width: 1.15rem;
  height: 1.15rem;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.brand:hover .brand__mark {
  transform: rotate(180deg);
}

.lang-switch {
  display: flex;
  align-items: center;
  font: 500 0.6875rem/1 var(--f-label);
  letter-spacing: 0.13em;
}
.lang-switch__sep {
  color: var(--c-star-3);
}
.lang-switch__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  color: var(--c-star-2);
  text-decoration: none;
  transition: color 0.35s ease;
}
.lang-switch__link span {
  padding: 0.5em 0;
  border-bottom: 1px solid transparent;
}
.lang-switch__link:hover {
  color: var(--c-star);
}
.lang-switch__link:hover span {
  border-bottom-color: currentColor;
}
.lang-switch__link[aria-current='true'] {
  color: var(--c-star);
}
.lang-switch__link[aria-current='true'] span {
  border-bottom-color: var(--c-sun);
}

/* ---------- Texte ---------- */

.doc {
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 6rem) var(--gutter) clamp(3rem, 8vh, 6rem);
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin: 0;
  font: 500 0.6875rem/1 var(--f-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow__index {
  color: var(--c-sun);
}

.doc__title {
  margin: 1.4rem 0 0;
  font: 400 clamp(2.75rem, 8.6vw, 7.5rem)/0.95 var(--f-display);
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}
.doc__lead {
  max-width: 40rem;
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  font-size: clamp(1.2rem, 1.85vw, 1.6rem);
  line-height: 1.4;
  color: var(--c-star-2);
}

.doc__date {
  margin: 1.5rem 0 0;
}

.doc__sections {
  margin-top: clamp(3rem, 8vh, 5.5rem);
}

.part {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
  border-top: 1px solid var(--c-line);
}

.part__title {
  display: flex;
  gap: 1rem;
  margin: 0;
  font: 500 0.75rem/1.5 var(--f-label);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--c-star);
}
.part__index {
  flex: none;
  color: var(--c-sun);
}

.part__body {
  max-width: 42rem;
  color: var(--c-star-2);
}
.part__body > * {
  margin: 0;
}
.part__body > * + * {
  margin-top: 1em;
}
.part__body a {
  color: var(--c-star);
  text-decoration: underline;
  text-decoration-color: rgba(239, 236, 228, 0.5);
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.3s ease;
  overflow-wrap: anywhere;
}
.part__body a:hover {
  text-decoration-color: var(--c-sun);
}
.part__body strong {
  font-weight: 600;
  color: var(--c-star);
}
.part__body code {
  font: 500 0.92em var(--f-label);
  color: var(--c-sun);
}
.part__body ul {
  padding-left: 1.2em;
}
.part__body li + li {
  margin-top: 0.4em;
}
.part__body li::marker {
  color: var(--c-sun);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Pied de page ---------- */

.bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  max-width: 76rem;
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 2.5rem;
}
.bottom p {
  margin: 0;
}
.bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bottom__links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--c-star);
  text-decoration: underline;
  text-decoration-color: rgba(239, 236, 228, 0.5);
  text-underline-offset: 0.4em;
  transition: text-decoration-color 0.3s ease;
}
.bottom__links a:hover {
  text-decoration-color: var(--c-sun);
}

@media (min-width: 56rem) {
  .part {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 2rem;
  }
  .part__title {
    position: sticky;
    top: 2rem;
    align-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }
  .top,
  .bottom__links,
  .skip-link {
    display: none;
  }
  .meta,
  .eyebrow,
  .eyebrow__index,
  .doc__lead,
  .part__title,
  .part__index,
  .part__body,
  .part__body a,
  .part__body strong,
  .part__body code {
    color: #000;
  }
  .part {
    border-top-color: #999;
  }
}
