/* WiwiOpportunity — base layer: reset, layout, nav, buttons, fields, badges, chips, footer.
   Design tokens live in brand-tokens.css (loaded first). */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

input,
button,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

.btn:focus-visible,
.chip:focus-visible,
.lang-btn:focus-visible,
.nav-link:focus-visible,
.card:focus-visible,
.featured-card:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Anchors reached from the sticky nav (Opportunités / Newsletter) */
#opps,
#newsletter {
  scroll-margin-top: 72px;
}

@media (max-width: 720px) {
  #opps,
  #newsletter {
    scroll-margin-top: 116px;
  }
}

/* Layout ------------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.section {
  padding-top: var(--pad-section);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--violet-nuit);
  color: #fff;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Typography -------------------------------------------------------------- */

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--link);
}

.eyebrow--light {
  color: var(--mauve);
  font-weight: 600;
}

.eyebrow--soft {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.micro-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.h1-page {
  margin-top: 6px;
  font-size: var(--h1-page);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.h2-section {
  margin-top: 6px;
  font-size: var(--h2-section);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-sub {
  margin-top: 8px;
  font-size: 15px;
  color: rgba(46, 20, 81, 0.62);
}

.page-sub {
  margin-top: 10px;
  max-width: 560px;
  font-size: 15px;
  color: rgba(46, 20, 81, 0.62);
}

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Top navigation ---------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex: none;
  width: 34px;
  height: 34px;
}

.brand-word {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-word-accent {
  background: linear-gradient(90deg, #7a80f7, #b79df1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: auto;
}

.nav-link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  color: rgba(46, 20, 81, 0.78);
  text-decoration: none;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.nav-link:hover {
  background: rgba(145, 150, 250, 0.14);
  color: var(--ink);
  text-decoration: none;
}

.nav-link.is-active {
  background: rgba(145, 150, 250, 0.16);
  color: var(--ink);
  font-weight: 800;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-pill);
  background: rgba(46, 20, 81, 0.06);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

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

.lang-btn.is-active {
  background: var(--violet-nuit);
  color: #fff;
}

.nav-cta {
  box-shadow: 0 2px 6px rgba(46, 20, 81, 0.14);
}

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
}

.btn:hover {
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn--primary {
  background: var(--violet-nuit);
  color: #fff;
}

.btn--primary:hover {
  background: var(--violet-nuit-hover);
  color: #fff;
}

.btn--accent {
  background: var(--lilas);
  color: var(--violet-nuit);
  font-weight: 800;
}

.btn--accent:hover {
  background: var(--lilas-hover);
  color: var(--violet-nuit);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(46, 20, 81, 0.2);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.72);
}

.btn--ghost-light:hover {
  border-color: var(--lilas);
  color: #fff;
}

.btn--gradient {
  background: var(--grad-cta);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(46, 20, 81, 0.25);
}

.btn--gradient:hover {
  filter: brightness(1.08);
  color: #fff;
}

.btn--danger-text {
  padding: 6px 8px;
  background: transparent;
  color: var(--danger);
}

.btn--danger-text:hover {
  background: rgba(255, 94, 89, 0.1);
  color: var(--danger);
}

.btn--sm {
  padding: 9px 16px;
  font-size: 13.5px;
}

.btn--xs {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn--block {
  width: 100%;
}

/* Fields ------------------------------------------------------------------ */

.field {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border-default);
  border-radius: var(--r-field);
  background: #fff;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.field:focus {
  border-color: var(--lilas);
  box-shadow: var(--focus-ring);
}

.field--pill {
  padding: 11px 18px;
  border-radius: var(--r-pill);
}

select.field {
  cursor: pointer;
  -webkit-appearance: auto;
  appearance: auto;
}

textarea.field {
  min-height: 88px;
  resize: vertical;
}

.field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(46, 20, 81, 0.55);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-error {
  min-height: 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--danger);
}

.required {
  color: var(--danger);
}

/* Badges, tags, chips ------------------------------------------------------ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.badge--lg {
  padding: 4px 10px;
  font-size: 12px;
}

.badge--type-stage {
  background: var(--badge-stage-bg);
  color: var(--badge-stage-fg);
}

.badge--type-scholarship {
  background: var(--badge-bourse-bg);
  color: var(--badge-bourse-fg);
}

.badge--type-volunteering {
  background: var(--badge-volont-bg);
  color: var(--badge-volont-fg);
}

.badge--type-job {
  background: var(--badge-job-bg);
  color: var(--badge-job-fg);
}

.badge--type-studies {
  background: var(--badge-etudes-bg);
  color: var(--badge-etudes-fg);
}

.badge--fund-fully {
  background: var(--fund-fully-bg);
  color: var(--fund-fully-fg);
}

.badge--fund-partial {
  background: var(--fund-partial-bg);
  color: var(--fund-partial-fg);
}

.badge--fund-none {
  background: var(--fund-none-bg);
  color: var(--fund-none-fg);
}

.badge--neutral {
  background: rgba(46, 20, 81, 0.08);
  color: var(--ink);
}

.badge--expired {
  background: rgba(46, 20, 81, 0.08);
  color: rgba(46, 20, 81, 0.65);
}

.badge--glass {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--tag-bg);
  color: var(--tag-fg);
  font-size: 12px;
  font-weight: 600;
}

.place-chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-chip);
  font-size: 12.5px;
  font-weight: 600;
}

.chip {
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.chip:hover {
  border-color: var(--lilas);
}

.chip.is-active {
  background: var(--violet-nuit);
  border-color: var(--violet-nuit);
  color: #fff;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip-group-label {
  flex: none;
  width: 104px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* Skeleton loading --------------------------------------------------------- */

.sk {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(46, 20, 81, 0.06) 25%, rgba(46, 20, 81, 0.11) 50%, rgba(46, 20, 81, 0.06) 75%);
  background-size: 200% 100%;
  animation: skShimmer 1.4s ease-in-out infinite;
}

@keyframes skShimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

.sk--badge {
  width: 64px;
  height: 20px;
  border-radius: var(--r-pill);
}

.sk--title {
  width: 80%;
  height: 18px;
  margin-top: 4px;
}

.sk--line {
  width: 55%;
  height: 13px;
}

.sk--footer {
  width: 100%;
  height: 24px;
  margin-top: auto;
  border-radius: var(--r-pill);
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  margin-top: auto;
  background: var(--bg-footer);
  color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px 48px;
  padding-top: clamp(36px, 5vw, 56px);
  padding-bottom: clamp(36px, 5vw, 56px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 300px;
}

.brand--dark .brand-mark {
  width: 30px;
  height: 30px;
}

.brand--dark .brand-word {
  font-size: 17px;
  color: #fff;
}

.brand--dark .brand-word-accent {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-tag {
  font-size: 13.5px;
  line-height: 1.6;
}

.footer-links,
.footer-social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-links a {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-social .social-link {
  font-size: 13.5px;
  font-weight: 600;
  color: #9ba0fc;
}

.footer-social .social-link:hover {
  color: #fff;
}

.footer-admin {
  margin-top: 6px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
}
