/* ============================================================
   Prüfag — Page "en construction"
   Palette : fond jaune Prüfag (#eeff00), encre noire (#131207)
   Typographie : titres MD IO (capitales), texte courant MD System
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "MD System";
  src: url("assets/fonts/MDSystem-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MD IO";
  src: url("assets/fonts/MDIO-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --color-bg: #eeff00;
  --color-ink: #131207;
  --color-ink-soft: rgba(19, 18, 7, 0.7);
  --color-ink-mute: rgba(19, 18, 7, 0.45);

  --font-sans: "MD System", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "MD IO", "JetBrains Mono", "SFMono-Regular", ui-monospace,
    Menlo, Consolas, monospace;

  --radius-pill: 9999px;
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 380ms;

  --max-content: 760px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ---------- Page layout ---------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(22px, 5vw, 56px);
  display: grid;
  /* Rows : lang-switch | logo | content | footer */
  grid-template-rows: auto auto 1fr auto;
  gap: clamp(40px, 8vh, 80px);
}

/* Le toggle de langue colle au logo (sans le gap large) */
.lang-switch + .logo-wrap {
  margin-top: calc(clamp(40px, 8vh, 80px) * -1 + 8px);
}

/* ---------- Sélecteur de langue (dans la grille) ---------- */
/* En flow normal, aligné à droite — même alignement que le lynx du footer */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  z-index: 10;
}

.lang-btn {
  position: relative;
  padding: 4px 2px;
  color: var(--color-ink-mute);
  transition: color var(--dur) var(--ease);
}

.lang-btn::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 1.5px;
  background: var(--color-ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}

.lang-btn:hover,
.lang-btn:focus-visible {
  color: var(--color-ink);
  outline: none;
}

.lang-btn.is-active {
  color: var(--color-ink);
}

.lang-btn.is-active::after {
  transform: scaleX(1);
}

.lang-divider {
  color: var(--color-ink-mute);
  user-select: none;
}

/* ---------- Logo ---------- */
.logo-wrap {
  display: flex;
  align-items: center;
}

.logo {
  width: clamp(140px, 18vw, 200px);
  height: auto;
}

/* ---------- Contenu ---------- */
.content {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.lang-content {
  width: 100%;
  animation: fadeUp 600ms var(--ease) both;
}

.lang-content[hidden] {
  display: none;
}

/* ---------- Titre principal : MD IO en CAPITALES ---------- */
.headline {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin: 0 0 clamp(20px, 3vw, 28px) 0;
}

/* ---------- Texte courant : MD System ---------- */
.lead {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 clamp(28px, 4vw, 40px) 0;
  max-width: 46ch;
  color: var(--color-ink);
}

/* ---------- Bloc EPHJ (pleine largeur, contenu centré) ---------- */
.ephj {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 clamp(32px, 4vw, 44px) 0;
  padding: 22px 22px;
  border: 1.5px solid var(--color-ink);
  border-radius: 4px;
  display: block;
  width: 100%;
  text-align: center;
  background: transparent;
}

.ephj__title,
.ephj__line {
  display: block;
}

.ephj__title {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 24px;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.ephj__line {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.3;
}

/* ---------- Bouton pill (centré horizontalement) ---------- */
.btn-pill {
  --pad-y: 16px;
  --pad-x: 28px;

  position: relative;
  display: flex;
  width: fit-content;
  margin-inline: auto;
  align-items: center;
  gap: 14px;
  padding: var(--pad-y) var(--pad-x);
  border: 1.5px solid var(--color-ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.005em;
  color: var(--color-ink);
  background: transparent;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--dur) var(--ease);
  will-change: color;
}

.btn-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-ink);
  border-radius: inherit;
  transform: translateX(-101%);
  transition: transform var(--dur) var(--ease);
  z-index: -1;
}

.btn-pill__label,
.btn-pill__arrow {
  position: relative;
  z-index: 1;
}

.btn-pill__arrow {
  display: inline-flex;
  width: 20px;
  height: 20px;
  transition: transform var(--dur) var(--ease);
}

.btn-pill__arrow svg {
  width: 100%;
  height: 100%;
}

.btn-pill:hover,
.btn-pill:focus-visible {
  color: var(--color-bg);
  outline: none;
}

.btn-pill:hover::before,
.btn-pill:focus-visible::before {
  transform: translateX(0);
}

.btn-pill:hover .btn-pill__arrow,
.btn-pill:focus-visible .btn-pill__arrow {
  transform: translateX(4px);
}

.btn-pill:active {
  transform: translateY(1px);
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid rgba(19, 18, 7, 0.15);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-left: -10px;
  border-radius: 4px;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.social-link:hover,
.social-link:focus-visible {
  opacity: 0.7;
  transform: translateY(-1px);
  outline: none;
}

.social-icon {
  width: 32px;
  height: 32px;
}

.social-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* Bloc droit : copyright + lynx */
.footer-end {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.copyright {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-ink-soft);
  margin: 0;
  white-space: nowrap;
}

.footer-lynx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-ink);
  border-radius: 4px;
  flex-shrink: 0;
}

.footer-lynx img {
  width: 76%;
  height: 76%;
  display: block;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Accessibilité : motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .headline {
    font-size: clamp(26px, 8vw, 34px);
  }

  .btn-pill {
    --pad-y: 14px;
    --pad-x: 22px;
    font-size: 14px;
  }

  .footer {
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .footer-end {
    gap: 10px;
  }

  .footer-lynx {
    width: 32px;
    height: 32px;
  }
}
