/* Charte proche du site x-plane.com : fond noir, accent cyan #29ABE2 — pas de vert */

:root {
  --xp-site-blue: #29abe2;
  --xp-site-blue-bright: #4dc8f0;
  --xp-site-blue-dim: rgba(41, 171, 226, 0.14);
  --xp-site-blue-glow: rgba(41, 171, 226, 0.45);

  --xp-bg: #000000;
  --xp-surface: #0a0a0a;
  --xp-elev: #111111;
  --xp-elev2: #161616;

  --xp-text: #ffffff;
  --xp-muted: #a8b0ba;

  --xp-amber: #e8a84a;

  --border: rgba(41, 171, 226, 0.22);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --radius: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

html.modal-open {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-weight: 400;
  color: var(--xp-text);
  background: var(--xp-bg);
  line-height: 1.55;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(41, 171, 226, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 171, 226, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black, transparent 72%);
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 80vmax;
  height: 80vmax;
  top: -30%;
  right: -20%;
  background: radial-gradient(circle at 40% 40%, rgba(41, 171, 226, 0.07), transparent 55%);
  pointer-events: none;
  z-index: 0;
  animation: drift 20s var(--ease) infinite alternate;
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-4%, 5%) scale(1.06);
  }
}

.site-header,
.filters,
.main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem clamp(1rem, 4vw, 3rem) 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.92);
  box-shadow: inset 0 -1px 0 var(--xp-site-blue-dim);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

a.brand:hover .brand-xp {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* X stylisé cyan (rappel visuel type site officiel) */
.brand-mark {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--xp-surface);
  border: 1px solid var(--border);
  box-shadow: 0 0 28px rgba(41, 171, 226, 0.2);
  position: relative;
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: linear-gradient(180deg, var(--xp-site-blue-bright) 0%, var(--xp-site-blue) 100%);
  border-radius: 2px;
  box-shadow: 0 0 14px var(--xp-site-blue-glow);
}

.brand-mark::before {
  width: 11px;
  height: 36px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(40deg);
}

.brand-mark::after {
  width: 11px;
  height: 36px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-40deg);
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--xp-text);
}

.brand h1 .brand-xp {
  color: var(--xp-site-blue);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.85rem 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tagline {
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
  color: var(--xp-muted);
  font-weight: 400;
}

.search-wrap input {
  width: min(100%, 280px);
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--xp-surface);
  color: var(--xp-text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-wrap input::placeholder {
  color: var(--xp-muted);
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--xp-site-blue);
  box-shadow: 0 0 0 3px var(--xp-site-blue-dim);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem) 1rem;
}

.filter-btn {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--xp-surface);
  color: var(--xp-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
}

.filter-btn:hover {
  color: var(--xp-text);
  border-color: rgba(41, 171, 226, 0.35);
  background: var(--xp-elev);
}

.filter-btn[aria-pressed="true"] {
  background: var(--xp-site-blue-dim);
  color: var(--xp-site-blue-bright);
  border-color: rgba(41, 171, 226, 0.5);
  box-shadow: 0 0 20px rgba(41, 171, 226, 0.12);
}

.main {
  padding: 0 clamp(1rem, 4vw, 3rem) 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.intro {
  margin: 1rem 0 1.5rem;
  max-width: 62ch;
  color: var(--xp-muted);
  font-size: 0.92rem;
}

.intro strong {
  color: var(--xp-site-blue);
  font-weight: 600;
}

/* ——— Placeholder image (aucune photo chargée) ——— */
.media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: inherit;
  padding: 1.25rem 1rem;
  background: linear-gradient(165deg, #0d0d0d 0%, #080808 100%);
  border: 1px dashed var(--border);
  color: var(--xp-site-blue);
  animation: placeholderPulse 3.2s ease-in-out infinite;
}

@keyframes placeholderPulse {
  0%,
  100% {
    border-color: rgba(41, 171, 226, 0.22);
    box-shadow: inset 0 0 0 0 rgba(41, 171, 226, 0);
  }
  50% {
    border-color: rgba(41, 171, 226, 0.45);
    box-shadow: inset 0 0 24px rgba(41, 171, 226, 0.06);
  }
}

.media-placeholder__icon {
  width: 40px;
  height: 40px;
  opacity: 0.95;
  filter: drop-shadow(0 0 12px var(--xp-site-blue-glow));
}

.media-placeholder__label {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.03em;
}

.media-placeholder--sm .media-placeholder__icon {
  width: 28px;
  height: 28px;
}

.media-placeholder--sm .media-placeholder__label {
  font-size: 0.72rem;
}

.aircraft-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--xp-surface);
  cursor: pointer;
  text-align: left;
  padding: 0;
  color: inherit;
  font: inherit;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s;
  animation: cardIn 0.5s var(--ease) backwards;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow), 0 0 0 1px rgba(41, 171, 226, 0.2);
  border-color: rgba(41, 171, 226, 0.28);
  outline: none;
}

