/**
 * New Frontier RP — Styles principaux
 * Thème sombre premium, typographie lisible, composants réutilisables
 */

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

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img,
picture {
  max-width: 100%;
  display: block;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

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

/* --- Variables --- */
:root {
  --bg-deep: #050810;
  --bg-elevated: #0c121f;
  --bg-card: #111827;
  --bg-card-hover: #151f2e;
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-accent: rgba(34, 211, 238, 0.35);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-blue: #3b82f6;
  --accent-glow: rgba(34, 211, 238, 0.45);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", var(--font-sans);
  --max-width: 1120px;
  --header-h: 72px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.08);
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Background pattern */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 211, 238, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(59, 130, 246, 0.06), transparent 45%),
    linear-gradient(180deg, var(--bg-deep) 0%, #060a12 100%);
  pointer-events: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.85rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 52ch;
}

.text-muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.875rem;
}

/* --- Layout --- */
.container {
  width: min(100% - var(--space-xl), var(--max-width));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-3xl);
}

.section--tight {
  padding-block: var(--space-2xl);
}

.section__head {
  margin-bottom: var(--space-2xl);
  max-width: 640px;
}

.section__head--wide {
  max-width: 720px;
}

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

.section__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text);
  letter-spacing: -0.02em;
}

.card > h3:first-child {
  margin-top: 0;
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(5, 8, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(100% - var(--space-xl), var(--max-width));
  margin-inline: auto;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  flex-shrink: 0;
}

.logo:hover {
  color: var(--accent);
}

.logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.logo__mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-blue) 100%);
  box-shadow: var(--shadow-glow);
}

/* Nav desktop */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-lg);
    background: rgba(5, 8, 16, 0.97);
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
    pointer-events: none;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

@media (max-width: 900px) {
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
}

.nav__link {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--text);
  background: var(--accent-soft);
}

.nav__link.is-active {
  color: var(--accent);
}

.nav__cta {
  margin-left: var(--space-sm);
}

@media (max-width: 900px) {
  .nav__cta {
    margin-left: 0;
    margin-top: var(--space-md);
  }
}

/* Burger */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.nav-toggle:hover {
  border-color: var(--border-accent);
  background: var(--bg-card);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }
}

.nav-toggle__icon {
  width: 22px;
  height: 16px;
  position: relative;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after,
.nav-toggle__bar {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s;
}

.nav-toggle__icon::before {
  top: 0;
}

.nav-toggle__bar {
  top: 7px;
}

.nav-toggle__icon::after {
  bottom: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
  top: 7px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
  bottom: 7px;
  transform: rotate(-45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar {
  opacity: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.65rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-display);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn--primary {
  background: linear-gradient(135deg, #0891b2 0%, var(--accent-blue) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.25);
}

.btn--primary:hover {
  box-shadow: 0 6px 28px rgba(34, 211, 238, 0.35);
  transform: translateY(-1px);
}

.btn--secondary {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text);
}

.btn--secondary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  padding: 0.5rem 0;
}

.btn--ghost:hover {
  text-decoration: underline;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

/* --- Hero --- */
.hero {
  padding-block: var(--space-3xl) var(--space-2xl);
  position: relative;
}

.hero__inner {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
  }
}

.hero__content {
  max-width: 560px;
}

.hero__eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.hero__title {
  margin-bottom: var(--space-lg);
}

.hero__title span {
  background: linear-gradient(90deg, var(--accent), #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__visual {
  position: relative;
  min-height: 280px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--bg-elevated) 0%, #0f172a 100%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  overflow: hidden;
}

.hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(34, 211, 238, 0.15), transparent 50%);
  pointer-events: none;
}

.hero__visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(34, 211, 238, 0.35);
  background: var(--bg-card-hover);
}

.card--tutoriel {
  border-left: 3px solid var(--accent);
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

.card h3 {
  color: var(--text);
}

.card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* --- CTA block --- */
.cta-block {
  background: linear-gradient(135deg, #0c1220 0%, #111827 50%, #0f172a 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  box-shadow: var(--shadow-glow);
}

.cta-block h2 {
  margin-bottom: var(--space-sm);
}

.cta-block p {
  color: var(--text-muted);
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

/* --- Article / legal --- */
.article {
  max-width: 720px;
  margin-inline: auto;
}

.article--fluid {
  max-width: none;
}

.toc-list {
  list-style: none;
  padding-left: 0;
  margin: var(--space-sm) 0 0;
}

.toc-list li {
  margin-bottom: var(--space-xs);
}

.toc-list a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toc-list a:hover {
  color: var(--text);
}

.article h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  font-size: 1.35rem;
}

.article h2:first-child {
  margin-top: 0;
}

.article h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  font-size: 1.1rem;
  color: var(--text);
}

.article p {
  margin-bottom: var(--space-md);
  color: var(--text-muted);
}

.article code {
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--accent);
}

.article ul,
.article ol {
  margin-bottom: var(--space-md);
  padding-left: 1.25rem;
  color: var(--text-muted);
  list-style: disc;
}

.article li {
  margin-bottom: var(--space-xs);
}

.article ol {
  list-style: decimal;
}

.rule-list {
  list-style: none;
  padding-left: 0;
}

.rule-list li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.rule-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Steps --- */
.steps {
  counter-reset: step;
}

.step {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  position: relative;
  padding-left: calc(var(--space-lg) + 48px);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: var(--space-lg);
  top: var(--space-lg);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-accent);
}

/* --- FAQ --- */
.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  background: var(--bg-card);
  overflow: hidden;
}

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg);
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.faq-item__question:hover {
  background: var(--bg-card-hover);
}

.faq-item__question:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.faq-item__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--accent);
  transition: transform 0.25s ease;
}

.faq-item.is-open .faq-item__icon {
  transform: rotate(180deg);
}

.faq-item__panel {
  display: none;
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.faq-item.is-open .faq-item__panel {
  display: block;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding-block: var(--space-2xl);
  margin-top: var(--space-3xl);
  background: rgba(5, 8, 16, 0.6);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 700px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.site-footer__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.site-footer__nav a {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.site-footer__nav a:hover {
  color: var(--accent);
}

.site-footer__credits {
  grid-column: 1 / -1;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.site-footer__credits p {
  margin-bottom: var(--space-sm);
}

.site-footer__ventrion {
  font-style: italic;
  opacity: 0.9;
}

.site-footer__legal {
  margin-top: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 52ch;
}

.compliance-statement {
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* --- Utilities --- */
.mt-xl {
  margin-top: var(--space-xl);
}

.btn-group--center {
  justify-content: center;
}

.text-center {
  text-align: center;
}

/* Recrutement ciblé — accueil */
.recruit__subtitle {
  margin-bottom: var(--space-md);
}

.recruit__body {
  margin: 0;
  max-width: 62ch;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.recruit__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
  align-items: stretch;
}

.recruit-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-top: 3px solid transparent;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.recruit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 0 32px rgba(34, 211, 238, 0.06);
}

.recruit-card--police {
  border-top-color: #3b82f6;
}

.recruit-card--ems {
  border-top-color: #f43f5e;
}

.recruit-card--staff {
  border-top-color: #a78bfa;
}

.recruit-card--biz {
  border-top-color: #f59e0b;
}

.recruit-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
  font-weight: 700;
}

.recruit-card--police .recruit-card__icon {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.recruit-card--ems .recruit-card__icon {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
}

.recruit-card--staff .recruit-card__icon {
  background: rgba(167, 139, 250, 0.15);
  color: #c4b5fd;
}

.recruit-card--biz .recruit-card__icon {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.recruit-card__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.recruit-card__desc {
  flex: 1 1 auto;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.recruit-card__actions {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.btn--sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.8125rem;
}

.recruit__cta-banner .recruit__cta-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  line-height: 1.35;
  margin: 0 auto var(--space-xl);
  max-width: 38rem;
  text-align: center;
  color: var(--text);
  letter-spacing: -0.02em;
}

@media (prefers-reduced-motion: reduce) {
  .recruit-card:hover {
    transform: none;
  }
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-md);
  z-index: 200;
  padding: var(--space-sm) var(--space-md);
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-md);
}

main {
  outline: none;
}

/* Révélation au scroll (léger) */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