.card-media {
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
}

.card-img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  display: block;
}

.card:hover .card-img {
  transform: scale(1.02);
  transition: transform 0.45s var(--ease);
}

.card-media .media-placeholder {
  min-height: 140px;
  aspect-ratio: 16 / 10;
}

.card:hover .media-placeholder__icon {
  transform: translateY(-2px);
  transition: transform 0.35s var(--ease);
}

.card-body {
  padding: 0.9rem 1rem 1.05rem;
  border-top: 1px solid var(--border-subtle);
}

.card-cat {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--xp-site-blue);
  font-weight: 600;
}

.card h2 {
  margin: 0.35rem 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--xp-text);
}

.card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--xp-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.card-specs span {
  font-family: var(--mono);
  font-size: 0.62rem;
  padding: 0.18rem 0.4rem;
  border-radius: 4px;
  background: var(--xp-bg);
  color: var(--xp-muted);
  border: 1px solid var(--border-subtle);
}

.site-footer {
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.76rem;
  color: var(--xp-muted);
  background: rgba(0, 0, 0, 0.85);
}

.site-footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-xp {
  font-weight: 700;
  color: var(--xp-site-blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  text-shadow: 0 0 18px var(--xp-site-blue-glow);
}

/* Modal */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  border: none;
  background: transparent;
  color: var(--xp-text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-modal:not([open]) {
  display: none;
  pointer-events: none;
}

.detail-modal[open] {
  display: flex;
}

.detail-modal::backdrop {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
}

.detail-inner {
  position: relative;
  width: min(920px, 100%);
  max-height: min(100dvh - 2rem, 100%);
  background: var(--xp-surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgba(41, 171, 226, 0.1);
  display: flex;
  flex-direction: column;
}

.detail-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.75);
  color: var(--xp-text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.detail-close:hover {
  background: var(--xp-site-blue-dim);
  color: var(--xp-site-blue-bright);
  border-color: rgba(41, 171, 226, 0.4);
}

.detail-hero {
  position: relative;
  flex-shrink: 0;
  min-height: 200px;
  max-height: min(36vh, 320px);
}

.detail-hero-visual {
  width: 100%;
  min-height: 200px;
  max-height: min(36vh, 320px);
  height: 100%;
}

.detail-hero-img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  max-height: min(36vh, 320px);
  object-fit: cover;
  display: block;
}

.detail-hero-visual .media-placeholder {
  min-height: 200px;
  max-height: min(36vh, 320px);
  height: 100%;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px dashed rgba(41, 171, 226, 0.25);
  border-radius: 0;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.45) 50%,
    rgba(0, 0, 0, 0.94) 100%
  );
  pointer-events: none;
}

.detail-hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.05rem 1.3rem 1.3rem;
  z-index: 2;
}

.detail-cat {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--xp-site-blue-bright);
  font-weight: 600;
}

.detail-hero-text h2 {
  margin: 0.28rem 0 0.12rem;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 600;
  color: var(--xp-text);
}

.detail-tagline {
  margin: 0;
  color: var(--xp-muted);
  font-size: 0.9rem;
}

.detail-body {
  padding: 1.05rem 1.3rem 1.45rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
}

.detail-quick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.q-item {
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: var(--xp-elev2);
  border: 1px solid var(--border-subtle);
}

.q-item dt {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--xp-muted);
  margin: 0 0 0.18rem;
}

.q-item dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--xp-text);
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 1.4rem;
}

.detail-gallery-cell {
  min-width: 0;
}

.detail-gallery-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  display: block;
}

.detail-gallery .media-placeholder {
  aspect-ratio: 4 / 3;
  min-height: 100px;
  padding: 0.75rem 0.5rem;
}

@media (max-width: 600px) {
  .detail-gallery {
    grid-template-columns: 1fr;
  }
}

.detail-sections section {
  margin-bottom: 1.2rem;
}

.detail-sections h3 {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--xp-amber);
}

.spec-row {
  display: grid;
  grid-template-columns: minmax(92px, 36%) 1fr;
  gap: 0.6rem;
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.84rem;
}

.spec-row dt {
  color: var(--xp-muted);
  font-weight: 400;
}

.spec-row dd {
  margin: 0;
  color: var(--xp-text);
}

.detail-tips {
  margin-top: 1.25rem;
  padding: 0.9rem 0.95rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--xp-site-blue-dim), transparent 60%);
  border: 1px solid rgba(41, 171, 226, 0.22);
}

.detail-tips h3 {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--xp-site-blue-bright);
  letter-spacing: 0.06em;
}

.detail-tips ul {
  margin: 0;
  padding-left: 1rem;
}

.detail-tips li {
  margin-bottom: 0.38rem;
  font-size: 0.84rem;
  color: var(--xp-muted);
}

.detail-tips li::marker {
  color: var(--xp-site-blue);
}

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

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--xp-muted);
}

/* Page À propos */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Lien de base (pages secondaires, texte) */
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--xp-site-blue-bright);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  border: 2px solid rgba(41, 171, 226, 0.55);
  background: rgba(41, 171, 226, 0.14);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(41, 171, 226, 0.12);
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.nav-link:hover {
  color: #ffffff;
  border-color: var(--xp-site-blue-bright);
  background: rgba(41, 171, 226, 0.28);
  box-shadow: 0 0 24px rgba(41, 171, 226, 0.25);
  transform: translateY(-1px);
}

.nav-link:focus-visible {
  outline: 2px solid var(--xp-site-blue-bright);
  outline-offset: 3px;
}

.nav-link[aria-current="page"] {
  color: #ffffff;
  border-color: var(--xp-site-blue-bright);
  background: rgba(41, 171, 226, 0.32);
}

/* En-tête : bouton très lisible sur fond noir */
.site-header .nav-link {
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  padding: 0.55rem 1.1rem;
  border-width: 2px;
  border-color: var(--xp-site-blue);
  background: linear-gradient(180deg, rgba(41, 171, 226, 0.22) 0%, rgba(41, 171, 226, 0.08) 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.site-header .nav-link:hover {
  color: #ffffff;
  border-color: var(--xp-site-blue-bright);
  background: linear-gradient(180deg, rgba(41, 171, 226, 0.38) 0%, rgba(41, 171, 226, 0.15) 100%);
}

.site-header .nav-link[aria-current="page"] {
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(41, 171, 226, 0.35);
}

/* Pied de page */
.site-footer .nav-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  padding: 0.45rem 0.9rem;
  border-color: rgba(41, 171, 226, 0.65);
  background: rgba(41, 171, 226, 0.12);
}

.site-footer .nav-link:hover {
  border-color: var(--xp-site-blue-bright);
  background: rgba(41, 171, 226, 0.22);
}

.about-layout {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem) 3rem;
}

.about-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(41, 171, 226, 0.45);
  background: var(--xp-site-blue-dim);
  color: var(--xp-site-blue-bright);
  margin-bottom: 1.25rem;
}

.about-layout h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.about-section {
  margin-bottom: 1.75rem;
}

.about-section h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--xp-site-blue-bright);
}

.about-section p,
.about-section li {
  margin: 0 0 0.65rem;
  color: var(--xp-muted);
  font-size: 0.94rem;
}

.about-section ul {
  margin: 0;
  padding-left: 1.15rem;
}

.about-section li::marker {
  color: var(--xp-site-blue);
}

.about-disclaimer {
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid rgba(232, 168, 74, 0.35);
  background: rgba(232, 168, 74, 0.06);
  margin-bottom: 1.75rem;
}

.about-disclaimer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--xp-text);
  line-height: 1.5;
}

.about-disclaimer strong {
  color: var(--xp-amber);
  font-weight: 600;
}
